copynes plugins and mappers

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
copynes plugins and mappers
by on (#75458)
I am interested in (attempting to) write some new plugins for dumping some wonky carts with copynes and I could use some helping getting started on the right track.

Just wondering if I can get some advice on what material I should read/learn first (besides general assembly or 6502 assembly) and what tools are available to help reverse engineer mappers et all and maybe what process people would normally use to do so.

I am also wondering about the dangers of the uninitiated developing plugins. Is there potential for fubaring the copynes, cart, or both if I make a wrong step?

Thanks for any advice!

by on (#75467)
The BankWatch software included with CopyNES is made for this (I'm not sure if it exists outside the QBASIC version).

Different ways of doing it are to look at the hardware on the cart (not possible with gloptops), disassembling the code to see what it does, and using BankWatch to write the registers manually and see the results instantly.

I don't think there's any danger of hurting the CopyNES or the cart, AFAIK. I know bus conflicts don't seem to damage anything, I've caused them all the time with my devcarts (and Retrousb released a cart with bus conflicts, with no casualty reports it seems). I can't really guarantee anything is 100% safe.

by on (#75498)
Thanks..

I feel like I'm missing some prerequisite knowledge but I'm not sure where to go for it.. Most of my carts aren't globs, but I'm not sure what I would be looking for on the board itself. I guess I should start by studying up more on how the more known mappers work and how that relates to the actual traces on the respective carts.(?) I think the QBasic version only works on the parallel copynes right? Maybe I need to port that BankWatch over as step one, I don't have a working parallel one.

Not looking for guarantees, just a general idea or if there are specific things I need to make sure to watch out for. I would like to at least have time to learn something before I break the thing :)

by on (#75499)
I'm curious what mappers exist that don't already have a CopyNES plugin. Unless the plugin releases stopped (I never checked).

If it's a known mapper, you only have to look up how it works. If it's an unknown mapper, I guess you would also have to implement it in an emulator to know if it was dumped right.

Seems like what you'd need to know would vary depending on the cart to dump. Lots of them would be easy because of the available info, but some them will be harder to emulate than to dump (look at mapper #90 for example).

by on (#75503)
There just wierd pirate carts..

They never stopped releasing plugins, but the keep making new pirate carts with wonky mappers
Heres my list of undumped carts if you are curious:

I've got a Somari cart that seems to be different, it won't dump with the current somari plugin,
boogerman 2
superbros 8
those waixing games... the ones I have are commandos, Zelda and another one that I'm not sure the name
Takeshi's castle 1 and 2 (power pad games)
Street Fighter III Turbo
Sonic 6
Super Mario & Sonic 2
Street Fighter 3
Zelda (Waixing)
Samurai Spirits
plus quite a few of Sachen games that I'm not sure about.. I may need to just build an adapter with a stronger resistor for those, but there might still be some there too.

You know.. Random pirate junk :)

Edit: Also, I need to find out why I can't write savefiles to Romance of the Three Kingdoms when others work.

by on (#75505)
Bankwatch and Microbug are fully functional in the windows ports, both Q's par port version and retrousbs copynesw versions. IIRC, your on Linux so that isn't much help. Both would probably be a bit of work to port to you version... especially Microbug.

Bankwatch is a quick and easy way to probe carts and see how they respond to various accesses. If you have no clue how a cart works though, microbug is awesome as you can just step thru the init code to see whats up.

Regarding your save wram issue with Romance, I would be willing to bet the plugin is writing to the wrong WRAM bank. SOROM is kinda an oddball with 16KB of WRAM and only 8K is battery backed.

by on (#75507)
Well I can certainly get access to a windows box easier than a parallel copynes. I didn't realize microbug could walk through the code live on the cart, that would definitely be helpful.