Mode 7 at 3C00 on the B+

discuss bbc micro and electron emulators (including mame) here!
Post Reply
Coeus
Posts: 1816
Joined: Mon Jul 25, 2016 12:05 pm
Contact:

Mode 7 at 3C00 on the B+

Post by Coeus » Fri Aug 07, 2020 12:51 pm

SteveF recently made me aware that, on a Model B at least, it is possible to relocate the Mode 7 screen to 3C00. I am not sure if this is intentional or just a quirk but one of the bits of the memory address lines from the 6845, MA11, still makes it through to the RAM as the most significant bit when the next three less significant its are all fixed at '1'. There is more detail at: http://beebwiki.mdfs.net/Address_translation

I now have a patch for B-Em to implement this but I'd like to confirm whether this works on a B+ as, while I am working on it, it would be nice to have it completely right. Unless the answer is already documented could someone run a test program on a B+, please. See: viewtopic.php?f=54&t=20149#p282406 where an SSD with the program can be downloaded and confirm if the Mode 7 relocation is possible on the B+ or not.

User avatar
rmbrowngr
Posts: 420
Joined: Sat Jan 13, 2018 12:46 pm
Location: Dionysos, Greece
Contact:

Re: Mode 7 at 3C00 on the B+

Post by rmbrowngr » Fri Aug 07, 2020 5:20 pm

Happy to try it, but it’ll have to wait until Tuesday or Wednesday next week when I’m back home. If no one else has tried it by then.
Richard B
Acorn Electrons issue 4 and 6, MRB, Plus 1, AP6, AP5, Pegasus 400, BeebSCSI, Gotek, Raspberry Pi, GoSDC MBE.
BBC B+ 64K (128K upgraded) with Duel OS, Raspberry Pi and Gotek.

Coeus
Posts: 1816
Joined: Mon Jul 25, 2016 12:05 pm
Contact:

Re: Mode 7 at 3C00 on the B+

Post by Coeus » Sat Aug 08, 2020 3:11 pm

rmbrowngr wrote:
Fri Aug 07, 2020 5:20 pm
Happy to try it, but it’ll have to wait until Tuesday or Wednesday next week when I’m back home. If no one else has tried it by then.
Thanks.

User avatar
rmbrowngr
Posts: 420
Joined: Sat Jan 13, 2018 12:46 pm
Location: Dionysos, Greece
Contact:

Re: Mode 7 at 3C00 on the B+

Post by rmbrowngr » Wed Aug 12, 2020 3:28 pm

Ran the disk and I get themessage "Sorry BBC B only!".
Richard B
Acorn Electrons issue 4 and 6, MRB, Plus 1, AP6, AP5, Pegasus 400, BeebSCSI, Gotek, Raspberry Pi, GoSDC MBE.
BBC B+ 64K (128K upgraded) with Duel OS, Raspberry Pi and Gotek.

Coeus
Posts: 1816
Joined: Mon Jul 25, 2016 12:05 pm
Contact:

Re: Mode 7 at 3C00 on the B+

Post by Coeus » Wed Aug 12, 2020 4:49 pm

rmbrowngr wrote:
Wed Aug 12, 2020 3:28 pm
Ran the disk and I get themessage "Sorry BBC B only!".
Oh dear - that message is just checking what type of machine it is running on, not whether this mode 7 trick actually works. Could you try in again, please but instead of doing shift-break do:

Code: Select all

> LOAD "M7-3C00"
> 3
> RUN
i.e. delete the machine-type test so the program attempts to put Mode 7 at 3C00 anyway. If it works you should get:
worked.png
If it doesn't work you may get this:
failed.png
or maybe something else.

User avatar
rmbrowngr
Posts: 420
Joined: Sat Jan 13, 2018 12:46 pm
Location: Dionysos, Greece
Contact:

Re: Mode 7 at 3C00 on the B+

Post by rmbrowngr » Thu Aug 13, 2020 8:55 pm

Will try again with your instructions when back home again. On the beach, away from home.
Richard B
Acorn Electrons issue 4 and 6, MRB, Plus 1, AP6, AP5, Pegasus 400, BeebSCSI, Gotek, Raspberry Pi, GoSDC MBE.
BBC B+ 64K (128K upgraded) with Duel OS, Raspberry Pi and Gotek.

User avatar
rmbrowngr
Posts: 420
Joined: Sat Jan 13, 2018 12:46 pm
Location: Dionysos, Greece
Contact:

Re: Mode 7 at 3C00 on the B+

Post by rmbrowngr » Thu Aug 20, 2020 6:46 pm

Coeus wrote:
Wed Aug 12, 2020 4:49 pm
Oh dear - that message is just checking what type of machine it is running on, not whether this mode 7 trick actually works. Could you try in again, please but instead of doing shift-break do:

Code: Select all

> LOAD "M7-3C00"
> 3
> RUN
i.e. delete the machine-type test so the program attempts to put Mode 7 at 3C00 anyway. If it works you should get:
worked.png
If it doesn't work you may get this:
failed.png
or maybe something else.
Here's the result, which is not what you where hoping for:
IMG_3489.jpg
Machine config
IMG_3490.jpg
Richard B
Acorn Electrons issue 4 and 6, MRB, Plus 1, AP6, AP5, Pegasus 400, BeebSCSI, Gotek, Raspberry Pi, GoSDC MBE.
BBC B+ 64K (128K upgraded) with Duel OS, Raspberry Pi and Gotek.

User avatar
jgharston
Posts: 4118
Joined: Thu Sep 24, 2009 12:22 pm
Location: Whitby/Sheffield
Contact:

Re: Mode 7 at 3C00 on the B+

Post by jgharston » Thu Aug 20, 2020 6:54 pm

On real hardware, when the teletext hardware is selected, address lines A10-A13 are all tied to '1', so unless the top 16K RAM is physical absent, the CRTC will always see 7C00-7FFF. The model A only sees 3C00-3FFF because there is physically nothing present at 4000-7FFF and address line A13 is ignored.

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.32
(C) Copyright J.G.Harston 1989,2005-2020
>_

Coeus
Posts: 1816
Joined: Mon Jul 25, 2016 12:05 pm
Contact:

Re: Mode 7 at 3C00 on the B+

Post by Coeus » Thu Aug 20, 2020 7:31 pm

rmbrowngr wrote:
Thu Aug 20, 2020 6:46 pm
Here's the result, which is not what you where hoping for:
Thanks for doing the test, Richard. I am not trying to use this trick on a BBC B+ myself it is more a case that Steve F was doing something with it and reported that B-Em was not emulating it correctly. So we got to the point we knew the trick did work on a BBC B and didn't work on a Master but we didn't know about the B+. So now, thanks to your help, I can make the B+ emulation in B-Em behave like a real B+ (which for this is the same as the Master).

Coeus
Posts: 1816
Joined: Mon Jul 25, 2016 12:05 pm
Contact:

Re: Mode 7 at 3C00 on the B+

Post by Coeus » Thu Aug 20, 2020 7:44 pm

jgharston wrote:
Thu Aug 20, 2020 6:54 pm
On real hardware, when the teletext hardware is selected, address lines A10-A13 are all tied to '1', so unless the top 16K RAM is physical absent, the CRTC will always see 7C00-7FFF. The model A only sees 3C00-3FFF because there is physically nothing present at 4000-7FFF and address line A13 is ignored.
I think we did some tests and concluded that the OS still writes to 7C00-7FFF on a Model A and takes advantage of partial address decoding as you imply to display the last 1K of the 16K present but this trick is not quite the same as that.

What is behind this trick is that while A10-A13 are set to one, A14 is not, it comes from the screen address wrap-around circuit and can tus be manipulated. See: http://beebwiki.mdfs.net/Address_translation#TTX_VDU

Coeus
Posts: 1816
Joined: Mon Jul 25, 2016 12:05 pm
Contact:

Re: Mode 7 at 3C00 on the B+

Post by Coeus » Thu Aug 20, 2020 8:07 pm

Coeus wrote:
Thu Aug 20, 2020 7:44 pm
What is behind this trick is that while A10-A13 are set to one, A14 is not, it comes from the screen address wrap-around circuit and can tus be manipulated. See: http://beebwiki.mdfs.net/Address_translation#TTX_VDU
So checking the circuit diagram, IC36 transforms the C0,C1 values from IC32 to produce the B inputs to the adder IC39 with the A inputs coming from MA8-MA11 of the 6845. While the sum outputs S1-S3 only go to IC9 which is specific to the HiRes (bitmap) column address, S4 goes to IC28. IC28 is using the phase of the clock to select what is determining which RAM bank to use - on one phase it is the CPU A14 and on the other it is S4 from IC39 (the adder).

Post Reply

Return to “8-bit acorn emulators”