Reviewer, Active player (287)
Joined: 12/14/2006
Posts: 717
Thanks, man. To be honest, I wasn't expecting to hear from you since you haven't posted in so long. Working through the second stage, I'm already having a much larger time save. Haven't found any new techniques yet. There are a few places where I wish I could find a way to glitch into the wall to save time, but no luck on that yet.
Editor, Experienced player (931)
Joined: 7/20/2011
Posts: 345
So... I was able to save 1 frame using the trick I mentioned in the last post... I think? I get to the ladder 1 frame earlier and this sounded good, I just deleted a frame and everything should sync back up right? Well the enemy we jump over a few seconds later had other ideas. It seems like that 1 frame causes his AI to change slightly and he always jumps right when it's inconvenient. But at any rate, it shows off the bed springing trick I talked about before. If you want to take a look and see if you can convert the extra frame, or even save more somewhere, that's here (I still get hit by the enemy in this version): http://tasvideos.org/userfiles/info/47238186787493830
Current thoughts: Hachiemon (J) for GBA.
Reviewer, Active player (287)
Joined: 12/14/2006
Posts: 717
Thanks for the help. Because of that movie I was able to make my level 1 one frame faster, and thankfully level 2 still synced. (This feels so good after coming from a game where making a change in the middle of your run meant restarting from that point because all input afterward was useless). Here's a WIP through the second act. http://tasvideos.org/userfiles/info/47241839483906901 Please keep helping. It seems I'm better at implementation than I am at trick finding.
Editor, Experienced player (931)
Joined: 7/20/2011
Posts: 345
Just want to point out that there's a double drill (allows 2 successive drills in the air) shortly after the ladder at frame 4342. I think I remember testing this briefly because you can skip one of the wheels in the final segment, but unfortunately the other one was too high to skip and it ended up being slightly slower overall. I think it's still worth looking into though, perhaps it can have use somewhere before that part? Anyway, nice improvements.
Current thoughts: Hachiemon (J) for GBA.
Reviewer, Active player (287)
Joined: 12/14/2006
Posts: 717
Maybe.. The time it takes to get it though.. The clown to the right of the ladder is jumping at exactly the right time to prevent me from being able to just jump to the powerup without drilling to it. Slowing down a couple of frames didn't help either. Yeah, I couldn't manage to get the second gear skip either. Couldn't even double drill to get over that last gear we had to grab onto. If either of those are possible, it would be a lot cooler. The way it is now, it does still end up being slower.
Reviewer, Active player (287)
Joined: 12/14/2006
Posts: 717
Man. I'm working on stage 3, and managed to do quite a few things faster. It was looking like a good amount of saving, but the bells took almost all of it away. I am a few frames faster than Exo's stage three past the first set of bells since I'm passing that second bell on the first frame possible when running at max speed. Exo didn't have to slow down at all to get past the bell. Thus he passed it a little later than the last safe frame. Looks like the bells are on a level timer rather than being completely random. Seems that way based off the pattern I got when I ran past them. Just double checked. After the bells, I'm two frames faster. Before the bells I was 12. (I made a Frankenstein movie with Exo's level 3 and my levels 1 and 2).
Reviewer, Active player (287)
Joined: 12/14/2006
Posts: 717
http://tasvideos.org/userfiles/info/47315411619557208 Those bell cycles are incredibly annoying. They tend to take away all your gains. I have minor optimizations that all came to nothing. Still in the end, it's one frame faster on Act 3 than Exonym's WIP. Good job on your WIPs, Exonym. The entire thing was really hard to beat. When I get my computer back home to my own internet and not a mobile hotspot, I'll post a video in the WIP thread and see if anybody bites.
Reviewer, Active player (287)
Joined: 12/14/2006
Posts: 717
http://tasvideos.org/userfiles/info/47365361265872192 Okay, I was going to wait until I finished Boardin' Zone to post the next WIP, but this is really bugging me. Can anyone explain why that mine dropping bastard at the end of the second level doesn't show up at all in Exonym's WIP? I lose so much time jumping over those bombs.
Editor, Experienced player (931)
Joined: 7/20/2011
Posts: 345
I'll probably have to take another look but it had something to do with when you jump off that ramp, I think you fly over his trigger or something.
Current thoughts: Hachiemon (J) for GBA.
Reviewer, Active player (287)
Joined: 12/14/2006
Posts: 717
Goddamn, that trick was precise. How did you even find it?
Editor, Player (69)
Joined: 6/22/2005
Posts: 1050
It looks like enemy data is stored starting at around 0x2F0A in RAM, with offset +0 being the X-position, +4 being the Y-position, +0x0E being the spawn X-position, and +0x12 being the spawn Y-position. Each enemy seems to have 0x76 bytes allotted to it. The following script labels the enemy with its slot in the array/list/table/whatever you want to call it.
Language: lua

local camera_x, camera_y memory.usememorydomain("68K RAM") function draw_aero_position() local aero_x = memory.read_u16_be(0x0176) local aero_y = memory.read_u16_be(0x017A) gui.drawRectangle(aero_x - camera_x, aero_y - camera_y, 2, 2) end function draw_enemy_positions() for i = 0, 9 do -- 9 was chosen arbitrarily, highest number I saw in-game was 4 local enemy_x = memory.read_u16_be(0x2F0A + 0x76 * i) local enemy_y = memory.read_u16_be(0x2F0A + 4 + 0x76 * i) gui.drawRectangle(enemy_x - camera_x, enemy_y - camera_y, 2, 2) gui.drawText(enemy_x - camera_x, enemy_y - camera_y, bizstring.hex(i)) end end while true do camera_x = bit.band(0 - memory.read_u16_be(0xD114), 0xFFFF) -- Done because the 0xD114 values start at 0 and decrease going to the right camera_y = memory.read_u16_be(0xD074) gui.drawText(16, 16, bizstring.hex(camera_x)) gui.drawText(16, 32, bizstring.hex(camera_y)) draw_aero_position() draw_enemy_positions() emu.frameadvance() end
Using that information, I found that the spawn positions in the ROM file start at 0x1183C8 for the first stage, with +0 being the X-position and +2 being the Y-position. The data seems to be 0x2A bytes apart. This may be helpful for finding the spawn criteria, but IDK Genesis assembly to go further.
Current Projects: TAS: Wizards & Warriors III.
Editor, Experienced player (931)
Joined: 7/20/2011
Posts: 345
Finding the spawn triggers would be really helpful, as there's another one of those guys in the third boarding zone stage. I wasn't able to find a way to skip that one, but perhaps some precise maneuvers, aided by finding where exactly he spawns in at, could prevent him from spawning also. And I think it was just random luck that I found that. I didn't specifically try to do it, just one of my attempts through the stage made him disappear so I saved that file and then worked around it. That's how I remember it anyway.
Current thoughts: Hachiemon (J) for GBA.
Reviewer, Active player (287)
Joined: 12/14/2006
Posts: 717
I agree that would be really useful.. If we were able to find the right data, would it be possible to draw boxes around the spawn triggers of different enemies?
Player (98)
Joined: 12/12/2013
Posts: 378
Location: Russia
Enemies spawn is handled by tracing map by scroll position at steps 16x16. This means, that if scroll position is changing 16x16 cell by crossing its border, then appropriate callback is called. If scroll position cross vertical border of the cell from left to the right, then it will call right border callback. All other callbacks works similarly. Each callback does lookup in tree structure of enemies. Lets call it "vertical callback" if it's triggered when scroll position have crossed horizontal border of cell, and call it "horizontal callback" if it's triggered when scroll position have crossed vertical border. So, following picture:
|-V-|
|   |
H   H
|   |
|-V-|
V - vertical callbacks, H - horizontal callbacks. There are two trees of enemies. One is for vertical callbacks, another is for horizontal callbacks. For vertical callbacks, enemies sorted vertically, for horizontal callbacks enemies sorted horizontally. When horizontal callback called, it'll look for exact "new" ahead x position, and then it'll look among all y positions. Similarly, when vertical callback called, it'll look for exact "new" ahead y position, and then it'll look among all x positions. Key point here is that it looks "exact" something. It is all exciting of course, but we need to get practical results. To achieve that, after a lot of headache I did transform that ugly ahead positions into offsets from center of screen. So, instead of drawing spawning points of enemies, I'm drawing regions on screen where center of screen should lay to trigger corresponding callback. Now, a bit explanation of "what we see". Horizontal very wide green box - vertical callback if screen moves UP. Horizontal very wide red box - vertical callback if screen moves DOWN. Vertical very tall green box - horizontal callback if screen moves RIGHT. Vertical very tall red box - horizontal callback if screen moves LEFT. NOTE: it may not trigger if center of screen is inside box but 16x16 cell haven't changed. My script also draws: 1) Aero hitbox 2) Enemies hitboxes 3) Stars hitboxes Use iteration method as I do, because it's how game does. Aero hitbox a bit tricky, it depends on move. (called state in the script) Adapt it for bizhawk yourself. I'm tired. NOTE: it's for Gens-rerecording v11 NOTE 2: it will throw error "stack overflow" if it's not in level. https://pastebin.com/mgLLaCnV A bit of extra notes. Most of positions is using 4 byte fixed point arithmetic. This includes: position of aero, enemies, speed of aero. To utilize subpixels, check my donald tas script for example. Aero speed is located at: FF018E, FF0192. Sometimes is better to use calculated speed. I mean difference between positions in two consecutive frames.
Reviewer, Active player (287)
Joined: 12/14/2006
Posts: 717
Okay, I've been trying to work on this thing. I've managed to convert all the Gens functions to Bizhawk functions, so there's no error messages anymore, but now I've got a Lua script that does nothing, and I can't parse what it's supposed to be doing beyond that. https://pastebin.com/LApRL09j Any insights?
Reviewer, Active player (287)
Joined: 12/14/2006
Posts: 717
Okay, after blowing up #bizhawk, a useable script was made. https://pastebin.com/EhS6Tg3x Here's what I found by watching the movies with this activated. When the Boardin' Zone 2 mine dropper doesn't spawn, we manage to have the camera pass through the center of the vertical spawn zone, above the horizontal spawn zone, and then pass through the center of the horizontal spawn zone going down. In stage three, the first time he shows up, the camera just barely passes through the top pixel of his spawn zone. Sadly, it looks like the camera is at its top height at that point, so unless we can figure out a way to push the camera just a little bit higher, it's probably a "no" for despawning him there. As for the second time, it's probably a "no" as well, but I'll definitely play around with it. EDIT: wrong link in post. fixed link.
Player (98)
Joined: 12/12/2013
Posts: 378
Location: Russia
Drawings might be few pixels shifted, but it should show things in general.
Reviewer, Active player (287)
Joined: 12/14/2006
Posts: 717
http://tasvideos.org/userfiles/info/47430150908236888 Here's the WIP through Boardin' Zone 3. One thing I was able to do was reduce the number of jumps on water during the broken ice section. Really glad I was able to pull it off. Also, I was just one food item away on Zone 3 from triggering the bonus stage. How do I know? because my first pass did, and I had to find a way to not collect as much food. EDIT: Since people have asked for it to be posted here: Link to video My plan is to make an encode at the end of every world
Reviewer, Active player (287)
Joined: 12/14/2006
Posts: 717
http://tasvideos.org/userfiles/info/47450709174587413 Copy paste of what I put on the page: 44 frames faster than Exonym's test run in this level alone. Most of the time save came from getting a better balloon bounce at the beginning. I also determined that activating the final lever from below was faster than shooting above it.
Editor, Experienced player (931)
Joined: 7/20/2011
Posts: 345
What version of bizhawk are you using? The file says 1.11.1 but when I load that version the movie desyncs on the beginning of Bell Castle Act 3?
Current thoughts: Hachiemon (J) for GBA.
Reviewer, Active player (287)
Joined: 12/14/2006
Posts: 717
Bizhawk 2.2.2 is the version. Probably says that because I made the TAStudio project off the WIP you posted last year. It's odd, though. Your WIPs sync just fine. If anyone cares: (I half do) before I started TASing myself, I went into the metadata of the file and changed rerecords to zero, so rerecord count is accurate to my work.
Reviewer, Active player (287)
Joined: 12/14/2006
Posts: 717
http://tasvideos.org/userfiles/info/47538354941062653 Fort Redstar Act 2. Man that level was long. I'm taking a well deserved rest. This level is 53 frames faster than the Fort Redstar 2 on Exonym's test run. Mostly I just moved faster. I also fixed the metadata in the header, so now it gives the correct version of Bizhawk. Cheers.
Reviewer, Active player (287)
Joined: 12/14/2006
Posts: 717
http://tasvideos.org/userfiles/info/47611461241778537 I may do another pass of this later to clean it up. I have finally found a route that is actually faster than the route used in Exonym's test run. There may be other places to abuse this. Also, There is one place where I would love to pass through the ceiling if anyone can manage. I tried banging my head against it (or literally, banging Aero's head against it) for a couple of hours, and came out unsuccessful, but I haven't quite convinced myself it's impossible yet. The place is in Fort Redstar Act 2 after the first trampoline (around 7:15 in the video). There's a point where it looks like there's a small gap between the platform and the wall. I'm trying to squeeze Aero through that gap. If anyone manages to find a way to do that, it would be awesome. I've also just pasted Exonym's boss fight on the end of the run. He hits the guy on the first frame every time, and I like his stylistic choices during the fight, so unless I can think of something better, it stays Video: Link to video
Editor, Experienced player (931)
Joined: 7/20/2011
Posts: 345
Sorry I haven't replied lately, been a bit busy with work. I did see the encode, and the WIP looks nice so far. I promise I'll look at it more closely soon. Also, I was just thinking if someone more skilled in looking at RAM could find out where all the "secret passages" and hidden walls were, that would be a tremendous help in the game. So far there are already a few places we've used it, and I feel like there are some places that we might not know about, potentially in time saving locations. Just a thought. Anyway, good job so far! Edit: So my first thought after seeing the slope clip is that we could use the downwards drill into enemies for height in reaching some of them, but after messing around with this a bit it seems like you need pretty good horizontal momentum also. Unfortunately, we lose all of that when we drill downwards. Here's a picture of what I was trying, I'm still going to test more though:
Current thoughts: Hachiemon (J) for GBA.
Editor, Experienced player (931)
Joined: 7/20/2011
Posts: 345
Sorry to reply again to this so soon, but I was doing some experimenting, and it seems like it's the "flipping" animation that allows you to clip through the slopes. Which of course comes from having enough horizontal speed. Knowing this, I found a place to use it at about frame 26800 in your file. You need to jump right off the ladder, drill down left into the ground which immediately causes you to run and jump over the enemy. Since I had enough speed this way, I got the flipping animation and low and behold: This uses the drill to land on the slope immediately, which was used in 1 place very briefly already. Here's the quick file I made showing off this part, I didn't bother trying to sync anything afterwards cause I'm lazy! http://tasvideos.org/userfiles/info/47629314058586099 Edit: Seems like this insta landing trick can be used at around frame 28320 in your current file. Instead of drilling to the left, wait a few frames from your jump and then drill downwards, similar to the above trick. I think this should save at least a few frames.
Current thoughts: Hachiemon (J) for GBA.