Skilled player (1738)
Joined: 9/17/2009
Posts: 4980
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
Toothache wrote:
Liking the new WIP, gives me incentive to go to the GB version and work on that again :-)
Goodluck! I tried the first stage, and promptly gave up due to the severe lag + delayed controls making optimization a nightmare. :o
Skilled player (1738)
Joined: 9/17/2009
Posts: 4980
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
So....I kinda forgotten this existed until I browsed some old files, and feel sorry for not finishing. Here's part of the next level: http://tasvideos.org/userfiles/info/22491294617003959 Also a correction, only 7 enemies appear at once, and after player HP (0x04E8) the next 3 are apparently bullets. Turning them to higher values correspond to bullet you shot and damaged done by said bullets. Changing, 0438, 043B, 043D,etc to FF cause the enemies to walk in place. 0 cases them to run. Probably NPC IDs? Edit: Stage 4 done. Edit 2: Link to video I have no clue why this happens, nor why it exploded at the 8th hit. Speaking of which, after lots of trail and error, I managed to get all 12 hits on that egg and only wasted around 2-6 frames.
Active player (476)
Joined: 2/1/2014
Posts: 928
Skilled player (1738)
Joined: 9/17/2009
Posts: 4980
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
http://tasvideos.org/userfiles/info/22539824602705530 Ship level done. Turns out obtaining 11 eggs via glitch then getting the last one using another egg is faster since it makes all subsequent eggs into cards. Only 1 card ended up being in the way without costing frames. Oh, and it turned out I can't jump over bolts, so I was forced to heal to stay alive. I technically could've not taken the ammo at the end of the previous stage to maintain health, but I need silver bullets for their ability to pierce eggs and enemies. In case anyone wonders why I don't just abuse multiple bullets instead of silver, its because they cause lag; normally it has no effect (check the input file during lag frames, its 17 frames difference between jumps even during lag) but lag "duplicates" input; while it can make me shoot 2 bullets immediately, it also means if it occurs right after pressing "A", I would jump higher and land 1-2 frames later. Edit; I can't seem to repeat the glitch in this spot. Odd. I'm not sure what caused the glitch, but it seems if I frozed 03E5 during the ship level, the egg never vanishes.
Skilled player (1738)
Joined: 9/17/2009
Posts: 4980
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
http://tasvideos.org/userfiles/info/22664661458798568 Posting an incomplete stage right now since I'm kinda demotivated since if the egg duping glitch can be repeated on this stage, no more backtracking is needed. Can someone please help find the cause?
Site Admin, Skilled player (1251)
Joined: 4/17/2010
Posts: 11475
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
Is it present in the previous movie you posted? If so, tell when it happens there, and when you need it to happen in the latest one.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Skilled player (1738)
Joined: 9/17/2009
Posts: 4980
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
feos wrote:
Is it present in the previous movie you posted? If so, tell when it happens there, and when you need it to happen in the latest one.
It's in the last 2 WIPs I posted. The dupe starts at frame 51966, and if it can be repeated at any spot outdoors at the next stage, you can skip entering the south building and instead go to the raptor enclosure located right above the player at start. Link to video Here's an encode of the glitch for that particular screen. Incidentally the only place I could do it for some reason.
Site Admin, Skilled player (1251)
Joined: 4/17/2010
Posts: 11475
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
Wow. Looks like it could help in previous levels too, huh? Anyway, to get into this easier, I need all your RAM addresses.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Skilled player (1738)
Joined: 9/17/2009
Posts: 4980
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
http://tasvideos.org/Addresses-84.html 04E9,04EA,04EB are bullet types fired 0438, 043B, 043D and likely others seems to be NP?C ids Enemy hps are 04EC - 04F9 (1 byte unsigned) Freezing the value of 03E5 during that part of the level causes the egg to never go away (even if walked into) but I have no clue why only that egg. Standing, then firing causes the egg to die sooner. The current stage benefits the most from this glitch due to mass backtracking compared to others. But yes, it should save time if it can be done on all stages.
Active player (279)
Joined: 4/30/2009
Posts: 791
GB version also has an egg dupe, although it's pulled off in a different way, you have to destroy the egg just as it's offscreen then scroll back in on a specific frame and it reappears. I'm pretty sure this same sort of issue is what can cause the T-Rex to disappear completely in that fight, although I only pulled it off once on a real cart and haven't managed it in a TAS yet.
Site Admin, Skilled player (1251)
Joined: 4/17/2010
Posts: 11475
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
While I'm reversing the objects, do you have a movie where that particular egg from 51966 doesn't duplicate?
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Skilled player (1738)
Joined: 9/17/2009
Posts: 4980
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
feos wrote:
While I'm reversing the objects, do you have a movie where that particular egg from 51966 doesn't duplicate?
http://tasvideos.org/userfiles/info/22712033439594178 Oddly took more than 1 shot (but less than if constantly moving) Walking to it instantly destroys it, and in the case you meant 1 hit == destroyed use this instead http://tasvideos.org/userfiles/info/22712072057914286
Site Admin, Skilled player (1251)
Joined: 4/17/2010
Posts: 11475
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
Download JP.lua
Language: lua

function stuff() camX = memory.readwordsigned(0x7b,0x7c) camY = memory.readwordsigned(0x7d,0x7e) youX = memory.readword(0xab,0xbd) youY = memory.readword(0xcf,0xe1) gui.text(100,1,string.format("X: %d\nY: %d",youX,youY)) for i=0,18 do id = memory.readbyte(0x3da+i) hp = memory.readbytesigned(0x47c+i) x = memory.readword(0xab+i,0xbd+i)-camX-40 y = memory.readword(0xcf+i,0xe1+i)-camY-40 if id>0 then gui.text(x,y,string.format("%d\n%X",i,id)) end end end emu.registerafter(stuff)
The level starts with that egg object spawning in slot 11. When you destroy it, it instantly respawns in slot 4 at the same place. If you despawn the egg by walking down a bit and then respawn it by walking up again, it is in slot 4 now, and you can still dup it. But if you go down so much that an enemy spawns in slot 4, even if you kill that enemy before destroying the egg, it won't dub anymore. This is what happens. Why - will see tomorrow.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Skilled player (1738)
Joined: 9/17/2009
Posts: 4980
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
Thanks very much! One thing I noticed while messing around is that right before an egg blows up, its id is 47 on your script. For some reason the glitched egg stays at that id when it respawns. One time it managed to spawn at slot 5 and still worked.
Site Admin, Skilled player (1251)
Joined: 4/17/2010
Posts: 11475
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
More observations. As we can see, a normal egg has ID 26->47->48 per destruction. 48 seems to stand for explosion animation. Those eggs that duplicate don't have an explosion. It's because in the code, it's checked what value $F5 is, and during all the game, it's 0, 0x56, or 0x64. But on that single little screen, 0x66 is written there, several times. And by the looks of it, it's related to fish spawn, that appear as you walk near them. Walking down over there spawns other enemies, and fishes don't jump. But whenever $F5 == 0x66, eggs duplicate. Unfortunately, during the whole game, $F5 is still 0, 0x56, or 0x64, and both latter numbers get checked away per egg destruction.
Language: asm

02:B304:A5 F5 LDA $00F5 = #$00 ; read from $F5 02:B306:F0 0B BEQ $B313 ; if zero, branch to $B313 02:B308:B9 9F B3 LDA $B39F,Y @ $B3BD = #$66 ; read from ROM by offset 02:B30B:30 26 BMI $B333 ; if minus, branch to $B333 02:B30D:C5 F5 CMP $00F5 = #$00 ; compare $F5 to #$66 02:B30F:F0 20 BEQ $B331 ; if equal, branch to $B331 02:B311:D0 2A BNE $B33D ; otherwise, branch to $B33D 02:B313:B9 9F B3 LDA $B39F,Y @ $B3BD = #$66 ; read from ROM by offset (again) 02:B316:10 02 BPL $B31A ; if plus, branch to $B31A and write #$66 to $F5 02:B318:A9 56 LDA #$56 ; otherwise, write #$56 there 02:B31A:85 F5 STA $00F5 = #$00 02:B31C:4C 31 B3 JMP $B331 ; go to end [...] 02:B331:18 CLC 02:B332:60 RTS ---------------------- ; good bye 02:B333:A5 F5 LDA $00F5 = #$66 ; read $F5 once again 02:B335:C9 56 CMP #$56 ; if #$56, go to end 02:B337:F0 F8 BEQ $B331 02:B339:C9 64 CMP #$64 ; if #$64, go to end 02:B33B:F0 F4 BEQ $B331 02:B33D:20 38 81 JSR $8138 ; otherwise, go to $8138 ; and there, we see: 02:8138:A9 00 LDA #$00 ; take 0 02:813A:9D DA 03 STA ID,X @ $03DF = #$47 ; write to ID instead of 48! 02:813D:BC B2 04 LDY $04B2,X @ $04B7 = #$0D 02:8140:30 02 BMI $8144 02:8142:91 65 STA ($65),Y @ $7D2A = #$00 02:8144:60 RTS -----------------------------------------
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Skilled player (1738)
Joined: 9/17/2009
Posts: 4980
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
Well, that's rather unforunate. Thanks for the effort though! Also, I'm kinda stuck on a room due to intense lag. I think I need to redo/edit the last 2 stages to preserve silver ammo. Edit: Saving some ammo and somehow on the way to the building with the main frames I lost 5 frames. Also killing things at a different time and letting others live affect future building NPCs as long as you don't leave. Edit2: Wasted 19+ frames by the end of 1 stage. I think continuing now and leave it as a potential improvement would make more sense.