|
>On a side note, I looked up the cartridge connector for the NES ... I don't see any /RESET pin or anything. How are you supposed to protect the battery backed up RAM from unwanted writes if you can't even tell when the writes are unwanted? Did they use some weird trick to get around this?
Well, an unused address line on a mapper would usually be connected to an extra chip enable line on the RAM. This was done not so much to disable illegal writes to the RAM area, but to circumvent RAM corruption during power on/downs. During this time, the logic states of address & control lines become unstable. A "pull-down" resistor tied to this chip select line would basically make sure that the RAM stays disabled when there's not enough power for the output of the MMC to drive the signal properly. But in case this trick didn't work, Nintendo told us to hold in reset while powering down. Another bit of evidence would be in the Uncharted Waters cart (ETROM). They're using 2- 8K RAM chips, instead of a 16K one. At first, I thought Nintendo was mad (or that it was cheaper for them to use 2 8Ker's than a single 16K). But then I realized why they did it. The 8K RAM chips have an active high chip select line on it (in addition to one gated with it that activates when low), which is why they used it. During power down (and because of the common ground situation between the NES & the battery-backed RAM), it's easier to force a logic line low than it is to force it high, which is why the noninverted chip select line is always used to disable the RAM during power down.
>BTW, what is "pin 38 - M2"?
It stands for "phi 2", and represents the NES's raw 1.79 MHz CPU clock signal (I have no idea why Kevin abbreviated it "M2"). The duty cycle is 62.5%, and is used as the 6502's bus enable line (active when 1). The use of this signal is required to allow the 6502 address lines (& the deocders) time to set up the next valid address before the address line data can be considered stable.
----------------------
Finally, for those of you designing the dev carts- why don't you borrow a page from an idea which Michel Iwaniec and I discussed recently on a previous thread here, and use the "multi port" RAM/ROM emulation idea. Design your dev board with an extra 28 pin (or so) connector on the back, which connects (via ribbon cable, for example) to some other microcomputer system you use to upload your NES code to the cart with in real time (i.e., NO removal of the cart requred, all you might need to do is hold in reset during the upload phase). I mean basically, if you can't afford an eprom emulator, and you're half decent with digital electronics (and don't mind actually building somthing, even if it's on a breadboard), *this* is the way to go.
When I was reverse engineering the NES's sound channels, I set up a dev cart with an authentic 1K byte dual port static ram, where the other port was tied into my PC's ISA bus. I wrote a program out of Pascal/Assembler to VERY easially upload short bits of code I wanted to run on the NES in literally fractions of a second. I do remember having to hold in the reset button during the upload (which is understandable), but this was but a slight nussiance. The project made it possible for me to write a pascal program which interacted with the NES's 6502 in real time. In 1 line of pascal code, I could make a write out to an NES port, even step through the HLL program, and never have to touch any 6502 code after the initial load was done. It was a dream.
Now, of course, you guys want to design real NES applications, and that's fine. Personally, if I had to do what you guys were, I'd use the multiport emulation idea for researce & development of my NES app projects, since REAL dual port RAM is small, expensive & rare. At any rate, anyone serious enough about doing *real* NES app dev should be serious enough to put themselves together a test rig which ensures that 99% of the time is spent on the design & programming of the app, and 1% of the time is spent on the technicalities which prevent you from running your code on the little grey box.
I originally thought that the multi-port emulation idea's most valuable quality was to allow for a super-mapper design, allowing memory allocation between the PPU & CPU to be dynamic & unified (even allowing for speedy background DMA xfers for free), but using the idea so that your favorite microcomputer system (with all your programming software on it) can have real-time access to the cart's RAM while the NES is running, is just as good.
- BT
|