Conversions on Irem M85

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Nodoyuna wrote:

      That's great news :)
      Not so great news is I can't test it at the moment (got two M72 boardsets home with faulty custom chips).
      Selling files for conversions/desuicide on Sega System C2/Sega System 24/Sega System 32, Capcom CPS1, Irem M92/M107 and more (just ask)
      Money is reinvested in boards, parts and tools in order to release more stuff.
      Contact me through my blog: arcadefixer.blogspot.co.nz/
    • PascalP wrote:

      So any M72 board except R Type is a good donor, correct?
      Correct. :)
      Selling files for conversions/desuicide on Sega System C2/Sega System 24/Sega System 32, Capcom CPS1, Irem M92/M107 and more (just ask)
      Money is reinvested in boards, parts and tools in order to release more stuff.
      Contact me through my blog: arcadefixer.blogspot.co.nz/
    • Apocalypse wrote:

      I'm progressing, it's definitely linked to the NMI handling :

      www.z80.info wrote:

      NMI
      It takes 11 clock cycles to get to #0066:
      1. M1 cycle: 5 T states to do an opcode read and decrement SP
      2. M2 cycle: 3 T states write high byte of PC to the stack and decrement SP
      3. M3 cycle: 3 T states write the low byte of PC and jump to #0066.

      However even in MAME RT2 sound code on P4P never jumps to 0x0066:


      This causes several registers and values in RAM to be incorrect.
      Thats a bit of a red herring. On RT2 the Z80 handles feeding the sample data to the dac which is what the above NMI does.
      On the M85 this isn't needed as external hardware handles playing the samples, thats why its fed with both start and end of sample address.
      However there also seems to be several copies of the samples ports ($10-13, $20-$23, $30-33). There is also what appears to be a start/stop port in $16 ($06, $26, $36).
      And there are 2 more ports used ($14 & $15) which so far I cannot work out.
      The other thing is that RT2 write to port $87 which translates to $43 on M85, without this no sound is ever heard, with this the synth sounds work fine.
      At the moment it doesn't matter whatever I try, the samples will not play other than a blip, in Mame they are fine, but Mame's implementation is very limited, it only looks at the sample address.
      I have also written a full controls routine which decodes both joysticks & button sets to look like the standard irem port input.
      So at the moment the game plays fine and makes sound effects but is missing the 12 sample sounds.
    • GadgetFreak wrote:

      Thats a bit of a red herring. On RT2 the Z80 handles feeding the sample data to the dac which is what the above NMI does.On the M85 this isn't needed as external hardware handles playing the samples, thats why its fed with both start and end of sample address.
      However there also seems to be several copies of the samples ports ($10-13, $20-$23, $30-33). There is also what appears to be a start/stop port in $16 ($06, $26, $36).
      And there are 2 more ports used ($14 & $15) which so far I cannot work out.
      The other thing is that RT2 write to port $87 which translates to $43 on M85, without this no sound is ever heard, with this the synth sounds work fine.
      At the moment it doesn't matter whatever I try, the samples will not play other than a blip, in Mame they are fine, but Mame's implementation is very limited, it only looks at the sample address.
      I have also written a full controls routine which decodes both joysticks & button sets to look like the standard irem port input.
      So at the moment the game plays fine and makes sound effects but is missing the 12 sample sounds.
      Very interesting. I've also dug deeper in M72/M81/M84/M85 sound handling.
      And I might have found a simpler approach, I've discovered many games share the same Z80 code, only sound data are different.
      By extracting those data and re-injecting them in a different version of the sound driver I got sound working between different hardware (M72 sounds on M84).
      Only problem is sound code revision is tied to main CPU code regarding ports.
      Selling files for conversions/desuicide on Sega System C2/Sega System 24/Sega System 32, Capcom CPS1, Irem M92/M107 and more (just ask)
      Money is reinvested in boards, parts and tools in order to release more stuff.
      Contact me through my blog: arcadefixer.blogspot.co.nz/

      The post was edited 1 time, last by Apocalypse ().

    • I did think about transferring sound data but there are several data areas embedded between sound code which will be fine as long as the source areas are smaller otherwise it will be a real pain.
      I did try the P4P sound rom but it doesn't make any noise at all so I am presuming they have changed the control parameters between sound code versions and even though the P4P sound rom shares the same version number as other sound roms its sample handling is very different.
      I did think the $14/$15 ports may be related to sample rate or control but having played with several values I am still no where. It would also appear that the M85 has several dac channels, probably 3 or 4 and of course the chip number is removed so no chance to look up registers.
      Since adding a 'out ($16),0' and 'out ($16),2' around the start/end sample outs I do get blips of sampled sounds, but thats all.
      Think I should go back to my other more pressing projects again, and come back again in a while as this may give me a new angle and help me spot things I am missing.

      The joystick/buttons work well though with no hardware mods. I just take a base count reading at power up then use this to see which way the joystick is being pushed. The only downside is that you must not move the joystick for the first fraction of a second at power up. But you can still activate the original cheat mode as this isn't detected until after the ram test.
    • GadgetFreak wrote:


      I did try the P4P sound rom but it doesn't make any noise at all so I am presuming they have changed the control parameters between sound code versions and even though the P4P sound rom shares the same version number as other sound roms its sample handling is very different.
      Have you also modified the main CPU code? If not it's not going to work.
      Selling files for conversions/desuicide on Sega System C2/Sega System 24/Sega System 32, Capcom CPS1, Irem M92/M107 and more (just ask)
      Money is reinvested in boards, parts and tools in order to release more stuff.
      Contact me through my blog: arcadefixer.blogspot.co.nz/
    • Apocalypse wrote:

      GadgetFreak wrote:

      I did try the P4P sound rom but it doesn't make any noise at all so I am presuming they have changed the control parameters between sound code versions and even though the P4P sound rom shares the same version number as other sound roms its sample handling is very different.
      Have you also modified the main CPU code? If not it's not going to work.
      No, that was my point. It was only a quick test and to be honest I don't see the point in going through all that effort.
    • Well, I am thinking I may have to spend the time!
      Just did a little more digging into the sound rom. Here are my findings.....
      Vector table at $40-$49
      $40/$41 points to 16 vectors which each point to a 19 byte area, first 3 bytes appear to be parameters, then 8 vector pairs
      $42/$43 points to 100 vectors.
      $44/$45 points to 128 vectors.
      $46/$47 points to sample offsets (RT2's are divided by 2).

      $47/$48 points to sample offsets (RT2's are divided by 2).

      So all the vectors will need to be remapped as the P4P data area is at $0C0C whereas RT2 is at $0B11
      So I will write a program to handle this remapping then look at changing RT2 to use updated sound commands.

      The post was edited 1 time, last by GadgetFreak ().

    • GadgetFreak wrote:

      Well, I am thinking I may have to spend the time!
      Just did a little more digging into the sound rom. Here are my findings.....
      Vector table at $40-$49
      $40/$41 points to 16 vectors which each point to a 19 byte area, first 3 bytes appear to be parameters, then 8 vector pairs
      $42/$43 points to 100 vectors.
      $44/$45 points to 128 vectors.
      $46/$47 points to sample offsets (RT2's are divided by 2).

      $47/$48 points to sample offsets (RT2's are divided by 2).

      So all the vectors will need to be remapped as the P4P data area is at $0C0C whereas RT2 is at $0B11
      So I will write a program to handle this remapping then look at changing RT2 to use updated sound commands.
      Great work man! :thumbsup:
      Selling files for conversions/desuicide on Sega System C2/Sega System 24/Sega System 32, Capcom CPS1, Irem M92/M107 and more (just ask)
      Money is reinvested in boards, parts and tools in order to release more stuff.
      Contact me through my blog: arcadefixer.blogspot.co.nz/
    • Apocalypse wrote:

      Great work man! :thumbsup:
      Thanks, but it's like hitting my head against a brick wall!
      I have remapped the RT2 data into the P4P sound code. Then found the sample sound commands seemed to have a different control setup so modified the patcher to change them but still no joy. I get clicking of the speaker when samples are meant to be played or microsecond snippets. This extra control has a couple of parameters in it that control what gets written to the +4 and +5 offset but I have no idea what they are or how they relate to the samples. It also seems to control the $10-15 / $20-25 / $30-35 register usage which I believe means it has 3 dac channels. Trouble is I cannot find any documentation for the dac chip. Am not sure I fully understand how the circuit is wired as the board still has the standard ym2151 8 pin dac chip as well as the larger square flat pack which I am presuming is a dac for the samples. It could be that the YM2151 has to be set correctly to allow the samples to sound at the same time.
      I thought most of these problems would be solved by using the P4P sound code but it seems not.
      I am out of ideas at the moment!
    • Did a bit more digging, all the YM commands seem to match but still no samples so presume there is still something I am missing with setting up the custom sample chip. Will get back to it again at some point.

      Meanwhile, I decided R-Type would be a good use of the board as it doesn't use samples. So I now have it working and looking good, just need to do some more testing to confirm it's all done.
      I will be adding it to V4 of my Rom Patcher.
    • GadgetFreak wrote:

      Meanwhile, I decided R-Type would be a good use of the board as it doesn't use samples. So I now have it working and looking good, just need to do some more testing to confirm it's all done.

      I will be adding it to V4 of my Rom Patcher.
      Great minds think alike ;)
      In fact the cause of the missing sound on my P4P board was the custom sample chip dragging data lines down so I pulled it and did the R-Type conversion.
      But it's a bit cheating, I think R-Type is the only game on M72/M81/M82/M84/M85 not using sound samples. I've ordered a second P4P PCB with the hope of figuring out sound sampling mecanism.
      Selling files for conversions/desuicide on Sega System C2/Sega System 24/Sega System 32, Capcom CPS1, Irem M92/M107 and more (just ask)
      Money is reinvested in boards, parts and tools in order to release more stuff.
      Contact me through my blog: arcadefixer.blogspot.co.nz/
    • New

      Apocalypse wrote:

      Great minds think alike ;) In fact the cause of the missing sound on my P4P board was the custom sample chip dragging data lines down so I pulled it and did the R-Type conversion.
      But it's a bit cheating, I think R-Type is the only game on M72/M81/M82/M84/M85 not using sound samples. I've ordered a second P4P PCB with the hope of figuring out sound sampling mecanism.
      Not cheating really ;) It's a good use for an M85! I have just released V4 of my patcher which includes this conversion.

      I will go back and look again at the sample issue at some point, hopefully with some new ideas. I have already replicated the $06,$16,$26,$36 reset followed by the 0 to $16, sample start end to $10-$13, then 2 to $16. I had also added writes to $14 & $15 but an unsure of the values. Of course I also remapped the RType II sound data to the P4P sound rom core code and still only got music/effects and just the odd speaker click for the samples.
      Hopefully you will have a different view and spot the issue.
    • New

      GadgetFreak wrote:

      Hopefully you will have a different view and spot the issue.
      I hope so, I guess you've already reused my information for the controls so my different approach on this matter (software hack vs hardware hack) was a good thing at the end.
      Selling files for conversions/desuicide on Sega System C2/Sega System 24/Sega System 32, Capcom CPS1, Irem M92/M107 and more (just ask)
      Money is reinvested in boards, parts and tools in order to release more stuff.
      Contact me through my blog: arcadefixer.blogspot.co.nz/