















Need 1 more
Bullet barely too late
Koopas barely too early
Normally could turn them around with damage… doesn’t happen underwater
Could turn them around by being on the right side of them when they land…. They are not high up.
The goomba is…. Goombas dont turn around.
Exactly 1 enemy too late, the buzzy beetle you can turn around
Bloopers could come down and turn koopas around but blooper is too late
Actually… enemies never turn each other around when underwater
Assuming this is done so bloopers dont turn cheep cheeps around
..is what i thought. But they never turn around regardless. Why???
Could do it later but run out of time lol
Could maybe do it with earlier firebar? But it’s actually not a full double firebar….
Could maybe turn enemies around with firebar glitch but firebar isn’t next to enemies on the ground
Test if COULD turn cheep cheep around…. But cheep is too slow lol!! Out of time
Hammer bros chase you after a while….. But NOT to the right!
Earlier bowser??? How close is that. Oh… powerup slot
Midway, different bowser?
If you could keep fire from midway with the vine glitch it’s possible (apparently?)
Killing bowser turns into a fireflower that hurts you lol??

Need 1 more
Bullet barely too late
Koopas barely too early
Normally could turn them around with damage… doesn’t happen underwater
Could turn them around by being on the right side of them when they land…. They are not high up.
The goomba is…. Goombas dont turn around.
Exactly 1 enemy too late, the buzzy beetle you can turn around
Bloopers could come down and turn koopas around but blooper is too late
Actually… enemies never turn each other around when underwater
Assuming this is done so bloopers dont turn cheep cheeps around
..is what i thought. But they never turn around regardless. Why???
Could do it later but run out of time lol
Could maybe do it with earlier firebar? But it’s actually not a full double firebar….
Could maybe turn enemies around with firebar glitch but firebar isn’t next to enemies on the ground
Test if COULD turn cheep cheep around…. But cheep is too slow lol!! Out of time
Hammer bros chase you after a while….. But NOT to the right!
Earlier bowser??? How close is that. Oh… powerup slot
Midway, different bowser?
If you could keep fire from midway with the vine glitch it’s possible (apparently?)
Killing bowser turns into a fireflower that hurts you lol?? 




























DuplicateObj_Offset is 05.
inside BowserGfxHandler, we load DuplicateObj_Offset into Y, and lda Enemy_State,x sta Enemy_State,y, so now the item sprite slot's state is 20
There already appears to be an object that's an item, though it's not in slot 5. This runs PowerUpObjHandler, which runs GrowThePowerUp since the item slot state is now 20. This runs DrawPowerUp.
So the sprite in slot 3 (or perhaps another slot? I reproduced this without using the TAS, so it might've been another slot. I still needed to cheat to increase the time limit though.) is running DrawPowerUp, which uses the X and Y positions of slot 5, since that's the powerup slot. So bowser is visually replaced with a fire flower. The object ID isn't changing.







BRK do in the FDS version? I haven't looked into how the FDS works yet, but I see the BRK vector is still $FFF0. I assume that would end up somewhere in the FDS BIOS?


RTS (rather than an RTI), but it looks like that's not going to happen. (edited)












-1 though.









































































NOP instruction, or some other insignificant operand, we won't be accurately emulating the outcome.







Mirror_PPU_CTRL_REG1 would be10BPL instruction, and now we need to know the state of the CPU's negative flag.c856984567 A:58 X:DC Y:00 S:F0 P:nvUbdizC $D2AE: 99 00 02 STA $0200,Y @ $0200 = #$1858. it used to be 18 (edited)DrawSpriteObject is running with Y set to 00Y was F8, then this runs
tya ;add eight to the offset in Y to
clc ;move to the next two sprites
adc #$08
tayY overflow there and overwrite sprite zero. Anyway, this crash is not jumping to RAM or anything, so I don't think it can be exploited. I'm gonna get dinner then play around with this some more.





BPL instruction, and now we need to know the state of the CPU's negative flag. 


BCC, otherwise, BPL again. Regardless, I think we end up executing $20x4, at which point we read from the OAM buffer that FCEUX is emulating incorrectly. (edited)





































$11, that would run ORA ($0011), Y






FC from the last value OAM2, but both Mesen and Bizhawk are reading the first value of OAM2. That's probably a single line fix. Also, the fewer objects there are on the following scanline, the larger that range will be, since the OAM address will overflow sooner. (edited)























2064: 18 CLC A:20 X:00 Y:0A SP:F5 P:21 nvTbdizC Cy:859112061 PPU-Cy:19332
2066: A0 FF LDY #$FF A:20 X:00 Y:A0 SP:F5 P:A1 NvTbdizC Cy:859112063 PPU-Cy:19338
CLC isn't a 2-byte instruction, yet it seems to skip address $2065. Let me run bizhawk from visual studio with some breakpoints set. (edited)A0, an LDY #Immediate instruction.0A to A0. that was subtle.
RTI at address $2073 is due to the sprite zero hit flag being set. I highly doubt we could set the sprite overflow flag by this time, but that would let us run an RTSRTS would lead...$9136.SizeChk in PlayerCtrlRoutine. let me see what else is on the stack at this point, where will the next RTS lead?$8EFE inside GameCoreRoutine, and we have returned to the main game loop.??? instructions that bizhawk annoyingly chooses not to log. If we can control the A register through some wacky means, that crash at $8E68 could be potentially avoided.

43 B3 is SRE ($00B3, X). that instruction is guaranteed to clear the negative flag. dang. (edited)EOR results in a negative number is if A was already negative.61 b8 62 (edited)



JMP ($6C6C) would jump to $3524.
BCS $B0 to eventually make it to mirrored system RAM but I'm assuming a PPUDATA read would break that?



00 at the top, the number gets larger the lower it is. (edited)





A0 when the jump to $2064 happened in the TAS you sent me. Which is in that range, so that makes sense.




JMP ($6C6C) would jump to $3524. FF so that's useless.
















60 40 and 6C wouldn't be helpful. Kosmic made a TAS, which ended up running RTI at some point, though that eventually crashes while executing some level's tile data. (edited)








Dots 1 through 64 of a scanline will always read $FF. (Secondary OAM initialization)
Dots 65 through 256 will read from the "OAM Buffer" (OAM Evaluation)
- Odd ppu cycles set up the OAM Buffer with the value read from Primary OAM.
- Even ppu cycles write the OAM buffer to secondary OAM (even if the object isn't in range of this scanline) unless:
- The OAM Address has overflowed, in which case even ppu cycles will now read from secondary OAM.
- Secondary OAM is full, in which case even ppu cycles will now read from index 0 of secondary OAM.
Dots 257 through 320 read from the "OAM Buffer" in an 8 cycle pattern: (Sprite Fetch)
- There are $20 bytes of secondary OAM. Starting at index 0, these cycles will all read from secondary OAM.
- the secondary OAM address is incremented after the read on cycle 0, 1, 2, and 7 of this 8-cycle-pattern.
Dots 321 through 340 (and dot 0 of the following scanline) will read secondary OAM, index 0. (Idle)
The most important thing to note is that it's fairly common to read the Y position of the final entry in OAM. (set by the blooper in that TAS)
The OAM address is going to overflow long before dot 256, making reads from the final object's Y position more frequent. (The fewer objects there are on the scanline, the sooner the OAM Address will overflow.) We're certainly not guaranteed to read from that object's Y position every time we read from $2004, but it's more common than you'd think. Something like 40%. (edited)

40 since the sprite zero hit flag is set. RTI.








BRK routine. BRKs and RTIsRTI (edited)RTS leads to $9136 (stable code) (edited)

PHA, PLA, or JSR $2020 would do to thisPHA ... RTI would return to $9135 (one byte earlier than the plain ol' RTS, since RTI doesn't increment the PC after running.) This runs 93 A0 01 AD 54 07 before syncing back up with stable code.
PLA .. RTI would return to $FD91. Part of the FDS BIOS.
JSR $2020 ... RTI would push 61 and 20 to the stack, then RTI would return to $3620 (edited)
TXA or TYA into PHA then RTS might also allow getting to RAM since X and Y contain 00 and 0A respectively

SLO <$03
BRK
BRK
BRK
BRK
BEQ
BRK
BRK
CPX #$F0
BEQ (edited)




JMP ($6C6C) would jump to $3524. 


6E1C: 6C 06 00 JMP ($0006) A:20 X:00 Y:0A SP:F5 P:21 nvTbdizC
2060: 11 11 ORA ($11),Y * A:20 X:00 Y:0A SP:F5 P:21 nvTbdizC
2062: 51 11 EOR ($11),Y * A:20 X:00 Y:0A SP:F5 P:21 nvTbdizC
2064: 18 CLC A:20 X:00 Y:0A SP:F5 P:21 nvTbdizC
2065: 68 PLA A:35 X:00 Y:0A SP:F6 P:21 nvTbdizC
2066: 68 PLA A:91 X:00 Y:0A SP:F7 P:A1 NvTbdizC
2067: 3E FF FF ROL $FFFF,X A:FD X:00 Y:0A SP:F8 P:A1 NvTbdizC
206A: 5D 7D 18 EOR $187D,X * A:FD X:00 Y:0A SP:F8 P:20 nvTbdizc
206D: FF ??? A:1C X:00 Y:0A SP:F8 P:20 nvTbdizc
2070: FF ??? A:39 X:00 Y:0A SP:F8 P:20 nvTbdizc
2073: 5F ??? A:D8 X:00 Y:0A SP:F8 P:A0 NvTbdizc
2076: FF ??? A:A8 X:00 Y:0A SP:F8 P:A1 NvTbdizC
2079: 47 ??? A:60 X:00 Y:0A SP:F8 P:61 nVTbdizC
207B: 47 ??? A:60 X:00 Y:0A SP:F8 P:61 nVTbdizC
207D: B0 B0 BCS $202F A:60 X:00 Y:0A SP:F8 P:60 nVTbdizc
207F: 1F ??? A:60 X:00 Y:0A SP:F8 P:60 nVTbdizc
2082: 5F ??? A:60 X:00 Y:0A SP:F8 P:60 nVTbdizc
2085: F8 SED A:17 X:00 Y:0A SP:F8 P:61 nVTbdizC
2086: F8 SED A:17 X:00 Y:0A SP:F8 P:69 nVTbDizC
2087: 47 ??? A:17 X:00 Y:0A SP:F8 P:69 nVTbDizC
2089: 00 BRK A:17 X:00 Y:0A SP:F8 P:79 nVTBDizC
208B: 40 RTI A:17 X:00 Y:0A SP:F8 P:79 nVTBDizC
617D: 62 ??? A:17 X:00 Y:0A SP:FB P:AE NvTbDIZcPHP PHP ... RTI could do some damage08, but just for research purposes...RTI goes to $3131, runs RTI again, going to $FD91 ... ... ... it crashes at address $8EE5.
TXS opcode into RTI?




JumpEngine) (edited)

06E0A JumpEngine:
06E0A 0A asl ;shift bit from contents of A
06E0B A8 tay
06E0C 68 pla ;pull saved return address from stack
06E0D 85 04 sta $04 ;save to indirect
06E0F 68 pla
06E10 85 05 sta $05
06E12 C8 iny
06E13 B1 04 lda ($04),y ;load pointer from indirect
06E15 85 06 sta $06 ;note that if an RTS is performed in next routine
06E17 C8 iny ;it will return to the execution before the sub
06E18 B1 04 lda ($04),y ;that called this routine
06E1A 85 07 sta $07
06E1C 6C 06 00 jmp ($06) ;jump to the address we loaded
KIL (edited)


KIL (edited)









TXS isn't the only instruction to destroy the stack pointer. We can run SHS (opcode $9B)00 just like TXS.A & X to the stack pointer, so that checks out if X was 00. (edited)

8EF2: AE 53 07 LDX $0753



BRK is behaving differently nowBRK seems to subtract $100 from the PC?!?!?!?!?!???!?!?!?!??!?!!?!?!?!?!?!?!?!1EA1: 00 BRK A:86 X:01 Y:0A SP:01 P:F8 NVTBDizc Cy:859112254 PPU-Cy:19911
E1C7: 2C 01 01 BIT $0101 A:86 X:01 Y:0A SP:FE P:FC NVTBDIzc Cy:859112261 PPU-Cy:19932
E1CA: 30 1E BMI $E1EA A:86 X:01 Y:0A SP:FE P:3C nvTBDIzc Cy:859112265 PPU-Cy:19944
E1CC: 50 0B BVC $E1D9 A:86 X:01 Y:0A SP:FE P:3C nvTBDIzc Cy:859112267 PPU-Cy:19950
E1D9: 48 PHA A:86 X:01 Y:0A SP:FE P:3C nvTBDIzc Cy:859112270 PPU-Cy:19959
E1DA: AD 01 01 LDA $0101 A:86 X:01 Y:0A SP:FD P:3C nvTBDIzc Cy:859112273 PPU-Cy:19968
E1DD: 38 SEC A:1E X:01 Y:0A SP:FD P:3C nvTBDIzc Cy:859112277 PPU-Cy:19980
E1DE: E9 01 SBC #$01 A:1E X:01 Y:0A SP:FD P:3D nvTBDIzC Cy:859112279 PPU-Cy:19986
E1E0: 90 06 BCC $E1E8 A:1D X:01 Y:0A SP:FD P:3D nvTBDIzC Cy:859112281 PPU-Cy:19992
E1E2: 8D 01 01 STA $0101 A:1D X:01 Y:0A SP:FD P:3D nvTBDIzC Cy:859112283 PPU-Cy:19998
E1E5: AD 31 40 LDA $4031 A:1D X:01 Y:0A SP:FD P:3D nvTBDIzC Cy:859112287 PPU-Cy:20010
E1E8: 68 PLA A:0E X:01 Y:0A SP:FD P:3D nvTBDIzC Cy:859112291 PPU-Cy:20022
E1E9: 40 RTI A:86 X:01 Y:0A SP:FE P:BD NvTBDIzC Cy:859112295 PPU-Cy:20034
1DA3: 00 BRK A:86 X:01 Y:0A SP:01 P:F8 NVTBDizc Cy:859112301 PPU-Cy:20052SHS will just do the same thing as TXS in the previous test. (edited)1AA9: DD 03 A0 CMP $A003,X * A:86 X:01 Y:0A SP:01 P:F8 NVTBDizc Cy:859112442 PPU-Cy:20475
1AAC: F8 SED A:86 X:01 Y:0A SP:01 P:79 nVTBDizC Cy:859112446 PPU-Cy:20487
1AAD: DD 43 A8 CMP $A843,X * A:86 X:01 Y:0A SP:01 P:79 nVTBDizC Cy:859112448 PPU-Cy:20493
1AB0: F8 SED A:86 X:01 Y:0A SP:01 P:F8 NVTBDizc Cy:859112452 PPU-Cy:20505
1AB1: DE 03 A0 DEC $A003,X A:86 X:01 Y:0A SP:01 P:F8 NVTBDizc Cy:859112454 PPU-Cy:20511
1AB4: F8 SED A:86 X:01 Y:0A SP:01 P:78 nVTBDizc Cy:859112461 PPU-Cy:20532
1AB5: DE 43 A8 DEC $A843,X A:86 X:01 Y:0A SP:01 P:78 nVTBDizc Cy:859112463 PPU-Cy:20538
1AB8: F8 SED A:86 X:01 Y:0A SP:01 P:F8 NVTBDizc Cy:859112470 PPU-Cy:20559
1AB9: 7A NOP A:86 X:01 Y:0A SP:01 P:F8 NVTBDizc Cy:859112472 PPU-Cy:20565
1ABA: 02 ??? A:86 X:01 Y:0A SP:01 P:F8 NVTBDizc Cy:859112474 PPU-Cy:20571



02 in this OAM data...




lda Bubble_Y_Position,x
sbc #$00 ;subtract borrow from airbubble's vertical coordinate
cmp #$20 ;if below the status bar,
bcs Y_Bubl ;branch to go ahead and use to move air bubble upwards
lda #$f8 ;otherwise set offscreen coordinate
Y_Bubl: sta Bubble_Y_Position,x ;store as new vertical coordinate for air bubble
ExitBubl: rts ;leave
02 as their attribute byte, so we get to JSR to $0274. This fixes the stack pointer issue, but we are once again in OAM, so those $02's are still an issue.BRK routines from this log and see what we run before moving to OAMFF, making it really difficult on us.00 from $2087 or $208F in this situation



ISC $--FF, X Let's just ignore this for now.)


40 in the OAM buffer, then in theory, it could be done. But this is such an unrealistic set up.00 (or 01) is that we run the risk of overwriting bytes used by the Famicom Disk System[$0100]: PC action on NMI. $C0 (NMI #3) on reset.
[$0101]: PC action on IRQ. $80 (BIOS acknowledge and delay) on reset.
[$0102]: RESET flag. $35 on reset after the boot files have loaded.
[$0103]: RESET type. $AC = first boot of the game, $53 = the game was soft-reset by the user.

61 through DF from $2064. If any of these update the ROM data in a way that we can take advantage of. (edited)ROR $6E6E (edited)





6E : Write $37 to address $6E6E
6F : Write $1A to address $6F6F
7B : Write $50 to address $7B85
7E : Write $01 to address $7E7E
7F : Write $DD to address $7F7F
8C : Write $0A to address $8C8C
8D : Write $20 to address $8D8D
8E : Write $00 to address $8E8E
8F : Write $00 to address $8F8F
99 : Write $20 to address $99A3
9B : Write $00 to address $9BA5
9C : Write $08 to address $9C9C
9D : Write $20 to address $9D9D
9E : Write $00 to address $9EA8
9F : Write $20 to address $9FA9
CE : Write $5D to address $CECE
CF : Write $06 to address $CFCF
DB : Write $9E to address $DBE5
DE : Write $85 to address $DEDE
DF : Write $47 to address $DFDF



most recent label:
the line before being modified
the line after being modified, with minor comments.

E_GroundArea1 is for 1-1?
Where is E_GroundArea9 for?

ROR $6E6E we could keep shifting that byte over and over

03 to a 01 didn't have a very big effect.bb to a dd in 2-1.L_UndergroundArea1







BRK has some fun effects. Lots of game crashes due to a sprite zero hit no longer occurring. (edited)

8F

8E on the frame that writes to the OAM address I'm looking for.


















8F 8F 8F at address $2060, overwriting $8F8F with the value 00, where we then reset the console and goof around from there. (edited)






















6065 to 20. wonder what 6065 is






























































































































$2004 stress test while having different results!?



















































































































6E : Write $37 to address $6E6E
6F : Write $1A to address $6F6F
7B : Write $50 to address $7B85
7E : Write $01 to address $7E7E
7F : Write $DD to address $7F7F
8C : Write $0A to address $8C8C
8D : Write $20 to address $8D8D
8E : Write $00 to address $8E8E
8F : Write $00 to address $8F8F
99 : Write $20 to address $99A3
9B : Write $00 to address $9BA5
9C : Write $08 to address $9C9C
9D : Write $20 to address $9D9D
9E : Write $00 to address $9EA8
9F : Write $20 to address $9FA9
CE : Write $5D to address $CECE
CF : Write $06 to address $CFCF
DB : Write $9E to address $DBE5
DE : Write $85 to address $DEDE
DF : Write $47 to address $DFDF 








6E : Write $37 to address $6E6E
6F : Write $1A to address $6F6F
7B : Write $50 to address $7B85
7E : Write $01 to address $7E7E
7F : Write $DD to address $7F7F
8C : Write $0A to address $8C8C
8D : Write $20 to address $8D8D
8E : Write $00 to address $8E8E
8F : Write $00 to address $8F8F
99 : Write $20 to address $99A3
9B : Write $00 to address $9BA5
9C : Write $08 to address $9C9C
9D : Write $20 to address $9D9D
9E : Write $00 to address $9EA8
9F : Write $20 to address $9FA9
CE : Write $5D to address $CECE
CF : Write $06 to address $CFCF
DB : Write $9E to address $DBE5
DE : Write $85 to address $DEDE
DF : Write $47 to address $DFDF
Luigi:
6E : Write $37 to address $6E6E
6F : Write $1A to address $6F6F
7B : Write $50 to address $7B85
7E : Write $23 to address $7E7F
7F : Write $07 to address $7F80
8C : Write $0A to address $8C8C
8D : Write $20 to address $8D8D
8E : Write $01 to address $8E8E
8F : Write $00 to address $8F8F
99 : Write $20 to address $99A3
9B : Write $00 to address $9BA5
9C : Write $08 to address $9C9D
9D : Write $20 to address $9D9E
9E : Write $01 to address $9EA8
9F : Write $20 to address $9FA9
CE : Write $5D to address $CECE
CF : Write $06 to address $CFCF
DB : Write $9E to address $DBE5
DE : Write $07 to address $DEDF
DF : Write $BC to address $DFE0 (edited)
7E : Write $23 to address $7E7F
7F : Write $07 to address $7F80
9C : Write $08 to address $9C9D
9D : Write $20 to address $9D9E
DE : Write $07 to address $DEDF
DF : Write $BC to address $DFE0 (edited)



9E : Write $01 to address $9EA8
this does also trigger a jump to RAM, but, to $01.

7E : Write $23 to address $7E7F
7F : Write $07 to address $7F80
9C : Write $08 to address $9C9D
9D : Write $20 to address $9D9E
DE : Write $07 to address $DEDF
DF : Write $BC to address $DFE0 (edited)

lda in lda PowerUpType in the powerup handler.. 9D9E is the lda in lda Player_Y_HighPos in initblock_xy_pos.. DEDF is in VictoryMusData, DFE0 is in BowserFlameEnvData

















9C from the OAM read?



























StaircaseControl = $0734
AreaObjectHeight = $0735
MushroomLedgeHalfLen = $0736
EnemyDataOffset = $0739
EnemyObjectPageLoc = $073a
EnemyObjectPageSel = $073b
ScreenRoutineTask = $073c
ScrollThirtyTwo = $073d
HorizontalScroll = $073f
VerticalScroll = $0740
ForegroundScenery = $0741
BackgroundScenery = $0742
CloudTypeOverride = $0743
BackgroundColorCtrl = $0744
LoopCommand = $0745
StarFlagTaskControl = $0746
TimerControl = $0747
CoinTallyFor1Ups = $0748
SecondaryMsgCounter = $0749

















1














































































































Player_State, used to run the correct movement subroutine (grounded, jumping, falling, climbing)
00 we overwrite









































































RNGmap = {[0]=-1,-1,18790,-1,18789,-1,14695,-1,18788,-1,10600,-1,14694,-1,22374,-1,18787,-1,18279,-1,10599,-1,18663,-1,14693,-1,22997,-1,22373,-1,6505,-1,18786,-1,2410,-1,18278,-1,19238,-1,10598,-1,25958,-1,18662,-1,18902,-1,14692,-1,31941,-1,22996,-1,14184,-1,22372,-1,14568,-1,6504,-1,5695,-1,18785,-1,1600,-1,2409,-1,26581,-1,18277,-1,32759,-1,19237,-1,10473,-1,10597,-1,30876,-1,25957,-1,27846,-1,18661,-1,10089,-1,18901,-1,17311,-1,14691,-1,22247,-1,31940,-1,31082,-1,22995,-1,15143,-1,14183,-1,8732,-1,22371,-1,14807,-1,14567,-1,13588,-1,6503,-1,12546,-1,5694,-1,21863,-1,18784,-1,17768,-1,1599,-1,3854,-1,2408,-1,18536,
haha

































































































9C on the frame before the crash, then you're good.

























9C. It doesn't matter how we set that value, with a blooper, or one of mario's air bubbles... but that's what we need. Then the jump to $2060 will hopefully read $9C at address $2064 on real hardware if the read happens on the correct ppu cycle. (edited)






























9C

E8













00, and that's Mario's state if he's on the ground.


























































































































































STY $0090 -> $0090 = 0x2E
LSR $0090 -> $0090 = 0x17
LSR $008F -> $008F = 0x50
STA ($8A,X) -> $0750 = 0xFE
STY $008D -> $008D = 0x2E
LSR $008D -> $008D = 0x17
DEC $008C -> $008C = 0x5F
ISC ($87,X) -> $075F = 0x03
SLO ($87,X) -> $075F = 0x06
ISC ($87,X) -> $075F = 0x07
ASL $00D0 -> $00D0 = 0x06
INC $00D0 -> $00D0 = 0x07
ASL $00CF -> $00CF = 0x70
SLO ($CA,X) -> $0770 = 0x02





STY $0090 -> $0090 = 0x2E
LSR $0090 -> $0090 = 0x17
LSR $008F -> $008F = 0x50
STA ($8A,X) -> $0750 = 0xFE
STY $008D -> $008D = 0x2E
LSR $008D -> $008D = 0x17
DEC $008C -> $008C = 0x5F
ISC ($87,X) -> $075F = 0x03
SLO ($87,X) -> $075F = 0x06
ISC ($87,X) -> $075F = 0x07
ASL $00D0 -> $00D0 = 0x06
INC $00D0 -> $00D0 = 0x07
ASL $00CF -> $00CF = 0x70
SLO ($CA,X) -> $0770 = 0x02 







JumpEngine uses it as temp RAM so I doubt anything could be carried over







7FC to 01, and 9C9D to 08 to run the 3-1 fm2.








STY $0090 -> $0090 = 0x2E
LSR $0090 -> $0090 = 0x17
LSR $008F -> $008F = 0x50
STA ($8A,X) -> $0750 = 0xFE
STY $008D -> $008D = 0x2E
LSR $008D -> $008D = 0x17
DEC $008C -> $008C = 0x5F
ISC ($87,X) -> $075F = 0x03
SLO ($87,X) -> $075F = 0x06
ISC ($87,X) -> $075F = 0x07
ASL $00D0 -> $00D0 = 0x06
INC $00D0 -> $00D0 = 0x07
ASL $00CF -> $00CF = 0x70
SLO ($CA,X) -> $0770 = 0x02 






























00010111, doing an LSR on 00101110 or 00101111 will get you there, which is 2E or 2F. you can also shift left (ASL) from 00001011 (11) but then you'd need an INC after to set the low bit.
then there are the unofficial/illegal opcodes which can combine some operations



TAS 2
AUD|ADLR
BUDL|ADLR
should work i think (edited)
8C 87
4E 87
8C is A + Up + Down
87 is A + Down + Left + Right
4E is B + Up + Down + Left





























%0000 0010. There are a lot of read-modify-write instructions to zero page addresses with opcodes ending in 6. That's left + down. (edited)

06 is ASL <ZeroPage, 16 is ASL <ZeroPage, X, 26 is ROL <ZeroPage ... (edited)

ASL (indirect), Y or INC (indirect), Y opcode.


Absolute to Absolute, X or something similar. Instead of (Indirect, X) you get (Indirect), Y


Absolute to Absolute, X or something similar. Instead of (Indirect, X) you get (Indirect), Y 





|0|.L....BA|.L....BA||
|0|.LDU..BA|..DU...A||
|0|..DU...A|R.DU...A||
|0|.LDU..B.|R.DU...A||
|0|.LDU..B.|RLDU...A||
|0|..DU...A|....T..A||
|0|.LDU..B.|....T..A||
|0|..DU...A|RLD....A||
|0|R......A|.L.U...A||
|0|RL...SBA|RLD....A||
|0|RL......|RLD....A||
|0|RL...SBA|RLD....A||
|0|RL......|R......A|| (edited)
































































































































BIT <$24 and $2072 is going to be NOP <$44, so we should always run $2074, which will always be on a good cycle$2007 stress test and press select afterwards to show the debug screen? This could help me confirm if the analogue behavior around dot 259 would be problematic or not.













































































































Alignment 0: The CPU and PPU cycle are synced to the same master clock cycle
Alignment 1: The CPU clock occurs 1 master clock cycle later than the ppu clock.
Alignment 2: The CPU clock occurs 2 master clock cycles later than the ppu clock.
Alignment 3: The CPU clock occurs 3 master clock cycles later than the ppu clock.
"Alignment 4" would just land in sync again, making it equivalent to alignment 0.
Technically, there are more alignments. Again, the counter for the CPU could be anywhere from 0 to 11 at power on. This forms a 12-phase alignment between the CPU clock and the PPU's VBlank flag being raised for the first time. I'm pretty sure this is the alignment business that threecreepio has talked about the most in the past, as this alignment can result in "VBlank Suppression" occurring or not, resulting in an entire lag frame around power on. This would not affect our TAS though, as the way the replay device works is based on controller strobes, not by counting vblanks. Lag frames are not part of the .r08 file. (edited)







INC $2007, X where X equals zero. The issue is that different consoles behave differently. So while it's consistent for an individual console, you would need to first identify how your console behaves before making a rom designed for your console. (edited)INC $2007, X works with the same data on my NES and my famicom, but my famicom has different results with just INC $2007. It's a whole can of worms that I have yet to look into.



























































































PHASE 0, PHASE 1 PHASE 2 or PHASE 3 at the topPHASE ? even after the test finishes. And on some consoles, alignment 3 prints PHASE 0






BRK, starting an infinite loop of BRKs, destroying the stack. The Famicom Disk System uses some bytes at the top of the stack for some specific functionality, so I imagine that could be what happened.

PHASE 1 according to the ROM.









?GNT. I have no idea what alignment this would be, heh. My guess is phase 2, due to the T. (edited)










DRAW Alignment test is specifically set up with the values that work on my console, so it might not be accurate on yours. But running RMW $2007 should have unique results for each alignments. It will always say "PASS", so you would need to screenshot the debug menu.




DRAW Alignment test is specifically set up with the values that work on my console, so it might not be accurate on yours. But running RMW $2007 should have unique results for each alignments. It will always say "PASS", so you would need to screenshot the debug menu. 




DRAW Alignment are based off the results of RMW $2007 which are different for each console.DRAW Alignment probably wont print the right numbers for your console.



DRAW Alignment actually say "1"?

56 since that's what my console does, while yours writes 57 to VRAM.









0001 on the left edge of the screen, for the lower test results.

$2004 stress test with alignment 1, what are your results?$2004 stress 2 here, heh

Alignment 1 with the DRAW test right now? (edited)









1211 is what my console gets. I bet you could see it print Alignment 2 right now (edited)









56 in the upper right area...
















2064. Take the value from PPU Cycle and add 12, then modulo 341. That tells us what ppu cycle in a scanline this read was on. (edited)






















































Paste or Paste Insert?


















































nes_reset_state_detect_letters rom? I'd have to look into how that rom works, but I would be very surprised if sprite zero hit timing is the issue.





$2002 flag timing test it looks like bizhawk would be emulating alignment 2 or 3. (according to whenever the sprite zero hit flag would be set)
It's possible the NMI timing in bizhawk doesn't match alignment 2 or 3, resulting in an "impossible" combination of when the NMI occurs and when the sprite zero flag is raised. I don't know if this has been looked into any.






























$2004 Stress Test, we could see if you have bit flips in the data. (edited)







78 coming from?!!??! You console behaves so very different from mine.


















BIT <zeroPage
$24 again.
$38 : SEC
$0E : ASL Absolute
Remarkably, all of these have different amounts of operands. That's a good start. (edited)
193 : OAM1[00]
195 : OAM1[04]
197 : OAM1[08]
199 : OAM1[0C]
201 : OAM1[10]
203 : OAM1[14]
205 : OAM1[18]
207 : OAM1[1C]
209 : OAM1[20]
211 : OAM1[24]
213 : OAM1[28]
215 : OAM1[2C]
217 : OAM1[30]
219 : OAM1[34]
221 : OAM1[38]
223 : OAM1[3C]
225 : OAM1[40]
227 : OAM1[44]
229 : OAM1[48]
231 : OAM1[4C]
233 : OAM1[50]
235 : OAM1[54]
237 : OAM1[58]
239 : OAM1[5C]
241 : OAM1[60]
243 : OAM1[64]
245 : OAM1[68]
247 : OAM1[6C]
249 : OAM1[70]
251 : OAM1[74]
253 : OAM1[78]
255 : OAM1[7C]n corresponds to the ppu read buffer being updated on dot n+19
























































































RMW $2007 test than my console. It's possible your results for alignment 3 look a lot like alignment 1?











































INY before the SHY $9C9C, X, which would instead write the value 09 instead of 08.



INY before the SHY $9C9C, X, which would instead write the value 09 instead of 08. 09, then the game won't crash, but the item would stop moving around, which would be a pretty good way to tell that we landed on dot 235.









00? I'm pretty sure I don't even check the value at that address. what would be causing it fail because of that?!

X, which is my index into the answer key look-up table. It's strange that it fails that test, there were several consoles tested, and this is the first one I've seen fail it.

78 My goodness. That value can apparently be anything.



INC $2007, X results.



