Works for HANGLY, HANGLY2, HANGLY3 and POPEYEMAN.
Here is a patch to fix that, although I'd like a better suggestion on how to calculate an ever or odd Hex variable in the cheat engine, so we don't have to manually slap in each level like I did in the short term.
Code: Select all
<cheat desc="Select Starting Level - [F1] Progresses Correctly"> <comment>Can Leave Cheat ON or OFF, Game level progresses normally either way. F1 (Rack Test) progresses game normally too. </comment>
<parameter>
<item value="0x00">Cherry</item>
<item value="0x01">Strawberry</item>
<item value="0x02">1st Orange</item>
<item value="0x03">2nd Orange</item>
<item value="0x04">1st Apple</item>
<item value="0x05">2nd Apple</item>
<item value="0x06">1st Pineapple</item>
<item value="0x07">2nd Pineapple</item>
<item value="0x08">1st Galaxian</item>
<item value="0x09">2nd Galaxian</item>
<item value="0x0A">1st Bell</item>
<item value="0x0B">2nd Bell</item>
<item value="0x0C">1st Key</item>
<item value="0x0D">2nd Key</item>
<item value="0x0E">3rd Key</item>
<item value="0x0F">4th Key</item>
<item value="0x10">5th Key</item>
<item value="0x11">6th Key</item>
<item value="0x12">7th Key</item>
<item value="0x13">8th Key</item>
<item value="0x14">9th Key</item>
<item value="0xFE">Level 254: Level 254</item>
<item value="0xFF">Level 255: Split Screen (Unfinishable)</item>
</parameter>
<script state="run">
<!-- MAZE Level -->
<action condition="(maincpu.pb@4E13==00)"> maincpu.pb@4E13=param</action>
<!-- NORMAL Ghost Difficulty -->
<action condition="(maincpu.pb@4E13==param) AND (maincpu.pb@4E73==68)"> maincpu.pb@4E0A=0x68 + param</action>
<action condition="(maincpu.pb@4E13==param) AND (maincpu.pb@4E73==68) AND (maincpu.pb@4E0A LT 0x68)"> maincpu.pb@4E0A=7C</action>
<action condition="(maincpu.pb@4E13==param) AND (maincpu.pb@4E73==68) AND (maincpu.pb@4E0A GT 0x7C)"> maincpu.pb@4E0A=7C</action>
<!-- HARD Ghost Difficulty -->
<action condition="(maincpu.pb@4E13==param) AND (maincpu.pb@4E73==7D)"> maincpu.pb@4E0A=0x7D + param</action>
<action condition="(maincpu.pb@4E13==param) AND (maincpu.pb@4E73==7D) AND (maincpu.pb@4E0A LT 0x7D)"> maincpu.pb@4E0A=8C</action>
<action condition="(maincpu.pb@4E13==param) AND (maincpu.pb@4E73==7D) AND (maincpu.pb@4E0A GT 0x8C)"> maincpu.pb@4E0A=8C</action>
<!-- Remove "PLAYER ONE" text at start, otherwise letters overwrite 2 dots above ghost box and Maze is unfinishable, if starting on Ooen Maze -->
<action> maincpu.rb@3741=8C</action>
<action> maincpu.rq@3742=45</action>
<!-- Hangly: Maze toggles from Maze (Odd levels) to Open Maze (Even levels), execpt for level 00 -->
<!-- Glitches in Hangly and Hangly2 don't run the disappearing maze on Odd levels properly, after a death and/or after player 2 -->
<!-- ODD Levels: Maze, DISAPPEARS when energizer is eaten -->
<!-- EVEN Levels: Maze, OPEN -->
<action>temp1=(maincpu.pb@4E13 div 2)</action>
<action>temp2=((maincpu.pb@4E13 +1) div 2)</action>
<action condition="(maincpu.pb@4E09==0x00) AND (temp1 != temp2)"> maincpu.pb@4EFF=01</action> <!-- Odd Level / 1st Player -->
<action condition="(maincpu.pb@4E09==0x00) AND (temp1 == temp2)"> maincpu.pb@4EFF=02</action> <!-- Even Level / 1st Player -->
<action condition="(maincpu.pb@4E09==0x01) AND (temp1 != temp2)"> maincpu.pb@4EFE=01</action> <!-- Odd Level / 2nd Player -->
<action condition="(maincpu.pb@4E09==0x01) AND (temp1 == temp2)"> maincpu.pb@4EFE=02</action> <!-- Even Level / 2nd Player -->
<!-- 00 Level: Maze, Does NOT Disappear when energizer is eaten -->
<action condition="(maincpu.pb@4E13==0x00)"> maincpu.pb@4EFF=00</action> <!-- 00 Level / 1st Player -->
<action condition="(maincpu.pb@4E13==0x00)"> maincpu.pb@4EFE=00</action> <!-- 00 Level / 2nd Player -->
</script>
<script state="off">
<!-- Dont reset anything, Keeps current level info and lets the game increment normally -->
</script>
</cheat>