Interleaving video memory acces for the MC6845
Interleaving video memory acces for the MC6845
I recently got an MC6845, and I have been able to produce a screen-full of text. My test setup has the data bus connected to an Arduino, the 6845's address bus simply going to an 8K SRAM, the
character clock at 1MHz, and pixels output at 8MHz. The 6845 is programmed to provide a 50hz VSync, and has exclusive access to the memory bus.
I would now like to interface it to a 65C02. For the 6845 to be of any use, the 65C02 would of course have to be able to read/write to/from video memory. I am currently thinking of two methods for
splitting memory access between the two chips. First would be the 6845's CLK (character clock) input and the 65C02 PHI2 input sharing the same signal, and the 65C02 RDY and BE inputs being
high during the blanking intervals and the end of a scanline/field. This method would result in no MPU activity while an image is displayed.
The second method would be (as the title suggests) interleaving memory access. The datasheet for the MOS 6545-1 has a diagram showing the timing of this method (Figure 6, attached to this post.)
I am uncertain of how I should go about implementing this. I'm currently thinking that I would only need 2 octal buffers on the 6845's address outputs, whose inverted output-enables are connected to
PHI2, and the 65C02's BE connected to PHI2 as well. This would disconnect the 6845's address bus from the rest of the system when PHI2 is high, while enabling the 65C02's buses, and do the
opposite while PHI2 is low. I believe that this would also require the character clock to be driven by PHI1 instead of PHI2.
Interleaving memory access seems almost too easy, especially when considering the pros of it. It feels like I must be missing something, and as such, I have written this post in order to double check
with you all. Thanks in advance for your input on the matter.
character clock at 1MHz, and pixels output at 8MHz. The 6845 is programmed to provide a 50hz VSync, and has exclusive access to the memory bus.
I would now like to interface it to a 65C02. For the 6845 to be of any use, the 65C02 would of course have to be able to read/write to/from video memory. I am currently thinking of two methods for
splitting memory access between the two chips. First would be the 6845's CLK (character clock) input and the 65C02 PHI2 input sharing the same signal, and the 65C02 RDY and BE inputs being
high during the blanking intervals and the end of a scanline/field. This method would result in no MPU activity while an image is displayed.
The second method would be (as the title suggests) interleaving memory access. The datasheet for the MOS 6545-1 has a diagram showing the timing of this method (Figure 6, attached to this post.)
I am uncertain of how I should go about implementing this. I'm currently thinking that I would only need 2 octal buffers on the 6845's address outputs, whose inverted output-enables are connected to
PHI2, and the 65C02's BE connected to PHI2 as well. This would disconnect the 6845's address bus from the rest of the system when PHI2 is high, while enabling the 65C02's buses, and do the
opposite while PHI2 is low. I believe that this would also require the character clock to be driven by PHI1 instead of PHI2.
Interleaving memory access seems almost too easy, especially when considering the pros of it. It feels like I must be missing something, and as such, I have written this post in order to double check
with you all. Thanks in advance for your input on the matter.
Re: Interleaving video memory acces for the MC6845
olof-a wrote:
I am uncertain of how I should go about implementing this. I'm currently thinking that I would only need 2 octal buffers on the 6845's address outputs, whose inverted output-enables are connected to
PHI2, and the 65C02's BE connected to PHI2 as well. This would disconnect the 6845's address bus from the rest of the system when PHI2 is high, while enabling the 65C02's buses, and do the
opposite while PHI2 is low. I believe that this would also require the character clock to be driven by PHI1 instead of PHI2.
Interleaving memory access seems almost too easy, especially when considering the pros of it. It feels like I must be missing something, and as such, I have written this post in order to double check
with you all. Thanks in advance for your input on the matter.
PHI2, and the 65C02's BE connected to PHI2 as well. This would disconnect the 6845's address bus from the rest of the system when PHI2 is high, while enabling the 65C02's buses, and do the
opposite while PHI2 is low. I believe that this would also require the character clock to be driven by PHI1 instead of PHI2.
Interleaving memory access seems almost too easy, especially when considering the pros of it. It feels like I must be missing something, and as such, I have written this post in order to double check
with you all. Thanks in advance for your input on the matter.
Usually systems I've looked at put bus transceivers/buffers/multiplexers between the CPU and the (video) memory address bus (and data bus). The BBC Micro (http://www.mdfsnet.f9.co.uk/Info/Comp/B ... ts/bbc.gif, lower centre area of the circuit) used buffers (ICs 8,9,10,11,12,13) for the address bus, and a transceiver (IC14) for the data bus. For the revised "B Plus" (http://www.mdfsnet.f9.co.uk/Info/Comp/B ... bcplus.gif, bottom centre again but also snaking up the middle a bit) they switched to tri-state multiplexers which are actually more or less used like buffers again - the multiplexing is, I believe, just there due to how dynamic RAM works. So really in principle it was just buffers again. For the later Master, they used custom programmed logic chips.
Most of my own designs (e.g. https://github.com/gfoot/simplevga6502/ ... ematic.png) have used bus transceivers for this, but I usually just use them like one-way buffers, with the direction fixed.
You can also use 2-to-1 multiplexers, with the 6845 and 6502 driving the inputs and the multiplexer choosing which one to send to the RAM's address bus based on e.g. PHI1 or PHI2. It should work well and they don't need to be tristate for this.
But again there's nothing wrong with using buffers, since you're already doing that for the 6845 - you just need to use them between the 6502's address bus and the video RAM's address bus.
Re: Interleaving video memory acces for the MC6845
olof-a wrote:
the 65C02's BE connected to PHI2
Thanks!
Chad
Re: Interleaving video memory acces for the MC6845
A caution there - I too have successfully used BE and PH2 tied together but at speeds up to 2MHz with no faster testing - is that it might upset/break operation of e.g. 6522 that's relying on the address being there before PH2.
Neil
Neil
Re: Interleaving video memory acces for the MC6845
Quote:
But again there's nothing wrong with using buffers, since you're already doing that for the 6845 - you just need to use them between the 6502's address bus and the video RAM's address bus.
Re: Interleaving video memory acces for the MC6845
If you haven't already read this, Synertek app note 3 has useful information on the various ways of interfacing to the 6545.
I particularly like the example of using the 6545 address lines as a keyboard scanner.
I particularly like the example of using the 6545 address lines as a keyboard scanner.
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: Interleaving video memory acces for the MC6845
jds wrote:
If you haven't already read this, Synertek app note 3 has useful information on the various ways of interfacing to the 6545.
I particularly like the example of using the 6545 address lines as a keyboard scanner.
I particularly like the example of using the 6545 address lines as a keyboard scanner.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: Interleaving video memory acces for the MC6845
Hmm. Can't connect to the archive...
Neil
Neil
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: Interleaving video memory acces for the MC6845
barnacle wrote:
Hmm. Can't connect to the archive...
Neil
Neil
I just tried it and everything was hunky-dory.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: Interleaving video memory acces for the MC6845
Hi Neil,
I just tried it and everything was hunky-dory.
I tried it too and it was indeed a slow connection and difficult to download at the moment (suppose location/time dependant).
I already downloaded that file some time ago, maybe this will help:
BigDumbDinosaur wrote:
barnacle wrote:
Hmm. Can't connect to the archive...
Neil
Neil
I just tried it and everything was hunky-dory.
I already downloaded that file some time ago, maybe this will help:
- Attachments
-
- synertek_an3_6545_crtc.pdf
- (2.45 MiB) Downloaded 50 times
Gr
tings, Louis
May your wires be long and your nerves be strong !
May your wires be long and your nerves be strong !
Re: Interleaving video memory acces for the MC6845
Thanks Louis, got it now, ping time in excess of thirty seconds and about ninety seconds to resolve the page. Downloaded quickly enough once it found it, though.
Neil
Code: Select all
barnacle@barnacle-Latitude-9430:~$ ping archive.6502.org
PING archive.6502.org (172.105.137.7) 56(84) bytes of data.
^C
--- archive.6502.org ping statistics ---
32 packets transmitted, 0 received, 100% packet loss, time 31765ms
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: Interleaving video memory acces for the MC6845
barnacle wrote:
Code: Select all
barnacle@barnacle-Latitude-9430:~$ ping archive.6502.org
PING archive.6502.org (172.105.137.7) 56(84) bytes of data.
^C
--- archive.6502.org ping statistics ---
32 packets transmitted, 0 received, 100% packet loss, time 31765msx86? We ain't got no x86. We don't NEED no stinking x86!
Re: Interleaving video memory acces for the MC6845
Yeah, the drag is amazing. But it usually makes for a peaceful trip. 
Neil
p.s. not responding today, either. Though no problems with the forum. Web.archive is throwing a 503/no server available error, so I guess it's their end.
Neil
p.s. not responding today, either. Though no problems with the forum. Web.archive is throwing a 503/no server available error, so I guess it's their end.
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: Interleaving video memory acces for the MC6845
barnacle wrote:
p.s. not responding today, either. Though no problems with the forum. Web.archive is throwing a 503/no server available error, so I guess it's their end.
x86? We ain't got no x86. We don't NEED no stinking x86!
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: Interleaving video memory acces for the MC6845
The separate archive site was apparently having problems. It's working at the moment. See viewtopic.php?p=108480#p108480 for the explanation of why there was this redirect.
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?