11 March 2016 - Forum Rules

Main Menu

Viewing RAM values on a Mega Drive emulator

Started by 3vrB257aej9, September 27, 2022, 09:08:13 PM

Previous topic - Next topic


Is there a Mega Drive emulator that lets you dig through the RAM values the same way that eg. Snes9X and FCEUX do? I could really use that for a couple of guides I'm planning on writing.

What about Game Boy, PS1, or Saturn?



"dig through RAM values" presumably in real time is an odd one as far as practical hacks. It certainly can be done and achieve some results but it is not necessarily the standard approach, or might be viewed similar to using a hex editor to effect a translation of a RPG.

Anyway four main approaches

1) Savestates. Make sure to disable any compression applied to them but savestates will necessarily contain the memory. Plenty of people edit these under the banner of cheating, "savestate-hacking" being the term you might want to stick in your chosen search engine, less noted around here owing to the lack of focus on cheats but still used on occasion to trial things (usually when cheat engines for the device/console are too weak to have slide codes).

2) Internal cheat search. RAM values and changes thereof is kind of their whole thing. being my usual choice of intro to such things, detailing cheats on a per console basis save some newer devices which you will probably want to go case by case for.

3) External cheat search. Artmoney, emuhaste, cheat engine, various hex editors have options to peer into memory of other processes. (it is old so there might be other sites sporting listings to get it to find the location of memory in current/newer than release versions or forks of emulators, assuming you don't care to grab a hex editor and use it to peer into the emulator's memory to find the location within that of the emulated device's memory yourself -- flood the first section and last with DEADBEEF or something obvious with a cheat . again if you need encodings for cheats, you don't much care if the game still works either so easy enough to make a write to lowest location).

4) Debugging proper. Breakpoints, memory viewing/manipulation. This in turn has two approaches, maybe three
i) internal debugging options. Rarer outside of Nintendo systems (FCEUX kind of being the gold standard by which all else is judged in console world, PC being streets ahead of anything seen in console world) it seems but still present in many things.
ii) external debugging options. Usually a small GDB stub you farm out to ghidra , whatever debugger GNU GCC or derivatives thereof (homebrew toolchains often use this) or possibly IDA (which can also peer into memory if you want it to).
iii) is some consoles will have means by which external debuggers can do their thing. Clunky but in a time before suitably accurate/feature complete emulators then might be all you have and if you are concerned with memory then a thing to note in that. Usually reserved for newer consoles that run a firmware in the background, a handful of cheat devices or rare and hard to come by development versions of consoles (or commercial lines modified, often extensively, to be that). Mentioned here mostly to be more complete.

As noted above then emulators for non Nintendo consoles tend to be a bit lacking on the internal debugging and other such tools front. BGB debugger should do for GB/GBC but there might be alternatives.
PS1 has some options between its various emulators, stands a chance of being the best of them but the emulator is also newer than the epsxe and PCSX lines and still a bit underdeveloped, though for hacking then that should not be so bad.
Not sure what we are suggesting for megadrive/genesis debuggers these days and I don't think good old Fusion is up to much on this front. Higan has some interesting things for the SNES and it did gain megadrive and gameboy (color) options towards the end so might also be something to look at.

If searching a site like this for debugger laden forks of emulators did not get you anything what you might also want to do is look at what tool assisted speedrun types are doing here. In more recent times many things have moved away from individual emulators and thus Bizhawk has some interesting things. Other bundled emulators like Retroarch I am usually of the "what has retroarch ever done for us" persuasion and for the most part it is an integration effort and drama factory rather than something that moves the needle all that much (though plenty like integration).


Right, Gens r57 and BGB have it covered for MD and GB. Appreciate it.

I tried IDA and Bizhawk, but they wouldn't launch. My computer has seen better days, no doubt.

NO$PSX and Mednafen work and have debuggers, but I can't make any sense of them.

I have *zero* experience with programming/debugging. All I really want to do is filter out RAM values to find HP figures and other stats (hit the enemy, less than previous value, hit the enemy, less than previous value, etc.).

I know someone with 'elite skills' would be able to datamine this stuff without even playing the game, but this is well beyond my (current) abilities. For now, I'm content with just playing the games and picking up the values one by one as I run into them. It's slow, but it gets the job done.


I am really not happy with the term datamining, yet the kids/gaming press seem to enjoy it despite it being nothing like datamining in industry (datamining in industry = statistician that knows some database languages, would not expect one I hired to be able to play ROM hacker either).
Most will also do it from the game itself -- static analysis... it has been done but far far far easier to watch it happen and adjust your probes accordingly. I am not one to knock standard cheat search methods either -- they are both essential for the more involved stuff and have a lot of power without it.

"other stats" assuming that does not mean MP, experience and the like is often more involved. There are methods, starting with if you can manipulate them by equipping and removing something and moving onto relative search or save based methods, but it tends to be where debuggers come in and make themselves useful. That said it is not a huge step up from cheat search to gaining useful info using it, for instance what subtracts from HP will have had to have a calculation done before then which likely includes defence and a bunch of other factors you are likely interested in*, also what eventually subtracts your HP you can turn to an add/do nothing to get an even better infinite HP cheat, or indeed go further back still and also avoid knockback or some such.

*to say nothing of knowing the game's internal calculations being useful for various runs and rebalancing.

IDA for anything useful in ROM hacking (give or take maybe the original xbox and X64 bases for PS4 and xbone) would be a paid version -- the free version is restricted to X86 only. Not sure why bizhawk did not want to load, though I tend not to play with it to know the quirks.

Haven't tried no$psx in a while and his other emulators have a more variable approach to cheat search (this is where a lot of people move to the emuhaste and such line to augment it).