80:9459 Button input update routine Scyzer> the previous input is updated AFTER the new input is updated meaning the only time that the previous frames input is actually true is during the input update routine easy fix though, you just gotta reorder the routine so it updates the previous input before getting the new one Scyzer> look for an LDA $8B : STA $97 the problem is, that is run AFTER 8B is updated for the current frame it needs to be written before 8B is written to ahhhhh groovy... so once that's done I can just do a compare between locations to see if the button has been released yep awesome :) LDA $ButtonValue : BIT $97 : BEQ EndNoInput : BIT $8B : BEQ ReleasedInputThisFrame : *Still holding button* 7E:008B - 7E:008C Controller 1 Input 7E:008F - 7E:0090 Controller 1 Buttons newly pressed this frame 7E:0097 - 7E:0098 Controller 1 Input from previous frame (updated at end of button-updating routine - this will always mirror $8B except during the button-updating routine) $80/9459 08 PHP A:04A8 X:0012 Y:00A0 P:envmxdizC $80/945A E2 20 SEP #$20 A:04A8 X:0012 Y:00A0 P:envmxdizC $80/945C AD 12 42 LDA $4212 [$88:4212] A:04A8 X:0012 Y:00A0 P:envMxdizC $80/945F 29 01 AND #$01 A:04A8 X:0012 Y:00A0 P:envMxdizC $80/9461 D0 F9 BNE $F9 [$945C] A:04A8 X:0012 Y:00A0 P:envMxdizC $80/9463 C2 20 REP #$20 A:04A8 X:0012 Y:00A0 P:envMxdizC $80/9465 AD 18 42 LDA $4218 [$88:4218] button input register $80/9468 85 8B STA $8B [$00:008B] A:04A8 X:0012 Y:00A0 P:envmxdizC $80/946A 45 97 EOR $97 [$00:0097] A:04A8 X:0012 Y:00A0 P:envmxdizC $80/946C 25 8B AND $8B [$00:008B] A:04A8 X:0012 Y:00A0 P:envmxdizC $80/946E 85 8F STA $8F [$00:008F] A:04A8 X:0012 Y:00A0 P:envmxdizC $80/9470 85 93 STA $93 [$00:0093] A:04A8 X:0012 Y:00A0 P:envmxdizC $80/9472 A5 8B LDA $8B [$00:008B] A:04A8 X:0012 Y:00A0 P:envmxdizC $80/9474 F0 12 BEQ $12 [$9488] A:04A8 X:0012 Y:00A0 P:envmxdizC $80/9476 C5 97 CMP $97 [$00:0097] A:04A8 X:0012 Y:00A0 P:envmxdizC $80/9478 D0 0E BNE $0E [$9488] A:04A8 X:0012 Y:00A0 P:envmxdizC $80/947A C6 A3 DEC $A3 [$00:00A3] A:04A8 X:0012 Y:00A0 P:envmxdizC $80/947C D0 0E BNE $0E [$948C] A:04A8 X:0012 Y:00A0 P:envmxdizC $80/947E A5 8B LDA $8B [$00:008B] A:04A8 X:0012 Y:00A0 P:envmxdizC $80/9480 85 93 STA $93 [$00:0093] A:04A8 X:0012 Y:00A0 P:envmxdizC $80/9482 A5 89 LDA $89 [$00:0089] A:04A8 X:0012 Y:00A0 P:envmxdizC $80/9484 85 A3 STA $A3 [$00:00A3] A:04A8 X:0012 Y:00A0 P:envmxdizC $80/9486 80 04 BRA $04 [$948C] A:04A8 X:0012 Y:00A0 P:envmxdizC $80/9488 A5 87 LDA $87 [$00:0087] A:04A8 X:0012 Y:00A0 P:envmxdizC $80/948A 85 A3 STA $A3 [$00:00A3] A:04A8 X:0012 Y:00A0 P:envmxdizC $80/948C LDA $8B $80/948E STA $97 $80/9490 AD D1 05 LDA $05D1 [$88:05D1] A:04A8 X:0012 Y:00A0 P:envmxdizC $80/9493 D0 02 BNE $02 [$9497] A:04A8 X:0012 Y:00A0 P:envmxdizC $80/9495 28 PLP A:04A8 X:0012 Y:00A0 P:envmxdizC $80/9496 6B RTL A:04A8 X:0012 Y:00A0 P:envmxdizC 90B852 83852 - D0 to 80 = Alters beam firing behavior slightly. Most noticable result is Samus can charge a beam without always having to shoot first. Changes a BNE to BRA [07:02] $90BE91 is the "start" of the routine where it checks for super missile ammo [07:03] $90BE96 is the "start" of the routine that checks which projectile index to create, and if you are able to fire any more weapons at the moment main weapons routine, runs every frame $90/DD3D 08 PHP $90/DD3E C2 30 REP #$30 $90/DD40 AD 32 0D LDA $0D32 [$88:0D32] pointer to code for grapple beam $90/DD43 C9 F0 C4 CMP #$C4F0 C4F0 (start beam, not active) $90/DD46 F0 05 BEQ $05 [$DD4D] if so, branch to pause time check $90/DD48 A2 08 00 LDX #$0008 if not, load 0008 into x and go to projectile specific routine $90/DD4B 80 0F BRA $0F [$DD5C] $90/DD4D AD 78 0A LDA $0A78 [$88:0A78] Pause time, ala energy tank and x-ray scope $90/DD50 F0 05 BEQ $05 [$DD57] if not paused, branch $90/DD52 A2 0A 00 LDX #$000A if so, load 000A into x and go to projectile specific routine $90/DD55 80 05 BRA $05 [$DD5C] $90/DD57 AD D2 09 LDA $09D2 [$88:09D2] current HUD selection $90/DD5A 0A ASL A shift left (Ax2) $90/DD5B AA TAX transfer to x $90/DD5C FC 61 DD JSR ($DD61,x)[$88:00DD] projectile specific routine $90/DD5F 28 PLP $90/DD60 60 RTS pointer table for projectile specific routines: $90/DD61 0D B8 ;beams 62 BE ;missiles 62 BE ;supers 0D B8 ;powerbombs 6F DD ;grapple C8 DD ;xray 74 DD ;item cancel? code for grapple: $90/DD6F 22 90 C4 9B JSL $9BC490[$9B:C490] A:0010 X:0012 Y:00A8 P:envmxdizC $90/DD73 60 RTS A:0010 X:0012 Y:00A8 P:envmxdizC main beams code disassembly: $90/B80D 08 PHP $90/B80E C2 30 REP #$30 $90/B810 AD D0 0C LDA $0CD0 [$88:0CD0] samus current charge $90/B813 8D C2 0D STA $0DC2 [$88:0DC2] bomb counter $90/B816 AD 76 0A LDA $0A76 [$88:0A76] hyper beam $90/B819 D0 08 BNE $08 [$B823] if hyper equiped, branch $90/B81B AD A6 09 LDA $09A6 [$88:09A6] equiped beams $90/B81E 89 00 10 BIT #$1000 charge beam $90/B821 D0 0A BNE $0A [$B82D] if charge equiped, branch branch to here if hyper equiped: $90/B823 A5 8B LDA $8B [$00:008B] controler 1 input $90/B825 2D B2 09 AND $09B2 [$88:09B2] shoot button $90/B828 F0 5B BEQ $5B [$B885] if not pressed, PLP and end $90/B82A 4C 87 B8 JMP $B887 [$88:B887] if pressed, JMP to non-charged beam fire branch to here if charge equiped: $90/B82D AD 5E 0B LDA $0B5E [$88:0B5E] Samus is currently firing in this direction $90/B830 F0 0A BEQ $0A [$B83C] if not, branch if firing, check charge $90/B832 AD D0 0C LDA $0CD0 [$88:0CD0] current charge $90/B835 C9 3C 00 CMP #$003C max charge value $90/B838 10 33 BPL $33 [$B86D] if greater than or equal, branch $90/B83A 80 28 BRA $28 [$B864] otherwise branch branch here if not currently firing: $90/B83C A5 8B LDA $8B [$00:008B] controller 1 input $90/B83E 2D B2 09 AND $09B2 [$88:09B2] shoot button $90/B841 F0 17 BEQ $17 [$B85A] if not pressed, branch $90/B843 AD D0 0C LDA $0CD0 [$88:0CD0] current charge $90/B846 C9 78 00 CMP #$0078 compare to 0078 $90/B849 10 2B BPL $2B [$B876] if plus, branch $90/B84B 1A INC A incriment charge $90/B84C 8D D0 0C STA $0CD0 [$88:0CD0] and store back to charge counter $90/B84F C9 01 00 CMP #$0001 compare to 0001 $90/B852 80 31 BRA $31 [$B885] *was originaly BNE* PLP and end $90/B854 20 BE BC JSR $BCBE [$88:BCBE] zeros out all charge animations $0CD6-0CE1 $90/B857 4C 87 B8 JMP $B887 [$88:B887] fire non-charged beam if not firing and shoot not pressed $90/B85A AD D0 0C LDA $0CD0 [$88:0CD0] current charge $90/B85D F0 26 BEQ $26 [$B885] if not charged, PLP and end $90/B85F C9 3C 00 CMP #$003C compare to full charged value $90/B862 10 09 BPL $09 [$B86D] if equal or greater, branch to firing charged section, otherwise fire non-charged branch here if firing while charge value is less than 003C $90/B864 9C D0 0C STZ $0CD0 [$88:0CD0] store zero to charge counter $90/B867 20 BE BC JSR $BCBE [$88:BCBE] zeros out all charge animations $0CD6-0CE1 $90/B86A 4C 87 B8 JMP $B887 [$88:B887] main regular beam fire routine branch here if firing while charge vlaue exceeds 003C $90/B86D 9C D0 0C STZ $0CD0 [$88:0CD0] store zero to charge counter $90/B870 20 BE BC JSR $BCBE [$88:BCBE] zeros out all charge animations $0CD6-0CE1 $90/B873 4C 86 B9 JMP $B986 [$88:B986] main charged beam fire routine branch here if charge exceeds 0078 (when would that ever happen???) $90/B876 20 C0 CC JSR $CCC0 [$88:CCC0] dunno $90/B879 90 0A BCC $0A [$B885] if carry clear, PLP and end $90/B87B 9C D0 0C STZ $0CD0 [$88:0CD0] zero charge counter $90/B87E 20 BE BC JSR $BCBE [$88:BCBE] zeros out all charge animations $0CD6-0CE1 $90/B881 22 BA DE 91 JSL $91DEBA[$91:DEBA] seems to handle palette changes $90/B885 28 PLP $90/B886 60 RTS on Kej's site: |-90B887.txt ;Fire Beam disassembly/commentary |-90B986.txt ;Fire Charge Beam disassemble/commentary routine for firing missiles/supers: $90/BE62 08 PHP A:0000 X:0000 Y:0049 P:envmxdiZc $90/BE63 C2 30 REP #$30 A:0000 X:0000 Y:0049 P:envmxdiZc $90/BE65 A5 8F LDA $8F [$00:008F] 7E:008F - 7E:0090 Controller 1 Buttons newly pressed this frame $90/BE67 2C B2 09 BIT $09B2 [$90:09B2] 7E:09B2 - 7E:09B3 Shoot $90/BE6A D0 0A BNE $0A [$BE76] A:0000 X:0000 Y:0049 P:envmxdiZc $90/BE6C AD 00 0E LDA $0E00 [$90:0E00] 7E:0E00 - 7E:0E01 Controller input (8F) from game from previous frame. (any other use?) $90/BE6F 2C B2 09 BIT $09B2 [$90:09B2] 7E:09B2 - 7E:09B3 Shoot $90/BE72 D0 02 BNE $02 [$BE76] A:0000 X:0000 Y:0049 P:envmxdiZc $90/BE74 28 PLP A:0000 X:0000 Y:0049 P:envmxdiZc $90/BE75 60 RTS A:0000 X:0000 Y:0049 P:envmxdiZc $90/BE76 20 5A AC JSR $AC5A [$90:AC5A] check if clear to shoot? $90/BE79 B0 07 BCS $07 [$BE82] IF CARRY CLEAR = WAIT FOR COOLDOWN $90/BE7B 28 PLP A:0000 X:0000 Y:0049 P:envmxdiZc $90/BE7C 60 RTS A:0000 X:0000 Y:0049 P:envmxdiZc $90/BE7D CE CE 0C DEC $0CCE [$90:0CCE] 7E:0CCE - 7E:0CCF Projectile counter? $90/BE80 28 PLP A:0000 X:0000 Y:0049 P:envmxdiZc $90/BE81 60 RTS A:0000 X:0000 Y:0049 P:envmxdiZc $90/BE82 AD D2 09 LDA $09D2 [$90:09D2] 7E:09D2 - 7E:09D3 Currently selected status bar item $90/BE85 C9 02 00 CMP #$0002 $90/BE88 F0 07 BEQ $07 [$BE91] jump if super missiles equipped $90/BE8A AD C6 09 LDA $09C6 [$90:09C6] 7E:09C6 - 7E:09C7 Samus's missiles $90/BE8D F0 EE BEQ $EE [$BE7D] if equal decriment projectile counter and end $90/BE8F 80 05 BRA $05 [$BE96] A:0000 X:0000 Y:0049 P:envmxdiZc $90/BE91 AD CA 09 LDA $09CA [$90:09CA] 7E:09CA - 7E:09CB Samus's super missiles $90/BE94 F0 E7 BEQ $E7 [$BE7D] if equal decriment projectile counter and end $90/BE96 A2 00 00 LDX #$0000 A:0000 X:0000 Y:0049 P:envmxdiZc $90/BE99 BD 2C 0C LDA $0C2C,x[$90:0C2C] 7E:0C2C - 7E:0C35 Projectile damage array. $90/BE9C F0 09 BEQ $09 [$BEA7] A:0000 X:0000 Y:0049 P:envmxdiZc $90/BE9E E8 INX A:0000 X:0000 Y:0049 P:envmxdiZc $90/BE9F E8 INX A:0000 X:0000 Y:0049 P:envmxdiZc $90/BEA0 E0 0A 00 CPX #$000A A:0000 X:0000 Y:0049 P:envmxdiZc $90/BEA3 30 F4 BMI $F4 [$BE99] A:0000 X:0000 Y:0049 P:envmxdiZc $90/BEA5 80 D6 BRA $D6 [$BE7D] jump to decriment projectile counter and end $90/BEA7 86 14 STX $14 [$00:0014] A:0000 X:0000 Y:0049 P:envmxdiZc $90/BEA9 20 56 BA JSR $BA56 [$90:BA56] CHECK IF CLEAR TO FIRE? $90/BEAC 90 03 BCC $03 [$BEB1] A:0000 X:0000 Y:0049 P:envmxdiZc $90/BEAE 4C 7B BE JMP $BE7B [$90:BE7B] PLP AND END previous = determines if able to fire or not following = subtracts ammo and produces the shot $90/BEB1 A9 14 00 LDA #$0014 A:0000 X:0000 Y:0049 P:envmxdiZc $90/BEB4 8D AC 18 STA $18AC [$90:18AC] A:0000 X:0000 Y:0049 P:envmxdiZc $90/BEB7 AD D2 09 LDA $09D2 [$90:09D2] 7E:09D2 - 7E:09D3 Currently selected status bar item $90/BEBA C9 02 00 CMP #$0002 compare to super missiles $90/BEBD F0 05 BEQ $05 [$BEC4] A:0000 X:0000 Y:0049 P:envmxdiZc $90/BEBF CE C6 09 DEC $09C6 [$90:09C6] 7E:09C6 - 7E:09C7 Samus's missiles $90/BEC2 80 03 BRA $03 [$BEC7] A:0000 X:0000 Y:0049 P:envmxdiZc $90/BEC4 CE CA 09 DEC $09CA [$90:09CA] 7E:09CA - 7E:09CB Samus's super missiles $90/BEC7 A6 14 LDX $14 [$00:0014] A:0000 X:0000 Y:0049 P:envmxdiZc $90/BEC9 A9 04 00 LDA #$0004 A:0000 X:0000 Y:0049 P:envmxdiZc $90/BECC 9D 90 0C STA $0C90,x[$90:0C90] 7E:0C90 - 7E:0C9B Timer for projectile trails $90/BECF AD D2 09 LDA $09D2 [$90:09D2] 7E:09D2 - 7E:09D3 Currently selected status bar item $90/BED2 48 PHA A:0000 X:0000 Y:0049 P:envmxdiZc $90/BED3 EB XBA A:0000 X:0000 Y:0049 P:envmxdiZc $90/BED4 85 12 STA $12 [$00:0012] A:0000 X:0000 Y:0049 P:envmxdiZc $90/BED6 BD 18 0C LDA $0C18,x[$90:0C18] 7E:0C18 - 7E:0C2B Projectile type array. 8000+ = live(?), X0YY = beam, YY = beamtype, X1XX = missile, X2XX = super missile, X3XX = power bomb, X5XX = bomb, X7XX = dead beam, X8XX = dead missile/super. First 5 slots used for beams/missiles, last 5 for bombs $90/BED9 05 12 ORA $12 [$00:0012] A:0000 X:0000 Y:0049 P:envmxdiZc $90/BEDB 09 00 80 ORA #$8000 A:0000 X:0000 Y:0049 P:envmxdiZc $90/BEDE 9D 18 0C STA $0C18,x[$90:0C18] 7E:0C18 - 7E:0C2B Projectile type array. $90/BEE1 68 PLA A:0000 X:0000 Y:0049 P:envmxdiZc $90/BEE2 29 0F 00 AND #$000F A:0000 X:0000 Y:0049 P:envmxdiZc $90/BEE5 0A ASL A A:0000 X:0000 Y:0049 P:envmxdiZc $90/BEE6 AA TAX A:0000 X:0000 Y:0049 P:envmxdiZc $90/BEE7 AD 51 1F LDA $1F51 [$90:1F51] 7E:1F51 - 7E:1F52 Used during intro scenes and pic of baby Metroid at Ceres (pointer to code?) $90/BEEA D0 07 BNE $07 [$BEF3] A:0000 X:0000 Y:0049 P:envmxdiZc $90/BEEC BD BF C2 LDA $C2BF,x[$90:C2BF] A:0000 X:0000 Y:0049 P:envmxdiZc $90/BEEF 22 49 90 80 JSL $809049[$80:9049] A:0000 X:0000 Y:0049 P:envmxdiZc $90/BEF3 20 DD B1 JSR $B1DD [$90:B1DD] A:0000 X:0000 Y:0049 P:envmxdiZc $90/BEF6 22 00 80 93 JSL $938000[$93:8000] A:0000 X:0000 Y:0049 P:envmxdiZc $90/BEFA BD 18 0C LDA $0C18,x[$90:0C18] A:0000 X:0000 Y:0049 P:envmxdiZc $90/BEFD 48 PHA A:0000 X:0000 Y:0049 P:envmxdiZc $90/BEFE 89 00 02 BIT #$0200 A:0000 X:0000 Y:0049 P:envmxdiZc $90/BF01 D0 08 BNE $08 [$BF0B] A:0000 X:0000 Y:0049 P:envmxdiZc $90/BF03 A9 68 AF LDA #$AF68 A:0000 X:0000 Y:0049 P:envmxdiZc $90/BF06 9D 68 0C STA $0C68,x[$90:0C68] 7E:0C68 - 7E:0C69 Pointer to code for projectile #1 $90/BF09 80 06 BRA $06 [$BF11] A:0000 X:0000 Y:0049 P:envmxdiZc $90/BF0B A9 E5 AF LDA #$AFE5 A:0000 X:0000 Y:0049 P:envmxdiZc $90/BF0E 9D 68 0C STA $0C68,x[$90:0C68] 7E:0C68 - 7E:0C69 Pointer to code for projectile #1 $90/BF11 68 PLA A:0000 X:0000 Y:0049 P:envmxdiZc $90/BF12 EB XBA A:0000 X:0000 Y:0049 P:envmxdiZc $90/BF13 29 0F 00 AND #$000F A:0000 X:0000 Y:0049 P:envmxdiZc $90/BF16 A8 TAY A:0000 X:0000 Y:0049 P:envmxdiZc $90/BF17 B9 7A C2 LDA $C27A,y[$90:C2C3] table for samus projectile cooldown timer? $90/BF1A 29 FF 00 AND #$00FF A:0000 X:0000 Y:0049 P:envmxdiZc $90/BF1D 8D CC 0C STA $0CCC [$90:0CCC] 7E:0CCC - 7E:0CCD Cooldown counter $90/BF20 AD 04 0A LDA $0A04 [$90:0A04] 7E:0A04 - 7E:0A05 Item selected for auto-cancel $90/BF23 F0 08 BEQ $08 [$BF2D] A:0000 X:0000 Y:0049 P:envmxdiZc $90/BF25 9C D2 09 STZ $09D2 [$90:09D2] 7E:09D2 - 7E:09D3 Currently selected status bar item $90/BF28 9C 04 0A STZ $0A04 [$90:0A04] 7E:0A04 - 7E:0A05 Item selected for auto-cancel $90/BF2B 80 17 BRA $17 [$BF44] A:0000 X:0000 Y:0049 P:envmxdiZc $90/BF2D AD D2 09 LDA $09D2 [$90:09D2] 7E:09D2 - 7E:09D3 Currently selected status bar item $90/BF30 C9 02 00 CMP #$0002 A:0000 X:0000 Y:0049 P:envmxdiZc $90/BF33 F0 07 BEQ $07 [$BF3C] A:0000 X:0000 Y:0049 P:envmxdiZc $90/BF35 AD C6 09 LDA $09C6 [$90:09C6] 7E:09C6 - 7E:09C7 Samus's missiles $90/BF38 D0 0A BNE $0A [$BF44] A:0000 X:0000 Y:0049 P:envmxdiZc $90/BF3A 80 05 BRA $05 [$BF41] A:0000 X:0000 Y:0049 P:envmxdiZc $90/BF3C AD CA 09 LDA $09CA [$90:09CA] 7E:09CA - 7E:09CB Samus's super missiles $90/BF3F D0 03 BNE $03 [$BF44] A:0000 X:0000 Y:0049 P:envmxdiZc $90/BF41 9C D2 09 STZ $09D2 [$90:09D2] 7E:09D2 - 7E:09D3 Currently selected status bar item $90/BF44 28 PLP A:0000 X:0000 Y:0049 P:envmxdiZc $90/BF45 60 RTS A:0000 X:0000 Y:0049 P:envmxdiZc synchronizes super missile halves together, can be deleted/overwritten if using Kej's supermissile fix patch $90/BF46 A2 00 00 LDX #$0000 $90/BF49 BD 2C 0C LDA $0C2C,x[$88:0C3E] Projectile damage array. $90/BF4C F0 09 BEQ $09 [$BF57] $90/BF4E E8 INX $90/BF4F E8 INX $90/BF50 E0 0A 00 CPX #$000A $90/BF53 30 F4 BMI $F4 [$BF49] try again $90/BF55 80 43 BRA $43 [$BF9A] end $90/BF57 86 14 STX $14 [$00:0014] $90/BF59 9B TXY $90/BF5A B9 18 0C LDA $0C18,y[$88:0CC0] Projectile type array. 8000+ = live(?), X0YY = beam, YY = beamtype, X1XX = missile, X2XX = super missile, X3XX = power bomb, X5XX = bomb, X7XX = dead beam, X8XX = dead missile/super. First 5 slots used for beams/missiles, last 5 for bombs $90/BF5D 09 00 82 ORA #$8200 set as live supermissile? $90/BF60 99 18 0C STA $0C18,y[$88:0CC0] and store back to projectile type array $90/BF63 AE DE 0D LDX $0DDE [$88:0DDE] Current projectile index $90/BF66 BD 64 0B LDA $0B64,x[$88:0B76] Projectile X position in pixels $90/BF69 99 64 0B STA $0B64,y[$88:0C0C] Projectile X position in pixels $90/BF6C BD 78 0B LDA $0B78,x[$88:0B8A] Projectile Y position in pixels $90/BF6F 99 78 0B STA $0B78,y[$88:0C20] Projectile Y position in pixels $90/BF72 BD 04 0C LDA $0C04,x[$88:0C16] Accelerating direction $90/BF75 99 04 0C STA $0C04,y[$88:0CAC] Accelerating direction $90/BF78 20 56 BA JSR $BA56 [$88:BA56] $90/BF7B BB TYX $90/BF7C 22 71 80 93 JSL $938071[$93:8071] $90/BF80 A9 75 B0 LDA #$B075 $90/BF83 9D 68 0C STA $0C68,x[$88:0C7A] Pointer to code for projectile #1 $90/BF86 86 12 STX $12 [$00:0012] $90/BF88 AE DE 0D LDX $0DDE [$88:0DDE] Current projectile index $90/BF8B BD 7C 0C LDA $0C7C,x[$88:0C8E] Links super missile halves together (top byte is a flag, linked if set. Bottom byte tells linked index) $90/BF8E 29 00 FF AND #$FF00 $90/BF91 18 CLC $90/BF92 65 12 ADC $12 [$00:0012] $90/BF94 9D 7C 0C STA $0C7C,x[$88:0C8E] Links super missile halves together (top byte is a flag, linked if set. Bottom byte tells linked index) $90/BF97 EE CE 0C INC $0CCE [$88:0CCE] Projectile counter $90/BF9A 60 RTS $90/AC5A AD D2 09 LDA $09D2 [$88:09D2] CURRENT HUD ITEM $90/AC5D C9 02 00 CMP #$0002 COMPARE TO SUPERS $90/AC60 F0 21 BEQ $21 [$AC83] $90/AC62 AD CE 0C LDA $0CCE [$88:0CCE] PROJECTILE COUNTER $90/AC65 C9 05 00 CMP #$0005 $90/AC68 10 17 BPL $17 [$AC81] IF 5 OR MORE CLC AND END $90/AC6A AD CC 0C LDA $0CCC [$88:0CCC] COOLDOWN TIMER $90/AC6D 29 FF 00 AND #$00FF $90/AC70 D0 0F BNE $0F [$AC81] IF COOLDOWN STILL ACTIVE, CLC RTS $90/AC72 A9 01 00 LDA #$0001 IF NOT ADD ONE TO COOLDOWN TIMER AND PROJECTILE COUNTER $90/AC75 8D CC 0C STA $0CCC [$88:0CCC] THEN SEC AND RTS $90/AC78 AD CE 0C LDA $0CCE [$88:0CCE] $90/AC7B 1A INC A $90/AC7C 8D CE 0C STA $0CCE [$88:0CCE] $90/AC7F 38 SEC $90/AC80 60 RTS $90/AC81 18 CLC A:0010 X:0012 Y:00A8 P:envmxdizC $90/AC82 60 RTS A:0010 X:0012 Y:00A8 P:envmxdizC HERE IF SUPERS SELECTED $90/AC83 AD CE 0C LDA $0CCE [$88:0CCE] PROJECTILE COUNTER $90/AC86 C9 04 00 CMP #$0004 $90/AC89 30 DF BMI $DF [$AC6A] IF LESS THAN 4 BRANCH $90/AC8B 18 CLC $90/AC8C 60 RTS $90/BA56 AD 1C 0A LDA $0A1C [$88:0A1C] A:0010 X:0012 Y:00A8 P:envmxdizC $90/BA59 0A ASL A A:0010 X:0012 Y:00A8 P:envmxdizC $90/BA5A 0A ASL A A:0010 X:0012 Y:00A8 P:envmxdizC $90/BA5B 0A ASL A A:0010 X:0012 Y:00A8 P:envmxdizC $90/BA5C AA TAX A:0010 X:0012 Y:00A8 P:envmxdizC $90/BA5D A4 14 LDY $14 [$00:0014] A:0010 X:0012 Y:00A8 P:envmxdizC $90/BA5F AD 5E 0B LDA $0B5E [$88:0B5E] A:0010 X:0012 Y:00A8 P:envmxdizC $90/BA62 F0 08 BEQ $08 [$BA6C] A:0010 X:0012 Y:00A8 P:envmxdizC $90/BA64 29 FF 00 AND #$00FF A:0010 X:0012 Y:00A8 P:envmxdizC $90/BA67 9C 5E 0B STZ $0B5E [$88:0B5E] A:0010 X:0012 Y:00A8 P:envmxdizC $90/BA6A 80 14 BRA $14 [$BA80] A:0010 X:0012 Y:00A8 P:envmxdizC $90/BA6C BF 2C B6 91 LDA $91B62C,x[$91:B63E] A:0010 X:0012 Y:00A8 P:envmxdizC $90/BA70 29 FF 00 AND #$00FF A:0010 X:0012 Y:00A8 P:envmxdizC $90/BA73 89 F0 00 BIT #$00F0 A:0010 X:0012 Y:00A8 P:envmxdizC $90/BA76 F0 08 BEQ $08 [$BA80] A:0010 X:0012 Y:00A8 P:envmxdizC $90/BA78 C9 10 00 CMP #$0010 A:0010 X:0012 Y:00A8 P:envmxdizC $90/BA7B F0 61 BEQ $61 [$BADE] A:0010 X:0012 Y:00A8 P:envmxdizC $90/BA7D 4C F7 BA JMP $BAF7 [$88:BAF7] A:0010 X:0012 Y:00A8 P:envmxdizC $90/BA80 99 04 0C STA $0C04,y[$88:0CAC] A:0010 X:0012 Y:00A8 P:envmxdizC $90/BA83 BF 2D B6 91 LDA $91B62D,x[$91:B63F] A:0010 X:0012 Y:00A8 P:envmxdizC $90/BA87 29 FF 00 AND #$00FF A:0010 X:0012 Y:00A8 P:envmxdizC $90/BA8A 85 16 STA $16 [$00:0016] A:0010 X:0012 Y:00A8 P:envmxdizC $90/BA8C B9 04 0C LDA $0C04,y[$88:0CAC] A:0010 X:0012 Y:00A8 P:envmxdizC $90/BA8F 29 0F 00 AND #$000F A:0010 X:0012 Y:00A8 P:envmxdizC $90/BA92 0A ASL A A:0010 X:0012 Y:00A8 P:envmxdizC $90/BA93 AA TAX A:0010 X:0012 Y:00A8 P:envmxdizC $90/BA94 AD 1C 0A LDA $0A1C [$88:0A1C] A:0010 X:0012 Y:00A8 P:envmxdizC $90/BA97 C9 75 00 CMP #$0075 A:0010 X:0012 Y:00A8 P:envmxdizC $90/BA9A F0 29 BEQ $29 [$BAC5] A:0010 X:0012 Y:00A8 P:envmxdizC $90/BA9C C9 76 00 CMP #$0076 A:0010 X:0012 Y:00A8 P:envmxdizC $90/BA9F F0 24 BEQ $24 [$BAC5] A:0010 X:0012 Y:00A8 P:envmxdizC $90/BAA1 AD 1F 0A LDA $0A1F [$88:0A1F] A:0010 X:0012 Y:00A8 P:envmxdizC $90/BAA4 29 FF 00 AND #$00FF A:0010 X:0012 Y:00A8 P:envmxdizC $90/BAA7 C9 01 00 CMP #$0001 A:0010 X:0012 Y:00A8 P:envmxdizC $90/BAAA F0 19 BEQ $19 [$BAC5] A:0010 X:0012 Y:00A8 P:envmxdizC $90/BAAC BD 04 C2 LDA $C204,x[$88:C216] A:0010 X:0012 Y:00A8 P:envmxdizC $90/BAAF 18 CLC A:0010 X:0012 Y:00A8 P:envmxdizC $90/BAB0 6D F6 0A ADC $0AF6 [$88:0AF6] A:0010 X:0012 Y:00A8 P:envmxdizC $90/BAB3 99 64 0B STA $0B64,y[$88:0C0C] A:0010 X:0012 Y:00A8 P:envmxdizC $90/BAB6 BD 18 C2 LDA $C218,x[$88:C22A] A:0010 X:0012 Y:00A8 P:envmxdizC $90/BAB9 18 CLC A:0010 X:0012 Y:00A8 P:envmxdizC $90/BABA 6D FA 0A ADC $0AFA [$88:0AFA] A:0010 X:0012 Y:00A8 P:envmxdizC $90/BABD 38 SEC A:0010 X:0012 Y:00A8 P:envmxdizC $90/BABE E5 16 SBC $16 [$00:0016] A:0010 X:0012 Y:00A8 P:envmxdizC $90/BAC0 99 78 0B STA $0B78,y[$88:0C20] A:0010 X:0012 Y:00A8 P:envmxdizC $90/BAC3 18 CLC A:0010 X:0012 Y:00A8 P:envmxdizC $90/BAC4 60 RTS A:0010 X:0012 Y:00A8 P:envmxdizC $90/BAC5 BD 2C C2 LDA $C22C,x[$88:C23E] A:0010 X:0012 Y:00A8 P:envmxdizC $90/BAC8 18 CLC A:0010 X:0012 Y:00A8 P:envmxdizC $90/BAC9 6D F6 0A ADC $0AF6 [$88:0AF6] A:0010 X:0012 Y:00A8 P:envmxdizC $90/BACC 99 64 0B STA $0B64,y[$88:0C0C] A:0010 X:0012 Y:00A8 P:envmxdizC $90/BACF BD 40 C2 LDA $C240,x[$88:C252] A:0010 X:0012 Y:00A8 P:envmxdizC $90/BAD2 18 CLC A:0010 X:0012 Y:00A8 P:envmxdizC $90/BAD3 6D FA 0A ADC $0AFA [$88:0AFA] A:0010 X:0012 Y:00A8 P:envmxdizC $90/BAD6 38 SEC A:0010 X:0012 Y:00A8 P:envmxdizC $90/BAD7 E5 16 SBC $16 [$00:0016] A:0010 X:0012 Y:00A8 P:envmxdizC $90/BAD9 99 78 0B STA $0B78,y[$88:0C20] A:0010 X:0012 Y:00A8 P:envmxdizC $90/BADC 18 CLC A:0010 X:0012 Y:00A8 P:envmxdizC $90/BADD 60 RTS A:0010 X:0012 Y:00A8 P:envmxdizC $90/BADE DA PHX A:0010 X:0012 Y:00A8 P:envmxdizC $90/BADF AD 24 0A LDA $0A24 [$88:0A24] A:0010 X:0012 Y:00A8 P:envmxdizC $90/BAE2 0A ASL A A:0010 X:0012 Y:00A8 P:envmxdizC $90/BAE3 0A ASL A A:0010 X:0012 Y:00A8 P:envmxdizC $90/BAE4 0A ASL A A:0010 X:0012 Y:00A8 P:envmxdizC $90/BAE5 AA TAX A:0010 X:0012 Y:00A8 P:envmxdizC $90/BAE6 BF 2C B6 91 LDA $91B62C,x[$91:B63E] A:0010 X:0012 Y:00A8 P:envmxdizC $90/BAEA 89 F0 00 BIT #$00F0 A:0010 X:0012 Y:00A8 P:envmxdizC $90/BAED D0 07 BNE $07 [$BAF6] A:0010 X:0012 Y:00A8 P:envmxdizC $90/BAEF 29 FF 00 AND #$00FF A:0010 X:0012 Y:00A8 P:envmxdizC $90/BAF2 FA PLX A:0010 X:0012 Y:00A8 P:envmxdizC $90/BAF3 4C 80 BA JMP $BA80 [$88:BA80] A:0010 X:0012 Y:00A8 P:envmxdizC $90/BAF6 FA PLX A:0010 X:0012 Y:00A8 P:envmxdizC $90/BAF7 CE CE 0C DEC $0CCE [$88:0CCE] A:0010 X:0012 Y:00A8 P:envmxdizC $90/BAFA 38 SEC A:0010 X:0012 Y:00A8 P:envmxdizC $90/BAFB 60 RTS HUD item select update routine: $90/C4D9 A5 8F LDA $8F [$00:008F] CONTROLLER 1 BUTTONS PRESSED $90/C4DB 2C BA 09 BIT $09BA [$90:09BA] SWITCH ITEM BUTTON $90/C4DE F0 39 BEQ $39 [$C519] IF NOT PRESSED, BRANCH $90/C4E0 AD D2 09 LDA $09D2 [$90:09D2] CURRENTLY SELECTED HUD ITEM $90/C4E3 1A INC A $90/C4E4 C9 06 00 CMP #$0006 $90/C4E7 30 03 BMI $03 [$C4EC] IF MINUS, BRANCH $90/C4E9 A9 00 00 LDA #$0000 $90/C4EC 8D D2 09 STA $09D2 [$90:09D2] STORE BACK TO CURRENT HUD ITEM $90/C4EF 0A ASL A SHIFT LEFT (AX2) $90/C4F0 AA TAX $90/C4F1 FC 39 C5 JSR ($C539,x)[$90:C545] TABLE OF CODE TO RUN BASED ON SELECTED ITEM $90/C4F4 90 14 BCC $14 [$C50A] BRANCH IF CARRY CLEAR $90/C4F6 AD D2 09 LDA $09D2 [$90:09D2] CURRENT HUD ITEM $90/C4F9 1A INC A INCRIMENT $90/C4FA 8D D2 09 STA $09D2 [$90:09D2] AND STORE BACK $90/C4FD C9 06 00 CMP #$0006 COMPARE TO 6 $90/C500 30 ED BMI $ED [$C4EF] IF MINUS, BRANCH AND GO BACK TO CHECK AGAIN $90/C502 A9 00 00 LDA #$0000 $90/C505 8D D2 09 STA $09D2 [$90:09D2] $90/C508 80 E5 BRA $E5 [$C4EF] KEEP GOING UNTIL CARRY IS FINALLY CLEAR $90/C539 TABLE 45 C5 BEAMS 51 C5 MISSILES 64 C5 SUPERS CHANGE TO C556 TO MAKE SUPERS UNSELECTABLE 77 C5 POWERS 8A C5 GRAPPLE AE C5 XRAY $90/C545 9C D0 0C STZ $0CD0 [$88:0CD0] A:0010 X:0012 Y:00A8 P:envmxdizC $90/C548 20 BE BC JSR $BCBE [$88:BCBE] A:0010 X:0012 Y:00A8 P:envmxdizC $90/C54B 22 BA DE 91 JSL $91DEBA[$91:DEBA] A:0010 X:0012 Y:00A8 P:envmxdizC $90/C54F 18 CLC A:0010 X:0012 Y:00A8 P:envmxdizC $90/C550 60 RTS A:0010 X:0012 Y:00A8 P:envmxdizC $90/C551 AD C6 09 LDA $09C6 [$88:09C6] A:0010 X:0012 Y:00A8 P:envmxdizC $90/C554 D0 02 BNE $02 [$C558] A:0010 X:0012 Y:00A8 P:envmxdizC $90/C556 38 SEC A:0010 X:0012 Y:00A8 P:envmxdizC $90/C557 60 RTS A:0010 X:0012 Y:00A8 P:envmxdizC $90/C558 9C D0 0C STZ $0CD0 [$88:0CD0] A:0010 X:0012 Y:00A8 P:envmxdizC $90/C55B 20 BE BC JSR $BCBE [$88:BCBE] A:0010 X:0012 Y:00A8 P:envmxdizC $90/C55E 22 BA DE 91 JSL $91DEBA[$91:DEBA] A:0010 X:0012 Y:00A8 P:envmxdizC $90/C562 18 CLC A:0010 X:0012 Y:00A8 P:envmxdizC $90/C563 60 RTS A:0010 X:0012 Y:00A8 P:envmxdizC FOR SUPERS $90/C564 AD CA 09 LDA $09CA [$88:09CA] A:0010 X:0012 Y:00A8 P:envmxdizC $90/C567 D0 02 BNE $02 [$C56B] A:0010 X:0012 Y:00A8 P:envmxdizC $90/C569 38 SEC A:0010 X:0012 Y:00A8 P:envmxdizC $90/C56A 60 RTS A:0010 X:0012 Y:00A8 P:envmxdizC $90/C56B 9C D0 0C STZ $0CD0 [$88:0CD0] A:0010 X:0012 Y:00A8 P:envmxdizC $90/C56E 20 BE BC JSR $BCBE [$88:BCBE] A:0010 X:0012 Y:00A8 P:envmxdizC $90/C571 22 BA DE 91 JSL $91DEBA[$91:DEBA] A:0010 X:0012 Y:00A8 P:envmxdizC $90/C575 18 CLC A:0010 X:0012 Y:00A8 P:envmxdizC $90/C576 60 RTS A:0010 X:0012 Y:00A8 P:envmxdizC $90/C577 AD CE 09 LDA $09CE [$88:09CE] A:0010 X:0012 Y:00A8 P:envmxdizC $90/C57A D0 02 BNE $02 [$C57E] A:0010 X:0012 Y:00A8 P:envmxdizC $90/C57C 38 SEC A:0010 X:0012 Y:00A8 P:envmxdizC $90/C57D 60 RTS A:0010 X:0012 Y:00A8 P:envmxdizC $90/C57E 9C D0 0C STZ $0CD0 [$88:0CD0] A:0010 X:0012 Y:00A8 P:envmxdizC $90/C581 20 BE BC JSR $BCBE [$88:BCBE] A:0010 X:0012 Y:00A8 P:envmxdizC $90/C584 22 BA DE 91 JSL $91DEBA[$91:DEBA] A:0010 X:0012 Y:00A8 P:envmxdizC $90/C588 18 CLC A:0010 X:0012 Y:00A8 P:envmxdizC $90/C589 60 RTS A:0010 X:0012 Y:00A8 P:envmxdizC $90/C58A AD A2 09 LDA $09A2 [$88:09A2] A:0010 X:0012 Y:00A8 P:envmxdizC $90/C58D 89 00 40 BIT #$4000 A:0010 X:0012 Y:00A8 P:envmxdizC $90/C590 D0 02 BNE $02 [$C594] A:0010 X:0012 Y:00A8 P:envmxdizC $90/C592 38 SEC A:0010 X:0012 Y:00A8 P:envmxdizC $90/C593 60 RTS A:0010 X:0012 Y:00A8 P:envmxdizC $90/C594 AD 32 0D LDA $0D32 [$88:0D32] A:0010 X:0012 Y:00A8 P:envmxdizC $90/C597 C9 F0 C4 CMP #$C4F0 A:0010 X:0012 Y:00A8 P:envmxdizC $90/C59A D0 10 BNE $10 [$C5AC] A:0010 X:0012 Y:00A8 P:envmxdizC $90/C59C 22 BA DE 91 JSL $91DEBA[$91:DEBA] A:0010 X:0012 Y:00A8 P:envmxdizC $90/C5A0 9C D0 0C STZ $0CD0 [$88:0CD0] A:0010 X:0012 Y:00A8 P:envmxdizC $90/C5A3 20 BE BC JSR $BCBE [$88:BCBE] A:0010 X:0012 Y:00A8 P:envmxdizC $90/C5A6 A9 F0 C4 LDA #$C4F0 A:0010 X:0012 Y:00A8 P:envmxdizC $90/C5A9 8D 32 0D STA $0D32 [$88:0D32] A:0010 X:0012 Y:00A8 P:envmxdizC $90/C5AC 18 CLC A:0010 X:0012 Y:00A8 P:envmxdizC $90/C5AD 60 RTS A:0010 X:0012 Y:00A8 P:envmxdizC $90/C5AE AD A2 09 LDA $09A2 [$88:09A2] A:0010 X:0012 Y:00A8 P:envmxdizC $90/C5B1 89 00 80 BIT #$8000 A:0010 X:0012 Y:00A8 P:envmxdizC $90/C5B4 D0 02 BNE $02 [$C5B8] A:0010 X:0012 Y:00A8 P:envmxdizC $90/C5B6 38 SEC A:0010 X:0012 Y:00A8 P:envmxdizC $90/C5B7 60 RTS A:0010 X:0012 Y:00A8 P:envmxdizC $90/C5B8 9C D0 0C STZ $0CD0 [$88:0CD0] A:0010 X:0012 Y:00A8 P:envmxdizC $90/C5BB 20 BE BC JSR $BCBE [$88:BCBE] A:0010 X:0012 Y:00A8 P:envmxdizC $90/C5BE 22 BA DE 91 JSL $91DEBA[$91:DEBA] A:0010 X:0012 Y:00A8 P:envmxdizC $90/C5C2 18 CLC A:0010 X:0012 Y:00A8 P:envmxdizC $90/C5C3 60 RTS A:0010 X:0012 Y:00A8 P:envmxdizC used @ $90/C06D bomb timer value $90/BF9B 3C 00 start of routine for bomb/pb spawn $90/BF9D 08 PHP $90/BF9E C2 30 REP #$30 $90/BFA0 A5 8B LDA $8B [$00:008B] CONTROLLER 1 INPUT $90/BFA2 2D B2 09 AND $09B2 [$88:09B2] SHOOT BUTTON $90/BFA5 F0 0B BEQ $0B [$BFB2] IF NOT PRESSED, BRANCH $90/BFA7 AD D2 09 LDA $09D2 [$88:09D2] CURRENT HUD ITEM $90/BFAA C9 03 00 CMP #$0003 POWERBOMBS $90/BFAD D0 1B BNE $1B [$BFCA] IF NOT SELECTED, BRANCH $90/BFAF 4C 1C C0 JMP $C01C [$88:C01C] otherwise jump to run pb spawn routine BRANCH HERE IF SHOOT BUTTON NOT PRESSED $90/BFB2 AD D0 0C LDA $0CD0 [$88:0CD0] CHARGE VALUE $90/BFB5 F0 11 BEQ $11 [$BFC8] IF NOT ZERO, PLP RTS $90/BFB7 A9 02 00 LDA #$0002 OTHERWISE CLEAR CHARGE SOUND $90/BFBA 22 2B 90 80 JSL $80902B[$80:902B] $90/BFBE 9C D0 0C STZ $0CD0 [$88:0CD0] CLEAR CHARGE $90/BFC1 20 BE BC JSR $BCBE [$88:BCBE] IT'S ANIMATIONS $90/BFC4 22 BA DE 91 JSL $91DEBA[$91:DEBA] AND RESET PALETTE $90/BFC8 28 PLP $90/BFC9 60 RTS IF PRESSED BUT POWERBOMBS NOT SELECTED, GO HERE: $90/BFCA 20 AB C0 JSR $C0AB [$88:C0AB] check if good to spawn bombs, if so carry is set $90/BFCD 90 4B BCC $4B [$C01A] if carry clear, end find correct projectile type array value, and store to $14 $90/BFCF A2 0A 00 LDX #$000A A:0420 X:0003 Y:0058 P:envmxdizC $90/BFD2 BD 18 0C LDA $0C18,x[$88:0C1B] A:0420 X:0003 Y:0058 P:envmxdizC $90/BFD5 F0 09 BEQ $09 [$BFE0] A:0420 X:0003 Y:0058 P:envmxdizC $90/BFD7 E8 INX A:0420 X:0003 Y:0058 P:envmxdizC $90/BFD8 E8 INX A:0420 X:0003 Y:0058 P:envmxdizC $90/BFD9 E0 14 00 CPX #$0014 A:0420 X:0003 Y:0058 P:envmxdizC $90/BFDC 30 F4 BMI $F4 [$BFD2] A:0420 X:0003 Y:0058 P:envmxdizC $90/BFDE CA DEX A:0420 X:0003 Y:0058 P:envmxdizC $90/BFDF CA DEX A:0420 X:0003 Y:0058 P:envmxdizC $90/BFE0 86 14 STX $14 [$00:0014] A:0420 X:0003 Y:0058 P:envmxdizC $90/BFE2 A9 00 05 LDA #$0500 bombs $90/BFE5 9D 18 0C STA $0C18,x[$88:0C1B] projectile type index $90/BFE8 48 PHA $90/BFE9 A9 00 00 LDA #$0000 $90/BFEC 9D 04 0C STA $0C04,x[$88:0C07] Accelerating direction $90/BFEF AD F6 0A LDA $0AF6 [$88:0AF6] Samus's X position in pixels $90/BFF2 9D 64 0B STA $0B64,x[$88:0B67] Projectile X position in pixels $90/BFF5 AD FA 0A LDA $0AFA [$88:0AFA] Samus's Y position in pixels $90/BFF8 9D 78 0B STA $0B78,x[$88:0B7B] Projectile Y position in pixels $90/BFFB AD 9B BF LDA $BF9B [$88:BF9B] loads #$003C into A $90/BFFE 9D 7C 0C STA $0C7C,x[$88:0C7F] Links super missile halves together $90/C001 22 A0 80 93 JSL $9380A0[$93:80A0] unknown $90/C005 A9 99 B0 LDA #$B099 $90/C008 9D 68 0C STA $0C68,x[$88:0C6B] Pointer to code for projectile #1 $90/C00B 68 PLA $90/C00C EB XBA $90/C00D 29 0F 00 AND #$000F $90/C010 A8 TAY $90/C011 B9 7A C2 LDA $C27A,y[$88:C2D2] possible values of 00, 0A, 14, 28, 10 $90/C014 29 FF 00 AND #$00FF $90/C017 8D CC 0C STA $0CCC [$88:0CCC] cooldown timer $90/C01A 28 PLP $90/C01B 60 RTS GO HERE IF SHOOT PRESSED WITH POWERBOMBS SELECTED $90/C01C AD EE 0C LDA $0CEE [$88:0CEE] PROJECTILE COUNTER $90/C01F 10 02 BPL $02 [$C023] IF SET, BRANCH $90/C021 28 PLP $90/C022 60 RTS $90/C023 20 E7 C0 JSR $C0E7 [$88:C0E7] CARRY CLEAR IF SHOOT BUTTON NOT PRESSED $90/C026 90 F9 BCC $F9 [$C021] if carry set, 1 was added to cooldown and bomb counters $90/C028 AD CE 09 LDA $09CE [$88:09CE] pb ammo $90/C02B F0 7C BEQ $7C [$C0A9] if zero, branch (plp rts) $90/C02D 3A DEC A sub 1 $90/C02E 8D CE 09 STA $09CE [$88:09CE] and store back $90/C031 30 76 BMI $76 [$C0A9] if now minus, branch (plp rts) $90/C033 A9 FF FF LDA #$FFFF $90/C036 8D EE 0C STA $0CEE [$88:0CEE] Special powerbomb timer find correct projectile type array value, and store to $14 $90/C039 A2 0A 00 LDX #$000A $90/C03C BD 18 0C LDA $0C18,x[$88:0C1B] A:0420 X:0003 Y:0058 P:envmxdizC $90/C03F F0 09 BEQ $09 [$C04A] A:0420 X:0003 Y:0058 P:envmxdizC $90/C041 E8 INX A:0420 X:0003 Y:0058 P:envmxdizC $90/C042 E8 INX A:0420 X:0003 Y:0058 P:envmxdizC $90/C043 E0 14 00 CPX #$0014 A:0420 X:0003 Y:0058 P:envmxdizC $90/C046 30 F4 BMI $F4 [$C03C] A:0420 X:0003 Y:0058 P:envmxdizC $90/C048 CA DEX A:0420 X:0003 Y:0058 P:envmxdizC $90/C049 CA DEX A:0420 X:0003 Y:0058 P:envmxdizC $90/C04A 86 14 STX $14 [$00:0014] $90/C04C AD D2 09 LDA $09D2 [$88:09D2] current HUD item $90/C04F EB XBA $90/C050 85 12 STA $12 [$00:0012] $90/C052 BD 18 0C LDA $0C18,x[$88:0C1B] projectile type index $90/C055 05 12 ORA $12 [$00:0012] $90/C057 9D 18 0C STA $0C18,x[$88:0C1B] $90/C05A 48 PHA $90/C05B A9 00 00 LDA #$0000 $90/C05E 9D 04 0C STA $0C04,x[$88:0C07] Accelerating direction $90/C061 AD F6 0A LDA $0AF6 [$88:0AF6] Samus's X position in pixels $90/C064 9D 64 0B STA $0B64,x[$88:0B67] Projectile X position in pixels $90/C067 AD FA 0A LDA $0AFA [$88:0AFA] Samus's Y position in pixels $90/C06A 9D 78 0B STA $0B78,x[$88:0B7B] Projectile Y position in pixels $90/C06D AD 9B BF LDA $BF9B [$88:BF9B] loads #$003C into A $90/C070 9D 7C 0C STA $0C7C,x[$88:0C7F] Links super missile halves together (top byte is a flag, linked if set. Bottom byte tells linked index) $90/C073 22 A0 80 93 JSL $9380A0[$93:80A0] unknown $90/C077 A9 AE B0 LDA #$B0AE $90/C07A 9D 68 0C STA $0C68,x[$88:0C6B] Pointer to code for projectile #1 $90/C07D 68 PLA $90/C07E EB XBA $90/C07F 29 0F 00 AND #$000F $90/C082 A8 TAY HUD item select now in Y $90/C083 B9 7A C2 LDA $C27A,y[$88:C2D2] will either be 140A or 1000 (probably 140A) $90/C086 29 FF 00 AND #$00FF drop 1st byte $90/C089 8D CC 0C STA $0CCC [$88:0CCC] Cooldown counter next section determines if HUD item should cancel $90/C08C AD 04 0A LDA $0A04 [$88:0A04] Item selected for auto-cancel $90/C08F F0 08 BEQ $08 [$C099] if zero, branch $90/C091 9C D2 09 STZ $09D2 [$88:09D2] HUD item $90/C094 9C 04 0A STZ $0A04 [$88:0A04] item for auto cancel $90/C097 80 10 BRA $10 [$C0A9] end (plp rts) $90/C099 AD D2 09 LDA $09D2 [$88:09D2] current HUD item $90/C09C C9 03 00 CMP #$0003 powerbombs $90/C09F D0 08 BNE $08 [$C0A9] if negative, end $90/C0A1 AD CE 09 LDA $09CE [$88:09CE] pb ammo $90/C0A4 D0 03 BNE $03 [$C0A9] if negative, end $90/C0A6 9C D2 09 STZ $09D2 [$88:09D2] zero HUD item select $90/C0A9 28 PLP $90/C0AA 60 RTS runs check to see if ok to spawn bombs: $90/C0AB AD A2 09 LDA $09A2 [$88:09A2] equiped items $90/C0AE 89 00 10 BIT #$1000 bombs $90/C0B1 F0 32 BEQ $32 [$C0E5] if not equiped, clc rts $90/C0B3 AD D0 0C LDA $0CD0 [$88:0CD0] charge $90/C0B6 C9 3C 00 CMP #$003C full charge $90/C0B9 30 2C BMI $2C [$C0E7] if not full, branch $90/C0BB AD D2 0C LDA $0CD2 [$88:0CD2] Bomb counter $90/C0BE D0 27 BNE $27 [$C0E7] if negative, branch $90/C0C0 A5 8B LDA $8B [$00:008B] controller 1 input $90/C0C2 89 00 04 BIT #$0400 pressing down $90/C0C5 F0 10 BEQ $10 [$C0D7] if not pressed, branch $90/C0C7 AD D4 0C LDA $0CD4 [$88:0CD4] Bomb charge counter $90/C0CA 29 C0 00 AND #$00C0 get rid of all but the lower bits $90/C0CD C9 C0 00 CMP #$00C0 see if they're set for auto release $90/C0D0 10 05 BPL $05 [$C0D7] if so, branch $90/C0D2 EE D4 0C INC $0CD4 [$88:0CD4] if not, inc $90/C0D5 80 0E BRA $0E [$C0E5] clc rts go here if not holding down $90/C0D7 20 49 D8 JSR $D849 [$88:D849] runs bomb spread projectiles $90/C0DA 22 BA DE 91 JSL $91DEBA[$91:DEBA] reset palette $90/C0DE A9 02 00 LDA #$0002 clear charge sound $90/C0E1 22 2B 90 80 JSL $80902B[$80:902B] $90/C0E5 18 CLC $90/C0E6 60 RTS go here if charge not full: also start of routine called at start of pb specific routine $90/C0E7 A5 8F LDA $8F [$00:008F] Controller 1 Buttons newly pressed this frame $90/C0E9 2C B2 09 BIT $09B2 [$88:09B2] SHOOT $90/C0EC F0 22 BEQ $22 [$C110] IF NOT PRESSED BRANCH $90/C0EE AD D2 0C LDA $0CD2 [$88:0CD2] Bomb counter $90/C0F1 F0 0D BEQ $0D [$C100] if zero, branch $90/C0F3 C9 05 00 CMP #$0005 compare to 0005 $90/C0F6 10 18 BPL $18 [$C110] if 5 or more, go to not pressed branch $90/C0F8 AD CC 0C LDA $0CCC [$88:0CCC] Cooldown counter $90/C0FB 29 FF 00 AND #$00FF ditch the high byte $90/C0FE D0 10 BNE $10 [$C110] if counter not set, go to not pressed branch $90/C100 AD CC 0C LDA $0CCC [$88:0CCC] Cooldown counter $90/C103 1A INC A add 1 $90/C104 8D CC 0C STA $0CCC [$88:0CCC] and store back $90/C107 AD D2 0C LDA $0CD2 [$88:0CD2] Bomb counter $90/C10A 1A INC A add 1 $90/C10B 8D D2 0C STA $0CD2 [$88:0CD2] and store back $90/C10E 38 SEC set carry $90/C10F 60 RTS BRANCH HERE IF SHOOT NOT PRESSED $90/C110 AD D0 0C LDA $0CD0 [$88:0CD0] CHARGE $90/C113 F0 11 BEQ $11 [$C126] IF NOT CHARGED, END $90/C115 A9 02 00 LDA #$0002 OTHERWISE CLEAR CHARGE SOUND $90/C118 22 2B 90 80 JSL $80902B[$80:902B] $90/C11C 9C D0 0C STZ $0CD0 [$88:0CD0] AND CHARGE VALUE $90/C11F 20 BE BC JSR $BCBE [$88:BCBE] ANIMATIONS $90/C122 22 BA DE 91 JSL $91DEBA[$91:DEBA] RESET PALETTE $90/C126 18 CLC CLEAR CARRY $90/C127 60 RTS 84CC0 - AD D2 09 to EA EA EA Disables the use of SBAs that activate when charging ice, spazer, wave or plasma by themselves while power bombs are selected. 84F34 - 20 to ?? Adjusts how far away the ice beam SBA circles around Samus. 10 = smaller radius; closer to Samus, 20 = standard radius, 40 = larger radius, etc. (found by Flamestar666) 84F71 - 02 to 01 Allows Samus to fire beams while the ice beam SBA is in effect (found by Flamestar666). 83847 - 78 00 to ?? ?? Adjusts how long Samus' beam must be charging before SBAs activate. 40 00 = almost instantly, 78 00 = standard; about 2 seconds, FF 01 = about 8 seconds, etc. (found by Black Falcon) spawns the SBA attacks: $90/CCC0 AD D2 09 LDA $09D2 [$88:09D2] HUD selection $90/CCC3 C9 03 00 CMP #$0003 powerbombs $90/CCC6 F0 02 BEQ $02 [$CCCA] $90/CCC8 18 CLC $90/CCC9 60 RTS $90/CCCA AD A6 09 LDA $09A6 [$88:09A6] equiped beams $90/CCCD 29 0F 00 AND #$000F $90/CCD0 0A ASL A $90/CCD1 AA TAX $90/CCD2 AD CE 09 LDA $09CE [$88:09CE] current pb ammo $90/CCD5 38 SEC $90/CCD6 FD 21 CC SBC $CC21,x[$88:CC33] $90/CCD9 10 03 BPL $03 [$CCDE] $90/CCDB A9 00 00 LDA #$0000 $90/CCDE 8D CE 09 STA $09CE [$88:09CE] current pb ammo $90/CCE1 FC F0 CC JSR ($CCF0,x)[$88:2281] code to spawn projectiles? $90/CCE4 AD CE 09 LDA $09CE [$88:09CE] current pb ammo $90/CCE7 D0 06 BNE $06 [$CCEF] $90/CCE9 9C D2 09 STZ $09D2 [$88:09D2] cancels HUD selection $90/CCEC 9C 04 0A STZ $0A04 [$88:0A04] $90/CCEF 60 RTS Table array at $CC21 00 00 power beam 01 00 wave 01 00 ice 00 00 wave + ice 01 00 spazer 00 00 spazer + wave 00 00 spazer + ice 00 00 spacer + wave + ice 01 00 plasma 00 00 plasma + wave 00 00 plasma + ice 00 00 plasma + wave + ice table array at $CCF0 (separate routines that spawn the SBAs) 18 CD power beam 1A CD wave 9B CD ice 18 CD wave + ice 14 CE spazer 18 CD spazer + wave 18 CD spazer + ice 18 CD spacer + wave + ice 98 CE plasma 18 CD plasma + wave 18 CD plasma + ice 18 CD plasma + wave + ice Table used by plasma SBA: $90/CD08 00 00 40 00 80 00 C0 00 20 00 60 00 A0 00 E0 00 general use end code for not allowing SBA $90/CD18 18 CLC A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD19 60 RTS A:0010 X:0012 Y:00A8 P:envmxdizC wave SBA $90/CD1A A2 06 00 LDX #$0006 A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD1D A9 04 00 LDA #$0004 A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD20 9D 90 0C STA $0C90,x[$88:0CA2] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD23 AD A6 09 LDA $09A6 [$88:09A6] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD26 29 0F 10 AND #$100F A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD29 09 10 80 ORA #$8010 A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD2C 9D 18 0C STA $0C18,x[$88:0C2A] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD2F 9E 04 0C STZ $0C04,x[$88:0C16] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD32 A9 08 DA LDA #$DA08 A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD35 9D 68 0C STA $0C68,x[$88:0C7A] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD38 A9 58 02 LDA #$0258 A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD3B 9D F0 0B STA $0BF0,x[$88:0C02] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD3E 9E DC 0B STZ $0BDC,x[$88:0BEE] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD41 9E 7C 0C STZ $0C7C,x[$88:0C8E] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD44 9E 8C 0B STZ $0B8C,x[$88:0B9E] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD47 9E A0 0B STZ $0BA0,x[$88:0BB2] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD4A AD F6 0A LDA $0AF6 [$88:0AF6] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD4D 18 CLC A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD4E 7D 8B CD ADC $CD8B,x[$88:CD9D] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD51 9D 64 0B STA $0B64,x[$88:0B76] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD54 AD FA 0A LDA $0AFA [$88:0AFA] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD57 18 CLC A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD58 7D 93 CD ADC $CD93,x[$88:CDA5] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD5B 9D 78 0B STA $0B78,x[$88:0B8A] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD5E 22 A4 81 93 JSL $9381A4[$93:81A4] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD62 CA DEX A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD63 CA DEX A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD64 10 B7 BPL $B7 [$CD1D] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD66 A9 04 00 LDA #$0004 A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD69 8D CE 0C STA $0CCE [$88:0CCE] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD6C AD 18 0C LDA $0C18 [$88:0C18] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD6F 29 3F 00 AND #$003F A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD72 A8 TAY A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD73 B9 54 C2 LDA $C254,y[$88:C2FC] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD76 29 FF 00 AND #$00FF A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD79 8D CC 0C STA $0CCC [$88:0CCC] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD7C A9 04 00 LDA #$0004 A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD7F 8D 60 0B STA $0B60 [$88:0B60] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD82 A9 28 00 LDA #$0028 A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD85 22 49 90 80 JSL $809049[$80:9049] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD89 38 SEC A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD8A 60 RTS A:0010 X:0012 Y:00A8 P:envmxdizC tables used by wave SBA: $90/CD8B 80 00 80 00 80 FF 80 FF $90/CD93 80 00 80 FF 80 FF 80 00 ice SBA: $90/CD9B AD 68 0C LDA $0C68 [$88:0C68] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CD9E C9 7A CF CMP #$CF7A A:0010 X:0012 Y:00A8 P:envmxdizC $90/CDA1 F0 05 BEQ $05 [$CDA8] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CDA3 C9 09 CF CMP #$CF09 A:0010 X:0012 Y:00A8 P:envmxdizC $90/CDA6 D0 02 BNE $02 [$CDAA] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CDA8 18 CLC A:0010 X:0012 Y:00A8 P:envmxdizC $90/CDA9 60 RTS A:0010 X:0012 Y:00A8 P:envmxdizC $90/CDAA A2 06 00 LDX #$0006 A:0010 X:0012 Y:00A8 P:envmxdizC $90/CDAD A9 04 00 LDA #$0004 A:0010 X:0012 Y:00A8 P:envmxdizC $90/CDB0 9D 90 0C STA $0C90,x[$88:0CA2] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CDB3 AD A6 09 LDA $09A6 [$88:09A6] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CDB6 29 0F 10 AND #$100F A:0010 X:0012 Y:00A8 P:envmxdizC $90/CDB9 09 10 80 ORA #$8010 A:0010 X:0012 Y:00A8 P:envmxdizC $90/CDBC 9D 18 0C STA $0C18,x[$88:0C2A] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CDBF 9E 04 0C STZ $0C04,x[$88:0C16] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CDC2 A9 09 CF LDA #$CF09 A:0010 X:0012 Y:00A8 P:envmxdizC $90/CDC5 9D 68 0C STA $0C68,x[$88:0C7A] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CDC8 BD 08 CD LDA $CD08,x[$88:CD1A] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CDCB 9D 7C 0C STA $0C7C,x[$88:0C8E] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CDCE A9 58 02 LDA #$0258 A:0010 X:0012 Y:00A8 P:envmxdizC $90/CDD1 9D F0 0B STA $0BF0,x[$88:0C02] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CDD4 22 00 80 93 JSL $938000[$93:8000] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CDD8 CA DEX A:0010 X:0012 Y:00A8 P:envmxdizC $90/CDD9 CA DEX A:0010 X:0012 Y:00A8 P:envmxdizC $90/CDDA 10 D1 BPL $D1 [$CDAD] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CDDC A9 04 00 LDA #$0004 A:0010 X:0012 Y:00A8 P:envmxdizC $90/CDDF 8D CE 0C STA $0CCE [$88:0CCE] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CDE2 AD 18 0C LDA $0C18 [$88:0C18] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CDE5 29 3F 00 AND #$003F A:0010 X:0012 Y:00A8 P:envmxdizC $90/CDE8 A8 TAY A:0010 X:0012 Y:00A8 P:envmxdizC $90/CDE9 B9 54 C2 LDA $C254,y[$88:C2FC] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CDEC 29 FF 00 AND #$00FF A:0010 X:0012 Y:00A8 P:envmxdizC $90/CDEF 8D CC 0C STA $0CCC [$88:0CCC] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CDF2 AD 1E 0A LDA $0A1E [$88:0A1E] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CDF5 29 FF 00 AND #$00FF A:0010 X:0012 Y:00A8 P:envmxdizC $90/CDF8 C9 04 00 CMP #$0004 A:0010 X:0012 Y:00A8 P:envmxdizC $90/CDFB F0 08 BEQ $08 [$CE05] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CDFD A9 04 00 LDA #$0004 A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE00 8D 60 0B STA $0B60 [$88:0B60] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE03 80 06 BRA $06 [$CE0B] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE05 A9 FC FF LDA #$FFFC A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE08 8D 60 0B STA $0B60 [$88:0B60] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE0B A9 23 00 LDA #$0023 A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE0E 22 49 90 80 JSL $809049[$80:9049] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE12 38 SEC A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE13 60 RTS A:0010 X:0012 Y:00A8 P:envmxdizC spazer SBA: $90/CE14 A2 06 00 LDX #$0006 A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE17 BD 88 CE LDA $CE88,x[$88:CE9A] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE1A 9D 90 0C STA $0C90,x[$88:0CA2] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE1D A9 05 00 LDA #$0005 A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE20 9D 04 0C STA $0C04,x[$88:0C16] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE23 A9 06 DB LDA #$DB06 A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE26 9D 68 0C STA $0C68,x[$88:0C7A] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE29 A9 28 00 LDA #$0028 A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE2C 9D DC 0B STA $0BDC,x[$88:0BEE] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE2F BD 90 CE LDA $CE90,x[$88:CEA2] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE32 9D F0 0B STA $0BF0,x[$88:0C02] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE35 9E 7C 0C STZ $0C7C,x[$88:0C8E] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE38 9E A4 0C STZ $0CA4,x[$88:0CB6] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE3B 9E 8C 0B STZ $0B8C,x[$88:0B9E] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE3E 9E A0 0B STZ $0BA0,x[$88:0BB2] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE41 E0 04 00 CPX #$0004 A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE44 10 12 BPL $12 [$CE58] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE46 AD A6 09 LDA $09A6 [$88:09A6] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE49 29 0F 10 AND #$100F A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE4C 09 10 80 ORA #$8010 A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE4F 9D 18 0C STA $0C18,x[$88:0C2A] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE52 22 A4 81 93 JSL $9381A4[$93:81A4] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE56 80 0A BRA $0A [$CE62] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE58 A9 24 80 LDA #$8024 A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE5B 9D 18 0C STA $0C18,x[$88:0C2A] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE5E 22 63 81 93 JSL $938163[$93:8163] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE62 CA DEX A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE63 CA DEX A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE64 10 B1 BPL $B1 [$CE17] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE66 A9 04 00 LDA #$0004 A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE69 8D CE 0C STA $0CCE [$88:0CCE] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE6C AD 18 0C LDA $0C18 [$88:0C18] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE6F 29 3F 00 AND #$003F A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE72 A8 TAY A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE73 B9 54 C2 LDA $C254,y[$88:C2FC] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE76 29 FF 00 AND #$00FF A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE79 8D CC 0C STA $0CCC [$88:0CCC] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE7C 9C 60 0B STZ $0B60 [$88:0B60] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE7F A9 25 00 LDA #$0025 A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE82 22 49 90 80 JSL $809049[$80:9049] A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE86 38 SEC A:0010 X:0012 Y:00A8 P:envmxdizC $90/CE87 60 RTS A:0010 X:0012 Y:00A8 P:envmxdizC tables used by spazer SBA: $90/CE88 00 00 00 00 04 00 04 00 $90/CE90 04 00 FC FF 04 00 FC FF plasma SBA: $90/CE98 AD 68 0C LDA $0C68 [$88:0C68] Pointer to code for projectile #1 $90/CE9B C9 93 D7 CMP #$D793 value for plasma SBA $90/CE9E D0 02 BNE $02 [$CEA2] if not, then branch $90/CEA0 18 CLC $90/CEA1 60 RTS $90/CEA2 A2 06 00 LDX #$0006 $90/CEA5 AD A6 09 LDA $09A6 [$88:09A6] equiped beams $90/CEA8 29 0F 10 AND #$100F nix everything but values for charge and each beam $90/CEAB 09 10 80 ORA #$8010 set bits for charged and live projectile $90/CEAE 9D 18 0C STA $0C18,x[$88:0C2A] Projectile type array $90/CEB1 9E 04 0C STZ $0C04,x[$88:0C16] Accelerating direction $90/CEB4 A9 93 D7 LDA #$D793 value for plasma SBA $90/CEB7 9D 68 0C STA $0C68,x[$88:0C7A] Pointer to code for projectile #1 $90/CEBA BD 08 CD LDA $CD08,x[$88:CD1A] table $90/CEBD 9D 7C 0C STA $0C7C,x[$88:0C8E] Links super missile halves together $90/CEC0 A9 28 00 LDA #$0028 $90/CEC3 9D DC 0B STA $0BDC,x[$88:0BEE] Projectile X speed (1/256th pixel/frame?). $90/CEC6 9E F0 0B STZ $0BF0,x[$88:0C02] Projectile Y speed $90/CEC9 22 A4 81 93 JSL $9381A4[$93:81A4] spawn projectile? $90/CECD CA DEX $90/CECE CA DEX $90/CECF 10 D4 BPL $D4 [$CEA5] and produce another one until all 4 are produced $90/CED1 A9 04 00 LDA #$0004 $90/CED4 8D CE 0C STA $0CCE [$88:0CCE] Projectile counter? $90/CED7 AD 18 0C LDA $0C18 [$88:0C18] Projectile type array $90/CEDA 29 3F 00 AND #$003F $90/CEDD A8 TAY $90/CEDE B9 54 C2 LDA $C254,y[$88:C2FC] $90/CEE1 29 FF 00 AND #$00FF $90/CEE4 8D CC 0C STA $0CCC [$88:0CCC] Cooldown counter $90/CEE7 AD 1E 0A LDA $0A1E [$88:0A1E] X-Direction Samus is moving? 8 = right, 4 = left $90/CEEA 29 FF 00 AND #$00FF $90/CEED C9 04 00 CMP #$0004 $90/CEF0 F0 08 BEQ $08 [$CEFA] $90/CEF2 A9 04 00 LDA #$0004 $90/CEF5 8D 60 0B STA $0B60 [$88:0B60] Used for the SBA attacks. Cleared by Spazer. Set to 0004 by Wave, but unused. Used as a rotation speed with Ice and Plasma $90/CEF8 80 06 BRA $06 [$CF00] $90/CEFA A9 FC FF LDA #$FFFC $90/CEFD 8D 60 0B STA $0B60 [$88:0B60] Used for the SBA attacks. Cleared by Spazer. Set to 0004 by Wave, but unused. Used as a rotation speed with Ice and Plasma $90/CF00 A9 27 00 LDA #$0027 $90/CF03 22 49 90 80 JSL $809049[$80:9049] play a sound $90/CF07 38 SEC $90/CF08 60 RTS $90/C254 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0C 0F 00 00 00 00 1E 1E 1E 1E 1E 1E 1E 1E 1E 1E 1E 1E 00 00 00 00 00 00 00 00 00 00 00 0A 14 28 00 10 00 00 00 19 19 19 19 19 19 19 19 19 19 19 19 0B 00 0D 00 0C