Re: INL-ROM v2 flash 'simple' dev/repro USB boards
Posted: Tue Oct 29, 2013 12:16 pm
So I'm planning on adding discrete mapper support to this board for appeal to homebrews which are content with a discrete mapper. I had plans to make discrete mapper boards flashable via the kazzo using an added resistor to pull down the /OE pin which would also be connected to EXP0. That would allow for writing via the kazzo. But that wouldn't allow it to be flashed via the NES for saves and such.
You could of course add some extra logic to make it work, but if the goal is to be as minimalistic as possible, a one chip discrete mapper is desirable.
I had a thought which I believe will work with a number of limitations. Can anyone see any reason this won't work? Or another limitation I'm missing?
The idea would be to ground the /CE pin on the flash, tie /WE to R/W, and /OE to PRG /CE. The /CE pin can stay grounded at all times. The /OE pin must be high for writes, and low for reads. The mapper would be connected normally, and work for UNROM, ANROM, BNROM, etc or even some hybrid that banks CHR-RAM or something. So writes to $0000-7FFF would write to flash, and writes to $8000-FFFF would be to the mapper, and read from flash. That would only allow the last bank to be writable since you could only really use $4020-7FFF for non-conflicted writes. That'd be okay for game use generally though since you shouldn't have to access all banks for the sole purpose of saves. But that does suck up a fair amount of space in your fixed bank (EDIT: for standard UNROM style only though)
(EDIT: For UNROM): You'd probably want to write to the mapper selected bank in $0000-3FFF, BUT you'd have to be careful because of the conflicts with other hardware mappings. Writes to RAM and the PPU could be easily recovered from though if you were smart about it. One other limit would be that you couldn't write to the mapper (or anywhere really) while in the middle of a flash writing routine. You'd have to make your flash writing routine run from RAM because you can't execute from flash while in the middle of write routines...
The only other thing you'd have to watch out for is some how accidentally writing the unlock and write/erase command routine to the flash when you were trying to just use the hardware mapped to those locations. I think the chances of that are pretty slim though based on all the hoops you have to jump through to unlock the flash (expressed in limitations above.)
That's an awful lot of work to avoid needing a extra gate or two.
But for people content with a discrete mapper it might be worthwhile to have nvm for saves on a discrete board without any extra hardware. Thoughts???
You could of course add some extra logic to make it work, but if the goal is to be as minimalistic as possible, a one chip discrete mapper is desirable.
I had a thought which I believe will work with a number of limitations. Can anyone see any reason this won't work? Or another limitation I'm missing?
The idea would be to ground the /CE pin on the flash, tie /WE to R/W, and /OE to PRG /CE. The /CE pin can stay grounded at all times. The /OE pin must be high for writes, and low for reads. The mapper would be connected normally, and work for UNROM, ANROM, BNROM, etc or even some hybrid that banks CHR-RAM or something. So writes to $0000-7FFF would write to flash, and writes to $8000-FFFF would be to the mapper, and read from flash. That would only allow the last bank to be writable since you could only really use $4020-7FFF for non-conflicted writes. That'd be okay for game use generally though since you shouldn't have to access all banks for the sole purpose of saves. But that does suck up a fair amount of space in your fixed bank (EDIT: for standard UNROM style only though)
(EDIT: For UNROM): You'd probably want to write to the mapper selected bank in $0000-3FFF, BUT you'd have to be careful because of the conflicts with other hardware mappings. Writes to RAM and the PPU could be easily recovered from though if you were smart about it. One other limit would be that you couldn't write to the mapper (or anywhere really) while in the middle of a flash writing routine. You'd have to make your flash writing routine run from RAM because you can't execute from flash while in the middle of write routines...
The only other thing you'd have to watch out for is some how accidentally writing the unlock and write/erase command routine to the flash when you were trying to just use the hardware mapped to those locations. I think the chances of that are pretty slim though based on all the hoops you have to jump through to unlock the flash (expressed in limitations above.)
That's an awful lot of work to avoid needing a extra gate or two.