Another planned 65C816 computer build and a few questions.
Posted: Sat Jun 02, 2018 6:15 pm
Hi everyone.
First, a little bit about me. Sorry if this is boring. I got my first computer when I was eleven, a Timex 1000 (a rebranded ZX-81). My dad built it as a kit and once he was done building it he lost interest, and I took it over. A little while later the family got a VIC-20 and shortly after that, I got a paper route to buy my own Atari 600XL. A little while later the family upgraded the VIC-20 to a C64. I was hooked and fell in love with programming. I was writing my own games in 6502 assembly at 12 and eventually went on to do professional software development as a career. So in other words I am no stranger to the 6502 or software development. The hardware side, not so much.
After getting a great sense of nostalgia watching my kids enjoy my collection of 8-bit machines and building an RC2014 kit I now have the urge to build my own 6502 based computer. I have wanted to do this for a number of years now and have spent many countless hours reading and rereading about the projects others have built and have been devouring every bit of information on the subject so generously shared by others. Many of whom are on this very forum. Thank you so much!
So a little bit about what I have planned.
I am definitely someone that would be considered a novice when it come to the double E side of computers. Well, novice would probably be generous.
I plan on building this in stages starting with a breadboard implementation at low speed <= 1Mhz. I'll be starting with a free run (the hardware equivalent of "hello world"?) and start adding functionality from there.
Once I have a design proven out on the breadboards at ~1Mhz, I'm planning on having PCBs made and a somewhat modular backplane design a'la RC2014 style. Then I will start bumping up the clock speed and attempt to get to ~7-8Mhz.
Now for some more specifics.
This will be primarily a 3.3v design. new 5v parts seem to be hard to find these days in any configuration, let alone through hole, breadboard friendly packaging, and some of my design choices kinda force me to go with 3.3v. This is also why my speed limit will ultimately be around 8Mhz as those are the limits on the CPU at 3.3v according to the datasheet.
Here are my initial component choices:
CPU: WDC 65C816
ROM: SST39SF040 512k x 8 Flash used as ROM
RAM: AS6C4008 512k x 8 Static RAM (x4)
IO: WDC 65C22 VIA (x2) and others TBD. Probably 65C51 for serial.
The vast majority of the glue logic I plan on implementing on an FPGA (hence the 3.3v limitation). I have had an FPGA development board for about 4 years that I have played around with and feel confident I can implement what I need.
The FPGA I have chosen is a Spartan 6 XC6SLX9 in the form of the Mojo V3 development board since it has lots of available IO. It will be the backbone of the design. I plan on using it to provide the system reset circuit, system clock with a selectable run/single step mode, 65C816 data/address bus demuxing, address decoding providing up to 16 chip/slot selects, address remapping, and if I have enough room on the FPGA, video out to VGA, and stereo audio out.
The Flash ROM is actually a 5v part, but the inputs according to the datasheet are supposed to be 3.3v compatible, the data out pins will need to be level shifted and I have an 8 channel level shifter on my parts list. The speed of the ROM and the propagation delay in the level shifter will make this ROM unusable at higher speeds so I may implement emulated ROM in RAM using the FPGA. At startup the FPGA would hold the system in a suspended state while copying the ROM into RAM at a speed appropriate for the limits of the ROM. After copying the ROM, the ROM will be taken off the bus and then the FPGA will then start the system and enforce write protection on the RAM. I have an external programmer to get data into the ROM so the board should never require a 5v input into it except for Vcc.
For video I plan on using the FPGA to implement a 320x200 pixel display and have it provide a VIC-II like register set to the processor. The FPGA will provide a 64k area of dedicated video RAM. The video RAM will be implemented using the internal block RAM on board the FPGA and will be dual ported, the register set for video will also be implemented in dual port block RAM. I hope that by using dual ported memory, it will allow me to keep the slow clock domain (1-8Mhz) of the overall system and the high speed clock domain (50Mhz) of the video implementation separate. This should also allow the processor and video to access video RAM and registers simultaneously without having to implement wait-states or cycle sharing like on the C64.
I have not given a lot of thought to sound output yet, but I would think it would be similar to video, possibly providing a SID like register set implemented as dual port block RAM and sound output using PWM. A proper retro computer has gotta have beeps and boops.
So, now a couple of questions.
The first question is what is your general sense for what I have planned? Does what I have planned sound workable? Does anyone have any suggestions?
The 65C816 has the multiplexed address and data bus. Does anyone know if the upper 8 bits of the address are driven on the data lines during PHI2 low when the processor is in emulation mode? I saw a couple of 65C816 to 6502 adapter boards and they did not seem to be doing anything to isolate the data bus during PHI2 low. I haven't found anything indicating it is not driven when in emulation mode in the datasheet. Just wondering if I need to handle demuxing for a free run.
I also have a question about decoupling caps. Are the cap values that are generally used in 5v designs applicable for 3.3v or do I need to figure out different values specific to 3.3v? I have a general understanding of the digital side of things but analog might as well be black magic to me at this point.
If you got this far, thanks for hanging in through the rambling.
Brad
First, a little bit about me. Sorry if this is boring. I got my first computer when I was eleven, a Timex 1000 (a rebranded ZX-81). My dad built it as a kit and once he was done building it he lost interest, and I took it over. A little while later the family got a VIC-20 and shortly after that, I got a paper route to buy my own Atari 600XL. A little while later the family upgraded the VIC-20 to a C64. I was hooked and fell in love with programming. I was writing my own games in 6502 assembly at 12 and eventually went on to do professional software development as a career. So in other words I am no stranger to the 6502 or software development. The hardware side, not so much.
After getting a great sense of nostalgia watching my kids enjoy my collection of 8-bit machines and building an RC2014 kit I now have the urge to build my own 6502 based computer. I have wanted to do this for a number of years now and have spent many countless hours reading and rereading about the projects others have built and have been devouring every bit of information on the subject so generously shared by others. Many of whom are on this very forum. Thank you so much!
So a little bit about what I have planned.
I am definitely someone that would be considered a novice when it come to the double E side of computers. Well, novice would probably be generous.
I plan on building this in stages starting with a breadboard implementation at low speed <= 1Mhz. I'll be starting with a free run (the hardware equivalent of "hello world"?) and start adding functionality from there.
Once I have a design proven out on the breadboards at ~1Mhz, I'm planning on having PCBs made and a somewhat modular backplane design a'la RC2014 style. Then I will start bumping up the clock speed and attempt to get to ~7-8Mhz.
Now for some more specifics.
This will be primarily a 3.3v design. new 5v parts seem to be hard to find these days in any configuration, let alone through hole, breadboard friendly packaging, and some of my design choices kinda force me to go with 3.3v. This is also why my speed limit will ultimately be around 8Mhz as those are the limits on the CPU at 3.3v according to the datasheet.
Here are my initial component choices:
CPU: WDC 65C816
ROM: SST39SF040 512k x 8 Flash used as ROM
RAM: AS6C4008 512k x 8 Static RAM (x4)
IO: WDC 65C22 VIA (x2) and others TBD. Probably 65C51 for serial.
The vast majority of the glue logic I plan on implementing on an FPGA (hence the 3.3v limitation). I have had an FPGA development board for about 4 years that I have played around with and feel confident I can implement what I need.
The FPGA I have chosen is a Spartan 6 XC6SLX9 in the form of the Mojo V3 development board since it has lots of available IO. It will be the backbone of the design. I plan on using it to provide the system reset circuit, system clock with a selectable run/single step mode, 65C816 data/address bus demuxing, address decoding providing up to 16 chip/slot selects, address remapping, and if I have enough room on the FPGA, video out to VGA, and stereo audio out.
The Flash ROM is actually a 5v part, but the inputs according to the datasheet are supposed to be 3.3v compatible, the data out pins will need to be level shifted and I have an 8 channel level shifter on my parts list. The speed of the ROM and the propagation delay in the level shifter will make this ROM unusable at higher speeds so I may implement emulated ROM in RAM using the FPGA. At startup the FPGA would hold the system in a suspended state while copying the ROM into RAM at a speed appropriate for the limits of the ROM. After copying the ROM, the ROM will be taken off the bus and then the FPGA will then start the system and enforce write protection on the RAM. I have an external programmer to get data into the ROM so the board should never require a 5v input into it except for Vcc.
For video I plan on using the FPGA to implement a 320x200 pixel display and have it provide a VIC-II like register set to the processor. The FPGA will provide a 64k area of dedicated video RAM. The video RAM will be implemented using the internal block RAM on board the FPGA and will be dual ported, the register set for video will also be implemented in dual port block RAM. I hope that by using dual ported memory, it will allow me to keep the slow clock domain (1-8Mhz) of the overall system and the high speed clock domain (50Mhz) of the video implementation separate. This should also allow the processor and video to access video RAM and registers simultaneously without having to implement wait-states or cycle sharing like on the C64.
I have not given a lot of thought to sound output yet, but I would think it would be similar to video, possibly providing a SID like register set implemented as dual port block RAM and sound output using PWM. A proper retro computer has gotta have beeps and boops.
So, now a couple of questions.
The first question is what is your general sense for what I have planned? Does what I have planned sound workable? Does anyone have any suggestions?
The 65C816 has the multiplexed address and data bus. Does anyone know if the upper 8 bits of the address are driven on the data lines during PHI2 low when the processor is in emulation mode? I saw a couple of 65C816 to 6502 adapter boards and they did not seem to be doing anything to isolate the data bus during PHI2 low. I haven't found anything indicating it is not driven when in emulation mode in the datasheet. Just wondering if I need to handle demuxing for a free run.
I also have a question about decoupling caps. Are the cap values that are generally used in 5v designs applicable for 3.3v or do I need to figure out different values specific to 3.3v? I have a general understanding of the digital side of things but analog might as well be black magic to me at this point.
If you got this far, thanks for hanging in through the rambling.
Brad