Announcement

Collapse
No announcement yet.

Question regarding

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Question regarding

    Hi , I'm using epsxe and I was trying to do some cheat codes for Castlevania SOTN as you can see below:

    Code:
    #SOTN All 0 NoLvlUp Challenge
    80097BE8 0062 // puts alucard with lvl 98, familiars can grow up
    80097BEC 0000 // reset exp to 0
    80097BEE 0000 // reset exp to 0
    80097BA0 0000 // current hp 0
    80097BA4 0000 // max hp 0
    80097BA8 0000 // current heart 0
    80097BAC 0000 // max heart 0
    80097BB0 0000 // ACTUAL MANA 0
    80097BB4 0001 // max mana 1 (if 0, game crashes)
    80097BB8 0000 //STR 0
    80097BBC 0000 //CON 0
    80097BC0 0000 //INT 0
    80097BC4 0000 //LCK 0
    The code works as expected: This setup the main character with all stats = 0 ( except for 2 fields, but it doesn't matter now). However, I want this code to work only once ( On the game, I can get some upgrades like Health or Hearts, so this codes keeps refreshing 0) without the need to stop the game and disable the cheats manually. I know that the opcode 80 is for constant write, not a single time write. However, I don't know if have a variant for single time write, like the N64 have (like F0 and F1 codes). I could use Joker commands, but I'm using those to increase mana in-game, since it does not have another to gain mana unless you level up ( which is disabled for this purpose).

    Any ideas?
    Last edited by Mindslash; 04-05-2017, 07:45:07 PM. Reason: Forgot to put a meaningful title

  • #2
    There might be a custom ROM somewhere that supports one-time writes, but as far as I can recall the PSX AR/GameShark did not have a command for that.

    You're probably going to have to throw a flag in some unused address (maybe kernel space, but I've had trouble getting that to work on emulators at least), and throw a conditional before every line. So something like:

    Code:
    D1gggggg DEAD
    80097BE8 0062
    ....
    D1gggggg DEAD
    80097BC4 0000
    80gggggg DEAD
    If kernel space won't work, another good place to look is in unused padding in arrays of strings that were aligned to system-word boundaries by the compiler.

    Edit: Actually, this may not work if the game writes that data when you load a save or something. In that case, you're going to have to look for something actually managed by the game, like a state variable that indicates when it's moved from the menu to the game proper. This is the same timing problem you'd have with a one-time write though. For what it's worth, you can have multiple joker commands, it's just a matter of binding them to a unique, and mutually exclusive set of button presses. So if increasing mana is bound to Select + X, you could trigger this block of codes with something like Select + Start + Triangle, so you don't activate it accidentally.
    Last edited by Pyriel; 04-06-2017, 09:05:06 AM.

    Comment


    • #3
      Yes, more Joker commands would do the work as well, however I'm not sure for those constant write opcodes. I disable the cheat manually after everything is set. The rest of cheats are toggles ( like the increment/decrement on mana, that have more than one time use).

      Regarding the emulator, I'm using epsxe 2.0.5, that supports GS codes up to 2.2+ version. My objective is to get those codes, modify the ISO based on the codes and create a ppf patch for that. I was trying to get some examples on how the Gameshark handles one time write on some games/systems ( like giving you 99 lives , but not retaining it by just applying once, so if you die you stay with 98 lives).

      Also, the game crashes if I try to do this at the start of game, so if I wanted everything to be automated, I would need to set a timeout or an event that triggers the code, but this is another whole story.

      (Another thing, I have no idea how to edit this Thread title, it throws an error when trying to save on advanced edit =/)

      Comment


      • #4
        One-time commands are generally handled by performing them during some initialization syscall or the first time a particular interrupt runs. Unless the game is so simple that it just boots up with all the data initialized from the start, it's likely that a one-time write won't occur at a time that's convenient for you.

        If you're going to go to the trouble of patching the game, I would just find the routines responsible for initializing a fresh start, and co-opt them somehow. This could also be done through codes, assuming the routines and data aren't strange or widely dispersed. Of course, that's assuming you don't want this to happen every time you load the game, whether you're starting over or continuing a play-through.

        I've never looked at this particular game, but some of the Konami games I've messed with just have a start-up module that has the initialization data for player characters in it. With them, you can max out all stats from the start with a few 16-bit comparisons (to ensure the module in question is loaded) and a handful of writes.

        Comment

        Working...
        X