Here I want to decode some encrypted roms that I can't find online so I can play them with an standard Z80.
Based on this info from the mame source code:
Dose this method work for all the games? if yes, what should the 2 proms contain for the I am sorry romset?
Or maybe someone knows where to get already decrypted romsets...
Thank you.
Based on this info from the mame source code:
Code:
Ninja Princess:
there is a (bootleg?) board which has a standard Z80 + 2 bipolar PROMs
instead of the custom CPU. The encryption table is different from the
original Ninja Princess; it is actually the same as Flicky.
The first PROM is 32x8 and contains the number (0..5) of the table to
use depending on M1, A0, A4, A8, A12:
00: 11 00 33 22 00 44 44 00 11 33 33 22 44 44 44 22
10: 11 55 55 33 44 22 55 22 11 33 55 33 44 44 11 22
The second PROM is 256x4 and contains the 6 different XOR tables:
A D B C C B D A
00: 09 09 0A 0A 0A 0A 09 09
08: 0E 08 0B 0D 0D 0B 08 0E
10: 0A 0C 0A 0C 0C 0A 0C 0A
18: 0B 0E 0E 0B 0B 0E 0E 0B
20: 0C 0C 0F 0F 0F 0F 0C 0C
28: 08 0D 0B 0E 0E 0B 0D 08
[the remaining bytes are all 0F]
bit 3 is not used.
bits 0-2 is the XOR code inverted (0 = 0xa8, 1 = 0xa0 ... 6 = 0x08 7 = 0x00)
Here is a diagram showing how it works:
data to XOR
decode value
A ---
D7 --------------- 0| |
D3 --------------- 1| |
D5 --------------- 2| P |D
A --- D | R |0 ---|>--- D3
M1 --- 0| P |0 --- 3| O |1 ---|>--- D5
A0 --- 1| R |1 --- 4| M |2 ---|>--- D7
A4 --- 2| O |2 --- 5| 2 |3 ---
A8 --- 3| M |3 --- 6| |
A12 --- 4| 1 |4 --- 7| |
--- ---
Or maybe someone knows where to get already decrypted romsets...
Thank you.




