Agumander wrote:
A15 on my system is already used to select the cartridge port, so I had the idea to use A14 as a sort of "banking enable" where it drives the banked address pins high if A14 is high, and enable output on the bank register when A14 is low. Is this a reasonable approach?
That sounds as if you have logic in the main system to somehow enable or disable the cartridge port. Is that really the case? Wouldn't it be easier and more flexible just to have the cartridge port be a straight extension of the system bus and let the cartridge decide to what addresses it will respond? (Consider that you may want to have more than just ROM in $8000-$FFFF on a cart.)
At any rate, fixed ROM in $C000-$FFFF and banked ROM in $8000-$BFFF is the approach used by
UxROM, one of the simplest NES "mappers" (the term used in the community for decoding logic on board an NES cartridge). You may find it enlightening to read through the details of some of the other
mappers to see the variety of hardware they put on cartridges and the various ways they have of accessing it.
Quote:
I also attached the schematic I have drafted for the cartridge. I don't necessarily intend for the game console itself to write to the memory.
Keep in mind that it's not unusual for developers to want persistent RAM (back in the day, usually battery-backed) in a cartridge for game saves and suchlike. But in this particular case, yes, disabling writes to what is intended to be ROM for the "production" carts is probably a good idea.
A thought that comes to mind is to have a dedicated "dev mode" line on the cartridge port that is grounded on consoles, but brought high on programmers and switchable on development systems; that could be used to let carts enable/disable certain hardware (such as EEPROM write protect), albeit sometimes at the cost of a little bit of extra circuitry on the cart.
It looks to me as if you don't need a jumper for ready/busy, though, do you? If the ROM is never written, ought ready/busy never go low? And unless there's a reason to do otherwise, you might also consider always holding /WP high and instead jumpering /WE between system /WE and Vcc, so that you're using the same design as you'd use on other EEPROM chips that don't have a separate /WP line. (Having a DEV line on the cartridge port would be a reason to do otherwise, of course. :-))
By the way, wiring the EEPROM ready output to the CPU's READY line is a brilliant little trick!
Quote:
It also seems unlikely that a crashed program will accidentally send the correct set of commands to modify the flash data; so it should be safe to leave these jumpers connected in "writable mode" during development.
That may be true of this EEPROM, but others, such as the common
AT28Cxxx parts, do not have any special write setup IIRC (though some do have special sequences for full-device erase and the like)