News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: how to make "infinite jumps" hack?  (Read 625 times)

ilikesquareenix

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
how to make "infinite jumps" hack?
« on: May 30, 2021, 08:27:49 am »
Hello everyone! I want to make infinite jumps(midair jumps) hack for this game: "Doki! Doki! Yuuenchi Crazy Land Daisakusen". Can i make that with fceux debugger only? Or i need another program like "Ida pro" for this? what is the search logic, if fceux is enough?

FAST6191

  • Hero Member
  • *****
  • Posts: 3129
    • View Profile
Re: how to make "infinite jumps" hack?
« Reply #1 on: May 30, 2021, 10:02:39 am »
There are two main approaches to what is normally known as moon jump cheats.

1) If the game has a double jump ability then somewhere in the code will be a little flag that is tripped when the second (or how many you get) jump has happened. Set this with a cheat to always be "not second jump" and you can get your moon jump. It is harder to find these in cheats than it is making infinite potions or gold or something but it is still within the realms of a basic cheat search ( https://web.archive.org/web/20080309104350/http://etk.scener.org/?op=tutorial ). Here I would use the "changed" and "not changed" searches when jumping to narrow it down. Get to a quiet place in the game where no enemies or anything are going on and go from there. You might also want to get creative with a savestate but as jumping can be done over and over (as opposed to something like an RPG where you are doing a repel enemies potion and turning that into a cheat, something that normally also uses flags but takes minutes or something to wear off) I would probably skip that for now.

If having it as a cheat does not work for you then you will have to edit the game. Fortunately the cheat will tell you exactly where the memory value sits (it being the whole point of the cheat to find it after all) so you can then set a simple break on read or break on write to it and force the game to either ignore the value (whatever reads it to see if a double jump is allowed can be told to not bother, or return a value that indicates has not happened) or always set it to "has not done a double jump" (when the game writes the "has done double jump" value in then you change that write to be "has not).

2) If the game has a gravity variable or a stat that goes into the jump calculation then you might find editing that to be something ridiculous makes much the same thing.

This would be fairly standard stats hacking, though gravity might be harder (and will likely be what I cover in a moment). Most games that have stats either have all the same type of variable for all the characters in one table, or each character will have their own table. Either way such tables are usually fairly close together in a game so if jump height stats take hours to change but attack stats do not then search for attack stats and look in the surrounding area.


If neither of those are a viable option in the game then yeah you get to edit the code. The on screen location of sprites is usually controlled in a specific area of hardware (on Nintendo consoles this would tend to be OAM, aka object area memory, a less common term for sprites also being objects or objs). If you set the memory viewer of your emulator to the OAM section and have it update in real time (some emulators need to have that option selected) it is usually pretty easy to spot what is responsible for your character. Not all games will use the OAM as their internal state of the game (instead the OAM might get a copy of data from the internal state). From here you can use a debugger to figure out what code is responsible for presumably the y axis location of the sprite and thus you might be able to set a new height to jump to.

Cyneprepou4uk

  • Hero Member
  • *****
  • Posts: 634
  • I am the baldest romhacker
    • View Profile
Re: how to make "infinite jumps" hack?
« Reply #2 on: May 30, 2021, 01:42:43 pm »
The game should have an address with player's state, which holds index values like idle/walking/jumping/attacking etc. It can also hold a "new state" flag. By reading this index the game jumps to an appropriate state handler.

You can edit jump handler in order to read a jump button, and make the game to execute the whole jump handler from the beginning as a positive result by setting the "new state" flag to the jump state. This can force your player to jump again.

Some clues you can get from studying idle state handler, where the game checks jump button before it sets jump state.

That's a basic idea of how to achieve that. Fceux is enough for the task.

ilikesquareenix

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: how to make "infinite jumps" hack?
« Reply #3 on: May 31, 2021, 02:39:46 pm »
Thank you very much guys! :thumbsup: