Today I had a new idea. I can take an official cart and scan it to see which blocks are unprotected. That means they’re writable. The save-game data will always be stored in one or more of the writable blocks.
I worked on the RACE NGPC emulator’s flash memory emulation enough to know how it stores the save-game data in a file. So, I combined these to make a tool to back up an official cart’s save-game data to a NGF file which RACE and NeoPop can use.
So, the idea is that you could take an official cart and backup its save-game data to a file. This file could either be used on an emulator or to restore it to a cart later.
It’s simple, but nifty. I got the backup working. I’ll work on restoring it later. It’s worth noting that this should also be able to take a NGF file from an emulator (RACE/NeoPop) and write it to an official cart.
Well, there wasn’t much for new development over the weekend. I don’t have any new pictures or videos to show off, because the things I did weren’t very showy.
On the USB Pocket Linker front, I wrestled with optimizing the cartridge dump/backup process. I put a little work into making the command-line application a bit more usable. Then I came up with a way to transfer bulk data (as opposed to a byte at a time). I believe that my final test had me back up an entire 32mbit cart in 138 seconds. That’s not blazing speed, but it’s definitely fast enough. This isn’t something people will do super often, and a couple minutes is no big deal, in my opinion.
Writing an entire 32mbit cart will be a whole different issue. To create a bulk transfer write process, the linker itself will need to be much smarter. The flash chip that we chose to base our new pocket flash cart around supports a bypass write mode. This will help with the bulk transfer, but I don’t know what we’re looking at for speed. At the moment, I don’t have a writable cart, so I can’t really test write speed. When I get a cart, if it’s under say 10 minutes to write the cart, that will be just fine, and I won’t worry about optimizing. I don’t know how realistic that is, though. We’ll just have to wait and see.
The other thing I worked on a bit was a plan of attack for the pocket flash cartridge’s logic. I know what it needs to do, but I hadn’t planned out a process for it. I started that, and it is currently a fairly simple design. I will need to learn more about how I can actually implement the design and then adapt the design to the implementation. Gerry promised to review this rudimentary design with some of his brilliant peers and see how they reacted. Hopefully it’s positive.
As for Gerry’s work, I know he’s been mapping out a PCB for the pocket flash cart. He has a design ready, but it isn’t quite all planned out. He’s also been analyzing some of the logic signals on the cart edge connector. I’m going to want that data so I can tweak my piece of the puzzle accordingly.
Both of us get a bit of time here and there. The project may move a bit more slowly for a while as real life takes its toll on fun. Stay tuned, but don’t hold your breath.
Over lunch, I added the rest of the address lines. I was then able to read the entire cart. I was also able to send commands to it. I got some good data back, but I was unable to write to the cart. Hmm.
I tracked down the problem. Stupid me. The last thing I did with the AT29C040A was to hack in some quick test. I forgot to take it out, and it didn’t work well with the NGPC cart (as it shouldn’t). After that, I was able to write the last byte of the cart and read back what I wrote. How nifty!
So, what’s next for this thing? I’m not really sure. I will need a GUI. I think I have a developer for that task.
Well, here it is. After I had a brilliant idea followed by an epiphany about how to breadboard the cartridge slot, I started wiring it up. I had to install a voltage regulator to drop the USB 5V down to 3.3V that the NGPC cart could handle.
I didn’t wire up all the lines yet, but I was able to verify that reading works. I hoped this picture would show the result, but it’s a bit blurry. In the command-prompt window, you can see the first 8 bytes of the cart. In the other background window, you can see a ROM dump of the game (from elsewhere). The first 8 bytes match, which is a very good indication that it’s reading properly.
Next is to connect up all the address lines (which just takes time). Then I can test writing to a cart. Unfortunately, there’s not much to write to an official cart. I should be able to read/write the save-game areas of official carts until we have a writeable cart. Gerry is working on that, though.
Once I have a usable NGPC reader/writer, I will have to start learning VHDL. Then I can code up some routines for a MAX3000 so that the NGPC will think it’s an official SNK cartridge. Oh, what fun.
I suppose I can also fab some PCBs for this USB Pocket Linker. I’ve never done that before, but much of this is new to me. How hard can it be?
I had planned to be playing Pokemon TCG with my homies tonight. That fell through, so I got the evening to play with my new toys. I probably should have been doing some real work, but I got caught up trying to write this flash chip, instead.
I just got it working. I can read data from the AT29C040A, but that’s easy. It took me a while to actually send commands to the chip and get it to respond. Once I got it to read the Manufacturer ID and Device ID from the flash chip, I was pretty sure I could actually flash data to the thing. Sure enough, it all works now.
I guess the next step is reading/writing an actual NGP/NGPC cart. That will take some new work, though. First, I have to deal with the cart edge connector. I have some ideas for that. Then, I have to convert this thing to 3V, as the chips I worked with so far were 5V. Then, I have to wire it all up (which won’t be as trivial as a single DIP chip.
NGPC Linker Prototype Testing Hardwired Data Input
NGPC Linker Prototype Testing Hardwired Data Input (Closeup)
I received a couple packages today. I don’t really have time to explain, so I’ll just post some pictures. At any rate, I’ve proven that the design works for reading from an EPROM chip. Next, I will read/write a 5V Flash chip. After that, I can move on to read/write the Neo Geo Pocket Cartridge.
The main point is that it works. I have a crude application running on my PC. It can read bytes from the EPROM chip, and I’ve verified that they’re right so far. That’s all that counts for now.