Re: MAME cheat to "fix" Pac-Man ghosts?

This forum is for posting M.A.M.E. Work In Progress "Arcade"cheats that are not quite ready for the prime time. If the cheats are buggy or the cheat descriptions are non-standard then please post them here. Help maybe given but there are no guarantees and they will only be added to the cheat file when the cheat file maintainer is happy with them.
Post Reply
User avatar
Pugsy
Posts: 3638
Joined: Fri Aug 17, 2001 12:59 am
Location: North Wales, UK.
Has thanked: 1 time
Been thanked: 12 times
Contact:

Re: MAME cheat to "fix" Pac-Man ghosts?

Post by Pugsy »

Following a request on mw forums where cheats can't be posted raw.
Poster: krick
Subject: Re: MAME cheat to "fix" Pac-Man ghosts?

I was re-reading Don Hodges analysis of the Pinky & Inky tracking bug in Pac-Man...

http://donhodges.com/pacman_pinky_explanation.htm

...and it got me thinking... Has anyone created a MAME "cheat" file that fixes these bugs? I'm curious if it makes Pac-Man easier or harder.
I'm sure there must be a reason why Don hasn't converted it into cheats.


But just in case, here's a blind conversion of the code changes mentioned on that page into cheats.

Code: Select all

  <cheat desc="Pinky Movement Tracking Change"> <comment>See http://donhodges.com/pacman_pinky_explanation.htm for more info</comment>
    <script state="on">
      <action>temp0 =maincpu.md@2795</action>
      <action>temp1 =maincpu.mq@2FF0</action>
      <action>temp2 =maincpu.md@2FF8</action>
      <action>temp3 =maincpu.mb@2FFC</action>
    </script>
    <script state="run">
      <action>maincpu.md@2795=EB2FF0CD</action>
      <action>maincpu.mq@2FF0=87877D678287877C</action>
      <action>maincpu.md@2FF8=FCC96F83</action>
      <action>maincpu.mb@2FFC=CA</action>
    </script>
    <script state="off">
      <action>maincpu.md@2795=temp0 </action>
      <action>maincpu.mq@2FF0=temp1 </action>
      <action>maincpu.md@2FF8=temp2 </action>
      <action>maincpu.mb@2FFC=temp3 </action>
    </script>
  </cheat>
Pugsy

Servicing your cheating needs since 1985 8)

Grab the latest cheat collection:
MAME 0.259 XML cheat collection (6 OCTOBER 2023) from http://www.mamecheat.co.uk or direct from:-
https://mega.nz/file/q4dHGZ6K#i-EUiqIjH ... KMz7hnbTfw (ZIP Archive 3.76MB)
pacman_fan
Posts: 15
Joined: Tue Jan 04, 2011 3:22 pm

Re: MAME cheat to "fix" Pac-Man ghosts?

Post by pacman_fan »

Has anyone come up with the simular fix for Inky?
pacman_fan
Posts: 15
Joined: Tue Jan 04, 2011 3:22 pm

Re: MAME cheat to "fix" Pac-Man ghosts?

Post by pacman_fan »

The fix for Inky!

Orig code:
----------
27cf ed5b394d ld de,(#4d39) ; load DE with Pac-man's position
27D3 2a1c4d ld hl,(#4d1c) ; load HL with pacman direction
27D6 29 ADD HL, HL ; HL := HL * 2
27D7 19 ADD HL, DE ; add result to pac position.
; this now has the position 2 in front of pac

Fix code:
---------
27D3 C3F02F ; jump out
...
2FF0 2a1c4d ld hl,(#4d1c) ; load HL with pacman direction

2FF3 7C LD A, H ; load Pac-man's X directional vector
2FF4 87 ADD A, A ; double it
2FF5 82 ADD A, D ; add to Pac-Man's X position
2FF6 67 LD H, A ; store

2FF7 7D LD A, L ; load Pac-man's Y directional vector
2FF8 87 ADD A, A ; double it
2FF9 83 ADD A, E ; add to Pac-Man's Y position
2FFA 6F LD L, A ; store

2FFB C3D827 ; jump back
Post Reply