BigDumbDinosaur wrote:
drogon wrote:
My only concession on the "old school" approach was to use GALs...
Have you published the GAL code?
I've not published anything yet, and after recent very bad (and bitter) experiences trying to maintain some GPL code I may not, however - earlier you gave the schematic for your Rd & Wr qualifier - in the GAL this looks like: (* = AND, .T means it's a tristate output and .E is the enable signal for the corresponding Tristate output pin. This is a text file under Linux 'compiled' by GALasm)
Code:
; Write and Read signals for the RAM - qualified with the 6502 phase2 clock
/WR.T = CLK * /RW * BE
/RD.T = CLK * RW * BE
; Single Enable input to tristate the chip select, etc. outputs
WR.E = BE
RD.E = BE
BE is the Bus Enable signal that comes from the host ATmega and goes into the GAL and the 65C02. The /RW line from the 6502 goes into the GAL, gets decoded and via tristate outputs into the SRAM. This is because the ATmega also drives these lines when it needs to access the SRAM. (This is the same in both the '02 and 816 systems)
So that saves a single TTL chip. The same GAL does address decoding - takes the top 8 address bits to create an IO signal at $FE00 through $FEFF, so another chip saved. It has to provide 2 CE signals to 2 x 32KB RAM chips which might need a spare gate somewhere and drives some status LEDs too. The Tristating is needed because the host ATmega can see the top 256 bytes of RAM with the 6502 (but not at the same time), so I'm using the BE signal.
In the '816 version this GAL is more or less the same although there is an extra input from the "top 8" GAL to indicate that bank 0 is in-use to further qualify the IO region so banks other than bank 0 don't affect the IO. (65C22). The "top 8" GAL latches the data bus at rising clock and acts as a 3-input OR gate for IRQ combining. If I knew how to use CPLDs I might have used one in the 816 system, but GALs are the top of my programmable logic ken right now.
Cheers,
-Gordon
_________________
--
Gordon Henderson.
See my
Ruby 6502 and 65816 SBC projects here:
https://projects.drogon.net/ruby/