Player (206)
Joined: 5/29/2004
Posts: 5712
Can you make it so that the DMA transfer isn't affected by saving?
put yourself in my rocketpack if that poochie is one outrageous dude
upthorn
He/Him
Emulator Coder, Active player (392)
Joined: 3/24/2006
Posts: 1802
nitsuja wrote:
upthorn wrote:
Truncated wrote:
2) I sometime get an annoying "Warning: Saving during DMA transfer; savestate may be corrupt." and it won't go away for several saves. I haven't looked into it more.
I have gotten rid of this, but I'm not sure if this unfixed the problem nitsuja fixed by implementing it.
If the game is doing a DMA transfer when you save, Gens causes the DMA transfer to magically finish before saving, which seems likely to cause weird desyncs because it means that the act of saving the game changes the state of the game. I added that warning as a "possible desync alert". Maybe it should be optional?
My solution was that if you hit save-state during a DMA transfer, it will set a flag that makes it save the state as soon as the transfer finishes in the course of normal emulation. The downside is that this can cause the state to save a frame or so after the button is pressed.
How fleeting are all human passions compared with the massive continuity of ducks.
Emulator Coder, Skilled player (1310)
Joined: 12/21/2004
Posts: 2687
upthorn wrote:
My solution was that if you hit save-state during a DMA transfer, it will set a flag that makes it save the state as soon as the transfer finishes in the course of normal emulation. The downside is that this can cause the state to save a frame or so after the button is pressed.
What if you load a state immediately after saving while the game is paused? (Which is a very common thing to do.) That solution won't work very well. EDIT: oops, didn't mean to edit
upthorn
He/Him
Emulator Coder, Active player (392)
Joined: 3/24/2006
Posts: 1802
nitsuja wrote:
upthorn wrote:
My solution was that if you hit save-state during a DMA transfer, it will set a flag that makes it save the state as soon as the transfer finishes in the course of normal emulation. The downside is that this can cause the state to save a frame or so after the button is pressed.
What if you load a state immediately after saving while the game is paused? (Which is a very common thing to do.) That solution won't work very well.
It also puts a message (but not a popup warning) on screen that the state won't save until the DMA transfer finishes. Maybe I should make it say "DMA Transfer in progress, please advance frame to save state."
How fleeting are all human passions compared with the massive continuity of ducks.
Emulator Coder, Skilled player (1310)
Joined: 12/21/2004
Posts: 2687
What it should really do is just save the state of the DMA transfer like other emulators do. I don't know why it doesn't, though, so maybe there is some complication making that difficult. But, going with what you have it doing right now, at least it should fast-forward until it can save and automatically save before loading if you hit load before it can save.
Joined: 2/15/2005
Posts: 246
Location: Torquay, England
upthorn wrote:
It's much easier to add fixed hotkeys than to add configurable ones
Unfortunately, some people *cough* me *cough* would probably complain if they didn't like the hotkey. :P I assume you're talking about graphic layers? If so, I suggest you do it the same way as DebuGens: F9 - Toggle Plane A F10 - Toggle Plane B F11 - Toggle Sprites F12 - Toggle Shadow/Highlight mode Also, it'd be nice if they would apply as soon as you pressed them (if you paused), not on the next frame.
upthorn wrote:
bobxp wrote:
Well then - if every other Windows fullscreen program in existance doesn't screw up when you close one of two open modal dialog boxes, why does Gens?
Fixed.
Hurray!!
nitsuja wrote:
What it should really do is just save the state of the DMA transfer like other emulators do. I don't know why it doesn't, though, so maybe there is some complication making that difficult. But, going with what you have it doing right now, at least it should fast-forward until it can save and automatically save before loading if you hit load before it can save.
What's all this about DMA transfers? Is that what caused all my desyncs somewhere between CNZ and ICZ in S3&K? o_O Anyway, I think it's a bad idea having it fast forward to a point where it can save. How are you supposed to get frame accuracy doing that? I quite often save extremely frequently while making TASs (every few frames). If it fast forwarded, you wouldn't be able to press buttons. Anyway, like nitsuja said, save the state properly so we can avoid that problem, whatever it is. :|
upthorn
He/Him
Emulator Coder, Active player (392)
Joined: 3/24/2006
Posts: 1802
upthorn wrote:
Will make a bugfix release later today.
Woops. Got sidetracked into the DMA transfer issue. For now I'm setting it back as Nitsuja had it, since it's not really a bug.
How fleeting are all human passions compared with the massive continuity of ducks.
Joined: 2/15/2005
Posts: 246
Location: Torquay, England
Two things: 1. Tab should be changed back to reset!!!!!! (excess exclamation marks for emphasis) We already have speed control. 2. Talking about speed control, why not change the keys F2, F3 and F4 to this: F2 sets to 100%, F3 slows down, F4 speeds up. There is no point having F2/F3/F4 for only fast forwarding and limit slowdown to the menu.
nesrocks
He/Him
Player (246)
Joined: 5/1/2004
Posts: 4096
Location: Rio, Brazil
I use TAB for pause on all my emulators. Hotkeys should be fully configurable... It's really bad when i hit TAB and then it resets
adelikat
He/Him
Emulator Coder, Site Developer, Site Owner, Expert player (3574)
Joined: 11/3/2004
Posts: 4754
Location: Tennessee
How about a cheat search function and a memory address viewing capability?
It's hard to look this good. My TAS projects
Joined: 2/15/2005
Posts: 246
Location: Torquay, England
FODA wrote:
I use TAB for pause on all my emulators. Hotkeys should be fully configurable... It's really bad when i hit TAB and then it resets
Hmm, well I use TAB for reset and ESC for pause. Unfortunately, ZSNES thinks that Alt+Tab counts as a Tab too... so I have to savestate or bring up the menu before switching out of fullscreen with that... But that was off-topic anyway :P
upthorn
He/Him
Emulator Coder, Active player (392)
Joined: 3/24/2006
Posts: 1802
bobxp wrote:
Two things: 1. Tab should be changed back to reset!!!!!! (excess exclamation marks for emphasis) We already have speed control. 2. Talking about speed control, why not change the keys F2, F3 and F4 to this: F2 sets to 100%, F3 slows down, F4 speeds up. There is no point having F2/F3/F4 for only fast forwarding and limit slowdown to the menu.
There's already a +/- for slowdow speed, it just doesn't work from the same keys as the frameskip +/- keys. I suppose it makes a certain amount of sense to merge them, though.
FODA wrote:
I use TAB for pause on all my emulators. Hotkeys should be fully configurable... It's really bad when i hit TAB and then it resets
TAB doesn't reset in any of the versions I've released, it's a hold-to-fast-forward key. As for making all of the hotkeys fully configurable. It could be done, but it would involve writing most of the hot-key handlers basically from scratch. I'll look into it, but no promises.
adelikat wrote:
How about a cheat search function and a memory address viewing capability?
That's my highest priority at the moment. When next I have a big chunk of free time, I'm going to adapt IdeaMagnate's cheatsearch which he wrote into Linux gens.
How fleeting are all human passions compared with the massive continuity of ducks.
Player (206)
Joined: 5/29/2004
Posts: 5712
Aw, I like Spacebar for turbo.
put yourself in my rocketpack if that poochie is one outrageous dude
Joined: 2/15/2005
Posts: 246
Location: Torquay, England
But Spacebar is start!! o_o
TAB doesn't reset in any of the versions I've released, it's a hold-to-fast-forward key.
Well, in all versions up to 9f and possibly later, tab has been reset... Btw: for the hotkeys, I can't see how this would be too difficult:
pseudocode

switch (keycode) {
case hotkeys[OPEN_ROM]:
open_rom();
break;
case hotkeys[RESET]:
reset();
break;

(blah blah etc)

}
and just have an array called hotkeys where the OPEN_ROM, RESET etc. are constants. when customizing just change the values of the array, and save/load the values to gens.cfg.
SXL
Joined: 2/7/2005
Posts: 571
I guess it's because it's spread on dozens of obfuscated code files. you should try having a look at it, it's scary.
I never sleep, 'cause sleep is the cousin of death - NAS
upthorn
He/Him
Emulator Coder, Active player (392)
Joined: 3/24/2006
Posts: 1802
It's not so much that the code is hard to work with, I've learned how to navigate it with experience. The problem is that, currently, at least in the windows version, all of those hot keys are handled by a static "accelerator" table, which bypasses direct input entirely, and instead sends a WM_COMMAND message to the main window process. In order to make them configurable, I'd have to code a whole new input checking routine in. Again, I'll look into it, but no promises.
How fleeting are all human passions compared with the massive continuity of ducks.
Emulator Coder, Skilled player (1310)
Joined: 12/21/2004
Posts: 2687
But aren't some of the hotkeys already configurable, such as the quicksave and quickload keys? It might not be pretty, but if you're looking to avoid coding a new input checking routing, you could simply duplicate the code those use, and delete the corresponding keys from the accelerator table. (It should be rewritten to be better, though.)
upthorn
He/Him
Emulator Coder, Active player (392)
Joined: 3/24/2006
Posts: 1802
nitsuja wrote:
But aren't some of the hotkeys already configurable, such as the quicksave and quickload keys? It might not be pretty, but if you're looking to avoid coding a new input checking routing, you could simply duplicate the code those use, and delete the corresponding keys from the accelerator table. (It should be rewritten to be better, though.)
Well, the thing is, if at all possible, I'd like the keys still to be handled as WM_COMMAND messages, just with configurable mappings, instead of the static RAC ACCELERATOR table.
How fleeting are all human passions compared with the massive continuity of ducks.
Emulator Coder, Skilled player (1310)
Joined: 12/21/2004
Posts: 2687
It wouldn't use the accelerator table. The configurable ones already don't. If they don't use WM_COMMAND they probably use WM_KEYDOWN or check the input some other way, it shouldn't make too much of a difference how the message gets there.
upthorn
He/Him
Emulator Coder, Active player (392)
Joined: 3/24/2006
Posts: 1802
nitsuja wrote:
It wouldn't use the accelerator table. The configurable ones already don't. If they don't use WM_COMMAND they probably use WM_KEYDOWN or check the input some other way, it shouldn't make too much of a difference how the message gets there.
They aren't handled by messages, they're handled by an explicit Check_Key_Pressed call.
How fleeting are all human passions compared with the massive continuity of ducks.
Joined: 10/3/2005
Posts: 1332
I'm about to sit down to watch the new Shining Force submission. Since I don't want to hear the same five seconds of battle theme over and over again, I disable the audio. This causes the movie to desync at certain fanfares. A "fake mute" feature or some sort of volume control would be nice.
upthorn
He/Him
Emulator Coder, Active player (392)
Joined: 3/24/2006
Posts: 1802
Look again. Sound->volume control. If it isn't there, redownload from the link at http://tasvideos.org/EmulatorHomepages.html#Gens
How fleeting are all human passions compared with the massive continuity of ducks.
P.JBoy
Any
Editor
Joined: 3/25/2006
Posts: 850
Location: stuck in Pandora's box HELLPP!!!
So how about configrable hotkeys? (please)
Emulator Coder
Joined: 6/8/2005
Posts: 236
Location: Madison, Wisconsin
Is it possible to be able to bind the savestate save/load to the numeric keypad?
Editor, Expert player (2479)
Joined: 4/8/2005
Posts: 1573
Location: Gone for a year, just for varietyyyyyyyyy!!
Dear upthorn, Is there any chance you could add an option to toggle automatic fast-forward on frames that check no input? When enabled, this option would advance the "lag" frames automatically (very fast) and then pause. It would make all the games that have a constant flow of those red frames easier to record.