satiator / satiator-arpatch

Patch for Action Replay firmware to work better with the Satiator.
13 stars 0 forks source link

Due to the design of the PLD logic in 3rd-party ActionReplay carts, ARP202C ROM may not work properly on all cartridges. #1

Open SONIC3D opened 4 years ago

SONIC3D commented 4 years ago

Due to the design of the PLD logic in 3rd-party ActionReplay carts, ARP202C ROM may not work properly on all cartridge.

There are different types of ActionReplay like cartridge on market, the most common models are:

Based on my previous dump attempts. The ARP202C.bin ROM is not suitable for some of these carts. On these models, It will halt on the Sega license logo screen after boot. The main cause seems like the PLD logic design is slightly different, some I/O address on ProActionReplay Japan and some recent all-in-one cart are used to do bank switch protection for ProActionReplay(J) ROM(These ROMs are not directly usable on emulator, thus.).

A simple solution for these carts is to using the GameShark ROM(maybe 1.94 is the most recent version IIRC) or use ProActionReplay ROM. But the latter one have special BackupRAM emulation routine code. Which will cause backup memory space overlap if you are using the "Recent 4in1(all-in-one) multi-feature cart" and set the on-cart physical switch to the BackupRAM feature. (The emulated 1Mbit RLE-compressed backup memory would be in priority over the physical 4Mbit backup memory and thus any save action beyond the address of 1Mbit address would overwrite the data on physical BRAM). So I prefer using the GameShark ROM on these carts.

And to make the cheat DB in GameShark ROM updated as ARP 2.02C. Simply cut the data 0x10000-0x1FFFF to the same place of GameShark ROM.

So hope you can patch and release another ROM based on GameShark. And if possible, explain in detail that how to patch the action replay like program ROM code(explain which is the key point that makes satiator not bootable, so that other developers can help make patches for other similar programs themselves).

Thanks for your marvelous work.

P.S. Would you add build instruction for this project? Like which SDK/toolchain shall I use, or anything needs to be aware of during the building.

abrasive commented 4 years ago

Hi @SONIC3D - thanks for the amazing slab of information! I had suspected there would be incompatible hardware, it's good to see this confirmed.

I would like to support as many carts as possible, and I know it is hard for end users to identify which hardware they have, so it would be good to have a universal firmware. Do I understand correctly that the GameShark ROM will work on all carts, or just on a majority of them?

I don't suppose someone has documented the different carts' behaviour somewhere?

abrasive commented 4 years ago

I added build instructions and a description of how the patch works :)

SONIC3D commented 4 years ago

... Do I understand correctly that the GameShark ROM will work on all carts, or just on a majority of them?

Based on my test, the short answer is YES. I have not find any ActionReplay like cart(or technically a Program ROM extension cartridge) not supporting GameShark ROM.

But GameShark ROM lacks the feature of "Direct Save" compare to the Japanese release of "Pro Action Replay" as I said. Though personally, I don't like this feature(as misunderstanding of its implementation may lead to the wrong usage and damage the save data), it may still be valuable to people who want to use the Cartridge save feature in-game while the game requires RAM extension feature(No such special case in Official Sega released game library, but for the hacked games like DraculaX 4M RAM extended version hacked by yzb and translated game like Shining Force 3 Chinese version, which uses 4M RAM for storing Chinese character font, the RAM cartridge and BRAM cartridge can be supported at the same time).

I don't suppose someone has documented the different carts' behaviour somewhere?

Actually, I once have documented one for discussion with the author of Saturn Save Manager. For I once hope we can find a way of patching/hacking X-Terminator ROM to make its cheating feature usable in-game(There's a physical switch on the side of X-Terminator cartridge so that people can disable cheating on the specific game scene to avoid known side effect caused by cheating code. But this I/O address seems always return the "off" value on other cartridges so the cheating feature is always disabled).

Anyway, check the excel file in the attachment. And if you have further questions, feel free to ask.

Saturn Cheat Cart Compare Chart.xlsx Notes:

  1. In the excel chart, the word "PAR" means ProActionReplay2(Japanese release)(For images, check http://www.famicom-plaza.com/new/sspar/index.html or https://ayasuke.exblog.jp/10336650/). The word "ARP" means "ActionReplayPlus"(EMS HongKong hacked ActionReplay). The word "X-T" means "X-Terminator"(Datel developed advanced ActionReplay cart, with expansion unit that can do memory compare and cheat code creation on Saturn).
  2. In the excel chart, the "All-in-One Saturn Cart" I mentioned seems contain a cloned PAL/GAL chip as ProActionReplay2. I've no idea on how the maker cloned PAL/GAL chip and I'm not professional in hardware, either. But the behavior looks like completely same. As it can flash ProActionReplay2 ROM which have some protection in PAL/GAL I/O I think, and the original ProActionReplay2 cart will also halt on Sega license logo if it's flashed with ARP202C ROM, like this all-in-one cart. So I skipped adding additional data row for PAR(J), as it's just like a RAM/BRAM stripped version compare to all-in-one cart.
SONIC3D commented 4 years ago

And the author of Saturn Save Manager also has released a image contains different ActionReplay ROMs. I'm not sure if you know that. If you don't, have a look at "https://ppcenter.webou.net/pskai/", and download the image "pskai_release_20191221.7z (37MB)" in the Download section. Extract it, and there is a "pskai_sdm_flasher.iso" in the archive. You can find a lot of ActionReplay like ROM in it.

SONIC3D commented 3 years ago

Update: I have investigated the PLD logic recently and almost confirmed the cause of the start-up halt of ARP202C.bin on some cart is caused by the different memory map. Still finding a proper way to patch in in software code of ARP202C.