Page 1 of 1

ROM cheats for megadrive in MESS

Posted: Fri Sep 05, 2014 11:45 am
by etabeta78
More than one year ago, rimsky82 reported the impossibility to create ROM cheats in MESS for megadrive since the system is now using slot devices for carts (see also MT bug 05488)

I think I have fixed (in svn revision 31900) the problem, and thus now ROM cheats should be possible again: cart data is now accessible "live" in the region "cartslot:cart:rom" (notice the :cart part, because there is also a "cartslot:rom" when you load from softlist, but that is ignored after loading procedure is over)

Since I would like to port the same changes to NES, SMS, GB, SNES, etc. (so to make possible again ROM cheats in all these), I would appreciate if someone around here could test whether the behavior is now the one you guys expect (rimsky82 seems to be on partial hiatus, and I have no account at gamehacking boards...
I was able to change the number of starting lives for Sonic 2 in MESS by editing the ROM from the debugger, so I guess the new code works at least partially, but I'm not really a cheat expert and your feedbacks could help me a lot :)

Re: ROM cheats for megadrive in MESS

Posted: Fri Sep 05, 2014 7:42 pm
by Pugsy
What's the command to poke the memory in the debugger? It's possible to edit "mdslot:cart:rom" directly in the memory window but that's of little use for cheats unfortunately.

As an example in dinotale for Invincibility we used to type in the debugger main commandline:-

maincpu.mw@004646=6054

The question is what do we replace "maincpu.mw" with so that it pokes mdslot:cart:rom?

mdslot:cart:rom.mw@004646=6054
mdslot:cart:rom.w@004646=6054
mdslot:cart:rom.pw@004646=6054

Are all invalid and
mdslot.mw@004646=6054
kills MESS dead

Re: ROM cheats for megadrive in MESS

Posted: Sat Sep 06, 2014 6:34 am
by etabeta78
how was it working before the carts were slotified?
rimsky82 reported that the issue was ROMs not being editable in the memory windows, because they were not available anymore, so I guessed that fixing that it was enough... I now see that it's not, and I fear the thing becomes a lot more problematic.
I will see what can be done with Micko

thanks for the feedback

Re: ROM cheats for megadrive in MESS

Posted: Sat Sep 06, 2014 10:31 am
by Pugsy
I don't know why he asked about that - ROM has never been editable in the memory window like RAM has, the only way to change it was either by typing "maincpu.mw@004646=6054" directly in the debugger commandline or via the commandline wrapped in cheat XML:-

Code: Select all

  <cheat desc="Invincibility"> <comment>You still die if you fall too far though!</comment>
    <script state="on">
      <action>temp0 =maincpu.mw@004646</action>
    </script>
    <script state="run">
      <action>maincpu.mw@004646=6054</action>
    </script>
    <script state="off">
      <action>maincpu.mw@004646=temp0 </action>
    </script>
  </cheat>
Everything else about finding ROM cheats remains fine, it's just that we can see the code from the cart in the maincpu but it just cant be changed.

Re: ROM cheats for megadrive in MESS

Posted: Sat Sep 06, 2014 3:59 pm
by etabeta78
well, in MAME you can edit rom regions from the memory window (I have just tried mt_soni2 ;) ) and then the CPU see the new value when that area is accessed.
whether that is useful or not, it's another matter ;)

anyway, Micko has said he will take a look when he can, and I will see if I can help as well...