Posts for nitsuja


Emulator Coder, Experienced Forum User, Published Author, Skilled player (1301)
Joined: 12/21/2004
Posts: 2687
Uh, that's about right, if you go any faster you'll go in reverse and it will start approaching 0 from the other direction. I shaved another 10 seconds off (putting this overflow to good use, actually), so Leaf Storm 2 is sub-30 seconds now. I guess I should look at act 1 more closely to see if it has any suitable slopes.
Emulator Coder, Experienced Forum User, Published Author, Skilled player (1301)
Joined: 12/21/2004
Posts: 2687
MUGG wrote:
desynch issues
There is only one known desync issue in 0.9.5, and it's there in 0.9.4+ also and in FCEUX (and probably some other emulators. It's fixed in Gens though). It's caused by user error when loading a savestate that isn't part of the current progression while in read-only mode. I have yet to see any other sort of desync in 0.9.5, even if I stress test the savestates to the max by saving and loading a savestate every frame. If you run into any real desync issues, please report them.
MUGG wrote:
confusing input display
You probably find it confusing because there is more information than before. But it's still pretty simple as long as you know this:
The DeSmuME Manual wrote:
View | Display Input Selecting this option displays the emulated input that the emulator is recognizing and sending to the game software. Note that if the input displayed is green, that means the emulator recognized it but did not send it to the game (this will happen if you are not running a game yet, for example). [Any other color means "pressed" as normal.] View | Display Graphical Input Same as Display Input but it is a super-spiffy graphical version.
MUGG wrote:
and on top of that I already began working on my movie
Well, that's an understandable reason.
Emulator Coder, Experienced Forum User, Published Author, Skilled player (1301)
Joined: 12/21/2004
Posts: 2687
Cruizer wrote:
...how the? How did you get that damn fast?!
If Sonic lands at the exact point where a somewhat-steep downhill slope meets flat ground, he'll gain a good amount of speed, and if he jumps off he'll gain even more speed and (if he was traveling fast enough and the slope is steep enough but not too steep) he'll immediately land on the slope again. So he can repeatedly jump and land all the way down the slope, gaining speed each time. Normally each speed gain only lasts for 1 frame, but by holding backwards the whole time they stay in effect and stack together.
Cruizer wrote:
Also what happens if the speed wraps around to -32768?
What I'm calling speed is perhaps more accurately called "potential horizontal velocity" and it takes effect whenever Sonic's feet are on the ground. So when it wraps around, Sonic suddenly shoots backwards at top speed. It might be possible to take advantage of this by doing the trick on a slope that's going the wrong way and then overflowing the speed to switch directions. Thankfully, the camera never has trouble keeping up with Sonic no matter how fast he goes in this game. Also, it doesn't seem to be possible to get inside things and zip through them in this game... they must have upgraded how the collision works quite a bit.
Emulator Coder, Experienced Forum User, Published Author, Skilled player (1301)
Joined: 12/21/2004
Posts: 2687
Cruizer wrote:
Daaaamn... You totally blitzed Leaf Storm 2. I can't find -any- faults with it at all....with either of them :x
Actually that Leaf Storm 2 was pretty sloppy. I cut another 2 seconds off of it with a second pass of optimization. Then I found a ridiculous speed trick that saves about 8 more seconds (so act 2 is down to 0:39:87 now and I think it can go lower). EDIT: Here is what that act looks like now if you don't mind being spoiled about it. Keep in mind that the second half is not optimized and that you might find it confusing. This time I've hit the real speed limit: there is one point where Sonic's speed would have overflowed and wrapped around (32767 to -32768) if I had tried to go any faster. For reference, rushing speed is 3072, it's normally impossible to exceed 3840 speed for more than a frame, I can reach at most 4320 on flat ground, and 32767 is about 30 screenfuls per second.
TakaM wrote:
Does the game still freeze up in the next set of levels?
I'm pretty sure it doesn't anymore. I have no idea how to optimize the Leaf Storm boss. It seems like how long that battle takes is completely random. (I really hated that boss in normal play too.)
Emulator Coder, Experienced Forum User, Published Author, Skilled player (1301)
Joined: 12/21/2004
Posts: 2687
MUGG wrote:
while true do
  local x = memory.readwordunsigned(0x0204A7CE) + memory.readwordunsigned(0x020BB6B1)
  gui.text(20,55,string.format("X-Co.: %.03f", x))
  
  emu.frameadvance()
end
"5: attempt to call field 'frameadvance' (a nil value)"
I guess this means you are running the wrong version of DeSmuME. That script works for me in version 0.9.5.
MUGG wrote:
gui.register(function()
  local x = memory.readwordunsigned(0x0204A7CE) + memory.readwordunsigned(0x020BB6B1)
  gui.text(20,55,string.format("X-Co.: %.03f", x))
end)
"script returned but is still running registered functions" Help is appreciated, thanks in advance..
It is supposed to print that message. This script also works for me in 0.9.5. I would expect it to work in 0.9.4+ too but I think most of the Lua stuff was a lot more incomplete in that version (at least it was the last time I tried it) so I'm not sure. I see both scripts draw something like "X-Co.: 66753.000" on the bottom screen.
Emulator Coder, Experienced Forum User, Published Author, Skilled player (1301)
Joined: 12/21/2004
Posts: 2687
adelikat wrote:
Kuwaga wrote:
That is if switching from append to regular write/rewrite would work by entering a shortcut.
I think the logical choice would be to have the read-only toggle hotkey toggle between all the modes.
But that would mean we have to press the read-only toggle hotkey twice as many times to get the same result as before, and it's one of the most-pressed hotkeys. Also, I should point out that none of the proposed modes provide the same functionality as the original 2-player recording multitracking implementations did. The main thing that enabled was making it possible to overwrite a certain set of buttons and leave other buttons alone, which this doesn't do except in the most painstaking way of manual inversion. The most general-purpose way to do it would be if you made it possible for each of the four modes to be assigned per button (e.g. A is in record mode, B is in playback mode, Start is in add mode, Select is in invert mode, etc.), and had a way to switch between already-configured sets of button recording settings with a hotkey.
Emulator Coder, Experienced Forum User, Published Author, Skilled player (1301)
Joined: 12/21/2004
Posts: 2687
gui.register(function()
  local x = memory.readwordunsigned(0x0204A7CE) + memory.readwordunsigned(0x020BB6B1)
  gui.text(20,55,string.format("X-Co.: %.03f", x))
end)
That's going to put it somewhere near the top-left corner of the bottom screen, by the way. (0,0) is the top-left corner of the bottom screen, (0,-192) is the top-left corner of the top screen, and (256,192) is the bottom-right corner of the bottom screen.
Emulator Coder, Experienced Forum User, Published Author, Skilled player (1301)
Joined: 12/21/2004
Posts: 2687
Actually the first way should work in desmume too even if it's not always the recommended way:
while true do
    blabla
    emu.frameadvance()
end
We have been trying to replace the emulator name with "emu" in these cases across multiple emulators because it's kind of pointless to have to change it to match each specific emulator.
Emulator Coder, Experienced Forum User, Published Author, Skilled player (1301)
Joined: 12/21/2004
Posts: 2687
Both Gens10a (and later Gens versions) and FCEUX store the movie input in the savestate. Just because you're unable to figure out how to use it to recover a movie file you deleted from the savestate alone (which is not the intended purpose of storing the input there) doesn't mean it's not storing the input there.
Emulator Coder, Experienced Forum User, Published Author, Skilled player (1301)
Joined: 12/21/2004
Posts: 2687
Sm4sho, I might have a fix for your problem: go into the 3D Settings dialog in DeSmuME and change the Renderer to "SoftRasterizer". Sometimes that setting will change itself to "None" if it was previously set to "OpenGL" and it doesn't like your video card, which disables all 3D graphics. Also, www.desmume.com is just some random site about a really old version of DeSmuME. Don't pay attention to anything there. The official site is desmume.org. Also also, I'll add another request for The World Ends With You, and I believe it works correctly in 0.9.5. (EDIT: I've gotten as far as day 2, at least. It always used to crash well before that.)
Emulator Coder, Experienced Forum User, Published Author, Skilled player (1301)
Joined: 12/21/2004
Posts: 2687
klmz wrote:
Fortunately, VBA is (AFAIK) the only emulator that stores complete movie-input data inside savestates.
I think all of the re-recording emulators do that nowadays.
Emulator Coder, Experienced Forum User, Published Author, Skilled player (1301)
Joined: 12/21/2004
Posts: 2687
TRT wrote:
I've noticed in some games, the sound zooms ahead of whatever is going on onscreen. It seems like the sound does not synch with the remaining lag that exists on the emulator.
You mean like in the NSMB intro? It's a known issue that certain situations still lag when they shouldn't. I think the sound issue is just tangential. What the sound does there is probably what it would normally do if the game were to ever lag that much. Back when the world map was always lagging, the music was playing too fast there relative to the rest of the game too. Unfortunately, it's not easy to get the timing right to eliminate this lag, because it's not clear which one of the zillion things the DS is doing that's too slow here. But maybe there could be a 0.9.5+ with a lag-reduction hack to tide people over.
Emulator Coder, Experienced Forum User, Published Author, Skilled player (1301)
Joined: 12/21/2004
Posts: 2687
bombman wrote:
when angel island act 2 started why did you come to a full stop at the spikes past the starpost instead of rolling under them while charging for the spindash
Because it's impossible for Sonic to roll under them. (Unless you know of some amazing new trick that I'm unaware of.)
Emulator Coder, Experienced Forum User, Published Author, Skilled player (1301)
Joined: 12/21/2004
Posts: 2687
Mothrayas wrote:
I just made this run of Grey's intro stage. The (lengthy) intro cutscene apparently can't be skipped with clear SRAM. Maybe it can be skipped by letting it play for 1 frame, soft-reset (L+R+Start+Select) and skip it that way, but my keyboard doesn't like 5 keys pressed at once.
You can use autohold for that. (Hold down the autohold hotkey and press and release each of those buttons one at a time, then release the autohold hotkey, then frame advance once, then press the clear-autohold hoykey and keep going as normal.) But, you can't skip this cutscene that way anyway.
Emulator Coder, Experienced Forum User, Published Author, Skilled player (1301)
Joined: 12/21/2004
Posts: 2687
klmz wrote:
klmz wrote:
OpenGL starts out faster than SoftRasterizer, but gets slower than it in a few minutes. Is there a bug?
This still happens to me with v0.9.5 :(
OpenGL is faster in some places and slower in others, so it's probably not a bug. Also, it has been mostly abandoned at this point so I suggest using the SoftRasterizer.
Mothrayas wrote:
It's probably just me, but I (still) can't get MMZXA to work with sprites.
Using which version and port, specifically? I think you're probably accidentally running an older version. (EDIT: either that or your 3D settings are set to use the "None" renderer, in which case you should change it to "SoftRasterizer")
Emulator Coder, Experienced Forum User, Published Author, Skilled player (1301)
Joined: 12/21/2004
Posts: 2687
mmbossman wrote:
Figured I'd post this here, so whoever cares can relate it to the DeSmuME community: the OS X port does not appear to actually be a Universal binary...
There's no universal OS X binary for 0.9.5, and I'm not sure if there will be one (since it was switched to the GTK port and there's currently no Mac programmer who works on DeSmuME). You might have to run the Windows port in a VM on that setup.
Emulator Coder, Experienced Forum User, Published Author, Skilled player (1301)
Joined: 12/21/2004
Posts: 2687
Well, I think you're right, its RNG (or whatever it's controlling random-seeming gameplay events with) is probably only frame-based. I was just pointing out that the game unintentionally has a secondary "RNG" which is more random than the real RNG and used more often. It's not really correct to call it a RNG because it was not programmed with the intent of generating random numbers, and it's confusing to call it a RNG outside of this context because it already has a more accurate name, but (all that aside) it acts like a RNG from the point of view of someone TASing the game. (Speaking of which, I believe some games have multiple actual RNGs which are used for different purposes and can be manipulated separately.)
Emulator Coder, Experienced Forum User, Published Author, Skilled player (1301)
Joined: 12/21/2004
Posts: 2687
Flygon wrote:
May I also point out that some games (Such as Sonic 3 and Knuckles and Mr. Chins Gourmet Paradise) don't even have an input based random number generator, it is simply based on how many frames have passed. The only way to manipulate luck is to either pause or wait.
Although one can argue that Sonic 3 and Knuckles does have an input-based random number generator called the "subpixel position". While its main purpose is obviously not to generate random numbers (it's simply the fractional component of the player's position), player input does change it in ways that can't easily be predicted, and its value has the effect of making things "randomly" happen or not happen (with no visible diference beforehand). So when playing or TASing that game you basically have to treat it like a random number generator. Which is to say, if you're playing normally then you ignore it and hope for good luck, or if you're TASing, you intentionally do certain otherwise-useless things to alter its value so that you are able to do certain tricks, and redo them over and over if you didn't get a value that's good enough to let you do the trick. Like luck manipulation in other games, it is not necessary to fully understand how it works in order to get good results out of it, but knowing how to watch the precise value in question gives you the advantage that you can avoid wasting time redoing things that don't change the value.
Post subject: Re: DeSmuME 0.9.5 is released!
Emulator Coder, Experienced Forum User, Published Author, Skilled player (1301)
Joined: 12/21/2004
Posts: 2687
gocha wrote:
Christmas is getting nearer and still haven’t found any gift ideas? Don’t worry anymore, here’s the perfect present : a new DeSmuME release! 0.9.5 introduces an entirely rewritten main emulation loop This totally changes the timing, and totally breaks old savestates. The OSX build is now based on the GTK port which is more up-to-date. Assorted Highlights:
  • synchronous SPU mode to fix streaming sounds
  • win32: lua engine, path configuration, 7z dearchiving support
If you want to know more, you can read the complete press release. ( Quoted from http://desmume.org/2009/11/27/desmume-0-9-5-released/ )
Also, this new DeSmuME version changes a lot of things, too many to put in the changelist. But in case somebody is wondering what's changed from a TASing perspective, here are a few more highlights:
  • many desync fixes
  • better game compatibility (for example, Mega Man ZX Advent and The World Ends With You are working properly now, among others)
  • different timing (some things got faster and others got slower, in order to improve compatibility, but it is less laggy on average than before)
Emulator Coder, Experienced Forum User, Published Author, Skilled player (1301)
Joined: 12/21/2004
Posts: 2687
I got the first level time down to 0:27:94 (avi / dsm for 0.9.5). I'm not aware of any way to improve on that time, but I might be overlooking something. EDIT: Also, 0:49:03 for 1-2 (avi / dsm).
Emulator Coder, Experienced Forum User, Published Author, Skilled player (1301)
Joined: 12/21/2004
Posts: 2687
It gets quite chaotic, just not anywhere near the start. It takes way more than a few minutes for that to happen (unless you're seriously speedrunning it). The graphics are pretty bad though. I've convinced myself not to care when a game has bad graphics, although I still wonder why in the world someone wouldn't put more effort into that aspect of their game.
Emulator Coder, Experienced Forum User, Published Author, Skilled player (1301)
Joined: 12/21/2004
Posts: 2687
I get the impression that the above script is supposed to contain a call to memory.readbyte somewhere in it... Otherwise it is just comparing two constants endlessly.
Emulator Coder, Experienced Forum User, Published Author, Skilled player (1301)
Joined: 12/21/2004
Posts: 2687
One mistake I noticed about the movie file: the author metadata says "nitsuja & Upthorn S3&K v4" although it should say v5 and list another author. Maybe nobody else reads that stuff, though... EDIT: oops, I was looking at the wrong file, disregard that.
mklip2001 wrote:
I never really knew why the run changed shield types as much as it did (especially when some of the shields take time to obtain from the end-of-level signposts), but I presume there are good reasons for these shield changes.
The timer isn't running in-between levels, so they are taken then if doing so saves even a little in-game time later. But as far as I can remember, every shield switch saves a significant amount of time... the abilities they grant are simply that useful.
Emulator Coder, Experienced Forum User, Published Author, Skilled player (1301)
Joined: 12/21/2004
Posts: 2687
So he's just complaining about not being able to load savestates that he made from earlier when he was playing on a non-rerecording version of VBA? Of course that doesn't work... Well, ok, it could be handled better but he's talking about a use case that wasn't even considered before and I'm still not sure we care about it.
PikachuMan wrote:
But now the default for the Escape key is save slot 9
Now that's an annoying bug. I wonder how that happened.
Emulator Coder, Experienced Forum User, Published Author, Skilled player (1301)
Joined: 12/21/2004
Posts: 2687
Yeah, there is no need to decompile flash games or anything else to add TASing features. Modifying the .exe is not how it works. Also, even if .swf could not be converted to .exe, it should be possible to TAS a Flash Player instead. (EDIT: I'm not saying it works already. It certainly doesn't. I'm saying that I don't see any reason why it couldn't work after further development is done.)