No announcement yet.

Multiline Cheats in Mednafen with Castlevania Symphony of the Night (Saturn)

  • Filter
  • Time
  • Show
Clear All
new posts

  • Multiline Cheats in Mednafen with Castlevania Symphony of the Night (Saturn)

    Whelp, not alot of useful information online for help getting cheats to work in mednafen that aren't on an ubuntu forum so i'm making this to share what i learned these past couple days due to mednafen 1.21.3 being the best emulator for running sega saturn currently. The SSF emulator is too bare bones for me, Yabause gave me audio problems loading states, and Retroarch worked great although it uses the Beetle(Mednafen) and Yabause cores. But there's one thing that makes Mednafen better than those other emulators. That's right, cheats. Mednafen has the best cheat support compared to SSF(using PSX CEP cheater), RetroArch(Which i couldnt even get any cheats working in) and yabause(loading a cheat file with more than 25 cheats crashes the program). Using mednafen you can actually create multiline codes by changing the address range for a cheat. Unfortunately, the cheat system uses a command prompt setup instead of a Graphic Interface but hey, at least Saturn emulation works now.

    If you are new to Mednafen there's a few things we gotta setup first. After downloading and running you'll notice that you'll get an error after running the program. Don't worry, that's supposed to happen. You have to run games by dragging and dropping a game onto the executable file(Mednafen.exe). But there is a better way. Mednafen has a couple good frontend GUI's that will make it function more like a normal emulator. There's 3 main frontends:
    • Mednaffe
    • MedGui Reborn
    • MedLaunch
    Using a frontend you can load up a game/configure hotkeys/setup drivers like you can normally in other emulators. I use Mednaffe although the frontend you use does not affect Mednafen's cheat system since it runs from the emulator. But all Frontends use the same Config files so editing hotkeys in one frontend will likely change them in another.

    Alright, lets finally get into how to convert cheats you find online (from sites like i don't know maybe and getting them to work in mednafen. For purposes of this tutorial i'm going to use Akumajou Dracula X ~Gekka no Yasoukyoku~ (1998)(Konami Digital Entertainment)(JP) otherwise known as Castlevania Symphony of the Night for Sega Saturn since that's what i was trying to get cheats working for in the first place. While running a game, press Alt+T to toggle cheats and press Alt+C to enter the Cheat Command prompt Menu. Press Alt+C again to go back into the game. Then exit the game with Esc and a file should be created in the Mednafen directory in the cheats folder called ss.cht. Open this in notepad(Windows) or whatever Macs use. So i'll give you an example code just to give a rundown of how they're setup. I found a code for Infinite Health for Saturn Symphony of the Night on Gamehacking so inputing it in mednafen looks like this:

    R I 2 B 0 1605c942 03E8 Infinite Health

    R = (R)eplace memory address. This tells the emulator what to do with the address. (A)ddition and (T)ransfer can also be used. Most of the time you're going to just use (R)eplace. Haven't really fooled around with Addition and Transfer successfully yet.
    I = (I)nactive Cheat. This tells the emulator weither or not the cheat is activated upon loading a game. (A)ctive will be used if you exited the emulator while the cheat was toggled through the Alt+C Cheat Menu.
    2 = 2 Address Range. This tells the emulator what the address range of the cheat is. This also effects how many digits the value can be. I'll elaborate more on this later. Can be a number 1-8 or more.
    B = (B)ig Endian address value. (L)ittle Endian can also be used. For example, if an address 1605c942 has a value 03E8 in Big Endian. 03E8=1000 in decimal. In Little Endian the value is reversed so its 8E30=35400 in decimal. You're gonna always be using Big Endian.
    0 = Not really sure what this does yet

    So to elaborate alittle more with addresses, each address stores 1 byte of info which can be a value from 00-FF. If an address 1605c942 has a value of 03E8, 1605c942=03 and 1605c943=E8. So if we changed the lines from 2 to something bigger, the value would change like this:

    R I 1 B 0 1605c942 E8 Infinite Health
    R I 2 B 0 1605c942 03E8 Infinite Health
    R I 3 B 0 1605c942 0003E8 Infinite Health
    R I 4 B 0 1605c942 000003E8 Infinite Health
    R I 5 B 0 1605c942 00000003E8 Infinite Health
    R I 6 B 0 1605c942 0000000003E8 Infinite Health
    R I 7 B 0 1605c942 000000000003E8 Infinite Health
    R I 8 B 0 1605c942 00000000000003E8 Infinite Health

    For 8 Lines the address range affected is from 1605c942-1605c949. You can go above 8 Lines although you cant put a value with more than 16 digits(8 Bytes) in it. Doing so with just repeat the first 16 digits for the next lines. We can actually do multiline codes like this. So for example, we can simplify the code for all items in Symphony of the Night (saturn)( into one convenient code.

    All Items (Set 1)
    1605C71A 6363 1605C71C 6363 1605C71E 6363 1605C720 6363 1605C722 6363 1605C724 6363 1605C726 6363 1605C728 6363 1605C72A 6363 1605C72C 6363 1605C72E 6363 1605C730 6363

    There are 12 addresses here that each have values affected the next address above it for a total of 12*2=24 Address Lines. To put this in Mednafen it would look like this:

    R I 24 B 0 1605c71A 6363636363636363 All Items (Set 1)

    The address range affected is from 1605c71A-1605c731. There are 8 bytes that are each 63=99 in decimal. the 8 byte value is repeated 3 times for 24 lines total. If the line is a number not divisible by 8, i'm not really sure if it terminates or if it continues until it finds an address divisible by 8 (Needs verified).

    We can actually combine all 11 item sets into one simple cheat

    R I 268 B 0 1605C71A 3232323232323232 All 268 Items

    Doesn't that simply things? Mednafen's Cheat Interface also allows you the modify a code in game. For example I'm going to use the Subweapon Modifier code.

    R I 2 B 0 1605c99e 0000 Subweapon

    To Change Subweapon in game, Press Alt+C and press "1" followed by "Enter" this brings up your cheat list. Either download my ss.cht file for the game or copy/paste this in your ss.cht file so it pops up. Select the subweapon code with a number key. From here you can (T)oggle or (M)odify. Type "m" and "Enter". It will prompt you to change the Cheat Name, Lines, Address, Endian. Keep pressing Enter until it allows you to change the Value and enter a new 4 digit value. Here's a list of all values.

    0003-Holy Water
    0006-Stop Watch
    0007-Bouncing Stone
    0008-Holy Wafers
    0009-Lightning Ring

    Beware, sometimes your cheats might disappear due to a formatting problem so make a backup. What causes them to disappear is an invisible space which you have to delete from your backup and restore your cheat file from. Its easy to find the invisible space because its right before where the cheats disappeared in the last code description.

    Whelp, there's a quick rundown of Mednafen's cheat interface. Hope this pops up on google searches and somebody finds this useful. Feel free to leave a comment if you found this guide helpful for using cheats in Mednafen or if you figured out anything new that i haven't described.
    Attached Files
    Last edited by Elucidater; 01-26-2019, 01:21:53 AM.

  • #2
    thx for sharing


    • #3
      How do you turn them on and off, thanks