Post subject: Finding Memory Flag for Frames that Accept Input
Former player
Joined: 9/20/2006
Posts: 287
Location: Singapore
I hope my topic sounds logical to most others... basically what I am looking for is similar to what upthorn implemented in Gens 9.5. In most games, there are frames where input is ignored temporarily while the characters are completing some form of animation based on the last input, so I was wondering if there is actually a separate memory address within the game itself aside from the 'lag flag' which tells the game when exactly to accept input. If so how exactly are these flags found?
Truncated wrote:
Truncated is the most fiendish instrument of torture ever devised to bedevil the days of man. -- xoinx
Post subject: Re: Finding Memory Flag for Frames that Accept Input
upthorn
He/Him
Emulator Coder, Active player (392)
Joined: 3/24/2006
Posts: 1802
xoinx wrote:
I was wondering if there is actually a separate memory address within the game itself aside from the 'lag flag' which tells the game when exactly to accept input.
Well, each game does it differently, some have a flag which tells them to branch past the input polling, some just have a loop that doesn't poll input handle wait times. The bottom line is that the only universal way to know if a game has accepted input is to put something in the emulator that checks when the controller is actually read. (I can't really answer your other questions though)
How fleeting are all human passions compared with the massive continuity of ducks.
Former player
Joined: 9/20/2006
Posts: 287
Location: Singapore
upthorn wrote:
(I can't really answer your other questions though)
I figured there would be no easy way out when finding these addresses... I'll go explore a bit more first and maybe I can find something eventually haha
Truncated wrote:
Truncated is the most fiendish instrument of torture ever devised to bedevil the days of man. -- xoinx
Skilled player (1828)
Joined: 4/20/2005
Posts: 2161
Location: Norrköping, Sweden
For what console do you want this address? Are we talking about a NES game or games in general? If you're talking about NES games, the easiest way would be to first find the first frame that the game accepts input again. let's call this frame X. What you do then is to start your search a few frames before, say frame X-10, and search for values that don't change between frame X-10 and X (|0-C|==V2 with V2=0). And when you reach frame X, you search for addresses that have changed (0!=C). Perhaps you'll find something that way. I hope I made myself clear with this post. :)
Senior Moderator
Joined: 8/4/2005
Posts: 5777
Location: Away
Snes9x 1.51 has the same feature, too. (TOO BAD IT DESYNCS, BOOHOO.)
Warp wrote:
Edit: I think I understand now: It's my avatar, isn't it? It makes me look angry.
Hoe
Joined: 7/31/2004
Posts: 183
Location: USA
Some thing I mentioned before on these forums is that I believe recording formats should be input pole based and not frame based. Keyinput can be poled 0 to <insert large number> times per frame. Instead of frame advance, input pole advance should exist. I do not know of any games that pole key input in a manor aside from 0 or once per frame, but I doubt people are checking if the games do this or not.
Joined: 8/28/2006
Posts: 50
(It's spelled "poll" in this case.) Poll-based recording has some advantages. Emulators that don't emulate lag correctly will work more often without desyncs, since some games won't poll the controller in lag frames. Another nice advantage of poll-based recording is that you could actually play movies on a real console by making a fake controller that counts how many times it's been polled.
HHS
Active player (286)
Joined: 10/8/2006
Posts: 356
Another nice advantage of poll-based recording is that you could actually play movies on a real console by making a fake controller that counts how many times it's been polled.
Usually that doesn't work, because many games have things that depend on lag, such as RNGs that are updated every frame or continuously while waiting for a new frame.