Author Topic: dump decrypted roms from memory using -debug in mame?  (Read 7323 times)

Offline bytestorm

  • Newbies
  • *
  • Posts: 12
  • Karma: +1/-0
dump decrypted roms from memory using -debug in mame?
« on: September 27, 2015, 06:29:53 AM »
Hey!
I was playing around with the debug mode in mame to see how to dump the ROMs from memory when the game is running. Works just fine for some games but when I tried to dump the decrypted C roms in a neo geo game they don't match the decrypted sets availible? Same with pgm roms.. when dumping decrypted roms with mame debug, do I need to byteswap them after or something?

I wanted to make a fully decrypted samurai shodown 5 special set. The mvs version that's not censored. With extracted S and M roms also.

Thanks!
« Last Edit: September 27, 2015, 06:35:15 AM by bytestorm »

Offline iq_132

  • Administrator
  • *****
  • Posts: 3728
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Re: dump decrypted roms from memory using -debug in mame?
« Reply #1 on: September 27, 2015, 06:41:35 AM »
There's a three step process of decoding the neogeo sprite roms. First you take a byte from c1 then one from c2 then c1 and so on. Next is the decryption step. Lastly the data underneath is scrambled too. You want the data after step 2. You will then have to reverse step 1.


Offline bytestorm

  • Newbies
  • *
  • Posts: 12
  • Karma: +1/-0
Re: dump decrypted roms from memory using -debug in mame?
« Reply #2 on: September 27, 2015, 08:40:42 AM »
Oh, that's more than I knew. I thought that mame had all data decrypted in memory when running so I could just dump the certain memory areas to get decrypted roms ;)

Is it the same for pgm? Are all roms in a pgm game encrypted or only the program rom?

Best regards
« Last Edit: September 27, 2015, 08:42:32 AM by bytestorm »

Offline iq_132

  • Administrator
  • *****
  • Posts: 3728
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Re: dump decrypted roms from memory using -debug in mame?
« Reply #3 on: September 27, 2015, 12:56:04 PM »
Oh, that's more than I knew. I thought that mame had all data decrypted in memory when running so I could just dump the certain memory areas to get decrypted roms ;)

Is it the same for pgm? Are all roms in a pgm game encrypted or only the program rom?

Best regards

On pgm,  only one of the program sections is encrypted-meaning that there are 4. There's the 68k bios on the pcb, the 68k rom on the cart, the arm7 internal rom built into the arm7 cpu on some carts, and the external arm7 rom, again, on some carts. If the game doesn't have an external arm7 rom, the 68k rom is the only thing encrypted. If the game does have the external arm7 rom, it is the only thing encrypted. The internal arm7 rom on some protection devices is impossible to dump the first 0x188 (iirc) bytes