Posts for GoldFibre

Experienced Forum User
Joined: 4/6/2013
Posts: 9
Yes. I rarely watch runs through to the end, especially if I've never played the game, but this one was entertaining the entire time.
Experienced Forum User
Joined: 4/6/2013
Posts: 9
I'm not seeing this counter for the floors anywhere. What RAM address are you guys looking at?
Experienced Forum User
Joined: 4/6/2013
Posts: 9
Another time-saver over the previous run: It take 761 frames to play out the bombardment sequence vs about 580 for the sliding trick to skip the sequence. There is also encounter manipulation that should further save some frames. This could also be used for the tank sequence underground, but there are three tiles and each one is so short that it would take longer to do the reset. The current run does a reset on the way to that very sequence to switch up the encounters, so it could probably be done at one of those tiles instead and save a few seconds as well. If Tellah was never picked up, the zero-stat Tellah that joins in Mystidia never goes away and doesn't count as Tellah for the automated battles he needs to fight. This makes him hog a slot which keeps you from getting Yang in Baron and probably screws up other character joins as well. Tellah is more useful than Kain early on, so ideally one would keep the first Tellah all the way to Golbez. That would require finding a way past Mt Hobs and also completing the game without the Hovercraft. It also might make Yang join as a zero-stat character which would create the same problem as the zero-stat Tellah. Another thing is that X teleporting works across world maps or even inside a dungeon from a save spot, but I'm not sure where that would be of any use yet.
Experienced Forum User
Joined: 4/6/2013
Posts: 9
There is one definite time saver over the previous run here. If you skip the earthquake and re-enter the Mist village from the right you can grab Rydia's gear and then trigger the earthquake sequence. This would remove Kain from the party and allow you to play normally except with some high-level gear. If however, you keep Kain, Tellah does not appear, which means you can't get Edward or the hovercraft. You can use the X teleport to get to the Antlion cave and even fight him with whatever party you have. The nice thing about Kain is that he doesn't trigger Antlion's counterattack with his jump. You get the Sand Ruby, but without the hovercraft there is no way to get back to Kaipo and wake Rosa. You can get to Mt Hobs with the X teleport, but without Rosa in your party there isn't a way to get rid of the ice. I don't see a way to get past Mt Hobs with the teleport using lsnes, but by RAM poking I did that to see how things would work. First of all, if you go back and try to get Yang from the other side, the game crashes. If you progress to Fabul, all the cutscenes play out and you get to defend against Baron, except with only Kain and Cecil. After the boat crash you still have Kain and can get Palom and Porom in your party, but when Tellah joins he is just a copy of DK Cecil with 0 hp, presumably because it read his data from where he left off after his fight with Edward, which is empty. This is as far as I've gotten, but I'm hoping that once you get the airship you can go back and trigger any events you need to complete the story.
Experienced Forum User
Joined: 4/6/2013
Posts: 9
After further investigation, the X coordinate teleport is definitely feasible using the mid-frame reset. The real question is how to have the right party members and flags set to advance the story. It's possible to teleport to the dark elf cave right after the earthquake, but even if you talk to Edward and get the Twinharp, the game won't let you fight the dark elf. Even if you could fight him, when you get back you wouldn't have an airship to use to advance the story. Other story points like returning to Baron also require specific conditions to advance. Using mid-frame resets we could manipulate party members a bit. If for instance, you kept Kain past the earthquake, but needed to get rid of him before Mt Hobs, you could save, move him to a different slot so that his previous slot was empty, and then save with a mid-frame reset ending right after the character flag. This would take him out of the party, and potentially let you advance the story. Using that method you could also give better stats to the party members you kept, or even duplicate party members so you could have three DK Cecils at Octomamm. This is still just theory though, so I'm going to keep checking this out and see what's possible.
Experienced Forum User
Joined: 4/6/2013
Posts: 9
pirohiko wrote:
You can get over an obstacle when you reset it between X and Y when you do overwrite of the SRAM. But prior adjustment is necessary because there is check sum. The check sum is 2 bytes, but gets off with only adjustment for 1 byte if even a central character agrees. If a central character does not agree, it never succeeds. If Cecil in the fight with Zeromus is not Paradin, he does not revive.
Oh I just read this a little more closely and it seems my complete save flag idea was off. Do you know anything about what affects the checksum or how it is calculated?
Experienced Forum User
Joined: 4/6/2013
Posts: 9
I've been messing around with mid-frame resets in lsnes with this game. The idea was to shift my map location horizontally by resetting right after the map's X position was written to in the save slot. Unfortunately it isn't working out. There is a mid-frame reset that has the data written to the X value and not the Y value, but after the reset the save slot appears as a new game and clears all data when you select it. The exact number of cycles varies depending on the situation, but there are three phases to mid-frame resets during a save frame: 1-X : No data is being written into the save slot, and after the reset the save is the same. X-Y : Data is being written into the save slot, but after the reset the slot appears as a new game. Y-Z : The data has been fully written, and the save slot has the complete new data. I suspect the game has a 'completed save' flag that if not triggered will treat any incomplete save as a new game. There might be a way to get corrupted data with the mid-frame resets, but my vanilla experiments haven't produced anything yet.
Post subject: Re: lsnes loading savestate through lua script
Experienced Forum User
Joined: 4/6/2013
Posts: 9
Ilari wrote:
exec("save-state foo.lsmv") -- That should save state as soon as possible. exec("load-state foo.lsmv") -- Load a state.
That's a lot simpler than what I was doing. Thanks!
Post subject: lsnes loading savestate through lua script
Experienced Forum User
Joined: 4/6/2013
Posts: 9
I'm trying to write a script that repeatedly loads a savestate in lsnes and tries different inputs. The savestate seems to save in an array, but I can't get it to load back properly. This is an outline of what I have right now:
on_post_load = function ()
    savestate = memory.mapbyte()
end

on_frame = function ()
    --Try some stuff and record results
    if framecount == 3 then
        memory.writeregion(0, 0x7FFFFF, savestate)
    end
end
Is there a better way to do this or am I just missing something simple like the memory size? Thanks!