What's new

SCASware

Beginner
Joined
Oct 26, 2024
Messages
1
Reaction score
1
Location
US
I've spent a while reading the source code for MAME's CPS3 emulation, and with a SuperH toolchain I was able to run a small barebones program from SIMM 1. Now, this demo works fine under MAME's cps3boot romset coupled with the SuperBIOS, but I'm now looking to get my code to run under the jojo romset.

I found out that the OEM BIOS uses the same method as the SuperBIOS to check SIMM integrity, so that base is covered (They check for the presence of a CD volume label string, FYI). The real issue is the encryption, since MAME's decryption algorithm, when followed exactly, causes lots of bytes of my SIMM files to be off from the unencrypted version, in such an amount that the volume label check fails, and MAME's decryption code operates at a dword (32-bits at a time) level, rather than per-byte, which is (kind of) a detriment since I'm used to thinking of 32-bit numbers as a collection of 8-bit bytes, not as an indivisible unit. Plus, the decryption code is for DECRYPTION, so it probably does not illustrate the process of ENcrypting the program, which I need to figure out to get it to run as expected.

Is the formula to encrypt CPS3 binaries known, or could someone illustrate it to me? I've heard that only instructions (SH2 opcodes?) are encrypted, but MAME's decryption function doesn't seem to reflect that. Or maybe MAME's decryption code has changed, because I'm doing testing on MAME 0.264. (If I happen to be wrong or I've posted this in the wrong forum, please inform me)

EDIT:

If anyone requires the unencrypted SIMM files for any reason, here they are. They've been tested on MAME 0.264 and the cps3boot set. Copy the files to your nvram/cps3boot folder (backing up the existing SIMM files if need be) and run. If problems appear, please get in touch.
 

Attachments

  • demo.png
    demo.png
    34.7 KB · Views: 46
Last edited:
Back
Top