04-06-2026, 12:43 AM
In the last weeks I was writing custom 6502 code to activate and deactivate the gimmicks per level. After multiple tries I finally managed to make it to work, basically the method is to read a byte from the lookup table using the level area as an index, extract the bits and check if these bits match for the gimmick to be applied.
An example of a gimmick is the torus wrap around. It's a cool gimmick for my romhack, but by default it softlocks when the plumber is dying:
![[Image: jips_animation_01.webp]](https://i.postimg.cc/90dXWRLh/jips_animation_01.webp)
That's why you don't simply add the Game Genie code to the custom 6502 code and call it a day. I fixed it by using a variable in RAM to enable the gimmick only after the level is started, and disable it when dying or clearing a level:
![[Image: jips_animation_02.webp]](https://i.postimg.cc/KjPcZk0b/jips_animation_02.webp)
Now it's time to design the level with the new gimmick.
PS: just testing the WEBP animation format, if something is wrong please tell me.
An example of a gimmick is the torus wrap around. It's a cool gimmick for my romhack, but by default it softlocks when the plumber is dying:
![[Image: jips_animation_01.webp]](https://i.postimg.cc/90dXWRLh/jips_animation_01.webp)
That's why you don't simply add the Game Genie code to the custom 6502 code and call it a day. I fixed it by using a variable in RAM to enable the gimmick only after the level is started, and disable it when dying or clearing a level:
![[Image: jips_animation_02.webp]](https://i.postimg.cc/KjPcZk0b/jips_animation_02.webp)
Now it's time to design the level with the new gimmick.
PS: just testing the WEBP animation format, if something is wrong please tell me.
Signature reserved for future use


![[-]](https://forums.mfgg.net/images/emerald/collapse.png)