TapeDump v1.0 - a tool to dump carts without extra hardware

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

User avatar
Kreese
Posts: 65
Joined: Sat Sep 22, 2007 3:42 pm

Post by Kreese » Sun Jul 17, 2011 7:37 am

If I want to make a TapeDump cart, what donor cart should I use?

Anyway, this technique seems awesome. Thanks a lot for sharing.

Thanks e5frog for sharing your experience with it. It will be useful when I try it.

User avatar
Dwedit
Posts: 4329
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Post by Dwedit » Sun Jul 17, 2011 8:41 am

How does it connect to CIRAM when there's no cartridge in there? I'd think you'd get no graphics at all without a cartridge in there, except maybe for open bus patterns for nametables and CHR data?
Of course, after the cartridge goes back in the slot, you can use the nametables and CHR memory again.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!

User avatar
qbradq
Posts: 951
Joined: Wed Oct 15, 2008 11:50 am

Post by qbradq » Sun Jul 17, 2011 8:47 am

That's one thing that's nice about the clone systems, CIRAM is always enabled :D

User avatar
e5frog
Posts: 13
Joined: Sat Jul 16, 2011 7:27 am
Location: Älvängen, Sweden
Contact:

Post by e5frog » Sun Jul 17, 2011 10:20 am

Dwedit wrote:I'd think you'd get no graphics at all without a cartridge in there
You'll get the background and the crap that was left there after ejecting the cartridge that loaded it, new graphics appear when you plug the other cart in. That's where you could tell it to check the CHR for an empty and a filled char to display rudimentary information maybe.

ccovell
Posts: 1014
Joined: Sun Mar 19, 2006 9:44 pm
Location: Japan
Contact:

Post by ccovell » Sun Jul 17, 2011 3:34 pm

Kreese wrote:If I want to make a TapeDump cart, what donor cart should I use?
As the program stands right now, any NES/FC cart will do. The TapeDump.nes file is NROM with only 16K of ROM and no CHR at all so it's extremely minimal.

User avatar
e5frog
Posts: 13
Joined: Sat Jul 16, 2011 7:27 am
Location: Älvängen, Sweden
Contact:

Post by e5frog » Sun Jul 17, 2011 4:11 pm

There's also a lot of empty space in the cart rom, so there's room for more code in the same space.

BTW how do you get nesasm to use $00 as a filler instead of $FF when you compile? I only found nesasm3 and I got the normal $FF when I used that. Just wanted to set the default speed to 1200 so I didn't have to change it after I started. I noticed after I changed it that it's an easy hex-edit in the .nes file, I believe it was byte $401 that was changed from $08 to $02 instead.

User avatar
Memblers
Site Admin
Posts: 3857
Joined: Mon Sep 20, 2004 6:04 am
Location: Indianapolis
Contact:

Post by Memblers » Sun Jul 17, 2011 5:45 pm

That's a pretty cool idea.

This reminds me too, if anyone wants to read and write tape audio, sepi made a simple expansion port circuit that works with Excitebike and Wrecking Crew (hardware required of course): http://nesdev.com/tapedrv.PNG

With this, now anyone can make their cartridge able to dump itself. No excuse for anyone to lose the game to bitrot. Like how old PC games told you to make a backup disk before playing. But this time, you could do it to tape. :)

User avatar
kevtris
Posts: 504
Joined: Sat Oct 29, 2005 2:09 am
Location: Indianapolis
Contact:

Post by kevtris » Mon Jul 18, 2011 9:45 am

e5frog wrote:It says in the texts that it's built for the "Konami VRC2" mapper so I guess it supports that and similar ones (if any). Currently you have to add other mappers yourself, let's hope ccovell wants to add a nice front end and some mappers in a future version.

Why not just include all of the copynes plugins? the plugins are designed to be fairly software-agnostic and load into RAM to run (though I guess they could be put in ROM too). All access is done through a simplistic "input byte" and "output byte" routine, along with a few other minor routines (CRC mainly for ROM size detection). The code could probably be fairly easily hacked to just dump without any frills. You could have it make a CRC for integrity checking too. The copynes software pack should have the source code for the plugins and the bios with the routines needed.

I like the idea of using a hacked game genie for the process. Could call it "Ghettodump", hehe. It'd be pretty decent though, since you can actually try the game out first (it IS a game genie, after all) to make sure all the connections are good, and use the GG CHR logic to put some basic text/messages up before and after dumping with a colour cycling blank screen during dumping (blank screen, and dork with the background colour) like many C64 disk copiers used to do.

Check out how the atari 2600 "supercharger" works, too. It can send 6K of data in around 15ish seconds quite reliably using a simple format. It sends a short high/low or a long high/low depending on if the data bit is 0 or 1. This is much more efficient (and you can adjust timing to speed up or slow down the process) and using 4011 would be quite easy to do. Just output 0 or 7f for low/high. The 'charger uses a preamble of 010101010101 to start with, then the data just follows that. The preamble's around 2-3 seconds long to let the audio chain (back then a tape player) to reach a steady state before the data came out. Cycle timed 6502 code then decoded that data in real time, as it was fed in. It could adjust to nearly any data rate, too. There was no need to have a fixed baud rate or anything, the decoder software figured out the baud rate by monitoring that preamble and checking for "11" which indicated the start of the data from what I recall. i.e. "0101010101011data"
/* this is a comment */

tepples
Posts: 22017
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples » Mon Jul 18, 2011 10:03 am

Could the reliability be increased with some sort of forward error correction?

User avatar
e5frog
Posts: 13
Joined: Sat Jul 16, 2011 7:27 am
Location: Älvängen, Sweden
Contact:

Post by e5frog » Mon Jul 18, 2011 10:41 am

Yes, you could do a whole lot of things, or just buy a CopyNES for $70...

I got this demonstration as a poor mans dumper, it's easy and requires no extra hardware. Only thing missing is some more programming with support for more mappers. If that was chosen in some menu before uploaded to internal ram then it wouldn't require much space.

I guess it's free for anyone to continue the programming, the code is included in the package.

User avatar
MottZilla
Posts: 2832
Joined: Wed Dec 06, 2006 8:18 pm

Post by MottZilla » Tue Jul 19, 2011 10:29 am

e5frog wrote:Yes, you could do a whole lot of things, or just buy a CopyNES for $70...

I got this demonstration as a poor mans dumper, it's easy and requires no extra hardware. Only thing missing is some more programming with support for more mappers. If that was chosen in some menu before uploaded to internal ram then it wouldn't require much space.

I guess it's free for anyone to continue the programming, the code is included in the package.
And then you have to install the CopyNES. With this you could modify a Game Genie for anywhere from free to maybe $10 to get an EPROM/FlashROM to install in the GG.

Adding more mappers isn't that hard given that the source includes VRC4 support which is enough for someone to go on to add support for other mappers.

ccovell
Posts: 1014
Joined: Sun Mar 19, 2006 9:44 pm
Location: Japan
Contact:

Post by ccovell » Wed Jul 20, 2011 3:11 am

kevtris wrote:Why not just include all of the copynes plugins? the plugins are designed to be fairly software-agnostic and load into RAM to run
That sounds like a good idea. I'm giving the CopyNES plugins a look now. Since some of them use $300-$3FF for scratch RAM, and all of them are loaded into $400 and go up to about $680 maximum (right?) so there's not much space left for fancy graphics stuff, and definitely no space for CRC routines.

Everything looks straightforward; Kevin, any advice or gotchas I should look out for?

User avatar
kevtris
Posts: 504
Joined: Sat Oct 29, 2005 2:09 am
Location: Indianapolis
Contact:

Post by kevtris » Wed Jul 20, 2011 9:03 am

ccovell wrote:
kevtris wrote:Why not just include all of the copynes plugins? the plugins are designed to be fairly software-agnostic and load into RAM to run
That sounds like a good idea. I'm giving the CopyNES plugins a look now. Since some of them use $300-$3FF for scratch RAM, and all of them are loaded into $400 and go up to about $680 maximum (right?) so there's not much space left for fancy graphics stuff, and definitely no space for CRC routines.

Everything looks straightforward; Kevin, any advice or gotchas I should look out for?
Not really, it was all pretty cheap and nasty code that was done via cut and paste, hehe. The CRC routine could be replaced with some other simpler hashing function and it'd work the same, like a sumcheck. Also, yes, most of the plugin space tends to be empty. Only a few like MMC1 and MMC3 used most of it due to all the different configurations. These could be stripped down and/or separated to make them take up less space. Nothing at all had been optimized, and if I had it to do over again I'd probably have optimized things much better than it currently is.

Then again, when I wrote many of those plugins was over 10 years ago, and I have become a much better 6502 coder in the interim decade.
/* this is a comment */

User avatar
B00daW
Posts: 584
Joined: Thu Jan 03, 2008 1:48 pm

Post by B00daW » Wed Jul 20, 2011 9:42 am

Chris Covell:

Hope I'm not too late, but you may wish to grab your plugins from BootGod's website. They are the most up-to-date and some of Kev's previous plugins are fixed for better cart compatibility.

http://bootgod.dyndns.org:7777/plugins.php

Another note of interest... If you take a look at the TC-112.BIN plugin for NTDEC carts, I'm wondering if TapeDump would be a viable dumping method for it. I have a War in the Gulf cart that I could try dumping to see if it would be a good alternative to the CopyNES; since I also was not able to dump it with the CopyNES.

Kev,

I know we talked about the theory behind why the 74LS00 IC's made it difficult for the CopyNES to dump its CHR, but the conclusion escapes me, do you remember why?

Also how common are 74LS00's in NES carts, and could TapeDump -- if proven to be a viable alternative -- be an alternative solution for dumping such carts in the future?

Jagasian
Posts: 421
Joined: Wed Feb 09, 2005 9:31 am

Post by Jagasian » Wed Jul 20, 2011 4:30 pm

How long before RetroUSB sells a "CopyNES Lite"? It would be a device similar to the Game Genie, but with a TapeDump bootloader. That way your NES would not need to have its lockout chip disabled, you wouldn't have to mod a Game Genie, and you wouldn't have to hot swap cartridges.

If it was compatible with the NES clones that are common place these days, it would make dumping accessible to many more people.

Post Reply