Hi All
Some of you will know about the homebrew computer I have already built (full details here :
https://hackaday.io/project/5789-6502-homebrew-computer)
As you may recall, I had a memory map which was working to a degree but I had been getting away with some poor practice which was put right by folks on this marvellous forum
It now works fine at 5.36Mhz (I don't need faster and the video chip won't interface at much higher speeds anyway). So all good - sort of.
I am under utilising the RAM and ROM capacities I have on board - 128K and 64K respectively - and want to make it better. I have to do this with constraints - the breadboard space is very tight, and I want to use bits that I have in my cupboard.
I have therefore been thinking about how to re-design of the memory map.
The main thing I am concerned about is whether using a 6522 port to drive the bank select lines will be ok - for example does setting the port bits appear straight away so that the next fetch cycle by the CPU is modified by this?
There is also the slight concern of decode logic gate delays, but I think this should be ok for a 5.36Mhz CPU clock.
The main features are as follows:
- Ability to disable ROM to switch in the RAM 'underneath'. Using 1 bit of the 6522 port B
- All writes to ROM actually get diverted to RAM (allows writing without having to switch out the RAM, also can copy ROM to RAM if I wish)
- Move the 4K IO region from B000-BFFF to 1K region 0400-07FF, freeing up more addressable RAM and providing contiguous space through to BFFF or FFFF (when ROM is disabled)
- Switch between 4 banks of 32K for RAM - any address in the upper 32K of the map. Using 2 bits of 6522 port B
- Switch between 4 banks of 16K for ROM - any address in the upper 16K of the map. Using 2 bits of 6522 port B
The design uses 4 logic chips which I have to hand (I have space for 3, will do some rearranging to get the 4th on the breadboard)
- 1x74HCT138 for IO selection logic
- 1x74HC00 and 1x74HC02 for ROM and RAM selection logic
- 1x74HC00 for ROM and RAM banking logic
The attached picture gives the details - views welcome!
** Edit **
Since the above start to the thread, diagram is corrected