9 Aug 2017

Conversions on Irem M92 hardware - part 2 (Major Title 2 to R-Type Leo)

After the Major Title 2 to Mystic Riders conversion I wanted to have a look at R-Type Leo.
I used the same principles and found the conversion made by an other hacker named vxc wasn't perfect.
In fact in the sound ROMs there's an encrypted 0x3b instruction corresponding to 0x00 once decrypted (add mem, reg):

00F0F: neg     al  (E2 D8)
00F11: add     [bp+0Ch],al (3B 46 0C)
00F14: ret        (AA)

Exactly the same issue I faced with Mystic Riders as there isn't any equivalent opcode in the Major Title 2 table.
This rose the question "How did vxc managed to get a working sound program?". So I had a look and found he simply left the opcode as is, that is to say 0x3b. Luckily for him this doesn't correspond to any other valid instruction and the sound CPU considers it as a NOP:

00F0F: neg     al  (C4 D8)
00F11: nop               (3B)
00F12: nop               (46)
00F13: pop     ix          (0C)
00F14: ret        (9D)

In game this causes the fade out effect of the music before each boss to be missing and music just stops brutally before the boss' music starts.

On my side, I reused the soubroutine I created for Mystic Riders and my R-Type Leo conversion works fine in MAME [EDIT]and on real hardware as I now own a MT2 board (fade out is present):

00F0F: neg     al  (C4 D8)
00F11: call    9000h  (86 EC 80)
00F14: ret        (9D)


09000: add     al,[bp+0Ch] (27 46 0C)
09003: mov     [bp+0Ch],al (5D 46 0C)
09006: ret   (9D)

Out of curiosity I compared my files with vxc's ones and found a lot of other differences!
For instance vxc missed the vector branch @ 0x00400 but again this doesn't seem to cause any trouble.






[EDIT 29/08/2017]
Tested and reported fully working on real hardware by the member of a French forum. Many thanks to him for his feedback.



Also available:
- Gunforce
- Blade Masters
- Lethal Thunder
- Undercover Cops
- Undercover Cops Alpha Renewal
- Mystic Riders/Gun Hohki
- Major Title 2/The Irem Skins Game
- Hook
- R-Type Leo
- In The Hunt
- Ninja Baseball Batman/Yakyuu Kakutou League-Man
- Perfects Soldiers/Sky Soldiers
- Dream Soccer 94
- Gunforce 2/Geostorm

2 comments:

  1. Thanks again for the patched ROM's and some assistance. Unfortunately, I still can't get this up and running on a Gunforce board. There were quite a few mask ROM's solder into the board - Could you verify what the equivalent EPROM would be?

    ReplyDelete
    Replies
    1. Hey,
      Unfortunately Gunforce isn't a good donor as it lacks some jumpers to set the main CPU code offset to 0x80000. But this can be done with some wire hackery.

      Delete