Post subject: Creating theoretical memory addresses
Skilled player (1886)
Joined: 4/20/2005
Posts: 2160
Location: Norrköping, Sweden
I'm sorry if the topic title is confusing, but it was the best I could think of. The core of my idea is the possibility to create new memory addresses that work as a function of existing RAM addresses. These addresses would only exist inside the emulator, they won't affect the game in any way. I'll give some examples below of how these could work: *Let's say you would like a memory address that increases by 1 for each frame that there is lag. You have found a memory address, let's say RAM address 5000, that has the value FF if, and only if, there is lag. If there is no lag, it has the value 00. Let's create a theoretical address, let's call it G000, that works like this:
    G000 increases by 1 for each frame that address 5000 has the value FF. G000 has the value 00 when the game starts.
*Another use could be to find out the distance between you and an enemy, if you're TASing a typical platformer. If your X-position is stored in address 1000, and the enemy's address is stored in address 1001, you could create address G001 = (the value of address 1001) - (the value of address 1000), if the value of 1001 > the value of 1000. *Sometimes you have found an address that tells you the boss' health points, but it doesn't really work as you would like it to work. For example, in the NES game Darkwing Duck, all bosses have 16 health points. I don't remember by heart on what address the health is stored, but let's say it's address 1500. The problem with the value of this address is that it starts at 0 and then increases with each hit until it reaches 16. Let's say you want it to behave in the matter that it starts out at 16 and then decreases when you hit the boss. You could then create a new address, called G002 = 16 - (the value of address 1500). What do you think? I hope I made myself clear in this post. Note that I don't know much about how emulators work, so perhaps this isn't even possible to implement. Though I can see the use of these values, especially the part with the lag counter could be really useful.
Emulator Coder, Site Developer, Former player
Joined: 11/6/2004
Posts: 833
I modified snes9x to accept "DLLs" (under Linux they're call .so files) to load and run. I used it to do things like FF6's encounter counter, and help Nitrodon/Halamantariel with their Earthbound run. I think some kind of scripting/programming language will be needed to do what you seek. I used C++.
upthorn
He/Him
Emulator Coder, Active player (388)
Joined: 3/24/2006
Posts: 1802
I am actually planning something like that for gens eventually. If I can ever figure out how to implement a proper scripting language for it.
How fleeting are all human passions compared with the massive continuity of ducks.