| |
metroid:disassembly:title_page [2015/04/20 23:03] – created gf_kennon | metroid:disassembly:title_page [2015/06/07 12:13] (current) – Tabs to spaces snarfblam |
---|
;-------------------------------------[ Forward declarations ]-------------------------------------- | ;-------------------------------------[ Forward declarations ]-------------------------------------- |
| |
.alias startup $C01A | .alias startup $C01A |
.alias NMI $C0D9 | .alias NMI $C0D9 |
.alias ClearNameTables $C158 | .alias ClearNameTables $C158 |
.alias ClearNameTable0 $C16D | .alias ClearNameTable0 $C16D |
.alias EraseAllSprites $C1A3 | .alias EraseAllSprites $C1A3 |
.alias RemoveIntroSprites $C1BC | .alias RemoveIntroSprites $C1BC |
.alias ClearRAM_33_DF $C1D4 | .alias ClearRAM_33_DF $C1D4 |
.alias PreparePPUProcess_ $C20E | .alias PreparePPUProcess_ $C20E |
.alias ChooseRoutine $C27C | .alias ChooseRoutine $C27C |
.alias AddYToPtr02 $C2B3 | .alias AddYToPtr02 $C2B3 |
.alias Adiv16 $C2BF | .alias Adiv16 $C2BF |
.alias Adiv8 $C2C0 | .alias Adiv8 $C2C0 |
.alias Amul16 $C2C5 | .alias Amul16 $C2C5 |
.alias Amul8 $C2C6 | .alias Amul8 $C2C6 |
.alias ProcessPPUString $C30C | .alias ProcessPPUString $C30C |
.alias EraseTile $C328 | .alias EraseTile $C328 |
.alias WritePPUByte $C36B | .alias WritePPUByte $C36B |
.alias PrepPPUPaletteString $C37E | .alias PrepPPUPaletteString $C37E |
.alias TwosCompliment $C3D4 | .alias TwosCompliment $C3D4 |
.alias WaitNMIPass $C42C | .alias WaitNMIPass $C42C |
.alias ScreenOff $C439 | .alias ScreenOff $C439 |
.alias WaitNMIPass_ $C43F | .alias WaitNMIPass_ $C43F |
.alias ScreenOn $C447 | .alias ScreenOn $C447 |
.alias ExitSub $C45C | .alias ExitSub $C45C |
.alias ScreenNmiOff $C45D | .alias ScreenNmiOff $C45D |
.alias VBOffAndHorzWrite $C47D | .alias VBOffAndHorzWrite $C47D |
.alias NmiOn $C487 | .alias NmiOn $C487 |
.alias SetTimer $C4AA | .alias SetTimer $C4AA |
.alias ClearSamusStats $C578 | .alias ClearSamusStats $C578 |
.alias InitEndGFX $C5D0 | .alias InitEndGFX $C5D0 |
.alias LoadSamusGFX $C5DC | .alias LoadSamusGFX $C5DC |
.alias InitGFX7 $C6D6 | .alias InitGFX7 $C6D6 |
.alias BankTable $CA30 | .alias BankTable $CA30 |
.alias ChooseEnding $CAF5 | .alias ChooseEnding $CAF5 |
.alias SilenceMusic $CB8E | .alias SilenceMusic $CB8E |
| |
;-----------------------------------------[ Start of code ]------------------------------------------ | ;-----------------------------------------[ Start of code ]------------------------------------------ |
| |
MainTitleRoutine: | MainTitleRoutine: |
L8000: lda TitleRoutine ; | L8000: lda TitleRoutine ; |
L8002: cmp #$15 ;If intro routines not running, branch. | L8002: cmp #$15 ;If intro routines not running, branch. |
L8004: bcs ++ ; | L8004: bcs ++ ; |
L8006: lda Joy1Change ; | L8006: lda Joy1Change ; |
L8008: and #$10 ;if start has not been pressed, branch. | L8008: and #$10 ;if start has not been pressed, branch. |
L800A: beq + ; | L800A: beq + ; |
L800C: ldy #$00 ; | L800C: ldy #$00 ; |
L800E: sty SpareMemD1 ;Not accessed by game. | L800E: sty SpareMemD1 ;Not accessed by game. |
L8010: sty SpareMemBB ;Not accessed by game. | L8010: sty SpareMemBB ;Not accessed by game. |
L8012: sty SpareMemB7 ;Accessed by unused routine. | L8012: sty SpareMemB7 ;Accessed by unused routine. |
L8014: sty SpareMemB8 ;Accessed by unused routine. | L8014: sty SpareMemB8 ;Accessed by unused routine. |
L8016: lda PPUCNT0ZP ; | L8016: lda PPUCNT0ZP ; |
L8018: and #$FC ;Set name table to name table 0. | L8018: and #$FC ;Set name table to name table 0. |
L801A: sta PPUCNT0ZP ; | L801A: sta PPUCNT0ZP ; |
L801C: lda #$1B ;If start pressed, load START/CONTINUE screen. | L801C: lda #$1B ;If start pressed, load START/CONTINUE screen. |
L801E: sta TitleRoutine ; | L801E: sta TitleRoutine ; |
L8020: bne ++ ;Branch always. | L8020: bne ++ ;Branch always. |
L8022:* jsr RemoveIntroSprites ;($C1BC)Remove sparkle and crosshair sprites from screen. | L8022:* jsr RemoveIntroSprites ;($C1BC)Remove sparkle and crosshair sprites from screen. |
L8025: lda TitleRoutine ; | L8025: lda TitleRoutine ; |
L8027:* jsr ChooseRoutine ;($C27C)Jump to proper routine below. | L8027:* jsr ChooseRoutine ;($C27C)Jump to proper routine below. |
| |
L802A: .word InitializeAfterReset ;($8071)First routine after reset. | L802A: .word InitializeAfterReset ;($8071)First routine after reset. |
L802C: .word DrawIntroBackground ;($80D0)Draws ground on intro screen. | L802C: .word DrawIntroBackground ;($80D0)Draws ground on intro screen. |
L802E: .word FadeInDelay ;($80F9)Sets up METROID fade in delay. | L802E: .word FadeInDelay ;($80F9)Sets up METROID fade in delay. |
L8030: .word METROIDFadeIn ;($812C)Fade METROID onto screen. | L8030: .word METROIDFadeIn ;($812C)Fade METROID onto screen. |
L8032: .word LoadFlashTimer ;($8142)Load timer for METROID flash. | L8032: .word LoadFlashTimer ;($8142)Load timer for METROID flash. |
L8034: .word FlashEffect ;($8109)Makes METROID flash. | L8034: .word FlashEffect ;($8109)Makes METROID flash. |
L8036: .word METROIDSparkle ;($814D)Top and bottom "sparkles" on METROID. | L8036: .word METROIDSparkle ;($814D)Top and bottom "sparkles" on METROID. |
L8038: .word METROIDFadeOut ;($8163)Fades METROID off the screen. | L8038: .word METROIDFadeOut ;($8163)Fades METROID off the screen. |
L803A: .word Crosshairs ;($8182)Displays "crosshairs" effect on screen. | L803A: .word Crosshairs ;($8182)Displays "crosshairs" effect on screen. |
L803C: .word MoreCrosshairs ;($81D1)Continue "crosshairs" effect. | L803C: .word MoreCrosshairs ;($81D1)Continue "crosshairs" effect. |
L803E: .word IncTitleRoutine ;($806E)Increment TitleRoutine. | L803E: .word IncTitleRoutine ;($806E)Increment TitleRoutine. |
L8040: .word IncTitleRoutine ;($806E)Increment TitleRoutine. | L8040: .word IncTitleRoutine ;($806E)Increment TitleRoutine. |
L8042: .word ChangeIntroNameTable ;($822E)Change from name table 0 to name table 1. | L8042: .word ChangeIntroNameTable ;($822E)Change from name table 0 to name table 1. |
L8044: .word MessageFadeIn ;($8243)Fade in intro sequence message. | L8044: .word MessageFadeIn ;($8243)Fade in intro sequence message. |
L8046: .word MessageFadeOut ;($8263)Fade out intro sequence message. | L8046: .word MessageFadeOut ;($8263)Fade out intro sequence message. |
L8048: .word DelayIntroReplay ;($8283)Set Delay time before intro sequence restarts. | L8048: .word DelayIntroReplay ;($8283)Set Delay time before intro sequence restarts. |
L804A: .word ClearSpareMem ;($8068)clears some memory addresses not used by game. | L804A: .word ClearSpareMem ;($8068)clears some memory addresses not used by game. |
L804C: .word PrepIntroRestart ;($82A3)Prepare to restart intro routines. | L804C: .word PrepIntroRestart ;($82A3)Prepare to restart intro routines. |
L804E: .word TitleScreenOff ;($82ED)Turn screen off. | L804E: .word TitleScreenOff ;($82ED)Turn screen off. |
L8050: .word TitleRoutineReturn ;($82F3)Rts. | L8050: .word TitleRoutineReturn ;($82F3)Rts. |
L8052: .word TitleRoutineReturn ;($82F3)Rts. | L8052: .word TitleRoutineReturn ;($82F3)Rts. |
L8054: .word StartContinueScreen ;($90BA)Displays START/Continue screen. | L8054: .word StartContinueScreen ;($90BA)Displays START/Continue screen. |
L8056: .word ChooseStartContinue ;($90D7)player chooses between START and CONTINUE. | L8056: .word ChooseStartContinue ;($90D7)player chooses between START and CONTINUE. |
L8058: .word LoadPasswordScreen ;($911A)Loads password entry screen. | L8058: .word LoadPasswordScreen ;($911A)Loads password entry screen. |
L805A: .word EnterPassword ;($9147)User enters password. | L805A: .word EnterPassword ;($9147)User enters password. |
L805C: .word DisplayPassword ;($9359)After game over, display password on screen. | L805C: .word DisplayPassword ;($9359)After game over, display password on screen. |
L805E: .word WaitForSTART ;($9394)Wait for START when showing password. | L805E: .word WaitForSTART ;($9394)Wait for START when showing password. |
L8060: .word StartContinueScreen ;($90BA)Displays START/Continue screen. | L8060: .word StartContinueScreen ;($90BA)Displays START/Continue screen. |
L8062: .word GameOver ;($939E)Displays "GAME OVER". | L8062: .word GameOver ;($939E)Displays "GAME OVER". |
L8064: .word EndGame ;($9AA7)Show ending of the game. | L8064: .word EndGame ;($9AA7)Show ending of the game. |
L8066: .word SetTimer ;($C4AA)Set delay timer. | L8066: .word SetTimer ;($C4AA)Set delay timer. |
| |
;----------------------------------------[ Intro routines ]------------------------------------------ | ;----------------------------------------[ Intro routines ]------------------------------------------ |
| |
ClearSpareMem: | ClearSpareMem: |
L8068: lda #$00 ; | L8068: lda #$00 ; |
L806A: sta SpareMemCB ;Clears two memory addresses not used by the game. | L806A: sta SpareMemCB ;Clears two memory addresses not used by the game. |
L806C: sta SpareMemC9 ; | L806C: sta SpareMemC9 ; |
| |
IncTitleRoutine: | IncTitleRoutine: |
L806E: inc TitleRoutine ;Increment to next title routine. | L806E: inc TitleRoutine ;Increment to next title routine. |
L8070: rts ; | L8070: rts ; |
| |
InitializeAfterReset: | InitializeAfterReset: |
L8071: ldy #$02 ;Y=2. | L8071: ldy #$02 ;Y=2. |
L8073: sty SpareMemCF ;Not accessed by game. | L8073: sty SpareMemCF ;Not accessed by game. |
L8075: sty SpareMemCC ;Not accessed by game. | L8075: sty SpareMemCC ;Not accessed by game. |
L8077: dey ;Y=1. | L8077: dey ;Y=1. |
L8078: sty SpareMemCE ;Not accessed by game. | L8078: sty SpareMemCE ;Not accessed by game. |
L807A: sty SpareMemD1 ;Not accessed by game. | L807A: sty SpareMemD1 ;Not accessed by game. |
L807C: dey ;Y=0. | L807C: dey ;Y=0. |
L807D: sty SpareMemD0 ;Not accessed by game. | L807D: sty SpareMemD0 ;Not accessed by game. |
L807F: sty SpareMemCD ;Not accessed by game. | L807F: sty SpareMemCD ;Not accessed by game. |
L8081: sty SpareMemD3 ;Not accessed by game. | L8081: sty SpareMemD3 ;Not accessed by game. |
L8083: sty NARPASSWORD ;Set NARPASSWORD not active. | L8083: sty NARPASSWORD ;Set NARPASSWORD not active. |
L8086: sty SpareMemCB ;Not accessed by game. | L8086: sty SpareMemCB ;Not accessed by game. |
L8088: sty SpareMemC9 ;Not accessed by game. | L8088: sty SpareMemC9 ;Not accessed by game. |
L808A: lda #$02 ;A=2. | L808A: lda #$02 ;A=2. |
L808C: sta IntroMusicRestart ;Title rountines cycle twice before restart of music. | L808C: sta IntroMusicRestart ;Title rountines cycle twice before restart of music. |
L808E: sty SpareMemB7 ;Accessed by unused routine. | L808E: sty SpareMemB7 ;Accessed by unused routine. |
L8090: sty SpareMemB8 ;Accessed by unused routine. | L8090: sty SpareMemB8 ;Accessed by unused routine. |
L8092: sty PalDataIndex ;Reset index to palette data. | L8092: sty PalDataIndex ;Reset index to palette data. |
L8094: sty ScreenFlashPalIndex ;Reset index into screen flash palette data. | L8094: sty ScreenFlashPalIndex ;Reset index into screen flash palette data. |
L8096: sty IntroStarOffset ;Reset index into IntroStarPntr table. | L8096: sty IntroStarOffset ;Reset index into IntroStarPntr table. |
L8098: sty FadeDataIndex ;Reset index into fade out palette data. | L8098: sty FadeDataIndex ;Reset index into fade out palette data. |
L809A: sty $00 ; | L809A: sty $00 ; |
L809C: ldx #$60 ;Set $0000 to point to address $6000. | L809C: ldx #$60 ;Set $0000 to point to address $6000. |
| |
L809E:* stx $01 ; | L809E:* stx $01 ; |
L80A0: txa ; | L80A0: txa ; |
L80A1: and #$03 ; | L80A1: and #$03 ; |
L80A3: asl ; | L80A3: asl ; |
L80A4: tay ;The following loop Loads the --> | L80A4: tay ;The following loop Loads the --> |
L80A5: sty $02 ;RAM with the following values: --> | L80A5: sty $02 ;RAM with the following values: --> |
L80A7: lda RamValueTbl, y ;$6000 thru $62FF = #$00. | L80A7: lda RamValueTbl, y ;$6000 thru $62FF = #$00. |
L80AA: ldy #$00 ;$6300 thru $633F = #$C0. | L80AA: ldy #$00 ;$6300 thru $633F = #$C0. |
L80AC:* sta ($00), y ;$6340 thru $63FF = #$C4. | L80AC:* sta ($00), y ;$6340 thru $63FF = #$C4. |
L80AE: iny ;$6400 thru $66FF = #$00. | L80AE: iny ;$6400 thru $66FF = #$00. |
L80AF: beq + ;$6700 thru $673F = #$C0. | L80AF: beq + ;$6700 thru $673F = #$C0. |
L80B1: cpy #$40 ;$6740 thru $67FF = #$C4. | L80B1: cpy #$40 ;$6740 thru $67FF = #$C4. |
L80B3: bne - ; | L80B3: bne - ; |
L80B5: ldy $02 ; | L80B5: ldy $02 ; |
L80B7: lda RamValueTbl+1, y ; | L80B7: lda RamValueTbl+1, y ; |
L80BA: ldy #$40 ; | L80BA: ldy #$40 ; |
L80BC: bpl - ; | L80BC: bpl - ; |
L80BE:* inx ; | L80BE:* inx ; |
L80BF: cpx #$68 ; | L80BF: cpx #$68 ; |
L80C1: bne --- ; | L80C1: bne --- ; |
| |
L80C3: inc TitleRoutine ;Draw intro background next. | L80C3: inc TitleRoutine ;Draw intro background next. |
L80C5: jmp LoadStarSprites ;($98AE)Loads stars on intro screen. | L80C5: jmp LoadStarSprites ;($98AE)Loads stars on intro screen. |
| |
;The following table is used by the code above for writing values to RAM. | ;The following table is used by the code above for writing values to RAM. |
| |
RamValueTbl: | RamValueTbl: |
L80C8: .byte $00, $00, $00, $00, $00, $00, $C0, $C4 | L80C8: .byte $00, $00, $00, $00, $00, $00, $C0, $C4 |
| |
DrawIntroBackground: | DrawIntroBackground: |
L80D0: LDA #$10 ;Intro music flag. | L80D0: LDA #$10 ;Intro music flag. |
L80D2: STA ABStatus ;Never accessed by game. | L80D2: STA ABStatus ;Never accessed by game. |
L80D4: STA MultiSFXFlag ;Initiates intro music. | L80D4: STA MultiSFXFlag ;Initiates intro music. |
L80D7: JSR ScreenOff ;($C439)Turn screen off. | L80D7: JSR ScreenOff ;($C439)Turn screen off. |
L80DA: JSR ClearNameTables ;($C158)Erase name table data. | L80DA: JSR ClearNameTables ;($C158)Erase name table data. |
L80DD: LDX #$F4 ;Lower address of PPU information. | L80DD: LDX #$F4 ;Lower address of PPU information. |
L80DF: LDY #$82 ;Upper address of PPU information. | L80DF: LDY #$82 ;Upper address of PPU information. |
L80E1: JSR PreparePPUProcess_ ;($C20E) Writes background of intro screen to name tables. | L80E1: JSR PreparePPUProcess_ ;($C20E) Writes background of intro screen to name tables. |
L80E4: LDA #$01 ; | L80E4: LDA #$01 ; |
L80E6: STA PalDataPending ;Prepare to load palette data. | L80E6: STA PalDataPending ;Prepare to load palette data. |
L80E8: STA SpareMemC5 ;Not accessed by game. | L80E8: STA SpareMemC5 ;Not accessed by game. |
L80EA: LDA PPUCNT0ZP ; | L80EA: LDA PPUCNT0ZP ; |
L80EC: AND #$FC ;Switch to name table 0 | L80EC: AND #$FC ;Switch to name table 0 |
L80EE: STA PPUCNT0ZP ; | L80EE: STA PPUCNT0ZP ; |
L80F0: INC TitleRoutine ;Next routine sets up METROID fade in delay. | L80F0: INC TitleRoutine ;Next routine sets up METROID fade in delay. |
L80F2: LDA #$00 ; | L80F2: LDA #$00 ; |
L80F4: STA SpareMemD7 ;Not accessed by game. | L80F4: STA SpareMemD7 ;Not accessed by game. |
L80F6: JMP ScreenOn ;($C447)Turn screen on. | L80F6: JMP ScreenOn ;($C447)Turn screen on. |
| |
FadeInDelay: | FadeInDelay: |
L80F9: LDA PPUCNT0ZP ; | L80F9: LDA PPUCNT0ZP ; |
L80FB: AND #$FE ;Switch to name table 0 or 2. | L80FB: AND #$FE ;Switch to name table 0 or 2. |
L80FD: STA PPUCNT0ZP ; | L80FD: STA PPUCNT0ZP ; |
L80FF: LDA #$08 ;Loads Timer3 with #$08. Delays Fade in routine.--> | L80FF: LDA #$08 ;Loads Timer3 with #$08. Delays Fade in routine.--> |
L8101: STA Timer3 ;Delays fade in by 80 frames (1.3 seconds). | L8101: STA Timer3 ;Delays fade in by 80 frames (1.3 seconds). |
L8103: LSR ; | L8103: LSR ; |
L8104: STA PalDataIndex ;Loads PalDataIndex with #$04 | L8104: STA PalDataIndex ;Loads PalDataIndex with #$04 |
L8106: INC TitleRoutine ;Increment to next routine. | L8106: INC TitleRoutine ;Increment to next routine. |
L8108: RTS ; | L8108: RTS ; |
| |
FlashEffect: | FlashEffect: |
L8109: LDA FrameCount ;Every third frame, run change palette--> | L8109: LDA FrameCount ;Every third frame, run change palette--> |
L810B: AND #$03 ;Creates METROID flash effect. | L810B: AND #$03 ;Creates METROID flash effect. |
L810D: BNE + ; | L810D: BNE + ; |
L810F: LDA PalDataIndex ;Uses only the first three palette--> | L810F: LDA PalDataIndex ;Uses only the first three palette--> |
L8111: AND #$03 ;data sets in the flash routine. | L8111: AND #$03 ;data sets in the flash routine. |
L8113: STA PalDataIndex ; | L8113: STA PalDataIndex ; |
L8115: JSR LoadPalData ; | L8115: JSR LoadPalData ; |
L8118: LDA Timer3 ;If Timer 3 has not expired, branch--> | L8118: LDA Timer3 ;If Timer 3 has not expired, branch--> |
L811A: BNE + ;so routine will keep running. | L811A: BNE + ;so routine will keep running. |
L811C: LDA PalDataIndex ; | L811C: LDA PalDataIndex ; |
L811E: CMP #$04 ;Ensures the palette index is back at 0. | L811E: CMP #$04 ;Ensures the palette index is back at 0. |
L8120: BNE + ; | L8120: BNE + ; |
L8122: INC TitleRoutine ;Increment to next routine. | L8122: INC TitleRoutine ;Increment to next routine. |
L8124: JSR LoadSparkleData ;($87AB) Loads data for next routine. | L8124: JSR LoadSparkleData ;($87AB) Loads data for next routine. |
L8127: LDA #$18 ;Sets Timer 3 for a delay of 240 frames--> | L8127: LDA #$18 ;Sets Timer 3 for a delay of 240 frames--> |
L8129: STA Timer3 ;(4 seconds). | L8129: STA Timer3 ;(4 seconds). |
L812B:* RTS ; | L812B:* RTS ; |
| |
METROIDFadeIn: | METROIDFadeIn: |
L812C: LDA Timer3 ; | L812C: LDA Timer3 ; |
L812E: BNE + ; | L812E: BNE + ; |
L8130: LDA FrameCount ;Every 16th FrameCount, Change palette.--> | L8130: LDA FrameCount ;Every 16th FrameCount, Change palette.--> |
L8132: AND #$0F ;Causes the fade in effect. | L8132: AND #$0F ;Causes the fade in effect. |
L8134: BNE + ; | L8134: BNE + ; |
L8136: JSR LoadPalData ;($8A8C)Load data into Palettes. | L8136: JSR LoadPalData ;($8A8C)Load data into Palettes. |
L8139: BNE + ; | L8139: BNE + ; |
L813B: LDA #$20 ;Set timer delay for METROID flash effect.--> | L813B: LDA #$20 ;Set timer delay for METROID flash effect.--> |
L813D: STA Timer3 ;Delays flash by 320 frames (5.3 seconds). | L813D: STA Timer3 ;Delays flash by 320 frames (5.3 seconds). |
L813F: INC TitleRoutine ; | L813F: INC TitleRoutine ; |
L8141:* RTS ; | L8141:* RTS ; |
| |
LoadFlashTimer: | LoadFlashTimer: |
L8142: LDA Timer3 ;If 320 frames have not passed, exit | L8142: LDA Timer3 ;If 320 frames have not passed, exit |
L8144: BNE - ; | L8144: BNE - ; |
L8146: LDA #$08 ; | L8146: LDA #$08 ; |
L8148: STA Timer3 ;Stores a value of 80 frames in Timer3--> | L8148: STA Timer3 ;Stores a value of 80 frames in Timer3--> |
L814A: INC TitleRoutine ;(1.3 seconds). | L814A: INC TitleRoutine ;(1.3 seconds). |
L814C: RTS ; | L814C: RTS ; |
| |
METROIDSparkle: | METROIDSparkle: |
L814D: LDA Timer3 ;Wait until 3 seconds have passed since--> | L814D: LDA Timer3 ;Wait until 3 seconds have passed since--> |
L814F: BNE ++ ;last routine before continuing. | L814F: BNE ++ ;last routine before continuing. |
L8151: LDA IntroSpr0Complete ;Check if sparkle sprites are done moving. | L8151: LDA IntroSpr0Complete ;Check if sparkle sprites are done moving. |
L8154: AND IntroSpr1Complete ; | L8154: AND IntroSpr1Complete ; |
L8157: CMP #$01 ;Is sparkle routine finished? If so,--> | L8157: CMP #$01 ;Is sparkle routine finished? If so,--> |
L8159: BNE + ;go to next title routine, else continue--> | L8159: BNE + ;go to next title routine, else continue--> |
L815B: INC TitleRoutine ;with sparkle routine. | L815B: INC TitleRoutine ;with sparkle routine. |
L815D: BNE ++ ; | L815D: BNE ++ ; |
L815F:* JSR UpdateSparkleSprites ;($87CF)Update sparkle sprites on the screen. | L815F:* JSR UpdateSparkleSprites ;($87CF)Update sparkle sprites on the screen. |
L8162:* RTS ; | L8162:* RTS ; |
| |
METROIDFadeOut: | METROIDFadeOut: |
L8163: LDA FrameCount ;Wait until the frame count is a multiple--> | L8163: LDA FrameCount ;Wait until the frame count is a multiple--> |
L8165: AND #$07 ;of eight before proceeding. | L8165: AND #$07 ;of eight before proceeding. |
L8167: BNE ++ ; | L8167: BNE ++ ; |
L8169: LDA FadeDataIndex ;If FadeDataIndex is less than #$04, keep--> | L8169: LDA FadeDataIndex ;If FadeDataIndex is less than #$04, keep--> |
L816B: CMP #$04 ;doing the palette changing routine. | L816B: CMP #$04 ;doing the palette changing routine. |
L816D: BNE + ; | L816D: BNE + ; |
L816F: JSR LoadInitialSpriteData ;($8897)Load initial sprite values for crosshair routine. | L816F: JSR LoadInitialSpriteData ;($8897)Load initial sprite values for crosshair routine. |
L8172: LDA #$08 ; | L8172: LDA #$08 ; |
L8174: STA Timer3 ;Load Timer3 with a delay of 80 frames(1.3 seconds). | L8174: STA Timer3 ;Load Timer3 with a delay of 80 frames(1.3 seconds). |
L8176: STA First4SlowCntr ;Set counter for slow sprite movement for 8 frames, | L8176: STA First4SlowCntr ;Set counter for slow sprite movement for 8 frames, |
L8178: LDA #$00 ; | L8178: LDA #$00 ; |
L817A: STA SecondCrosshairSprites ;Set SecondCrosshairSprites = #$00 | L817A: STA SecondCrosshairSprites ;Set SecondCrosshairSprites = #$00 |
L817C: INC TitleRoutine ;Move to next routine | L817C: INC TitleRoutine ;Move to next routine |
L817E:* JSR DoFadeOut ;($8B5F)Fades METROID off the screen. | L817E:* JSR DoFadeOut ;($8B5F)Fades METROID off the screen. |
L8181:* RTS ; | L8181:* RTS ; |
| |
Crosshairs: | Crosshairs: |
L8182: LDA FlashScreen ;Is it time to flash the screen white?--> | L8182: LDA FlashScreen ;Is it time to flash the screen white?--> |
L8184: BEQ + ;If not, branch. | L8184: BEQ + ;If not, branch. |
L8186: JSR FlashIntroScreen ;($8AA7)Flash screen white. | L8186: JSR FlashIntroScreen ;($8AA7)Flash screen white. |
L8189:* LDA Timer3 ;Wait 80 frames from last routine--> | L8189:* LDA Timer3 ;Wait 80 frames from last routine--> |
L818B: BNE ++++ ;before running this one. | L818B: BNE ++++ ;before running this one. |
L818D: LDA IntroSpr0Complete ; | L818D: LDA IntroSpr0Complete ; |
L8190: AND IntroSpr1Complete ;Check if first 4 sprites have completed--> | L8190: AND IntroSpr1Complete ;Check if first 4 sprites have completed--> |
L8193: AND IntroSpr2Complete ;their movements. If not, branch. | L8193: AND IntroSpr2Complete ;their movements. If not, branch. |
L8196: AND IntroSpr3Complete ; | L8196: AND IntroSpr3Complete ; |
L8199: BEQ ++ ; | L8199: BEQ ++ ; |
L819B: LDA #$01 ;Prepare to flash screen and draw cross. | L819B: LDA #$01 ;Prepare to flash screen and draw cross. |
L819D: CMP SecondCrosshairSprites ;Branch if second crosshair sprites are already--> | L819D: CMP SecondCrosshairSprites ;Branch if second crosshair sprites are already--> |
L819F: BEQ + ;active. | L819F: BEQ + ;active. |
L81A1: INC SecondCrosshairSprites ;Indicates second crosshair sprites are active. | L81A1: INC SecondCrosshairSprites ;Indicates second crosshair sprites are active. |
L81A3: STA DrawCross ;Draw cross animation on screen. | L81A3: STA DrawCross ;Draw cross animation on screen. |
L81A5: STA FlashScreen ;Flash screen white. | L81A5: STA FlashScreen ;Flash screen white. |
L81A7: LDA #$00 ; | L81A7: LDA #$00 ; |
L81A9: STA CrossDataIndex ;Reset index to cross sprite data. | L81A9: STA CrossDataIndex ;Reset index to cross sprite data. |
L81AB:* AND IntroSpr4Complete ; | L81AB:* AND IntroSpr4Complete ; |
L81AE: AND IntroSpr5Complete ;Check if second 4 sprites have completed--> | L81AE: AND IntroSpr5Complete ;Check if second 4 sprites have completed--> |
L81AF: AND IntroSpr6Complete ;their movements. If not, branch. | L81AF: AND IntroSpr6Complete ;their movements. If not, branch. |
L81B4: AND IntroSpr7Complete ; | L81B4: AND IntroSpr7Complete ; |
L81B7: BEQ + ; | L81B7: BEQ + ; |
L81B9: LDA #$01 ;Prepare to flash screen and draw cross. | L81B9: LDA #$01 ;Prepare to flash screen and draw cross. |
L81BB: STA DrawCross ;Draw cross animation on screen. | L81BB: STA DrawCross ;Draw cross animation on screen. |
L81BD: STA FlashScreen ;Flash screen white. | L81BD: STA FlashScreen ;Flash screen white. |
L81BF: JSR LoadStarSprites ;($98AE)Loads stars on intro screen. | L81BF: JSR LoadStarSprites ;($98AE)Loads stars on intro screen. |
L81C2: LDA #$00 ; | L81C2: LDA #$00 ; |
L81C4: STA CrossDataIndex ;Reset index to cross sprite data. | L81C4: STA CrossDataIndex ;Reset index to cross sprite data. |
L81C6: INC TitleRoutine ;Do MoreCrosshairs next frame. | L81C6: INC TitleRoutine ;Do MoreCrosshairs next frame. |
L81C8: BNE ++ ;Branch always. | L81C8: BNE ++ ;Branch always. |
L81CA:* JSR DrawCrosshairsSprites ;($88FE)Draw sprites that converge in center of screen. | L81CA:* JSR DrawCrosshairsSprites ;($88FE)Draw sprites that converge in center of screen. |
L81CD:* JSR DrawCrossSprites ;($8976)Draw cross sprites in middle of the screen. | L81CD:* JSR DrawCrossSprites ;($8976)Draw cross sprites in middle of the screen. |
L81D0:* RTS ; | L81D0:* RTS ; |
| |
MoreCrosshairs: | MoreCrosshairs: |
L81D1: LDA FlashScreen ;Is it time to flash the screen white?--> | L81D1: LDA FlashScreen ;Is it time to flash the screen white?--> |
L81D3: BEQ + ;If not, branch. | L81D3: BEQ + ;If not, branch. |
L81D5: JSR DrawCrossSprites ;($8976)Draw cross sprites in middle of the screen. | L81D5: JSR DrawCrossSprites ;($8976)Draw cross sprites in middle of the screen. |
L81D8: JMP FlashIntroScreen ;($8AA7)Flash screen white. | L81D8: JMP FlashIntroScreen ;($8AA7)Flash screen white. |
L81DB:* INC TitleRoutine ;ChangeIntroNameTable is next routine to run. | L81DB:* INC TitleRoutine ;ChangeIntroNameTable is next routine to run. |
L81DD: LDA #$60 ; | L81DD: LDA #$60 ; |
L81DF: STA ObjectY ; | L81DF: STA ObjectY ; |
L81E2: LDA #$7C ;These values are written into memory, but they are--> | L81E2: LDA #$7C ;These values are written into memory, but they are--> |
L81E4: STA ObjectX ;not used later in the title routine. This is the--> | L81E4: STA ObjectX ;not used later in the title routine. This is the--> |
L81E7: LDA AnimResetIndex ;remnants of some abandoned code. | L81E7: LDA AnimResetIndex ;remnants of some abandoned code. |
L81EA: STA AnimIndex ; | L81EA: STA AnimIndex ; |
L81ED: RTS ; | L81ED: RTS ; |
| |
UnusedIntroRoutine1: | UnusedIntroRoutine1: |
L81EE: LDA #$01 ; | L81EE: LDA #$01 ; |
L81F0: STA SpareMemBB ; | L81F0: STA SpareMemBB ; |
L81F2: LDA #$04 ; | L81F2: LDA #$04 ; |
L81F4: STA SpritePagePos ; | L81F4: STA SpritePagePos ; |
L81F6: STA Joy1Change ; | L81F6: STA Joy1Change ; |
L81F8: STA Joy1Status ;Unused intro routine. | L81F8: STA Joy1Status ;Unused intro routine. |
L81FA: STA Joy1Retrig ; | L81FA: STA Joy1Retrig ; |
L81FC: LDA #$03 ; | L81FC: LDA #$03 ; |
L81FE: STA ObjAction ; | L81FE: STA ObjAction ; |
L8201: STA ScrollDir ; | L8201: STA ScrollDir ; |
L8203: INC TitleRoutine ; | L8203: INC TitleRoutine ; |
L8205: RTS ; | L8205: RTS ; |
| |
UnusedIntroRoutine2: | UnusedIntroRoutine2: |
L8206: LDA ObjAction ; | L8206: LDA ObjAction ; |
L8209: CMP #$04 ; | L8209: CMP #$04 ; |
L820B: BNE + ; | L820B: BNE + ; |
L820D: LDA #$00 ; | L820D: LDA #$00 ; |
L820F: STA ObjAction ; | L820F: STA ObjAction ; |
L8212: LDA #$0B ;Unused intro routine. It looks like this routine--> | L8212: LDA #$0B ;Unused intro routine. It looks like this routine--> |
L8214: STA AnimResetIndex ;was going to be used to manipulate sprite objects. | L8214: STA AnimResetIndex ;was going to be used to manipulate sprite objects. |
L8217: LDA #$0C ; | L8217: LDA #$0C ; |
L8219: STA AnimIndex ; | L8219: STA AnimIndex ; |
L821C: LDA #$07 ; | L821C: LDA #$07 ; |
L821E: STA AnimFrame ; | L821E: STA AnimFrame ; |
L8221: LDA #$08 ; | L8221: LDA #$08 ; |
L8223: STA Timer3 ; | L8223: STA Timer3 ; |
L8225: LDA #$00 ; | L8225: LDA #$00 ; |
L8227: STA SpareMemC9 ;Not accessed by game. | L8227: STA SpareMemC9 ;Not accessed by game. |
L8229: STA SpareMemCB ;Not accessed by game. | L8229: STA SpareMemCB ;Not accessed by game. |
L822B: INC TitleRoutine ; | L822B: INC TitleRoutine ; |
L822D:* RTS ; | L822D:* RTS ; |
| |
ChangeIntroNameTable: | ChangeIntroNameTable: |
L822E: LDA PPUCNT0ZP ; | L822E: LDA PPUCNT0ZP ; |
L8230: ORA #$01 ;Change to name table 1. | L8230: ORA #$01 ;Change to name table 1. |
L8232: STA PPUCNT0ZP ; | L8232: STA PPUCNT0ZP ; |
L8234: INC TitleRoutine ;Next routine to run is MessageFadeIn. | L8234: INC TitleRoutine ;Next routine to run is MessageFadeIn. |
L8236: LDA #$08 ; | L8236: LDA #$08 ; |
L8238: STA Timer3 ;Set Timer3 for 80 frames(1.33 seconds). | L8238: STA Timer3 ;Set Timer3 for 80 frames(1.33 seconds). |
L823A: LDA #$06 ;Index to FadeInPalData. | L823A: LDA #$06 ;Index to FadeInPalData. |
L823C: STA FadeDataIndex ; | L823C: STA FadeDataIndex ; |
L823E: LDA #$00 ; | L823E: LDA #$00 ; |
L8240: STA SpareMemC9 ;Not accessed by game. | L8240: STA SpareMemC9 ;Not accessed by game. |
L8242: RTS ; | L8242: RTS ; |
| |
MessageFadeIn: | MessageFadeIn: |
L8243: LDA Timer3 ;Check if delay timer has expired. If not, branch--> | L8243: LDA Timer3 ;Check if delay timer has expired. If not, branch--> |
L8245: BNE ++ ;to exit, else run this rouine. | L8245: BNE ++ ;to exit, else run this rouine. |
L8247: LDA FrameCount ; | L8247: LDA FrameCount ; |
L8249: AND #$07 ;Perform next step of fade every 8th frame. | L8249: AND #$07 ;Perform next step of fade every 8th frame. |
L824B: BNE ++ ; | L824B: BNE ++ ; |
L824D: LDA FadeDataIndex ; | L824D: LDA FadeDataIndex ; |
L824F: CMP #$0B ;Has end of fade in palette data been reached?--> | L824F: CMP #$0B ;Has end of fade in palette data been reached?--> |
L8251: BNE + ;If not, branch. | L8251: BNE + ;If not, branch. |
L8253: LDA #$00 ; | L8253: LDA #$00 ; |
L8255: STA FadeDataIndex ;Clear FadeDataIndex. | L8255: STA FadeDataIndex ;Clear FadeDataIndex. |
L8257: LDA #$30 ; | L8257: LDA #$30 ; |
L8259: STA Timer3 ;Set Timer3 to 480 frames(8 seconds). | L8259: STA Timer3 ;Set Timer3 to 480 frames(8 seconds). |
L825B: INC TitleRoutine ;Next routine is MessageFadeOut. | L825B: INC TitleRoutine ;Next routine is MessageFadeOut. |
L825D: BNE ++ ;Branch always. | L825D: BNE ++ ;Branch always. |
L825F:* JSR DoFadeOut ;($8B5F)Fade message onto screen. | L825F:* JSR DoFadeOut ;($8B5F)Fade message onto screen. |
L8262:* RTS ; | L8262:* RTS ; |
| |
MessageFadeOut: | MessageFadeOut: |
L8263: LDA Timer3 ;Check if delay timer has expired. If not, branch--> | L8263: LDA Timer3 ;Check if delay timer has expired. If not, branch--> |
L8265: BNE ++ ;to exit, else run this rouine. | L8265: BNE ++ ;to exit, else run this rouine. |
L8267: LDA FrameCount ; | L8267: LDA FrameCount ; |
L8269: AND #$07 ;Perform next step of fade every 8th frame. | L8269: AND #$07 ;Perform next step of fade every 8th frame. |
L826B: BNE ++ ; | L826B: BNE ++ ; |
L826D: LDA FadeDataIndex ; | L826D: LDA FadeDataIndex ; |
L826F: CMP #$05 ;Has end of fade out palette data been reached?--> | L826F: CMP #$05 ;Has end of fade out palette data been reached?--> |
L8271: BNE + ;If not, branch. | L8271: BNE + ;If not, branch. |
L8273: LDA #$06 ; | L8273: LDA #$06 ; |
L8275: STA FadeDataIndex ;Set index to start of fade in data. | L8275: STA FadeDataIndex ;Set index to start of fade in data. |
L8277: LDA #$00 ; | L8277: LDA #$00 ; |
L8279: STA SpareMemCB ;Not accessed by game. | L8279: STA SpareMemCB ;Not accessed by game. |
L827B: INC TitleRoutine ;Next routine is DelayIntroReplay. | L827B: INC TitleRoutine ;Next routine is DelayIntroReplay. |
L827D: BNE ++ ;Branch always. | L827D: BNE ++ ;Branch always. |
L827F:* JSR DoFadeOut ;($8B5F)Fade message off of screen. | L827F:* JSR DoFadeOut ;($8B5F)Fade message off of screen. |
L8282:* RTS ; | L8282:* RTS ; |
| |
DelayIntroReplay: | DelayIntroReplay: |
L8283: INC TitleRoutine ;Increment to next routine. | L8283: INC TitleRoutine ;Increment to next routine. |
L8285: LDA #$10 ; | L8285: LDA #$10 ; |
L8287: STA Timer3 ;Set Timer3 for a delay of 160 frames(2.6 seconds). | L8287: STA Timer3 ;Set Timer3 for a delay of 160 frames(2.6 seconds). |
L8289: RTS ; | L8289: RTS ; |
| |
UnusedIntroRoutine3: | UnusedIntroRoutine3: |
L828A: LDA Timer3 ; | L828A: LDA Timer3 ; |
L828C: BNE + ; | L828C: BNE + ; |
L828E: LDA SpareMemB7 ; | L828E: LDA SpareMemB7 ; |
L8290: BNE + ; | L8290: BNE + ; |
L8292: LDA SpareMemB8 ; | L8292: LDA SpareMemB8 ; |
L8294: AND #$0F ;Unused intro routine. | L8294: AND #$0F ;Unused intro routine. |
L8296: BNE + ; | L8296: BNE + ; |
L8298: LDA #$01 ; | L8298: LDA #$01 ; |
L829A: STA SpareMemD2 ; | L829A: STA SpareMemD2 ; |
L829C: LDA #$10 ; | L829C: LDA #$10 ; |
L829E: STA Timer3 ; | L829E: STA Timer3 ; |
L82A0: INC TitleRoutine ; | L82A0: INC TitleRoutine ; |
L82A2:* RTS ; | L82A2:* RTS ; |
| |
PrepIntroRestart: | PrepIntroRestart: |
L82A3: LDA Timer3 ;Check if delay timer has expired. If not, branch--> | L82A3: LDA Timer3 ;Check if delay timer has expired. If not, branch--> |
L82A5: BNE ++ ;to exit, else run this rouine. | L82A5: BNE ++ ;to exit, else run this rouine. |
L82A7: STA SpareMemD2 ;Not accessed by game. | L82A7: STA SpareMemD2 ;Not accessed by game. |
L82A9: STA SpareMemBB ;Not accessed by game. | L82A9: STA SpareMemBB ;Not accessed by game. |
L82AB: STA IsSamus ;Clear IsSamus memory address. | L82AB: STA IsSamus ;Clear IsSamus memory address. |
L82AD: LDY #$1F ; | L82AD: LDY #$1F ; |
L82AF:* STA ObjAction,Y ; | L82AF:* STA ObjAction,Y ; |
L82B2: DEY ;Clear RAM $0300 thru $031F. | L82B2: DEY ;Clear RAM $0300 thru $031F. |
L82B3: BPL - ; | L82B3: BPL - ; |
L82B5: LDA PPUCNT0ZP ;Change to name table 0. | L82B5: LDA PPUCNT0ZP ;Change to name table 0. |
L82B7: AND #$FC ; | L82B7: AND #$FC ; |
L82B9: STA PPUCNT0ZP ; | L82B9: STA PPUCNT0ZP ; |
L82BB: INY ;Y=0. | L82BB: INY ;Y=0. |
L82BC: STY SpareMemB7 ;Accessed by unused routine. | L82BC: STY SpareMemB7 ;Accessed by unused routine. |
L82BE: STY SpareMemB8 ;Accessed by unused routine. | L82BE: STY SpareMemB8 ;Accessed by unused routine. |
L82C0: STY PalDataIndex ; | L82C0: STY PalDataIndex ; |
L82C2: STY ScreenFlashPalIndex ;Clear all index values from these addresses. | L82C2: STY ScreenFlashPalIndex ;Clear all index values from these addresses. |
L82C4: STY IntroStarOffset ; | L82C4: STY IntroStarOffset ; |
L82C6: STY FadeDataIndex ; | L82C6: STY FadeDataIndex ; |
L82C8: STY SpareMemCD ;Not accessed by game. | L82C8: STY SpareMemCD ;Not accessed by game. |
L82CA: STY Joy1Change ; | L82CA: STY Joy1Change ; |
L82CC: STY Joy1Status ;Clear addresses that were going to be written to by an--> | L82CC: STY Joy1Status ;Clear addresses that were going to be written to by an--> |
L82CE: STY Joy1Retrig ;unused intro routine. | L82CE: STY Joy1Retrig ;unused intro routine. |
L82D0: STY SpareMemD7 ;Not accessed by game. | L82D0: STY SpareMemD7 ;Not accessed by game. |
L82D2: INY ;Y=1. | L82D2: INY ;Y=1. |
L82D3: STY SpareMemCE ;Not accessed by game. | L82D3: STY SpareMemCE ;Not accessed by game. |
L82D5: INY ;Y=2. | L82D5: INY ;Y=2. |
L82D6: STY SpareMemCC ;Not accessed by game. | L82D6: STY SpareMemCC ;Not accessed by game. |
L82D8: STY SpareMemCF ;Not accessed by game. | L82D8: STY SpareMemCF ;Not accessed by game. |
L82DA: STY TitleRoutine ;Next routine sets up METROID fade in delay. | L82DA: STY TitleRoutine ;Next routine sets up METROID fade in delay. |
L82DC: LDA IntroMusicRestart ;Check to see if intro music needs to be restarted.--> | L82DC: LDA IntroMusicRestart ;Check to see if intro music needs to be restarted.--> |
L82DE: BNE ++ ;Branch if not. | L82DE: BNE ++ ;Branch if not. |
L82E0: LDA #$10 ; | L82E0: LDA #$10 ; |
L82E2: STA MultiSFXFlag ;Restart intro music. | L82E2: STA MultiSFXFlag ;Restart intro music. |
L82E5: LDA #$02 ;Set restart of intro music after another two cycles--> | L82E5: LDA #$02 ;Set restart of intro music after another two cycles--> |
L82E7: STA IntroMusicRestart ;of the title routines. | L82E7: STA IntroMusicRestart ;of the title routines. |
L82E9:* RTS ; | L82E9:* RTS ; |
| |
L82EA:* DEC IntroMusicRestart ;One title routine cycle complete. Decrement intro--> | L82EA:* DEC IntroMusicRestart ;One title routine cycle complete. Decrement intro--> |
L82EC: RTS ;music restart counter. | L82EC: RTS ;music restart counter. |
| |
TitleScreenOff: | TitleScreenOff: |
L82ED: JSR ScreenOff ;($C439)Turn screen off. | L82ED: JSR ScreenOff ;($C439)Turn screen off. |
L82F0: INC TitleRoutine ;Next routine is TitleRoutineReturn. | L82F0: INC TitleRoutine ;Next routine is TitleRoutineReturn. |
L82F2: RTS ;This routine should not be reached. | L82F2: RTS ;This routine should not be reached. |
| |
TitleRoutineReturn: | TitleRoutineReturn: |
L82F3: RTS ;Last title routine function. Should not be reached. | L82F3: RTS ;Last title routine function. Should not be reached. |
| |
;The following data fills name table 0 with the intro screen background graphics. | ;The following data fills name table 0 with the intro screen background graphics. |
| |
;Information to be stored in attribute table 0. | ;Information to be stored in attribute table 0. |
L82F4: .byte $23 ;PPU address high byte. | L82F4: .byte $23 ;PPU address high byte. |
L82F5: .byte $C0 ;PPU address low byte. | L82F5: .byte $C0 ;PPU address low byte. |
L82F6: .byte $20 ;PPU string length. | L82F6: .byte $20 ;PPU string length. |
L82F7: .byte $00, $00, $00, $00, $00, $00, $00, $00, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF | L82F7: .byte $00, $00, $00, $00, $00, $00, $00, $00, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF |
L8307: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF | L8307: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF |
| |
L8317: .byte $23 ;PPU address high byte. | L8317: .byte $23 ;PPU address high byte. |
L8318: .byte $E0 ;PPU address low byte. | L8318: .byte $E0 ;PPU address low byte. |
L8319: .byte $20 ;PPU string length. | L8319: .byte $20 ;PPU string length. |
L831A: .byte $FF, $FF, $BF, $AF, $FF, $FF, $FF, $FF, $00, $00, $00, $00, $00, $00, $00, $00 | L831A: .byte $FF, $FF, $BF, $AF, $FF, $FF, $FF, $FF, $00, $00, $00, $00, $00, $00, $00, $00 |
L832A: .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 | L832A: .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 |
| |
;Writes row $22E0 (24th row from top). | ;Writes row $22E0 (24th row from top). |
L833A: .byte $22 ;PPU address high byte. | L833A: .byte $22 ;PPU address high byte. |
L833B: .byte $E0 ;PPU address low byte. | L833B: .byte $E0 ;PPU address low byte. |
L833C: .byte $20 ;PPU string length. | L833C: .byte $20 ;PPU string length. |
L833D: .byte $FF, $FF, $FF, $FF, $FF, $8C, $FF, $FF, $FF, $FF, $FF, $8D, $FF, $FF, $8E, $FF | L833D: .byte $FF, $FF, $FF, $FF, $FF, $8C, $FF, $FF, $FF, $FF, $FF, $8D, $FF, $FF, $8E, $FF |
L834D: .byte $FF, $FF, $FF, $FF, $FF, $8C, $FF, $FF, $FF, $FF, $FF, $8D, $FF, $FF, $8E, $FF | L834D: .byte $FF, $FF, $FF, $FF, $FF, $8C, $FF, $FF, $FF, $FF, $FF, $8D, $FF, $FF, $8E, $FF |
| |
;Writes row $2300 (25th row from top). | ;Writes row $2300 (25th row from top). |
L835D: .byte $23 ;PPU address high byte. | L835D: .byte $23 ;PPU address high byte. |
L835E: .byte $00 ;PPU address low byte. | L835E: .byte $00 ;PPU address low byte. |
L835F: .byte $20 ;PPU string length. | L835F: .byte $20 ;PPU string length. |
L8360: .byte $80, $81, $80, $81, $80, $81, $80, $81, $80, $81, $80, $81, $80, $81, $80, $81 | L8360: .byte $80, $81, $80, $81, $80, $81, $80, $81, $80, $81, $80, $81, $80, $81, $80, $81 |
L8370: .byte $80, $81, $80, $81, $80, $81, $80, $81, $80, $81, $80, $81, $80, $81, $80, $81 | L8370: .byte $80, $81, $80, $81, $80, $81, $80, $81, $80, $81, $80, $81, $80, $81, $80, $81 |
| |
;Writes row $2320 (26th row from top). | ;Writes row $2320 (26th row from top). |
L8380: .byte $23 ;PPU address high byte. | L8380: .byte $23 ;PPU address high byte. |
L8381: .byte $20 ;PPU address low byte. | L8381: .byte $20 ;PPU address low byte. |
L8382: .byte $20 ;PPU string length. | L8382: .byte $20 ;PPU string length. |
L8383: .byte $82, $83, $82, $83, $82, $83, $82, $83, $82, $83, $82, $83, $82, $83, $82, $83 | L8383: .byte $82, $83, $82, $83, $82, $83, $82, $83, $82, $83, $82, $83, $82, $83, $82, $83 |
L8393: .byte $82, $83, $82, $83, $82, $83, $82, $83, $82, $83, $82, $83, $82, $83, $82, $83 | L8393: .byte $82, $83, $82, $83, $82, $83, $82, $83, $82, $83, $82, $83, $82, $83, $82, $83 |
| |
;Writes row $2340 (27th row from top). | ;Writes row $2340 (27th row from top). |
L83A3: .byte $23 ;PPU address high byte. | L83A3: .byte $23 ;PPU address high byte. |
L83A4: .byte $40 ;PPU address low byte. | L83A4: .byte $40 ;PPU address low byte. |
L83A5: .byte $20 ;PPU string length. | L83A5: .byte $20 ;PPU string length. |
L83A6: .byte $84, $85, $84, $85, $84, $85, $84, $85, $84, $85, $84, $85, $84, $85, $84, $85 | L83A6: .byte $84, $85, $84, $85, $84, $85, $84, $85, $84, $85, $84, $85, $84, $85, $84, $85 |
L83B6: .byte $84, $85, $84, $85, $84, $85, $84, $85, $84, $85, $84, $85, $84, $85, $84, $85 | L83B6: .byte $84, $85, $84, $85, $84, $85, $84, $85, $84, $85, $84, $85, $84, $85, $84, $85 |
| |
;Writes row $2360 (28th row from top). | ;Writes row $2360 (28th row from top). |
L83C6: .byte $23 ;PPU address high byte. | L83C6: .byte $23 ;PPU address high byte. |
L83C7: .byte $60 ;PPU address low byte. | L83C7: .byte $60 ;PPU address low byte. |
L83C8: .byte $20 ;PPU string length. | L83C8: .byte $20 ;PPU string length. |
L83C9: .byte $86, $87, $86, $87, $86, $87, $86, $87, $86, $87, $86, $87, $86, $87, $86, $87 | L83C9: .byte $86, $87, $86, $87, $86, $87, $86, $87, $86, $87, $86, $87, $86, $87, $86, $87 |
L83D9: .byte $86, $87, $86, $87, $86, $87, $86, $87, $86, $87, $86, $87, $86, $87, $86, $87 | L83D9: .byte $86, $87, $86, $87, $86, $87, $86, $87, $86, $87, $86, $87, $86, $87, $86, $87 |
| |
;Writes row $2380 (29th row from top). | ;Writes row $2380 (29th row from top). |
L83E9: .byte $23 ;PPU address high byte. | L83E9: .byte $23 ;PPU address high byte. |
L83EA: .byte $80 ;PPU address low byte. | L83EA: .byte $80 ;PPU address low byte. |
L83EB: .byte $20 ;PPU string length. | L83EB: .byte $20 ;PPU string length. |
L83EC: .byte $88, $89, $88, $89, $88, $89, $88, $89, $88, $89, $88, $89, $88, $89, $88, $89 | L83EC: .byte $88, $89, $88, $89, $88, $89, $88, $89, $88, $89, $88, $89, $88, $89, $88, $89 |
L83FC: .byte $88, $89, $88, $89, $88, $89, $88, $89, $88, $89, $88, $89, $88, $89, $88, $89 | L83FC: .byte $88, $89, $88, $89, $88, $89, $88, $89, $88, $89, $88, $89, $88, $89, $88, $89 |
| |
;Writes row $23A0 (Bottom row). | ;Writes row $23A0 (Bottom row). |
L840C: .byte $23 ;PPU address high byte. | L840C: .byte $23 ;PPU address high byte. |
L840D: .byte $A0 ;PPU address low byte. | L840D: .byte $A0 ;PPU address low byte. |
L840E: .byte $20 ;PPU string length. | L840E: .byte $20 ;PPU string length. |
L840F: .byte $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B | L840F: .byte $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B |
L841F: .byte $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B | L841F: .byte $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B |
| |
;Writes some blank spaces in row $20A0 (6th row from top). | ;Writes some blank spaces in row $20A0 (6th row from top). |
L842F: .byte $20 ;PPU address high byte. | L842F: .byte $20 ;PPU address high byte. |
L8430: .byte $A8 ;PPU address low byte. | L8430: .byte $A8 ;PPU address low byte. |
L8431: .byte $4F ;PPU string length. | L8431: .byte $4F ;PPU string length. |
L8432: .byte $FF ;Since RLE bit set, repeat 16 blanks starting at $20A8. | L8432: .byte $FF ;Since RLE bit set, repeat 16 blanks starting at $20A8. |
| |
;Writes METROID graphics in row $2100 (9th row from top). | ;Writes METROID graphics in row $2100 (9th row from top). |
L8433: .byte $21 ;PPU address high byte. | L8433: .byte $21 ;PPU address high byte. |
L8434: .byte $03 ;PPU address low byte. | L8434: .byte $03 ;PPU address low byte. |
L8435: .byte $1C ;PPU string length. | L8435: .byte $1C ;PPU string length. |
L8436: .byte $40, $5D, $56, $5D, $43, $40, $5D, $43, $40, $5D, $5D, $43, $40, $5D, $5D, $63 | L8436: .byte $40, $5D, $56, $5D, $43, $40, $5D, $43, $40, $5D, $5D, $43, $40, $5D, $5D, $63 |
L8446: .byte $62, $5D, $5D, $63, $40, $43, $40, $5D, $5D, $63, $1D, $16 | L8446: .byte $62, $5D, $5D, $63, $40, $43, $40, $5D, $5D, $63, $1D, $16 |
| |
;Writes METROID graphics in row $2120 (10th row from top). | ;Writes METROID graphics in row $2120 (10th row from top). |
L8452: .byte $21 ;PPU address high byte. | L8452: .byte $21 ;PPU address high byte. |
L8453: .byte $23 ;PPU address low byte. | L8453: .byte $23 ;PPU address low byte. |
L8454: .byte $1A ;PPU string length. | L8454: .byte $1A ;PPU string length. |
L8455: .byte $44, $50, $50, $50, $47, $44, $57, $58, $74, $75, $76, $77, $44, $57, $69, $47 | L8455: .byte $44, $50, $50, $50, $47, $44, $57, $58, $74, $75, $76, $77, $44, $57, $69, $47 |
L8465: .byte $44, $57, $69, $47, $44, $47, $44, $68, $69, $47 | L8465: .byte $44, $57, $69, $47, $44, $47, $44, $68, $69, $47 |
| |
;Writes METROID graphics in row $2140 (11th row from top). | ;Writes METROID graphics in row $2140 (11th row from top). |
L846F: .byte $21 ;PPU address high byte. | L846F: .byte $21 ;PPU address high byte. |
L8470: .byte $43 ;PPU address low byte. | L8470: .byte $43 ;PPU address low byte. |
L8471: .byte $1A ;PPU string length. | L8471: .byte $1A ;PPU string length. |
L8472: .byte $44, $41, $7E, $49, $47, $44, $59, $5A, $78, $79, $7A, $7B, $44, $59, $6D, $70 | L8472: .byte $44, $41, $7E, $49, $47, $44, $59, $5A, $78, $79, $7A, $7B, $44, $59, $6D, $70 |
L8482: .byte $44, $73, $72, $47, $44, $47, $44, $73, $72, $47 | L8482: .byte $44, $73, $72, $47, $44, $47, $44, $73, $72, $47 |
| |
;Writes METROID graphics in row $2160 (12th row from top). | ;Writes METROID graphics in row $2160 (12th row from top). |
L848C: .byte $21 ;PPU address high byte. | L848C: .byte $21 ;PPU address high byte. |
L848D: .byte $63 ;PPU address low byte. | L848D: .byte $63 ;PPU address low byte. |
L848E: .byte $1A ;PPU string length. | L848E: .byte $1A ;PPU string length. |
L848F: .byte $44, $42, $7F, $4A, $47, $44, $5B, $5C, $FF, $44, $47, $FF, $44, $5B, $6F, $71 | L848F: .byte $44, $42, $7F, $4A, $47, $44, $5B, $5C, $FF, $44, $47, $FF, $44, $5B, $6F, $71 |
L849F: .byte $44, $45, $46, $47, $44, $47, $44, $45, $46, $47 | L849F: .byte $44, $45, $46, $47, $44, $47, $44, $45, $46, $47 |
| |
;Writes METROID graphics in row $2180 (13th row from top). | ;Writes METROID graphics in row $2180 (13th row from top). |
L84A9: .byte $21 ;PPU address high byte. | L84A9: .byte $21 ;PPU address high byte. |
L84AA: .byte $83 ;PPU address low byte. | L84AA: .byte $83 ;PPU address low byte. |
L84AB: .byte $1A ;PPU string length. | L84AB: .byte $1A ;PPU string length. |
L84AC: .byte $44, $47, $FF, $44, $47, $44, $5F, $60, $FF, $44, $47, $FF, $44, $7D, $7C, $47 | L84AC: .byte $44, $47, $FF, $44, $47, $44, $5F, $60, $FF, $44, $47, $FF, $44, $7D, $7C, $47 |
L84BC: .byte $44, $6A, $6B, $47, $44, $47, $44, $6A, $6B, $47 | L84BC: .byte $44, $6A, $6B, $47, $44, $47, $44, $6A, $6B, $47 |
| |
;Writes METROID graphics in row $21A0 (14th row from top). | ;Writes METROID graphics in row $21A0 (14th row from top). |
L84C6: .byte $21 ;PPU address high byte. | L84C6: .byte $21 ;PPU address high byte. |
L84C7: .byte $A3 ;PPU address low byte. | L84C7: .byte $A3 ;PPU address low byte. |
L84C8: .byte $1A ;PPU string length. | L84C8: .byte $1A ;PPU string length. |
L84C9: .byte $4C, $4F, $FF, $4C, $4F, $4C, $5E, $4F, $FF, $4C, $4F, $FF, $4C, $4D, $4E, $4F | L84C9: .byte $4C, $4F, $FF, $4C, $4F, $4C, $5E, $4F, $FF, $4C, $4F, $FF, $4C, $4D, $4E, $4F |
L84D9: .byte $66, $5E, $5E, $64, $4C, $4F, $4C, $5E, $5E, $64 | L84D9: .byte $66, $5E, $5E, $64, $4C, $4F, $4C, $5E, $5E, $64 |
| |
;Writes METROID graphics in row $21C0 (15th row from top). | ;Writes METROID graphics in row $21C0 (15th row from top). |
L84E3: .byte $21 ;PPU address high byte. | L84E3: .byte $21 ;PPU address high byte. |
L84E4: .byte $C3 ;PPU address low byte. | L84E4: .byte $C3 ;PPU address low byte. |
L84E5: .byte $1A ;PPU string length. | L84E5: .byte $1A ;PPU string length. |
L84E6: .byte $51, $52, $FF, $51, $52, $51, $61, $52, $FF, $51, $52, $FF, $51, $53, $54, $52 | L84E6: .byte $51, $52, $FF, $51, $52, $51, $61, $52, $FF, $51, $52, $FF, $51, $53, $54, $52 |
L84F6: .byte $67, $61, $61, $65, $51, $52, $51, $61, $61, $65 | L84F6: .byte $67, $61, $61, $65, $51, $52, $51, $61, $61, $65 |
| |
;Writes PUSH START BUTTON in row $2220 (18th row from top). | ;Writes PUSH START BUTTON in row $2220 (18th row from top). |
L8500: .byte $22 ;PPU address high byte. | L8500: .byte $22 ;PPU address high byte. |
L8501: .byte $27 ;PPU address low byte. | L8501: .byte $27 ;PPU address low byte. |
L8502: .byte $15 ;PPU string length. | L8502: .byte $15 ;PPU string length. |
; '_ P U S H _ S T A R T _ B U T T | ; '_ P U S H _ S T A R T _ B U T T |
L8503: .byte $FF, $19, $1E, $1C, $11, $FF, $1C, $1D, $0A, $1B, $1D, $FF, $0B, $1E, $1D, $1D | L8503: .byte $FF, $19, $1E, $1C, $11, $FF, $1C, $1D, $0A, $1B, $1D, $FF, $0B, $1E, $1D, $1D |
; O N _ _ _' | ; O N _ _ _' |
L8513: .byte $18, $17, $FF, $FF, $FF | L8513: .byte $18, $17, $FF, $FF, $FF |
| |
;Writes C 1986 NINTENDO in row $2260 (20th row from top). | ;Writes C 1986 NINTENDO in row $2260 (20th row from top). |
L8518: .byte $22 ;PPU memory high byte. | L8518: .byte $22 ;PPU memory high byte. |
L8519: .byte $69 ;PPU memory low byte. | L8519: .byte $69 ;PPU memory low byte. |
L851A: .byte $12 ;PPU string length. | L851A: .byte $12 ;PPU string length. |
; 'C _ 1 9 8 6 _ N I N T E N D O _ | ; 'C _ 1 9 8 6 _ N I N T E N D O _ |
L851B: .byte $8F, $FF, $01, $09, $08, $06, $FF, $17, $12, $17, $1D, $0E, $17, $0D, $18, $FF | L851B: .byte $8F, $FF, $01, $09, $08, $06, $FF, $17, $12, $17, $1D, $0E, $17, $0D, $18, $FF |
; _ _' | ; _ _' |
L852B: .byte $FF, $FF | L852B: .byte $FF, $FF |
| |
;The following data fills name table 1 with the intro screen background graphics. | ;The following data fills name table 1 with the intro screen background graphics. |
| |
;Information to be stored in attribute table 1. | ;Information to be stored in attribute table 1. |
L852D: .byte $27 ;PPU memory high byte. | L852D: .byte $27 ;PPU memory high byte. |
L852E: .byte $C0 ;PPU memory low byte. | L852E: .byte $C0 ;PPU memory low byte. |
L852F: .byte $20 ;PPU string length. | L852F: .byte $20 ;PPU string length. |
L8530: .byte $00, $00, $00, $00, $00, $00, $00, $00, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF | L8530: .byte $00, $00, $00, $00, $00, $00, $00, $00, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF |
L8540: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF | L8540: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF |
| |
;Writes row $27E0 (24th row from top). | ;Writes row $27E0 (24th row from top). |
L8550: .byte $27 ;PPU memory high byte. | L8550: .byte $27 ;PPU memory high byte. |
L8551: .byte $E0 ;PPU memory low byte. | L8551: .byte $E0 ;PPU memory low byte. |
L8552: .byte $20 ;PPU string length. | L8552: .byte $20 ;PPU string length. |
L8553: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $00, $00, $00, $00, $00, $00, $00, $00 | L8553: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $00, $00, $00, $00, $00, $00, $00, $00 |
L8563: .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 | L8563: .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 |
| |
;Writes row $26E0 (24th row from top). | ;Writes row $26E0 (24th row from top). |
L8573: .byte $26 ;PPU memory high byte. | L8573: .byte $26 ;PPU memory high byte. |
L8574: .byte $E0 ;PPU memory low byte. | L8574: .byte $E0 ;PPU memory low byte. |
L8575: .byte $20 ;PPU string length. | L8575: .byte $20 ;PPU string length. |
L8576: .byte $FF, $FF, $FF, $FF, $FF, $8C, $FF, $FF, $FF, $FF, $FF, $8D, $FF, $FF, $8E, $FF | L8576: .byte $FF, $FF, $FF, $FF, $FF, $8C, $FF, $FF, $FF, $FF, $FF, $8D, $FF, $FF, $8E, $FF |
L8586: .byte $FF, $FF, $FF, $FF, $FF, $8C, $FF, $FF, $FF, $FF, $FF, $8D, $FF, $FF, $8E, $FF | L8586: .byte $FF, $FF, $FF, $FF, $FF, $8C, $FF, $FF, $FF, $FF, $FF, $8D, $FF, $FF, $8E, $FF |
| |
;Writes row $2700 (25th row from top). | ;Writes row $2700 (25th row from top). |
L8595: .byte $27 ;PPU memory high byte. | L8595: .byte $27 ;PPU memory high byte. |
L8597: .byte $00 ;PPU memory low byte. | L8597: .byte $00 ;PPU memory low byte. |
L8598: .byte $20 ;PPU string length. | L8598: .byte $20 ;PPU string length. |
L8599: .byte $80, $81, $80, $81, $80, $81, $80, $81, $80, $81, $80, $81, $80, $81, $80, $81 | L8599: .byte $80, $81, $80, $81, $80, $81, $80, $81, $80, $81, $80, $81, $80, $81, $80, $81 |
L85A9: .byte $80, $81, $80, $81, $80, $81, $80, $81, $80, $81, $80, $81, $80, $81, $80, $81 | L85A9: .byte $80, $81, $80, $81, $80, $81, $80, $81, $80, $81, $80, $81, $80, $81, $80, $81 |
| |
;Writes row $2720 (26th row from top). | ;Writes row $2720 (26th row from top). |
L85B9: .byte $27 ;PPU memory high byte. | L85B9: .byte $27 ;PPU memory high byte. |
L85BA: .byte $20 ;PPU memory low byte. | L85BA: .byte $20 ;PPU memory low byte. |
L85BB: .byte $20 ;PPU string length. | L85BB: .byte $20 ;PPU string length. |
L85BC: .byte $82, $83, $82, $83, $82, $83, $82, $83, $82, $83, $82, $83, $82, $83, $82, $83 | L85BC: .byte $82, $83, $82, $83, $82, $83, $82, $83, $82, $83, $82, $83, $82, $83, $82, $83 |
L85CC: .byte $82, $83, $82, $83, $82, $83, $82, $83, $82, $83, $82, $83, $82, $83, $82, $83 | L85CC: .byte $82, $83, $82, $83, $82, $83, $82, $83, $82, $83, $82, $83, $82, $83, $82, $83 |
| |
;Writes row $2740 (27th row from top). | ;Writes row $2740 (27th row from top). |
L85DC: .byte $27 ;PPU memory high byte. | L85DC: .byte $27 ;PPU memory high byte. |
L85DD: .byte $40 ;PPU memory low byte. | L85DD: .byte $40 ;PPU memory low byte. |
L85DE: .byte $20 ;PPU string length. | L85DE: .byte $20 ;PPU string length. |
L85DF: .byte $84, $85, $84, $85, $84, $85, $84, $85, $84, $85, $84, $85, $84, $85, $84, $85 | L85DF: .byte $84, $85, $84, $85, $84, $85, $84, $85, $84, $85, $84, $85, $84, $85, $84, $85 |
L85EF: .byte $84, $85, $84, $85, $84, $85, $84, $85, $84, $85, $84, $85, $84, $85, $84, $85 | L85EF: .byte $84, $85, $84, $85, $84, $85, $84, $85, $84, $85, $84, $85, $84, $85, $84, $85 |
| |
;Writes row $2760 (28th row from top). | ;Writes row $2760 (28th row from top). |
L85FF: .byte $27 ;PPU memory high byte. | L85FF: .byte $27 ;PPU memory high byte. |
L8600: .byte $60 ;PPU memory low byte. | L8600: .byte $60 ;PPU memory low byte. |
L8601: .byte $20 ;PPU string length. | L8601: .byte $20 ;PPU string length. |
L8602: .byte $86, $87, $86, $87, $86, $87, $86, $87, $86, $87, $86, $87, $86, $87, $86, $87 | L8602: .byte $86, $87, $86, $87, $86, $87, $86, $87, $86, $87, $86, $87, $86, $87, $86, $87 |
L8612: .byte $86, $87, $86, $87, $86, $87, $86, $87, $86, $87, $86, $87, $86, $87, $86, $87 | L8612: .byte $86, $87, $86, $87, $86, $87, $86, $87, $86, $87, $86, $87, $86, $87, $86, $87 |
| |
;Writes row $2780 (29th row from top). | ;Writes row $2780 (29th row from top). |
L8622: .byte $27 ;PPU memory high byte. | L8622: .byte $27 ;PPU memory high byte. |
L8623: .byte $80 ;PPU memory low byte. | L8623: .byte $80 ;PPU memory low byte. |
L8624: .byte $20 ;PPU string length. | L8624: .byte $20 ;PPU string length. |
L8625: .byte $88, $89, $88, $89, $88, $89, $88, $89, $88, $89, $88, $89, $88, $89, $88, $89 | L8625: .byte $88, $89, $88, $89, $88, $89, $88, $89, $88, $89, $88, $89, $88, $89, $88, $89 |
L8635: .byte $88, $89, $88, $89, $88, $89, $88, $89, $88, $89, $88, $89, $88, $89, $88, $89 | L8635: .byte $88, $89, $88, $89, $88, $89, $88, $89, $88, $89, $88, $89, $88, $89, $88, $89 |
| |
;Writes row $27A0 (bottom row). | ;Writes row $27A0 (bottom row). |
L8645: .byte $27 ;PPU memory high byte. | L8645: .byte $27 ;PPU memory high byte. |
L8646: .byte $A0 ;PPU memory low byte. | L8646: .byte $A0 ;PPU memory low byte. |
L8647: .byte $20 ;PPU string length. | L8647: .byte $20 ;PPU string length. |
L8648: .byte $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B | L8648: .byte $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B |
L8658: .byte $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B | L8658: .byte $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B, $8A, $8B |
| |
;Writes row $2480 (5th row from top). | ;Writes row $2480 (5th row from top). |
L8668: .byte $24 ;PPU memory high byte. | L8668: .byte $24 ;PPU memory high byte. |
L8669: .byte $88 ;PPU memory low byte. | L8669: .byte $88 ;PPU memory low byte. |
L866A: .byte $0F ;PPU string length. | L866A: .byte $0F ;PPU string length. |
; 'E M E R G E N C Y _ O R D E R' | ; 'E M E R G E N C Y _ O R D E R' |
L866B: .byte $0E, $16, $0E, $1B, $10, $0E, $17, $0C, $22, $FF, $18, $1B, $0D, $0E, $1B | L866B: .byte $0E, $16, $0E, $1B, $10, $0E, $17, $0C, $22, $FF, $18, $1B, $0D, $0E, $1B |
| |
;Writes row $2500 (9th row from top). | ;Writes row $2500 (9th row from top). |
L867A: .byte $25 ;PPU memory high byte. | L867A: .byte $25 ;PPU memory high byte. |
L867B: .byte $04 ;PPU memory low byte. | L867B: .byte $04 ;PPU memory low byte. |
L867C: .byte $1C ;PPU string length. | L867C: .byte $1C ;PPU string length. |
; 'D E F E A T _ T H E _ M E T R 0 | ; 'D E F E A T _ T H E _ M E T R 0 |
L867D: .byte $0D, $0E, $0F, $0E, $0A, $1D, $FF, $1D, $11, $0E, $FF, $16, $0E, $1D, $1B, $18 | L867D: .byte $0D, $0E, $0F, $0E, $0A, $1D, $FF, $1D, $11, $0E, $FF, $16, $0E, $1D, $1B, $18 |
; I D _ O F _ _ _ _ _ _ _' | ; I D _ O F _ _ _ _ _ _ _' |
L868D: .byte $12, $0D, $FF, $18, $0F, $FF, $FF, $FF, $FF, $FF, $FF, $FF | L868D: .byte $12, $0D, $FF, $18, $0F, $FF, $FF, $FF, $FF, $FF, $FF, $FF |
| |
;Writes row $2540 (11th row from top). | ;Writes row $2540 (11th row from top). |
L8699: .byte $25 ;PPU memory high byte. | L8699: .byte $25 ;PPU memory high byte. |
L869A: .byte $44 ;PPU memory low byte. | L869A: .byte $44 ;PPU memory low byte. |
L869B: .byte $1A ;PPU string length. | L869B: .byte $1A ;PPU string length. |
; 'T H E _ P L A N E T _ Z E B E T | ; 'T H E _ P L A N E T _ Z E B E T |
L869C: .byte $1D, $11, $0E, $FF, $19, $15, $0A, $17, $0E, $1D, $FF, $23, $0E, $0B, $0E, $1D | L869C: .byte $1D, $11, $0E, $FF, $19, $15, $0A, $17, $0E, $1D, $FF, $23, $0E, $0B, $0E, $1D |
; H _ A N D _ _ _ _ _' | ; H _ A N D _ _ _ _ _' |
L86AC: .byte $11, $FF, $0A, $17, $0D, $FF, $FF, $FF, $FF, $FF | L86AC: .byte $11, $FF, $0A, $17, $0D, $FF, $FF, $FF, $FF, $FF |
| |
;Writes row $2580 (13th row from top). | ;Writes row $2580 (13th row from top). |
L86B6: .byte $25 ;PPU memory high byte. | L86B6: .byte $25 ;PPU memory high byte. |
L86B7: .byte $84 ;PPU memory low byte. | L86B7: .byte $84 ;PPU memory low byte. |
L86B8: .byte $1A ;PPU string length. | L86B8: .byte $1A ;PPU string length. |
; 'D E S T R O Y _ T H E _ M O T H | ; 'D E S T R O Y _ T H E _ M O T H |
L86B9: .byte $0D, $0E, $1C, $1D, $1B, $18, $22, $FF, $1D, $11, $0E, $FF, $16, $18, $1D, $11 | L86B9: .byte $0D, $0E, $1C, $1D, $1B, $18, $22, $FF, $1D, $11, $0E, $FF, $16, $18, $1D, $11 |
; E R _ B R A I N _ _' | ; E R _ B R A I N _ _' |
L86C9: .byte $0E, $1B, $FF, $0B, $1B, $0A, $12, $17, $FF, $FF | L86C9: .byte $0E, $1B, $FF, $0B, $1B, $0A, $12, $17, $FF, $FF |
| |
;Writes row $25C0 (15th row from top). | ;Writes row $25C0 (15th row from top). |
L86D3: .byte $25 ;PPU memory high byte. | L86D3: .byte $25 ;PPU memory high byte. |
L86D4: .byte $C4 ;PPU memory low byte. | L86D4: .byte $C4 ;PPU memory low byte. |
L86D5: .byte $1A ;PPU string length. | L86D5: .byte $1A ;PPU string length. |
; 'T H E _ M E C H A N I C A L _ L | ; 'T H E _ M E C H A N I C A L _ L |
L86D6: .byte $1D, $11, $0E, $FF, $16, $0E, $0C, $11, $0A, $17, $12, $0C, $0A, $15, $FF, $15 | L86D6: .byte $1D, $11, $0E, $FF, $16, $0E, $0C, $11, $0A, $17, $12, $0C, $0A, $15, $FF, $15 |
; I F E _ V E I N _ _' | ; I F E _ V E I N _ _' |
L86E9: .byte $12, $0F, $0E, $FF, $1F, $0E, $12, $17, $FF, $FF | L86E9: .byte $12, $0F, $0E, $FF, $1F, $0E, $12, $17, $FF, $FF |
| |
;Writes row $2620 (18th row from top). | ;Writes row $2620 (18th row from top). |
L86F0: .byte $26 ;PPU memory high byte. | L86F0: .byte $26 ;PPU memory high byte. |
L86F1: .byte $27 ;PPU memory low byte. | L86F1: .byte $27 ;PPU memory low byte. |
L86F2: .byte $15 ;PPU string length. | L86F2: .byte $15 ;PPU string length. |
; 'G A L A X Y _ F E D E R A L _ P | ; 'G A L A X Y _ F E D E R A L _ P |
L86F3: .byte $10, $0A, $15, $0A, $21, $22, $FF, $0F, $0E, $0D, $0E, $1B, $0A, $15, $FF, $19 | L86F3: .byte $10, $0A, $15, $0A, $21, $22, $FF, $0F, $0E, $0D, $0E, $1B, $0A, $15, $FF, $19 |
; O L I C E' | ; O L I C E' |
L8703: .byte $18, $15, $12, $0C, $0E | L8703: .byte $18, $15, $12, $0C, $0E |
| |
;Writes row $2660 (20th row from top). | ;Writes row $2660 (20th row from top). |
L8708: .byte $26 ;PPU memory high byte. | L8708: .byte $26 ;PPU memory high byte. |
L8709: .byte $69 ;PPU memory low byte. | L8709: .byte $69 ;PPU memory low byte. |
L870A: .byte $12 ;PPU string length. | L870A: .byte $12 ;PPU string length. |
; '_ _ _ _ _ _ _ _ _ _ _ _ _ _ M 5 | ; '_ _ _ _ _ _ _ _ _ _ _ _ _ _ M 5 |
L870B: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $16, $05 | L870B: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $16, $05 |
; 1 0' | ; 1 0' |
L871B: .byte $01, $00 | L871B: .byte $01, $00 |
| |
L871D: .byte $00 ;End PPU string write. | L871D: .byte $00 ;End PPU string write. |
| |
;The following data does not appear to be used. | ;The following data does not appear to be used. |
L871E: .byte $46, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF | L871E: .byte $46, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF |
L872E: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $20, $00, $00, $00, $00, $00, $00 | L872E: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $20, $00, $00, $00, $00, $00, $00 |
L873E: .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 | L873E: .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 |
L874E: .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 | L874E: .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 |
| |
;The following error message is diplayed if the player enters an incorrect password. | ;The following error message is diplayed if the player enters an incorrect password. |
; 'E R R O R _ T R Y _ A G A I N' | ; 'E R R O R _ T R Y _ A G A I N' |
L8759: .byte $0E, $1B, $1B, $18, $1B, $FF, $1D, $1B, $22, $FF, $0A, $10, $0A, $12, $17 | L8759: .byte $0E, $1B, $1B, $18, $1B, $FF, $1D, $1B, $22, $FF, $0A, $10, $0A, $12, $17 |
| |
;If the error message above is not being displayed on the password | ;If the error message above is not being displayed on the password |
;screen, the following fifteen blanks spaces are used to cover it up. | ;screen, the following fifteen blanks spaces are used to cover it up. |
; '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _' | ; '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _' |
L8768: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF | L8768: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF |
| |
;Not used. | ;Not used. |
L8777: .byte $79, $87, $00, $00, $00, $00, $00, $00, $01, $00, $00, $00, $00, $00, $02, $00 | L8777: .byte $79, $87, $00, $00, $00, $00, $00, $00, $01, $00, $00, $00, $00, $00, $02, $00 |
L8787: .byte $00, $03, $00, $00, $00, $00, $00, $00, $01, $00, $00, $00, $00, $00, $02, $00 | L8787: .byte $00, $03, $00, $00, $00, $00, $00, $00, $01, $00, $00, $00, $00, $00, $02, $00 |
L8797: .byte $00, $03, $A1, $87, $A2, $87, $A5, $87, $A8, $87, $00, $18, $CC, $00, $18, $CD | L8797: .byte $00, $03, $A1, $87, $A2, $87, $A5, $87, $A8, $87, $00, $18, $CC, $00, $18, $CD |
L87A7: .byte $00, $18, $CE, $00 | L87A7: .byte $00, $18, $CE, $00 |
| |
LoadSparkleData: | LoadSparkleData: |
L87AB: LDX #$0A ; | L87AB: LDX #$0A ; |
L87AD:* LDA InitSparkleDataTbl,X ; | L87AD:* LDA InitSparkleDataTbl,X ; |
L87B0: STA IntroSpr0YCoord,X ;Loads $6EA0 thru $6EAA with the table below. | L87B0: STA IntroSpr0YCoord,X ;Loads $6EA0 thru $6EAA with the table below. |
L87B3: STA IntroSpr1YCoord,X ;Loads $6EB0 thru $6EBA with the table below. | L87B3: STA IntroSpr1YCoord,X ;Loads $6EB0 thru $6EBA with the table below. |
L87B6: DEX ; | L87B6: DEX ; |
L87B7: BPL - ;Loop until all values from table below are loaded. | L87B7: BPL - ;Loop until all values from table below are loaded. |
L87B9: LDA #$6B ; | L87B9: LDA #$6B ; |
L87BB: STA IntroSpr1YCoord ;$6EA0 thru $6EAA = #$3C, #$C6, #$01, #$18, #$00,--> | L87BB: STA IntroSpr1YCoord ;$6EA0 thru $6EAA = #$3C, #$C6, #$01, #$18, #$00,--> |
L87BE: LDA #$DC ;#$00, #$00, #$00, #$20, #$00, #$00, initial. | L87BE: LDA #$DC ;#$00, #$00, #$00, #$20, #$00, #$00, initial. |
L87C0: STA IntroSpr1XCoord ;$6EB0 thru $6EBA = #$6B, #$C6, #$01, #$DC, #$00,--> | L87C0: STA IntroSpr1XCoord ;$6EB0 thru $6EBA = #$6B, #$C6, #$01, #$DC, #$00,--> |
L87C3: RTS ;#$00, #$00, #$00, #$20, #$00, #$00, initial. | L87C3: RTS ;#$00, #$00, #$00, #$20, #$00, #$00, initial. |
| |
;Used by above routine to load Metroid initial sparkle data into $6EA0 | ;Used by above routine to load Metroid initial sparkle data into $6EA0 |
| |
InitSparkleDataTbl: | InitSparkleDataTbl: |
L87C4: .byte $3C, $C6, $01, $18, $00, $00, $00, $00, $20, $00, $00 | L87C4: .byte $3C, $C6, $01, $18, $00, $00, $00, $00, $20, $00, $00 |
| |
UpdateSparkleSprites: | UpdateSparkleSprites: |
L87CF: LDX #$00 ; | L87CF: LDX #$00 ; |
L87D1: JSR DoOneSparkleUpdate ;($87D6)Performs calculations on top sparkle sprite. | L87D1: JSR DoOneSparkleUpdate ;($87D6)Performs calculations on top sparkle sprite. |
L87D4: LDX #$10 ;Performs calculations on bottom sparkle sprite. | L87D4: LDX #$10 ;Performs calculations on bottom sparkle sprite. |
| |
DoOneSparkleUpdate: | DoOneSparkleUpdate: |
L87D6: JSR SparkleUpdate ;($87D9)Update sparkle sprite data. | L87D6: JSR SparkleUpdate ;($87D9)Update sparkle sprite data. |
| |
SparkleUpdate: | SparkleUpdate: |
L87D9: LDA IntroSpr0NextCntr,X ;If $6EA5 has not reached #$00, skip next routine. | L87D9: LDA IntroSpr0NextCntr,X ;If $6EA5 has not reached #$00, skip next routine. |
L87DC: BNE + ; | L87DC: BNE + ; |
L87DE: JSR DoSparkleSpriteCoord ;($881A)Update sparkle sprite screen position. | L87DE: JSR DoSparkleSpriteCoord ;($881A)Update sparkle sprite screen position. |
L87E1:* LDA IntroSpr0Complete,X ; | L87E1:* LDA IntroSpr0Complete,X ; |
L87E4: BNE ++ ;If sprite is already done, skip routine. | L87E4: BNE ++ ;If sprite is already done, skip routine. |
L87E6: DEC IntroSpr0NextCntr,X ; | L87E6: DEC IntroSpr0NextCntr,X ; |
| |
L87E9: LDA SparkleSpr0YChange,X ; | L87E9: LDA SparkleSpr0YChange,X ; |
L87EC: CLC ; | L87EC: CLC ; |
L87ED: ADC IntroSpr0YCoord,X ;Updates sparkle sprite Y coord. | L87ED: ADC IntroSpr0YCoord,X ;Updates sparkle sprite Y coord. |
L87F0: STA IntroSpr0YCoord,X ; | L87F0: STA IntroSpr0YCoord,X ; |
| |
L87F3: LDA SparkleSpr0XChange,X ; | L87F3: LDA SparkleSpr0XChange,X ; |
L87F6: CLC ; | L87F6: CLC ; |
L87F7: ADC IntroSpr0XCoord,X ;Updates sparkle sprite X coord. | L87F7: ADC IntroSpr0XCoord,X ;Updates sparkle sprite X coord. |
L87FA: STA IntroSpr0XCoord,X ; | L87FA: STA IntroSpr0XCoord,X ; |
| |
L87FD: DEC IntroSpr0ChngCntr,X ;Decrement IntroSpr0ChngCntr. If 0, time to change--> | L87FD: DEC IntroSpr0ChngCntr,X ;Decrement IntroSpr0ChngCntr. If 0, time to change--> |
L8800: BNE + ;sprite graphic. | L8800: BNE + ;sprite graphic. |
L8802: LDA IntroSpr0PattTbl,X ; | L8802: LDA IntroSpr0PattTbl,X ; |
L8805: EOR #$03 ;If IntroSpr0ChngCntr=$00, the sparkle sprite graphic is--> | L8805: EOR #$03 ;If IntroSpr0ChngCntr=$00, the sparkle sprite graphic is--> |
L8807: STA IntroSpr0PattTbl,X ;changed back and forth between pattern table--> | L8807: STA IntroSpr0PattTbl,X ;changed back and forth between pattern table--> |
L880A: LDA #$20 ;graphic $C6 and $C7. IntroSpr0ChngCntr is reset to #$20. | L880A: LDA #$20 ;graphic $C6 and $C7. IntroSpr0ChngCntr is reset to #$20. |
L880C: STA IntroSpr0ChngCntr,X ; | L880C: STA IntroSpr0ChngCntr,X ; |
L880F: ASL ; | L880F: ASL ; |
L8810: EOR IntroSpr0Cntrl,X ;Flips pattern at $C5 in pattern table--> | L8810: EOR IntroSpr0Cntrl,X ;Flips pattern at $C5 in pattern table--> |
L8813: STA IntroSpr0Cntrl,X ;horizontally when displayed. | L8813: STA IntroSpr0Cntrl,X ;horizontally when displayed. |
L8816:* JMP WriteIntroSprite ;($887B)Transfer sprite info into sprite RAM. | L8816:* JMP WriteIntroSprite ;($887B)Transfer sprite info into sprite RAM. |
L8819:* RTS ; | L8819:* RTS ; |
| |
DoSparkleSpriteCoord: | DoSparkleSpriteCoord: |
L881A: TXA ; | L881A: TXA ; |
L881B: JSR Adiv8 ;($C2C0)Y=0 when working with top sparkle sprite--> | L881B: JSR Adiv8 ;($C2C0)Y=0 when working with top sparkle sprite--> |
L881E: TAY ;and y=2 when working with bottom sparkle sprite. | L881E: TAY ;and y=2 when working with bottom sparkle sprite. |
L881F: LDA SparkleAddressTbl,Y ;Base is $89AF. | L881F: LDA SparkleAddressTbl,Y ;Base is $89AF. |
L8822: STA $00 ;When working with top sparkle sprite, E1,E0=$89B3--> | L8822: STA $00 ;When working with top sparkle sprite, E1,E0=$89B3--> |
L8824: LDA SparkleAddressTbl+1,Y ;and when botton sparkle sprite, E1,E0=$89E9. | L8824: LDA SparkleAddressTbl+1,Y ;and when botton sparkle sprite, E1,E0=$89E9. |
L8827: STA $01 ; | L8827: STA $01 ; |
L8829: LDY IntroSpr0Index,X ;Loads index for finding sparkle data (x=$00 or $10). | L8829: LDY IntroSpr0Index,X ;Loads index for finding sparkle data (x=$00 or $10). |
L882C: LDA ($00),Y ; | L882C: LDA ($00),Y ; |
L882E: BPL + ;If data byte MSB is set, set $6EA9 to #$01 and move to--> | L882E: BPL + ;If data byte MSB is set, set $6EA9 to #$01 and move to--> |
L8830: LDA #$01 ;next index for sparkle sprite data. | L8830: LDA #$01 ;next index for sparkle sprite data. |
L8832: STA IntroSpr0ByteType,X ; | L8832: STA IntroSpr0ByteType,X ; |
L8835:* BNE + ; | L8835:* BNE + ; |
L8837: LDA #$01 ;If value is equal to zero, sparkle sprite--> | L8837: LDA #$01 ;If value is equal to zero, sparkle sprite--> |
L8839: STA IntroSpr0Complete,X ;processing is complete. | L8839: STA IntroSpr0Complete,X ;processing is complete. |
L883C:* STA IntroSpr0NextCntr,X ; | L883C:* STA IntroSpr0NextCntr,X ; |
L883F: INY ; | L883F: INY ; |
L8840: LDA ($00),y ;Get x/y position byte. | L8840: LDA ($00),y ;Get x/y position byte. |
L8842: DEC IntroSpr0ByteType,X ;If MSB of second byte is set, branch. | L8842: DEC IntroSpr0ByteType,X ;If MSB of second byte is set, branch. |
L8845: BMI + ; | L8845: BMI + ; |
L8847: LDA #$00 ;This code is run when the MSB of the first byte--> | L8847: LDA #$00 ;This code is run when the MSB of the first byte--> |
L8849: STA SparkleSpr0YChange,X ;is set. This allows the sprite to change X coord--> | L8849: STA SparkleSpr0YChange,X ;is set. This allows the sprite to change X coord--> |
L884C: LDA ($00),Y ;by more than 7. Ensures Y coord does not change. | L884C: LDA ($00),Y ;by more than 7. Ensures Y coord does not change. |
L884E: BMI ++ ; | L884E: BMI ++ ; |
L8850:* PHA ;Store value twice so X and Y--> | L8850:* PHA ;Store value twice so X and Y--> |
L8851: PHA ;coordinates can be extracted. | L8851: PHA ;coordinates can be extracted. |
L8852: LDA #$00 ; | L8852: LDA #$00 ; |
L8854: STA IntroSpr0ByteType,X ;Set IntroSpr0ByteType to #$00 after processing. | L8854: STA IntroSpr0ByteType,X ;Set IntroSpr0ByteType to #$00 after processing. |
L8857: PLA ; | L8857: PLA ; |
L8858: JSR Adiv16 ;($C2BF)Move upper 4 bits to lower 4 bits. | L8858: JSR Adiv16 ;($C2BF)Move upper 4 bits to lower 4 bits. |
L885B: JSR NibbleSubtract ;($8871)Check if nibble to be converted to twos compliment. | L885B: JSR NibbleSubtract ;($8871)Check if nibble to be converted to twos compliment. |
L885E: STA SparkleSpr0YChange,X ;Twos compliment stored if Y coord decreasing. | L885E: STA SparkleSpr0YChange,X ;Twos compliment stored if Y coord decreasing. |
L8861: PLA ; | L8861: PLA ; |
L8862: AND #$0F ;Discard upper 4 bits. | L8862: AND #$0F ;Discard upper 4 bits. |
L8864: JSR NibbleSubtract ;($8871)Check if nibble to be converted to twos compliment. | L8864: JSR NibbleSubtract ;($8871)Check if nibble to be converted to twos compliment. |
L8867:* STA SparkleSpr0XChange,X ;Store amount to move spite in x direction. | L8867:* STA SparkleSpr0XChange,X ;Store amount to move spite in x direction. |
L886A: INC IntroSpr0Index,X ; | L886A: INC IntroSpr0Index,X ; |
L886D: INC IntroSpr0Index,X ;Add two to find index for next data byte. | L886D: INC IntroSpr0Index,X ;Add two to find index for next data byte. |
L8870: RTS ; | L8870: RTS ; |
| |
NibbleSubtract: | NibbleSubtract: |
L8871: CMP #$08 ;If bit 3 is set, nibble is a negative number--> | L8871: CMP #$08 ;If bit 3 is set, nibble is a negative number--> |
L8873: BCC + ;and lower three bits are converted to twos--> | L8873: BCC + ;and lower three bits are converted to twos--> |
L8875: AND #$07 ;compliment for subtraction, else exit. | L8875: AND #$07 ;compliment for subtraction, else exit. |
L8877: JSR TwosCompliment ;($C3D4)Prepare for subtraction with twos compliment. | L8877: JSR TwosCompliment ;($C3D4)Prepare for subtraction with twos compliment. |
L887A:* RTS ; | L887A:* RTS ; |
| |
WriteIntroSprite: | WriteIntroSprite: |
L887B: LDA IntroSpr0YCoord,X ; | L887B: LDA IntroSpr0YCoord,X ; |
L887E: SEC ;Subtract #$01 from first byte to get proper y coordinate. | L887E: SEC ;Subtract #$01 from first byte to get proper y coordinate. |
L887F: SBC #$01 ; | L887F: SBC #$01 ; |
L8881: STA Sprite04RAM,X ; | L8881: STA Sprite04RAM,X ; |
L8884: LDA IntroSpr0PattTbl,X ; | L8884: LDA IntroSpr0PattTbl,X ; |
L8887: STA Sprite04RAM+1,X ;Load the four bytes for the--> | L8887: STA Sprite04RAM+1,X ;Load the four bytes for the--> |
L888A: LDA IntroSpr0Cntrl,X ;intro sprites into sprite RAM. | L888A: LDA IntroSpr0Cntrl,X ;intro sprites into sprite RAM. |
L888D: STA Sprite04RAM+2,X ; | L888D: STA Sprite04RAM+2,X ; |
L8890: LDA IntroSpr0XCoord,X ; | L8890: LDA IntroSpr0XCoord,X ; |
L8893: STA Sprite04RAM+3,X ; | L8893: STA Sprite04RAM+3,X ; |
L8896: RTS ; | L8896: RTS ; |
| |
LoadInitialSpriteData: | LoadInitialSpriteData: |
L8897: LDA #$20 ; | L8897: LDA #$20 ; |
L8899: STA Second4Delay ;Set delay for second 4 sprites to 32 frames. | L8899: STA Second4Delay ;Set delay for second 4 sprites to 32 frames. |
L889B: LDX #$3F ;Prepare to loop 64 times. | L889B: LDX #$3F ;Prepare to loop 64 times. |
| |
L889D:* LDA Sprite0and4InitTbl,X ;Load data from tables below. | L889D:* LDA Sprite0and4InitTbl,X ;Load data from tables below. |
L88A0: CMP $FF ;If #$FF, skip loading that byte and move to next item. | L88A0: CMP $FF ;If #$FF, skip loading that byte and move to next item. |
L88A2: BEQ + ; | L88A2: BEQ + ; |
L88A4: STA IntroSpr0YCoord,X ;Store initial values for sprites 0 thru 3. | L88A4: STA IntroSpr0YCoord,X ;Store initial values for sprites 0 thru 3. |
L88A7: STA IntroSpr4YCoord,X ;Store initial values for sprites 4 thru 7. | L88A7: STA IntroSpr4YCoord,X ;Store initial values for sprites 4 thru 7. |
L88AA:* DEX ; | L88AA:* DEX ; |
L88AB: BPL -- ;Loop until all data is loaded. | L88AB: BPL -- ;Loop until all data is loaded. |
| |
L88AD: LDA #$B8 ;Special case for sprite 6 and 7. | L88AD: LDA #$B8 ;Special case for sprite 6 and 7. |
L88AF: STA IntroSpr6YCoord ; | L88AF: STA IntroSpr6YCoord ; |
L88B2: STA IntroSpr7YCoord ;Change sprite 6 and 7 initial y position. | L88B2: STA IntroSpr7YCoord ;Change sprite 6 and 7 initial y position. |
L88B5: LDA #$16 ; | L88B5: LDA #$16 ; |
L88B7: STA IntroSpr6YRise ;Change sprite 6 and 7 y displacement. The combination--> | L88B7: STA IntroSpr6YRise ;Change sprite 6 and 7 y displacement. The combination--> |
L88BA: STA IntroSpr7YRise ;of these two changes the slope of the sprite movement. | L88BA: STA IntroSpr7YRise ;of these two changes the slope of the sprite movement. |
L88BD: RTS ; | L88BD: RTS ; |
| |
;The following tables are loaded into RAM as initial sprite control values for the crosshair sprites. | ;The following tables are loaded into RAM as initial sprite control values for the crosshair sprites. |
| |
Sprite0and4InitTbl: | Sprite0and4InitTbl: |
L88BE: .byte $20 ;Initial starting y screen position. | L88BE: .byte $20 ;Initial starting y screen position. |
L88BF: .byte $C5 ;Sprite pattern table index. | L88BF: .byte $C5 ;Sprite pattern table index. |
L88C0: .byte $80 ;Sprite control byte. | L88C0: .byte $80 ;Sprite control byte. |
L88C1: .byte $00 ;Initial starting x screen position. | L88C1: .byte $00 ;Initial starting x screen position. |
L88C2: .byte $FF ;Not used. | L88C2: .byte $FF ;Not used. |
L88C3: .byte $FF ;Not used. | L88C3: .byte $FF ;Not used. |
L88C4: .byte $74 ;Intro sprite x total movement distance. | L88C4: .byte $74 ;Intro sprite x total movement distance. |
L88C5: .byte $58 ;Intro sprite y total movement distance. | L88C5: .byte $58 ;Intro sprite y total movement distance. |
L88C6: .byte $FF ;Not used. | L88C6: .byte $FF ;Not used. |
L88C7: .byte $FF ;Not used. | L88C7: .byte $FF ;Not used. |
L88C8: .byte $00 ;Sprite task complete idicator. | L88C8: .byte $00 ;Sprite task complete idicator. |
L88C9: .byte $FF ;Not used. | L88C9: .byte $FF ;Not used. |
L88CA: .byte $1D ;x displacement of sprite movement(run). | L88CA: .byte $1D ;x displacement of sprite movement(run). |
L88CB: .byte $0E ;y displacement of sprite movement(rise). | L88CB: .byte $0E ;y displacement of sprite movement(rise). |
L88CC: .byte $01 ;Change sprite x coord in positive direction. | L88CC: .byte $01 ;Change sprite x coord in positive direction. |
L88CD: .byte $01 ;Change sprite y coord in positive direction. | L88CD: .byte $01 ;Change sprite y coord in positive direction. |
| |
Sprite1and5InitTbl: | Sprite1and5InitTbl: |
L88CE: .byte $20 ;Initial starting y screen position. | L88CE: .byte $20 ;Initial starting y screen position. |
L88CF: .byte $C5 ;Sprite pattern table index. | L88CF: .byte $C5 ;Sprite pattern table index. |
L88D0: .byte $C0 ;Sprite control byte. | L88D0: .byte $C0 ;Sprite control byte. |
L88D1: .byte $F8 ;Initial starting x screen position. | L88D1: .byte $F8 ;Initial starting x screen position. |
L88D2: .byte $FF ;Not used. | L88D2: .byte $FF ;Not used. |
L88D3: .byte $FF ;Not used. | L88D3: .byte $FF ;Not used. |
L88D4: .byte $7C ;Intro sprite x total movement distance. | L88D4: .byte $7C ;Intro sprite x total movement distance. |
L88D5: .byte $58 ;Intro sprite y total movement distance. | L88D5: .byte $58 ;Intro sprite y total movement distance. |
L88D6: .byte $FF ;Not used. | L88D6: .byte $FF ;Not used. |
L88D7: .byte $FF ;Not used. | L88D7: .byte $FF ;Not used. |
L88D8: .byte $00 ;Sprite task complete idicator. | L88D8: .byte $00 ;Sprite task complete idicator. |
L88D9: .byte $FF ;Not used. | L88D9: .byte $FF ;Not used. |
L88DA: .byte $1F ;x displacement of sprite movement(run). | L88DA: .byte $1F ;x displacement of sprite movement(run). |
L88DB: .byte $0E ;y displacement of sprite movement(rise). | L88DB: .byte $0E ;y displacement of sprite movement(rise). |
L88DC: .byte $80 ;Change sprite x coord in negative direction. | L88DC: .byte $80 ;Change sprite x coord in negative direction. |
L88DD: .byte $01 ;Change sprite y coord in positive direction. | L88DD: .byte $01 ;Change sprite y coord in positive direction. |
| |
Sprite2and6InitTbl: | Sprite2and6InitTbl: |
L88DE: .byte $C8 ;Initial starting y screen position. | L88DE: .byte $C8 ;Initial starting y screen position. |
L88DF: .byte $C5 ;Sprite pattern table index. | L88DF: .byte $C5 ;Sprite pattern table index. |
L88E0: .byte $00 ;Sprite control byte. | L88E0: .byte $00 ;Sprite control byte. |
L88E1: .byte $00 ;Initial starting x screen position. | L88E1: .byte $00 ;Initial starting x screen position. |
L88E2: .byte $FF ;Not used. | L88E2: .byte $FF ;Not used. |
L88E3: .byte $FF ;Not used. | L88E3: .byte $FF ;Not used. |
L88E4: .byte $74 ;Intro sprite x total movement distance. | L88E4: .byte $74 ;Intro sprite x total movement distance. |
L88E5: .byte $60 ;Intro sprite y total movement distance. | L88E5: .byte $60 ;Intro sprite y total movement distance. |
L88E6: .byte $FF ;Not used. | L88E6: .byte $FF ;Not used. |
L88E7: .byte $FF ;Not used. | L88E7: .byte $FF ;Not used. |
L88E8: .byte $00 ;Sprite task complete idicator. | L88E8: .byte $00 ;Sprite task complete idicator. |
L88E9: .byte $FF ;Not used. | L88E9: .byte $FF ;Not used. |
L88EA: .byte $1D ;x displacement of sprite movement(run). | L88EA: .byte $1D ;x displacement of sprite movement(run). |
L88EB: .byte $1A ;y displacement of sprite movement(rise). | L88EB: .byte $1A ;y displacement of sprite movement(rise). |
L88EC: .byte $01 ;Change sprite x coord in positive direction. | L88EC: .byte $01 ;Change sprite x coord in positive direction. |
L88ED: .byte $80 ;Change sprite y coord in negative direction. | L88ED: .byte $80 ;Change sprite y coord in negative direction. |
| |
Sprite3and7InitTbl: | Sprite3and7InitTbl: |
L88EE: .byte $C8 ;Initial starting y screen position. | L88EE: .byte $C8 ;Initial starting y screen position. |
L88EF: .byte $C5 ;Sprite pattern table index. | L88EF: .byte $C5 ;Sprite pattern table index. |
L88F0: .byte $40 ;Sprite control byte. | L88F0: .byte $40 ;Sprite control byte. |
L88F1: .byte $F8 ;Initial starting x screen position. | L88F1: .byte $F8 ;Initial starting x screen position. |
L88F2: .byte $FF ;Not used. | L88F2: .byte $FF ;Not used. |
L88F3: .byte $FF ;Not used. | L88F3: .byte $FF ;Not used. |
L88F4: .byte $7C ;Intro sprite x total movement distance. | L88F4: .byte $7C ;Intro sprite x total movement distance. |
L88F5: .byte $60 ;Intro sprite y total movement distance. | L88F5: .byte $60 ;Intro sprite y total movement distance. |
L88F6: .byte $FF ;Not used. | L88F6: .byte $FF ;Not used. |
L88F7: .byte $FF ;Not used. | L88F7: .byte $FF ;Not used. |
L88F8: .byte $00 ;Sprite task complete idicator. | L88F8: .byte $00 ;Sprite task complete idicator. |
L88F9: .byte $FF ;Not used. | L88F9: .byte $FF ;Not used. |
L88FA: .byte $1F ;x displacement of sprite movement(run). | L88FA: .byte $1F ;x displacement of sprite movement(run). |
L88FB: .byte $1A ;y displacement of sprite movement(rise). | L88FB: .byte $1A ;y displacement of sprite movement(rise). |
L88FC: .byte $80 ;Change sprite x coord in negative direction. | L88FC: .byte $80 ;Change sprite x coord in negative direction. |
L88FD: .byte $80 ;Change sprite y coord in negative direction. | L88FD: .byte $80 ;Change sprite y coord in negative direction. |
| |
DrawCrosshairsSprites: | DrawCrosshairsSprites: |
L88FE: LDA First4SlowCntr ; | L88FE: LDA First4SlowCntr ; |
L8900: BEQ + ;Has First4SlowCntr already hit 0? If so, branch. | L8900: BEQ + ;Has First4SlowCntr already hit 0? If so, branch. |
L8902: DEC First4SlowCntr ; | L8902: DEC First4SlowCntr ; |
L8904: BNE + ;Is First4SlowCntr now equal to 0? if not, branch. | L8904: BNE + ;Is First4SlowCntr now equal to 0? if not, branch. |
L8906: ASL IntroSpr0XRun ; | L8906: ASL IntroSpr0XRun ; |
L8909: ASL IntroSpr0YRise ; | L8909: ASL IntroSpr0YRise ; |
L890C: ASL IntroSpr1XRun ; | L890C: ASL IntroSpr1XRun ; |
L890F: ASL IntroSpr1YRise ; | L890F: ASL IntroSpr1YRise ; |
L8912: ASL IntroSpr2XRun ; | L8912: ASL IntroSpr2XRun ; |
L8915: ASL IntroSpr2YRise ; | L8915: ASL IntroSpr2YRise ; |
L8918: ASL IntroSpr3XRun ;Multiply the rise and run of the 8 sprites by 2.--> | L8918: ASL IntroSpr3XRun ;Multiply the rise and run of the 8 sprites by 2.--> |
L891B: ASL IntroSpr3YRise ;This doubles their speed. | L891B: ASL IntroSpr3YRise ;This doubles their speed. |
L891E: ASL IntroSpr4XRun ; | L891E: ASL IntroSpr4XRun ; |
L8921: ASL IntroSpr4YRise ; | L8921: ASL IntroSpr4YRise ; |
L8924: ASL IntroSpr5XRun ; | L8924: ASL IntroSpr5XRun ; |
L8927: ASL IntroSpr5YRise ; | L8927: ASL IntroSpr5YRise ; |
L892A: ASL IntroSpr6XRun ; | L892A: ASL IntroSpr6XRun ; |
L892D: ASL IntroSpr6YRise ; | L892D: ASL IntroSpr6YRise ; |
L8930: ASL IntroSpr7XRun ; | L8930: ASL IntroSpr7XRun ; |
L8933: ASL IntroSpr7YRise ; | L8933: ASL IntroSpr7YRise ; |
L8936:* LDX #$00 ; | L8936:* LDX #$00 ; |
L8938: JSR DoSpriteMovement ;($8963)Move sprite 0. | L8938: JSR DoSpriteMovement ;($8963)Move sprite 0. |
L893B: LDX #$10 ; | L893B: LDX #$10 ; |
L893D: JSR DoSpriteMovement ;($8963)Move sprite 1. | L893D: JSR DoSpriteMovement ;($8963)Move sprite 1. |
L8940: LDX #$20 ; | L8940: LDX #$20 ; |
L8942: JSR DoSpriteMovement ;($8963)Move sprite 2. | L8942: JSR DoSpriteMovement ;($8963)Move sprite 2. |
L8945: LDX #$30 ; | L8945: LDX #$30 ; |
L8947: LDA Second4Delay ;Check to see if the delay to start movement of the second--> | L8947: LDA Second4Delay ;Check to see if the delay to start movement of the second--> |
L8949: BEQ + ;4 sprites has ended. If so, start drawing those sprites. | L8949: BEQ + ;4 sprites has ended. If so, start drawing those sprites. |
L894B: DEC Second4Delay ; | L894B: DEC Second4Delay ; |
L894D: BNE ++ ; | L894D: BNE ++ ; |
L894F:* JSR DoSpriteMovement ;($8963)Move sprite 3. | L894F:* JSR DoSpriteMovement ;($8963)Move sprite 3. |
L8952: LDX #$40 ; | L8952: LDX #$40 ; |
L8954: JSR DoSpriteMovement ;($8963)Move sprite 4. | L8954: JSR DoSpriteMovement ;($8963)Move sprite 4. |
L8957: LDX #$50 ; | L8957: LDX #$50 ; |
L8959: JSR DoSpriteMovement ;($8963)Move sprite 5. | L8959: JSR DoSpriteMovement ;($8963)Move sprite 5. |
L895C: LDX #$60 ; | L895C: LDX #$60 ; |
L895E: JSR DoSpriteMovement ;($8963)Move sprite 6. | L895E: JSR DoSpriteMovement ;($8963)Move sprite 6. |
L8961: LDX #$70 ;($8963)Move sprite 7. | L8961: LDX #$70 ;($8963)Move sprite 7. |
| |
DoSpriteMovement: | DoSpriteMovement: |
L8963:* LDA IntroSpr0Complete,X ;If the current sprite has finished--> | L8963:* LDA IntroSpr0Complete,X ;If the current sprite has finished--> |
L8966: BNE ++ ;its movements, exit this routine. | L8966: BNE ++ ;its movements, exit this routine. |
L8968: JSR UpdateSpriteCoords ;($981E)Calculate new sprite position. | L8968: JSR UpdateSpriteCoords ;($981E)Calculate new sprite position. |
L896B: BCS + ;If sprite not at final position, branch to move next frame. | L896B: BCS + ;If sprite not at final position, branch to move next frame. |
L896D: LDA #$01 ;Sprite movement complete. | L896D: LDA #$01 ;Sprite movement complete. |
L896F: STA IntroSpr0Complete,X ; | L896F: STA IntroSpr0Complete,X ; |
L8972:* JMP WriteIntroSprite ;($887B)Write sprite data to sprite RAM. | L8972:* JMP WriteIntroSprite ;($887B)Write sprite data to sprite RAM. |
L8975:* RTS ; | L8975:* RTS ; |
| |
DrawCrossSprites: | DrawCrossSprites: |
L8976: LDA DrawCross ;If not ready to draw crosshairs,--> | L8976: LDA DrawCross ;If not ready to draw crosshairs,--> |
L8978: BEQ ++++ ;branch to exit. | L8978: BEQ ++++ ;branch to exit. |
L897A: LDY CrossDataIndex ; | L897A: LDY CrossDataIndex ; |
L897C: CPY #$04 ;Check to see if at last index in table. If so, branch--> | L897C: CPY #$04 ;Check to see if at last index in table. If so, branch--> |
L897E: BCC + ;to draw cross sprites. | L897E: BCC + ;to draw cross sprites. |
L8980: BNE ++++ ;If beyond last index, branch to exit. | L8980: BNE ++++ ;If beyond last index, branch to exit. |
L8982: LDA #$00 ; | L8982: LDA #$00 ; |
L8984: STA DrawCross ;If at last index, clear indicaor to draw cross sprites. | L8984: STA DrawCross ;If at last index, clear indicaor to draw cross sprites. |
L8986:* LDA CrossSpriteIndexTbl,Y ; | L8986:* LDA CrossSpriteIndexTbl,Y ; |
L8989: STA $00 ; | L8989: STA $00 ; |
L898B: LDY #$00 ;Reset index into CrossSpriteDataTbl | L898B: LDY #$00 ;Reset index into CrossSpriteDataTbl |
| |
L898D:* LDX CrossSpriteDataTbl,Y ;Get offet into sprite RAM to load sprite. | L898D:* LDX CrossSpriteDataTbl,Y ;Get offet into sprite RAM to load sprite. |
L8990: INY ; | L8990: INY ; |
L8991:* LDA CrossSpriteDataTbl,Y ;Get sprite data byte. | L8991:* LDA CrossSpriteDataTbl,Y ;Get sprite data byte. |
L8994: STA Sprite00RAM,X ;Store byte in sprite RAM. | L8994: STA Sprite00RAM,X ;Store byte in sprite RAM. |
L8997: INX ;Move to next sprite RAM address. | L8997: INX ;Move to next sprite RAM address. |
L8998: INY ;Move to next data byte in table. | L8998: INY ;Move to next data byte in table. |
L8999: TXA ; | L8999: TXA ; |
L899A: AND #$03 ;Is new sprite position reached?--> | L899A: AND #$03 ;Is new sprite position reached?--> |
L899C: BNE - ;if not, branch to load next sprite data byte. | L899C: BNE - ;if not, branch to load next sprite data byte. |
L899E: CPY $00 ;Has all the sprites been loaded for cross graphic?--> | L899E: CPY $00 ;Has all the sprites been loaded for cross graphic?--> |
L89A0: BNE -- ;If not, branch to load next set of sprite data. | L89A0: BNE -- ;If not, branch to load next set of sprite data. |
| |
L89A2: LDA FrameCount ; | L89A2: LDA FrameCount ; |
L89A4: LSR ;Increment index into CrossSpriteIndexTbl every--> | L89A4: LSR ;Increment index into CrossSpriteIndexTbl every--> |
L89A5: BCC + ;other frame. This updates the cross sprites--> | L89A5: BCC + ;other frame. This updates the cross sprites--> |
L89A7: INC CrossDataIndex ;every two frames. | L89A7: INC CrossDataIndex ;every two frames. |
L89A9:* RTS ; | L89A9:* RTS ; |
| |
;The following table tells the routine above how many data bytes to load from CrossSpriteDataTbl. | ;The following table tells the routine above how many data bytes to load from CrossSpriteDataTbl. |
| |
SparkleAddressTbl: | SparkleAddressTbl: |
L89AF: .word TopSparkleDataTbl ;($89B3)Table for top sparkle data. | L89AF: .word TopSparkleDataTbl ;($89B3)Table for top sparkle data. |
L89B1: .word BottomSparkleDataTbl ;($89E9)Table for bottom sparkle data. | L89B1: .word BottomSparkleDataTbl ;($89E9)Table for bottom sparkle data. |
| |
;The following two tables are the data tables for controlling the movement of the sparkle sprites | ;The following two tables are the data tables for controlling the movement of the sparkle sprites |
| |
TopSparkleDataTbl: | TopSparkleDataTbl: |
L89B3: .byte $01, $00 | L89B3: .byte $01, $00 |
L89B5: .byte $01, $00 | L89B5: .byte $01, $00 |
L89B7: .byte $01, $01 | L89B7: .byte $01, $01 |
L89B9: .byte $06, $00 | L89B9: .byte $06, $00 |
L89BB: .byte $07, $01 | L89BB: .byte $07, $01 |
L89BD: .byte $10, $01 | L89BD: .byte $10, $01 |
L89BF: .byte $03, $01 | L89BF: .byte $03, $01 |
L89C1: .byte $01, $00 | L89C1: .byte $01, $00 |
L89C3: .byte $01, $01 | L89C3: .byte $01, $01 |
L89C5: .byte $01, $00 | L89C5: .byte $01, $00 |
L89C7: .byte $01, $01 | L89C7: .byte $01, $01 |
L89C9: .byte $01, $00 | L89C9: .byte $01, $00 |
L89CB: .byte $09, $01 | L89CB: .byte $09, $01 |
L89CD: .byte $04, $00 | L89CD: .byte $04, $00 |
L89CF: .byte $27, $01 | L89CF: .byte $27, $01 |
L89D1: .byte $01, $00 | L89D1: .byte $01, $00 |
L89D3: .byte $01, $00 | L89D3: .byte $01, $00 |
L89D5: .byte $06, $01 | L89D5: .byte $06, $01 |
L89D7: .byte $01, $00 | L89D7: .byte $01, $00 |
L89D9: .byte $15, $01 | L89D9: .byte $15, $01 |
L89DB: .byte $06, $00 | L89DB: .byte $06, $00 |
L89DD: .byte $01, $01 | L89DD: .byte $01, $01 |
L89DF: .byte $08, $01 | L89DF: .byte $08, $01 |
L89E1: .byte $0E, $02 | L89E1: .byte $0E, $02 |
L89E3: .byte $02, $03 | L89E3: .byte $02, $03 |
L89E5: .byte $06, $04 | L89E5: .byte $06, $04 |
L89E7: .byte $00, $00 | L89E7: .byte $00, $00 |
| |
BottomSparkleDataTbl: | BottomSparkleDataTbl: |
L89E9: .byte $01, $00 | L89E9: .byte $01, $00 |
L89EB: .byte $08, $09 | L89EB: .byte $08, $09 |
L89ED: .byte $01, $99 | L89ED: .byte $01, $99 |
L89EF: .byte $01, $09 | L89EF: .byte $01, $09 |
L89F1: .byte $01, $99 | L89F1: .byte $01, $99 |
L89F3: .byte $01, $09 | L89F3: .byte $01, $09 |
L89F5: .byte $01, $99 | L89F5: .byte $01, $99 |
L89F7: .byte $01, $09 | L89F7: .byte $01, $09 |
L89F9: .byte $01, $99 | L89F9: .byte $01, $99 |
L89FB: .byte $01, $09 | L89FB: .byte $01, $09 |
L89FD: .byte $01, $99 | L89FD: .byte $01, $99 |
L89FF: .byte $01, $09 | L89FF: .byte $01, $09 |
L8A01: .byte $01, $99 | L8A01: .byte $01, $99 |
L8A03: .byte $01, $09 | L8A03: .byte $01, $09 |
L8A05: .byte $01, $99 | L8A05: .byte $01, $99 |
L8A07: .byte $01, $09 | L8A07: .byte $01, $09 |
L8A09: .byte $01, $99 | L8A09: .byte $01, $99 |
L8A0B: .byte $01, $09 | L8A0B: .byte $01, $09 |
L8A0D: .byte $01, $99 | L8A0D: .byte $01, $99 |
L8A0F: .byte $01, $09 | L8A0F: .byte $01, $09 |
L8A11: .byte $01, $99 | L8A11: .byte $01, $99 |
L8A13: .byte $01, $19 | L8A13: .byte $01, $19 |
L8A15: .byte $01, $11 | L8A15: .byte $01, $11 |
L8A17: .byte $01, $10 | L8A17: .byte $01, $10 |
L8A19: .byte $01, $11 | L8A19: .byte $01, $11 |
L8A1B: .byte $01, $10 | L8A1B: .byte $01, $10 |
L8A1D: .byte $01, $11 | L8A1D: .byte $01, $11 |
L8A1F: .byte $01, $10 | L8A1F: .byte $01, $10 |
L8A21: .byte $01, $11 | L8A21: .byte $01, $11 |
L8A23: .byte $01, $10 | L8A23: .byte $01, $10 |
L8A25: .byte $01, $11 | L8A25: .byte $01, $11 |
L8A27: .byte $01, $10 | L8A27: .byte $01, $10 |
L8A29: .byte $01, $11 | L8A29: .byte $01, $11 |
L8A2B: .byte $01, $10 | L8A2B: .byte $01, $10 |
L8A2D: .byte $01, $11 | L8A2D: .byte $01, $11 |
L8A2F: .byte $01, $10 | L8A2F: .byte $01, $10 |
L8A31: .byte $02, $11 | L8A31: .byte $02, $11 |
L8A33: .byte $01, $10 | L8A33: .byte $01, $10 |
L8A35: .byte $01, $11 | L8A35: .byte $01, $11 |
L8A37: .byte $10, $09 | L8A37: .byte $10, $09 |
L8A39: .byte $FF, $EF ;MSB of first byte set. move sprite x pos -17 pixles. | L8A39: .byte $FF, $EF ;MSB of first byte set. move sprite x pos -17 pixles. |
L8A3B: .byte $11, $09 | L8A3B: .byte $11, $09 |
L8A3D: .byte $FF, $F3 ;MSB of first byte set. move sprite x pos -13 pixles. | L8A3D: .byte $FF, $F3 ;MSB of first byte set. move sprite x pos -13 pixles. |
L8A3F: .byte $1F, $09 | L8A3F: .byte $1F, $09 |
L8A41: .byte $FF, $EC ;MSB of first byte set. move sprite x pos -20 pixles. | L8A41: .byte $FF, $EC ;MSB of first byte set. move sprite x pos -20 pixles. |
L8A43: .byte $0F, $09 | L8A43: .byte $0F, $09 |
L8A45: .byte $FF, $ED ;MSB of first byte set. move sprite x pos -19 pixles. | L8A45: .byte $FF, $ED ;MSB of first byte set. move sprite x pos -19 pixles. |
L8A47: .byte $16, $09 | L8A47: .byte $16, $09 |
L8A49: .byte $00, $00 | L8A49: .byte $00, $00 |
| |
;The following table is used by the DrawCrossSprites routine to draw the sprites on the screen that | ;The following table is used by the DrawCrossSprites routine to draw the sprites on the screen that |
| |
CrossSpriteDataTbl: | CrossSpriteDataTbl: |
L8A4B: .byte $10 ;Load following sprite data into Sprite04RAM. | L8A4B: .byte $10 ;Load following sprite data into Sprite04RAM. |
L8A4C: .byte $5A, $C0, $00, $79 ;Sprite data. | L8A4C: .byte $5A, $C0, $00, $79 ;Sprite data. |
L8A50: .byte $14 ;Load following sprite data into Sprite05RAM. | L8A50: .byte $14 ;Load following sprite data into Sprite05RAM. |
L8A51: .byte $52, $C8, $00, $79 ;Sprite data. | L8A51: .byte $52, $C8, $00, $79 ;Sprite data. |
L8A55: .byte $18 ;Load following sprite data into Sprite06RAM. | L8A55: .byte $18 ;Load following sprite data into Sprite06RAM. |
L8A56: .byte $5A, $C2, $40, $71 ;Sprite data. | L8A56: .byte $5A, $C2, $40, $71 ;Sprite data. |
L8A5A: .byte $1C ;Load following sprite data into Sprite07RAM. | L8A5A: .byte $1C ;Load following sprite data into Sprite07RAM. |
L8A5B: .byte $5A, $C2, $00, $81 ;Sprite data. | L8A5B: .byte $5A, $C2, $00, $81 ;Sprite data. |
L8A5F: .byte $20 ;Load following sprite data into Sprite08RAM. | L8A5F: .byte $20 ;Load following sprite data into Sprite08RAM. |
L8A60: .byte $62, $C8, $80, $79 ;Sprite data. | L8A60: .byte $62, $C8, $80, $79 ;Sprite data. |
L8A64: .byte $14 ;Load following sprite data into Sprite05RAM. | L8A64: .byte $14 ;Load following sprite data into Sprite05RAM. |
L8A65: .byte $52, $C9, $00, $79 ;Sprite data. | L8A65: .byte $52, $C9, $00, $79 ;Sprite data. |
L8A69: .byte $18 ;Load following sprite data into Sprite06RAM. | L8A69: .byte $18 ;Load following sprite data into Sprite06RAM. |
L8A6A: .byte $5A, $C1, $00, $71 ;Sprite data. | L8A6A: .byte $5A, $C1, $00, $71 ;Sprite data. |
L8A6E: .byte $1C ;Load following sprite data into Sprite07RAM. | L8A6E: .byte $1C ;Load following sprite data into Sprite07RAM. |
L8A6F: .byte $5A, $C1, $00, $81 ;Sprite data. | L8A6F: .byte $5A, $C1, $00, $81 ;Sprite data. |
L8A73: .byte $20 ;Load following sprite data into Sprite08RAM. | L8A73: .byte $20 ;Load following sprite data into Sprite08RAM. |
L8A74: .byte $62, $C9, $00, $79 ;Sprite data. | L8A74: .byte $62, $C9, $00, $79 ;Sprite data. |
L8A78: .byte $24 ;Load following sprite data into Sprite09RAM. | L8A78: .byte $24 ;Load following sprite data into Sprite09RAM. |
L8A79: .byte $4A, $C8, $00, $79 ;Sprite data. | L8A79: .byte $4A, $C8, $00, $79 ;Sprite data. |
L8A7D: .byte $28 ;Load following sprite data into Sprite0ARAM. | L8A7D: .byte $28 ;Load following sprite data into Sprite0ARAM. |
L8A7E: .byte $5A, $C2, $40, $69 ;Sprite data. | L8A7E: .byte $5A, $C2, $40, $69 ;Sprite data. |
L8A82: .byte $2C ;Load following sprite data into Sprite0BRAM. | L8A82: .byte $2C ;Load following sprite data into Sprite0BRAM. |
L8A83: .byte $5A, $C2, $00, $89 ;Sprite data. | L8A83: .byte $5A, $C2, $00, $89 ;Sprite data. |
L8A87: .byte $30 ;Load following sprite data into Sprite0CRAM. | L8A87: .byte $30 ;Load following sprite data into Sprite0CRAM. |
L8A88: .byte $6A, $C8, $80, $79 ;Sprite data. | L8A88: .byte $6A, $C8, $80, $79 ;Sprite data. |
| |
LoadPalData: | LoadPalData: |
L8A8C: lDY PalDataIndex ; | L8A8C: lDY PalDataIndex ; |
L8A8E: LDA PalSelectTbl,Y ;Chooses which set of palette data--> | L8A8E: LDA PalSelectTbl,Y ;Chooses which set of palette data--> |
L8A91: CMP #$FF ;to load from the table below. | L8A91: CMP #$FF ;to load from the table below. |
L8A93: BEQ + ; | L8A93: BEQ + ; |
L8A95: STA PalDataPending ;Prepare to write palette data. | L8A95: STA PalDataPending ;Prepare to write palette data. |
L8A97: INC PalDataIndex ; | L8A97: INC PalDataIndex ; |
L8A99:* RTS ; | L8A99:* RTS ; |
| |
;The table below is used by above routine to pick the proper palette. | ;The table below is used by above routine to pick the proper palette. |
| |
PalSelectTbl: | PalSelectTbl: |
L8A9A: .byte $02, $03, $04, $05, $06, $07, $08, $09, $0A, $0B, $0C, $0C, $FF | L8A9A: .byte $02, $03, $04, $05, $06, $07, $08, $09, $0A, $0B, $0C, $0C, $FF |
| |
FlashIntroScreen: | FlashIntroScreen: |
L8AA7: LDY ScreenFlashPalIndex ;Load index into table below. | L8AA7: LDY ScreenFlashPalIndex ;Load index into table below. |
L8AA9: LDA ScreenFlashPalTbl,Y ;Load palette data byte. | L8AA9: LDA ScreenFlashPalTbl,Y ;Load palette data byte. |
L8AAC: CMP #$FF ;Has the end of the table been reached?--> | L8AAC: CMP #$FF ;Has the end of the table been reached?--> |
L8AAE: BNE + ;If not, branch. | L8AAE: BNE + ;If not, branch. |
L8AB0: LDA #$00 ; | L8AB0: LDA #$00 ; |
L8AB2: STA ScreenFlashPalIndex ;Clear screen flash palette index and reset--> | L8AB2: STA ScreenFlashPalIndex ;Clear screen flash palette index and reset--> |
L8AB4: STA FlashScreen ;screen flash control address. | L8AB4: STA FlashScreen ;screen flash control address. |
L8AB6: BEQ ++ ;Branch always. | L8AB6: BEQ ++ ;Branch always. |
L8AB8:* STA PalDataPending ;Store palette change data. | L8AB8:* STA PalDataPending ;Store palette change data. |
L8ABA: INC ScreenFlashPalIndex ;Increment index into table below. | L8ABA: INC ScreenFlashPalIndex ;Increment index into table below. |
L8ABC:* RTS ; | L8ABC:* RTS ; |
| |
ScreenFlashPalTbl: | ScreenFlashPalTbl: |
L8ABD: .byte $11, $01, $11, $01, $11, $11, $01, $11, $01, $FF | L8ABD: .byte $11, $01, $11, $01, $11, $11, $01, $11, $01, $FF |
| |
;----------------------------------[ Intro star palette routines ]----------------------------------- | ;----------------------------------[ Intro star palette routines ]----------------------------------- |
| |
StarPalSwitch: | StarPalSwitch: |
L8AC7: LDA FrameCount ; | L8AC7: LDA FrameCount ; |
L8AC9: AND #$0F ;Change star palette every 16th frame. | L8AC9: AND #$0F ;Change star palette every 16th frame. |
L8ACB: BNE + ; | L8ACB: BNE + ; |
L8ACD: LDA PPUStrIndex ; | L8ACD: LDA PPUStrIndex ; |
L8AD0: BEQ ++ ;Is any other PPU data waiting? If so, exit. | L8AD0: BEQ ++ ;Is any other PPU data waiting? If so, exit. |
L8AD2:* RTS ; | L8AD2:* RTS ; |
| |
L8AD3:* LDA #$19 ; | L8AD3:* LDA #$19 ; |
L8AD5: STA $00 ;Prepare to write to the sprite palette--> | L8AD5: STA $00 ;Prepare to write to the sprite palette--> |
L8AD7: LDA #$3F ;starting at address $3F19. | L8AD7: LDA #$3F ;starting at address $3F19. |
L8AD9: STA $01 ; | L8AD9: STA $01 ; |
L8ADB: LDA IntroStarOffset ;Use only first 3 bits of byte since the pointer--> | L8ADB: LDA IntroStarOffset ;Use only first 3 bits of byte since the pointer--> |
L8ADD: AND #$07 ;table only has 8 entries. | L8ADD: AND #$07 ;table only has 8 entries. |
L8ADF: ASL ;*2 to find entry in IntroStarPntr table. | L8ADF: ASL ;*2 to find entry in IntroStarPntr table. |
L8AE0: TAY ; | L8AE0: TAY ; |
L8AE1: LDA IntroStarPntr,Y ;Stores starting address of palette data to write--> | L8AE1: LDA IntroStarPntr,Y ;Stores starting address of palette data to write--> |
L8AE4: STA $02 ;into $02 and $03 from IntroStarPntr table. | L8AE4: STA $02 ;into $02 and $03 from IntroStarPntr table. |
L8AE6: LDA IntroStarPntr+1,Y ; | L8AE6: LDA IntroStarPntr+1,Y ; |
L8AE9: STA $03 ; | L8AE9: STA $03 ; |
L8AEB: INC IntroStarOffset ;Increment index for next palette change. | L8AEB: INC IntroStarOffset ;Increment index for next palette change. |
L8AED: JSR PrepPPUPaletteString ;($C37E)Prepare and write new palette data. | L8AED: JSR PrepPPUPaletteString ;($C37E)Prepare and write new palette data. |
L8AF0: LDA #$1D ; | L8AF0: LDA #$1D ; |
L8AF2: STA $00 ; | L8AF2: STA $00 ; |
L8AF4: LDA #$3F ;Prepare another write to the sprite palette.--> | L8AF4: LDA #$3F ;Prepare another write to the sprite palette.--> |
L8AF6: STA $01 ;This tie starting at address $3F1D. | L8AF6: STA $01 ;This tie starting at address $3F1D. |
L8AF8: INY ; | L8AF8: INY ; |
L8AF9: JSR AddYToPtr02 ;($C2B3)Find new data base of palette data. | L8AF9: JSR AddYToPtr02 ;($C2B3)Find new data base of palette data. |
L8AFC: JMP PrepPPUPaletteString ;($C37E)Prepare and write new palette data. | L8AFC: JMP PrepPPUPaletteString ;($C37E)Prepare and write new palette data. |
| |
;The following table is a list of pointers into the table below. It contains | ;The following table is a list of pointers into the table below. It contains |
| |
IntroStarPntr: | IntroStarPntr: |
L8AFF: .word $8B0F, $8B19, $8B23, $8B2D, $8B37, $8B41, $8B4B, $8B55 | L8AFF: .word $8B0F, $8B19, $8B23, $8B2D, $8B37, $8B41, $8B4B, $8B55 |
| |
;The following table contains the platette data that is changed in the intro | ;The following table contains the platette data that is changed in the intro |
| |
IntroStarPal: | IntroStarPal: |
L8B0F: .byte $03, $0F, $02, $13, $00, $03, $00, $34, $0F, $00 | L8B0F: .byte $03, $0F, $02, $13, $00, $03, $00, $34, $0F, $00 |
L8B10: .byte $03, $06, $01, $23, $00, $03, $0F, $34, $09, $00 | L8B10: .byte $03, $06, $01, $23, $00, $03, $0F, $34, $09, $00 |
L8B23: .byte $03, $16, $0F, $23, $00, $03, $0F, $24, $1A, $00 | L8B23: .byte $03, $16, $0F, $23, $00, $03, $0F, $24, $1A, $00 |
L8B2D: .byte $03, $17, $0F, $13, $00, $03, $00, $04, $28, $00 | L8B2D: .byte $03, $17, $0F, $13, $00, $03, $00, $04, $28, $00 |
L8B37: .byte $03, $17, $01, $14, $00, $03, $10, $0F, $28, $00 | L8B37: .byte $03, $17, $01, $14, $00, $03, $10, $0F, $28, $00 |
L8B41: .byte $03, $16, $02, $0F, $00, $03, $30, $0F, $1A, $00 | L8B41: .byte $03, $16, $02, $0F, $00, $03, $30, $0F, $1A, $00 |
L8B4B: .byte $03, $06, $12, $0F, $00, $03, $30, $04, $09, $00 | L8B4B: .byte $03, $06, $12, $0F, $00, $03, $30, $04, $09, $00 |
L8B55: .byte $03, $0F, $12, $14, $00, $03, $10, $24, $0F, $00 | L8B55: .byte $03, $0F, $12, $14, $00, $03, $10, $24, $0F, $00 |
| |
;---------------------------------------------------------------------------------------------------- | ;---------------------------------------------------------------------------------------------------- |
| |
DoFadeOut: | DoFadeOut: |
L8B5F: LDY FadeDataIndex ;Load palette data from table below. | L8B5F: LDY FadeDataIndex ;Load palette data from table below. |
L8B61: LDA FadeOutPalData,Y ; | L8B61: LDA FadeOutPalData,Y ; |
L8B64: CMP #$FF ;If palette data = #$FF, exit. | L8B64: CMP #$FF ;If palette data = #$FF, exit. |
L8B66: BEQ + ; | L8B66: BEQ + ; |
L8B68: STA PalDataPending ;Store new palette data. | L8B68: STA PalDataPending ;Store new palette data. |
L8B6A: INC FadeDataIndex ; | L8B6A: INC FadeDataIndex ; |
L8B6C:* RTS ; | L8B6C:* RTS ; |
| |
FadeOutPalData: | FadeOutPalData: |
L8B6D: .byte $0D, $0E, $0F, $10, $01, $FF | L8B6D: .byte $0D, $0E, $0F, $10, $01, $FF |
| |
FadeInPalData: | FadeInPalData: |
L8B73: .Byte $01, $10, $0F, $0E, $0D, $FF | L8B73: .Byte $01, $10, $0F, $0E, $0D, $FF |
| |
;----------------------------------------[ Password routines ]--------------------------------------- | ;----------------------------------------[ Password routines ]--------------------------------------- |
| |
ProcessUniqueItems: | ProcessUniqueItems: |
L8B79: LDA NumberOfUniqueItems ; | L8B79: LDA NumberOfUniqueItems ; |
L8B7C: STA $03 ;Store NumberOfUniqueItems at $03. | L8B7C: STA $03 ;Store NumberOfUniqueItems at $03. |
L8B7E: LDY #$00 ; | L8B7E: LDY #$00 ; |
L8B80: STY $04 ;Set $04 to #$00. | L8B80: STY $04 ;Set $04 to #$00. |
L8B82:* LDY $04 ;Use $04 at index into unique itme list. | L8B82:* LDY $04 ;Use $04 at index into unique itme list. |
L8B84: INY ; | L8B84: INY ; |
L8B85: LDA UniqueItemHistory-1,Y ; | L8B85: LDA UniqueItemHistory-1,Y ; |
L8B88: STA $00 ;Load the two bytes representing the aquired--> | L8B88: STA $00 ;Load the two bytes representing the aquired--> |
L8B8A: INY ;Unique item and store them in $00 and $01. | L8B8A: INY ;Unique item and store them in $00 and $01. |
L8B8B: LDA UniqueItemHistory-1,Y ; | L8B8B: LDA UniqueItemHistory-1,Y ; |
L8B8E: STA $01 ; | L8B8E: STA $01 ; |
L8B90: STY $04 ;Increment $04 by two (load unique item complete). | L8B90: STY $04 ;Increment $04 by two (load unique item complete). |
L8B92: JSR UniqueItemSearch ;($8B9C)Find unique item. | L8B92: JSR UniqueItemSearch ;($8B9C)Find unique item. |
L8B95: LDY $04 ; | L8B95: LDY $04 ; |
L8B97: CPY $03 ;If all unique items processed, return, else--> | L8B97: CPY $03 ;If all unique items processed, return, else--> |
L8B99: BCC - ;branch to process next unique item. | L8B99: BCC - ;branch to process next unique item. |
L8B9B: RTS ; | L8B9B: RTS ; |
| |
UniqueItemSearch: | UniqueItemSearch: |
L8B9C: LDX #$00 ; | L8B9C: LDX #$00 ; |
L8B9E:* TXA ;Transfer X to A(Item number). | L8B9E:* TXA ;Transfer X to A(Item number). |
L8B9F: ASL ;Multiply by 2. | L8B9F: ASL ;Multiply by 2. |
L8BA0: TAY ;Store multiplied value in y. | L8BA0: TAY ;Store multiplied value in y. |
L8BA1: LDA ItemData,Y ;Load unique item reference starting at $9029(2 bytes). | L8BA1: LDA ItemData,Y ;Load unique item reference starting at $9029(2 bytes). |
L8BA4: CMP $00 ; | L8BA4: CMP $00 ; |
L8BA6: BNE + ; | L8BA6: BNE + ; |
L8BA8: LDA ItemData+1,Y ;Get next byte of unique item. | L8BA8: LDA ItemData+1,Y ;Get next byte of unique item. |
L8BAB: CMP $01 ; | L8BAB: CMP $01 ; |
L8BAD: BEQ ++ ;If unique item found, branch to UniqueItemFound. | L8BAD: BEQ ++ ;If unique item found, branch to UniqueItemFound. |
L8BAF:* INX ; | L8BAF:* INX ; |
L8BB0: CPX #$3C ;If the unque item is a Zeebetite, return--> | L8BB0: CPX #$3C ;If the unque item is a Zeebetite, return--> |
L8BB2: BCC -- ;else branch to find next unique item. | L8BB2: BCC -- ;else branch to find next unique item. |
L8BB4: RTS ; | L8BB4: RTS ; |
| |
;The following routine sets the item bits for aquired items in addresses $6988 thru $698E.--> | ;The following routine sets the item bits for aquired items in addresses $6988 thru $698E.--> |
| |
UniqueItemFound: | UniqueItemFound: |
L8BB5:* TXA ; | L8BB5:* TXA ; |
L8BB6: JSR Adiv8 ;($C2C0)Divide by 8. | L8BB6: JSR Adiv8 ;($C2C0)Divide by 8. |
L8BB9: STA $05 ;Shifts 5 MSBs to LSBs of item # and saves results in $05. | L8BB9: STA $05 ;Shifts 5 MSBs to LSBs of item # and saves results in $05. |
L8BBB: JSR Amul8 ;($C2C6)Multiply by 8. | L8BBB: JSR Amul8 ;($C2C6)Multiply by 8. |
L8BBE: STA $02 ;Restores 5 MSBs of item # and drops 3 LSBs; saves in $02. | L8BBE: STA $02 ;Restores 5 MSBs of item # and drops 3 LSBs; saves in $02. |
L8BC0: TXA ; | L8BC0: TXA ; |
L8BC1: SEC ; | L8BC1: SEC ; |
L8BC2: SBC $02 ; | L8BC2: SBC $02 ; |
L8BC4: STA $06 ;Remove 5 MSBs and stores 3 LSBs in $06. | L8BC4: STA $06 ;Remove 5 MSBs and stores 3 LSBs in $06. |
L8BC6: LDX $05 ; | L8BC6: LDX $05 ; |
L8BC8: LDA PasswordByte00,X ; | L8BC8: LDA PasswordByte00,X ; |
L8BCB: LDY $06 ; | L8BCB: LDY $06 ; |
L8BCD: ORA PasswordBitmaskTbl,Y ; | L8BCD: ORA PasswordBitmaskTbl,Y ; |
L8BD0: STA PasswordByte00,X ;Masks each unique item in the proper item address--> | L8BD0: STA PasswordByte00,X ;Masks each unique item in the proper item address--> |
L8BD3: RTS ;(addresses $6988 thru $698E). | L8BD3: RTS ;(addresses $6988 thru $698E). |
| |
LoadUniqueItems: | LoadUniqueItems: |
L8BD4: LDA #$00 ; | L8BD4: LDA #$00 ; |
L8BD6: STA NumberOfUniqueItems ; | L8BD6: STA NumberOfUniqueItems ; |
L8BD9: STA $05 ;$05 offset of password byte currently processing(0 thru 7). | L8BD9: STA $05 ;$05 offset of password byte currently processing(0 thru 7). |
L8BDB: STA $06 ;$06 bit of password byte currently processing(0 thru 7). | L8BDB: STA $06 ;$06 bit of password byte currently processing(0 thru 7). |
L8BDD: LDA #$3B ; | L8BDD: LDA #$3B ; |
L8BDF: STA $07 ;Maximum number of unique items(59 or #$3B). | L8BDF: STA $07 ;Maximum number of unique items(59 or #$3B). |
L8BE1: LDY $05 ; | L8BE1: LDY $05 ; |
L8BE3: LDA PasswordByte00,Y ; | L8BE3: LDA PasswordByte00,Y ; |
L8BE6: STA $08 ;$08 stores contents of password byte currently processing. | L8BE6: STA $08 ;$08 stores contents of password byte currently processing. |
L8BE8: LDX #$00 ; | L8BE8: LDX #$00 ; |
L8BEA: STX $09 ;Stores number of unique items processed(#$0 thru #$3B). | L8BEA: STX $09 ;Stores number of unique items processed(#$0 thru #$3B). |
L8BEC: LDX $06 ; | L8BEC: LDX $06 ; |
L8BEE: BEQ ++ ;If start of new byte, branch. | L8BEE: BEQ ++ ;If start of new byte, branch. |
| |
L8BF0: LDX #$01 ; | L8BF0: LDX #$01 ; |
L8BF2: STX $02 ; | L8BF2: STX $02 ; |
L8BF4: CLC ; | L8BF4: CLC ; |
L8BF5:* ROR ; | L8BF5:* ROR ; |
L8BF6: STA $08 ;This code does not appear to ever be executed. | L8BF6: STA $08 ;This code does not appear to ever be executed. |
L8BF8: LDX $02 ; | L8BF8: LDX $02 ; |
L8BFA: CPX $06 ; | L8BFA: CPX $06 ; |
L8BFC: BEQ + ; | L8BFC: BEQ + ; |
L8BFE: INC $02 ; | L8BFE: INC $02 ; |
L8C00: JMP - ; | L8C00: JMP - ; |
| |
ProcessNextItem: | ProcessNextItem: |
L8C03: LDY $05 ;Locates next password byte to process--> | L8C03: LDY $05 ;Locates next password byte to process--> |
L8C05: LDA PasswordByte00,Y ;and loads it into $08. | L8C05: LDA PasswordByte00,Y ;and loads it into $08. |
L8C08: STA $08 ; | L8C08: STA $08 ; |
| |
ProcessNewItemByte: | ProcessNewItemByte: |
L8C0A:* LDA $08 ; | L8C0A:* LDA $08 ; |
L8C0C: ROR ;Rotates next bit to be processed to the carry flag. | L8C0C: ROR ;Rotates next bit to be processed to the carry flag. |
L8C0D: STA $08 ; | L8C0D: STA $08 ; |
L8C0F: BCC + ; | L8C0F: BCC + ; |
L8C11: JSR SamusHasItem ;($8C39)Store item in unique item history. | L8C11: JSR SamusHasItem ;($8C39)Store item in unique item history. |
L8C14:* LDY $06 ;If last bit of item byte has been--> | L8C14:* LDY $06 ;If last bit of item byte has been--> |
L8C16: CPY #$07 ;checked, move to next byte. | L8C16: CPY #$07 ;checked, move to next byte. |
L8C18: BCS + ; | L8C18: BCS + ; |
L8C1A: INC $06 ; | L8C1A: INC $06 ; |
L8C1C: INC $09 ; | L8C1C: INC $09 ; |
L8C1E: LDX $09 ;If all 59 unique items have been--> | L8C1E: LDX $09 ;If all 59 unique items have been--> |
L8C20: CPX $07 ;searched through, exit. | L8C20: CPX $07 ;searched through, exit. |
L8C22: BCS ++ ; | L8C22: BCS ++ ; |
L8C24: JMP ProcessNewItemByte ;($8C0A)Repeat routine for next item byte. | L8C24: JMP ProcessNewItemByte ;($8C0A)Repeat routine for next item byte. |
L8C27:* LDY #$00 ; | L8C27:* LDY #$00 ; |
L8C29: STY $06 ; | L8C29: STY $06 ; |
L8C2B: INC $05 ; | L8C2B: INC $05 ; |
L8C2D: INC $09 ; | L8C2D: INC $09 ; |
L8C2F: LDX $09 ;If all 59 unique items have been--> | L8C2F: LDX $09 ;If all 59 unique items have been--> |
L8C31: CPX $07 ;searched through, exit. | L8C31: CPX $07 ;searched through, exit. |
L8C33: BCS + ; | L8C33: BCS + ; |
L8C35: JMP ProcessNextItem ;($8C03)Process next item. | L8C35: JMP ProcessNextItem ;($8C03)Process next item. |
L8C38:* RTS ; | L8C38:* RTS ; |
| |
SamusHasItem: | SamusHasItem: |
L8C39: LDA $05 ;$05 becomes the upper part of the item offset--> | L8C39: LDA $05 ;$05 becomes the upper part of the item offset--> |
L8C3B: JSR Amul8 ;while $06 becomes the lower part of the item offset. | L8C3B: JSR Amul8 ;while $06 becomes the lower part of the item offset. |
L8C3E: CLC ; | L8C3E: CLC ; |
L8C3F: ADC $06 ; | L8C3F: ADC $06 ; |
L8C41: ASL ;* 2. Each item is two bytes in length. | L8C41: ASL ;* 2. Each item is two bytes in length. |
L8C42: TAY ; | L8C42: TAY ; |
L8C43: LDA ItemData+1,Y ; | L8C43: LDA ItemData+1,Y ; |
L8C46: STA $01 ;$00 and $01 store the two bytes of--> | L8C46: STA $01 ;$00 and $01 store the two bytes of--> |
L8C48: LDA ItemData,Y ;the unique item to process. | L8C48: LDA ItemData,Y ;the unique item to process. |
L8C4B: STA $00 ; | L8C4B: STA $00 ; |
L8C4D: LDY NumberOfUniqueItems ; | L8C4D: LDY NumberOfUniqueItems ; |
L8C50: STA UniqueItemHistory,Y ;Store the two bytes of the unique item--> | L8C50: STA UniqueItemHistory,Y ;Store the two bytes of the unique item--> |
L8C53: LDA $01 ;in RAM in the unique item history. | L8C53: LDA $01 ;in RAM in the unique item history. |
L8C55: INY ; | L8C55: INY ; |
L8C56: STA UniqueItemHistory,Y ; | L8C56: STA UniqueItemHistory,Y ; |
L8C59: INY ; | L8C59: INY ; |
L8C5A: STY NumberOfUniqueItems ;Keeps a running total of unique items. | L8C5A: STY NumberOfUniqueItems ;Keeps a running total of unique items. |
L8C5D: RTS ; | L8C5D: RTS ; |
| |
CheckPassword: | CheckPassword: |
L8C5E: JSR ConsolidatePassword ;($8F60)Convert password characters to password bytes. | L8C5E: JSR ConsolidatePassword ;($8F60)Convert password characters to password bytes. |
L8C61: JSR ValidatePassword ;($8DDE)Verify password is correct. | L8C61: JSR ValidatePassword ;($8DDE)Verify password is correct. |
L8C64: BCS + ;Branch if incorrect password. | L8C64: BCS + ;Branch if incorrect password. |
L8C66: JMP InitializeGame ;($92D4)Preliminary housekeeping before game starts. | L8C66: JMP InitializeGame ;($92D4)Preliminary housekeeping before game starts. |
L8C69:* LDA MultiSFXFlag ; | L8C69:* LDA MultiSFXFlag ; |
L8C6C: ORA #$01 ;Set IncorrectPassword SFX flag. | L8C6C: ORA #$01 ;Set IncorrectPassword SFX flag. |
L8C6E: STA MultiSFXFlag ; | L8C6E: STA MultiSFXFlag ; |
L8C71: LDA #$0C ; | L8C71: LDA #$0C ; |
L8C73: STA Timer3 ;Set Timer3 time for 120 frames (2 seconds). | L8C73: STA Timer3 ;Set Timer3 time for 120 frames (2 seconds). |
L8C75: LDA #$18 ; | L8C75: LDA #$18 ; |
L8C77: STA TitleRoutine ;Run EnterPassword routine. | L8C77: STA TitleRoutine ;Run EnterPassword routine. |
L8C79: RTS ; | L8C79: RTS ; |
| |
CalculatePassword: | CalculatePassword: |
L8C7A: LDA #$00 ; | L8C7A: LDA #$00 ; |
L8C7C: LDY #$0F ;Clears values at addresses --> | L8C7C: LDY #$0F ;Clears values at addresses --> |
L8C7E:* STA PasswordByte00,Y ;$6988 thru $6997 and --> | L8C7E:* STA PasswordByte00,Y ;$6988 thru $6997 and --> |
L8C81: STA PasswordChar00,Y ;$699A thru $69A9. | L8C81: STA PasswordChar00,Y ;$699A thru $69A9. |
L8C84: DEY ; | L8C84: DEY ; |
L8C85: BPL - ; | L8C85: BPL - ; |
L8C87: JSR ProcessUniqueItems ;($8B79)Determine what items Samus has collected. | L8C87: JSR ProcessUniqueItems ;($8B79)Determine what items Samus has collected. |
L8C8A: LDA PasswordByte07 ; | L8C8A: LDA PasswordByte07 ; |
L8C8D: AND #$04 ;Check to see if mother brain has been defeated,--> | L8C8D: AND #$04 ;Check to see if mother brain has been defeated,--> |
L8C8F: BEQ + ;If so, restore mother brain, zeebetites and--> | L8C8F: BEQ + ;If so, restore mother brain, zeebetites and--> |
L8C91: LDA #$00 ;all missile doors in Tourian as punishment for--> | L8C91: LDA #$00 ;all missile doors in Tourian as punishment for--> |
L8C93: STA PasswordByte07 ;dying after mother brain defeated. Only reset in the--> | L8C93: STA PasswordByte07 ;dying after mother brain defeated. Only reset in the--> |
L8C96: LDA PasswordByte06 ;password. Continuing without resetting will not--> | L8C96: LDA PasswordByte06 ;password. Continuing without resetting will not--> |
L8C99: AND #$03 ;restore those items. | L8C99: AND #$03 ;restore those items. |
L8C9B: STA PasswordByte06 ; | L8C9B: STA PasswordByte06 ; |
L8C9E:* LDA InArea ;Store InArea in bits 0 thru 5 in--> | L8C9E:* LDA InArea ;Store InArea in bits 0 thru 5 in--> |
L8CA0: AND #$3F ;address $6990. | L8CA0: AND #$3F ;address $6990. |
L8CA2: LDY JustInBailey ; | L8CA2: LDY JustInBailey ; |
L8CA5: BEQ + ; | L8CA5: BEQ + ; |
L8CA7: ORA #$80 ;Sets MSB of $6990 is Samus is suitless. | L8CA7: ORA #$80 ;Sets MSB of $6990 is Samus is suitless. |
L8CA9:* STA PasswordByte08 ; | L8CA9:* STA PasswordByte08 ; |
L8CAC: LDA SamusGear ; | L8CAC: LDA SamusGear ; |
L8CAF: STA PasswordByte09 ;SamusGear stored in $6991. | L8CAF: STA PasswordByte09 ;SamusGear stored in $6991. |
L8CB2: LDA MissileCount ; | L8CB2: LDA MissileCount ; |
L8CB5: STA PasswordByte0A ;MissileCount stored in $6992. | L8CB5: STA PasswordByte0A ;MissileCount stored in $6992. |
L8CB8: LDA #$00 ; | L8CB8: LDA #$00 ; |
L8CBA: STA $00 ; | L8CBA: STA $00 ; |
L8CBC: LDA KraidStatueStatus ; | L8CBC: LDA KraidStatueStatus ; |
L8CBF: AND #$80 ; | L8CBF: AND #$80 ; |
L8CC1: BEQ + ;If statue not up, branch. | L8CC1: BEQ + ;If statue not up, branch. |
L8CC3: LDA $00 ; | L8CC3: LDA $00 ; |
L8CC5: ORA #$80 ;Set bit 7 of $00--> | L8CC5: ORA #$80 ;Set bit 7 of $00--> |
L8CC7: STA $00 ;if Kraid statue up. | L8CC7: STA $00 ;if Kraid statue up. |
L8CC9:* LDA KraidStatueStatus ; | L8CC9:* LDA KraidStatueStatus ; |
L8CCC: AND #$01 ; | L8CCC: AND #$01 ; |
L8CCE: BEQ + ;Branch if Kraid not yet defeated. | L8CCE: BEQ + ;Branch if Kraid not yet defeated. |
L8CD0: LDA $00 ; | L8CD0: LDA $00 ; |
L8CD2: ORA #$40 ;Set bit 6 of $00--> | L8CD2: ORA #$40 ;Set bit 6 of $00--> |
L8CD4: STA $00 ;If Kraid defeated. | L8CD4: STA $00 ;If Kraid defeated. |
L8CD6:* LDA RidleyStatueStatus ; | L8CD6:* LDA RidleyStatueStatus ; |
L8CD9: AND #$80 ; | L8CD9: AND #$80 ; |
L8CDB: BEQ + ;Branch if Ridley statue not up. | L8CDB: BEQ + ;Branch if Ridley statue not up. |
L8CDD: LDA $00 ; | L8CDD: LDA $00 ; |
L8CDF: ORA #$20 ;Set bit 5 of $00--> | L8CDF: ORA #$20 ;Set bit 5 of $00--> |
L8CE1: STA $00 ;if Ridley statue up. | L8CE1: STA $00 ;if Ridley statue up. |
L8CE3:* LDA RidleyStatueStatus ; | L8CE3:* LDA RidleyStatueStatus ; |
L8CE6: AND #$02 ; | L8CE6: AND #$02 ; |
L8CE8: BEQ + ;Branch if Ridley not yet defeated. | L8CE8: BEQ + ;Branch if Ridley not yet defeated. |
L8CEA: LDA $00 ; | L8CEA: LDA $00 ; |
L8CEC: ORA #$10 ;Set bit 4 of $00--> | L8CEC: ORA #$10 ;Set bit 4 of $00--> |
L8CEE: STA $00 ;if Ridley defeated. | L8CEE: STA $00 ;if Ridley defeated. |
L8CF0:* LDA $00 ; | L8CF0:* LDA $00 ; |
L8CF2: STA PasswordByte0F ;Stores statue statuses in 4 MSB at $6997. | L8CF2: STA PasswordByte0F ;Stores statue statuses in 4 MSB at $6997. |
L8CF5: LDY #$03 ; | L8CF5: LDY #$03 ; |
L8CF7:* LDA SamusAge,Y ;Store SamusAge in $6993,--> | L8CF7:* LDA SamusAge,Y ;Store SamusAge in $6993,--> |
L8CFA: STA PasswordByte0B,Y ;SamusAge+1 in $6994 and--> | L8CFA: STA PasswordByte0B,Y ;SamusAge+1 in $6994 and--> |
L8CFD: DEY ;SamusAe+2 in $6995. | L8CFD: DEY ;SamusAe+2 in $6995. |
L8CFE: BPL - ; | L8CFE: BPL - ; |
L8D00:* JSR $C000 ; | L8D00:* JSR $C000 ; |
L8D03: LDA RandomNumber1 ; | L8D03: LDA RandomNumber1 ; |
L8D05: AND #$0F ;Store the value of $2E at $6998--> | L8D05: AND #$0F ;Store the value of $2E at $6998--> |
L8D07: BEQ - ;When any of the 4 LSB are set. (Does not--> | L8D07: BEQ - ;When any of the 4 LSB are set. (Does not--> |
L8D09: STA PasswordByte10 ;allow RandomNumber1 to be a multiple of 16). | L8D09: STA PasswordByte10 ;allow RandomNumber1 to be a multiple of 16). |
L8D0C: JSR PasswordChecksumAndScramble ;($8E17)Calculate checksum and scramble password. | L8D0C: JSR PasswordChecksumAndScramble ;($8E17)Calculate checksum and scramble password. |
L8D0F: JMP LoadPasswordChar ;($8E6C)Calculate password characters. | L8D0F: JMP LoadPasswordChar ;($8E6C)Calculate password characters. |
| |
LoadPasswordData: | LoadPasswordData: |
L8D12: LDA NARPASSWORD ;If invincible Samus active, skip--> | L8D12: LDA NARPASSWORD ;If invincible Samus active, skip--> |
L8D15: BNE +++ ;further password processing. | L8D15: BNE +++ ;further password processing. |
L8D17: JSR LoadUniqueItems ;($8BD4)Load unique items from password. | L8D17: JSR LoadUniqueItems ;($8BD4)Load unique items from password. |
L8D1A: JSR LoadTanksAndMissiles ;($8D3D)Calculate number of missiles from password. | L8D1A: JSR LoadTanksAndMissiles ;($8D3D)Calculate number of missiles from password. |
L8D1D: LDY #$00 ; | L8D1D: LDY #$00 ; |
L8D1F: LDA PasswordByte08 ;If MSB in PasswordByte08 is set,--> | L8D1F: LDA PasswordByte08 ;If MSB in PasswordByte08 is set,--> |
L8D22: AND #$80 ;Samus is not wearing her suit. | L8D22: AND #$80 ;Samus is not wearing her suit. |
L8D24: BEQ + ; | L8D24: BEQ + ; |
L8D26: INY ; | L8D26: INY ; |
L8D27:* STY JustInBailey ; | L8D27:* STY JustInBailey ; |
L8D2A: LDA PasswordByte08 ;Extract first 5 bits from PasswordByte08--> | L8D2A: LDA PasswordByte08 ;Extract first 5 bits from PasswordByte08--> |
L8D2D: AND #$3F ;and use it to determine starting area. | L8D2D: AND #$3F ;and use it to determine starting area. |
L8D2F: STA InArea ; | L8D2F: STA InArea ; |
L8D31: LDY #$03 ; | L8D31: LDY #$03 ; |
L8D33:* LDA PasswordByte0B,Y ;Load Samus' age. | L8D33:* LDA PasswordByte0B,Y ;Load Samus' age. |
L8D36: STA SamusAge,Y ; | L8D36: STA SamusAge,Y ; |
L8D39: DEY ; | L8D39: DEY ; |
L8D3A: BPL - ;Loop to load all 3 age bytes. | L8D3A: BPL - ;Loop to load all 3 age bytes. |
L8D3C:* RTS ; | L8D3C:* RTS ; |
| |
LoadTanksAndMissiles: | LoadTanksAndMissiles: |
L8D3D: LDA PasswordByte09 ;Loads Samus gear. | L8D3D: LDA PasswordByte09 ;Loads Samus gear. |
L8D40: STA SamusGear ;Save Samus gear. | L8D40: STA SamusGear ;Save Samus gear. |
L8D43: LDA PasswordByte0A ;Loads current number of missiles. | L8D43: LDA PasswordByte0A ;Loads current number of missiles. |
L8D46: STA MissileCount ;Save missile count. | L8D46: STA MissileCount ;Save missile count. |
L8D49: LDA #$00 ; | L8D49: LDA #$00 ; |
L8D4B: STA $00 ; | L8D4B: STA $00 ; |
L8D4D: STA $02 ; | L8D4D: STA $02 ; |
L8D4F: LDA PasswordByte0F ; | L8D4F: LDA PasswordByte0F ; |
L8D52: AND #$80 ;If MSB is set, Kraid statue is up. | L8D52: AND #$80 ;If MSB is set, Kraid statue is up. |
L8D54: BEQ + ; | L8D54: BEQ + ; |
L8D56: LDA $00 ; | L8D56: LDA $00 ; |
L8D58: ORA #$80 ;If Kraid statue is up, set MSB in $00. | L8D58: ORA #$80 ;If Kraid statue is up, set MSB in $00. |
L8D5A: STA $00 ; | L8D5A: STA $00 ; |
L8D5C:* LDA PasswordByte0F ; | L8D5C:* LDA PasswordByte0F ; |
L8D5F: AND #$40 ;If bit 6 is set, Kraid is defeated. | L8D5F: AND #$40 ;If bit 6 is set, Kraid is defeated. |
L8D61: BEQ + ; | L8D61: BEQ + ; |
L8D63: LDA $00 ; | L8D63: LDA $00 ; |
L8D65: ORA #$01 ;If Kraid is defeated, set LSB in $00. | L8D65: ORA #$01 ;If Kraid is defeated, set LSB in $00. |
L8D67: STA $00 ; | L8D67: STA $00 ; |
L8D69:* LDA $00 ; | L8D69:* LDA $00 ; |
L8D6B: STA KraidStatueStatus ;Store Kraid status. | L8D6B: STA KraidStatueStatus ;Store Kraid status. |
L8D6E: LDA PasswordByte0F ; | L8D6E: LDA PasswordByte0F ; |
L8D71: AND #$20 ;If bit 5 is set, Ridley statue is up. | L8D71: AND #$20 ;If bit 5 is set, Ridley statue is up. |
L8D73: BEQ + ; | L8D73: BEQ + ; |
L8D75: LDA $02 ; | L8D75: LDA $02 ; |
L8D77: ORA #$80 ;If Ridley statue is up, set MSB in $02. | L8D77: ORA #$80 ;If Ridley statue is up, set MSB in $02. |
L8D79: STA $02 ; | L8D79: STA $02 ; |
L8D7B:* LDA PasswordByte0F ; | L8D7B:* LDA PasswordByte0F ; |
L8D7E: AND #$10 ;If bit 4 is set, Ridley is defeated. | L8D7E: AND #$10 ;If bit 4 is set, Ridley is defeated. |
L8D80: BEQ + ; | L8D80: BEQ + ; |
L8D82: LDA $02 ; | L8D82: LDA $02 ; |
L8D84: ORA #$02 ;If Ridley is defeated, set bit 1 of $02. | L8D84: ORA #$02 ;If Ridley is defeated, set bit 1 of $02. |
L8D86: STA $02 ; | L8D86: STA $02 ; |
L8D88:* LDA $02 ; | L8D88:* LDA $02 ; |
L8D8A: STA RidleyStatueStatus ;Store Ridley status. | L8D8A: STA RidleyStatueStatus ;Store Ridley status. |
L8D8D: LDA #$00 ; | L8D8D: LDA #$00 ; |
L8D8F: STA $00 ; | L8D8F: STA $00 ; |
L8D91: STA $02 ; | L8D91: STA $02 ; |
L8D93: LDY #$00 ; | L8D93: LDY #$00 ; |
L8D95:* LDA UniqueItemHistory+1,Y ;Load second byte of item and compare--> | L8D95:* LDA UniqueItemHistory+1,Y ;Load second byte of item and compare--> |
L8D98: AND #$FC ;the 6 MSBs to #$20. If it matches,--> | L8D98: AND #$FC ;the 6 MSBs to #$20. If it matches,--> |
L8D9A: CMP #$20 ;an energy tank has been found. | L8D9A: CMP #$20 ;an energy tank has been found. |
L8D9C: BNE + ; | L8D9C: BNE + ; |
L8D9E: INC $00 ;Increment number of energy tanks found. | L8D9E: INC $00 ;Increment number of energy tanks found. |
L8DA0: JMP IncrementToNextItem ; | L8DA0: JMP IncrementToNextItem ; |
L8DA3:* CMP #$24 ;Load second byte of item and compare the 6 MSBs to--> | L8DA3:* CMP #$24 ;Load second byte of item and compare the 6 MSBs to--> |
L8DA5: BNE + ;#$24. If it matches, missiles have been found. | L8DA5: BNE + ;#$24. If it matches, missiles have been found. |
L8DA7: INC $02 ;Increment number of missiles found. | L8DA7: INC $02 ;Increment number of missiles found. |
| |
IncrementToNextItem: | IncrementToNextItem: |
L8DA9:* INY ; | L8DA9:* INY ; |
L8DAA: INY ;Increment twice. Each item is 2 bytes. | L8DAA: INY ;Increment twice. Each item is 2 bytes. |
L8DAB: CPY #$84 ;7 extra item slots in unique item history. | L8DAB: CPY #$84 ;7 extra item slots in unique item history. |
L8DAD: BCC --- ;Loop until all unique item history checked. | L8DAD: BCC --- ;Loop until all unique item history checked. |
L8DAF: LDA $00 ; | L8DAF: LDA $00 ; |
L8DB1: CMP #$06 ;Ensure the Tank Count does not exceed 6--> | L8DB1: CMP #$06 ;Ensure the Tank Count does not exceed 6--> |
L8DB3: BCC + ;tanks. Then stores the number of--> | L8DB3: BCC + ;tanks. Then stores the number of--> |
L8DB5: LDA #$06 ;energy tanks found in TankCount. | L8DB5: LDA #$06 ;energy tanks found in TankCount. |
L8DB7:* STA TankCount ; | L8DB7:* STA TankCount ; |
L8DBA: LDA #$00 ; | L8DBA: LDA #$00 ; |
L8DBC: LDY $02 ; | L8DBC: LDY $02 ; |
L8DBE: BEQ ++ ;Branch if no missiles found. | L8DBE: BEQ ++ ;Branch if no missiles found. |
L8DC0: CLC ; | L8DC0: CLC ; |
L8DC1:* ADC #$05 ; | L8DC1:* ADC #$05 ; |
L8DC3: DEY ;For every missile item found, this--> | L8DC3: DEY ;For every missile item found, this--> |
L8DC4: BNE - ;loop adds 5 missiles to MaxMissiles. | L8DC4: BNE - ;loop adds 5 missiles to MaxMissiles. |
L8DC6:* LDY KraidStatueStatus ; | L8DC6:* LDY KraidStatueStatus ; |
L8DC9: BEQ + ; | L8DC9: BEQ + ; |
L8DCB: ADC #$4B ;75 missiles are added to MaxMissiles--> | L8DCB: ADC #$4B ;75 missiles are added to MaxMissiles--> |
L8DCD: BCS ++ ;if Kraid has been defeated and another--> | L8DCD: BCS ++ ;if Kraid has been defeated and another--> |
L8DCF:* LDY RidleyStatueStatus ;75 missiles are added if the ridley--> | L8DCF:* LDY RidleyStatueStatus ;75 missiles are added if the ridley--> |
L8DD2: BEQ ++ ;has been defeated. | L8DD2: BEQ ++ ;has been defeated. |
L8DD4: ADC #$4B ; | L8DD4: ADC #$4B ; |
L8DD6: BCC ++ ; | L8DD6: BCC ++ ; |
L8DD8:* LDA #$FF ;If number of missiles exceeds 255, it stays at 255. | L8DD8:* LDA #$FF ;If number of missiles exceeds 255, it stays at 255. |
L8DDA:* STA MaxMissiles ; | L8DDA:* STA MaxMissiles ; |
L8DDD: RTS ; | L8DDD: RTS ; |
| |
ValidatePassword: | ValidatePassword: |
L8DDE: LDA NARPASSWORD ; | L8DDE: LDA NARPASSWORD ; |
L8DE1: BNE ++ ;If invincible Samus already active, branch. | L8DE1: BNE ++ ;If invincible Samus already active, branch. |
L8DE3: LDY #$0F ; | L8DE3: LDY #$0F ; |
L8DE5:* LDA PasswordChar00,Y ; | L8DE5:* LDA PasswordChar00,Y ; |
L8DE8: CMP NARPASSWORDTbl,Y ;If NARPASSWORD was entered at the--> | L8DE8: CMP NARPASSWORDTbl,Y ;If NARPASSWORD was entered at the--> |
L8DEB: BNE + ;password screen, activate invincible--> | L8DEB: BNE + ;password screen, activate invincible--> |
L8DED: DEY ;Samus, else continue to process password. | L8DED: DEY ;Samus, else continue to process password. |
L8DEE: BPL - ; | L8DEE: BPL - ; |
L8DF0: LDA #$01 ; | L8DF0: LDA #$01 ; |
L8DF2: STA NARPASSWORD ; | L8DF2: STA NARPASSWORD ; |
L8DF5: BNE ++ ; | L8DF5: BNE ++ ; |
L8DF7:* JSR UnscramblePassword ;($8E4E)Unscramble password. | L8DF7:* JSR UnscramblePassword ;($8E4E)Unscramble password. |
L8DFA: JSR PasswordChecksum ;($8E21)Calculate password checksum. | L8DFA: JSR PasswordChecksum ;($8E21)Calculate password checksum. |
L8DFD: CMP PasswordByte11 ;Verify proper checksum. | L8DFD: CMP PasswordByte11 ;Verify proper checksum. |
L8E00: BEQ + ; | L8E00: BEQ + ; |
L8E02: SEC ;If password is invalid, sets carry flag. | L8E02: SEC ;If password is invalid, sets carry flag. |
L8E03: BCS ++ ; | L8E03: BCS ++ ; |
L8E05:* CLC ;If password is valid, clears carry flag. | L8E05:* CLC ;If password is valid, clears carry flag. |
L8E06:* RTS ; | L8E06:* RTS ; |
| |
;The table below is used by the code above. It checks to see if NARPASSWORD has been entered. | ;The table below is used by the code above. It checks to see if NARPASSWORD has been entered. |
| |
NARPASSWORDTbl: | NARPASSWORDTbl: |
L8E07: .byte $17 ;N | L8E07: .byte $17 ;N |
L8E08: .byte $0A ;A | L8E08: .byte $0A ;A |
L8E09: .byte $1B ;R | L8E09: .byte $1B ;R |
L8E0A: .byte $19 ;P | L8E0A: .byte $19 ;P |
L8E0B: .byte $0A ;A | L8E0B: .byte $0A ;A |
L8E0C: .byte $1C ;S | L8E0C: .byte $1C ;S |
L8E0D: .byte $1C ;S | L8E0D: .byte $1C ;S |
L8E0E: .byte $20 ;W | L8E0E: .byte $20 ;W |
L8E0F: .byte $18 ;O | L8E0F: .byte $18 ;O |
L8E10: .byte $1B ;R | L8E10: .byte $1B ;R |
L8E11: .byte $0D ;D | L8E11: .byte $0D ;D |
L8E12: .byte $00 ;0(or no entry). | L8E12: .byte $00 ;0(or no entry). |
L8E13: .byte $00 ;0(or no entry). | L8E13: .byte $00 ;0(or no entry). |
L8E14: .byte $00 ;0(or no entry). | L8E14: .byte $00 ;0(or no entry). |
L8E15: .byte $00 ;0(or no entry). | L8E15: .byte $00 ;0(or no entry). |
L8E16: .byte $00 ;0(or no entry). | L8E16: .byte $00 ;0(or no entry). |
| |
PasswordChecksumAndScramble: | PasswordChecksumAndScramble: |
L8E17: JSR PasswordChecksum ;($8E21)Store the combined added value of--> | L8E17: JSR PasswordChecksum ;($8E21)Store the combined added value of--> |
L8E1A: STA PasswordByte11 ;addresses $6988 thu $6998 in $6999. | L8E1A: STA PasswordByte11 ;addresses $6988 thu $6998 in $6999. |
L8E1D: JSR PasswordScramble ;($8E2D)Scramble password. | L8E1D: JSR PasswordScramble ;($8E2D)Scramble password. |
L8E20: RTS ; | L8E20: RTS ; |
| |
PasswordChecksum: | PasswordChecksum: |
L8E21: LDY #$10 ; | L8E21: LDY #$10 ; |
L8E23: LDA #$00 ; | L8E23: LDA #$00 ; |
L8E25:* CLC ;Add the values at addresses--> | L8E25:* CLC ;Add the values at addresses--> |
L8E26: ADC PasswordByte00,Y ;$6988 thru $6998 together. | L8E26: ADC PasswordByte00,Y ;$6988 thru $6998 together. |
L8E29: DEY ; | L8E29: DEY ; |
L8E2A: BPL - ; | L8E2A: BPL - ; |
L8E2C: RTS ; | L8E2C: RTS ; |
| |
PasswordScramble: | PasswordScramble: |
L8E2D: LDA PasswordByte10 ; | L8E2D: LDA PasswordByte10 ; |
L8E30: STA $02 ; | L8E30: STA $02 ; |
L8E32:* LDA PasswordByte00 ;Store contents of $6988 in $00 for--> | L8E32:* LDA PasswordByte00 ;Store contents of $6988 in $00 for--> |
L8E35: STA $00 ;further processing after rotation. | L8E35: STA $00 ;further processing after rotation. |
L8E37: LDX #$00 ; | L8E37: LDX #$00 ; |
L8E39: LDY #$0F ; | L8E39: LDY #$0F ; |
L8E3B:* ROR PasswordByte00,X ;Rotate right, including carry, all values in--> | L8E3B:* ROR PasswordByte00,X ;Rotate right, including carry, all values in--> |
L8E3E: INX ;addresses $6988 thru $6997. | L8E3E: INX ;addresses $6988 thru $6997. |
L8E3F: DEY ; | L8E3F: DEY ; |
L8E40: BPL - ; | L8E40: BPL - ; |
L8E42: ROR $00 ;Rotate right $6988 to ensure the LSB--> | L8E42: ROR $00 ;Rotate right $6988 to ensure the LSB--> |
L8E44: LDA $00 ;from address $6997 is rotated to the--> | L8E44: LDA $00 ;from address $6997 is rotated to the--> |
L8E46: STA PasswordByte00 ;MSB of $6988. | L8E46: STA PasswordByte00 ;MSB of $6988. |
L8E49: DEC $02 ; | L8E49: DEC $02 ; |
L8E4B: BNE -- ;Continue rotating until $02 = 0. | L8E4B: BNE -- ;Continue rotating until $02 = 0. |
L8E4D: RTS ; | L8E4D: RTS ; |
| |
UnscramblePassword: | UnscramblePassword: |
L8E4E: LDA PasswordByte10 ;Stores random number used to scramble the password. | L8E4E: LDA PasswordByte10 ;Stores random number used to scramble the password. |
L8E51: STA $02 ; | L8E51: STA $02 ; |
L8E53:* LDA PasswordByte0F ;Preserve MSB that may have been rolled from $6988. | L8E53:* LDA PasswordByte0F ;Preserve MSB that may have been rolled from $6988. |
L8E56: STA $00 ; | L8E56: STA $00 ; |
L8E58: LDX #$0F ; | L8E58: LDX #$0F ; |
L8E5A:* ROL PasswordByte00,X ;The following loop rolls left the first 16 bytes--> | L8E5A:* ROL PasswordByte00,X ;The following loop rolls left the first 16 bytes--> |
L8E5D: DEX ;of the password one time. | L8E5D: DEX ;of the password one time. |
L8E5E: BPL - ; | L8E5E: BPL - ; |
L8E60: ROL $00 ;Rolls byte in $6997 to ensure MSB from $6988 is not lost. | L8E60: ROL $00 ;Rolls byte in $6997 to ensure MSB from $6988 is not lost. |
L8E62: LDA $00 ; | L8E62: LDA $00 ; |
L8E64: STA PasswordByte0F ; | L8E64: STA PasswordByte0F ; |
L8E67: DEC $02 ; | L8E67: DEC $02 ; |
L8E69: BNE -- ;Loop repeats the number of times decided by the random--> | L8E69: BNE -- ;Loop repeats the number of times decided by the random--> |
L8E6B: RTS ;number in $6998 to properly unscramble the password. | L8E6B: RTS ;number in $6998 to properly unscramble the password. |
| |
;The following code takes the 18 password bytes and converts them into 24 characters | ;The following code takes the 18 password bytes and converts them into 24 characters |
| |
LoadPasswordChar: | LoadPasswordChar: |
L8E6C: LDY #$00 ;Password byte #$00. | L8E6C: LDY #$00 ;Password byte #$00. |
L8E6E: JSR SixUpperBits ;($8F2D) | L8E6E: JSR SixUpperBits ;($8F2D) |
L8E71: STA PasswordChar00 ;Store results. | L8E71: STA PasswordChar00 ;Store results. |
L8E74: LDY #$00 ;Password bytes #$00 and #$01. | L8E74: LDY #$00 ;Password bytes #$00 and #$01. |
L8E76: JSR TwoLowerAndFourUpper ;($8F33) | L8E76: JSR TwoLowerAndFourUpper ;($8F33) |
L8E79: STA PasswordChar01 ;Store results. | L8E79: STA PasswordChar01 ;Store results. |
L8E7C: LDY #$01 ;Password bytes #$01 and #$02. | L8E7C: LDY #$01 ;Password bytes #$01 and #$02. |
L8E7E: JSR FourLowerAndTwoUpper ;($8F46) | L8E7E: JSR FourLowerAndTwoUpper ;($8F46) |
L8E81: STA PasswordChar02 ;Store results. | L8E81: STA PasswordChar02 ;Store results. |
L8E84: LDY #$02 ;Password byte #$02. | L8E84: LDY #$02 ;Password byte #$02. |
L8E86: JSR SixLowerBits ;($8F5A) | L8E86: JSR SixLowerBits ;($8F5A) |
L8E89: STA PasswordChar03 ;Store results. | L8E89: STA PasswordChar03 ;Store results. |
L8E8C: LDY #$03 ;Password byte #$03. | L8E8C: LDY #$03 ;Password byte #$03. |
L8E8E: JSR SixUpperBits ;($8F2D) | L8E8E: JSR SixUpperBits ;($8F2D) |
L8E91: STA PasswordChar04 ;Store results. | L8E91: STA PasswordChar04 ;Store results. |
L8E94: LDY #$03 ;Password bytes #$03 and #$04. | L8E94: LDY #$03 ;Password bytes #$03 and #$04. |
L8E96: JSR TwoLowerAndFourUpper ;($8F33) | L8E96: JSR TwoLowerAndFourUpper ;($8F33) |
L8E99: STA PasswordChar05 ;Store results. | L8E99: STA PasswordChar05 ;Store results. |
L8E9C: LDY #$04 ;Password bytes #$04 and #$05. | L8E9C: LDY #$04 ;Password bytes #$04 and #$05. |
L8E9E: JSR FourLowerAndTwoUpper ;($8F46) | L8E9E: JSR FourLowerAndTwoUpper ;($8F46) |
L8EA1: STA PasswordChar06 ;Store results. | L8EA1: STA PasswordChar06 ;Store results. |
L8EA4: LDY #$05 ;Password byte #$05. | L8EA4: LDY #$05 ;Password byte #$05. |
L8EA6: JSR SixLowerBits ;($8F5A) | L8EA6: JSR SixLowerBits ;($8F5A) |
L8EA9: STA PasswordChar07 ;Store results. | L8EA9: STA PasswordChar07 ;Store results. |
L8EAC: LDY #$06 ;Password byte #$06. | L8EAC: LDY #$06 ;Password byte #$06. |
L8EAE: JSR SixUpperBits ;($8F2D) | L8EAE: JSR SixUpperBits ;($8F2D) |
L8EB1: STA PasswordChar08 ;Store results. | L8EB1: STA PasswordChar08 ;Store results. |
L8EB4: LDY #$06 ;Password bytes #$06 and #$07. | L8EB4: LDY #$06 ;Password bytes #$06 and #$07. |
L8EB6: JSR TwoLowerAndFourUpper ;($8F33) | L8EB6: JSR TwoLowerAndFourUpper ;($8F33) |
L8EB9: STA PasswordChar09 ;Store results. | L8EB9: STA PasswordChar09 ;Store results. |
L8EBC: LDY #$07 ;Password bytes #$07 and #$08. | L8EBC: LDY #$07 ;Password bytes #$07 and #$08. |
L8EBE: JSR FourLowerAndTwoUpper ;($8F46) | L8EBE: JSR FourLowerAndTwoUpper ;($8F46) |
L8EC1: STA PasswordChar0A ;Store results. | L8EC1: STA PasswordChar0A ;Store results. |
L8EC4: LDY #$08 ;Password byte #$08. | L8EC4: LDY #$08 ;Password byte #$08. |
L8EC6: JSR SixLowerBits ;($8F5A) | L8EC6: JSR SixLowerBits ;($8F5A) |
L8EC9: STA PasswordChar0B ;Store results. | L8EC9: STA PasswordChar0B ;Store results. |
L8ECC: LDY #$09 ;Password byte #$09. | L8ECC: LDY #$09 ;Password byte #$09. |
L8ECE: JSR SixUpperBits ;($8F2D) | L8ECE: JSR SixUpperBits ;($8F2D) |
L8ED1: STA PasswordChar0C ;Store results. | L8ED1: STA PasswordChar0C ;Store results. |
L8ED4: LDY #$09 ;Password bytes #$09 and #$0A. | L8ED4: LDY #$09 ;Password bytes #$09 and #$0A. |
L8ED6: JSR TwoLowerAndFourUpper ;($8F33) | L8ED6: JSR TwoLowerAndFourUpper ;($8F33) |
L8ED9: STA PasswordChar0D ;Store results. | L8ED9: STA PasswordChar0D ;Store results. |
L8EDC: LDY #$0A ;Password bytes #$0A and #$0B. | L8EDC: LDY #$0A ;Password bytes #$0A and #$0B. |
L8EDE: JSR FourLowerAndTwoUpper ;($8F46) | L8EDE: JSR FourLowerAndTwoUpper ;($8F46) |
L8EE1: STA PasswordChar0E ;Store results. | L8EE1: STA PasswordChar0E ;Store results. |
L8EE4: LDY #$0B ;Password byte #$0B. | L8EE4: LDY #$0B ;Password byte #$0B. |
L8EE6: JSR SixLowerBits ;($8F5A) | L8EE6: JSR SixLowerBits ;($8F5A) |
L8EE9: STA PasswordChar0F ;Store results. | L8EE9: STA PasswordChar0F ;Store results. |
L8EEC: LDY #$0C ;Password byte #$0C. | L8EEC: LDY #$0C ;Password byte #$0C. |
L8EEE: JSR SixUpperBits ;($8F2D) | L8EEE: JSR SixUpperBits ;($8F2D) |
L8EF1: STA PasswordChar10 ;Store results. | L8EF1: STA PasswordChar10 ;Store results. |
L8EF4: LDY #$0C ;Password bytes #$0C and #$0D. | L8EF4: LDY #$0C ;Password bytes #$0C and #$0D. |
L8EF6: JSR TwoLowerAndFourUpper ;($8F33) | L8EF6: JSR TwoLowerAndFourUpper ;($8F33) |
L8EF9: STA PasswordChar11 ;Store results. | L8EF9: STA PasswordChar11 ;Store results. |
L8EFC: LDY #$0D ;Password bytes #$0D and #$0E. | L8EFC: LDY #$0D ;Password bytes #$0D and #$0E. |
L8EFE: JSR FourLowerAndTwoUpper ;($8F46) | L8EFE: JSR FourLowerAndTwoUpper ;($8F46) |
L8F01: STA PasswordChar12 ;Store results. | L8F01: STA PasswordChar12 ;Store results. |
L8F04: LDY #$0E ;Password byte #$0E. | L8F04: LDY #$0E ;Password byte #$0E. |
L8F06: JSR SixLowerBits ;($8F5A) | L8F06: JSR SixLowerBits ;($8F5A) |
L8F09: STA PasswordChar13 ;Store results. | L8F09: STA PasswordChar13 ;Store results. |
L8F0C: LDY #$0F ;Password byte #$0F. | L8F0C: LDY #$0F ;Password byte #$0F. |
L8F0E: JSR SixUpperBits ;($8F2D) | L8F0E: JSR SixUpperBits ;($8F2D) |
L8F11: STA PasswordChar14 ;Store results. | L8F11: STA PasswordChar14 ;Store results. |
L8F14: LDY #$0F ;Password bytes #$0F and #$10. | L8F14: LDY #$0F ;Password bytes #$0F and #$10. |
L8F16: JSR TwoLowerAndFourUpper ;($8F33) | L8F16: JSR TwoLowerAndFourUpper ;($8F33) |
L8F19: STA PasswordChar15 ;Store results. | L8F19: STA PasswordChar15 ;Store results. |
L8F1C: LDY #$10 ;Password bytes #$10 and #$11. | L8F1C: LDY #$10 ;Password bytes #$10 and #$11. |
L8F1E: JSR FourLowerAndTwoUpper ;($8F46) | L8F1E: JSR FourLowerAndTwoUpper ;($8F46) |
L8F21: STA PasswordChar16 ;Store results. | L8F21: STA PasswordChar16 ;Store results. |
L8F24: LDY #$11 ;Password byte #$11. | L8F24: LDY #$11 ;Password byte #$11. |
L8F26: JSR SixLowerBits ;($8F5A) | L8F26: JSR SixLowerBits ;($8F5A) |
L8F29: STA PasswordChar17 ;Store results. | L8F29: STA PasswordChar17 ;Store results. |
L8F2C: RTS ; | L8F2C: RTS ; |
| |
SixUpperBits: | SixUpperBits: |
L8F2D: LDA PasswordByte00,Y ;Uses six upper bits to create a new byte.--> | L8F2D: LDA PasswordByte00,Y ;Uses six upper bits to create a new byte.--> |
L8F30: LSR ;Bits are right shifted twice and two lower--> | L8F30: LSR ;Bits are right shifted twice and two lower--> |
L8F31: LSR ;bits are discarded. | L8F31: LSR ;bits are discarded. |
L8F32: RTS ; | L8F32: RTS ; |
| |
TwoLowerAndFourUpper: | TwoLowerAndFourUpper: |
L8F33: LDA PasswordByte00,Y ; | L8F33: LDA PasswordByte00,Y ; |
L8F36: AND #$03 ;Saves two lower bits and stores them--> | L8F36: AND #$03 ;Saves two lower bits and stores them--> |
L8F38: JSR Amul16 ;($C2C5)in bits 4 and 5. | L8F38: JSR Amul16 ;($C2C5)in bits 4 and 5. |
L8F3B: STA $00 ; | L8F3B: STA $00 ; |
L8F3D: LDA PasswordByte01,Y ;Saves upper 4 bits and stores them--> | L8F3D: LDA PasswordByte01,Y ;Saves upper 4 bits and stores them--> |
L8F40: JSR Adiv16 ;($C2BF)bits 0, 1, 2 and 3. | L8F40: JSR Adiv16 ;($C2BF)bits 0, 1, 2 and 3. |
L8F43: ORA $00 ;Add two sets of bits together to make a byte--> | L8F43: ORA $00 ;Add two sets of bits together to make a byte--> |
L8F45: RTS ;where bits 6 and 7 = 0. | L8F45: RTS ;where bits 6 and 7 = 0. |
| |
FourLowerAndTwoUpper: | FourLowerAndTwoUpper: |
L8F46: LDA PasswordByte00,Y ; | L8F46: LDA PasswordByte00,Y ; |
L8F49: AND #$0F ;Keep lower 4 bits. | L8F49: AND #$0F ;Keep lower 4 bits. |
L8F4B: ASL ;Move lower 4 bits to bits 5, 4, 3 and 2. | L8F4B: ASL ;Move lower 4 bits to bits 5, 4, 3 and 2. |
L8F4C: ASL ; | L8F4C: ASL ; |
L8F4D: STA $00 ; | L8F4D: STA $00 ; |
L8F4F: LDA PasswordByte01,Y ;Move upper two bits--> | L8F4F: LDA PasswordByte01,Y ;Move upper two bits--> |
L8F52: ROL ;to bits 1 and 0. | L8F52: ROL ;to bits 1 and 0. |
L8F53: ROL ; | L8F53: ROL ; |
L8F54: ROL ; | L8F54: ROL ; |
L8F55: AND #$03 ;Add two sets of bits together to make a byte--> | L8F55: AND #$03 ;Add two sets of bits together to make a byte--> |
L8F57: ORA $00 ;where bits 6 and 7 = 0. | L8F57: ORA $00 ;where bits 6 and 7 = 0. |
L8F59: RTS ; | L8F59: RTS ; |
| |
SixLowerBits: | SixLowerBits: |
L8F5A: LDA PasswordByte00,Y ;Discard bits 6 and 7. | L8F5A: LDA PasswordByte00,Y ;Discard bits 6 and 7. |
L8F5D: AND #$3F ; | L8F5D: AND #$3F ; |
L8F5F: RTS | L8F5F: RTS |
| |
;The following routine converts the 24 user entered password characters into the 18 password | ;The following routine converts the 24 user entered password characters into the 18 password |
| |
ConsolidatePassword: | ConsolidatePassword: |
L8F60: LDY #$00 ;Password characters #$00 and #$01. | L8F60: LDY #$00 ;Password characters #$00 and #$01. |
L8F62: JSR SixLowerAndTwoUpper ;($8FF1) | L8F62: JSR SixLowerAndTwoUpper ;($8FF1) |
L8F65: STA PasswordByte00 ;Store results. | L8F65: STA PasswordByte00 ;Store results. |
L8F68: LDY #$01 ;Password characters #$01 and #$02. | L8F68: LDY #$01 ;Password characters #$01 and #$02. |
L8F6A: JSR FourLowerAndFiveThruTwo ;($9001) | L8F6A: JSR FourLowerAndFiveThruTwo ;($9001) |
L8F6D: STA PasswordByte01 ;Store results. | L8F6D: STA PasswordByte01 ;Store results. |
L8F70: LDY #$02 ;Password characters #$02 and #$03. | L8F70: LDY #$02 ;Password characters #$02 and #$03. |
L8F72: JSR TwoLowerAndSixLower ;($9011) | L8F72: JSR TwoLowerAndSixLower ;($9011) |
L8F75: STA PasswordByte02 ;Store results. | L8F75: STA PasswordByte02 ;Store results. |
L8F78: LDY #$04 ;Password characters #$04 and #$05. | L8F78: LDY #$04 ;Password characters #$04 and #$05. |
L8F7A: JSR SixLowerAndTwoUpper ;($8FF1) | L8F7A: JSR SixLowerAndTwoUpper ;($8FF1) |
L8F7D: STA PasswordByte03 ;Store results. | L8F7D: STA PasswordByte03 ;Store results. |
L8F80: LDY #$05 ;Password characters #$05 and #$05. | L8F80: LDY #$05 ;Password characters #$05 and #$05. |
L8F82: JSR FourLowerAndFiveThruTwo ;($9001) | L8F82: JSR FourLowerAndFiveThruTwo ;($9001) |
L8F85: STA PasswordByte04 ;Store results. | L8F85: STA PasswordByte04 ;Store results. |
L8F88: LDY #$06 ;Password characters #$06 and #$07. | L8F88: LDY #$06 ;Password characters #$06 and #$07. |
L8F8A: JSR TwoLowerAndSixLower ;($9011) | L8F8A: JSR TwoLowerAndSixLower ;($9011) |
L8F8D: STA PasswordByte05 ;Store results. | L8F8D: STA PasswordByte05 ;Store results. |
L8F90: LDY #$08 ;Password characters #$08 and #$09. | L8F90: LDY #$08 ;Password characters #$08 and #$09. |
L8F92: JSR SixLowerAndTwoUpper ;($8FF1) | L8F92: JSR SixLowerAndTwoUpper ;($8FF1) |
L8F95: STA PasswordByte06 ;Store results. | L8F95: STA PasswordByte06 ;Store results. |
L8F98: LDY #$09 ;Password characters #$09 and #$0A. | L8F98: LDY #$09 ;Password characters #$09 and #$0A. |
L8F9A: JSR FourLowerAndFiveThruTwo ;($9001) | L8F9A: JSR FourLowerAndFiveThruTwo ;($9001) |
L8F9D: STA PasswordByte07 ;Store results. | L8F9D: STA PasswordByte07 ;Store results. |
L8FA0: LDY #$0A ;Password characters #$0A and #$0B. | L8FA0: LDY #$0A ;Password characters #$0A and #$0B. |
L8FA2: JSR TwoLowerAndSixLower ;($9011) | L8FA2: JSR TwoLowerAndSixLower ;($9011) |
L8FA5: STA PasswordByte08 ;Store results. | L8FA5: STA PasswordByte08 ;Store results. |
L8FA8: LDY #$0C ;Password characters #$0C and #$0D. | L8FA8: LDY #$0C ;Password characters #$0C and #$0D. |
L8FAA: JSR SixLowerAndTwoUpper ;($8FF1) | L8FAA: JSR SixLowerAndTwoUpper ;($8FF1) |
L8FAD: STA PasswordByte09 ;Store results. | L8FAD: STA PasswordByte09 ;Store results. |
L8FB0: LDY #$0D ;Password characters #$0D and #$0E. | L8FB0: LDY #$0D ;Password characters #$0D and #$0E. |
L8FB2: JSR FourLowerAndFiveThruTwo ;($9001) | L8FB2: JSR FourLowerAndFiveThruTwo ;($9001) |
L8FB5: STA PasswordByte0A ;Store results. | L8FB5: STA PasswordByte0A ;Store results. |
L8FB8: LDY #$0E ;Password characters #$0E and #$0F. | L8FB8: LDY #$0E ;Password characters #$0E and #$0F. |
L8FBA: JSR TwoLowerAndSixLower ;($9011) | L8FBA: JSR TwoLowerAndSixLower ;($9011) |
L8FBD: STA PasswordByte0B ;Store results. | L8FBD: STA PasswordByte0B ;Store results. |
L8FC0: LDY #$10 ;Password characters #$10 and #$11. | L8FC0: LDY #$10 ;Password characters #$10 and #$11. |
L8FC2: JSR SixLowerAndTwoUpper ;($8FF1) | L8FC2: JSR SixLowerAndTwoUpper ;($8FF1) |
L8FC5: STA PasswordByte0C ;Store results. | L8FC5: STA PasswordByte0C ;Store results. |
L8FC8: LDY #$11 ;Password characters #$11 and #$12. | L8FC8: LDY #$11 ;Password characters #$11 and #$12. |
L8FCA: JSR FourLowerAndFiveThruTwo ;($9001) | L8FCA: JSR FourLowerAndFiveThruTwo ;($9001) |
L8FCD: STA PasswordByte0D ;Store results. | L8FCD: STA PasswordByte0D ;Store results. |
L8FD0: LDY #$12 ;Password characters #$12 and #$13. | L8FD0: LDY #$12 ;Password characters #$12 and #$13. |
L8FD2: JSR TwoLowerAndSixLower ;($9011) | L8FD2: JSR TwoLowerAndSixLower ;($9011) |
L8FD5: STA PasswordByte0E ;Store results. | L8FD5: STA PasswordByte0E ;Store results. |
L8FD8: LDY #$14 ;Password characters #$15 and #$15. | L8FD8: LDY #$14 ;Password characters #$15 and #$15. |
L8FDA: JSR SixLowerAndTwoUpper ;($8FF1) | L8FDA: JSR SixLowerAndTwoUpper ;($8FF1) |
L8FDD: STA PasswordByte0F ;Store results. | L8FDD: STA PasswordByte0F ;Store results. |
L8FE0: LDY #$15 ;Password characters #$15 and #$16. | L8FE0: LDY #$15 ;Password characters #$15 and #$16. |
L8FE2: JSR FourLowerAndFiveThruTwo ;($9001) | L8FE2: JSR FourLowerAndFiveThruTwo ;($9001) |
L8FE5: STA PasswordByte10 ;Store results. | L8FE5: STA PasswordByte10 ;Store results. |
L8FE8: LDY #$16 ;Password characters #$16 and #$17. | L8FE8: LDY #$16 ;Password characters #$16 and #$17. |
L8FEA: JSR TwoLowerAndSixLower ;($9011) | L8FEA: JSR TwoLowerAndSixLower ;($9011) |
L8FED: STA PasswordByte11 ;Store results. | L8FED: STA PasswordByte11 ;Store results. |
L8FF0: RTS ; | L8FF0: RTS ; |
| |
SixLowerAndTwoUpper: | SixLowerAndTwoUpper: |
L8FF1: LDA PasswordChar00,Y ;Remove upper two bits and transfer--> | L8FF1: LDA PasswordChar00,Y ;Remove upper two bits and transfer--> |
L8FF4: ASL ;lower six bits to upper six bits. | L8FF4: ASL ;lower six bits to upper six bits. |
L8FF5: ASL ; | L8FF5: ASL ; |
L8FF6: STA $00 ; | L8FF6: STA $00 ; |
L8FF8: LDA PasswordChar01,Y ;Move bits 4and 5 to lower two--> | L8FF8: LDA PasswordChar01,Y ;Move bits 4and 5 to lower two--> |
L8FFB: JSR Adiv16 ;($C2BF)bits and discard the rest. | L8FFB: JSR Adiv16 ;($C2BF)bits and discard the rest. |
L8FFE: ORA $00 ;Combine the two bytes together. | L8FFE: ORA $00 ;Combine the two bytes together. |
L9000: RTS ; | L9000: RTS ; |
| |
FourLowerAndFiveThruTwo: | FourLowerAndFiveThruTwo: |
L9001: LDA PasswordChar00,Y ;Take four lower bits and transfer--> | L9001: LDA PasswordChar00,Y ;Take four lower bits and transfer--> |
L9004: JSR Amul16 ;($C2C5)them to upper four bits. Discard the rest. | L9004: JSR Amul16 ;($C2C5)them to upper four bits. Discard the rest. |
L9007: STA $00 ; | L9007: STA $00 ; |
L9009: LDA PasswordChar01,Y ;Remove two lower bits and transfer--> | L9009: LDA PasswordChar01,Y ;Remove two lower bits and transfer--> |
L900C: LSR ;bits 5 thru 2 to lower four bits. | L900C: LSR ;bits 5 thru 2 to lower four bits. |
L900D: LSR ; | L900D: LSR ; |
L900E: ORA $00 ;Combine the two bytes together. | L900E: ORA $00 ;Combine the two bytes together. |
L9010: RTS ; | L9010: RTS ; |
| |
TwoLowerAndSixLower: | TwoLowerAndSixLower: |
L9011: LDA PasswordChar00,Y ;Shifts two lower bits to two higest bits--> | L9011: LDA PasswordChar00,Y ;Shifts two lower bits to two higest bits--> |
L9014: ROR ;and discards the rest | L9014: ROR ;and discards the rest |
L9015: ROR ; | L9015: ROR ; |
L9016: ROR ; | L9016: ROR ; |
L9017: AND #$C0 ; | L9017: AND #$C0 ; |
L9019: STA $00 ; | L9019: STA $00 ; |
L901B: LDA PasswordChar01,Y ;Add six lower bits to previous results. | L901B: LDA PasswordChar01,Y ;Add six lower bits to previous results. |
L901E: ORA $00 ; | L901E: ORA $00 ; |
L9020: RTS ; | L9020: RTS ; |
| |
PasswordBitmaskTbl: | PasswordBitmaskTbl: |
L9021: .byte $01, $02, $04, $08, $10, $20, $40, $80 | L9021: .byte $01, $02, $04, $08, $10, $20, $40, $80 |
| |
;The following table contains the unique items in the game. The two bytes can be deciphered | ;The following table contains the unique items in the game. The two bytes can be deciphered |
| |
ItemData: | ItemData: |
L9029: .word $104E ;Maru Mari at coord 02,0E (Item 0) | L9029: .word $104E ;Maru Mari at coord 02,0E (Item 0) |
L902B: .word $264B ;Missiles at coord 12,0B (Item 1) | L902B: .word $264B ;Missiles at coord 12,0B (Item 1) |
L902D: .word $28E5 ;Red door to long beam at coord 07,05 (Item 2) | L902D: .word $28E5 ;Red door to long beam at coord 07,05 (Item 2) |
L902F: .word $2882 ;Red door to Tourian elevator at coord 05,02 (Item 3) | L902F: .word $2882 ;Red door to Tourian elevator at coord 05,02 (Item 3) |
L9031: .word $2327 ;Energy tank at coord 19,07 (Item 4) | L9031: .word $2327 ;Energy tank at coord 19,07 (Item 4) |
L9033: .word $2B25 ;Red door to bombs at coord 1A,05 (Item 5) | L9033: .word $2B25 ;Red door to bombs at coord 1A,05 (Item 5) |
L9035: .word $0325 ;Bombs at coord 19,05 (Item 6) | L9035: .word $0325 ;Bombs at coord 19,05 (Item 6) |
L9037: .word $2A69 ;Red door to ice beam at coord 13,09 (Item 7) | L9037: .word $2A69 ;Red door to ice beam at coord 13,09 (Item 7) |
L9039: .word $2703 ;Missiles at coord 18,03 (Item 8) | L9039: .word $2703 ;Missiles at coord 18,03 (Item 8) |
L903B: .word $2363 ;Energy tank at coord 1B,03 (Item 9) | L903B: .word $2363 ;Energy tank at coord 1B,03 (Item 9) |
L903D: .word $29E2 ;Red door to varia suit at coord 0F,02 (Item 10) | L903D: .word $29E2 ;Red door to varia suit at coord 0F,02 (Item 10) |
L903F: .word $15E2 ;Varia suit at coord 0F,02 (Item 11) | L903F: .word $15E2 ;Varia suit at coord 0F,02 (Item 11) |
L9041: .word $212E ;Energy tank at coord 09,0E (Item 12) | L9041: .word $212E ;Energy tank at coord 09,0E (Item 12) |
L9043: .word $264E ;Missiles at coord 12,0E (Item 13) | L9043: .word $264E ;Missiles at coord 12,0E (Item 13) |
L9045: .word $262F ;Missiles at coord 11,0F (Item 14) | L9045: .word $262F ;Missiles at coord 11,0F (Item 14) |
L9047: .word $2B4C ;Red door to ice beam at coord 1B,0C (Item 15) | L9047: .word $2B4C ;Red door to ice beam at coord 1B,0C (Item 15) |
L9049: .word $276A ;Missiles at coord 1B,0A (Item 16) | L9049: .word $276A ;Missiles at coord 1B,0A (Item 16) |
L904B: .word $278A ;Missiles at coord 1C,0A (Item 17) | L904B: .word $278A ;Missiles at coord 1C,0A (Item 17) |
L904D: .word $278B ;Missiles at coord 1C,0B (Item 18) | L904D: .word $278B ;Missiles at coord 1C,0B (Item 18) |
L904F: .word $276B ;Missiles at coord 1B,0B (Item 19) | L904F: .word $276B ;Missiles at coord 1B,0B (Item 19) |
L9051: .word $274B ;Missiles at coord 1A,0B (Item 20) | L9051: .word $274B ;Missiles at coord 1A,0B (Item 20) |
L9053: .word $268F ;Missiles at coord 14,0F (Item 21) | L9053: .word $268F ;Missiles at coord 14,0F (Item 21) |
L9055: .word $266F ;Missiles at coord 13,0F (Item 22) | L9055: .word $266F ;Missiles at coord 13,0F (Item 22) |
L9057: .word $2B71 ;Red door to high jump at coord 1C,11 (Item 23) | L9057: .word $2B71 ;Red door to high jump at coord 1C,11 (Item 23) |
L9059: .word $0771 ;High jump at coord 1B,11 (Item 24) | L9059: .word $0771 ;High jump at coord 1B,11 (Item 24) |
L905B: .word $29F0 ;Red door to screw attack at coord 0E,10 (Item 25) | L905B: .word $29F0 ;Red door to screw attack at coord 0E,10 (Item 25) |
L905D: .word $0DF0 ;Screw attack at coord 0D,1D (Item 26) | L905D: .word $0DF0 ;Screw attack at coord 0D,1D (Item 26) |
L905F: .word $2676 ;Missiles at coord 13,16 (Item 27) | L905F: .word $2676 ;Missiles at coord 13,16 (Item 27) |
L9061: .word $2696 ;Misslies at coord 14,16 (Item 28) | L9061: .word $2696 ;Misslies at coord 14,16 (Item 28) |
L9063: .word $2A55 ;Red door to wave beam at coord 1C,15 (Item 29) | L9063: .word $2A55 ;Red door to wave beam at coord 1C,15 (Item 29) |
L9065: .word $2353 ;Energy tank at coord 1A,13 (Item 30) | L9065: .word $2353 ;Energy tank at coord 1A,13 (Item 30) |
L9067: .word $2794 ;Missiles at coord 1C,14 (Item 31) | L9067: .word $2794 ;Missiles at coord 1C,14 (Item 31) |
L9069: .word $28F5 ;Red door at coord 07,15 (Item 32) | L9069: .word $28F5 ;Red door at coord 07,15 (Item 32) |
L906B: .word $2535 ;Missiles at coord 09,15 (Item 33) | L906B: .word $2535 ;Missiles at coord 09,15 (Item 33) |
L906D: .word $2495 ;Missiles at coord 04,15 (Item 34) | L906D: .word $2495 ;Missiles at coord 04,15 (Item 34) |
L906F: .word $28F6 ;Red door at coord 07,16 (Item 35) | L906F: .word $28F6 ;Red door at coord 07,16 (Item 35) |
L9071: .word $2156 ;Energy tank at coord 0A,16 (Item 36) | L9071: .word $2156 ;Energy tank at coord 0A,16 (Item 36) |
L9073: .word $28F8 ;Red door at coord 07,18 (Item 37) | L9073: .word $28F8 ;Red door at coord 07,18 (Item 37) |
L9075: .word $287B ;Red door at coord 03,1B (Item 38) | L9075: .word $287B ;Red door at coord 03,1B (Item 38) |
L9077: .word $24BB ;Missiles at coord 05,1B (Item 39) | L9077: .word $24BB ;Missiles at coord 05,1B (Item 39) |
L9079: .word $2559 ;Missiles at coord 0A,19 (Item 40) | L9079: .word $2559 ;Missiles at coord 0A,19 (Item 40) |
L907B: .word $291D ;Red door to Kraid at coord 08,1D (Item 41) | L907B: .word $291D ;Red door to Kraid at coord 08,1D (Item 41) |
L907D: .word $211D ;Energy tank at coord 08,1D(Kraid's room) (Item 42) | L907D: .word $211D ;Energy tank at coord 08,1D(Kraid's room) (Item 42) |
L907F: .word $2658 ;Missiles at coord 12,18 (Item 43) | L907F: .word $2658 ;Missiles at coord 12,18 (Item 43) |
L9081: .word $2A39 ;Red door at coord 11,19 (Item 44) | L9081: .word $2A39 ;Red door at coord 11,19 (Item 44) |
L9083: .word $2239 ;Energy tank at coord 11,19 (Item 45) | L9083: .word $2239 ;Energy tank at coord 11,19 (Item 45) |
L9085: .word $269E ;Missiles at coord 14,1E (Item 46) | L9085: .word $269E ;Missiles at coord 14,1E (Item 46) |
L9087: .word $2A1D ;purple door at coord 10,1D(Ridley's room) (Item 47) | L9087: .word $2A1D ;purple door at coord 10,1D(Ridley's room) (Item 47) |
L9089: .word $21FD ;Energy tank at coord 0F,1D (Item 48) | L9089: .word $21FD ;Energy tank at coord 0F,1D (Item 48) |
L908B: .word $271B ;Missile at coord 18,1B (Item 49) | L908B: .word $271B ;Missile at coord 18,1B (Item 49) |
L908D: .word $2867 ;Orange door at coord 03,07 (Item 50) | L908D: .word $2867 ;Orange door at coord 03,07 (Item 50) |
L908F: .word $2927 ;Red door at coord 09,07 (Item 51) | L908F: .word $2927 ;Red door at coord 09,07 (Item 51) |
L9091: .word $292B ;Red door at coord 0A,0B (Item 52) | L9091: .word $292B ;Red door at coord 0A,0B (Item 52) |
L9093: .word $3C00 ;1st Zeebetite in mother brain room (Item 53) | L9093: .word $3C00 ;1st Zeebetite in mother brain room (Item 53) |
L9095: .word $4000 ;2nd Zeebetite in mother brain room (Item 54) | L9095: .word $4000 ;2nd Zeebetite in mother brain room (Item 54) |
L9097: .word $4400 ;3rd Zeebetite in mother brain room (Item 55) | L9097: .word $4400 ;3rd Zeebetite in mother brain room (Item 55) |
L9099: .word $4800 ;4th Zeebetite in mother brain room (Item 56) | L9099: .word $4800 ;4th Zeebetite in mother brain room (Item 56) |
L909B: .word $4C00 ;5th Zeebetite in mother brain room (Item 57) | L909B: .word $4C00 ;5th Zeebetite in mother brain room (Item 57) |
L909D: .word $3800 ;Mother brain (Item 58) | L909D: .word $3800 ;Mother brain (Item 58) |
| |
ClearAll: | ClearAll: |
L909F: jsr ScreenOff ;($C439)Turn screen off. | L909F: jsr ScreenOff ;($C439)Turn screen off. |
L90A2: jsr ClearNameTables ;Turn off screen, clear sprites and name tables. | L90A2: jsr ClearNameTables ;Turn off screen, clear sprites and name tables. |
L90A5: jsr EraseAllSprites ; | L90A5: jsr EraseAllSprites ; |
L90A8: lda PPUCNT0ZP ;Set Name table address to $2000. | L90A8: lda PPUCNT0ZP ;Set Name table address to $2000. |
L90AA: and #$FC ; | L90AA: and #$FC ; |
L90AC: sta PPUCNT0ZP ; | L90AC: sta PPUCNT0ZP ; |
L90AE: lda #$00 ; | L90AE: lda #$00 ; |
L90B0: sta ScrollY ;Reset scroll offsets. | L90B0: sta ScrollY ;Reset scroll offsets. |
L90B2: sta ScrollX ; | L90B2: sta ScrollX ; |
L90B4: jsr WaitNMIPass ;($C42C)Wait for NMI to end. | L90B4: jsr WaitNMIPass ;($C42C)Wait for NMI to end. |
L90B7: jmp VBOffAndHorzWrite ;($C47D)Set PPU for horizontal write and turn off VBlank. | L90B7: jmp VBOffAndHorzWrite ;($C47D)Set PPU for horizontal write and turn off VBlank. |
| |
StartContinueScreen: | StartContinueScreen: |
L90BA: jsr ClearAll ;($909F)Turn off screen, erase sprites and nametables. | L90BA: jsr ClearAll ;($909F)Turn off screen, erase sprites and nametables. |
L90BD: ldx #$84 ;Low address for PPU write. | L90BD: ldx #$84 ;Low address for PPU write. |
L90BF: ldy #$99 ;High address for PPU write. | L90BF: ldy #$99 ;High address for PPU write. |
L90C1: jsr PreparePPUProcess ;($9449)Clears screen and writes "START CONTINUE". | L90C1: jsr PreparePPUProcess ;($9449)Clears screen and writes "START CONTINUE". |
L90C4: LDY #$00 ; | L90C4: LDY #$00 ; |
L90C6: STY StartContinue ;Set selection sprite at START. | L90C6: STY StartContinue ;Set selection sprite at START. |
L90C9: LDA #$0D ; | L90C9: LDA #$0D ; |
L90CB: STA PalDataPending ;Change palette and title routine. | L90CB: STA PalDataPending ;Change palette and title routine. |
L90CD: LDA #$16 ;Next routine is ChooseStartContinue. | L90CD: LDA #$16 ;Next routine is ChooseStartContinue. |
L90CF: STA TitleRoutine ; | L90CF: STA TitleRoutine ; |
| |
TurnOnDisplay: | TurnOnDisplay: |
L90D1: JSR NMIOn ;($C487)Turn on the nonmaskable interrupt. | L90D1: JSR NMIOn ;($C487)Turn on the nonmaskable interrupt. |
L90D4: JMP ScreenOn ;($C447)Turn screen on. | L90D4: JMP ScreenOn ;($C447)Turn screen on. |
| |
ChooseStartContinue: | ChooseStartContinue: |
L90D7: LDA Joy1Change ; | L90D7: LDA Joy1Change ; |
L90D9: AND #$30 ;Checks both select and start buttons. | L90D9: AND #$30 ;Checks both select and start buttons. |
L90DB: CMP #$10 ;Check if START has been pressed. | L90DB: CMP #$10 ;Check if START has been pressed. |
L90DD: BNE ++ ;Branch if START not pressed. | L90DD: BNE ++ ;Branch if START not pressed. |
L90DF: LDY StartContinue ; | L90DF: LDY StartContinue ; |
L90E2: BNE + ;if CONTINUE selected, branch. | L90E2: BNE + ;if CONTINUE selected, branch. |
L90E4: JMP InitializeStats ;($932B)Zero out all stats. | L90E4: JMP InitializeStats ;($932B)Zero out all stats. |
L90E7:* LDY #$17 ;Next routine is LoadPasswordScreen. | L90E7:* LDY #$17 ;Next routine is LoadPasswordScreen. |
L90E9: STY TitleRoutine ; | L90E9: STY TitleRoutine ; |
L90EB:* CMP #$20 ;check if SELECT has been pressed. | L90EB:* CMP #$20 ;check if SELECT has been pressed. |
L90ED: BNE + ;Branch if SELECT not pressed. | L90ED: BNE + ;Branch if SELECT not pressed. |
L90EF: LDA StartContinue ; | L90EF: LDA StartContinue ; |
L90F2: EOR #$01 ;Chooses between START and CONTINUE--> | L90F2: EOR #$01 ;Chooses between START and CONTINUE--> |
L90F4: STA StartContinue ;on game select screen. | L90F4: STA StartContinue ;on game select screen. |
L90F7: LDA TriangleSFXFlag ; | L90F7: LDA TriangleSFXFlag ; |
L90FA: ORA #$08 ;Set SFX flag for select being pressed.--> | L90FA: ORA #$08 ;Set SFX flag for select being pressed.--> |
L90FC: STA TriangleSFXFlag ;Uses triangle channel. | L90FC: STA TriangleSFXFlag ;Uses triangle channel. |
L90FF:* LDY StartContinue ; | L90FF:* LDY StartContinue ; |
L9102: LDA StartContTbl,Y ;Get y pos of selection sprite. | L9102: LDA StartContTbl,Y ;Get y pos of selection sprite. |
L9105: STA Sprite00RAM ; | L9105: STA Sprite00RAM ; |
L9108: LDA #$6E ;Load sprite info for square selection sprite. | L9108: LDA #$6E ;Load sprite info for square selection sprite. |
L910A: STA Sprite00RAM+1 ; | L910A: STA Sprite00RAM+1 ; |
L910D: LDA #$03 ; | L910D: LDA #$03 ; |
L910F: STA Sprite00RAM+2 ; | L910F: STA Sprite00RAM+2 ; |
L9112: LDA #$50 ;Set data for selection sprite. | L9112: LDA #$50 ;Set data for selection sprite. |
L9114: STA Sprite00RAM+3 ; | L9114: STA Sprite00RAM+3 ; |
L9117: RTS ; | L9117: RTS ; |
| |
StartContTbl: | StartContTbl: |
L9118: .byte $60 ;Y sprite position for START. | L9118: .byte $60 ;Y sprite position for START. |
L9119: .byte $78 ;Y sprite position for CONTINUE. | L9119: .byte $78 ;Y sprite position for CONTINUE. |
| |
LoadPasswordScreen: | LoadPasswordScreen: |
L911A: JSR ClearAll ;($909F)Turn off screen, erase sprites and nametables. | L911A: JSR ClearAll ;($909F)Turn off screen, erase sprites and nametables. |
L911D: LDX #$E3 ;Loads PPU with info to display--> | L911D: LDX #$E3 ;Loads PPU with info to display--> |
L911F: LDY #$99 ;PASS WORD PLEASE. | L911F: LDY #$99 ;PASS WORD PLEASE. |
L9121: JSR PreparePPUProcess ;($9449)Load "PASSWORD PLEASE" on screen. | L9121: JSR PreparePPUProcess ;($9449)Load "PASSWORD PLEASE" on screen. |
L9124: JSR InitGFX7 ;($C6D6)Loads the font for the password. | L9124: JSR InitGFX7 ;($C6D6)Loads the font for the password. |
L9127: JSR DisplayInputCharacters ;($940B)Write password character to screen. | L9127: JSR DisplayInputCharacters ;($940B)Write password character to screen. |
L912A: LDA #$13 ; | L912A: LDA #$13 ; |
L912C: STA PalDataPending ;Change palette. | L912C: STA PalDataPending ;Change palette. |
L912E: LDA #$00 ; | L912E: LDA #$00 ; |
L9130: STA InputRow ;Sets character select cursor to--> | L9130: STA InputRow ;Sets character select cursor to--> |
L9133: STA InputColumn ;upper left character (0). | L9133: STA InputColumn ;upper left character (0). |
L9136: STA Timer3 ; | L9136: STA Timer3 ; |
L9138: LDA #$00 ; | L9138: LDA #$00 ; |
L913A: STA PasswordCursor ;Sets password cursor to password character 0. | L913A: STA PasswordCursor ;Sets password cursor to password character 0. |
L913D: LDY #$00 ; | L913D: LDY #$00 ; |
L913F: STY PasswordStat00 ;Appears to have no function. | L913F: STY PasswordStat00 ;Appears to have no function. |
L9142: INC TitleRoutine ; | L9142: INC TitleRoutine ; |
L9144: JMP TurnOnDisplay ;($90D1)Turn on screen and NMI. | L9144: JMP TurnOnDisplay ;($90D1)Turn on screen and NMI. |
| |
EnterPassword: | EnterPassword: |
L9147: JSR EraseAllSprites ;($C1A3)Remove sprites from screen. | L9147: JSR EraseAllSprites ;($C1A3)Remove sprites from screen. |
L914A: LDA Joy1Change ; | L914A: LDA Joy1Change ; |
L914C: AND #$10 ;Check to see if START has been pressed. | L914C: AND #$10 ;Check to see if START has been pressed. |
L914E: BEQ + ;If not, branch. | L914E: BEQ + ;If not, branch. |
L9150: JMP CheckPassword ;($8C5E)Check if password is correct. | L9150: JMP CheckPassword ;($8C5E)Check if password is correct. |
L9153:* LDX #$01 ; | L9153:* LDX #$01 ; |
L9155: STX PPUDataPending ;Prepare to write the password screen data to PPU. | L9155: STX PPUDataPending ;Prepare to write the password screen data to PPU. |
L9157: LDX PPUStrIndex ; | L9157: LDX PPUStrIndex ; |
L915A: LDA #$21 ;Upper byte of PPU string. | L915A: LDA #$21 ;Upper byte of PPU string. |
L915C: JSR WritePPUByte ;($C36B)Write byte to PPU. | L915C: JSR WritePPUByte ;($C36B)Write byte to PPU. |
L915F: LDA #$A8 ;Lower byte of PPU string. | L915F: LDA #$A8 ;Lower byte of PPU string. |
L9161: JSR WritePPUByte ;($C36B)Write byte to PPU. | L9161: JSR WritePPUByte ;($C36B)Write byte to PPU. |
L9164: LDA #$0F ;PPU string length. | L9164: LDA #$0F ;PPU string length. |
L9166: JSR WritePPUByte ;($C36B)Write byte to PPU. | L9166: JSR WritePPUByte ;($C36B)Write byte to PPU. |
L9169: LDA Timer3 ; | L9169: LDA Timer3 ; |
L916B: BEQ + ; | L916B: BEQ + ; |
L916D: LDA #$59 ; | L916D: LDA #$59 ; |
L916F: STA $02 ;Writes 'ERROR TRY AGAIN' on the screen--> | L916F: STA $02 ;Writes 'ERROR TRY AGAIN' on the screen--> |
L9171: LDA #$87 ;if Timer3 is anything but #$00. | L9171: LDA #$87 ;if Timer3 is anything but #$00. |
L9173: STA $03 ; | L9173: STA $03 ; |
L9175: JMP ++ ; | L9175: JMP ++ ; |
L9178:* LDA #$68 ; | L9178:* LDA #$68 ; |
L917A: STA $02 ; | L917A: STA $02 ; |
L917C: LDA #$87 ; | L917C: LDA #$87 ; |
L917E: STA $03 ;Writes the blank lines that cover--> | L917E: STA $03 ;Writes the blank lines that cover--> |
L9180:* LDY #$00 ;the message 'ERROR TRY AGAIN'. | L9180:* LDY #$00 ;the message 'ERROR TRY AGAIN'. |
L9182:* LDA ($02),Y ; | L9182:* LDA ($02),Y ; |
L9184: JSR WritePPUByte ; | L9184: JSR WritePPUByte ; |
L9187: INY ; | L9187: INY ; |
L9188: CPY #$0F ; | L9188: CPY #$0F ; |
L918A: BNE - ; | L918A: BNE - ; |
L918C: LDA Joy1Change ;If button A pressed, branch. | L918C: LDA Joy1Change ;If button A pressed, branch. |
L918E: BMI + ; | L918E: BMI + ; |
L9190: JMP CheckBackspace ;($91FB)Check if backspace pressed. | L9190: JMP CheckBackspace ;($91FB)Check if backspace pressed. |
L9193:* LDA TriangleSFXFlag ;Initiate BombLaunch SFX if a character--> | L9193:* LDA TriangleSFXFlag ;Initiate BombLaunch SFX if a character--> |
L9196: ORA #$01 ;has been written to the screen. | L9196: ORA #$01 ;has been written to the screen. |
L9198: STA TriangleSFXFlag ; | L9198: STA TriangleSFXFlag ; |
L919B: LDA PasswordCursor ; | L919B: LDA PasswordCursor ; |
L919E: CMP #$12 ;Check to see if password cursor is on--> | L919E: CMP #$12 ;Check to see if password cursor is on--> |
L91A0: BCC + ;character 19 thru 24. If not, branch. | L91A0: BCC + ;character 19 thru 24. If not, branch. |
L91A2: CLC ; | L91A2: CLC ; |
L91A3: ADC #$3E ;Will equal #$50 thru #$55. | L91A3: ADC #$3E ;Will equal #$50 thru #$55. |
L91A5: JMP LoadRowAndColumn ;($91BF) | L91A5: JMP LoadRowAndColumn ;($91BF) |
L91A8:* CMP #$0C ;Check to see if password cursor is on--> | L91A8:* CMP #$0C ;Check to see if password cursor is on--> |
L91AA: BCC + ;character 13 thru 18. If not, branch. | L91AA: BCC + ;character 13 thru 18. If not, branch. |
L91AC: CLC ; | L91AC: CLC ; |
L91AD: ADC #$3D ;Will equal #$49 thru #$4E. | L91AD: ADC #$3D ;Will equal #$49 thru #$4E. |
L91AF: JMP LoadRowAndColumn ;($91BF) | L91AF: JMP LoadRowAndColumn ;($91BF) |
L91B2:* CMP #$06 ;Check to see if password cursor is on--> | L91B2:* CMP #$06 ;Check to see if password cursor is on--> |
L91B4: BCC + ;character 7 thru 12. If not, branch. | L91B4: BCC + ;character 7 thru 12. If not, branch. |
L91B6: CLC ; | L91B6: CLC ; |
L91B7: ADC #$0A ;Will equal #$10 thru #$15. | L91B7: ADC #$0A ;Will equal #$10 thru #$15. |
L91B9: JMP LoadRowAndColumn ;($91BF) | L91B9: JMP LoadRowAndColumn ;($91BF) |
L91BC:* CLC ; | L91BC:* CLC ; |
L91BD: ADC #$09 ;Will equal #$09 thru #$0E. | L91BD: ADC #$09 ;Will equal #$09 thru #$0E. |
| |
LoadRowAndColumn: | LoadRowAndColumn: |
L91BF:* STA $06 ; | L91BF:* STA $06 ; |
L91C1: LDA InputRow ; | L91C1: LDA InputRow ; |
L91C4: ASL ;*2. address pointer is two bytes. | L91C4: ASL ;*2. address pointer is two bytes. |
L91C5: TAY ; | L91C5: TAY ; |
L91C6: LDA PasswordRowTbl,Y ;Store lower byte of row pointer. | L91C6: LDA PasswordRowTbl,Y ;Store lower byte of row pointer. |
L91C9: STA $00 ; | L91C9: STA $00 ; |
L91CB: LDA PasswordRowTbl+1,Y ;Store upper byte of row pointer. | L91CB: LDA PasswordRowTbl+1,Y ;Store upper byte of row pointer. |
L91CE: STA $01 ; | L91CE: STA $01 ; |
L91D0: LDY InputColumn ;Uses InputColumn value to find proper index--> | L91D0: LDY InputColumn ;Uses InputColumn value to find proper index--> |
L91D3: LDA ($00),Y ;of current character selected. | L91D3: LDA ($00),Y ;of current character selected. |
L91D5: PHA ;Temp storage of A. | L91D5: PHA ;Temp storage of A. |
L91D6: STA TileInfo0 ;Store value of current character slected. | L91D6: STA TileInfo0 ;Store value of current character slected. |
L91D9: LDA #$11 ; | L91D9: LDA #$11 ; |
L91DB: STA TileSize ; | L91DB: STA TileSize ; |
L91DE: LDX $06 ;Replace password character tile with--> | L91DE: LDX $06 ;Replace password character tile with--> |
L91E0: LDY #$21 ;the one selected by the player. | L91E0: LDY #$21 ;the one selected by the player. |
L91E2: JSR PrepareEraseTiles ;($9450) | L91E2: JSR PrepareEraseTiles ;($9450) |
L91E5: LDX PasswordCursor ; | L91E5: LDX PasswordCursor ; |
L91E8: PLA ;Store the currently selected password character--> | L91E8: PLA ;Store the currently selected password character--> |
L91E9: STA PasswordChar00,X ;in the proper PasswordChar RAM location. | L91E9: STA PasswordChar00,X ;in the proper PasswordChar RAM location. |
L91EC: LDA PasswordCursor ; | L91EC: LDA PasswordCursor ; |
L91EF: CLC ; | L91EF: CLC ; |
L91F0: ADC #$01 ; | L91F0: ADC #$01 ; |
L91F2: CMP #$18 ; | L91F2: CMP #$18 ; |
L91F4: BCC + ;Increment PasswordCursor. If at last character,--> | L91F4: BCC + ;Increment PasswordCursor. If at last character,--> |
L91F6: LDA #$00 ;loop back to the first character. | L91F6: LDA #$00 ;loop back to the first character. |
L91F8:* STA PasswordCursor ; | L91F8:* STA PasswordCursor ; |
| |
CheckBackspace: | CheckBackspace: |
L91FB: LDA Joy1Change ; | L91FB: LDA Joy1Change ; |
L91FD: AND #$40 ;If button B (backspace) has not--> | L91FD: AND #$40 ;If button B (backspace) has not--> |
L91FF: BEQ ++ ;been pressed, branch. | L91FF: BEQ ++ ;been pressed, branch. |
L9201: LDA PasswordCursor ; | L9201: LDA PasswordCursor ; |
L9204: SEC ;Subtract 1 from PasswordCursor. If--> | L9204: SEC ;Subtract 1 from PasswordCursor. If--> |
L9205: SBC #$01 ;PasswordCursor is negative, load--> | L9205: SBC #$01 ;PasswordCursor is negative, load--> |
L9207: BCS + ;PasswordCursor with #$17 (last character). | L9207: BCS + ;PasswordCursor with #$17 (last character). |
L9209: LDA #$17 ; | L9209: LDA #$17 ; |
L920B:* STA PasswordCursor ; | L920B:* STA PasswordCursor ; |
L920E:* LDY PasswordStat00 ;Appears to have no function. | L920E:* LDY PasswordStat00 ;Appears to have no function. |
L9211: LDA FrameCount ; | L9211: LDA FrameCount ; |
L9213: AND #$08 ;If FrameCount bit 3 not set, branch. | L9213: AND #$08 ;If FrameCount bit 3 not set, branch. |
L9215: BEQ +++ ; | L9215: BEQ +++ ; |
L9217: LDA #$3F ; | L9217: LDA #$3F ; |
L9219: LDX PasswordCursor ;Load A with #$3F if PasswordCursor is on--> | L9219: LDX PasswordCursor ;Load A with #$3F if PasswordCursor is on--> |
L921C: CPX #$0C ;character 0 thru 11, else load it with #$4F. | L921C: CPX #$0C ;character 0 thru 11, else load it with #$4F. |
L921E: BCC + ; | L921E: BCC + ; |
L9220: LDA #$4F ; | L9220: LDA #$4F ; |
L9222:* STA Sprite01RAM ;Set Y-coord of password cursor sprite. | L9222:* STA Sprite01RAM ;Set Y-coord of password cursor sprite. |
L9225: LDA #$6E ; | L9225: LDA #$6E ; |
L9227: STA Sprite01RAM+1 ;Set pattern for password cursor sprite. | L9227: STA Sprite01RAM+1 ;Set pattern for password cursor sprite. |
L922A: LDA #$20 ; | L922A: LDA #$20 ; |
L922C: STA Sprite01RAM+2 ;Set attributes for password cursor sprite. | L922C: STA Sprite01RAM+2 ;Set attributes for password cursor sprite. |
L922F: LDA PasswordCursor ;If the password cursor is at the 12th--> | L922F: LDA PasswordCursor ;If the password cursor is at the 12th--> |
L9232: CMP #$0C ;character or less, branch. | L9232: CMP #$0C ;character or less, branch. |
L9234: BCC + ; | L9234: BCC + ; |
L9236: SBC #$0C ;Calculate how many characters the password cursor--> | L9236: SBC #$0C ;Calculate how many characters the password cursor--> |
L9238:* TAX ;is from the left if on the second row of password. | L9238:* TAX ;is from the left if on the second row of password. |
L9239: LDA CursorPosTbl,X ;Load X position of PasswordCursor. | L9239: LDA CursorPosTbl,X ;Load X position of PasswordCursor. |
L923C: STA Sprite01RAM+3 ; | L923C: STA Sprite01RAM+3 ; |
L923F:* LDX InputRow ;Load X and Y with row and column--> | L923F:* LDX InputRow ;Load X and Y with row and column--> |
L9242: LDY InputColumn ;of current character selected. | L9242: LDY InputColumn ;of current character selected. |
L9245: LDA Joy1Retrig ; | L9245: LDA Joy1Retrig ; |
L9247: AND #$0F ;If no directional buttons are in--> | L9247: AND #$0F ;If no directional buttons are in--> |
L9249: BEQ ++++++++++ ;retrigger mode, branch. | L9249: BEQ ++++++++++ ;retrigger mode, branch. |
L924B: PHA ;Temp storage of A. | L924B: PHA ;Temp storage of A. |
L924C: LDA TriangleSFXFlag ;Initiate BeepSFX when the player pushes--> | L924C: LDA TriangleSFXFlag ;Initiate BeepSFX when the player pushes--> |
L924F: ORA #$08 ;a button on the directional pad. | L924F: ORA #$08 ;a button on the directional pad. |
L9251: STA TriangleSFXFlag ; | L9251: STA TriangleSFXFlag ; |
L9254: PLA ;Restore A. | L9254: PLA ;Restore A. |
L9255: LSR ;Put status of right directional button in carry bit. | L9255: LSR ;Put status of right directional button in carry bit. |
L9256: BCC +++ ;Branch if right button has not been pressed. | L9256: BCC +++ ;Branch if right button has not been pressed. |
L9258: INY ; | L9258: INY ; |
L9259: CPY #$0D ;Increment Y(column). If Y is greater than #$0C,--> | L9259: CPY #$0D ;Increment Y(column). If Y is greater than #$0C,--> |
L925B: BNE ++ ;increment X(Row). If X is greater than #$04,--> | L925B: BNE ++ ;increment X(Row). If X is greater than #$04,--> |
L925D: INX ;set X to #$00(start back at top row) and store--> | L925D: INX ;set X to #$00(start back at top row) and store--> |
L925E: CPX #$05 ;new row in InputRow. | L925E: CPX #$05 ;new row in InputRow. |
L9260: BNE + ; | L9260: BNE + ; |
L9262: LDX #$00 ; | L9262: LDX #$00 ; |
L9264:* STX InputRow ; | L9264:* STX InputRow ; |
L9267: LDY #$00 ;Store new column in InputColumn. | L9267: LDY #$00 ;Store new column in InputColumn. |
L9269:* STY InputColumn ; | L9269:* STY InputColumn ; |
L926C:* LSR ;Put status of left directional button in carry bit. | L926C:* LSR ;Put status of left directional button in carry bit. |
L926D: BCC +++ ;Branch if left button has not been pressed. | L926D: BCC +++ ;Branch if left button has not been pressed. |
L926F: DEY ; | L926F: DEY ; |
L9270: BPL ++ ;Decrement Y(column). If Y is less than #$00,--> | L9270: BPL ++ ;Decrement Y(column). If Y is less than #$00,--> |
L9272: DEX ;Decrement X(row). If X is less than #$00,--> | L9272: DEX ;Decrement X(row). If X is less than #$00,--> |
L9273: BPL + ;set X to #$04(last row) and store new row--> | L9273: BPL + ;set X to #$04(last row) and store new row--> |
L9275: LDX #$04 ;in InputRow. | L9275: LDX #$04 ;in InputRow. |
L9277:* STX InputRow ; | L9277:* STX InputRow ; |
L927A: LDY #$0C ;Store new column in InputColumn. | L927A: LDY #$0C ;Store new column in InputColumn. |
L927C:* STY InputColumn ; | L927C:* STY InputColumn ; |
L927F:* LSR ;Put status of down directional button in carry bit. | L927F:* LSR ;Put status of down directional button in carry bit. |
L9280: BCC ++ ;Branch if down button has not been pressed. | L9280: BCC ++ ;Branch if down button has not been pressed. |
L9282: INX ; | L9282: INX ; |
L9283: CPX #$05 ;Increment X(row). if X is greater than #$04,--> | L9283: CPX #$05 ;Increment X(row). if X is greater than #$04,--> |
L9285: BNE + ;set X to #$00(first row) and store new--> | L9285: BNE + ;set X to #$00(first row) and store new--> |
L9287: LDX #$00 ;row in InputRow. | L9287: LDX #$00 ;row in InputRow. |
L9289:* STX InputRow ; | L9289:* STX InputRow ; |
L928C:* LSR ;Put status of up directional button in carry bit. | L928C:* LSR ;Put status of up directional button in carry bit. |
L928D: BCC ++ ;Branch if up button has not been pressed. | L928D: BCC ++ ;Branch if up button has not been pressed. |
L928F: DEX ; | L928F: DEX ; |
L9290: BPL + ;Decrement X(row). if X is less than #$00,--> | L9290: BPL + ;Decrement X(row). if X is less than #$00,--> |
L9292: LDX #$04 ;set X to #$04(last row) and store new--> | L9292: LDX #$04 ;set X to #$04(last row) and store new--> |
L9294:* STX InputRow ;row in InputRow. | L9294:* STX InputRow ;row in InputRow. |
L9297:* LDA FrameCount ; | L9297:* LDA FrameCount ; |
L9299: AND #$08 ;If FrameCount bit 3 not set, branch. | L9299: AND #$08 ;If FrameCount bit 3 not set, branch. |
L929B: BEQ + ; | L929B: BEQ + ; |
L929D: LDA CharSelectYTbl,X ;Set Y-coord of character selection sprite. | L929D: LDA CharSelectYTbl,X ;Set Y-coord of character selection sprite. |
L92A0: STA Sprite02RAM ; | L92A0: STA Sprite02RAM ; |
L92A3: LDA #$6E ;Set pattern for character selection sprite. | L92A3: LDA #$6E ;Set pattern for character selection sprite. |
L92A5: STA Sprite02RAM+1 ; | L92A5: STA Sprite02RAM+1 ; |
L92A8: LDA #$20 ;Set attributes for character selection sprite. | L92A8: LDA #$20 ;Set attributes for character selection sprite. |
L92AA: STA Sprite02RAM+2 ; | L92AA: STA Sprite02RAM+2 ; |
L92AD: LDA CharSelectXTbl,Y ;Set x-Coord of character selection sprite. | L92AD: LDA CharSelectXTbl,Y ;Set x-Coord of character selection sprite. |
L92B0: STA Sprite02RAM+3 ; | L92B0: STA Sprite02RAM+3 ; |
L92B3:* RTS ; | L92B3:* RTS ; |
| |
;The following data does not appear to be used in the program. | ;The following data does not appear to be used in the program. |
L92B4: .byte $21, $20 | L92B4: .byte $21, $20 |
| |
;The following table is used to determine the proper Y position of the character | ;The following table is used to determine the proper Y position of the character |
| |
CharSelectYTbl: | CharSelectYTbl: |
L92B6: .byte $77, $87, $97, $A7, $B7 | L92B6: .byte $77, $87, $97, $A7, $B7 |
| |
;The following table is used to determine the proper X position of the character | ;The following table is used to determine the proper X position of the character |
| |
CharSelectXTbl: | CharSelectXTbl: |
L92BB: .byte $20, $30, $40, $50, $60, $70, $80, $90, $A0, $B0, $C0, $D0, $E0 | L92BB: .byte $20, $30, $40, $50, $60, $70, $80, $90, $A0, $B0, $C0, $D0, $E0 |
| |
;When the PasswordCursor is on the second row of the password, the following table is used | ;When the PasswordCursor is on the second row of the password, the following table is used |
| |
CursorPosTbl: | CursorPosTbl: |
L92C8: .byte $48, $50, $58, $60, $68, $70, $80, $88, $90, $98, $A0, $A8 | L92C8: .byte $48, $50, $58, $60, $68, $70, $80, $88, $90, $98, $A0, $A8 |
| |
InitializeGame: | InitializeGame: |
L92D4: JSR ClearRAM_33_DF ;($C1D4)Clear RAM. | L92D4: JSR ClearRAM_33_DF ;($C1D4)Clear RAM. |
L92D7: JSR ClearSamusStats ;($C578)Reset Samus stats for a new game. | L92D7: JSR ClearSamusStats ;($C578)Reset Samus stats for a new game. |
L92DA: JSR LoadPasswordData ;($8D12)Load data from password. | L92DA: JSR LoadPasswordData ;($8D12)Load data from password. |
L92DD: LDY #$00 ; | L92DD: LDY #$00 ; |
L92DF: STY SpritePagePos ; | L92DF: STY SpritePagePos ; |
L92E1: STY PageIndex ;Clear object data. | L92E1: STY PageIndex ;Clear object data. |
L92E3: STY ObjectCntrl ; | L92E3: STY ObjectCntrl ; |
L92E5: STY ObjectHi ; | L92E5: STY ObjectHi ; |
L92E8: JSR SilenceMusic ;($CB8E)Turn off music. | L92E8: JSR SilenceMusic ;($CB8E)Turn off music. |
L92EB: LDA #$5A ; | L92EB: LDA #$5A ; |
L92ED: STA AnimFrame ;Set animframe index. changed by initializing routines. | L92ED: STA AnimFrame ;Set animframe index. changed by initializing routines. |
L92F0: LDX #$01 ;x is the index into the position tables below. | L92F0: LDX #$01 ;x is the index into the position tables below. |
L92F2: LDA InArea ;Load starting area. | L92F2: LDA InArea ;Load starting area. |
L92F4: AND #$0F ; | L92F4: AND #$0F ; |
L92F6: BNE + ;If in area other than Brinstar, get second item in tables. | L92F6: BNE + ;If in area other than Brinstar, get second item in tables. |
L92F8: DEX ;Starting in Brinstar. Get forst item in each table. | L92F8: DEX ;Starting in Brinstar. Get forst item in each table. |
L92F9:* LDA RestartYPosTbl,X ; | L92F9:* LDA RestartYPosTbl,X ; |
L92FC: STA ObjectY ;Set Samus restart y position on screen. | L92FC: STA ObjectY ;Set Samus restart y position on screen. |
L92FF: LDA RestartXPosTbl,X ; | L92FF: LDA RestartXPosTbl,X ; |
L9302: STA ObjectX ;Set Samus restart x position on screen. | L9302: STA ObjectX ;Set Samus restart x position on screen. |
L9305: INC SamusStat02 ;The combination of SamusStat02 and 03 keep track of how--> | L9305: INC SamusStat02 ;The combination of SamusStat02 and 03 keep track of how--> |
L9308: BNE + ;many times Samus has died and beaten the game as they are--> | L9308: BNE + ;many times Samus has died and beaten the game as they are--> |
L930A: INC SamusStat03 ;incremented every time this routine is run, but they are--> | L930A: INC SamusStat03 ;incremented every time this routine is run, but they are--> |
L930D:* LDA #$01 ;not accessed anywhere else. | L930D:* LDA #$01 ;not accessed anywhere else. |
L930F: STA MainRoutine ;Initialize starting area. | L930F: STA MainRoutine ;Initialize starting area. |
L9311: JSR ScreenNmiOff ;($C45D)Turn off screen. | L9311: JSR ScreenNmiOff ;($C45D)Turn off screen. |
L9314: JSR LoadSamusGFX ;($C5DC)Load Samus GFX into pattern table. | L9314: JSR LoadSamusGFX ;($C5DC)Load Samus GFX into pattern table. |
L9317: JSR NmiOn ;($C487)Turn on the non-maskable interrupt. | L9317: JSR NmiOn ;($C487)Turn on the non-maskable interrupt. |
L931A: LDA InArea ;Load area Samus is to start in. | L931A: LDA InArea ;Load area Samus is to start in. |
L931C: AND #$0F ; | L931C: AND #$0F ; |
L931E: TAY ; | L931E: TAY ; |
L931F: LDA BankTable,Y ;Change to proper memory page. | L931F: LDA BankTable,Y ;Change to proper memory page. |
L9322: STA SwitchPending ; | L9322: STA SwitchPending ; |
L9324: RTS | L9324: RTS |
| |
;The following two tables are used to find Samus y and x positions on the screen after the game | ;The following two tables are used to find Samus y and x positions on the screen after the game |
| |
RestartYPosTbl: | RestartYPosTbl: |
L9325: .byte $64 ;Brinstar | L9325: .byte $64 ;Brinstar |
L9326: .byte $8C ;All other areas. | L9326: .byte $8C ;All other areas. |
L9327: .byte $5C ;Not used. | L9327: .byte $5C ;Not used. |
| |
RestartXPosTbl: | RestartXPosTbl: |
L9328: .byte $78 ;Brinstar | L9328: .byte $78 ;Brinstar |
L9329: .byte $78 ;All other areas. | L9329: .byte $78 ;All other areas. |
L932A: .byte $5C ;Not used. | L932A: .byte $5C ;Not used. |
| |
InitializeStats: | InitializeStats: |
L932B: LDA #$00 ; | L932B: LDA #$00 ; |
L932D: STA SamusStat00 ; | L932D: STA SamusStat00 ; |
L9330: STA TankCount ; | L9330: STA TankCount ; |
L9333: STA SamusGear ; | L9333: STA SamusGear ; |
L9336: STA MissileCount ; | L9336: STA MissileCount ; |
L9339: STA MaxMissiles ; | L9339: STA MaxMissiles ; |
L933C: STA KraidStatueStatus ;Set all of Samus' stats to 0 when starting new game. | L933C: STA KraidStatueStatus ;Set all of Samus' stats to 0 when starting new game. |
L933F: STA RidleyStatueStatus ; | L933F: STA RidleyStatueStatus ; |
L9342: STA SamusAge ; | L9342: STA SamusAge ; |
L9345: STA SamusAge+1 ; | L9345: STA SamusAge+1 ; |
L9348: STA SamusAge+2 ; | L9348: STA SamusAge+2 ; |
L934B: STA SamusStat01 ; | L934B: STA SamusStat01 ; |
L934E: STA AtEnding ; | L934E: STA AtEnding ; |
L9351: STA JustInBailey ; | L9351: STA JustInBailey ; |
L9354: LDA #$02 ; | L9354: LDA #$02 ; |
L9356: STA SwitchPending ;Prepare to switch to Brinstar memory page. | L9356: STA SwitchPending ;Prepare to switch to Brinstar memory page. |
L9358: RTS ; | L9358: RTS ; |
| |
DisplayPassword: | DisplayPassword: |
L9359: LDA Timer3 ;Wait for "GAME OVER" to be displayed--> | L9359: LDA Timer3 ;Wait for "GAME OVER" to be displayed--> |
L935B: BNE $9324 ;for 160 frames (2.6 seconds). | L935B: BNE $9324 ;for 160 frames (2.6 seconds). |
L935D: JSR ClearAll ;($909F)Turn off screen, erase sprites and nametables. | L935D: JSR ClearAll ;($909F)Turn off screen, erase sprites and nametables. |
L9360: LDX #$7F ;Low byte of start of PPU data. | L9360: LDX #$7F ;Low byte of start of PPU data. |
L9362: LDY #$93 ;High byte of start of PPU data. | L9362: LDY #$93 ;High byte of start of PPU data. |
L9364: JSR PreparePPUProcess ;($9449)Clears screen and writes "PASS WORD". | L9364: JSR PreparePPUProcess ;($9449)Clears screen and writes "PASS WORD". |
L9367: JSR InitGFX7 ;($C6D6)Loads the font for the password. | L9367: JSR InitGFX7 ;($C6D6)Loads the font for the password. |
L936A: JSR CalculatePassword ;($8C7A)Calculates the password. | L936A: JSR CalculatePassword ;($8C7A)Calculates the password. |
L936D: JSR NmiOn ;($C487)Turn on the nonmaskable interrupt. | L936D: JSR NmiOn ;($C487)Turn on the nonmaskable interrupt. |
L9370: JSR PasswordToScreen ;($93C6)Displays password on screen. | L9370: JSR PasswordToScreen ;($93C6)Displays password on screen. |
L9373: JSR WaitNMIPass ;($C42C)Wait for NMI to end. | L9373: JSR WaitNMIPass ;($C42C)Wait for NMI to end. |
L9376: LDA #$13 ; | L9376: LDA #$13 ; |
L9378: STA PalDataPending ;Change palette. | L9378: STA PalDataPending ;Change palette. |
L937A: INC TitleRoutine ; | L937A: INC TitleRoutine ; |
L937C: JMP ScreenOn ;($C447)Turn screen on. | L937C: JMP ScreenOn ;($C447)Turn screen on. |
| |
;Information below is for above routine to display "PASS WORD" on the screen. | ;Information below is for above routine to display "PASS WORD" on the screen. |
L937F: .byte $21 ;PPU memory high byte. | L937F: .byte $21 ;PPU memory high byte. |
L9380: .byte $4B ;PPU memory low byte. | L9380: .byte $4B ;PPU memory low byte. |
L9381: .byte $09 ;PPU string length. | L9381: .byte $09 ;PPU string length. |
; 'P A S S _ W O R D' | ; 'P A S S _ W O R D' |
L9382: .byte $19, $0A, $1C, $1C, $FF, $20, $18, $1B, $0D | L9382: .byte $19, $0A, $1C, $1C, $FF, $20, $18, $1B, $0D |
| |
;Information to be stored in attribute table 0. | ;Information to be stored in attribute table 0. |
L938B: .byte $23 ;PPU memory high byte. | L938B: .byte $23 ;PPU memory high byte. |
L938C: .byte $D0 ;PPU memory low byte. | L938C: .byte $D0 ;PPU memory low byte. |
L938D: .byte $48 ;RLE bit set, repeat entry 8 times. | L938D: .byte $48 ;RLE bit set, repeat entry 8 times. |
L938E: .byte $00 ;Clears line below "PASS WORD". | L938E: .byte $00 ;Clears line below "PASS WORD". |
| |
L938F: .byte $23 ;PPU memory high byte. | L938F: .byte $23 ;PPU memory high byte. |
L9390: .byte $D8 ;PPU memory low byte. | L9390: .byte $D8 ;PPU memory low byte. |
L9391: .byte $60 ;RLE bit set, repeat entry 32 times. | L9391: .byte $60 ;RLE bit set, repeat entry 32 times. |
L9392: .byte $55 ;Turn color on to display password characters. | L9392: .byte $55 ;Turn color on to display password characters. |
| |
L9393: .byte $00 ;End PPU string write. | L9393: .byte $00 ;End PPU string write. |
| |
WaitForSTART: | WaitForSTART: |
L9394: LDA Joy1Change ;Waits for START to be ressed proceed--> | L9394: LDA Joy1Change ;Waits for START to be ressed proceed--> |
L9396: AND #$10 ;past the GAME OVER screen. | L9396: AND #$10 ;past the GAME OVER screen. |
L9398: BEQ + ;If start not pressed, branch. | L9398: BEQ + ;If start not pressed, branch. |
L939A: JMP CheckPassword ;($8C5E)Check if password is correct. | L939A: JMP CheckPassword ;($8C5E)Check if password is correct. |
L939D:* RTS ; | L939D:* RTS ; |
| |
GameOver: | GameOver: |
L939E: JSR ClearAll ;($909F)Turn off screen, erase sprites and nametables. | L939E: JSR ClearAll ;($909F)Turn off screen, erase sprites and nametables. |
L93A1: LDX #$B9 ;Low byte of start of PPU data. | L93A1: LDX #$B9 ;Low byte of start of PPU data. |
L93A3: LDY #$93 ;High byte of start of PPU data. | L93A3: LDY #$93 ;High byte of start of PPU data. |
L93A5: JSR PreparePPUProcess ;($9449)Clears screen and writes "GAME OVER". | L93A5: JSR PreparePPUProcess ;($9449)Clears screen and writes "GAME OVER". |
L93A8: JSR InitGFX7 ;($C6D6)Loads the font for the password. | L93A8: JSR InitGFX7 ;($C6D6)Loads the font for the password. |
L93AB: JSR NmiOn ;($C487)Turn on the nonmaskable interrupt. | L93AB: JSR NmiOn ;($C487)Turn on the nonmaskable interrupt. |
L93AE: LDA #$10 ;Load Timer3 with a delay of 160 frames--> | L93AE: LDA #$10 ;Load Timer3 with a delay of 160 frames--> |
L93B0: STA Timer3 ;(2.6 seconds) for displaying "GAME OVER". | L93B0: STA Timer3 ;(2.6 seconds) for displaying "GAME OVER". |
L93B2: LDA #$19 ;Loads TitleRoutine with --> | L93B2: LDA #$19 ;Loads TitleRoutine with --> |
L93B4: STA TitleRoutine ;DisplayPassword. | L93B4: STA TitleRoutine ;DisplayPassword. |
L93B6: JMP ScreenOn ;($C447)Turn screen on. | L93B6: JMP ScreenOn ;($C447)Turn screen on. |
| |
;Information below is for above routine to display "GAME OVER" on the screen. | ;Information below is for above routine to display "GAME OVER" on the screen. |
L93B9: .byte $21 ;PPU memory high byte. | L93B9: .byte $21 ;PPU memory high byte. |
L93BA: .byte $8C ;PPU memory low byte. | L93BA: .byte $8C ;PPU memory low byte. |
L93BB: .byte $09 ;PPU string length. | L93BB: .byte $09 ;PPU string length. |
; 'G A M E _ O V E R' | ; 'G A M E _ O V E R' |
L93BC: .byte $10, $0A, $16, $0E, $FF, $18, $1F, $0E, $1B | L93BC: .byte $10, $0A, $16, $0E, $FF, $18, $1F, $0E, $1B |
| |
L93C4: .byte $00 ;End PPU string write. | L93C4: .byte $00 ;End PPU string write. |
| |
PasswordToScreen: | PasswordToScreen: |
L93C6: JSR WaitNMIPass ;($C42C)Wait for NMI to end. | L93C6: JSR WaitNMIPass ;($C42C)Wait for NMI to end. |
L93C9: LDY #$05 ;Index to find password characters(base=$699A). | L93C9: LDY #$05 ;Index to find password characters(base=$699A). |
L93CB: JSR LoadPasswordTiles ;($93F9)Load tiles on screen. | L93CB: JSR LoadPasswordTiles ;($93F9)Load tiles on screen. |
L93CE: LDX #$A9 ;PPU low address byte. | L93CE: LDX #$A9 ;PPU low address byte. |
L93D0: LDY #$21 ;PPU high address byte. | L93D0: LDY #$21 ;PPU high address byte. |
L93D2: JSR PrepareEraseTiles ;($9450)Erase tiles on screen. | L93D2: JSR PrepareEraseTiles ;($9450)Erase tiles on screen. |
L93D5: LDY #$0B ;Index to find password characters(base=$699A). | L93D5: LDY #$0B ;Index to find password characters(base=$699A). |
L93D7: JSR LoadPasswordTiles ;($93F9)Load tiles on screen. | L93D7: JSR LoadPasswordTiles ;($93F9)Load tiles on screen. |
L93DA: LDX #$B0 ;PPU low address byte. | L93DA: LDX #$B0 ;PPU low address byte. |
L93DC: LDY #$21 ;PPU high address byte. | L93DC: LDY #$21 ;PPU high address byte. |
L93DE: JSR PrepareEraseTiles ;($9450)Erase tiles on screen. | L93DE: JSR PrepareEraseTiles ;($9450)Erase tiles on screen. |
L93E1: LDY #$11 ;Index to find password characters(base=$699A). | L93E1: LDY #$11 ;Index to find password characters(base=$699A). |
L93E3: JSR LoadPasswordTiles ;($93F9)Load tiles on screen. | L93E3: JSR LoadPasswordTiles ;($93F9)Load tiles on screen. |
L93E6: LDX #$E9 ;PPU low address byte. | L93E6: LDX #$E9 ;PPU low address byte. |
L93E8: LDY #$21 ;PPU high address byte. | L93E8: LDY #$21 ;PPU high address byte. |
L93EA: JSR PrepareEraseTiles ;($9450)Erase tiles on screen. | L93EA: JSR PrepareEraseTiles ;($9450)Erase tiles on screen. |
L93ED: LDY #$17 ;Index to find password characters(base=$699A). | L93ED: LDY #$17 ;Index to find password characters(base=$699A). |
L93EF: JSR LoadPasswordTiles ;($93F9)Load tiles on screen. | L93EF: JSR LoadPasswordTiles ;($93F9)Load tiles on screen. |
L93F2: LDX #$F0 ;PPU low address byte. | L93F2: LDX #$F0 ;PPU low address byte. |
L93F4: LDY #$21 ;PPU high address byte. | L93F4: LDY #$21 ;PPU high address byte. |
L93F6: JMP PrepareEraseTiles ;($9450)Erase tiles on screen. | L93F6: JMP PrepareEraseTiles ;($9450)Erase tiles on screen. |
| |
LoadPasswordTiles: | LoadPasswordTiles: |
L93F9: LDA #$16 ;Tiles to replace are one block--> | L93F9: LDA #$16 ;Tiles to replace are one block--> |
L93FB: STA TileSize ;high and 6 blocks long. | L93FB: STA TileSize ;high and 6 blocks long. |
L93FE: LDX #$05 ; | L93FE: LDX #$05 ; |
L9400:* LDA PasswordChar00,Y ; | L9400:* LDA PasswordChar00,Y ; |
L9403: STA TileInfo0,X ; | L9403: STA TileInfo0,X ; |
L9406: DEY ;Transfer password characters to--> | L9406: DEY ;Transfer password characters to--> |
L9407: DEX ;TileInfo addresses. | L9407: DEX ;TileInfo addresses. |
L9408: BPL- ; | L9408: BPL- ; |
L940A: RTS ; | L940A: RTS ; |
| |
DisplayInputCharacters: | DisplayInputCharacters: |
L940B: LDA PPUStatus ;Clear address latches. | L940B: LDA PPUStatus ;Clear address latches. |
L940E: LDY #$00 ; | L940E: LDY #$00 ; |
L9410: TYA ;Initially sets $00 an $01. | L9410: TYA ;Initially sets $00 an $01. |
L9411: STA $00 ;to #$00. | L9411: STA $00 ;to #$00. |
L9413: STA $01 ;Also, initialy sets x and y to #$00. | L9413: STA $01 ;Also, initialy sets x and y to #$00. |
L9415:* ASL ; | L9415:* ASL ; |
L9416: TAX ; | L9416: TAX ; |
L9417: LDA PasswordRowsTbl,X ; | L9417: LDA PasswordRowsTbl,X ; |
L941A: STA PPUAddress ; | L941A: STA PPUAddress ; |
L941D: LDA PasswordRowsTbl+1,X ;Displays the list of characters --> | L941D: LDA PasswordRowsTbl+1,X ;Displays the list of characters --> |
L9420: sTA PPUAddress ;to choose from on the password--> | L9420: sTA PPUAddress ;to choose from on the password--> |
L9423: LDX #$00 ;entry screen. | L9423: LDX #$00 ;entry screen. |
L9425:* LDA PasswordRow0,Y ;Base is $99A2. | L9425:* LDA PasswordRow0,Y ;Base is $99A2. |
L9428: STA PPUIOReg ; | L9428: STA PPUIOReg ; |
L942B: LDA #$FF ;Blank tile. | L942B: LDA #$FF ;Blank tile. |
L942D: STA PPUIOReg ; | L942D: STA PPUIOReg ; |
L9430: INY ; | L9430: INY ; |
L9431: INX ; | L9431: INX ; |
L9432: CPX #$0D ;13 characters in current row? | L9432: CPX #$0D ;13 characters in current row? |
L9434: BNE - ;if not, add another character. | L9434: BNE - ;if not, add another character. |
L9436: INC $01 ; | L9436: INC $01 ; |
L9438: LDA $01 ; | L9438: LDA $01 ; |
L943A: CMP #$05 ;5 rows? | L943A: CMP #$05 ;5 rows? |
L943C: BNE -- ;If not, go to next row. | L943C: BNE -- ;If not, go to next row. |
L943E: RTS ; | L943E: RTS ; |
| |
;The table below is used by the code above to determine the positions | ;The table below is used by the code above to determine the positions |
| |
PasswordRowsTbl: | PasswordRowsTbl: |
L943F: .byte $21, $E4 ; | L943F: .byte $21, $E4 ; |
L9441: .byte $22, $24 ;The two entries in each row are the upper and lower address--> | L9441: .byte $22, $24 ;The two entries in each row are the upper and lower address--> |
L9443: .byte $22, $64 ;bytes to start writing to the name table, respectively. | L9443: .byte $22, $64 ;bytes to start writing to the name table, respectively. |
L9445: .byte $22, $A4 ; | L9445: .byte $22, $A4 ; |
L9447: .byte $22, $E4 ; | L9447: .byte $22, $E4 ; |
| |
| |
PreparePPUProcess: | PreparePPUProcess: |
L9449: stx $00 ;Lower byte of pointer to PPU string | L9449: stx $00 ;Lower byte of pointer to PPU string |
L944B: sty $01 ;Upper byte of pointer to PPU string | L944B: sty $01 ;Upper byte of pointer to PPU string |
L944D: jmp ProcessPPUString ;($C30C) | L944D: jmp ProcessPPUString ;($C30C) |
| |
PrepareEraseTiles: | PrepareEraseTiles: |
L9450: STX $00 ;PPU low address byte | L9450: STX $00 ;PPU low address byte |
L9452: STY $01 ;PPU high address byte | L9452: STY $01 ;PPU high address byte |
L9454: LDX #$80 ; | L9454: LDX #$80 ; |
L9456: LDY #$07 ; | L9456: LDY #$07 ; |
L9458: STX $02 ;Address of byte where tile size--> | L9458: STX $02 ;Address of byte where tile size--> |
L945A: STY $03 ;of tile to be erased is stored. | L945A: STY $03 ;of tile to be erased is stored. |
L945C: JMP EraseTile ;($C328)Erase the selected tiles. | L945C: JMP EraseTile ;($C328)Erase the selected tiles. |
| |
;---------------------------------------[ Unused intro routines ]------------------------------------ | ;---------------------------------------[ Unused intro routines ]------------------------------------ |
| |
UnusedIntroRoutine4: | UnusedIntroRoutine4: |
L945F: STX PPUStrIndex ; | L945F: STX PPUStrIndex ; |
L9462: LDA #$00 ; | L9462: LDA #$00 ; |
L9464: STA PPUDataString,X ;The following unused routine writes something to the--> | L9464: STA PPUDataString,X ;The following unused routine writes something to the--> |
L9467: LDA #$01 ;PPU string and prepares for a PPU write. | L9467: LDA #$01 ;PPU string and prepares for a PPU write. |
L9469: STA PPUDataPending ; | L9469: STA PPUDataPending ; |
L946B: RTS ; | L946B: RTS ; |
| |
UnusedIntroRoutine5: | UnusedIntroRoutine5: |
L946C: STA $05 ; | L946C: STA $05 ; |
L946E: AND #$F0 ; | L946E: AND #$F0 ; |
L9470: LSR ; | L9470: LSR ; |
L9471: LSR ; | L9471: LSR ; |
L9472: LSR ; | L9472: LSR ; |
L9473: LSR ; | L9473: LSR ; |
L9474: JSR + ; | L9474: JSR + ; |
L9477: LDA $05 ;Unused intro routine. It looks like originally the--> | L9477: LDA $05 ;Unused intro routine. It looks like originally the--> |
L9479: AND #$0F ;title routines were going to write data to the name--> | L9479: AND #$0F ;title routines were going to write data to the name--> |
L947B:* STA PPUDataString,X ;tables in the middle of the title sequences. | L947B:* STA PPUDataString,X ;tables in the middle of the title sequences. |
L947E: INX ; | L947E: INX ; |
L947F: TXA ; | L947F: TXA ; |
L9480: CMP #$55 ; | L9480: CMP #$55 ; |
L9482: BCC ++ ; | L9482: BCC ++ ; |
L9484: LDX PPUStrIndex ; | L9484: LDX PPUStrIndex ; |
L9487:* LDA #$00 ; | L9487:* LDA #$00 ; |
L9489: STA PPUDataString,X ; | L9489: STA PPUDataString,X ; |
L948C: BEQ - ; | L948C: BEQ - ; |
L948E:* RTS ; | L948E:* RTS ; |
| |
UnusedIntroRoutine6: | UnusedIntroRoutine6: |
L948F: TYA ; | L948F: TYA ; |
L9490: PHA ; | L9490: PHA ; |
L9491: JSR Amul16 ;($C2C5)Multiply by 16. | L9491: JSR Amul16 ;($C2C5)Multiply by 16. |
L9494: TAY ; | L9494: TAY ; |
L9495: LDA $684B,Y ; | L9495: LDA $684B,Y ; |
L9498: STA $0B ; | L9498: STA $0B ; |
L949A: LDA $684A,Y ; | L949A: LDA $684A,Y ; |
L949D: STA $0A ; | L949D: STA $0A ; |
L949F: JSR UnusedIntroRoutine8 ;($94DA) | L949F: JSR UnusedIntroRoutine8 ;($94DA) |
L94A2: LDA $06 ; | L94A2: LDA $06 ; |
L94A4: STA $683D,X ;Another unused intro routine. | L94A4: STA $683D,X ;Another unused intro routine. |
L94A7: LDA $07 ; | L94A7: LDA $07 ; |
L94A9: STA $683C,X ; | L94A9: STA $683C,X ; |
L94AC: PLA ; | L94AC: PLA ; |
L94AD: TAY ; | L94AD: TAY ; |
L94AE: RTS ; | L94AE: RTS ; |
| |
UnusedIntroRoutine7: | UnusedIntroRoutine7: |
L94AF: TYA ; | L94AF: TYA ; |
L94B0: PHA ; | L94B0: PHA ; |
L94B1: JSR Amul16 ;($C2C5)Multiply by 16. | L94B1: JSR Amul16 ;($C2C5)Multiply by 16. |
L94B4: TAY ; | L94B4: TAY ; |
L94B5: LDA $684D,Y ; | L94B5: LDA $684D,Y ; |
L94B8: STA $0B ; | L94B8: STA $0B ; |
L94BA: LDA $684C,Y ; | L94BA: LDA $684C,Y ; |
L94BD: STA $0A ; | L94BD: STA $0A ; |
L94BF: JSR UnusedIntroRoutine8 ;($94DA) | L94BF: JSR UnusedIntroRoutine8 ;($94DA) |
L94C2: LDA $06 ; | L94C2: LDA $06 ; |
L94C4: STA $6834,X ; | L94C4: STA $6834,X ; |
L94C7: LDA $07 ; | L94C7: LDA $07 ; |
L94C9: STA $6833,X ; | L94C9: STA $6833,X ; |
L94CC: LDA $6842,Y ;Another unused intro routine. | L94CC: LDA $6842,Y ;Another unused intro routine. |
L94CF: PHA ; | L94CF: PHA ; |
L94D0: TXA ; | L94D0: TXA ; |
L94D1: LSR ; | L94D1: LSR ; |
L94D2: TAY ; | L94D2: TAY ; |
L94D3: PLA ; | L94D3: PLA ; |
L94D4: STA $6839,Y ; | L94D4: STA $6839,Y ; |
L94D7: PLA ; | L94D7: PLA ; |
L94D8: TAY ; | L94D8: TAY ; |
L94D9: RTS ; | L94D9: RTS ; |
| |
UnusedIntroRoutine8: | UnusedIntroRoutine8: |
L94DA: LDA #$FF ; | L94DA: LDA #$FF ; |
L94DC: STA $01 ; | L94DC: STA $01 ; |
L94DE: STA $02 ; | L94DE: STA $02 ; |
L94E0: STA $03 ; | L94E0: STA $03 ; |
L94E2: SEC ; | L94E2: SEC ; |
L94E3:* LDA $0A ; | L94E3:* LDA $0A ; |
L94E5: SBC #$E8 ; | L94E5: SBC #$E8 ; |
L94E7: STA $0A ; | L94E7: STA $0A ; |
L94E9: LDA $0B ; | L94E9: LDA $0B ; |
L94EB: SBC #$03 ; | L94EB: SBC #$03 ; |
L94ED: STA $0B ; | L94ED: STA $0B ; |
L94EF: INC $03 ; | L94EF: INC $03 ; |
L94F1: BCS - ; | L94F1: BCS - ; |
L94F3: LDA $0A ; | L94F3: LDA $0A ; |
L94F5: ADC #$E8 ; | L94F5: ADC #$E8 ; |
L94F7: STA $0A ; | L94F7: STA $0A ; |
L94F9: LDA $0B ; | L94F9: LDA $0B ; |
L94FB: ADC #$03 ; | L94FB: ADC #$03 ; |
L94FD: STA $0B ; | L94FD: STA $0B ; |
L94FF: LDA $0A ; | L94FF: LDA $0A ; |
L9501:* SEC ;Unused intro routine. Looks like the intro routines may--> | L9501:* SEC ;Unused intro routine. Looks like the intro routines may--> |
L9502:* SBC #$64 ;have had more complicated sprite control routines--> | L9502:* SBC #$64 ;have had more complicated sprite control routines--> |
L9504: INC $02 ;that it does now. | L9504: INC $02 ;that it does now. |
L9506: BCS - ; | L9506: BCS - ; |
L9508: DEC $0B ; | L9508: DEC $0B ; |
L950A: BPL -- ; | L950A: BPL -- ; |
L950C: ADC #$64 ; | L950C: ADC #$64 ; |
L950E: SEC ; | L950E: SEC ; |
L950F:* SBC #$0A ; | L950F:* SBC #$0A ; |
L9511: INC $01 ; | L9511: INC $01 ; |
L9513: BCS - ; | L9513: BCS - ; |
L9515: ADC #$0A ; | L9515: ADC #$0A ; |
L9517: STA $06 ; | L9517: STA $06 ; |
L9519: LDA $01 ; | L9519: LDA $01 ; |
L951B: JSR Amul16 ;($C2C5)Multiply by 16. | L951B: JSR Amul16 ;($C2C5)Multiply by 16. |
L951E: ORA $06 ; | L951E: ORA $06 ; |
L9520: STA $06 ; | L9520: STA $06 ; |
L9522: LDA $03 ; | L9522: LDA $03 ; |
L9524: JSR Amul16 ;($C2C5)Multiply by 16. | L9524: JSR Amul16 ;($C2C5)Multiply by 16. |
L9527: ORA $02 ; | L9527: ORA $02 ; |
L9529: STA $07 ; | L9529: STA $07 ; |
L952B: RTS ; | L952B: RTS ; |
| |
;Not used. | ;Not used. |
L952C: .byte $FF, $FF, $FF, $FF, $00, $00, $00, $00, $00, $00, $00, $00, $FF, $FF, $FF, $FF | L952C: .byte $FF, $FF, $FF, $FF, $00, $00, $00, $00, $00, $00, $00, $00, $FF, $FF, $FF, $FF |
L953C: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $00, $00, $00, $00 | L953C: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $00, $00, $00, $00 |
L954C: .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 | L954C: .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 |
L955C: .byte $00, $00, $00, $00 | L955C: .byte $00, $00, $00, $00 |
| |
;--------------------------------------[ Palette data ]--------------------------------------------- | ;--------------------------------------[ Palette data ]--------------------------------------------- |
| |
PaletteColorsPointerTable: | PaletteColorsPointerTable: |
L9560: .word Palette00 ;($9586) | L9560: .word Palette00 ;($9586) |
L9562: .word Palette01 ;($95AA) | L9562: .word Palette01 ;($95AA) |
L9564: .word Palette02 ;($95CE) | L9564: .word Palette02 ;($95CE) |
L9566: .word Palette03 ;($95F2) | L9566: .word Palette03 ;($95F2) |
L9568: .word Palette04 ;($9616) | L9568: .word Palette04 ;($9616) |
L956A: .word Palette05 ;($963A) | L956A: .word Palette05 ;($963A) |
L956C: .word Palette06 ;($965E) | L956C: .word Palette06 ;($965E) |
L956E: .word Palette07 ;($9682) | L956E: .word Palette07 ;($9682) |
L9570: .word Palette08 ;($96A6) | L9570: .word Palette08 ;($96A6) |
L9572: .word Palette09 ;($96CA) | L9572: .word Palette09 ;($96CA) |
L9574: .word Palette0A ;($96EE) | L9574: .word Palette0A ;($96EE) |
L9576: .word Palette0B ;($9712) | L9576: .word Palette0B ;($9712) |
L9578: .word Palette0C ;($9736) | L9578: .word Palette0C ;($9736) |
L957A: .word Palette0D ;($975A) | L957A: .word Palette0D ;($975A) |
L957C: .word Palette0E ;($977E) | L957C: .word Palette0E ;($977E) |
L957E: .word Palette0F ;($97A2) | L957E: .word Palette0F ;($97A2) |
L9580: .word Palette10 ;($97C6) | L9580: .word Palette10 ;($97C6) |
L9582: .word Palette11 ;($97EA) | L9582: .word Palette11 ;($97EA) |
L9584: .word Palette12 ;($97F2) | L9584: .word Palette12 ;($97F2) |
| |
Palette00: | Palette00: |
L9586: .byte $3F ;Upper byte of PPU palette adress. | L9586: .byte $3F ;Upper byte of PPU palette adress. |
L9587: .byte $00 ;Lower byte of PPU palette adress. | L9587: .byte $00 ;Lower byte of PPU palette adress. |
L9588: .byte $20 ;Palette data length. | L9588: .byte $20 ;Palette data length. |
;The following values are written to the background palette: | ;The following values are written to the background palette: |
L9589: .byte $0F, $28, $18, $08, $0F, $29, $1B, $1A, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F | L9589: .byte $0F, $28, $18, $08, $0F, $29, $1B, $1A, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F |
;The following values are written to the sprite palette: | ;The following values are written to the sprite palette: |
L9599: .byte $0F, $16, $1A, $27, $0F, $37, $3A, $1B, $0F, $17, $31, $37, $0F, $32, $22, $12 | L9599: .byte $0F, $16, $1A, $27, $0F, $37, $3A, $1B, $0F, $17, $31, $37, $0F, $32, $22, $12 |
| |
L95A9: .byte $00 ;End Palette01 info. | L95A9: .byte $00 ;End Palette01 info. |
| |
Palette01: | Palette01: |
L95AA: .byte $3F ;Upper byte of PPU palette adress. | L95AA: .byte $3F ;Upper byte of PPU palette adress. |
L95AB: .byte $00 ;Lower byte of PPU palette adress. | L95AB: .byte $00 ;Lower byte of PPU palette adress. |
L96AC: .byte $20 ;Palette data length. | L96AC: .byte $20 ;Palette data length. |
;The following values are written to the background palette: | ;The following values are written to the background palette: |
L95AD: .byte $0F, $28, $18, $08, $0F, $29, $1B, $1A, $0F, $35, $35, $04, $0F, $35, $14, $04 | L95AD: .byte $0F, $28, $18, $08, $0F, $29, $1B, $1A, $0F, $35, $35, $04, $0F, $35, $14, $04 |
;The following values are written to the sprite palette: | ;The following values are written to the sprite palette: |
L95BD: .byte $0F, $16, $1A, $27, $0F, $37, $3A, $1B, $0F, $17, $31, $37, $0F, $32, $22, $12 | L95BD: .byte $0F, $16, $1A, $27, $0F, $37, $3A, $1B, $0F, $17, $31, $37, $0F, $32, $22, $12 |
| |
L95CD: .byte $00 ;End Palette02 info. | L95CD: .byte $00 ;End Palette02 info. |
| |
Palette02: | Palette02: |
L95CE: .byte $3F ;Upper byte of PPU palette adress. | L95CE: .byte $3F ;Upper byte of PPU palette adress. |
L95CF: .byte $00 ;Lower byte of PPU palette adress. | L95CF: .byte $00 ;Lower byte of PPU palette adress. |
L95D0: .byte $20 ;Palette data length. | L95D0: .byte $20 ;Palette data length. |
;The following values are written to the background palette: | ;The following values are written to the background palette: |
L95D1: .byte $0F, $28, $18, $08, $0F, $29, $1B, $1A, $0F, $39, $39, $09, $0F, $39, $29, $09 | L95D1: .byte $0F, $28, $18, $08, $0F, $29, $1B, $1A, $0F, $39, $39, $09, $0F, $39, $29, $09 |
;The following values are written to the sprite palette: | ;The following values are written to the sprite palette: |
L95E1: .byte $0F, $16, $1A, $27, $0F, $37, $3A, $1B, $0F, $17, $31, $37, $0F, $32, $22, $12 | L95E1: .byte $0F, $16, $1A, $27, $0F, $37, $3A, $1B, $0F, $17, $31, $37, $0F, $32, $22, $12 |
| |
L95F1: .byte $00 ;End Palette03 info. | L95F1: .byte $00 ;End Palette03 info. |
| |
Palette03: | Palette03: |
L95F2: .byte $3F ;Upper byte of PPU palette adress. | L95F2: .byte $3F ;Upper byte of PPU palette adress. |
L95F3: .byte $00 ;Lower byte of PPU palette adress. | L95F3: .byte $00 ;Lower byte of PPU palette adress. |
L95F4: .byte $20 ;Palette data length. | L95F4: .byte $20 ;Palette data length. |
;The following values are written to the background palette: | ;The following values are written to the background palette: |
L95F5: .byte $0F, $28, $18, $08, $0F, $29, $1B, $1A, $0F, $36, $36, $06, $0F, $36, $15, $06 | L95F5: .byte $0F, $28, $18, $08, $0F, $29, $1B, $1A, $0F, $36, $36, $06, $0F, $36, $15, $06 |
;The following values are written to the sprite palette: | ;The following values are written to the sprite palette: |
L9605: .byte $0F, $16, $1A, $27, $0F, $37, $3A, $1B, $0F, $17, $31, $37, $0F, $32, $22, $12 | L9605: .byte $0F, $16, $1A, $27, $0F, $37, $3A, $1B, $0F, $17, $31, $37, $0F, $32, $22, $12 |
| |
L9615: .byte $00 ;End Palette04 info. | L9615: .byte $00 ;End Palette04 info. |
| |
Palette04: | Palette04: |
L9616: .byte $3F ;Upper byte of PPU palette adress. | L9616: .byte $3F ;Upper byte of PPU palette adress. |
L9617: .byte $00 ;Lower byte of PPU palette adress. | L9617: .byte $00 ;Lower byte of PPU palette adress. |
L9618: .byte $20 ;Palette data length. | L9618: .byte $20 ;Palette data length. |
;The following values are written to the background palette: | ;The following values are written to the background palette: |
L9619: .byte $0F, $28, $18, $08, $0F, $29, $1B, $1A, $0F, $27, $27, $12, $0F, $27, $21, $12 | L9619: .byte $0F, $28, $18, $08, $0F, $29, $1B, $1A, $0F, $27, $27, $12, $0F, $27, $21, $12 |
;The following values are written to the sprite palette: | ;The following values are written to the sprite palette: |
L9629: .byte $0F, $16, $1A, $27, $0F, $31, $20, $1B, $0F, $17, $31, $37, $0F, $32, $22, $12 | L9629: .byte $0F, $16, $1A, $27, $0F, $31, $20, $1B, $0F, $17, $31, $37, $0F, $32, $22, $12 |
| |
L9639: .byte $00 ;End Palette05 info. | L9639: .byte $00 ;End Palette05 info. |
| |
Palette05: | Palette05: |
L963A: .byte $3F ;Upper byte of PPU palette adress. | L963A: .byte $3F ;Upper byte of PPU palette adress. |
L963B: .byte $00 ;Lower byte of PPU palette adress. | L963B: .byte $00 ;Lower byte of PPU palette adress. |
L963C: .byte $20 ;Palette data length. | L963C: .byte $20 ;Palette data length. |
;The following values are written to the background palette: | ;The following values are written to the background palette: |
L963D: .byte $0F, $28, $18, $08, $0F, $29, $1B, $1A, $0F, $01, $01, $0F, $0F, $01, $0F, $0F | L963D: .byte $0F, $28, $18, $08, $0F, $29, $1B, $1A, $0F, $01, $01, $0F, $0F, $01, $0F, $0F |
;The following values are written to the sprite palette: | ;The following values are written to the sprite palette: |
L964D: .byte $0F, $16, $1A, $27, $0F, $37, $3A, $1B, $0F, $17, $31, $37, $0F, $32, $22, $12 | L964D: .byte $0F, $16, $1A, $27, $0F, $37, $3A, $1B, $0F, $17, $31, $37, $0F, $32, $22, $12 |
| |
L965D: .byte $00 ;End Palette06 info. | L965D: .byte $00 ;End Palette06 info. |
| |
Palette06: | Palette06: |
L965E: .byte $3F ;Upper byte of PPU palette adress. | L965E: .byte $3F ;Upper byte of PPU palette adress. |
L965F: .byte $00 ;Lower byte of PPU palette adress. | L965F: .byte $00 ;Lower byte of PPU palette adress. |
L9660: .byte $20 ;Palette data length. | L9660: .byte $20 ;Palette data length. |
;The following values are written to the background palette: | ;The following values are written to the background palette: |
L9661: .byte $0F, $28, $18, $08, $0F, $29, $1B, $1A, $0F, $01, $01, $0F, $0F, $01, $01, $0F | L9661: .byte $0F, $28, $18, $08, $0F, $29, $1B, $1A, $0F, $01, $01, $0F, $0F, $01, $01, $0F |
;The following values are written to the sprite palette: | ;The following values are written to the sprite palette: |
L9671: .byte $0F, $16, $1A, $27, $0F, $37, $3A, $1B, $0F, $17, $31, $37, $0F, $32, $22, $12 | L9671: .byte $0F, $16, $1A, $27, $0F, $37, $3A, $1B, $0F, $17, $31, $37, $0F, $32, $22, $12 |
| |
L9681: .byte $00 ;End Palette07 info. | L9681: .byte $00 ;End Palette07 info. |
| |
Palette07: | Palette07: |
L9682: .byte $3F ;Upper byte of PPU palette adress. | L9682: .byte $3F ;Upper byte of PPU palette adress. |
L9683: .byte $00 ;Lower byte of PPU palette adress. | L9683: .byte $00 ;Lower byte of PPU palette adress. |
L9684: .byte $20 ;Palette data length. | L9684: .byte $20 ;Palette data length. |
;The following values are written to the background palette: | ;The following values are written to the background palette: |
L9685: .byte $0F, $28, $18, $08, $0F, $29, $1B, $1A, $0F, $02, $02, $01, $0F, $02, $02, $01 | L9685: .byte $0F, $28, $18, $08, $0F, $29, $1B, $1A, $0F, $02, $02, $01, $0F, $02, $02, $01 |
;The following values are written to the sprite palette: | ;The following values are written to the sprite palette: |
L9695: .byte $0F, $16, $1A, $27, $0F, $37, $3A, $1B, $0F, $17, $31, $37, $0F, $32, $22, $12 | L9695: .byte $0F, $16, $1A, $27, $0F, $37, $3A, $1B, $0F, $17, $31, $37, $0F, $32, $22, $12 |
| |
L96A5: .byte $00 ;End Palette08 info. | L96A5: .byte $00 ;End Palette08 info. |
| |
Palette08: | Palette08: |
L96A6: .byte $3F ;Upper byte of PPU palette adress. | L96A6: .byte $3F ;Upper byte of PPU palette adress. |
L96A7: .byte $00 ;Lower byte of PPU palette adress. | L96A7: .byte $00 ;Lower byte of PPU palette adress. |
L96A8: .byte $20 ;Palette data length. | L96A8: .byte $20 ;Palette data length. |
;The following values are written to the background palette: | ;The following values are written to the background palette: |
L96A9: .byte $0F, $28, $18, $08, $0F, $29, $1B, $1A, $0F, $02, $02, $01, $0F, $02, $01, $01 | L96A9: .byte $0F, $28, $18, $08, $0F, $29, $1B, $1A, $0F, $02, $02, $01, $0F, $02, $01, $01 |
;The following values are written to the sprite palette: | ;The following values are written to the sprite palette: |
L96B9: .byte $0F, $16, $1A, $27, $0F, $37, $3A, $1B, $0F, $17, $31, $37, $0F, $32, $22, $12 | L96B9: .byte $0F, $16, $1A, $27, $0F, $37, $3A, $1B, $0F, $17, $31, $37, $0F, $32, $22, $12 |
| |
L96C9: .byte $00 ;End Palette09 info. | L96C9: .byte $00 ;End Palette09 info. |
| |
Palette09: | Palette09: |
L96CA: .byte $3F ;Upper byte of PPU palette adress. | L96CA: .byte $3F ;Upper byte of PPU palette adress. |
L96CB: .byte $00 ;Lower byte of PPU palette adress. | L96CB: .byte $00 ;Lower byte of PPU palette adress. |
L96CC: .byte $20 ;Palette data length. | L96CC: .byte $20 ;Palette data length. |
;The following values are written to the background palette: | ;The following values are written to the background palette: |
L96CD: .byte $0F, $28, $18, $08, $0F, $29, $1B, $1A, $0F, $12, $12, $02, $0F, $12, $12, $02 | L96CD: .byte $0F, $28, $18, $08, $0F, $29, $1B, $1A, $0F, $12, $12, $02, $0F, $12, $12, $02 |
;The following values are written to the sprite palette: | ;The following values are written to the sprite palette: |
L96DD: .byte $0F, $16, $1A, $27, $0F, $37, $3A, $1B, $0F, $17, $31, $37, $0F, $32, $22, $12 | L96DD: .byte $0F, $16, $1A, $27, $0F, $37, $3A, $1B, $0F, $17, $31, $37, $0F, $32, $22, $12 |
| |
L96ED: .byte $00 ;End Palette0A info. | L96ED: .byte $00 ;End Palette0A info. |
| |
Palette0A: | Palette0A: |
L96EE: .byte $3F ;Upper byte of PPU palette adress. | L96EE: .byte $3F ;Upper byte of PPU palette adress. |
L96EF: .byte $00 ;Lower byte of PPU palette adress. | L96EF: .byte $00 ;Lower byte of PPU palette adress. |
L96F0: .byte $20 ;Palette data length. | L96F0: .byte $20 ;Palette data length. |
;The following values are written to the background palette: | ;The following values are written to the background palette: |
L96F1: .byte $0F, $28, $18, $08, $0F, $29, $1B, $1A, $0F, $11, $11, $02, $0F, $11, $02, $02 | L96F1: .byte $0F, $28, $18, $08, $0F, $29, $1B, $1A, $0F, $11, $11, $02, $0F, $11, $02, $02 |
;The following values are written to the sprite palette: | ;The following values are written to the sprite palette: |
L9701: .byte $0F, $16, $1A, $27, $0F, $37, $3A, $1B, $0F, $17, $31, $37, $0F, $32, $22, $12 | L9701: .byte $0F, $16, $1A, $27, $0F, $37, $3A, $1B, $0F, $17, $31, $37, $0F, $32, $22, $12 |
| |
L9711: .byte $00 ;End Palette0B info. | L9711: .byte $00 ;End Palette0B info. |
| |
Palette0B: | Palette0B: |
L9712: .byte $3F ;Upper byte of PPU palette adress. | L9712: .byte $3F ;Upper byte of PPU palette adress. |
L9713: .byte $00 ;Lower byte of PPU palette adress. | L9713: .byte $00 ;Lower byte of PPU palette adress. |
L9714: .byte $20 ;Palette data length. | L9714: .byte $20 ;Palette data length. |
;The following values are written to the background palette: | ;The following values are written to the background palette: |
L9715: .byte $0F, $28, $18, $08, $0F, $29, $1B, $1A, $0F, $31, $31, $01, $0F, $31, $11, $01 | L9715: .byte $0F, $28, $18, $08, $0F, $29, $1B, $1A, $0F, $31, $31, $01, $0F, $31, $11, $01 |
;The following values are written to the sprite palette: | ;The following values are written to the sprite palette: |
L9716: .byte $0F, $16, $1A, $27, $0F, $37, $3A, $1B, $0F, $17, $31, $37, $0F, $32, $22, $12 | L9716: .byte $0F, $16, $1A, $27, $0F, $37, $3A, $1B, $0F, $17, $31, $37, $0F, $32, $22, $12 |
| |
L9735: .byte $00 ;End Palette0C info. | L9735: .byte $00 ;End Palette0C info. |
| |
Palette0C: | Palette0C: |
L9736: .byte $3F ;Upper byte of PPU palette adress. | L9736: .byte $3F ;Upper byte of PPU palette adress. |
L9737: .byte $00 ;Lower byte of PPU palette adress. | L9737: .byte $00 ;Lower byte of PPU palette adress. |
L9738: .byte $20 ;Palette data length. | L9738: .byte $20 ;Palette data length. |
;The following values are written to the background palette: | ;The following values are written to the background palette: |
L9739: .byte $0F, $28, $18, $08, $0F, $12, $30, $21, $0F, $27, $28, $29, $0F, $31, $31, $01 | L9739: .byte $0F, $28, $18, $08, $0F, $12, $30, $21, $0F, $27, $28, $29, $0F, $31, $31, $01 |
;The following values are written to the sprite palette: | ;The following values are written to the sprite palette: |
L9749: .byte $0F, $16, $2A, $27, $0F, $12, $30, $21, $0F, $27, $24, $2C, $0F, $15, $21, $38 | L9749: .byte $0F, $16, $2A, $27, $0F, $12, $30, $21, $0F, $27, $24, $2C, $0F, $15, $21, $38 |
| |
L9759: .byte $00 ;End Palette0D info. | L9759: .byte $00 ;End Palette0D info. |
| |
Palette0D: | Palette0D: |
L975A: .byte $3F ;Upper byte of PPU palette adress. | L975A: .byte $3F ;Upper byte of PPU palette adress. |
L975B: .byte $00 ;Lower byte of PPU palette adress. | L975B: .byte $00 ;Lower byte of PPU palette adress. |
L975C: .byte $20 ;Palette data length. | L975C: .byte $20 ;Palette data length. |
;The following values are written to the background palette: | ;The following values are written to the background palette: |
L975D: .byte $0F, $28, $18, $08, $0F, $29, $1B, $1A, $0F, $12, $12, $01, $0F, $12, $02, $01 | L975D: .byte $0F, $28, $18, $08, $0F, $29, $1B, $1A, $0F, $12, $12, $01, $0F, $12, $02, $01 |
;The following values are written to the sprite palette: | ;The following values are written to the sprite palette: |
L975E: .byte $0F, $16, $1A, $27, $0F, $37, $3A, $1B, $0F, $17, $31, $37, $0F, $32, $22, $12 | L975E: .byte $0F, $16, $1A, $27, $0F, $37, $3A, $1B, $0F, $17, $31, $37, $0F, $32, $22, $12 |
| |
L977D: .byte $00 ;End Palette0E info. | L977D: .byte $00 ;End Palette0E info. |
| |
Palette0E: | Palette0E: |
L977E: .byte $3F ;Upper byte of PPU palette adress. | L977E: .byte $3F ;Upper byte of PPU palette adress. |
L977F: .byte $00 ;Lower byte of PPU palette adress. | L977F: .byte $00 ;Lower byte of PPU palette adress. |
L9780: .byte $20 ;Palette data length. | L9780: .byte $20 ;Palette data length. |
;The following values are written to the background palette: | ;The following values are written to the background palette: |
L9781: .byte $0F, $28, $18, $08, $0F, $29, $1B, $1A, $0F, $02, $02, $0F, $0F, $02, $01, $0F | L9781: .byte $0F, $28, $18, $08, $0F, $29, $1B, $1A, $0F, $02, $02, $0F, $0F, $02, $01, $0F |
;The following values are written to the sprite palette: | ;The following values are written to the sprite palette: |
L9791: .byte $0F, $16, $1A, $27, $0F, $37, $3A, $1B, $0F, $17, $31, $37, $0F, $32, $22, $12 | L9791: .byte $0F, $16, $1A, $27, $0F, $37, $3A, $1B, $0F, $17, $31, $37, $0F, $32, $22, $12 |
| |
L97A1: .byte $00 ;End Palette0F info. | L97A1: .byte $00 ;End Palette0F info. |
| |
Palette0F: | Palette0F: |
L97A2: .byte $3F ;Upper byte of PPU palette adress. | L97A2: .byte $3F ;Upper byte of PPU palette adress. |
L97A3: .byte $00 ;Lower byte of PPU palette adress. | L97A3: .byte $00 ;Lower byte of PPU palette adress. |
L97A4: .byte $20 ;Palette data length. | L97A4: .byte $20 ;Palette data length. |
;The following values are written to the background palette: | ;The following values are written to the background palette: |
L97A5: .byte $0F, $28, $18, $08, $0F, $29, $1B, $1A, $0F, $01, $01, $0F, $0F, $01, $0F, $0F | L97A5: .byte $0F, $28, $18, $08, $0F, $29, $1B, $1A, $0F, $01, $01, $0F, $0F, $01, $0F, $0F |
;The following values are written to the sprite palette: | ;The following values are written to the sprite palette: |
L97B5: .byte $0F, $16, $1A, $27, $0F, $37, $3A, $1B, $0F, $17, $31, $37, $0F, $32, $22, $12 | L97B5: .byte $0F, $16, $1A, $27, $0F, $37, $3A, $1B, $0F, $17, $31, $37, $0F, $32, $22, $12 |
| |
L97C5: .byte $00 ;End Palette10 info. | L97C5: .byte $00 ;End Palette10 info. |
| |
Palette10: | Palette10: |
L97C6: .byte $3F ;Upper byte of PPU palette adress. | L97C6: .byte $3F ;Upper byte of PPU palette adress. |
L97C7: .byte $00 ;Lower byte of PPU palette adress. | L97C7: .byte $00 ;Lower byte of PPU palette adress. |
L97C8: .byte $20 ;Palette data length. | L97C8: .byte $20 ;Palette data length. |
;The following values are written to the background palette: | ;The following values are written to the background palette: |
L97C9: .byte $30, $28, $18, $08, $30, $29, $1B, $1A, $30, $30, $30, $30, $30, $30, $30, $30 | L97C9: .byte $30, $28, $18, $08, $30, $29, $1B, $1A, $30, $30, $30, $30, $30, $30, $30, $30 |
;The following values are written to the sprite palette: | ;The following values are written to the sprite palette: |
L97D9: .byte $30, $16, $1A, $27, $30, $37, $3A, $1B, $30, $17, $31, $37, $30, $32, $22, $12 | L97D9: .byte $30, $16, $1A, $27, $30, $37, $3A, $1B, $30, $17, $31, $37, $30, $32, $22, $12 |
| |
L97E9: .byte $00 ;End Palette11 info. | L97E9: .byte $00 ;End Palette11 info. |
| |
Palette11: | Palette11: |
L97EA: .byte $3F ;Upper byte of PPU palette adress. | L97EA: .byte $3F ;Upper byte of PPU palette adress. |
L97EB: .byte $00 ;Lower byte of PPU palette adress. | L97EB: .byte $00 ;Lower byte of PPU palette adress. |
L97EC: .byte $04 ;Palette data length. | L97EC: .byte $04 ;Palette data length. |
;The following values are written to the background palette: | ;The following values are written to the background palette: |
L97ED: .byte $0F, $30, $30, $21 | L97ED: .byte $0F, $30, $30, $21 |
| |
L98F1: .byte $00 ;End Palette12 info. | L98F1: .byte $00 ;End Palette12 info. |
| |
Palette12: | Palette12: |
L97F2: .byte $3F ;Upper byte of PPU palette adress. | L97F2: .byte $3F ;Upper byte of PPU palette adress. |
L97F3: .byte $00 ;Lower byte of PPU palette adress. | L97F3: .byte $00 ;Lower byte of PPU palette adress. |
L97F4: .byte $10 ;Palette data length. | L97F4: .byte $10 ;Palette data length. |
;The following values are written to the background palette: | ;The following values are written to the background palette: |
L97F5: .byte $0F, $30, $30, $0F, $0F, $2A, $2A, $21, $0F, $31, $31, $0F, $0F, $2A, $2A, $21 | L97F5: .byte $0F, $30, $30, $0F, $0F, $2A, $2A, $21, $0F, $31, $31, $0F, $0F, $2A, $2A, $21 |
| |
L9805: .byte $00 ;End Palette13 data. | L9805: .byte $00 ;End Palette13 data. |
| |
EndGamePal0B: | EndGamePal0B: |
L9806: .byte $3F ;Upper byte of PPU palette adress. | L9806: .byte $3F ;Upper byte of PPU palette adress. |
L9807: .byte $00 ;Lower byte of PPU palette adress. | L9807: .byte $00 ;Lower byte of PPU palette adress. |
L9808: .byte $10 ;Palette data length. | L9808: .byte $10 ;Palette data length. |
;The following values are written to the background palette: | ;The following values are written to the background palette: |
L9809: .byte $0F, $2C, $2C, $2C, $0F, $2C, $2C, $2C, $0F, $2C, $2C, $2C, $0F, $2C, $2C, $2C | L9809: .byte $0F, $2C, $2C, $2C, $0F, $2C, $2C, $2C, $0F, $2C, $2C, $2C, $0F, $2C, $2C, $2C |
| |
EndGamePal0C: | EndGamePal0C: |
L9819: .byte $3F ;Upper byte of PPU palette adress. | L9819: .byte $3F ;Upper byte of PPU palette adress. |
L981A: .byte $10 ;Lower byte of PPU palette adress. | L981A: .byte $10 ;Lower byte of PPU palette adress. |
L981B: .byte $50 ;Palette data length. | L981B: .byte $50 ;Palette data length. |
L981C: .byte $0F ;Repeat bit set. Fill sprite palette with #$0F. | L981C: .byte $0F ;Repeat bit set. Fill sprite palette with #$0F. |
| |
L981D: .byte $00 ;End EndGamePal0C data. | L981D: .byte $00 ;End EndGamePal0C data. |
| |
UpdateSpriteCoords: | UpdateSpriteCoords: |
L981E: LDA IntroSpr0XRun,X ;Load sprite run(sprite x component). | L981E: LDA IntroSpr0XRun,X ;Load sprite run(sprite x component). |
L9821: JSR CalcDisplacement ;($9871)Calculate sprite displacement in x direction. | L9821: JSR CalcDisplacement ;($9871)Calculate sprite displacement in x direction. |
L9824: LDY IntroSpr0XDir,X ;Get byte describing if sprite increasing or decreasing pos. | L9824: LDY IntroSpr0XDir,X ;Get byte describing if sprite increasing or decreasing pos. |
L9827: BPL + ; | L9827: BPL + ; |
| |
L9829: EOR #$FF ;If MSB is set, sprite is decreasing position. convert--> | L9829: EOR #$FF ;If MSB is set, sprite is decreasing position. convert--> |
L982B: CLC ;value in A (result from CalcDisplacement) to twos compliment. | L982B: CLC ;value in A (result from CalcDisplacement) to twos compliment. |
L982C: ADC #$01 ; | L982C: ADC #$01 ; |
| |
L982E:* CLC ; | L982E:* CLC ; |
L982F: ADC IntroSpr0XCoord,X ;Add change to sprite x coord. | L982F: ADC IntroSpr0XCoord,X ;Add change to sprite x coord. |
L9832: STA IntroSpr0XCoord,X ; | L9832: STA IntroSpr0XCoord,X ; |
L9835: SEC ; | L9835: SEC ; |
L9836: SBC IntroSpr0XChange,X ;Subtract total sprite movemnt value from current sprite x pos. | L9836: SBC IntroSpr0XChange,X ;Subtract total sprite movemnt value from current sprite x pos. |
L9839: PHP ;Transfer processor status to A. | L9839: PHP ;Transfer processor status to A. |
L983A: PLA ; | L983A: PLA ; |
L983B: EOR IntroSpr0XDir,X ;Eor carry bit with direction byte to see if sprite has--> | L983B: EOR IntroSpr0XDir,X ;Eor carry bit with direction byte to see if sprite has--> |
L983E: LSR ;reached its end point. | L983E: LSR ;reached its end point. |
L983F: BCC++ ;Branch if sprite has reached the end of x movement. | L983F: BCC++ ;Branch if sprite has reached the end of x movement. |
| |
L9841: LDA IntroSpr0YRise,X ;Load sprite rise(sprite y component). | L9841: LDA IntroSpr0YRise,X ;Load sprite rise(sprite y component). |
L9844: JSR CalcDisplacement ;($9871)Calculate sprite displacement in y direction. | L9844: JSR CalcDisplacement ;($9871)Calculate sprite displacement in y direction. |
L9847: LDY IntroSpr0YDir,X ;Get byte describing if sprite increasing or decreasing pos. | L9847: LDY IntroSpr0YDir,X ;Get byte describing if sprite increasing or decreasing pos. |
L984A: BPL + ; | L984A: BPL + ; |
| |
L984C: EOR #$FF ;If MSB is set, sprite is decreasing position. convert--> | L984C: EOR #$FF ;If MSB is set, sprite is decreasing position. convert--> |
L984E: CLC ;value in A (result from CalcDisplacement) to twos compliment. | L984E: CLC ;value in A (result from CalcDisplacement) to twos compliment. |
L984F: ADC #$01 ; | L984F: ADC #$01 ; |
| |
L9851:* CLC ; | L9851:* CLC ; |
L9852: ADC IntroSpr0YCoord,X ;Add change to sprite y coord. | L9852: ADC IntroSpr0YCoord,X ;Add change to sprite y coord. |
L9855: STA IntroSpr0YCoord,X ; | L9855: STA IntroSpr0YCoord,X ; |
L9858: SEC ; | L9858: SEC ; |
L9859: SBC IntroSpr0YChange,X ;Subtract total sprite movemnt value from current sprite y pos. | L9859: SBC IntroSpr0YChange,X ;Subtract total sprite movemnt value from current sprite y pos. |
L985C: PHP ;Transfer processor status to A. | L985C: PHP ;Transfer processor status to A. |
L985D: PLA ; | L985D: PLA ; |
L985E: EOR IntroSpr0YDir,X ;Eor carry bit with direction byte to see if sprite has--> | L985E: EOR IntroSpr0YDir,X ;Eor carry bit with direction byte to see if sprite has--> |
L9861: LSR ;reached its end point. | L9861: LSR ;reached its end point. |
L9862: BCS ++ ;Branch if sprite has not reached the end of y movement. | L9862: BCS ++ ;Branch if sprite has not reached the end of y movement. |
| |
L9864:* LDA IntroSpr0YChange,X ;After sprite has reached its final position, this code--> | L9864:* LDA IntroSpr0YChange,X ;After sprite has reached its final position, this code--> |
L9867: STA IntroSpr0YCoord,X ;explicitly writes final the x and y coords to to sprite--> | L9867: STA IntroSpr0YCoord,X ;explicitly writes final the x and y coords to to sprite--> |
L986A: LDA IntroSpr0XChange,X ;position addresses to make sure the sprites don't--> | L986A: LDA IntroSpr0XChange,X ;position addresses to make sure the sprites don't--> |
L986D: STA IntroSpr0XCoord,X ;overshoot their mark. | L986D: STA IntroSpr0XCoord,X ;overshoot their mark. |
L9870:* RTS ; | L9870:* RTS ; |
| |
CalcDisplacement: | CalcDisplacement: |
L9871: STA $04 ; | L9871: STA $04 ; |
L9873: LDA #$08 ;Time division. The higher the number, the slower the sprite. | L9873: LDA #$08 ;Time division. The higher the number, the slower the sprite. |
L9875: STA $00 ; | L9875: STA $00 ; |
L9877:* LSR $04 ; | L9877:* LSR $04 ; |
L9879: BCC + ; | L9879: BCC + ; |
L987B: LDA FrameCount ; | L987B: LDA FrameCount ; |
L987D: AND $00 ;Calculate the change in the sprite position by taking the--> | L987D: AND $00 ;Calculate the change in the sprite position by taking the--> |
L987F: BNE + ;value in a and dividing it by the time division. The time--> | L987F: BNE + ;value in a and dividing it by the time division. The time--> |
L9881: INC $04 ;time division in this case is #$08. | L9881: INC $04 ;time division in this case is #$08. |
L9883:* LSR $00 ; | L9883:* LSR $00 ; |
L9885: BNE -- ; | L9885: BNE -- ; |
L9887: LDA $04 ; | L9887: LDA $04 ; |
L9889: RTS ;Return A/time. | L9889: RTS ;Return A/time. |
| |
;This function decrements the y coordinate of the 40 intro star sprites. | ;This function decrements the y coordinate of the 40 intro star sprites. |
| |
DecSpriteYCoord: | DecSpriteYCoord: |
L988A: LDA TitleRoutine ; | L988A: LDA TitleRoutine ; |
L988C: CMP #$1D ; | L988C: CMP #$1D ; |
L988E: BCS ++ ;If the end game is playing, branch to exit. | L988E: BCS ++ ;If the end game is playing, branch to exit. |
L9890: LDA SpriteLoadPending ; | L9890: LDA SpriteLoadPending ; |
L9892: BEQ ++ ;If no sprite load is pending, branch to exit. | L9892: BEQ ++ ;If no sprite load is pending, branch to exit. |
L9894: LDA FrameCount ; | L9894: LDA FrameCount ; |
L9896: LSR ; | L9896: LSR ; |
L9897: BCS ++ ;If not on an odd numbered frame, branch to exit. | L9897: BCS ++ ;If not on an odd numbered frame, branch to exit. |
L9899: LDX #$9F ; | L9899: LDX #$9F ; |
L989B:* DEC IntroStarSprite00,X ;Decrement y coord of the intro star sprites. | L989B:* DEC IntroStarSprite00,X ;Decrement y coord of the intro star sprites. |
L989E: DEC Sprite18RAM,X ;Decrement y coord of 40 sprites. | L989E: DEC Sprite18RAM,X ;Decrement y coord of 40 sprites. |
L98A1: DEX ; | L98A1: DEX ; |
L98A2: DEX ; | L98A2: DEX ; |
L98A3: DEX ;Move to next sprite. | L98A3: DEX ;Move to next sprite. |
L98A4: DEX ; | L98A4: DEX ; |
L98A5: CPX #$FF ; | L98A5: CPX #$FF ; |
L98A7: BNE - ;Loop 40 times. | L98A7: BNE - ;Loop 40 times. |
L98A9: LDA #$00 ; | L98A9: LDA #$00 ; |
L98AB: STA SpriteLoadPending ;Sprite RAM load complete. | L98AB: STA SpriteLoadPending ;Sprite RAM load complete. |
L98AD:* RTS ; | L98AD:* RTS ; |
| |
LoadStarSprites: | LoadStarSprites: |
L98AE: LDY #$9F ; | L98AE: LDY #$9F ; |
L98B0:* LDA IntroStarSprite00,Y ; | L98B0:* LDA IntroStarSprite00,Y ; |
L98B3: STA Sprite18RAM,Y ;Store RAM contents of $6E00 thru $6E9F --> | L98B3: STA Sprite18RAM,Y ;Store RAM contents of $6E00 thru $6E9F --> |
L98B6: DEY ;in sprite RAM at locations $0260 thru $02FF. | L98B6: DEY ;in sprite RAM at locations $0260 thru $02FF. |
L98B7: CPY #$FF ; | L98B7: CPY #$FF ; |
L98B9: BNE - ; | L98B9: BNE - ; |
L98BB: LDA #$00 ; | L98BB: LDA #$00 ; |
L98BD: STA SpriteLoadPending ;Set $C8 to #$00. | L98BD: STA SpriteLoadPending ;Set $C8 to #$00. |
L98BF: RTS ; | L98BF: RTS ; |
| |
;The following values are loaded into RAM $6E00 thru $6E9F in InitBank0 | ;The following values are loaded into RAM $6E00 thru $6E9F in InitBank0 |
| |
IntroStarsData: | IntroStarsData: |
L98C0: .byte $73, $CC, $22, $F2, $48, $CD, $63, $EE, $2A, $CE, $A2, $DC, $36, $CF, $E2, $C6 | L98C0: .byte $73, $CC, $22, $F2, $48, $CD, $63, $EE, $2A, $CE, $A2, $DC, $36, $CF, $E2, $C6 |
L98D0: .byte $11, $CC, $23, $B7, $53, $CD, $63, $A0, $BB, $CE, $A2, $9A, $0F, $CF, $E2, $8B | L98D0: .byte $11, $CC, $23, $B7, $53, $CD, $63, $A0, $BB, $CE, $A2, $9A, $0F, $CF, $E2, $8B |
L98E0: .byte $85, $CC, $E2, $70, $9D, $CD, $A3, $6B, $A0, $CE, $63, $58, $63, $CF, $23, $4F | L98E0: .byte $85, $CC, $E2, $70, $9D, $CD, $A3, $6B, $A0, $CE, $63, $58, $63, $CF, $23, $4F |
L98F0: .byte $0A, $CC, $22, $39, $1F, $CD, $23, $2A, $7F, $CE, $A3, $1F, $56, $CF, $A2, $03 | L98F0: .byte $0A, $CC, $22, $39, $1F, $CD, $23, $2A, $7F, $CE, $A3, $1F, $56, $CF, $A2, $03 |
L9900: .byte $4D, $CC, $E3, $AF, $3E, $CD, $63, $2B, $61, $CE, $E2, $4F, $29, $CF, $62, $6F | L9900: .byte $4D, $CC, $E3, $AF, $3E, $CD, $63, $2B, $61, $CE, $E2, $4F, $29, $CF, $62, $6F |
L9910: .byte $8A, $CC, $23, $82, $98, $CD, $A3, $07, $AE, $CE, $E2, $CA, $B6, $CF, $63, $E3 | L9910: .byte $8A, $CC, $23, $82, $98, $CD, $A3, $07, $AE, $CE, $E2, $CA, $B6, $CF, $63, $E3 |
L9920: .byte $0F, $CC, $62, $18, $1F, $CD, $22, $38, $22, $CE, $A3, $5F, $53, $CF, $E2, $78 | L9920: .byte $0F, $CC, $62, $18, $1F, $CD, $22, $38, $22, $CE, $A3, $5F, $53, $CF, $E2, $78 |
L9930: .byte $48, $CC, $E3, $94, $37, $CD, $A3, $B3, $6F, $CE, $A3, $DC, $78, $CF, $22, $FE | L9930: .byte $48, $CC, $E3, $94, $37, $CD, $A3, $B3, $6F, $CE, $A3, $DC, $78, $CF, $22, $FE |
L9940: .byte $83, $CC, $62, $0B, $9F, $CD, $23, $26, $A0, $CE, $62, $39, $BD, $CF, $A2, $1C | L9940: .byte $83, $CC, $62, $0B, $9F, $CD, $23, $26, $A0, $CE, $62, $39, $BD, $CF, $A2, $1C |
L9950: .byte $07, $CC, $E3, $A4, $87, $CD, $63, $5D, $5A, $CE, $62, $4F, $38, $CF, $23, $85 | L9950: .byte $07, $CC, $E3, $A4, $87, $CD, $63, $5D, $5A, $CE, $62, $4F, $38, $CF, $23, $85 |
| |
;Not used. | ;Not used. |
L9960: .byte $3F, $00, $20, $02, $20, $1B, $3A, $02, $20, $21, $01, $02, $2C, $30, $27, $02 | L9960: .byte $3F, $00, $20, $02, $20, $1B, $3A, $02, $20, $21, $01, $02, $2C, $30, $27, $02 |
L9970: .byte $26, $31, $17, $02, $16, $19, $27, $02, $16, $20, $27, $02, $16, $20, $11, $02 | L9970: .byte $26, $31, $17, $02, $16, $19, $27, $02, $16, $20, $27, $02, $16, $20, $11, $02 |
L9980: .byte $01, $20, $21, $00 | L9980: .byte $01, $20, $21, $00 |
| |
L9984: .byte $21 ;PPU address high byte. | L9984: .byte $21 ;PPU address high byte. |
L9985: .byte $8C ;PPU address low byte. | L9985: .byte $8C ;PPU address low byte. |
L9986: .byte $05 ;PPU string length. | L9986: .byte $05 ;PPU string length. |
; 'S T A R T' | ; 'S T A R T' |
L9987: .byte $1C, $1D, $0A, $1B, $1D | L9987: .byte $1C, $1D, $0A, $1B, $1D |
| |
L998C: .byte $21 ;PPU address high byte. | L998C: .byte $21 ;PPU address high byte. |
L998D: .byte $EC ;PPU address low byte. | L998D: .byte $EC ;PPU address low byte. |
L998E: .byte $08 ;PPU string length. | L998E: .byte $08 ;PPU string length. |
; 'C O N T I N U E' | ; 'C O N T I N U E' |
L998F: .byte $0C, $18, $17, $1D, $12, $17, $1E, $0E | L998F: .byte $0C, $18, $17, $1D, $12, $17, $1E, $0E |
| |
L9997: .byte $00 ;End PPU string write | L9997: .byte $00 ;End PPU string write |
| |
;The following pointer table is used to find the start | ;The following pointer table is used to find the start |
| |
PasswordRowTbl: | PasswordRowTbl: |
L9998: .word PasswordRow0 ;($99A2) | L9998: .word PasswordRow0 ;($99A2) |
L999A: .word PasswordRow1 ;($99AF) | L999A: .word PasswordRow1 ;($99AF) |
L999C: .word PasswordRow2 ;($99BC) | L999C: .word PasswordRow2 ;($99BC) |
L999E: .word PasswordRow3 ;($99C9) | L999E: .word PasswordRow3 ;($99C9) |
L99A0: .word PasswordRow4 ;($99D6) | L99A0: .word PasswordRow4 ;($99D6) |
| |
;The following data is used to load the name table With the password characters: | ;The following data is used to load the name table With the password characters: |
PasswordRow0: | PasswordRow0: |
L99A2: .byte $00 ;0 | L99A2: .byte $00 ;0 |
L99A3: .byte $01 ;1 | L99A3: .byte $01 ;1 |
L99A4: .byte $02 ;2 | L99A4: .byte $02 ;2 |
L99A5: .byte $03 ;3 | L99A5: .byte $03 ;3 |
L99A6: .byte $04 ;4 | L99A6: .byte $04 ;4 |
L99A7: .byte $05 ;5 | L99A7: .byte $05 ;5 |
L99A8: .byte $06 ;6 | L99A8: .byte $06 ;6 |
L99A9: .byte $07 ;7 | L99A9: .byte $07 ;7 |
L99AA: .byte $08 ;8 | L99AA: .byte $08 ;8 |
L99AB: .byte $09 ;9 | L99AB: .byte $09 ;9 |
L99AC: .byte $0A ;A | L99AC: .byte $0A ;A |
L99AD: .byte $0B ;B | L99AD: .byte $0B ;B |
L99AE: .byte $0C ;C | L99AE: .byte $0C ;C |
| |
PasswordRow1: | PasswordRow1: |
L99AF: .byte $0D ;D | L99AF: .byte $0D ;D |
L99B0: .byte $0E ;E | L99B0: .byte $0E ;E |
L99B1: .byte $0F ;F | L99B1: .byte $0F ;F |
L99B2: .byte $10 ;G | L99B2: .byte $10 ;G |
L99B3: .byte $11 ;H | L99B3: .byte $11 ;H |
L99B4: .byte $12 ;I | L99B4: .byte $12 ;I |
L99B5: .byte $13 ;J | L99B5: .byte $13 ;J |
L99B6: .byte $14 ;K | L99B6: .byte $14 ;K |
L99B7: .byte $15 ;L | L99B7: .byte $15 ;L |
L99B8: .byte $16 ;M | L99B8: .byte $16 ;M |
L99B9: .byte $17 ;N | L99B9: .byte $17 ;N |
L99BA: .byte $18 ;O | L99BA: .byte $18 ;O |
L99BB: .byte $19 ;P | L99BB: .byte $19 ;P |
| |
PasswordRow2: | PasswordRow2: |
L99BC: .byte $1A ;Q | L99BC: .byte $1A ;Q |
L99BD: .byte $1B ;R | L99BD: .byte $1B ;R |
L99BE: .byte $1C ;S | L99BE: .byte $1C ;S |
L99BF: .byte $1D ;T | L99BF: .byte $1D ;T |
L99C0: .byte $1E ;U | L99C0: .byte $1E ;U |
L99C1: .byte $1F ;V | L99C1: .byte $1F ;V |
L99C2: .byte $20 ;W | L99C2: .byte $20 ;W |
L99C3: .byte $21 ;X | L99C3: .byte $21 ;X |
L99C4: .byte $22 ;Y | L99C4: .byte $22 ;Y |
L99C5: .byte $23 ;Z | L99C5: .byte $23 ;Z |
L99C6: .byte $24 ;a | L99C6: .byte $24 ;a |
L99C7: .byte $25 ;b | L99C7: .byte $25 ;b |
L99C8: .byte $26 ;c | L99C8: .byte $26 ;c |
| |
PasswordRow3: | PasswordRow3: |
L99C9: .byte $27 ;d | L99C9: .byte $27 ;d |
L99CA: .byte $28 ;e | L99CA: .byte $28 ;e |
L99CB: .byte $29 ;f | L99CB: .byte $29 ;f |
L99CC: .byte $2A ;g | L99CC: .byte $2A ;g |
L99CD: .byte $2B ;h | L99CD: .byte $2B ;h |
L99CE: .byte $2C ;i | L99CE: .byte $2C ;i |
L99CF: .byte $2D ;j | L99CF: .byte $2D ;j |
L99D0: .byte $2E ;k | L99D0: .byte $2E ;k |
L99D1: .byte $2F ;l | L99D1: .byte $2F ;l |
L99D2: .byte $30 ;m | L99D2: .byte $30 ;m |
L99D3: .byte $31 ;n | L99D3: .byte $31 ;n |
L99D4: .byte $32 ;o | L99D4: .byte $32 ;o |
L99D5: .byte $33 ;p | L99D5: .byte $33 ;p |
| |
PasswordRow4: | PasswordRow4: |
L99D6: .byte $34 ;q | L99D6: .byte $34 ;q |
L99D7: .byte $35 ;r | L99D7: .byte $35 ;r |
L99D8: .byte $36 ;s | L99D8: .byte $36 ;s |
L99D9: .byte $37 ;t | L99D9: .byte $37 ;t |
L99DA: .byte $38 ;u | L99DA: .byte $38 ;u |
L99DB: .byte $39 ;v | L99DB: .byte $39 ;v |
L99DC: .byte $3A ;w | L99DC: .byte $3A ;w |
L99DD: .byte $3B ;x | L99DD: .byte $3B ;x |
L99DE: .byte $3C ;y | L99DE: .byte $3C ;y |
L99DF: .byte $3D ;z | L99DF: .byte $3D ;z |
L99E0: .byte $3E ;? | L99E0: .byte $3E ;? |
L99E1: .byte $3F ;- | L99E1: .byte $3F ;- |
L99E2: .byte $FF ;Space | L99E2: .byte $FF ;Space |
| |
;Writes 'PASSWORD PLEASE' on name table 0 in row $2080 (5th row from top). | ;Writes 'PASSWORD PLEASE' on name table 0 in row $2080 (5th row from top). |
L99E3: .byte $20 ;PPU address high byte. | L99E3: .byte $20 ;PPU address high byte. |
L99E4: .byte $88 ;PPU address low byte. | L99E4: .byte $88 ;PPU address low byte. |
L99E5: .byte $10 ;PPU string length. | L99E5: .byte $10 ;PPU string length. |
; 'P A S S _ W O R D _ P L E A S E' | ; 'P A S S _ W O R D _ P L E A S E' |
L99E6: .byte $19, $0A, $1C, $1C, $FF, $20, $18, $1B, $0D, $FF, $19, $15, $0E, $0A, $1C, $0E | L99E6: .byte $19, $0A, $1C, $1C, $FF, $20, $18, $1B, $0D, $FF, $19, $15, $0E, $0A, $1C, $0E |
| |
;Clears attribute table 0 starting at address $23C0. | ;Clears attribute table 0 starting at address $23C0. |
L99F6: .byte $23 ;PPU address high byte. | L99F6: .byte $23 ;PPU address high byte. |
L99F7: .byte $C0 ;PPU address low byte. | L99F7: .byte $C0 ;PPU address low byte. |
L99F8: .byte $50 ;PPU string length. | L99F8: .byte $50 ;PPU string length. |
L99F9: .byte $00 ;Repeat bit set. Repeats entry 16 times. | L99F9: .byte $00 ;Repeat bit set. Repeats entry 16 times. |
| |
;Writes to attribute table 0 starting at address $23D0. | ;Writes to attribute table 0 starting at address $23D0. |
L99FA: .byte $23 ;PPU address high byte. | L99FA: .byte $23 ;PPU address high byte. |
L99FB: .byte $D0 ;PPU address low byte. | L99FB: .byte $D0 ;PPU address low byte. |
L99FC: .byte $48 ;PPU string length. | L99FC: .byte $48 ;PPU string length. |
L99FD: .byte $55 ;Repeat bit set. Repeats entry 8 times. | L99FD: .byte $55 ;Repeat bit set. Repeats entry 8 times. |
| |
;Writes to attribute table 0 starting at address $23D8. | ;Writes to attribute table 0 starting at address $23D8. |
L99FE: .byte $23 ;PPU address high byte. | L99FE: .byte $23 ;PPU address high byte. |
L99FF: .byte $D8 ;PPU address low byte. | L99FF: .byte $D8 ;PPU address low byte. |
L9A00: .byte $60 ;PPU string length. | L9A00: .byte $60 ;PPU string length. |
L9A01: .byte $FF ;Repeat bit set. Repeats entry 32 times. | L9A01: .byte $FF ;Repeat bit set. Repeats entry 32 times. |
| |
;Writes to attribute table 0 starting at address $23DA. | ;Writes to attribute table 0 starting at address $23DA. |
L9A02: .byte $23 ;PPU address high byte. | L9A02: .byte $23 ;PPU address high byte. |
L9A03: .byte $DA ;PPU address low byte. | L9A03: .byte $DA ;PPU address low byte. |
L9A04: .byte $44 ;PPU string length. | L9A04: .byte $44 ;PPU string length. |
L9A05: .byte $F0 ;Repeat bit set. Repeats entry 4 times. | L9A05: .byte $F0 ;Repeat bit set. Repeats entry 4 times. |
| |
L9A06: .byte $00 ;End PPU string write. | L9A06: .byte $00 ;End PPU string write. |
| |
;----------------------------------------[ Ending routines ]----------------------------------------- | ;----------------------------------------[ Ending routines ]----------------------------------------- |
;The following routine is accessed via the NMI routine every frame. | ;The following routine is accessed via the NMI routine every frame. |
NMIScreenWrite: | NMIScreenWrite: |
L9A07: LDA TitleRoutine ; | L9A07: LDA TitleRoutine ; |
L9A09: CMP #$1D ;If titleRoutine not at end game, exit. | L9A09: CMP #$1D ;If titleRoutine not at end game, exit. |
L9A0B: BCC Exit100 ; | L9A0B: BCC Exit100 ; |
L9A0D: JSR LoadCredits ;($9C45)Display end credits on screen. | L9A0D: JSR LoadCredits ;($9C45)Display end credits on screen. |
L9A10: LDA EndMsgWrite ; | L9A10: LDA EndMsgWrite ; |
L9A12: BEQ + ;If not time to write end message, branch | L9A12: BEQ + ;If not time to write end message, branch |
L9A14: CMP #$05 ; | L9A14: CMP #$05 ; |
L9A16: BCS + ;If end message is finished being written, branch | L9A16: BCS + ;If end message is finished being written, branch |
L9A18: ASL ; | L9A18: ASL ; |
L9A19: TAY ; | L9A19: TAY ; |
L9A1A: LDX EndMessageStringTbl0-2,Y ;Writes the end message on name table 0 | L9A1A: LDX EndMessageStringTbl0-2,Y ;Writes the end message on name table 0 |
L9A1D: LDA EndMessageStringTbl0-1,Y ; | L9A1D: LDA EndMessageStringTbl0-1,Y ; |
L9A20: TAY ; | L9A20: TAY ; |
L9A21: JSR PreparePPUProcess_ ;($C20E)Prepare to write to PPU. | L9A21: JSR PreparePPUProcess_ ;($C20E)Prepare to write to PPU. |
L9A24:* LDA HideShowEndMsg ; | L9A24:* LDA HideShowEndMsg ; |
L9A26: BEQ Exit100 ;If not time to erase end message, branch | L9A26: BEQ Exit100 ;If not time to erase end message, branch |
L9A28: CMP #$05 ; | L9A28: CMP #$05 ; |
L9A2A: BCS Exit100 ;If end message is finished being erased, branch | L9A2A: BCS Exit100 ;If end message is finished being erased, branch |
L9A2C: ASL ; | L9A2C: ASL ; |
L9A2D: TAY ; | L9A2D: TAY ; |
L9A2E: LDX EndMessageStringTbl1-2,Y ;Erases the end message on name table 0 | L9A2E: LDX EndMessageStringTbl1-2,Y ;Erases the end message on name table 0 |
L9A31: LDA EndMessageStringTbl1-1,Y ; | L9A31: LDA EndMessageStringTbl1-1,Y ; |
L9A34: TAY ; | L9A34: TAY ; |
L9A35: JMP PreparePPUProcess_ ;($C20E)Prepare to write to PPU. | L9A35: JMP PreparePPUProcess_ ;($C20E)Prepare to write to PPU. |
| |
Exit100: | Exit100: |
L9A38: RTS ;Exit from above and below routines. | L9A38: RTS ;Exit from above and below routines. |
| |
Restart: | Restart: |
L9A39: LDA Joy1Status ; | L9A39: LDA Joy1Status ; |
L9A3B: AND #$10 ;If start has not been pressed, branch to exit. | L9A3B: AND #$10 ;If start has not been pressed, branch to exit. |
L9A3D: BEQ Exit100 ; | L9A3D: BEQ Exit100 ; |
L9A3F: LDY #$11 ; | L9A3F: LDY #$11 ; |
L9A41: LDA #$00 ; | L9A41: LDA #$00 ; |
L9A43:* STA PasswordByte00,Y ;Erase PasswordByte00 thru PasswordByte11. | L9A43:* STA PasswordByte00,Y ;Erase PasswordByte00 thru PasswordByte11. |
L9A46: DEY ; | L9A46: DEY ; |
L9A47: BPL - ; | L9A47: BPL - ; |
L9A49: INY ;Y = #$00. | L9A49: INY ;Y = #$00. |
L9A4A:* STA UniqueItemHistory,Y ; | L9A4A:* STA UniqueItemHistory,Y ; |
L9A4D: INY ;Erase Unique item history. | L9A4D: INY ;Erase Unique item history. |
L9A4E: BNE - ; | L9A4E: BNE - ; |
L9A50: LDA SamusGear ; | L9A50: LDA SamusGear ; |
L9A53: AND #$10 ; | L9A53: AND #$10 ; |
L9A55: BEQ + ;If Samus does not have Maru Mari, branch.--> | L9A55: BEQ + ;If Samus does not have Maru Mari, branch.--> |
L9A57: LDA #$01 ;Else load Maru Mari data into PasswordByte00. | L9A57: LDA #$01 ;Else load Maru Mari data into PasswordByte00. |
L9A59: STA PasswordByte00 ; | L9A59: STA PasswordByte00 ; |
L9A5C:* LDA SamusGear ; | L9A5C:* LDA SamusGear ; |
L9A5F: AND #$01 ; | L9A5F: AND #$01 ; |
L9A61: BEQ + ;If Samus does not have bombs, branch.--> | L9A61: BEQ + ;If Samus does not have bombs, branch.--> |
L9A63: LDA PasswordByte00 ;Else load bomb data into PasswordByte00. | L9A63: LDA PasswordByte00 ;Else load bomb data into PasswordByte00. |
L9A66: ORA #$40 ; | L9A66: ORA #$40 ; |
L9A68: STA PasswordByte00 ; | L9A68: STA PasswordByte00 ; |
L9A6B:* LDA SamusGear ; | L9A6B:* LDA SamusGear ; |
L9A6E: AND #$20 ; | L9A6E: AND #$20 ; |
L9A70: BEQ + ;If Samus does not have varia suit, branch.--> | L9A70: BEQ + ;If Samus does not have varia suit, branch.--> |
L9A72: LDA #$08 ;Else load varia suit data into PasswordByte01. | L9A72: LDA #$08 ;Else load varia suit data into PasswordByte01. |
L9A74: STA PasswordByte01 ; | L9A74: STA PasswordByte01 ; |
L9A77:* LDA SamusGear ; | L9A77:* LDA SamusGear ; |
L9A7A: AND #$02 ; | L9A7A: AND #$02 ; |
L9A7C: BEQ + ;If Samus does not have high jump, branch.--> | L9A7C: BEQ + ;If Samus does not have high jump, branch.--> |
L9A7E: LDA #$01 ;Else load high jump data into PasswordByte03. | L9A7E: LDA #$01 ;Else load high jump data into PasswordByte03. |
L9A80: STA PasswordByte03 ; | L9A80: STA PasswordByte03 ; |
L9A83:* LDA SamusGear ; | L9A83:* LDA SamusGear ; |
L9A86: AND #$10 ;If Samus does not have Maru Mari, branch.--> | L9A86: AND #$10 ;If Samus does not have Maru Mari, branch.--> |
L9A88: BEQ + ;Else load screw attack data into PasswordByte03.--> | L9A88: BEQ + ;Else load screw attack data into PasswordByte03.--> |
L9A8A: LDA PasswordByte03 ;A programmer error? Should check for screw--> | L9A8A: LDA PasswordByte03 ;A programmer error? Should check for screw--> |
L9A8D: ORA #$04 ;attack data. | L9A8D: ORA #$04 ;attack data. |
L9A8F: STA PasswordByte03 ; | L9A8F: STA PasswordByte03 ; |
L9A92:* LDA SamusGear ; | L9A92:* LDA SamusGear ; |
L9A95: STA PasswordByte09 ;Store Samus gear data in PasswordByte09. | L9A95: STA PasswordByte09 ;Store Samus gear data in PasswordByte09. |
L9A98: LDA #$00 ; | L9A98: LDA #$00 ; |
L9A9A: LDY JustInBailey ; | L9A9A: LDY JustInBailey ; |
L9A9D: BEQ + ;If Samus is wearing suit, branch. Else--> | L9A9D: BEQ + ;If Samus is wearing suit, branch. Else--> |
L9A9F: LDA #$80 ;load suitless Samus data into PasswordByte08. | L9A9F: LDA #$80 ;load suitless Samus data into PasswordByte08. |
L9AA1:* STA PasswordByte08 ; | L9AA1:* STA PasswordByte08 ; |
L9AA4: JMP InitializeGame ;($92D4)Clear RAM to restart game at beginning. | L9AA4: JMP InitializeGame ;($92D4)Clear RAM to restart game at beginning. |
| |
EndGame: | EndGame: |
L9AA7: JSR LoadEndStarSprites ;($9EAA)Load stars in end scene onto screen. | L9AA7: JSR LoadEndStarSprites ;($9EAA)Load stars in end scene onto screen. |
L9AAA: LDA IsCredits ;Skips palette change when rolling credits. | L9AAA: LDA IsCredits ;Skips palette change when rolling credits. |
L9AAC: BNE + ; | L9AAC: BNE + ; |
L9AAE: LDA FrameCount ; | L9AAE: LDA FrameCount ; |
L9AB0: AND #$0F ;Changes star palettes every 16th frame. | L9AB0: AND #$0F ;Changes star palettes every 16th frame. |
L9AB2: BNE + ; | L9AB2: BNE + ; |
L9AB4: INC PalDataPending ; | L9AB4: INC PalDataPending ; |
L9AB6: LDA PalDataPending ;Reset palette data to #$01 after it--> | L9AB6: LDA PalDataPending ;Reset palette data to #$01 after it--> |
L9AB8: CMP #$09 ;reaches #$09. | L9AB8: CMP #$09 ;reaches #$09. |
L9ABA: BNE + ; | L9ABA: BNE + ; |
L9ABC: LDA #$01 ; | L9ABC: LDA #$01 ; |
L9ABE: STA PalDataPending ; | L9ABE: STA PalDataPending ; |
L9AC0:* LDA RoomPtr ;RoomPtr used in end of game to determine--> | L9AC0:* LDA RoomPtr ;RoomPtr used in end of game to determine--> |
L9AC2: JSR ChooseRoutine ;($C27C)which subroutine to run below. | L9AC2: JSR ChooseRoutine ;($C27C)which subroutine to run below. |
| |
L9AC5: .word LoadEndGFX ;($9AD5)Load end GFX to pattern tables. | L9AC5: .word LoadEndGFX ;($9AD5)Load end GFX to pattern tables. |
L9AC7: .word ShowEndSamus ;($9B1C)Show Samus and end message. | L9AC7: .word ShowEndSamus ;($9B1C)Show Samus and end message. |
L9AC9: .word EndSamusFlash ;($9B34)Samus flashes and changes. | L9AC9: .word EndSamusFlash ;($9B34)Samus flashes and changes. |
L9ACB: .word SamusWave ;($9B93)Samus waving in ending if suitless. | L9ACB: .word SamusWave ;($9B93)Samus waving in ending if suitless. |
L9ACD: .word EndFadeOut ;($9BCD)Fade out Samus in ending. | L9ACD: .word EndFadeOut ;($9BCD)Fade out Samus in ending. |
L9ACF: .word RollCredits ;($9BFC)Rolls ending credits. | L9ACF: .word RollCredits ;($9BFC)Rolls ending credits. |
L9AD1: .word Restart ;($9A39)Starts at beginning after game completed. | L9AD1: .word Restart ;($9A39)Starts at beginning after game completed. |
L9AD3: .word ExitSub ;($C45C)Rts. | L9AD3: .word ExitSub ;($C45C)Rts. |
| |
LoadEndGFX: | LoadEndGFX: |
L9AD5: JSR ClearAll ;($909F)Turn off screen, erase sprites and nametables. | L9AD5: JSR ClearAll ;($909F)Turn off screen, erase sprites and nametables. |
L9AD8: JSR InitEndGFX ;($C5D0)Prepare to load end GFX. | L9AD8: JSR InitEndGFX ;($C5D0)Prepare to load end GFX. |
L9ADB: LDA #$04 ; | L9ADB: LDA #$04 ; |
L9ADD: LDY JustInBailey ;Checks if game was played as suitless--> | L9ADD: LDY JustInBailey ;Checks if game was played as suitless--> |
L9AE0: BNE + ;Samus. If so, branch. | L9AE0: BNE + ;Samus. If so, branch. |
L9AE2: LDA #$00 ;Loads SpritePointerIndex with #$00(suit on). | L9AE2: LDA #$00 ;Loads SpritePointerIndex with #$00(suit on). |
L9AE4:* STA EndingType ; | L9AE4:* STA EndingType ; |
L9AE7: ASL ;Loads SpritePointerIndex with #$08(suitless). | L9AE7: ASL ;Loads SpritePointerIndex with #$08(suitless). |
L9AE8: STA SpritePointerIndex ; | L9AE8: STA SpritePointerIndex ; |
L9AEA: LDX #$52 ;Loads the screen where Samus stands on--> | L9AEA: LDX #$52 ;Loads the screen where Samus stands on--> |
L9AEC: LDY #$A0 ;the surface of the planet in end of game. | L9AEC: LDY #$A0 ;the surface of the planet in end of game. |
L9AEE: JSR PreparePPUProcess_ ;($C20E)Prepare to write to PPU. | L9AEE: JSR PreparePPUProcess_ ;($C20E)Prepare to write to PPU. |
L9AF1: JSR NmiOn ;($C487)Turn on non-maskable interrupt. | L9AF1: JSR NmiOn ;($C487)Turn on non-maskable interrupt. |
L9AF4: LDA #$20 ;Initiate end game music. | L9AF4: LDA #$20 ;Initiate end game music. |
L9AF6: STA MultiSFXFlag ; | L9AF6: STA MultiSFXFlag ; |
L9AF9: LDA #$60 ;Loads Timer3 with a delay of 960 frames--> | L9AF9: LDA #$60 ;Loads Timer3 with a delay of 960 frames--> |
L9AFB: STA Timer3 ;(16 seconds). | L9AFB: STA Timer3 ;(16 seconds). |
L9AFD: LDA #$36 ;#$36/#$03 = #$12. Number of sprites--> | L9AFD: LDA #$36 ;#$36/#$03 = #$12. Number of sprites--> |
L9AFF: STA SpriteByteCounter ;used to draw end graphic of Samus. | L9AFF: STA SpriteByteCounter ;used to draw end graphic of Samus. |
L9B01: LDA #$00 ; | L9B01: LDA #$00 ; |
L9B03: STA SpriteAttribByte ; | L9B03: STA SpriteAttribByte ; |
L9B05: STA ColorCntIndex ; | L9B05: STA ColorCntIndex ; |
L9B07: STA IsCredits ;The following values are--> | L9B07: STA IsCredits ;The following values are--> |
L9B09: STA EndMsgWrite ;initialized to #$00. | L9B09: STA EndMsgWrite ;initialized to #$00. |
L9B0B: STA HideShowEndMsg ; | L9B0B: STA HideShowEndMsg ; |
L9B0D: STA CreditPageNumber ; | L9B0D: STA CreditPageNumber ; |
L9B0F: LDA #$01 ; | L9B0F: LDA #$01 ; |
L9B11: STA PalDataPending ;Change palette. | L9B11: STA PalDataPending ;Change palette. |
L9B13: LDA #$08 ; | L9B13: LDA #$08 ; |
L9B15: STA ClrChangeCounter ;Initialize ClrChangeCounter with #$08. | L9B15: STA ClrChangeCounter ;Initialize ClrChangeCounter with #$08. |
L9B17: INC RoomPtr ; | L9B17: INC RoomPtr ; |
L9B19: JMP ScreenOn ;($C447)Turn screen on. | L9B19: JMP ScreenOn ;($C447)Turn screen on. |
| |
ShowEndSamus: | ShowEndSamus: |
L9B1C: JSR LoadEndSamusSprites ;($9C9A)Load end image of Samus. | L9B1C: JSR LoadEndSamusSprites ;($9C9A)Load end image of Samus. |
L9B1F: LDA Timer3 ;Once 960 frames (16 seconds) have expired,--> | L9B1F: LDA Timer3 ;Once 960 frames (16 seconds) have expired,--> |
L9B21: BNE + ;Move to EndSamusFlash routine. | L9B21: BNE + ;Move to EndSamusFlash routine. |
L9B23: INC RoomPtr ; | L9B23: INC RoomPtr ; |
L9B25: RTS ; | L9B25: RTS ; |
| |
L9B26:* CMP #$50 ;After 160 frames have past--> | L9B26:* CMP #$50 ;After 160 frames have past--> |
L9B28: BNE + ;(2.6 seconds), write end message. | L9B28: BNE + ;(2.6 seconds), write end message. |
L9B2A: INC EndMsgWrite ; | L9B2A: INC EndMsgWrite ; |
L9B2C: RTS ; | L9B2C: RTS ; |
L9B2D:* CMP #$01 ;After 950 frames have past--> | L9B2D:* CMP #$01 ;After 950 frames have past--> |
L9B2F: BNE + ;(15.8 seconds), erase end message. | L9B2F: BNE + ;(15.8 seconds), erase end message. |
L9B31: INC HideShowEndMsg ; | L9B31: INC HideShowEndMsg ; |
L9B33:* RTS ; | L9B33:* RTS ; |
| |
EndSamusFlash: | EndSamusFlash: |
L9B34: LDA FrameCount ;If FrameCount not divisible by 32, branch. | L9B34: LDA FrameCount ;If FrameCount not divisible by 32, branch. |
L9B36: AND #$1F ; | L9B36: AND #$1F ; |
L9B38: BNE +++ ; | L9B38: BNE +++ ; |
L9B3A: INC ColorCntIndex ;Every 32 frame, increment the ColorCntInex--> | L9B3A: INC ColorCntIndex ;Every 32 frame, increment the ColorCntInex--> |
L9B3C: LDA ColorCntIndex ;value. Flashing Samus lasts for 512--> | L9B3C: LDA ColorCntIndex ;value. Flashing Samus lasts for 512--> |
L9B3E: CMP #$08 ;frames (8.5 seconds). | L9B3E: CMP #$08 ;frames (8.5 seconds). |
L9B40: BNE + ; | L9B40: BNE + ; |
L9B42: JSR ChooseEnding ;($CAF5)Choose which Samus ending to show. | L9B42: JSR ChooseEnding ;($CAF5)Choose which Samus ending to show. |
L9B45: JSR CalculatePassword ;($8C7A)Calculate game password. | L9B45: JSR CalculatePassword ;($8C7A)Calculate game password. |
L9B48: LDA EndingType ; | L9B48: LDA EndingType ; |
L9B4B: ASL ;When EndSamusFlash routine is half way--> | L9B4B: ASL ;When EndSamusFlash routine is half way--> |
L9B4C: STA SpritePointerIndex ;done, this code will calculate the--> | L9B4C: STA SpritePointerIndex ;done, this code will calculate the--> |
L9B4E: LDA #$36 ;password and choose the proper ending. | L9B4E: LDA #$36 ;password and choose the proper ending. |
L9B50: STA SpriteByteCounter ; | L9B50: STA SpriteByteCounter ; |
L9B52:* CMP #$10 ; | L9B52:* CMP #$10 ; |
L9B54: BNE ++ ;Once flashing Samus is compete, set Timer3--> | L9B54: BNE ++ ;Once flashing Samus is compete, set Timer3--> |
L9B56: STA Timer3 ;for a 160 frame(2.6 seconds) delay. | L9B56: STA Timer3 ;for a 160 frame(2.6 seconds) delay. |
L9B58: LDY #$00 ; | L9B58: LDY #$00 ; |
L9B5A: LDA EndingType ; | L9B5A: LDA EndingType ; |
L9B5D: CMP #$04 ;If one of the suitless Samus endings,--> | L9B5D: CMP #$04 ;If one of the suitless Samus endings,--> |
L9B5F: BCC + ;increment sprite color for proper--> | L9B5F: BCC + ;increment sprite color for proper--> |
L9B61: INY ;color to be displayed and increment--> | L9B61: INY ;color to be displayed and increment--> |
L9B62:* STY SpriteAttribByte ;RoomPtr and erase the sprites. | L9B62:* STY SpriteAttribByte ;RoomPtr and erase the sprites. |
L9B64: INC RoomPtr ; | L9B64: INC RoomPtr ; |
L9B66: JMP EraseAllSprites ;($C1A3)Clear all sprites off the screen. | L9B66: JMP EraseAllSprites ;($C1A3)Clear all sprites off the screen. |
L9B69:* DEC ClrChangeCounter ;Decrement ClrChangeCounter. | L9B69:* DEC ClrChangeCounter ;Decrement ClrChangeCounter. |
L9B6B: BNE + ; | L9B6B: BNE + ; |
L9B6D: LDY ColorCntIndex ; | L9B6D: LDY ColorCntIndex ; |
L9B6F: LDA PalChangeTable,Y ;When ClrChangeCounter=#$00, fetch new--> | L9B6F: LDA PalChangeTable,Y ;When ClrChangeCounter=#$00, fetch new--> |
L9B72: STA ClrChangeCounter ;ClrChangeCounter value. and increment--> | L9B72: STA ClrChangeCounter ;ClrChangeCounter value. and increment--> |
L9B74: INC SpriteAttribByte ;sprite color. | L9B74: INC SpriteAttribByte ;sprite color. |
L9B76: LDA SpriteAttribByte ; | L9B76: LDA SpriteAttribByte ; |
L9B78: CMP #$03 ; | L9B78: CMP #$03 ; |
L9B7A: BNE + ; | L9B7A: BNE + ; |
L9B7C: LDA #$00 ;If sprite color=#$03, set sprite--> | L9B7C: LDA #$00 ;If sprite color=#$03, set sprite--> |
L9B7E: STA SpriteAttribByte ;color to #$00. | L9B7E: STA SpriteAttribByte ;color to #$00. |
L9B80:* JMP LoadEndSamusSprites ;($9C9A)Load end image of Samus. | L9B80:* JMP LoadEndSamusSprites ;($9C9A)Load end image of Samus. |
| |
;The following table is used by the above routine to load ClrChangeCounter. ClrChangeCounter | ;The following table is used by the above routine to load ClrChangeCounter. ClrChangeCounter |
;then slows down again. | ;then slows down again. |
PalChangeTable: | PalChangeTable: |
L9B83: .byte $08, $07, $06, $05, $04, $03, $02, $01, $01, $02, $03, $04, $05, $06, $07, $08 | L9B83: .byte $08, $07, $06, $05, $04, $03, $02, $01, $01, $02, $03, $04, $05, $06, $07, $08 |
| |
SamusWave: | SamusWave: |
L9B93: LDA Timer3 ;If 160 frame timer from previous routine--> | L9B93: LDA Timer3 ;If 160 frame timer from previous routine--> |
L9B95: BNE + ;has not expired, branch(waves for 2.6 seconds). | L9B95: BNE + ;has not expired, branch(waves for 2.6 seconds). |
L9B97: LDA #$10 ; | L9B97: LDA #$10 ; |
L9B99: STA Timer3 ;Load Timer3 with 160 frame delay--> | L9B99: STA Timer3 ;Load Timer3 with 160 frame delay--> |
L9B9B: LDA #$08 ;(2.6 seconds). | L9B9B: LDA #$08 ;(2.6 seconds). |
L9B9D: STA PalDataPending ;Change palette | L9B9D: STA PalDataPending ;Change palette |
L9B9F: INC RoomPtr ;Increment RoomPtr | L9B9F: INC RoomPtr ;Increment RoomPtr |
L9BA1: RTS ; | L9BA1: RTS ; |
| |
L9BA2:* LDA EndingType ;If suitless Samus--> | L9BA2:* LDA EndingType ;If suitless Samus--> |
L9BA5: CMP #$04 ;ending, branch. | L9BA5: CMP #$04 ;ending, branch. |
L9BA7: BCS + ; | L9BA7: BCS + ; |
L9BA9: JMP LoadEndSamusSprites ;($9C9A) | L9BA9: JMP LoadEndSamusSprites ;($9C9A) |
L9BAC:* SBC #$04 ;If jumpsuit Samus ending,--> | L9BAC:* SBC #$04 ;If jumpsuit Samus ending,--> |
L9BAE: ASL ;WaveSpritePointer=#$00, if bikini--> | L9BAE: ASL ;WaveSpritePointer=#$00, if bikini--> |
L9BAF: ASL ;Samus ending, WaveSpritePointer=#$04. | L9BAF: ASL ;Samus ending, WaveSpritePointer=#$04. |
L9BB0: STA WaveSpritePointer ; | L9BB0: STA WaveSpritePointer ; |
L9BB2: LDA FrameCount ; | L9BB2: LDA FrameCount ; |
L9BB4: AND #$08 ;Every eigth frame count, change wave sprite data. | L9BB4: AND #$08 ;Every eigth frame count, change wave sprite data. |
L9BB6: BNE + ; | L9BB6: BNE + ; |
L9BB8: LDY #$10 ;Load WaveSpriteCounter with #$10(16 bytes of--> | L9BB8: LDY #$10 ;Load WaveSpriteCounter with #$10(16 bytes of--> |
L9BBA: STY WaveSpriteCounter ;sprite data to be loaded). | L9BBA: STY WaveSpriteCounter ;sprite data to be loaded). |
L9BBC: BNE ++ ;Branch always. | L9BBC: BNE ++ ;Branch always. |
L9BBE:* INC WaveSpritePointer ; | L9BBE:* INC WaveSpritePointer ; |
L9BC0: INC WaveSpritePointer ;When bit 3 of FrameCount is not set,--> | L9BC0: INC WaveSpritePointer ;When bit 3 of FrameCount is not set,--> |
L9BC2: LDY #$10 ;Samus' waving hand is down. | L9BC2: LDY #$10 ;Samus' waving hand is down. |
L9BC4: STY WaveSpriteCounter ; | L9BC4: STY WaveSpriteCounter ; |
L9BC6:* LDA #$2D ;Load SpriteByteCounter in preparation for--> | L9BC6:* LDA #$2D ;Load SpriteByteCounter in preparation for--> |
L9BC8: STA SpriteByteCounter ;refreshing Samus sprite bytes. | L9BC8: STA SpriteByteCounter ;refreshing Samus sprite bytes. |
L9BCA: JMP LoadWaveSprites ;($9C7F)Load sprites for waving Samus. | L9BCA: JMP LoadWaveSprites ;($9C7F)Load sprites for waving Samus. |
| |
EndFadeOut: | EndFadeOut: |
L9BCD: LDA Timer3 ;If 160 frame delay from last routine has not--> | L9BCD: LDA Timer3 ;If 160 frame delay from last routine has not--> |
L9BCF: BNE ++ ;yet expired, branch. | L9BCF: BNE ++ ;yet expired, branch. |
L9BD1: LDA IsCredits ; | L9BD1: LDA IsCredits ; |
L9BD3: BNE + ;Branch always. | L9BD3: BNE + ;Branch always. |
| |
L9BD5: LDA #$08 ;*This code does not appear to be used. | L9BD5: LDA #$08 ;*This code does not appear to be used. |
L9BD7: STA PalDataPending ;*Change palette. | L9BD7: STA PalDataPending ;*Change palette. |
L9BD9: INC IsCredits ;*Increment IsCredits. | L9BD9: INC IsCredits ;*Increment IsCredits. |
| |
L9BDB:* LDA FrameCount ; | L9BDB:* LDA FrameCount ; |
L9BDD: AND #$07 ;Every seventh frame, increment the palette info--> | L9BDD: AND #$07 ;Every seventh frame, increment the palette info--> |
L9BDF: BNE + ;If PalDataPending is not equal to #$0C, keep--> | L9BDF: BNE + ;If PalDataPending is not equal to #$0C, keep--> |
L9BE1: INC PalDataPending ;incrementing every seventh frame until it does.--> | L9BE1: INC PalDataPending ;incrementing every seventh frame until it does.--> |
L9BE3: LDA PalDataPending ;This creates the fade out effect. | L9BE3: LDA PalDataPending ;This creates the fade out effect. |
L9BE5: CMP #$0C ; | L9BE5: CMP #$0C ; |
L9BE7: BNE + ; | L9BE7: BNE + ; |
L9BE9: LDA #$10 ;After fadeout complete, load Timer3 with 160 frame--> | L9BE9: LDA #$10 ;After fadeout complete, load Timer3 with 160 frame--> |
L9BEB: STA Timer3 ;delay(2.6 seconds) and increment RoomPtr. | L9BEB: STA Timer3 ;delay(2.6 seconds) and increment RoomPtr. |
L9BED: INC RoomPtr ; | L9BED: INC RoomPtr ; |
L9BEF:* LDA EndingType ; | L9BEF:* LDA EndingType ; |
L9BF2: CMP #$04 ;If suitless Samus ending, load hand wave sprites,--> | L9BF2: CMP #$04 ;If suitless Samus ending, load hand wave sprites,--> |
L9BF4: BCS + ;else just load regular Samus sprites | L9BF4: BCS + ;else just load regular Samus sprites |
L9BF6: JMP LoadEndSamusSprites ;($9C9A)Load end image of Samus. | L9BF6: JMP LoadEndSamusSprites ;($9C9A)Load end image of Samus. |
L9BF9:* JMP LoadWaveSprites ;($9C7F)Load sprites for waving Samus. | L9BF9:* JMP LoadWaveSprites ;($9C7F)Load sprites for waving Samus. |
| |
RollCredits: | RollCredits: |
L9BFC: LDA Timer3 ;If 160 frame timer delay from previous--> | L9BFC: LDA Timer3 ;If 160 frame timer delay from previous--> |
L9BFE: BEQ + ;routine has expired, branch. | L9BFE: BEQ + ;routine has expired, branch. |
L9C00: CMP #$02 ;If not 20 frames left in Timer3, branch to exit. | L9C00: CMP #$02 ;If not 20 frames left in Timer3, branch to exit. |
L9C02: BNE ++++ ; | L9C02: BNE ++++ ; |
L9C04: JSR ScreenOff ;($C439)When 20 frames left in Timer3,--> | L9C04: JSR ScreenOff ;($C439)When 20 frames left in Timer3,--> |
L9C07: JSR ClearNameTable0 ;($C16D)clear name table 0 and sprites.--> | L9C07: JSR ClearNameTable0 ;($C16D)clear name table 0 and sprites.--> |
L9C0A: JSR EraseAllSprites ;($C1A3)prepares screen for credits. | L9C0A: JSR EraseAllSprites ;($C1A3)prepares screen for credits. |
L9C0D: LDA #$0D ; | L9C0D: LDA #$0D ; |
L9C0F: STA PalDataPending ;Change to proper palette for credits. | L9C0F: STA PalDataPending ;Change to proper palette for credits. |
L9C11: JSR ScreenOn ;($C447)Turn screen on. | L9C11: JSR ScreenOn ;($C447)Turn screen on. |
L9C14: JMP WaitNMIPass_ ;($C43F)Wait for NMI to end. | L9C14: JMP WaitNMIPass_ ;($C43F)Wait for NMI to end. |
L9C17:* LDA CreditPageNumber ;If first page of credits has not started to--> | L9C17:* LDA CreditPageNumber ;If first page of credits has not started to--> |
L9C19: BNE + ;roll, start it now, else branch. | L9C19: BNE + ;roll, start it now, else branch. |
L9C1B: INC CreditPageNumber ; | L9C1B: INC CreditPageNumber ; |
L9C1D:* CMP #$06 ;If not at last page of credits, branch. | L9C1D:* CMP #$06 ;If not at last page of credits, branch. |
L9C1F: BNE + ; | L9C1F: BNE + ; |
L9C21: LDA ScrollY ; | L9C21: LDA ScrollY ; |
L9C23: CMP #$88 ;If last page of credits is not finished--> | L9C23: CMP #$88 ;If last page of credits is not finished--> |
L9C25: BCC + ;scrolling, branch. Else increment to next--> | L9C25: BCC + ;scrolling, branch. Else increment to next--> |
L9C27: INC RoomPtr ;routine. | L9C27: INC RoomPtr ;routine. |
L9C29: RTS ; | L9C29: RTS ; |
| |
L9C2A:* LDA FrameCount ;credits scroll up one position every 3 frames. | L9C2A:* LDA FrameCount ;credits scroll up one position every 3 frames. |
L9C2C: AND #$03 ; | L9C2C: AND #$03 ; |
L9C2E: BNE + ;Ready to scroll? If not, branch. | L9C2E: BNE + ;Ready to scroll? If not, branch. |
L9C30: INC ScrollY ; | L9C30: INC ScrollY ; |
L9C32: LDA ScrollY ;Load ScrollY and check it to see if its--> | L9C32: LDA ScrollY ;Load ScrollY and check it to see if its--> |
L9C34: CMP #$F0 ;position is at the very bottom on name table.--> | L9C34: CMP #$F0 ;position is at the very bottom on name table.--> |
L9C36: BNE + ;if not, branch. | L9C36: BNE + ;if not, branch. |
L9C38: INC CreditPageNumber ; | L9C38: INC CreditPageNumber ; |
L9C3A: LDA #$00 ; | L9C3A: LDA #$00 ; |
L9C3C: STA ScrollY ;When Scrolly is at bottom of the name table,--> | L9C3C: STA ScrollY ;When Scrolly is at bottom of the name table,--> |
L9C3E: LDA PPUCNT0ZP ;Swap to next name table(0 or 2) and increment--> | L9C3E: LDA PPUCNT0ZP ;Swap to next name table(0 or 2) and increment--> |
L9C40: EOR #$02 ;CreditPageNumber. | L9C40: EOR #$02 ;CreditPageNumber. |
L9C42: STA PPUCNT0ZP ; | L9C42: STA PPUCNT0ZP ; |
L9C44:* RTS | L9C44:* RTS |
| |
;The following routine is checked every frame and is accessed via the NMIScreenWrite routine. | ;The following routine is checked every frame and is accessed via the NMIScreenWrite routine. |
| |
LoadCredits: | LoadCredits: |
L9C45: LDY CreditPageNumber ; | L9C45: LDY CreditPageNumber ; |
L9C47: BEQ ++++ ;If credits are not being displayed, exit. | L9C47: BEQ ++++ ;If credits are not being displayed, exit. |
L9C49: CPY #$07 ; | L9C49: CPY #$07 ; |
L9C4B: BCS ++++ ;If CreditPageNumber is higher than #$06, exit. | L9C4B: BCS ++++ ;If CreditPageNumber is higher than #$06, exit. |
L9C4D: LDX #$00 ; | L9C4D: LDX #$00 ; |
L9C4F: LDA ScrollY ;If ScrollY is less than #$80 (128), branch. | L9C4F: LDA ScrollY ;If ScrollY is less than #$80 (128), branch. |
L9C51: BPL + ; | L9C51: BPL + ; |
L9C53: INX ;Load X with sign bit (#$01) and remove--> | L9C53: INX ;Load X with sign bit (#$01) and remove--> |
L9C54: SEC ;sign bit from A. | L9C54: SEC ;sign bit from A. |
L9C55: SBC #$80 ; | L9C55: SBC #$80 ; |
L9C57:* CMP #$04 ; | L9C57:* CMP #$04 ; |
L9C59: BCS +++ ;If ScrollY is not #$04, branch to exit. | L9C59: BCS +++ ;If ScrollY is not #$04, branch to exit. |
L9C5B: STA $01 ;Store #$00, #$01, #$02 or #$03 in address $01. | L9C5B: STA $01 ;Store #$00, #$01, #$02 or #$03 in address $01. |
L9C5D: DEY ;Y now contains CreditPageNumber - 1. | L9C5D: DEY ;Y now contains CreditPageNumber - 1. |
L9C5E: TXA ; | L9C5E: TXA ; |
L9C5F: BNE + ;If ScrollY is #$80 (128) or greater, branch. | L9C5F: BNE + ;If ScrollY is #$80 (128) or greater, branch. |
L9C61: DEY ;Y now contains CreditPageNumber - 2. | L9C61: DEY ;Y now contains CreditPageNumber - 2. |
L9C62: BMI +++ ;If on Credit page less than two , branch to exit. | L9C62: BMI +++ ;If on Credit page less than two , branch to exit. |
L9C64: TYA ; | L9C64: TYA ; |
L9C65: ASL ;Start with CreditPageNumber - 2--> | L9C65: ASL ;Start with CreditPageNumber - 2--> |
L9C66: ASL ;* 8 + 4 + $01 * 2. | L9C66: ASL ;* 8 + 4 + $01 * 2. |
L9C67: ASL ;This formula is used when ScrollY = 0, 1, 2 and 3. | L9C67: ASL ;This formula is used when ScrollY = 0, 1, 2 and 3. |
L9C68: ADC #$04 ;Result is index to find proper credits to load. | L9C68: ADC #$04 ;Result is index to find proper credits to load. |
L9C6A: BNE ++ ;Branch always. | L9C6A: BNE ++ ;Branch always. |
L9C6C:* TYA ; | L9C6C:* TYA ; |
L9C6D: ASL ;Start with CreditPageNumber - 1--> | L9C6D: ASL ;Start with CreditPageNumber - 1--> |
L9C6E: ASL ;* 8 + $01 * 2. | L9C6E: ASL ;* 8 + $01 * 2. |
L9C6F: ASL ;This formula is used when ScrollY = 128,--> | L9C6F: ASL ;This formula is used when ScrollY = 128,--> |
L9C70:* ADC $01 ;129, 130 and 131. | L9C70:* ADC $01 ;129, 130 and 131. |
L9C72: ASL ;Result is index to find proper credits to load. | L9C72: ASL ;Result is index to find proper credits to load. |
L9C73: TAY ; | L9C73: TAY ; |
L9C74: LDX CreditsPointerTbl,Y ;Base is $A291. Lower byte of pointer to PPU string. | L9C74: LDX CreditsPointerTbl,Y ;Base is $A291. Lower byte of pointer to PPU string. |
L9C77: LDA CreditsPointerTbl+1,Y ;Upper byte of pointer to PPU string. | L9C77: LDA CreditsPointerTbl+1,Y ;Upper byte of pointer to PPU string. |
L9C7A: TAY ; | L9C7A: TAY ; |
L9C7B: JMP PreparePPUProcess_ ;($C20E)Prepare to write to PPU. | L9C7B: JMP PreparePPUProcess_ ;($C20E)Prepare to write to PPU. |
L9C7E:* RTS ; | L9C7E:* RTS ; |
| |
LoadWaveSprites: | LoadWaveSprites: |
L9C7F: LDX WaveSpritePointer ; | L9C7F: LDX WaveSpritePointer ; |
L9C81: LDA WavePointerTable,X ; | L9C81: LDA WavePointerTable,X ; |
L9C84: STA $00 ;Load pointer to wave sprite data--> | L9C84: STA $00 ;Load pointer to wave sprite data--> |
L9C86: LDA WavePointerTable+1,X ;into addresses $00 and $01. | L9C86: LDA WavePointerTable+1,X ;into addresses $00 and $01. |
L9C89: STA $01 ; | L9C89: STA $01 ; |
L9C8B: LDX #$20 ;Offset for sprite RAM load. | L9C8B: LDX #$20 ;Offset for sprite RAM load. |
L9C8D: LDY #$00 ; | L9C8D: LDY #$00 ; |
L9C8F:* LDA ($00),Y ; | L9C8F:* LDA ($00),Y ; |
L9C91: STA Sprite00RAM,X ;Load wave sprites into sprite RAM starting at--> | L9C91: STA Sprite00RAM,X ;Load wave sprites into sprite RAM starting at--> |
L9C94: INX ;location $220 (Sprite08RAM). | L9C94: INX ;location $220 (Sprite08RAM). |
L9C95: INY ; | L9C95: INY ; |
L9C96: CPY WaveSpriteCounter ;Check to see if sprite RAM load complete.--> | L9C96: CPY WaveSpriteCounter ;Check to see if sprite RAM load complete.--> |
L9C98: BNE - ;If not, branch and load another byte. | L9C98: BNE - ;If not, branch and load another byte. |
| |
LoadEndSamusSprites: | LoadEndSamusSprites: |
L9C9A: LDX #$30 ;Index for loading Samus sprite data into sprite RAM. | L9C9A: LDX #$30 ;Index for loading Samus sprite data into sprite RAM. |
L9C9C: LDY SpritePointerIndex ; | L9C9C: LDY SpritePointerIndex ; |
L9C9E: LDA EndSamusAddrTbl,Y ;Base is $9D5A. | L9C9E: LDA EndSamusAddrTbl,Y ;Base is $9D5A. |
L9CA1: STA $00 ;Load $00 and $01 with pointer to the sprite--> | L9CA1: STA $00 ;Load $00 and $01 with pointer to the sprite--> |
L9CA3: LDA EndSamusAddrTbl+1,Y ;data that shows Samus at the end of the game. | L9CA3: LDA EndSamusAddrTbl+1,Y ;data that shows Samus at the end of the game. |
L9CA6: STA $01 ; | L9CA6: STA $01 ; |
L9CA8: LDY #$00 ; | L9CA8: LDY #$00 ; |
L9CAA:* LDA ($00),Y ;Load sprite data starting at Sprite0CRAM. | L9CAA:* LDA ($00),Y ;Load sprite data starting at Sprite0CRAM. |
L9CAC: STA Sprite00RAM,X ;Load sprite Y-coord. | L9CAC: STA Sprite00RAM,X ;Load sprite Y-coord. |
L9CAF: INX ; | L9CAF: INX ; |
L9CB0: INY ;Increment X and Y. | L9CB0: INY ;Increment X and Y. |
L9CB1: LDA ($00),Y ; | L9CB1: LDA ($00),Y ; |
L9CB3: BPL + ;If sprite pattern byte MSB cleared, branch. | L9CB3: BPL + ;If sprite pattern byte MSB cleared, branch. |
L9CB5: AND #$7F ; | L9CB5: AND #$7F ; |
L9CB7: STA Sprite00RAM,X ;Remove MSB and write sprite pattern data--> | L9CB7: STA Sprite00RAM,X ;Remove MSB and write sprite pattern data--> |
L9CBA: LDA SpriteAttribByte ;to sprite RAM. | L9CBA: LDA SpriteAttribByte ;to sprite RAM. |
L9CBC: EOR #$40 ; | L9CBC: EOR #$40 ; |
L9CBE: BNE ++ ; | L9CBE: BNE ++ ; |
L9CC0:* STA Sprite00RAM,X ;Writes sprite pattern byte to--> | L9CC0:* STA Sprite00RAM,X ;Writes sprite pattern byte to--> |
L9CC3: LDA SpriteAttribByte ;sprite RAM if its MSB is not set. | L9CC3: LDA SpriteAttribByte ;sprite RAM if its MSB is not set. |
L9CC5:* INX ; | L9CC5:* INX ; |
L9CC6: STA Sprite00RAM,X ;Writes sprite attribute byte to sprite RAM. | L9CC6: STA Sprite00RAM,X ;Writes sprite attribute byte to sprite RAM. |
L9CC9: INY ; | L9CC9: INY ; |
L9CCA: INX ;Increment X and Y. | L9CCA: INX ;Increment X and Y. |
L9CCB: LDA ($00),Y ; | L9CCB: LDA ($00),Y ; |
L9CCD: STA Sprite00RAM,X ;Load sprite X-coord. | L9CCD: STA Sprite00RAM,X ;Load sprite X-coord. |
L9CD0: INY ; | L9CD0: INY ; |
L9CD1: INX ;Increment X and Y. | L9CD1: INX ;Increment X and Y. |
L9CD2: CPY SpriteByteCounter ; | L9CD2: CPY SpriteByteCounter ; |
L9CD4: BNE --- ;Repeat until sprite load is complete. | L9CD4: BNE --- ;Repeat until sprite load is complete. |
L9CD6: LDA RoomPtr ; | L9CD6: LDA RoomPtr ; |
L9CD8: CMP #$02 ;If not running the EndSamusFlash routine, branch. | L9CD8: CMP #$02 ;If not running the EndSamusFlash routine, branch. |
L9CDA: BCC ++ ; | L9CDA: BCC ++ ; |
L9CDC: LDA ColorCntIndex ; | L9CDC: LDA ColorCntIndex ; |
L9CDE: CMP #$08 ;If EndSamusFlash routine is more than half--> | L9CDE: CMP #$08 ;If EndSamusFlash routine is more than half--> |
L9CE0: BCC ++ ;way done, Check ending type for the Samus helmet--> | L9CE0: BCC ++ ;way done, Check ending type for the Samus helmet--> |
L9CE2: LDA EndingType ;off ending. If not helmet off ending, branch. | L9CE2: LDA EndingType ;off ending. If not helmet off ending, branch. |
L9CE5: CMP #$03 ; | L9CE5: CMP #$03 ; |
L9CE7: BNE ++ ; | L9CE7: BNE ++ ; |
L9CE9: LDY #$00 ; | L9CE9: LDY #$00 ; |
L9CEB: LDX #$00 ; | L9CEB: LDX #$00 ; |
L9CED:* LDA SamusHeadSpriteTble,Y ;The following code loads the sprite graphics--> | L9CED:* LDA SamusHeadSpriteTble,Y ;The following code loads the sprite graphics--> |
L9CF0: STA Sprite00RAM,X ;when the helmet off ending is playing. The--> | L9CF0: STA Sprite00RAM,X ;when the helmet off ending is playing. The--> |
L9CF3: INY ;sprites below keep Samus head from flashing--> | L9CF3: INY ;sprites below keep Samus head from flashing--> |
L9CF4: INX ;while the rest of her body does. | L9CF4: INX ;while the rest of her body does. |
L9CF5: CPY #$18 ; | L9CF5: CPY #$18 ; |
L9CF7: BNE - ; | L9CF7: BNE - ; |
L9CF9:* RTS ; | L9CF9:* RTS ; |
| |
;The following table is used by the routine above to keep Samus' | ;The following table is used by the routine above to keep Samus' |
| |
SamusHeadSpriteTble: | SamusHeadSpriteTble: |
L9CFA: .byte $93, $36, $01, $70 ;Sprite00RAM | L9CFA: .byte $93, $36, $01, $70 ;Sprite00RAM |
L9CFE: .byte $93, $37, $01, $78 ;Sprite01RAM | L9CFE: .byte $93, $37, $01, $78 ;Sprite01RAM |
L9D02: .byte $93, $38, $01, $80 ;Sprite02RAM | L9D02: .byte $93, $38, $01, $80 ;Sprite02RAM |
L9D06: .byte $9B, $46, $01, $70 ;Sprite03RAM | L9D06: .byte $9B, $46, $01, $70 ;Sprite03RAM |
L9D0A: .byte $9B, $47, $01, $78 ;Sprite04RAM | L9D0A: .byte $9B, $47, $01, $78 ;Sprite04RAM |
L9D0E: .byte $9B, $48, $01, $80 ;Sprite05RAM | L9D0E: .byte $9B, $48, $01, $80 ;Sprite05RAM |
| |
;The following table is a pointer table to the sprites that makes Samus wave in the end | ;The following table is a pointer table to the sprites that makes Samus wave in the end |
| |
WavePointerTable: | WavePointerTable: |
L9D12: .word $9D1A ;Jumpsuit Samus hand up. | L9D12: .word $9D1A ;Jumpsuit Samus hand up. |
L9D14: .word $9D2A ;Jumpsuit Samus hand down. | L9D14: .word $9D2A ;Jumpsuit Samus hand down. |
L9D16: .word $9D3A ;Bikini Samus hand up. | L9D16: .word $9D3A ;Bikini Samus hand up. |
L9D18: .word $9D4A ;Bikini Samus hand down. | L9D18: .word $9D4A ;Bikini Samus hand down. |
| |
;Sprite data table used when Samus is in jumpsuit and her waving hand is up. | ;Sprite data table used when Samus is in jumpsuit and her waving hand is up. |
JsHandUpTable: | JsHandUpTable: |
L9D1A: .byte $9B, $1F, $01, $80, $A3, $2F, $01, $80, $AB, $3F, $01, $80, $F4, $3F, $01, $80 | L9D1A: .byte $9B, $1F, $01, $80, $A3, $2F, $01, $80, $AB, $3F, $01, $80, $F4, $3F, $01, $80 |
| |
;Sprite data table used when Samus is in jumpsuit and her waving hand is down. | ;Sprite data table used when Samus is in jumpsuit and her waving hand is down. |
JsHandDownTable: | JsHandDownTable: |
L9D2A: .byte $9B, $2A, $01, $80, $9B, $2B, $01, $88, $A3, $3A, $01, $80, $AB, $3F, $01, $80 | L9D2A: .byte $9B, $2A, $01, $80, $9B, $2B, $01, $88, $A3, $3A, $01, $80, $AB, $3F, $01, $80 |
| |
;Sprite data table used when Samus is in bikini and her waving hand is up. | ;Sprite data table used when Samus is in bikini and her waving hand is up. |
BkHandUpTable: | BkHandUpTable: |
L9D3A: .byte $9B, $0C, $01, $80, $A3, $1C, $01, $80, $AB, $3F, $01, $80, $F4, $3F, $01, $80 | L9D3A: .byte $9B, $0C, $01, $80, $A3, $1C, $01, $80, $AB, $3F, $01, $80, $F4, $3F, $01, $80 |
| |
;Sprite data table used when Samus is in bikini and her waving hand is down. | ;Sprite data table used when Samus is in bikini and her waving hand is down. |
BkHandDownTable: | BkHandDownTable: |
L9D4A: .byte $9B, $4A, $01, $80, $9B, $4B, $01, $88, $A3, $4D, $01, $80, $AB, $3F, $01, $80 | L9D4A: .byte $9B, $4A, $01, $80, $9B, $4B, $01, $88, $A3, $4D, $01, $80, $AB, $3F, $01, $80 |
| |
EndSamusAddrTbl: | EndSamusAddrTbl: |
L9D5A: .word NormalSamus ;($9D66)Pointer to end graphic of Samus wearing suit. | L9D5A: .word NormalSamus ;($9D66)Pointer to end graphic of Samus wearing suit. |
L9D5C: .word BackTurnedSamus ;($9D9C)Pointer to end graphic of back turned Samus. | L9D5C: .word BackTurnedSamus ;($9D9C)Pointer to end graphic of back turned Samus. |
L9D5E: .word FistRaisedSamus ;($9DD2)Pointer to end graphic of fist raised Samus. | L9D5E: .word FistRaisedSamus ;($9DD2)Pointer to end graphic of fist raised Samus. |
L9D60: .word HelmetOffSamus ;($9E08)Pointer to end graphic of helmet off Samus. | L9D60: .word HelmetOffSamus ;($9E08)Pointer to end graphic of helmet off Samus. |
L9D62: .word JumpsuitSamus ;($9E3E)Pointer to end graphic of jumpsuit Samus. | L9D62: .word JumpsuitSamus ;($9E3E)Pointer to end graphic of jumpsuit Samus. |
L9D64: .word BikiniSamus ;($9E74)Pointer to end graphic of bikini Samus. | L9D64: .word BikiniSamus ;($9E74)Pointer to end graphic of bikini Samus. |
| |
;The following three bytes are loaded into sprite RAM. The third byte (attribute byte) is | ;The following three bytes are loaded into sprite RAM. The third byte (attribute byte) is |
| |
NormalSamus: | NormalSamus: |
L9D66: .byte $93, $00, $70 | L9D66: .byte $93, $00, $70 |
L9D69: .byte $93, $01, $78 | L9D69: .byte $93, $01, $78 |
L9D6C: .byte $93, $80, $80 ;Mirrored pattern at pattern table location $00. | L9D6C: .byte $93, $80, $80 ;Mirrored pattern at pattern table location $00. |
L9D6F: .byte $9B, $10, $70 | L9D6F: .byte $9B, $10, $70 |
L9D72: .byte $9B, $11, $78 | L9D72: .byte $9B, $11, $78 |
L9D75: .byte $9B, $90, $80 ;Mirrored pattern at pattern table location $10. | L9D75: .byte $9B, $90, $80 ;Mirrored pattern at pattern table location $10. |
L9D78: .byte $A3, $20, $70 | L9D78: .byte $A3, $20, $70 |
L9D7B: .byte $A3, $21, $78 | L9D7B: .byte $A3, $21, $78 |
L9D7E: .byte $A3, $22, $80 | L9D7E: .byte $A3, $22, $80 |
L9D81: .byte $AB, $30, $70 | L9D81: .byte $AB, $30, $70 |
L9D84: .byte $AB, $31, $78 | L9D84: .byte $AB, $31, $78 |
L9D87: .byte $AB, $32, $80 | L9D87: .byte $AB, $32, $80 |
L9D8A: .byte $B3, $40, $70 | L9D8A: .byte $B3, $40, $70 |
L9D8D: .byte $B3, $41, $78 | L9D8D: .byte $B3, $41, $78 |
L9D90: .byte $B3, $C0, $80 | L9D90: .byte $B3, $C0, $80 |
L9D93: .byte $BB, $50, $70 | L9D93: .byte $BB, $50, $70 |
L9D96: .byte $BB, $49, $78 | L9D96: .byte $BB, $49, $78 |
L9D99: .byte $BB, $D0, $80 ;Mirrored pattern at pattern table location $50. | L9D99: .byte $BB, $D0, $80 ;Mirrored pattern at pattern table location $50. |
| |
BackTurnedSamus: | BackTurnedSamus: |
L9D9C: .byte $93, $02, $70 | L9D9C: .byte $93, $02, $70 |
L9D9F: .byte $93, $03, $78 | L9D9F: .byte $93, $03, $78 |
L9DA2: .byte $93, $04, $80 | L9DA2: .byte $93, $04, $80 |
L9DA5: .byte $9B, $12, $70 | L9DA5: .byte $9B, $12, $70 |
L9DA8: .byte $9B, $13, $78 | L9DA8: .byte $9B, $13, $78 |
L9DAB: .byte $9B, $14, $80 | L9DAB: .byte $9B, $14, $80 |
L9DAE: .byte $A3, $05, $70 | L9DAE: .byte $A3, $05, $70 |
L9DB1: .byte $A3, $06, $78 | L9DB1: .byte $A3, $06, $78 |
L9DB4: .byte $A3, $07, $80 | L9DB4: .byte $A3, $07, $80 |
L9DB7: .byte $AB, $15, $70 | L9DB7: .byte $AB, $15, $70 |
L9DBA: .byte $AB, $16, $78 | L9DBA: .byte $AB, $16, $78 |
L9DBD: .byte $AB, $17, $80 | L9DBD: .byte $AB, $17, $80 |
L9DC0: .byte $B3, $08, $70 | L9DC0: .byte $B3, $08, $70 |
L9DC3: .byte $B3, $09, $78 | L9DC3: .byte $B3, $09, $78 |
L9DC6: .byte $B3, $88, $80 ;Mirrored pattern at pattern table location $08. | L9DC6: .byte $B3, $88, $80 ;Mirrored pattern at pattern table location $08. |
L9DC9: .byte $BB, $18, $70 | L9DC9: .byte $BB, $18, $70 |
L9DCC: .byte $BB, $19, $78 | L9DCC: .byte $BB, $19, $78 |
L9DDF: .byte $BB, $98, $80 ;Mirrored pattern at pattern table location $18. | L9DDF: .byte $BB, $98, $80 ;Mirrored pattern at pattern table location $18. |
| |
FistRaisedSamus: | FistRaisedSamus: |
L9DD2: .byte $93, $00, $70 | L9DD2: .byte $93, $00, $70 |
L9DD5: .byte $93, $01, $78 | L9DD5: .byte $93, $01, $78 |
L9DD8: .byte $93, $34, $80 | L9DD8: .byte $93, $34, $80 |
L9DDB: .byte $9B, $10, $70 | L9DDB: .byte $9B, $10, $70 |
L9DDE: .byte $9B, $11, $78 | L9DDE: .byte $9B, $11, $78 |
L9DE1: .byte $9B, $44, $80 | L9DE1: .byte $9B, $44, $80 |
L9DE4: .byte $A3, $20, $70 | L9DE4: .byte $A3, $20, $70 |
L9DE7: .byte $A3, $21, $78 | L9DE7: .byte $A3, $21, $78 |
L9DEA: .byte $A3, $33, $80 | L9DEA: .byte $A3, $33, $80 |
L9DED: .byte $AB, $30, $70 | L9DED: .byte $AB, $30, $70 |
L9DF0: .byte $AB, $31, $78 | L9DF0: .byte $AB, $31, $78 |
L9DF3: .byte $AB, $43, $80 | L9DF3: .byte $AB, $43, $80 |
L9DF6: .byte $B3, $40, $70 | L9DF6: .byte $B3, $40, $70 |
L9DF9: .byte $B3, $41, $78 | L9DF9: .byte $B3, $41, $78 |
L9DFC: .byte $B3, $C0, $80 ;Mirrored pattern at pattern table location $40. | L9DFC: .byte $B3, $C0, $80 ;Mirrored pattern at pattern table location $40. |
L9DFF: .byte $BB, $50, $70 | L9DFF: .byte $BB, $50, $70 |
L9E02: .byte $BB, $49, $78 | L9E02: .byte $BB, $49, $78 |
L9E05: .byte $BB, $D0, $80 ;Mirrored pattern at pattern table location $50. | L9E05: .byte $BB, $D0, $80 ;Mirrored pattern at pattern table location $50. |
| |
HelmetOffSamus: | HelmetOffSamus: |
L9E08: .byte $93, $0D, $70 | L9E08: .byte $93, $0D, $70 |
L9E0B: .byte $93, $0E, $78 | L9E0B: .byte $93, $0E, $78 |
L9E0E: .byte $93, $0F, $80 | L9E0E: .byte $93, $0F, $80 |
L9E11: .byte $9B, $35, $70 | L9E11: .byte $9B, $35, $70 |
L9E14: .byte $9B, $27, $78 | L9E14: .byte $9B, $27, $78 |
L9E17: .byte $9B, $28, $80 | L9E17: .byte $9B, $28, $80 |
L9E1A: .byte $A3, $20, $70 | L9E1A: .byte $A3, $20, $70 |
L9E1D: .byte $A3, $21, $78 | L9E1D: .byte $A3, $21, $78 |
L9E20: .byte $A3, $22, $80 | L9E20: .byte $A3, $22, $80 |
L9E23: .byte $AB, $30, $70 | L9E23: .byte $AB, $30, $70 |
L9E26: .byte $AB, $31, $78 | L9E26: .byte $AB, $31, $78 |
L9E29: .byte $AB, $32, $80 | L9E29: .byte $AB, $32, $80 |
L9E2C: .byte $B3, $40, $70 | L9E2C: .byte $B3, $40, $70 |
L9E2F: .byte $B3, $41, $78 | L9E2F: .byte $B3, $41, $78 |
L9E32: .byte $B3, $C0, $80 ;Mirrored pattern at pattern table location $40. | L9E32: .byte $B3, $C0, $80 ;Mirrored pattern at pattern table location $40. |
L9E35: .byte $BB, $50, $70 | L9E35: .byte $BB, $50, $70 |
L9E38: .byte $BB, $49, $78 | L9E38: .byte $BB, $49, $78 |
L9E3B: .byte $BB, $D0, $80 ;Mirrored pattern at pattern table location $50. | L9E3B: .byte $BB, $D0, $80 ;Mirrored pattern at pattern table location $50. |
| |
JumpsuitSamus: | JumpsuitSamus: |
L9E3E: .byte $93, $0D, $70 | L9E3E: .byte $93, $0D, $70 |
L9E41: .byte $93, $0E, $78 | L9E41: .byte $93, $0E, $78 |
L9E44: .byte $93, $0F, $80 | L9E44: .byte $93, $0F, $80 |
L9E47: .byte $9B, $1D, $70 | L9E47: .byte $9B, $1D, $70 |
L9E4A: .byte $9B, $1E, $78 | L9E4A: .byte $9B, $1E, $78 |
L9E4D: .byte $A3, $2D, $70 | L9E4D: .byte $A3, $2D, $70 |
L9E50: .byte $A3, $2E, $78 | L9E50: .byte $A3, $2E, $78 |
L9E53: .byte $AB, $3D, $70 | L9E53: .byte $AB, $3D, $70 |
L9E56: .byte $AB, $3E, $78 | L9E56: .byte $AB, $3E, $78 |
L9E59: .byte $B3, $08, $70 | L9E59: .byte $B3, $08, $70 |
L9E5C: .byte $B3, $4E, $78 | L9E5C: .byte $B3, $4E, $78 |
L9E5F: .byte $B3, $4F, $80 | L9E5F: .byte $B3, $4F, $80 |
L9E62: .byte $BB, $45, $70 | L9E62: .byte $BB, $45, $70 |
L9E65: .byte $BB, $3B, $78 | L9E65: .byte $BB, $3B, $78 |
L9E68: .byte $BB, $51, $80 | L9E68: .byte $BB, $51, $80 |
L9E6B: .byte $9B, $29, $80 | L9E6B: .byte $9B, $29, $80 |
L9E6E: .byte $A3, $39, $80 | L9E6E: .byte $A3, $39, $80 |
L9E71: .byte $AB, $4C, $80 | L9E71: .byte $AB, $4C, $80 |
| |
BikiniSamus: | BikiniSamus: |
L9E74: .byte $93, $0D, $70 | L9E74: .byte $93, $0D, $70 |
L9E77: .byte $93, $0E, $78 | L9E77: .byte $93, $0E, $78 |
L9E7A: .byte $93, $0F, $80 | L9E7A: .byte $93, $0F, $80 |
L9E7D: .byte $9B, $0A, $70 | L9E7D: .byte $9B, $0A, $70 |
L9E80: .byte $9B, $0B, $78 | L9E80: .byte $9B, $0B, $78 |
L9E83: .byte $A3, $1A, $70 | L9E83: .byte $A3, $1A, $70 |
L9E86: .byte $A3, $1B, $78 | L9E86: .byte $A3, $1B, $78 |
L9E89: .byte $AB, $3D, $70 | L9E89: .byte $AB, $3D, $70 |
L9E8C: .byte $AB, $3E, $78 | L9E8C: .byte $AB, $3E, $78 |
L9E8F: .byte $B3, $08, $70 | L9E8F: .byte $B3, $08, $70 |
L9E92: .byte $B3, $4E, $78 | L9E92: .byte $B3, $4E, $78 |
L9E95: .byte $B3, $4F, $80 | L9E95: .byte $B3, $4F, $80 |
L9E98: .byte $BB, $45, $70 | L9E98: .byte $BB, $45, $70 |
L9E9B: .byte $BB, $3B, $78 | L9E9B: .byte $BB, $3B, $78 |
L9E9E: .byte $BB, $51, $80 | L9E9E: .byte $BB, $51, $80 |
L9EA1: .byte $9B, $2C, $80 | L9EA1: .byte $9B, $2C, $80 |
L9EA4: .byte $A3, $3C, $80 | L9EA4: .byte $A3, $3C, $80 |
L9EA7: .byte $AB, $4C, $80 | L9EA7: .byte $AB, $4C, $80 |
| |
LoadEndStarSprites: | LoadEndStarSprites: |
L9EAA: LDY #$00 ; | L9EAA: LDY #$00 ; |
L9EAC:* LDA EndStarDataTable,Y ; | L9EAC:* LDA EndStarDataTable,Y ; |
L9EAF: STA Sprite1CRAM,Y ;Load the table below into sprite RAM--> | L9EAF: STA Sprite1CRAM,Y ;Load the table below into sprite RAM--> |
L9EB2: INY ;starting at address $0270. | L9EB2: INY ;starting at address $0270. |
L9EB3: CPY #$9C ; | L9EB3: CPY #$9C ; |
L9EB5: BNE - ; | L9EB5: BNE - ; |
L9EB7: RTS | L9EB7: RTS |
| |
;Loaded into sprite RAM by routine above. Displays stars at the end of the game. | ;Loaded into sprite RAM by routine above. Displays stars at the end of the game. |
| |
EndStarDataTable: | EndStarDataTable: |
L9EB8: .byte $08, $23, $22, $10 | L9EB8: .byte $08, $23, $22, $10 |
L9EBC: .byte $68, $23, $23, $60 | L9EBC: .byte $68, $23, $23, $60 |
L9EC0: .byte $00, $23, $22, $60 | L9EC0: .byte $00, $23, $22, $60 |
L9EC4: .byte $7F, $23, $23, $6A | L9EC4: .byte $7F, $23, $23, $6A |
L9EC8: .byte $7F, $23, $22, $D4 | L9EC8: .byte $7F, $23, $22, $D4 |
L9ECC: .byte $33, $23, $23, $B2 | L9ECC: .byte $33, $23, $23, $B2 |
L9ED0: .byte $93, $23, $22, $47 | L9ED0: .byte $93, $23, $22, $47 |
L9ED4: .byte $B3, $23, $23, $95 | L9ED4: .byte $B3, $23, $23, $95 |
L9ED8: .byte $0B, $23, $22, $E2 | L9ED8: .byte $0B, $23, $22, $E2 |
L9EDC: .byte $1C, $23, $23, $34 | L9EDC: .byte $1C, $23, $23, $34 |
L9EE0: .byte $84, $23, $22, $18 | L9EE0: .byte $84, $23, $22, $18 |
L9EE4: .byte $B2, $23, $23, $EE | L9EE4: .byte $B2, $23, $23, $EE |
L9EE8: .byte $40, $23, $22, $22 | L9EE8: .byte $40, $23, $22, $22 |
L9EEC: .byte $5A, $23, $23, $68 | L9EEC: .byte $5A, $23, $23, $68 |
L9EF0: .byte $1A, $23, $22, $90 | L9EF0: .byte $1A, $23, $22, $90 |
L9EF4: .byte $AA, $23, $23, $22 | L9EF4: .byte $AA, $23, $23, $22 |
L9EF8: .byte $81, $24, $22, $88 | L9EF8: .byte $81, $24, $22, $88 |
L9EFC: .byte $6A, $24, $23, $D0 | L9EFC: .byte $6A, $24, $23, $D0 |
L9F00: .byte $A8, $24, $22, $A0 | L9F00: .byte $A8, $24, $22, $A0 |
L9F04: .byte $10, $24, $23, $70 | L9F04: .byte $10, $24, $23, $70 |
L9F08: .byte $15, $25, $22, $42 | L9F08: .byte $15, $25, $22, $42 |
L9F0C: .byte $4A, $25, $23, $7D | L9F0C: .byte $4A, $25, $23, $7D |
L9F10: .byte $30, $25, $22, $50 | L9F10: .byte $30, $25, $22, $50 |
L9F14: .byte $5A, $25, $23, $49 | L9F14: .byte $5A, $25, $23, $49 |
L9F18: .byte $50, $25, $22, $B9 | L9F18: .byte $50, $25, $22, $B9 |
L9F1C: .byte $91, $25, $23, $B0 | L9F1C: .byte $91, $25, $23, $B0 |
L9F20: .byte $19, $25, $22, $C0 | L9F20: .byte $19, $25, $22, $C0 |
L9F24: .byte $53, $25, $23, $BA | L9F24: .byte $53, $25, $23, $BA |
L9F28: .byte $A4, $25, $22, $D6 | L9F28: .byte $A4, $25, $22, $D6 |
L9F2C: .byte $98, $25, $23, $1A | L9F2C: .byte $98, $25, $23, $1A |
L9F30: .byte $68, $25, $22, $0C | L9F30: .byte $68, $25, $22, $0C |
L9F34: .byte $97, $25, $23, $EA | L9F34: .byte $97, $25, $23, $EA |
L9F38: .byte $33, $25, $22, $92 | L9F38: .byte $33, $25, $22, $92 |
L9F3C: .byte $43, $25, $23, $65 | L9F3C: .byte $43, $25, $23, $65 |
L9F40: .byte $AC, $25, $22, $4A | L9F40: .byte $AC, $25, $22, $4A |
L9F44: .byte $2A, $25, $23, $71 | L9F44: .byte $2A, $25, $23, $71 |
L9F48: .byte $7C, $26, $22, $B2 | L9F48: .byte $7C, $26, $22, $B2 |
L9F4C: .byte $73, $26, $23, $E7 | L9F4C: .byte $73, $26, $23, $E7 |
L9F50: .byte $0C, $26, $22, $AA | L9F50: .byte $0C, $26, $22, $AA |
| |
EndGamePalWrite: | EndGamePalWrite: |
L9F54: LDA PalDataPending ;If no palette data pending, branch to exit. | L9F54: LDA PalDataPending ;If no palette data pending, branch to exit. |
L9F56: BEQ ++ ; | L9F56: BEQ ++ ; |
L9F58: CMP #$0C ;If PalDataPending has loaded last palette,--> | L9F58: CMP #$0C ;If PalDataPending has loaded last palette,--> |
L9F5A: BEQ ++ ;branch to exit. | L9F5A: BEQ ++ ;branch to exit. |
L9F5C: CMP #$0D ;Once end palettes have been cycled through,--> | L9F5C: CMP #$0D ;Once end palettes have been cycled through,--> |
L9F5E: BNE + ;start over. | L9F5E: BNE + ;start over. |
L9F60: LDY #$00 ; | L9F60: LDY #$00 ; |
L9F62: STY PalDataPending ; | L9F62: STY PalDataPending ; |
L9F64:* ASL ;* 2, pointer is two bytes. | L9F64:* ASL ;* 2, pointer is two bytes. |
L9F65: TAY ; | L9F65: TAY ; |
L9F66: LDA EndGamePalPntrTbl-1,Y ;High byte of PPU data pointer. | L9F66: LDA EndGamePalPntrTbl-1,Y ;High byte of PPU data pointer. |
L9F69: LDX EndGamePalPntrTbl-2,Y ;Low byte of PPU data pointer. | L9F69: LDX EndGamePalPntrTbl-2,Y ;Low byte of PPU data pointer. |
L9F6C: TAY ; | L9F6C: TAY ; |
L9F6D: JSR PreparePPUProcess_ ;($C20E)Prepare to write data string to PPU. | L9F6D: JSR PreparePPUProcess_ ;($C20E)Prepare to write data string to PPU. |
L9F70: LDA #$3F ; | L9F70: LDA #$3F ; |
L9F72: STA PPUAddress ; | L9F72: STA PPUAddress ; |
L9F75: LDA #$00 ; | L9F75: LDA #$00 ; |
L9F77: STA PPUAddress ;Set PPU address to $3F00. | L9F77: STA PPUAddress ;Set PPU address to $3F00. |
L9F7A: STA PPUAddress ; | L9F7A: STA PPUAddress ; |
L9F7D: STA PPUAddress ;Set PPU address to $0000. | L9F7D: STA PPUAddress ;Set PPU address to $0000. |
L9F80:* RTS ; | L9F80:* RTS ; |
| |
;The following pointer table is used by the routine above to | ;The following pointer table is used by the routine above to |
| |
EndGamePalPntrTbl: | EndGamePalPntrTbl: |
L9F81: .word EndGamePal00 ;($9F9B) | L9F81: .word EndGamePal00 ;($9F9B) |
L9F83: .word EndGamePal01 ;($9FBF) | L9F83: .word EndGamePal01 ;($9FBF) |
L9F85: .word EndGamePal02 ;($9FCB) | L9F85: .word EndGamePal02 ;($9FCB) |
L9F87: .word EndGamePal03 ;($9FD7) | L9F87: .word EndGamePal03 ;($9FD7) |
L9F89: .word EndGamePal04 ;($9FE3) | L9F89: .word EndGamePal04 ;($9FE3) |
L9F8B: .word EndGamePal05 ;($9FEF) | L9F8B: .word EndGamePal05 ;($9FEF) |
L9F8D: .word EndGamePal06 ;($9FFB) | L9F8D: .word EndGamePal06 ;($9FFB) |
L9F8F: .word EndGamePal07 ;($A007) | L9F8F: .word EndGamePal07 ;($A007) |
L9F91: .word EndGamePal08 ;($A013) | L9F91: .word EndGamePal08 ;($A013) |
L9F93: .word EndGamePal09 ;($A02E) | L9F93: .word EndGamePal09 ;($A02E) |
L9F95: .word EndGamePal0A ;($A049) | L9F95: .word EndGamePal0A ;($A049) |
L9F97: .word EndGamePal0A ;($A049) | L9F97: .word EndGamePal0A ;($A049) |
L9F99: .word EndGamePal0B ;($9806) | L9F99: .word EndGamePal0B ;($9806) |
| |
EndGamePal00: | EndGamePal00: |
L9F9B: .byte $3F ;PPU address high byte. | L9F9B: .byte $3F ;PPU address high byte. |
L9F9C: .byte $00 ;PPU address low byte. | L9F9C: .byte $00 ;PPU address low byte. |
L9F9D: .byte $20 ;PPU string length. | L9F9D: .byte $20 ;PPU string length. |
;The following values are written to the background palette: | ;The following values are written to the background palette: |
L9F9E: .byte $0F, $21, $11, $02, $0F, $29, $1B, $1A, $0F, $27, $28, $29, $0F, $28, $18, $08 | L9F9E: .byte $0F, $21, $11, $02, $0F, $29, $1B, $1A, $0F, $27, $28, $29, $0F, $28, $18, $08 |
;The following values are written to the sprite palette: | ;The following values are written to the sprite palette: |
L9FAE: .byte $0F, $16, $19, $27, $0F, $36, $15, $17, $0F, $12, $21, $20, $0F, $35, $12, $16 | L9FAE: .byte $0F, $16, $19, $27, $0F, $36, $15, $17, $0F, $12, $21, $20, $0F, $35, $12, $16 |
| |
L9FBE: .byte $00 ;End EndGamePal00 data. | L9FBE: .byte $00 ;End EndGamePal00 data. |
| |
EndGamePal01: | EndGamePal01: |
L9FBF: .byte $3F ;PPU address high byte. | L9FBF: .byte $3F ;PPU address high byte. |
L9FC0: .byte $18 ;PPU address low byte. | L9FC0: .byte $18 ;PPU address low byte. |
L9FC1: .byte $08 ;PPU string length. | L9FC1: .byte $08 ;PPU string length. |
;The following values are written to the sprite palette starting at $3F18: | ;The following values are written to the sprite palette starting at $3F18: |
L9FC2: .byte $0F, $10, $20, $30, $0F, $0F, $0F, $0F | L9FC2: .byte $0F, $10, $20, $30, $0F, $0F, $0F, $0F |
| |
L9FCA: .byte $00 ;End EndGamePal01 data. | L9FCA: .byte $00 ;End EndGamePal01 data. |
| |
EndGamePal02: | EndGamePal02: |
L9FCB: .byte $3F ;PPU address high byte. | L9FCB: .byte $3F ;PPU address high byte. |
L9FCC: .byte $18 ;PPU address low byte. | L9FCC: .byte $18 ;PPU address low byte. |
L9FCD: .byte $08 ;PPU string length. | L9FCD: .byte $08 ;PPU string length. |
;The following values are written to the sprite palette starting at $3F18: | ;The following values are written to the sprite palette starting at $3F18: |
L9FCE: .byte $0F, $12, $22, $32, $0F, $0B, $1B, $2B | L9FCE: .byte $0F, $12, $22, $32, $0F, $0B, $1B, $2B |
| |
L9FD6: .byte $00 ;End EndGamePal02 data. | L9FD6: .byte $00 ;End EndGamePal02 data. |
| |
EndGamePal03: | EndGamePal03: |
L9FD7: .byte $3F ;PPU address high byte. | L9FD7: .byte $3F ;PPU address high byte. |
L9FD8: .byte $18 ;PPU address low byte. | L9FD8: .byte $18 ;PPU address low byte. |
L9FD9: .byte $08 ;PPU string length. | L9FD9: .byte $08 ;PPU string length. |
;The following values are written to the sprite palette starting at $3F18: | ;The following values are written to the sprite palette starting at $3F18: |
L9FDA: .byte $0F, $14, $24, $34, $0F, $09, $19, $29 | L9FDA: .byte $0F, $14, $24, $34, $0F, $09, $19, $29 |
| |
L9FE2: .byte $00 ;End EndGamePal03 data. | L9FE2: .byte $00 ;End EndGamePal03 data. |
| |
EndGamePal04: | EndGamePal04: |
L9FE3: .byte $3F ;PPU address high byte. | L9FE3: .byte $3F ;PPU address high byte. |
L9FE4: .byte $18 ;PPU address low byte. | L9FE4: .byte $18 ;PPU address low byte. |
L9FE5: .byte $08 ;PPU string length. | L9FE5: .byte $08 ;PPU string length. |
;The following values are written to the sprite palette starting at $3F18: | ;The following values are written to the sprite palette starting at $3F18: |
L9FE6: .byte $0F, $16, $26, $36, $0F, $07, $17, $27 | L9FE6: .byte $0F, $16, $26, $36, $0F, $07, $17, $27 |
| |
L9FEE: .byte $00 ;End EndGamePal04 data. | L9FEE: .byte $00 ;End EndGamePal04 data. |
| |
EndGamePal05: | EndGamePal05: |
L9FEF: .byte $3F ;PPU address high byte. | L9FEF: .byte $3F ;PPU address high byte. |
L9FF0: .byte $18 ;PPU address low byte. | L9FF0: .byte $18 ;PPU address low byte. |
L9FF1: .byte $08 ;PPU string length. | L9FF1: .byte $08 ;PPU string length. |
;The following values are written to the sprite palette starting at $3F18: | ;The following values are written to the sprite palette starting at $3F18: |
L9FF2: .byte $0F, $18, $28, $38, $0F, $05, $15, $25 | L9FF2: .byte $0F, $18, $28, $38, $0F, $05, $15, $25 |
| |
L9FFA: .byte $00 ;End EndGamePal05 data. | L9FFA: .byte $00 ;End EndGamePal05 data. |
| |
EndGamePal06: | EndGamePal06: |
L9FFB: .byte $3F ;PPU address high byte. | L9FFB: .byte $3F ;PPU address high byte. |
L9FFC: .byte $18 ;PPU address low byte. | L9FFC: .byte $18 ;PPU address low byte. |
L9FFD: .byte $08 ;PPU string length. | L9FFD: .byte $08 ;PPU string length. |
;The following values are written to the sprite palette starting at $3F18: | ;The following values are written to the sprite palette starting at $3F18: |
L9FFE: .byte $0F, $1A, $2A, $3A, $0F, $03, $13, $13 | L9FFE: .byte $0F, $1A, $2A, $3A, $0F, $03, $13, $13 |
| |
LA006: .byte $00 ;End EndGamePal06 data. | LA006: .byte $00 ;End EndGamePal06 data. |
| |
EndGamePal07: | EndGamePal07: |
LA007: .byte $3F ;PPU address high byte. | LA007: .byte $3F ;PPU address high byte. |
LA008: .byte $18 ;PPU address low byte. | LA008: .byte $18 ;PPU address low byte. |
LA009: .byte $08 ;PPU string length. | LA009: .byte $08 ;PPU string length. |
;The following values are written to the sprite palette starting at $3F18: | ;The following values are written to the sprite palette starting at $3F18: |
LA00A: .byte $0F, $1C, $2C, $3C, $0F, $01, $11, $21 | LA00A: .byte $0F, $1C, $2C, $3C, $0F, $01, $11, $21 |
| |
LA012: .byte $00 ;End EndGamePal07 data. | LA012: .byte $00 ;End EndGamePal07 data. |
| |
EndGamePal08: | EndGamePal08: |
LA013: .byte $3F ;PPU address high byte. | LA013: .byte $3F ;PPU address high byte. |
LA014: .byte $0C ;PPU address low byte. | LA014: .byte $0C ;PPU address low byte. |
LA015: .byte $04 ;PPU string length. | LA015: .byte $04 ;PPU string length. |
;The following values are written to the background palette starting at $3F0C: | ;The following values are written to the background palette starting at $3F0C: |
LA016: .byte $0F, $18, $08, $07 | LA016: .byte $0F, $18, $08, $07 |
| |
LA01A: .byte $3F ;PPU address high byte. | LA01A: .byte $3F ;PPU address high byte. |
LA01B: .byte $10 ;PPU address low byte. | LA01B: .byte $10 ;PPU address low byte. |
LA01C: .byte $10 ;PPU string length. | LA01C: .byte $10 ;PPU string length. |
;The following values are written to the sprite palette: | ;The following values are written to the sprite palette: |
LA01D: .byte $0F, $26, $05, $07, $0F, $26, $05, $07, $0F, $01, $01, $05, $0F, $13, $1C, $0C | LA01D: .byte $0F, $26, $05, $07, $0F, $26, $05, $07, $0F, $01, $01, $05, $0F, $13, $1C, $0C |
| |
LA02D: .byte $00 ;End EndGamePal08 data. | LA02D: .byte $00 ;End EndGamePal08 data. |
| |
EndGamePal09: | EndGamePal09: |
LA02E: .byte $3F ;PPU address high byte. | LA02E: .byte $3F ;PPU address high byte. |
LA02F: .byte $0C ;PPU address low byte. | LA02F: .byte $0C ;PPU address low byte. |
LA030: .byte $04 ;PPU string length. | LA030: .byte $04 ;PPU string length. |
;The following values are written to the background palette starting at $3F0C: | ;The following values are written to the background palette starting at $3F0C: |
LA031: .byte $0F, $08, $07, $0F | LA031: .byte $0F, $08, $07, $0F |
| |
LA035: .byte $3F ;PPU address high byte. | LA035: .byte $3F ;PPU address high byte. |
LA036: .byte $10 ;PPU address low byte. | LA036: .byte $10 ;PPU address low byte. |
LA037: .byte $10 ;PPU string length. | LA037: .byte $10 ;PPU string length. |
;The following values are written to the sprite palette: | ;The following values are written to the sprite palette: |
LA038: .byte $0F, $06, $08, $0F, $0F, $06, $08, $0F, $0F, $00, $10, $0F, $0F, $01, $0C, $0F | LA038: .byte $0F, $06, $08, $0F, $0F, $06, $08, $0F, $0F, $00, $10, $0F, $0F, $01, $0C, $0F |
| |
LA048: .byte $00 ;End EndGamePal09 data. | LA048: .byte $00 ;End EndGamePal09 data. |
| |
EndGamePal0A: | EndGamePal0A: |
LA049: .byte $3F ;PPU address high byte. | LA049: .byte $3F ;PPU address high byte. |
LA04A: .byte $0C ;PPU address low byte. | LA04A: .byte $0C ;PPU address low byte. |
LA04B: .byte $44 ;PPU string length. | LA04B: .byte $44 ;PPU string length. |
LA04C: .byte $0F ;Repeat bit set. Fill background palette with #$0F--> | LA04C: .byte $0F ;Repeat bit set. Fill background palette with #$0F--> |
;starting at $0C. | ;starting at $0C. |
LA04D: .byte $3F ;PPU address high byte. | LA04D: .byte $3F ;PPU address high byte. |
LA04E: .byte $10 ;PPU address low byte. | LA04E: .byte $10 ;PPU address low byte. |
LA04F: .byte $50 ;PPU string length. | LA04F: .byte $50 ;PPU string length. |
LA050: .byte $0F ;Repeat bit set. Fill sprite palette with #$0F. | LA050: .byte $0F ;Repeat bit set. Fill sprite palette with #$0F. |
| |
LA051: .byte $00 ;End EndGamePal0A data. | LA051: .byte $00 ;End EndGamePal0A data. |
| |
;The following data writes the end game backgroud graphics. | ;The following data writes the end game backgroud graphics. |
| |
;Writes ground graphics on name table 0 in row $2300 (25th row from top). | ;Writes ground graphics on name table 0 in row $2300 (25th row from top). |
LA052: .byte $23 ;PPU address high byte. | LA052: .byte $23 ;PPU address high byte. |
LA053: .byte $00 ;PPU address low byte. | LA053: .byte $00 ;PPU address low byte. |
LA054: .byte $20 ;PPU string length. | LA054: .byte $20 ;PPU string length. |
LA055: .byte $30, $31, $30, $31, $30, $31, $30, $31, $30, $31, $30, $31, $30, $31, $30, $31 | LA055: .byte $30, $31, $30, $31, $30, $31, $30, $31, $30, $31, $30, $31, $30, $31, $30, $31 |
LA065: .byte $30, $31, $30, $31, $30, $31, $30, $31, $30, $31, $30, $31, $30, $31, $30, $31 | LA065: .byte $30, $31, $30, $31, $30, $31, $30, $31, $30, $31, $30, $31, $30, $31, $30, $31 |
| |
;Writes ground graphics on name table 0 in row $2320 (26th row from top). | ;Writes ground graphics on name table 0 in row $2320 (26th row from top). |
LA075: .byte $23 ;PPU address high byte. | LA075: .byte $23 ;PPU address high byte. |
LA076: .byte $20 ;PPU address low byte. | LA076: .byte $20 ;PPU address low byte. |
LA077: .byte $20 ;PPU string length. | LA077: .byte $20 ;PPU string length. |
LA078: .byte $32, $33, $32, $33, $32, $33, $32, $33, $32, $33, $32, $33, $32, $33, $32, $33 | LA078: .byte $32, $33, $32, $33, $32, $33, $32, $33, $32, $33, $32, $33, $32, $33, $32, $33 |
LA088: .byte $32, $33, $32, $33, $32, $33, $32, $33, $32, $33, $32, $33, $32, $33, $32, $33 | LA088: .byte $32, $33, $32, $33, $32, $33, $32, $33, $32, $33, $32, $33, $32, $33, $32, $33 |
| |
;Writes ground graphics on name table 0 in row $2340 (27th row from top). | ;Writes ground graphics on name table 0 in row $2340 (27th row from top). |
LA098: .byte $23 ;PPU address high byte. | LA098: .byte $23 ;PPU address high byte. |
LA099: .byte $40 ;PPU address low byte. | LA099: .byte $40 ;PPU address low byte. |
LA09A: .byte $20 ;PPU string length. | LA09A: .byte $20 ;PPU string length. |
LA09B: .byte $34, $35, $34, $35, $34, $35, $34, $35, $34, $35, $34, $35, $34, $35, $34, $35 | LA09B: .byte $34, $35, $34, $35, $34, $35, $34, $35, $34, $35, $34, $35, $34, $35, $34, $35 |
LA0AB: .byte $34, $35, $34, $35, $34, $35, $34, $35, $34, $35, $34, $35, $34, $35, $34, $35 | LA0AB: .byte $34, $35, $34, $35, $34, $35, $34, $35, $34, $35, $34, $35, $34, $35, $34, $35 |
| |
;Writes ground graphics on name table 0 in row $2360 (28th row from top). | ;Writes ground graphics on name table 0 in row $2360 (28th row from top). |
LA0BB: .byte $23 ;PPU address high byte. | LA0BB: .byte $23 ;PPU address high byte. |
LA0BC: .byte $60 ;PPU address low byte. | LA0BC: .byte $60 ;PPU address low byte. |
LA0BD: .byte $20 ;PPU string length. | LA0BD: .byte $20 ;PPU string length. |
LA0BE: .byte $36, $37, $36, $37, $36, $37, $36, $37, $36, $37, $36, $37, $36, $37, $36, $37 | LA0BE: .byte $36, $37, $36, $37, $36, $37, $36, $37, $36, $37, $36, $37, $36, $37, $36, $37 |
LA0CE: .byte $36, $37, $36, $37, $36, $37, $36, $37, $36, $37, $36, $37, $36, $37, $36, $37 | LA0CE: .byte $36, $37, $36, $37, $36, $37, $36, $37, $36, $37, $36, $37, $36, $37, $36, $37 |
| |
;Writes ground graphics on name table 0 in row $2380 (29th row from top). | ;Writes ground graphics on name table 0 in row $2380 (29th row from top). |
LA0DE: .byte $23 ;PPU address high byte. | LA0DE: .byte $23 ;PPU address high byte. |
LA0DF: .byte $80 ;PPU address low byte. | LA0DF: .byte $80 ;PPU address low byte. |
LA0E0: .byte $20 ;PPU string length. | LA0E0: .byte $20 ;PPU string length. |
LA0E1: .byte $38, $39, $38, $39, $38, $39, $38, $39, $38, $39, $38, $39, $38, $39, $38, $39 | LA0E1: .byte $38, $39, $38, $39, $38, $39, $38, $39, $38, $39, $38, $39, $38, $39, $38, $39 |
LA0F1: .byte $38, $39, $38, $39, $38, $39, $38, $39, $38, $39, $38, $39, $38, $39, $38, $39 | LA0F1: .byte $38, $39, $38, $39, $38, $39, $38, $39, $38, $39, $38, $39, $38, $39, $38, $39 |
| |
;Writes ground graphics on name table 0 in row $23A0 (bottom row). | ;Writes ground graphics on name table 0 in row $23A0 (bottom row). |
LA101: .byte $23 ;PPU address high byte. | LA101: .byte $23 ;PPU address high byte. |
LA102: .byte $A0 ;PPU address low byte. | LA102: .byte $A0 ;PPU address low byte. |
LA103: .byte $20 ;PPU string length. | LA103: .byte $20 ;PPU string length. |
LA104: .byte $3A, $3B, $3A, $3B, $3A, $3B, $3A, $3B, $3A, $3B, $3A, $3B, $3A, $3B, $3A, $3B | LA104: .byte $3A, $3B, $3A, $3B, $3A, $3B, $3A, $3B, $3A, $3B, $3A, $3B, $3A, $3B, $3A, $3B |
LA114: .byte $3A, $3B, $3A, $3B, $3A, $3B, $3A, $3B, $3A, $3B, $3A, $3B, $3A, $3B, $3A, $3B | LA114: .byte $3A, $3B, $3A, $3B, $3A, $3B, $3A, $3B, $3A, $3B, $3A, $3B, $3A, $3B, $3A, $3B |
| |
;Sets all color bits in attribute table 0 starting at $23F0. | ;Sets all color bits in attribute table 0 starting at $23F0. |
LA124: .byte $23 ;PPU address high byte. | LA124: .byte $23 ;PPU address high byte. |
LA125: .byte $F0 ;PPU address low byte. | LA125: .byte $F0 ;PPU address low byte. |
LA126: .byte $50 ;PPU string length. | LA126: .byte $50 ;PPU string length. |
LA127: .byte $FF ;Repeat bit set. Repeats entry 16 times. | LA127: .byte $FF ;Repeat bit set. Repeats entry 16 times. |
| |
;Writes credits on name table 2 in row $2820 (2nd row from top). | ;Writes credits on name table 2 in row $2820 (2nd row from top). |
LA128: .byte $28 ;PPU address high byte. | LA128: .byte $28 ;PPU address high byte. |
LA129: .byte $2E ;PPU address low byte. | LA129: .byte $2E ;PPU address low byte. |
LA12A: .byte $05 ;PPU string length. | LA12A: .byte $05 ;PPU string length. |
; 'S T A F F' | ; 'S T A F F' |
LA12B: .byte $1C, $1D, $0A, $0F, $0F | LA12B: .byte $1C, $1D, $0A, $0F, $0F |
| |
;Writes credits on name table 2 in row $28A0 (6th row from top). | ;Writes credits on name table 2 in row $28A0 (6th row from top). |
LA130: .byte $28 ;PPU address high byte. | LA130: .byte $28 ;PPU address high byte. |
LA131: .byte $A8 ;PPU address low byte. | LA131: .byte $A8 ;PPU address low byte. |
LA132: .byte $13 ;PPU string length. | LA132: .byte $13 ;PPU string length. |
; 'S C E N A R I O _ W R I T T E N' | ; 'S C E N A R I O _ W R I T T E N' |
LA133: .byte $1C, $0C, $0E, $17, $0A, $1B, $12, $18, $FF, $20, $1B, $12, $1D, $1D, $0E, $17 | LA133: .byte $1C, $0C, $0E, $17, $0A, $1B, $12, $18, $FF, $20, $1B, $12, $1D, $1D, $0E, $17 |
; '_ B Y' | ; '_ B Y' |
LA143: .byte $FF, $0B, $22 | LA143: .byte $FF, $0B, $22 |
| |
;Writes credits on name table 2 in row $28E0 (8th row from top). | ;Writes credits on name table 2 in row $28E0 (8th row from top). |
LA146: .byte $28 ;PPU address high byte. | LA146: .byte $28 ;PPU address high byte. |
LA147: .byte $EE ;PPU address low byte. | LA147: .byte $EE ;PPU address low byte. |
LA148: .byte $05 ;PPU string length. | LA148: .byte $05 ;PPU string length. |
; 'K A N O H' | ; 'K A N O H' |
LA149: .byte $14, $0A, $17, $18, $11 | LA149: .byte $14, $0A, $17, $18, $11 |
| |
;Writes credits on name table 2 in row $2960 (12th row from top). | ;Writes credits on name table 2 in row $2960 (12th row from top). |
LA14E: .byte $29 ;PPU address high byte. | LA14E: .byte $29 ;PPU address high byte. |
LA14F: .byte $66 ;PPU address low byte. | LA14F: .byte $66 ;PPU address low byte. |
LA150: .byte $15 ;PPU string length. | LA150: .byte $15 ;PPU string length. |
; 'C H A R A C T E R _ D E S I G N' | ; 'C H A R A C T E R _ D E S I G N' |
LA151: .byte $0C, $11, $0A, $1B, $0A, $0C, $1D, $0E, $1B, $FF, $0D, $0E, $1C, $12, $10, $17 | LA151: .byte $0C, $11, $0A, $1B, $0A, $0C, $1D, $0E, $1B, $FF, $0D, $0E, $1C, $12, $10, $17 |
; 'E D _ B Y' | ; 'E D _ B Y' |
LA161: .byte $0E, $0D, $FF, $0B, $22 | LA161: .byte $0E, $0D, $FF, $0B, $22 |
| |
;Writes credits on name table 2 in row $29A0 (14th row from top). | ;Writes credits on name table 2 in row $29A0 (14th row from top). |
LA166: .byte $29 ;PPU address high byte. | LA166: .byte $29 ;PPU address high byte. |
LA167: .byte $AC ;PPU address low byte. | LA167: .byte $AC ;PPU address low byte. |
LA168: .byte $08 ;PPU string length. | LA168: .byte $08 ;PPU string length. |
; 'K I Y O T A K E' | ; 'K I Y O T A K E' |
LA169: .byte $14, $12, $22, $18, $1D, $0A, $14, $0E | LA169: .byte $14, $12, $22, $18, $1D, $0A, $14, $0E |
| |
;Writes credits on name table 2 in row $2A20 (18th row from top). | ;Writes credits on name table 2 in row $2A20 (18th row from top). |
LA16A: .byte $2A ;PPU address high byte. | LA16A: .byte $2A ;PPU address high byte. |
LA16B: .byte $2B ;PPU address low byte. | LA16B: .byte $2B ;PPU address low byte. |
LA173: .byte $0C ;PPU string length. | LA173: .byte $0C ;PPU string length. |
; 'N E W _ M A T S U O K A' | ; 'N E W _ M A T S U O K A' |
LA174: .byte $17, $0E, $20, $FF, $16, $0A, $1D, $1C, $1E, $18, $14, $0A | LA174: .byte $17, $0E, $20, $FF, $16, $0A, $1D, $1C, $1E, $18, $14, $0A |
| |
;Writes credits on name table 2 in row $2A60 (20th row from top). | ;Writes credits on name table 2 in row $2A60 (20th row from top). |
LA180: .byte $2A ;PPU address high byte. | LA180: .byte $2A ;PPU address high byte. |
LA181: .byte $6C ;PPU address low byte. | LA181: .byte $6C ;PPU address low byte. |
LA182: .byte $09 ;PPU string length. | LA182: .byte $09 ;PPU string length. |
; 'S H I K A M O T O' | ; 'S H I K A M O T O' |
LA183: .byte $1C, $11, $12, $14, $0A, $16, $18, $1D, $18 | LA183: .byte $1C, $11, $12, $14, $0A, $16, $18, $1D, $18 |
| |
;Writes credits on name table 2 in row $2AE0 (24th row from top). | ;Writes credits on name table 2 in row $2AE0 (24th row from top). |
LA18C: .byte $2A ;PPU address high byte. | LA18C: .byte $2A ;PPU address high byte. |
LA18D: .byte $EC ;PPU address low byte. | LA18D: .byte $EC ;PPU address low byte. |
LA18E: .byte $08 ;PPU string length. | LA18E: .byte $08 ;PPU string length. |
; 'M U S I C _ B Y' | ; 'M U S I C _ B Y' |
LA18F: .byte $16, $1E, $1C, $12, $0C, $FF, $0B, $22 | LA18F: .byte $16, $1E, $1C, $12, $0C, $FF, $0B, $22 |
| |
;Writes credits on name table 2 in row $2B20 (26th row from top) | ;Writes credits on name table 2 in row $2B20 (26th row from top) |
LA197: .byte $2B ;PPU address high byte. | LA197: .byte $2B ;PPU address high byte. |
LA198: .byte $2B ;PPU address low byte. | LA198: .byte $2B ;PPU address low byte. |
LA199: .byte $0A ;PPU string length. | LA199: .byte $0A ;PPU string length. |
; 'H I P _ T A N A K A' | ; 'H I P _ T A N A K A' |
LA19A: .byte $11, $12, $19, $FF, $1D, $0A, $17, $0A, $14, $0A | LA19A: .byte $11, $12, $19, $FF, $1D, $0A, $17, $0A, $14, $0A |
| |
;Writes credits on name table 2 in row $2BA0 (bottom row). | ;Writes credits on name table 2 in row $2BA0 (bottom row). |
LA1A4: .byte $2B ;PPU address high byte. | LA1A4: .byte $2B ;PPU address high byte. |
LA1A5: .byte $A7 ;PPU address low byte. | LA1A5: .byte $A7 ;PPU address low byte. |
LA1A6: .byte $12 ;PPU string length. | LA1A6: .byte $12 ;PPU string length. |
; '_ M A I N _ P R O G R A M M E R' | ; '_ M A I N _ P R O G R A M M E R' |
LA1A7: .byte $FF, $16, $0A, $12, $17, $FF, $19, $1B, $18, $10, $1B, $0A, $16, $16, $0E, $1B | LA1A7: .byte $FF, $16, $0A, $12, $17, $FF, $19, $1B, $18, $10, $1B, $0A, $16, $16, $0E, $1B |
; 'S _' | ; 'S _' |
LA1B7: .byte $1C, $FF | LA1B7: .byte $1C, $FF |
| |
LA1B9: .byte $00 ;End PPU string write. | LA1B9: .byte $00 ;End PPU string write. |
| |
;The following pointer table is accessed by the NMIScreenWrite routine. | ;The following pointer table is accessed by the NMIScreenWrite routine. |
| |
EndMessageStringTbl0: | EndMessageStringTbl0: |
LA1BA: .word $A1C2, $A1EB, $A20F, $A240 | LA1BA: .word $A1C2, $A1EB, $A20F, $A240 |
| |
;Writes end message on name table 0 in row $2060 (4th row from top). | ;Writes end message on name table 0 in row $2060 (4th row from top). |
LA1C2: .byte $20 ;PPU address high byte. | LA1C2: .byte $20 ;PPU address high byte. |
LA1C3: .byte $6D ;PPU address low byte. | LA1C3: .byte $6D ;PPU address low byte. |
LA1C4: .byte $08 ;PPU string length. | LA1C4: .byte $08 ;PPU string length. |
; 'G R E A T _ ! !' | ; 'G R E A T _ ! !' |
LA1C5: .byte $10, $1B, $0E, $0A, $1D, $FF, $3F, $3F | LA1C5: .byte $10, $1B, $0E, $0A, $1D, $FF, $3F, $3F |
| |
;Writes end message on name table 0 in row $20C0 (7th row from top). | ;Writes end message on name table 0 in row $20C0 (7th row from top). |
LA1CD: .byte $20 ;PPU address high byte. | LA1CD: .byte $20 ;PPU address high byte. |
LA1CE: .byte $C3 ;PPU address low byte. | LA1CE: .byte $C3 ;PPU address low byte. |
LA1CF: .byte $1A ;PPU string length. | LA1CF: .byte $1A ;PPU string length. |
; 'Y O U _ F U L F I L E D _ Y O U' | ; 'Y O U _ F U L F I L E D _ Y O U' |
LA1D0: .byte $22, $18, $1E, $FF, $0F, $1E, $15, $0F, $12, $15, $0E, $0D, $FF, $22, $18, $1E | LA1D0: .byte $22, $18, $1E, $FF, $0F, $1E, $15, $0F, $12, $15, $0E, $0D, $FF, $22, $18, $1E |
; 'R _ M I S S I O N .' | ; 'R _ M I S S I O N .' |
LA1E0: .byte $1B, $FF, $16, $12, $1C, $1C, $12, $18, $17, $07 | LA1E0: .byte $1B, $FF, $16, $12, $1C, $1C, $12, $18, $17, $07 |
| |
LA1EA: .byte $00 ;End PPU string write. | LA1EA: .byte $00 ;End PPU string write. |
| |
;Writes end message on name table 0 in row $2100 (9th row from top). | ;Writes end message on name table 0 in row $2100 (9th row from top). |
LA1EB: .byte $21 ;PPU address high byte. | LA1EB: .byte $21 ;PPU address high byte. |
LA1EC: .byte $03 ;PPU address low byte. | LA1EC: .byte $03 ;PPU address low byte. |
LA1ED: .byte $17 ;PPU string length. | LA1ED: .byte $17 ;PPU string length. |
; 'I T _ W I L L _ R E V I V E _ P' | ; 'I T _ W I L L _ R E V I V E _ P' |
LA1EE: .byte $12, $1D, $FF, $20, $12, $15, $15, $FF, $1B, $0E, $1F, $12, $1F, $0E, $FF, $19 | LA1EE: .byte $12, $1D, $FF, $20, $12, $15, $15, $FF, $1B, $0E, $1F, $12, $1F, $0E, $FF, $19 |
; 'E A C E _ I N' | ; 'E A C E _ I N' |
LA1FE: .byte $0E, $0A, $0C, $0E, $FF, $12, $17 | LA1FE: .byte $0E, $0A, $0C, $0E, $FF, $12, $17 |
| |
;Writes end message on name table 0 in row $2140 (11th row from top). | ;Writes end message on name table 0 in row $2140 (11th row from top). |
LA205: .byte $21 ;PPU address high byte. | LA205: .byte $21 ;PPU address high byte. |
LA206: .byte $42 ;PPU address low byte. | LA206: .byte $42 ;PPU address low byte. |
LA207: .byte $06 ;PPU string length. | LA207: .byte $06 ;PPU string length. |
; 'S P A C E .' | ; 'S P A C E .' |
LA208: .byte $1C, $19, $0A, $0C, $0E, $07 | LA208: .byte $1C, $19, $0A, $0C, $0E, $07 |
| |
LA209: .byte $00 ;End PPU string write. | LA209: .byte $00 ;End PPU string write. |
| |
;Writes end message on name table 0 in row $2180 (13th row from top). | ;Writes end message on name table 0 in row $2180 (13th row from top). |
LA20F: .byte $21 ;PPU address high byte. | LA20F: .byte $21 ;PPU address high byte. |
LA210: .byte $83 ;PPU address low byte. | LA210: .byte $83 ;PPU address low byte. |
LA211: .byte $18 ;PPU string length. | LA211: .byte $18 ;PPU string length. |
; 'B U T , I T _ M A Y _ B E _ I N' | ; 'B U T , I T _ M A Y _ B E _ I N' |
LA212: .byte $0B, $1E, $1D, $00, $12, $1D, $FF, $16, $0A, $22, $FF, $0B, $0E, $FF, $12, $17 | LA212: .byte $0B, $1E, $1D, $00, $12, $1D, $FF, $16, $0A, $22, $FF, $0B, $0E, $FF, $12, $17 |
; 'V A D E D _ B Y' | ; 'V A D E D _ B Y' |
LA222: .byte $1F, $0A, $0D, $0E, $0D, $FF, $0B, $22 | LA222: .byte $1F, $0A, $0D, $0E, $0D, $FF, $0B, $22 |
| |
;Writes end message on name table 0 in row $21C0 (15th row from top). | ;Writes end message on name table 0 in row $21C0 (15th row from top). |
LA22A: .byte $21 ;PPU address high byte. | LA22A: .byte $21 ;PPU address high byte. |
LA22B: .byte $C2 ;PPU address low byte. | LA22B: .byte $C2 ;PPU address low byte. |
LA22C: .byte $12 ;PPU string length. | LA22C: .byte $12 ;PPU string length. |
; 'T H E _ O T H E R _ M E T R O I' | ; 'T H E _ O T H E R _ M E T R O I' |
LA22D: .byte $1D, $11, $0E, $FF, $18, $1D, $11, $0E, $1B, $FF, $16, $0E, $1D, $1B, $18, $12 | LA22D: .byte $1D, $11, $0E, $FF, $18, $1D, $11, $0E, $1B, $FF, $16, $0E, $1D, $1B, $18, $12 |
; 'D .' | ; 'D .' |
LA23D: .byte $0D, $07 | LA23D: .byte $0D, $07 |
| |
LA23F: .byte $00 ;End PPU string write. | LA23F: .byte $00 ;End PPU string write. |
| |
;Writes end message on name table 0 in row $2200 (18th row from top). | ;Writes end message on name table 0 in row $2200 (18th row from top). |
LA240: .byte $22 ;PPU address high byte. | LA240: .byte $22 ;PPU address high byte. |
LA241: .byte $03 ;PPU address low byte. | LA241: .byte $03 ;PPU address low byte. |
LA242: .byte $18 ;PPU string length. | LA242: .byte $18 ;PPU string length. |
; 'P R A Y _ F O R _ A _ T R U E _' | ; 'P R A Y _ F O R _ A _ T R U E _' |
LA243: .byte $19, $1B, $0A, $22, $FF, $0F, $18, $1B, $FF, $0A, $FF, $1D, $1B, $1E, $0E, $FF | LA243: .byte $19, $1B, $0A, $22, $FF, $0F, $18, $1B, $FF, $0A, $FF, $1D, $1B, $1E, $0E, $FF |
; 'P E A C E _ I N' | ; 'P E A C E _ I N' |
LA253: .byte $19, $0E, $0A, $0C, $0E, $FF, $12, $17 | LA253: .byte $19, $0E, $0A, $0C, $0E, $FF, $12, $17 |
| |
;Writes end message on name table 0 in row $2240 (19th row from top). | ;Writes end message on name table 0 in row $2240 (19th row from top). |
LA25B: .byte $22 ;PPU address high byte. | LA25B: .byte $22 ;PPU address high byte. |
LA25C: .byte $42 ;PPU address low byte. | LA25C: .byte $42 ;PPU address low byte. |
LA25D: .byte $06 ;PPU string length. | LA25D: .byte $06 ;PPU string length. |
; 'S P A C E !' | ; 'S P A C E !' |
LA25E: .byte $1C, $19, $0A, $0C, $0E, $3F | LA25E: .byte $1C, $19, $0A, $0C, $0E, $3F |
| |
LA25F: .byte $00 ;End PPU string write. | LA25F: .byte $00 ;End PPU string write. |
| |
;The following pointer table is accessed by the NMIScreenWrite routine. | ;The following pointer table is accessed by the NMIScreenWrite routine. |
| |
EndMessageStringTbl1: | EndMessageStringTbl1: |
LA265: .word $A26D, $A276, $A27F, $A288 | LA265: .word $A26D, $A276, $A27F, $A288 |
| |
;Erases end message on name table 0 in row $2060 (4th row from top). | ;Erases end message on name table 0 in row $2060 (4th row from top). |
LA26D: .byte $20 ;PPU address high byte. | LA26D: .byte $20 ;PPU address high byte. |
LA26E: .byte $6D ;PPU address low byte. | LA26E: .byte $6D ;PPU address low byte. |
LA26F: .byte $48 ;PPU string length. | LA26F: .byte $48 ;PPU string length. |
LA270: .byte $FF ;Repeat bit set. Repeats entry 8 times. | LA270: .byte $FF ;Repeat bit set. Repeats entry 8 times. |
| |
;Erases end message on name table 0 in row $20C0 (7th row from top). | ;Erases end message on name table 0 in row $20C0 (7th row from top). |
LA271: .byte $20 ;PPU address high byte. | LA271: .byte $20 ;PPU address high byte. |
LA272: .byte $C3 ;PPU address low byte. | LA272: .byte $C3 ;PPU address low byte. |
LA273: .byte $5A ;PPU string length. | LA273: .byte $5A ;PPU string length. |
LA274: .byte $FF ;Repeat bit set. Repeats entry 26 times. | LA274: .byte $FF ;Repeat bit set. Repeats entry 26 times. |
| |
LA275: .byte $00 ;End PPU string write. | LA275: .byte $00 ;End PPU string write. |
| |
;Erases end message on name table 0 in row $2100 (9th row from top). | ;Erases end message on name table 0 in row $2100 (9th row from top). |
LA276: .byte $21 ;PPU address high byte. | LA276: .byte $21 ;PPU address high byte. |
LA277: .byte $03 ;PPU address low byte. | LA277: .byte $03 ;PPU address low byte. |
LA278: .byte $57 ;PPU string length. | LA278: .byte $57 ;PPU string length. |
LA279: .byte $FF ;Repeat bit set. Repeats entry 23 times. | LA279: .byte $FF ;Repeat bit set. Repeats entry 23 times. |
| |
;Erases end message on name table 0 in row $2140 (11th row from top). | ;Erases end message on name table 0 in row $2140 (11th row from top). |
LA27A: .byte $21 ;PPU address high byte. | LA27A: .byte $21 ;PPU address high byte. |
LA27B: .byte $42 ;PPU address low byte. | LA27B: .byte $42 ;PPU address low byte. |
LA27C: .byte $4A ;PPU string length. | LA27C: .byte $4A ;PPU string length. |
LA27D: .byte $FF ;Repeat bit set. Repeats entry 10 times. | LA27D: .byte $FF ;Repeat bit set. Repeats entry 10 times. |
| |
LA27E: .byte $00 ;End PPU string write. | LA27E: .byte $00 ;End PPU string write. |
| |
;Erases end message on name table 0 in row $2180 (13th row from top). | ;Erases end message on name table 0 in row $2180 (13th row from top). |
LA27F: .byte $21 ;PPU address high byte. | LA27F: .byte $21 ;PPU address high byte. |
LA280: .byte $83 ;PPU address low byte. | LA280: .byte $83 ;PPU address low byte. |
LA281: .byte $58 ;PPU string length. | LA281: .byte $58 ;PPU string length. |
LA282: .byte $FF ;Repeat bit set. Repeats entry 24 times. | LA282: .byte $FF ;Repeat bit set. Repeats entry 24 times. |
| |
;Erases end message on name table 0 in row $21C0 (15th row from top). | ;Erases end message on name table 0 in row $21C0 (15th row from top). |
LA283: .byte $21 ;PPU address high byte. | LA283: .byte $21 ;PPU address high byte. |
LA284: .byte $C2 ;PPU address low byte. | LA284: .byte $C2 ;PPU address low byte. |
LA285: .byte $52 ;PPU string length. | LA285: .byte $52 ;PPU string length. |
LA286: .byte $FF ;Repeat bit set. Repeats entry 12 times. | LA286: .byte $FF ;Repeat bit set. Repeats entry 12 times. |
| |
LA287: .byte $00 ;End PPU string write. | LA287: .byte $00 ;End PPU string write. |
| |
;Erases end message on name table 0 in row $2200 (18th row from top). | ;Erases end message on name table 0 in row $2200 (18th row from top). |
LA288: .byte $22 ;PPU address high byte. | LA288: .byte $22 ;PPU address high byte. |
LA289: .byte $03 ;PPU address low byte. | LA289: .byte $03 ;PPU address low byte. |
LA28A: .byte $58 ;PPU string length. | LA28A: .byte $58 ;PPU string length. |
LA28B: .byte $FF ;Repeat bit set. Repeats entry 24 times. | LA28B: .byte $FF ;Repeat bit set. Repeats entry 24 times. |
| |
| |
;Erases end message on name table 0 in row $2240 (19th row from top). | ;Erases end message on name table 0 in row $2240 (19th row from top). |
LA28C: .byte $22 ;PPU address high byte. | LA28C: .byte $22 ;PPU address high byte. |
LA28D: .byte $42 ;PPU address low byte. | LA28D: .byte $42 ;PPU address low byte. |
LA28E: .byte $4A ;PPU string length. | LA28E: .byte $4A ;PPU string length. |
LA28F: .byte $FF ;Repeat bit set. Repeats entry 10 times. | LA28F: .byte $FF ;Repeat bit set. Repeats entry 10 times. |
| |
LA290: .byte $00 ;End PPU string write | LA290: .byte $00 ;End PPU string write |
| |
;The following table is used by the LoadCredits routine to load the end credits on the screen. | ;The following table is used by the LoadCredits routine to load the end credits on the screen. |
| |
CreditsPointerTbl: | CreditsPointerTbl: |
LA291: .word $A2E9, $A2FB, $A31A, $A31B, $A32D, $A339, $A34F, $A362, $A375, $A384, $A39F, $A3AA | LA291: .word $A2E9, $A2FB, $A31A, $A31B, $A32D, $A339, $A34F, $A362, $A375, $A384, $A39F, $A3AA |
LA2A9: .word $A3C8, $A3D8, $A3F1, $A412, $A417, $A426, $A442, $A46B, $A470, $A493, $A49C, $A4AD | LA2A9: .word $A3C8, $A3D8, $A3F1, $A412, $A417, $A426, $A442, $A46B, $A470, $A493, $A49C, $A4AD |
LA2C1: .word $A4BD, $A4CD, $A4D2, $A4D7, $A4DC, $A4E1, $A4E6, $A4EB, $A4EF, $A4F0, $A508, $A51A | LA2C1: .word $A4BD, $A4CD, $A4D2, $A4D7, $A4DC, $A4E1, $A4E6, $A4EB, $A4EF, $A4F0, $A508, $A51A |
LA2D9: .word $A51F, $A524, $A51F, $A524, $A538, $A53D, $A538, $A53D | LA2D9: .word $A51F, $A524, $A51F, $A524, $A538, $A53D, $A538, $A53D |
| |
;Writes credits on name table 0 in row $2020 (2nd row from top). | ;Writes credits on name table 0 in row $2020 (2nd row from top). |
LA2E9: .byte $20 ;PPU address high byte. | LA2E9: .byte $20 ;PPU address high byte. |
LA2EA: .byte $2C ;PPU address low byte. | LA2EA: .byte $2C ;PPU address low byte. |
LA2EB: .byte $0A ;PPU string length. | LA2EB: .byte $0A ;PPU string length. |
; 'H A I _ Y U K A M I' | ; 'H A I _ Y U K A M I' |
LA2EC: .byte $11, $0A, $12, $FF, $22, $1E, $14, $0A, $16, $12 | LA2EC: .byte $11, $0A, $12, $FF, $22, $1E, $14, $0A, $16, $12 |
| |
;Clears attribute table 0 starting at $23C0. | ;Clears attribute table 0 starting at $23C0. |
LA2F6: .byte $23 ;PPU address high byte. | LA2F6: .byte $23 ;PPU address high byte. |
LA2F7: .byte $C0 ;PPU address low byte. | LA2F7: .byte $C0 ;PPU address low byte. |
LA2F8: .byte $60 ;PPU string length. | LA2F8: .byte $60 ;PPU string length. |
LA2F9: .byte $00 ;Repeat bit set. Repeats entry 32 times. | LA2F9: .byte $00 ;Repeat bit set. Repeats entry 32 times. |
| |
LA2FA: .byte $00 ;End PPU string write. | LA2FA: .byte $00 ;End PPU string write. |
| |
;Writes credits on name table 0 in row $2060 (4th row from top) | ;Writes credits on name table 0 in row $2060 (4th row from top) |
LA2FB: .byte $20 ;PPU address high byte. | LA2FB: .byte $20 ;PPU address high byte. |
LA2FC: .byte $6A ;PPU address low byte. | LA2FC: .byte $6A ;PPU address low byte. |
LA2FD: .byte $0D ;PPU string length. | LA2FD: .byte $0D ;PPU string length. |
; 'Z A R U _ S O B A J I M A' | ; 'Z A R U _ S O B A J I M A' |
LA2FE: .byte $23, $0A, $1B, $1E, $FF, $1C, $18, $0B, $0A, $13, $12, $16, $0A | LA2FE: .byte $23, $0A, $1B, $1E, $FF, $1C, $18, $0B, $0A, $13, $12, $16, $0A |
| |
;Writes credits on name table 0 in row $20A0 (6th row from top). | ;Writes credits on name table 0 in row $20A0 (6th row from top). |
LA30B: .byte $20 ;PPU address high byte. | LA30B: .byte $20 ;PPU address high byte. |
LA30C: .byte $AB ;PPU address low byte. | LA30C: .byte $AB ;PPU address low byte. |
LA30D: .byte $0B ;PPU string length. | LA30D: .byte $0B ;PPU string length. |
; 'G P Z _ S E N G O K U' | ; 'G P Z _ S E N G O K U' |
LA30E: .byte $10, $19, $23, $FF, $1C, $0E, $17, $10, $18, $14, $1E | LA30E: .byte $10, $19, $23, $FF, $1C, $0E, $17, $10, $18, $14, $1E |
| |
LA319: .byte $00 ;End PPU string write. | LA319: .byte $00 ;End PPU string write. |
LA31A: .byte $00 ;End PPU string write. | LA31A: .byte $00 ;End PPU string write. |
| |
;Writes credits on name table 0 in row $2160 (12th row from top). | ;Writes credits on name table 0 in row $2160 (12th row from top). |
LA31B: .byte $21 ;PPU address high byte. | LA31B: .byte $21 ;PPU address high byte. |
LA31C: .byte $6A ;PPU address low byte. | LA31C: .byte $6A ;PPU address low byte. |
LA31D: .byte $0A ;PPU string length. | LA31D: .byte $0A ;PPU string length. |
; 'N . S H I O T A N I' | ; 'N . S H I O T A N I' |
LA31E: .byte $17, $07, $1C, $11, $12, $18, $1D, $0A, $17, $12 | LA31E: .byte $17, $07, $1C, $11, $12, $18, $1D, $0A, $17, $12 |
| |
;Clears attribute table 0 starting at $23E0 | ;Clears attribute table 0 starting at $23E0 |
LA328: .byte $23 ;PPU address high byte. | LA328: .byte $23 ;PPU address high byte. |
LA329: .byte $E0 ;PPU address low byte. | LA329: .byte $E0 ;PPU address low byte. |
LA32A: .byte $60 ;PPU string length. | LA32A: .byte $60 ;PPU string length. |
LA32B: .byte $00 ;Repeat bit set. Repeats entry 32 times. | LA32B: .byte $00 ;Repeat bit set. Repeats entry 32 times. |
| |
LA32C: .byte $00 ;End PPU string write. | LA32C: .byte $00 ;End PPU string write. |
| |
;Writes credits on name table 0 in row $21E0 (16th row from top). | ;Writes credits on name table 0 in row $21E0 (16th row from top). |
LA32D: .byte $21 ;PPU address high byte. | LA32D: .byte $21 ;PPU address high byte. |
LA32E: .byte $EB ;PPU address low byte. | LA32E: .byte $EB ;PPU address low byte. |
LA32F: .byte $08 ;PPU string length. | LA32F: .byte $08 ;PPU string length. |
; 'M . H O U D A I' | ; 'M . H O U D A I' |
LA330: .byte $16, $07, $11, $18, $1E, $0D, $0A, $12 | LA330: .byte $16, $07, $11, $18, $1E, $0D, $0A, $12 |
| |
LA338: .byte $00 ;End PPU string write. | LA338: .byte $00 ;End PPU string write. |
| |
;Writes credits on name table 0 in row $22A0 (22nd row from top). | ;Writes credits on name table 0 in row $22A0 (22nd row from top). |
LA339: .byte $22 ;PPU address high byte. | LA339: .byte $22 ;PPU address high byte. |
LA33A: .byte $A7 ;PPU address low byte. | LA33A: .byte $A7 ;PPU address low byte. |
LA33B: .byte $12 ;PPU string length. | LA33B: .byte $12 ;PPU string length. |
; 'S P E C I A L _ T H A N K S _ _ ' | ; 'S P E C I A L _ T H A N K S _ _ ' |
LA33C: .byte $1C, $19, $0E, $0C, $12, $0A, $15, $FF, $1D, $11, $0A, $17, $14, $1C, $FF, $FF | LA33C: .byte $1C, $19, $0E, $0C, $12, $0A, $15, $FF, $1D, $11, $0A, $17, $14, $1C, $FF, $FF |
; 'T O' | ; 'T O' |
LA34C: .byte $1D, $18 | LA34C: .byte $1D, $18 |
| |
LA34E: .byte $00 ;End PPU string write. | LA34E: .byte $00 ;End PPU string write. |
| |
;Writes credits on name table 0 in row $22E0 (24nd row from top). | ;Writes credits on name table 0 in row $22E0 (24nd row from top). |
LA34F: .byte $22 ;PPU address high byte. | LA34F: .byte $22 ;PPU address high byte. |
LA350: .byte $EC ;PPU address low byte. | LA350: .byte $EC ;PPU address low byte. |
LA351: .byte $08 ;PPU string length. | LA351: .byte $08 ;PPU string length. |
; 'K E N _ Z U R I' | ; 'K E N _ Z U R I' |
LA352: .byte $14, $0E, $17, $FF, $23, $1E, $1B, $12 | LA352: .byte $14, $0E, $17, $FF, $23, $1E, $1B, $12 |
| |
;Writes credits on name table 0 in row $2320 (26nd row from top). | ;Writes credits on name table 0 in row $2320 (26nd row from top). |
LA35A: .byte $23 ;PPU address high byte. | LA35A: .byte $23 ;PPU address high byte. |
LA35B: .byte $2E ;PPU address low byte. | LA35B: .byte $2E ;PPU address low byte. |
LA35C: .byte $04 ;PPU string length. | LA35C: .byte $04 ;PPU string length. |
; 'S U M I' | ; 'S U M I' |
LA35D: .byte $1C, $1E, $16, $12 | LA35D: .byte $1C, $1E, $16, $12 |
| |
LA361: .byte $00 ;End PPU string write. | LA361: .byte $00 ;End PPU string write. |
| |
;Writes credits on name table 0 in row $2360 (28nd row from top). | ;Writes credits on name table 0 in row $2360 (28nd row from top). |
LA362: .byte $23 ;PPU address high byte. | LA362: .byte $23 ;PPU address high byte. |
LA363: .byte $6C ;PPU address low byte. | LA363: .byte $6C ;PPU address low byte. |
LA364: .byte $07 ;PPU string length. | LA364: .byte $07 ;PPU string length. |
; 'I N U S A W A' | ; 'I N U S A W A' |
LA365: .byte $12, $17, $1E, $1C, $0A, $20, $0A | LA365: .byte $12, $17, $1E, $1C, $0A, $20, $0A |
| |
;Writes credits on name table 0 in row $23A0 (bottom row). | ;Writes credits on name table 0 in row $23A0 (bottom row). |
LA36C: .byte $23 ;PPU address high byte. | LA36C: .byte $23 ;PPU address high byte. |
LA36D: .byte $AD ;PPU address low byte. | LA36D: .byte $AD ;PPU address low byte. |
LA36E: .byte $05 ;PPU string length. | LA36E: .byte $05 ;PPU string length. |
; 'K A C H O' | ; 'K A C H O' |
LA36F: .byte $14, $0A, $0C, $11, $18 | LA36F: .byte $14, $0A, $0C, $11, $18 |
| |
LA374: .byte $00 ;End PPU string write. | LA374: .byte $00 ;End PPU string write. |
| |
;Writes credits on name table 2 in row $2820 (2nd row from top). | ;Writes credits on name table 2 in row $2820 (2nd row from top). |
LA375: .byte $28 ;PPU address high byte. | LA375: .byte $28 ;PPU address high byte. |
LA376: .byte $28 ;PPU address low byte. | LA376: .byte $28 ;PPU address low byte. |
LA377: .byte $4E ;PPU string length. | LA377: .byte $4E ;PPU string length. |
LA378: .byte $FF ;Repeat bit set. Repeats entry 14 times. | LA378: .byte $FF ;Repeat bit set. Repeats entry 14 times. |
| |
;Writes credits on name table 2 in row $2860 (4th row from top). | ;Writes credits on name table 2 in row $2860 (4th row from top). |
LA379: .byte $28 ;PPU address high byte. | LA379: .byte $28 ;PPU address high byte. |
LA37A: .byte $6C ;PPU address low byte. | LA37A: .byte $6C ;PPU address low byte. |
LA37B: .byte $07 ;PPU string length. | LA37B: .byte $07 ;PPU string length. |
; 'H Y A K K A N' | ; 'H Y A K K A N' |
LA37C: .byte $11, $22, $0A, $14, $14, $0A, $17 | LA37C: .byte $11, $22, $0A, $14, $14, $0A, $17 |
| |
LA383: .byte $00 ;End PPU string write. | LA383: .byte $00 ;End PPU string write. |
| |
;Writes credits on name table 2 in row $28A0 (6th row from top). | ;Writes credits on name table 2 in row $28A0 (6th row from top). |
LA384: .byte $28 ;PPU address high byte. | LA384: .byte $28 ;PPU address high byte. |
LA385: .byte $A8 ;PPU address low byte. | LA385: .byte $A8 ;PPU address low byte. |
LA386: .byte $13 ;PPU string length. | LA386: .byte $13 ;PPU string length. |
; '_ _ _ _ _ G O Y A K E _ _ _ _ _' | ; '_ _ _ _ _ G O Y A K E _ _ _ _ _' |
LA387: .byte $FF, $FF, $FF, $FF, $FF, $10, $18, $22, $0A, $14, $0E, $FF, $FF, $FF, $FF, $FF | LA387: .byte $FF, $FF, $FF, $FF, $FF, $10, $18, $22, $0A, $14, $0E, $FF, $FF, $FF, $FF, $FF |
; '_ _ _' | ; '_ _ _' |
LA397: .byte $FF, $FF, $FF | LA397: .byte $FF, $FF, $FF |
| |
;Writes credits on name table 2 in row $28E0 (8th row from top). | ;Writes credits on name table 2 in row $28E0 (8th row from top). |
LA39A: .byte $28 ;PPU address high byte. | LA39A: .byte $28 ;PPU address high byte. |
LA39B: .byte $E8 ;PPU address low byte. | LA39B: .byte $E8 ;PPU address low byte. |
LA39C: .byte $4F ;PPU string length. | LA39C: .byte $4F ;PPU string length. |
LA39D: .byte $FF ;Repeat bit set. Repeats entry 15 times. | LA39D: .byte $FF ;Repeat bit set. Repeats entry 15 times. |
| |
LA39E: .byte $00 ;End PPU string write. | LA39E: .byte $00 ;End PPU string write. |
| |
;Writes credits on name table 2 in row $2920 (10th row from top). | ;Writes credits on name table 2 in row $2920 (10th row from top). |
LA39F: .byte $29 ;PPU address high byte. | LA39F: .byte $29 ;PPU address high byte. |
LA3A0: .byte $2C ;PPU address low byte. | LA3A0: .byte $2C ;PPU address low byte. |
LA3A1: .byte $07 ;PPU string length. | LA3A1: .byte $07 ;PPU string length. |
; 'H A R A D A _' | ; 'H A R A D A _' |
LA3A2: .byte $11, $0A, $1B, $0A, $0D, $0A, $FF | LA3A2: .byte $11, $0A, $1B, $0A, $0D, $0A, $FF |
| |
LA3A9: .byte $00 ;End PPU string write. | LA3A9: .byte $00 ;End PPU string write. |
| |
;Writes credits on name table 2 in row $2960 (12th row from top). | ;Writes credits on name table 2 in row $2960 (12th row from top). |
LA3AA: .byte $29 ;PPU address high byte. | LA3AA: .byte $29 ;PPU address high byte. |
LA3AB: .byte $66 ;PPU address low byte. | LA3AB: .byte $66 ;PPU address low byte. |
LA3AC: .byte $16 ;PPU string length. | LA3AC: .byte $16 ;PPU string length. |
; '_ _ _ _ _ _ _ P E N P E N _ _ _' | ; '_ _ _ _ _ _ _ P E N P E N _ _ _' |
LA3AD: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $19, $0E, $17, $19, $0E, $17, $FF, $FF, $FF | LA3AD: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $19, $0E, $17, $19, $0E, $17, $FF, $FF, $FF |
; '_ _ _ _ _ _' | ; '_ _ _ _ _ _' |
LA3BD: .byte $FF, $FF, $FF, $FF, $FF, $FF | LA3BD: .byte $FF, $FF, $FF, $FF, $FF, $FF |
| |
;Writes credits on name table 2 in row $29A0 (14th row from top). | ;Writes credits on name table 2 in row $29A0 (14th row from top). |
LA3C3: .byte $29 ;PPU address high byte. | LA3C3: .byte $29 ;PPU address high byte. |
LA3C4: .byte $A8 ;PPU address low byte. | LA3C4: .byte $A8 ;PPU address low byte. |
LA3C5: .byte $4F ;PPU string length. | LA3C5: .byte $4F ;PPU string length. |
LA3C6: .byte $FF ;Repeat bit set. Repeats entry 15 times. | LA3C6: .byte $FF ;Repeat bit set. Repeats entry 15 times. |
| |
LA3C7: .byte $00 ;End PPU string write. | LA3C7: .byte $00 ;End PPU string write. |
| |
;Writes credits on name table 2 in row $29E0 (16th row from top). | ;Writes credits on name table 2 in row $29E0 (16th row from top). |
LA3C8: .byte $29 ;PPU address high byte. | LA3C8: .byte $29 ;PPU address high byte. |
LA3C9: .byte $EA ;PPU address low byte. | LA3C9: .byte $EA ;PPU address low byte. |
LA3CA: .byte $0C ;PPU string length. | LA3CA: .byte $0C ;PPU string length. |
; 'C O N V E R T E D _ B Y' | ; 'C O N V E R T E D _ B Y' |
LA3CB: .byte $0C, $18, $17, $1F, $0E, $1B, $1D, $0E, $0D, $FF, $0B, $22 | LA3CB: .byte $0C, $18, $17, $1F, $0E, $1B, $1D, $0E, $0D, $FF, $0B, $22 |
| |
LA3D7: .byte $00 ;End PPU string write. | LA3D7: .byte $00 ;End PPU string write. |
| |
;Writes credits on name table 2 in row $2A20 (18th row from top). | ;Writes credits on name table 2 in row $2A20 (18th row from top). |
LA3D8: .byte $2A ;PPU address high byte. | LA3D8: .byte $2A ;PPU address high byte. |
LA3D9: .byte $26 ;PPU address low byte. | LA3D9: .byte $26 ;PPU address low byte. |
LA3DA: .byte $11 ;PPU string length. | LA3DA: .byte $11 ;PPU string length. |
; '_ _ _ _ _ T . N A R I H I R O _' | ; '_ _ _ _ _ T . N A R I H I R O _' |
LA3DB: .byte $FF, $FF, $FF, $FF, $FF, $1D, $07, $17, $0A, $1B, $12, $11, $12, $1B, $18, $FF | LA3DB: .byte $FF, $FF, $FF, $FF, $FF, $1D, $07, $17, $0A, $1B, $12, $11, $12, $1B, $18, $FF |
; '_' | ; '_' |
LA3EB: .byte $FF | LA3EB: .byte $FF |
| |
;Writes credits on name table 2 in row $2A60 (20th row from top). | ;Writes credits on name table 2 in row $2A60 (20th row from top). |
LA3EC: .byte $2A ;PPU address high byte. | LA3EC: .byte $2A ;PPU address high byte. |
LA3ED: .byte $67 ;PPU address low byte. | LA3ED: .byte $67 ;PPU address low byte. |
LA3EE: .byte $51 ;PPU string length. | LA3EE: .byte $51 ;PPU string length. |
LA3EF: .byte $FF ;Repeat bit set. Repeats entry 17 times. | LA3EF: .byte $FF ;Repeat bit set. Repeats entry 17 times. |
| |
LA3F0: .byte $00 ;End PPU string write. | LA3F0: .byte $00 ;End PPU string write. |
| |
;Writes credits on name table 2 in row $2AE0 (24th row from top). | ;Writes credits on name table 2 in row $2AE0 (24th row from top). |
LA3F1: .byte $2A ;PPU address high byte. | LA3F1: .byte $2A ;PPU address high byte. |
LA3F2: .byte $EB ;PPU address low byte. | LA3F2: .byte $EB ;PPU address low byte. |
LA3F3: .byte $0B ;PPU string length. | LA3F3: .byte $0B ;PPU string length. |
; 'A S S I S T E D _ B Y' | ; 'A S S I S T E D _ B Y' |
LA3F4: .byte $0A, $1C, $1C, $12, $1C, $1D, $0E, $0D, $FF, $0B, $22 | LA3F4: .byte $0A, $1C, $1C, $12, $1C, $1D, $0E, $0D, $FF, $0B, $22 |
| |
;Writes credits on name table 2 in row $2B20 (26th row from top). | ;Writes credits on name table 2 in row $2B20 (26th row from top). |
LA3FF: .byte $2B ;PPU address high byte. | LA3FF: .byte $2B ;PPU address high byte. |
LA400: .byte $28 ;PPU address low byte. | LA400: .byte $28 ;PPU address low byte. |
LA401: .byte $0F ;PPU string length. | LA401: .byte $0F ;PPU string length. |
; '_ _ _ M A K O T O _ K A N O H' | ; '_ _ _ M A K O T O _ K A N O H' |
LA402: .byte $FF, $FF, $FF, $16, $0A, $14, $18, $1D, $18, $FF, $14, $0A, $17, $18, $11 | LA402: .byte $FF, $FF, $FF, $16, $0A, $14, $18, $1D, $18, $FF, $14, $0A, $17, $18, $11 |
| |
LA411: .byte $00 ;End PPU string write. | LA411: .byte $00 ;End PPU string write. |
| |
;Writes credits on name table 2 in row $2BA0 (bottom row). | ;Writes credits on name table 2 in row $2BA0 (bottom row). |
LA412: .byte $2B ;PPU address high byte. | LA412: .byte $2B ;PPU address high byte. |
LA413: .byte $A6 ;PPU address low byte. | LA413: .byte $A6 ;PPU address low byte. |
LA414: .byte $53 ;PPU string length. | LA414: .byte $53 ;PPU string length. |
LA415: .byte $FF ;Repeat bit set. Repeats entry 19 times. | LA415: .byte $FF ;Repeat bit set. Repeats entry 19 times. |
| |
LA416: .byte $00 ;End PPU string write. | LA416: .byte $00 ;End PPU string write. |
| |
;Writes credits on name table 0 in row $2020 (2nd row from the top). | ;Writes credits on name table 0 in row $2020 (2nd row from the top). |
LA417: .byte $20 ;PPU address high byte. | LA417: .byte $20 ;PPU address high byte. |
LA418: .byte $2B ;PPU address low byte. | LA418: .byte $2B ;PPU address low byte. |
LA419: .byte $0B ;PPU string length. | LA419: .byte $0B ;PPU string length. |
; 'D I R E C T E D _ B Y' | ; 'D I R E C T E D _ B Y' |
LA41A: .byte $0D, $12, $1B, $0E, $0C, $1D, $0E, $0D, $FF, $0B, $22 | LA41A: .byte $0D, $12, $1B, $0E, $0C, $1D, $0E, $0D, $FF, $0B, $22 |
| |
LA425: .byte $00 ;End PPU string write. | LA425: .byte $00 ;End PPU string write. |
| |
;Writes credits on name table 0 in row $2060 (4th row from the top). | ;Writes credits on name table 0 in row $2060 (4th row from the top). |
LA426: .byte $20 ;PPU address high byte. | LA426: .byte $20 ;PPU address high byte. |
LA427: .byte $67 ;PPU address low byte. | LA427: .byte $67 ;PPU address low byte. |
LA428: .byte $14 ;PPU string length. | LA428: .byte $14 ;PPU string length. |
; '_ _ _ _ _ Y A M A M O T O _ _ _' | ; '_ _ _ _ _ Y A M A M O T O _ _ _' |
LA429: .byte $FF, $FF, $FF, $FF, $FF, $22, $0A, $16, $0A, $16, $18, $1D, $18, $FF, $FF, $FF | LA429: .byte $FF, $FF, $FF, $FF, $FF, $22, $0A, $16, $0A, $16, $18, $1D, $18, $FF, $FF, $FF |
; '_ _ _ _' | ; '_ _ _ _' |
LA439: .byte $FF, $FF, $FF, $FF | LA439: .byte $FF, $FF, $FF, $FF |
| |
;Writes credits on name table 0 in row $20A0 (6th row from the top). | ;Writes credits on name table 0 in row $20A0 (6th row from the top). |
LA43D: .byte $20 ;PPU address high byte. | LA43D: .byte $20 ;PPU address high byte. |
LA43E: .byte $AA ;PPU address low byte. | LA43E: .byte $AA ;PPU address low byte. |
LA43F: .byte $4E ;PPU string length. | LA43F: .byte $4E ;PPU string length. |
LA440: .byte $FF ;Repeat bit set. Repeats entry 14 times. | LA440: .byte $FF ;Repeat bit set. Repeats entry 14 times. |
| |
LA441: .byte $00 ;End PPU string write. | LA441: .byte $00 ;End PPU string write. |
| |
;Writes credits on name table 0 in row $2120 (10th row from the top). | ;Writes credits on name table 0 in row $2120 (10th row from the top). |
LA442: .byte $21 ;PPU address high byte. | LA442: .byte $21 ;PPU address high byte. |
LA443: .byte $27 ;PPU address low byte. | LA443: .byte $27 ;PPU address low byte. |
LA444: .byte $11 ;PPU string length. | LA444: .byte $11 ;PPU string length. |
; '_ _ C H I E F _ D I R E C T O R' | ; '_ _ C H I E F _ D I R E C T O R' |
LA445: .byte $FF, $FF, $0C, $11, $12, $0E, $0F, $FF, $0D, $12, $1B, $0E, $0C, $1D, $18, $1B | LA445: .byte $FF, $FF, $0C, $11, $12, $0E, $0F, $FF, $0D, $12, $1B, $0E, $0C, $1D, $18, $1B |
; '_' | ; '_' |
LA455: .byte $FF | LA455: .byte $FF |
| |
;Writes credits on name table 0 in row $2160 (12th row from the top). | ;Writes credits on name table 0 in row $2160 (12th row from the top). |
LA456: .byte $21 ;PPU address high byte. | LA456: .byte $21 ;PPU address high byte. |
LA457: .byte $68 ;PPU address low byte. | LA457: .byte $68 ;PPU address low byte. |
LA458: .byte $11 ;PPU string length. | LA458: .byte $11 ;PPU string length. |
; '_ _ S A T O R U _ O K A D A _ _' | ; '_ _ S A T O R U _ O K A D A _ _' |
LA459: .byte $FF, $FF, $1C, $0A, $1D, $18, $1B, $1E, $FF, $18, $14, $0A, $0D, $0A, $FF, $FF | LA459: .byte $FF, $FF, $1C, $0A, $1D, $18, $1B, $1E, $FF, $18, $14, $0A, $0D, $0A, $FF, $FF |
; '_' | ; '_' |
LA469: .byte $FF | LA469: .byte $FF |
| |
LA46A: .byte $00 ;End PPU string write. | LA46A: .byte $00 ;End PPU string write. |
| |
;Writes credits on name table 0 in row $21E0 (16th row from the top). | ;Writes credits on name table 0 in row $21E0 (16th row from the top). |
LA46B: .byte $21 ;PPU address high byte. | LA46B: .byte $21 ;PPU address high byte. |
LA46C: .byte $E6 ;PPU address low byte. | LA46C: .byte $E6 ;PPU address low byte. |
LA46D: .byte $58 ;PPU string length. | LA46D: .byte $58 ;PPU string length. |
LA46E: .byte $FF ;Repeat bit set. Repeats entry 24 times. | LA46E: .byte $FF ;Repeat bit set. Repeats entry 24 times. |
| |
LA46F: .byte $00 ;End PPU string write. | LA46F: .byte $00 ;End PPU string write. |
| |
;Writes credits on name table 0 in row $2220 (18th row from the top). | ;Writes credits on name table 0 in row $2220 (18th row from the top). |
LA470: .byte $22 ;PPU address high byte. | LA470: .byte $22 ;PPU address high byte. |
LA471: .byte $2B ;PPU address low byte. | LA471: .byte $2B ;PPU address low byte. |
LA472: .byte $10 ;PPU string length. | LA472: .byte $10 ;PPU string length. |
; 'P R O D U C E D _ B Y _ _ _ _ _' | ; 'P R O D U C E D _ B Y _ _ _ _ _' |
LA473: .byte $19, $1B, $18, $0D, $1E, $0C, $0E, $0D, $FF, $0B, $22, $FF, $FF, $FF, $FF, $FF | LA473: .byte $19, $1B, $18, $0D, $1E, $0C, $0E, $0D, $FF, $0B, $22, $FF, $FF, $FF, $FF, $FF |
| |
;Writes credits on name table 0 in row $2260 (20th row from the top). | ;Writes credits on name table 0 in row $2260 (20th row from the top). |
LA483: .byte $22 ;PPU address high byte. | LA483: .byte $22 ;PPU address high byte. |
LA484: .byte $6A ;PPU address low byte. | LA484: .byte $6A ;PPU address low byte. |
LA485: .byte $0C ;PPU string length. | LA485: .byte $0C ;PPU string length. |
; 'G U N P E I _ Y O K O I' | ; 'G U N P E I _ Y O K O I' |
LA486: .byte $10, $1E, $17, $19, $0E, $12, $FF, $22, $18, $14, $18, $12 | LA486: .byte $10, $1E, $17, $19, $0E, $12, $FF, $22, $18, $14, $18, $12 |
| |
LA492: .byte $00 ;End PPU string write. | LA492: .byte $00 ;End PPU string write. |
| |
;Writes credits on name table 0 in row $22A0 (22nd row from the top). | ;Writes credits on name table 0 in row $22A0 (22nd row from the top). |
LA493: .byte $22 ;PPU address high byte. | LA493: .byte $22 ;PPU address high byte. |
LA494: .byte $A6 ;PPU address low byte. | LA494: .byte $A6 ;PPU address low byte. |
LA495: .byte $53 ;PPU string length. | LA495: .byte $53 ;PPU string length. |
LA496: .byte $FF ;Repeat bit set. Repeats entry 19 times. | LA496: .byte $FF ;Repeat bit set. Repeats entry 19 times. |
| |
;Writes credits on name table 0 in row $22E0 (24th row from the top). | ;Writes credits on name table 0 in row $22E0 (24th row from the top). |
LA497: .byte $22 ;PPU address high byte. | LA497: .byte $22 ;PPU address high byte. |
LA498: .byte $E8 ;PPU address low byte. | LA498: .byte $E8 ;PPU address low byte. |
LA499: .byte $4F ;PPU string length. | LA499: .byte $4F ;PPU string length. |
LA49A: .byte $FF ;Repeat bit set. Repeats entry 15 times. | LA49A: .byte $FF ;Repeat bit set. Repeats entry 15 times. |
| |
LA49B: .byte $00 ;End PPU string write. | LA49B: .byte $00 ;End PPU string write. |
| |
;Writes credits on name table 0 in row $2320 (26th row from the top). | ;Writes credits on name table 0 in row $2320 (26th row from the top). |
LA49C: .byte $23 ;PPU address high byte. | LA49C: .byte $23 ;PPU address high byte. |
LA49D: .byte $29 ;PPU address low byte. | LA49D: .byte $29 ;PPU address low byte. |
LA49E: .byte $4D ;PPU string length. | LA49E: .byte $4D ;PPU string length. |
LA49F: .byte $FF ;Repeat bit set. Repeats entry 13 times. | LA49F: .byte $FF ;Repeat bit set. Repeats entry 13 times. |
| |
;Writes credits on name table 0 in row $2340 (27th row from the top). | ;Writes credits on name table 0 in row $2340 (27th row from the top). |
LA4A0: .byte $23 ;PPU address high byte. | LA4A0: .byte $23 ;PPU address high byte. |
LA4A1: .byte $4B ;PPU address low byte. | LA4A1: .byte $4B ;PPU address low byte. |
LA4A2: .byte $09 ;PPU string length. | LA4A2: .byte $09 ;PPU string length. |
; 'C O P Y R I G H T' | ; 'C O P Y R I G H T' |
LA4A3: .byte $0C, $18, $19, $22, $1B, $12, $10, $11, $1D | LA4A3: .byte $0C, $18, $19, $22, $1B, $12, $10, $11, $1D |
| |
LA4AC: .byte $00 ;End PPU string write. | LA4AC: .byte $00 ;End PPU string write. |
| |
;Writes credits on name table 0 in row $2360 (28th row from the top). | ;Writes credits on name table 0 in row $2360 (28th row from the top). |
LA4AD: .byte $23 ;PPU address high byte. | LA4AD: .byte $23 ;PPU address high byte. |
LA4AE: .byte $6B ;PPU address low byte. | LA4AE: .byte $6B ;PPU address low byte. |
LA4AF: .byte $4A ;PPU string length. | LA4AF: .byte $4A ;PPU string length. |
LA4B0: .byte $FF ;Repeat bit set. Repeats entry 10 times. | LA4B0: .byte $FF ;Repeat bit set. Repeats entry 10 times. |
| |
;Writes credits on name table 0 in row $2380 (29th row from the top). | ;Writes credits on name table 0 in row $2380 (29th row from the top). |
LA4B1: .byte $23 ;PPU address high byte. | LA4B1: .byte $23 ;PPU address high byte. |
LA4B2: .byte $8E ;PPU address low byte. | LA4B2: .byte $8E ;PPU address low byte. |
LA4B3: .byte $04 ;PPU string length. | LA4B3: .byte $04 ;PPU string length. |
; '1 9 8 6' | ; '1 9 8 6' |
LA4B4: .byte $01, $09, $08, $06 | LA4B4: .byte $01, $09, $08, $06 |
| |
;Writes credits on name table 0 in row $23A0 (bottom row). | ;Writes credits on name table 0 in row $23A0 (bottom row). |
LA4B8: .byte $23 ;PPU address high byte. | LA4B8: .byte $23 ;PPU address high byte. |
LA4B9: .byte $A8 ;PPU address low byte. | LA4B9: .byte $A8 ;PPU address low byte. |
LA4BA: .byte $4F ;PPU string length. | LA4BA: .byte $4F ;PPU string length. |
LA4BB: .byte $FF ;Repeat bit set. Repeats entry 10 times. | LA4BB: .byte $FF ;Repeat bit set. Repeats entry 10 times. |
| |
LA4BC: .byte $00 ;End PPU string write. | LA4BC: .byte $00 ;End PPU string write. |
| |
;Writes credits on name table 2 in row $2800 (top row) | ;Writes credits on name table 2 in row $2800 (top row) |
LA4BD: .byte $28 ;PPU address high byte. | LA4BD: .byte $28 ;PPU address high byte. |
LA4BE: .byte $0C ;PPU address low byte. | LA4BE: .byte $0C ;PPU address low byte. |
LA4BF: .byte $08 ;PPU string length. | LA4BF: .byte $08 ;PPU string length. |
; 'N I N T E N D O' | ; 'N I N T E N D O' |
LA4C0: .byte $17, $12, $17, $1D, $0E, $17, $0D, $18 | LA4C0: .byte $17, $12, $17, $1D, $0E, $17, $0D, $18 |
| |
;Writes credits on name table 2 in row $2860 (4th row from top). | ;Writes credits on name table 2 in row $2860 (4th row from top). |
LA4C8: .byte $28 ;PPU address high byte. | LA4C8: .byte $28 ;PPU address high byte. |
LA4C9: .byte $66 ;PPU address low byte. | LA4C9: .byte $66 ;PPU address low byte. |
LA4CA: .byte $51 ;PPU string length. | LA4CA: .byte $51 ;PPU string length. |
LA4CB: .byte $FF ;Repeat bit set. Repeats entry 17 times. | LA4CB: .byte $FF ;Repeat bit set. Repeats entry 17 times. |
| |
LA4CC: .byte $00 ;End PPU string write. | LA4CC: .byte $00 ;End PPU string write. |
| |
;Writes credits on name table 2 in row $28A0 (6th row from top). | ;Writes credits on name table 2 in row $28A0 (6th row from top). |
LA4CD: .byte $28 ;PPU address high byte. | LA4CD: .byte $28 ;PPU address high byte. |
LA4CE: .byte $AA ;PPU address low byte. | LA4CE: .byte $AA ;PPU address low byte. |
LA4CF: .byte $4C ;PPU string length. | LA4CF: .byte $4C ;PPU string length. |
LA4D0: .byte $FF ;Repeat bit set. Repeats entry 12 times. | LA4D0: .byte $FF ;Repeat bit set. Repeats entry 12 times. |
| |
LA4D1: .byte $00 ;End PPU string write. | LA4D1: .byte $00 ;End PPU string write. |
| |
;Writes credits on name table 2 in row $2920 (10th row from top). | ;Writes credits on name table 2 in row $2920 (10th row from top). |
LA4D2: .byte $29 ;PPU address high byte. | LA4D2: .byte $29 ;PPU address high byte. |
LA4D3: .byte $26 ;PPU address low byte. | LA4D3: .byte $26 ;PPU address low byte. |
LA4D4: .byte $5B ;PPU string length. | LA4D4: .byte $5B ;PPU string length. |
LA4D5: .byte $FF ;Repeat bit set. Repeats entry 27 times. | LA4D5: .byte $FF ;Repeat bit set. Repeats entry 27 times. |
| |
LA4D6: .byte $00 ;End PPU string write. | LA4D6: .byte $00 ;End PPU string write. |
| |
;Writes credits on name table 2 in row $2960 (12th row from top). | ;Writes credits on name table 2 in row $2960 (12th row from top). |
LA4D7: .byte $29 ;PPU address high byte. | LA4D7: .byte $29 ;PPU address high byte. |
LA4D8: .byte $67 ;PPU address low byte. | LA4D8: .byte $67 ;PPU address low byte. |
LA4D9: .byte $52 ;PPU string length. | LA4D9: .byte $52 ;PPU string length. |
LA4DA: .byte $FF ;Repeat bit set. Repeats entry 18 times. | LA4DA: .byte $FF ;Repeat bit set. Repeats entry 18 times. |
| |
LA4DB: .byte $00 ;End PPU string write. | LA4DB: .byte $00 ;End PPU string write. |
| |
;Writes credits on name table 2 in row $29E0 (16th row from top). | ;Writes credits on name table 2 in row $29E0 (16th row from top). |
LA4DC: .byte $29 ;PPU address high byte. | LA4DC: .byte $29 ;PPU address high byte. |
LA4DD: .byte $E6 ;PPU address low byte. | LA4DD: .byte $E6 ;PPU address low byte. |
LA4DE: .byte $54 ;PPU string length. | LA4DE: .byte $54 ;PPU string length. |
LA4DF: .byte $FF ;Repeat bit set. Repeats entry 20 times. | LA4DF: .byte $FF ;Repeat bit set. Repeats entry 20 times. |
| |
LA4E0: .byte $00 ;End PPU string write. | LA4E0: .byte $00 ;End PPU string write. |
| |
;Writes credits on name table 2 in row $2A20 (18th row from top). | ;Writes credits on name table 2 in row $2A20 (18th row from top). |
LA4E1: .byte $2A ;PPU address high byte. | LA4E1: .byte $2A ;PPU address high byte. |
LA4E2: .byte $28 ;PPU address low byte. | LA4E2: .byte $28 ;PPU address low byte. |
LA4E3: .byte $55 ;PPU string length. | LA4E3: .byte $55 ;PPU string length. |
LA4E4: .byte $FF ;Repeat bit set. Repeats entry 21 times. | LA4E4: .byte $FF ;Repeat bit set. Repeats entry 21 times. |
| |
LA4E5: .byte $00 ;End PPU string write. | LA4E5: .byte $00 ;End PPU string write. |
| |
;Writes credits on name table 2 in row $2AE0 (24th row from top). | ;Writes credits on name table 2 in row $2AE0 (24th row from top). |
LA4E6: .byte $2A ;PPU address high byte. | LA4E6: .byte $2A ;PPU address high byte. |
LA4E7: .byte $E6 ;PPU address low byte. | LA4E7: .byte $E6 ;PPU address low byte. |
LA4E8: .byte $50 ;PPU string length. | LA4E8: .byte $50 ;PPU string length. |
LA4E9: .byte $FF ;Repeat bit set. Repeats entry 16 times. | LA4E9: .byte $FF ;Repeat bit set. Repeats entry 16 times. |
| |
LA4EA: .byte $00 ;End PPU string write. | LA4EA: .byte $00 ;End PPU string write. |
| |
;Writes credits on name table 2 in row $2B20 (26th row from top). | ;Writes credits on name table 2 in row $2B20 (26th row from top). |
LA4EB: .byte $2B ;PPU address high byte. | LA4EB: .byte $2B ;PPU address high byte. |
LA4EC: .byte $29 ;PPU address low byte. | LA4EC: .byte $29 ;PPU address low byte. |
LA4ED: .byte $4E ;PPU string length. | LA4ED: .byte $4E ;PPU string length. |
LA4EE: .byte $FF ;Repeat bit set. Repeats entry 14 times. | LA4EE: .byte $FF ;Repeat bit set. Repeats entry 14 times. |
| |
LA4EF: .byte $00 ;End PPU string write. | LA4EF: .byte $00 ;End PPU string write. |
| |
;Writes the top half of 'The End' on name table 0 in row $2020 (2nd row from top). | ;Writes the top half of 'The End' on name table 0 in row $2020 (2nd row from top). |
LA4F0: .byte $20 ;PPU address high byte. | LA4F0: .byte $20 ;PPU address high byte. |
LA4F1: .byte $26 ;PPU address low byte. | LA4F1: .byte $26 ;PPU address low byte. |
LA4F2: .byte $14 ;PPU string length. | LA4F2: .byte $14 ;PPU string length. |
LA4F3: .byte $FF, $FF, $FF, $FF, $FF, $24, $25, $26, $27, $FF, $FF, $2C, $2D, $2E, $2F, $FF | LA4F3: .byte $FF, $FF, $FF, $FF, $FF, $24, $25, $26, $27, $FF, $FF, $2C, $2D, $2E, $2F, $FF |
LA503: .byte $FF, $FF, $FF, $FF | LA503: .byte $FF, $FF, $FF, $FF |
| |
LA507: .byte $00 ;End PPU string write. | LA507: .byte $00 ;End PPU string write. |
| |
;Writes the bottom half of 'The End' on name table 0 in row $2040 (3rd row from top). | ;Writes the bottom half of 'The End' on name table 0 in row $2040 (3rd row from top). |
LA508: .byte $20 ;PPU address high byte. | LA508: .byte $20 ;PPU address high byte. |
LA509: .byte $4B ;PPU address low byte. | LA509: .byte $4B ;PPU address low byte. |
LA50A: .byte $0A ;PPU string length. | LA50A: .byte $0A ;PPU string length. |
LA50B: .byte $28, $29, $2A, $2B, $FF, $FF, $02, $03, $04, $05 | LA50B: .byte $28, $29, $2A, $2B, $FF, $FF, $02, $03, $04, $05 |
| |
;Writes credits on name table 0 in row $2060 (4th row from top). | ;Writes credits on name table 0 in row $2060 (4th row from top). |
LA515: .byte $20 ;PPU address high byte. | LA515: .byte $20 ;PPU address high byte. |
LA516: .byte $6A ;PPU address low byte. | LA516: .byte $6A ;PPU address low byte. |
LA517: .byte $4C ;PPU string length. | LA517: .byte $4C ;PPU string length. |
LA518: .byte $FF ;Repeat bit set. Repeats entry 12 times. | LA518: .byte $FF ;Repeat bit set. Repeats entry 12 times. |
| |
LA519: .byte $00 ;End PPU string write. | LA519: .byte $00 ;End PPU string write. |
| |
;Writes credits on name table 0 in row $2120 (10th row from top). | ;Writes credits on name table 0 in row $2120 (10th row from top). |
LA51A: .byte $21 ;PPU address high byte. | LA51A: .byte $21 ;PPU address high byte. |
LA51B: .byte $26 ;PPU address low byte. | LA51B: .byte $26 ;PPU address low byte. |
LA51C: .byte $53 ;PPU string length. | LA51C: .byte $53 ;PPU string length. |
LA51D: .byte $FF ;Repeat bit set. Repeats entry 19 times. | LA51D: .byte $FF ;Repeat bit set. Repeats entry 19 times. |
| |
LA51E: .byte $00 ;End PPU string write. | LA51E: .byte $00 ;End PPU string write. |
| |
;Writes credits on name table 0 in row $2160 (12th row from top). | ;Writes credits on name table 0 in row $2160 (12th row from top). |
LA51F: .byte $21 ;PPU address high byte. | LA51F: .byte $21 ;PPU address high byte. |
LA520: .byte $6A ;PPU address low byte. | LA520: .byte $6A ;PPU address low byte. |
LA521: .byte $4C ;PPU string length. | LA521: .byte $4C ;PPU string length. |
LA522: .byte $FF ;Repeat bit set. Repeats entry 12 times. | LA522: .byte $FF ;Repeat bit set. Repeats entry 12 times. |
| |
LA523: .byte $00 ;End PPU string write. | LA523: .byte $00 ;End PPU string write. |
| |
;Writes credits on name table 0 in row $2180 (13th row from top). | ;Writes credits on name table 0 in row $2180 (13th row from top). |
LA524: .byte $21 ;PPU address high byte. | LA524: .byte $21 ;PPU address high byte. |
LA525: .byte $88 ;PPU address low byte. | LA525: .byte $88 ;PPU address low byte. |
LA526: .byte $11 ;PPU string length. | LA526: .byte $11 ;PPU string length. |
; '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _' | ; '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _' |
LA527: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF | LA527: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF |
; '_' | ; '_' |
LA537: .byte $FF | LA537: .byte $FF |
| |
;Writes credits on name table 0 in row $2220 (18th row from top). | ;Writes credits on name table 0 in row $2220 (18th row from top). |
LA538: .byte $22 ;PPU address high byte. | LA538: .byte $22 ;PPU address high byte. |
LA539: .byte $26 ;PPU address low byte. | LA539: .byte $26 ;PPU address low byte. |
LA53A: .byte $4B ;PPU string length. | LA53A: .byte $4B ;PPU string length. |
LA53B: .byte $FF ;Repeat bit set. Repeats entry 11 times. | LA53B: .byte $FF ;Repeat bit set. Repeats entry 11 times. |
| |
LA53C: .byte $00 ;End PPU string write. | LA53C: .byte $00 ;End PPU string write. |
| |
LA53D: .byte $00 ;End PPU block write. | LA53D: .byte $00 ;End PPU block write. |
| |
;-------------------------------------------[ World map ]-------------------------------------------- | ;-------------------------------------------[ World map ]-------------------------------------------- |
| |
WorldMap: | WorldMap: |
LA53E: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF | LA53E: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF |
LA54E: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF | LA54E: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF |
LA55E: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $08, $FF, $08, $FF, $FF | LA55E: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $08, $FF, $08, $FF, $FF |
LA56E: .byte $FF, $FF, $FF, $FF, $08, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF | LA56E: .byte $FF, $FF, $FF, $FF, $08, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF |
LA57E: .byte $FF, $FF, $FF, $2C, $2B, $27, $15, $15, $16, $14, $13, $04, $FF, $06, $08, $0A | LA57E: .byte $FF, $FF, $FF, $2C, $2B, $27, $15, $15, $16, $14, $13, $04, $FF, $06, $08, $0A |
LA58E: .byte $1A, $29, $29, $28, $2E, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $08, $FF | LA58E: .byte $1A, $29, $29, $28, $2E, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $08, $FF |
LA59E: .byte $FF, $0E, $FF, $01, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $06, $FF, $03, $1F, $23 | LA59E: .byte $FF, $0E, $FF, $01, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $06, $FF, $03, $1F, $23 |
LA5AE: .byte $25, $24, $26, $20, $1E, $1F, $21, $21, $07, $22, $1D, $1B, $21, $20, $04, $FF | LA5AE: .byte $25, $24, $26, $20, $1E, $1F, $21, $21, $07, $22, $1D, $1B, $21, $20, $04, $FF |
LA5BE: .byte $FF, $10, $FF, $0E, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $06, $FF, $06, $FF, $FF | LA5BE: .byte $FF, $10, $FF, $0E, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $06, $FF, $06, $FF, $FF |
LA5CE: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $02, $FF | LA5CE: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $02, $FF |
LA5DE: .byte $FF, $10, $FF, $0B, $FF, $FF, $08, $0A, $1A, $29, $28, $04, $FF, $06, $FF, $FF | LA5DE: .byte $FF, $10, $FF, $0B, $FF, $FF, $08, $0A, $1A, $29, $28, $04, $FF, $06, $FF, $FF |
LA5EE: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $08, $0A, $1A, $29, $29, $28, $04, $FF | LA5EE: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $08, $0A, $1A, $29, $29, $28, $04, $FF |
LA5FE: .byte $FF, $10, $FF, $0B, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $06, $FF, $06, $FF, $FF | LA5FE: .byte $FF, $10, $FF, $0B, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $06, $FF, $06, $FF, $FF |
LA60E: .byte $FF, $FF, $08, $FF, $FF, $FF, $08, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $06, $FF | LA60E: .byte $FF, $FF, $08, $FF, $FF, $FF, $08, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $06, $FF |
LA61E: .byte $FF, $10, $FF, $0F, $11, $13, $14, $14, $13, $12, $0D, $03, $00, $05, $0C, $0E | LA61E: .byte $FF, $10, $FF, $0F, $11, $13, $14, $14, $13, $12, $0D, $03, $00, $05, $0C, $0E |
LA62E: .byte $0E, $0D, $10, $0C, $0F, $0D, $10, $0C, $0E, $1B, $0F, $0E, $0F, $0D, $04, $FF | LA62E: .byte $0E, $0D, $10, $0C, $0F, $0D, $10, $0C, $0E, $1B, $0F, $0E, $0F, $0D, $04, $FF |
LA63E: .byte $FF, $10, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $0C, $06, $FF, $06, $FF, $FF | LA63E: .byte $FF, $10, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $0C, $06, $FF, $06, $FF, $FF |
LA64E: .byte $FF, $FF, $11, $FF, $FF, $FF, $06, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $08, $FF | LA64E: .byte $FF, $FF, $11, $FF, $FF, $FF, $06, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $08, $FF |
LA65E: .byte $FF, $10, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $0C, $06, $FF, $06, $FF, $FF | LA65E: .byte $FF, $10, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $0C, $06, $FF, $06, $FF, $FF |
LA66E: .byte $FF, $FF, $11, $0A, $1A, $28, $04, $FF, $06, $FF, $FF, $FF, $FF, $FF, $06, $FF | LA66E: .byte $FF, $FF, $11, $0A, $1A, $28, $04, $FF, $06, $FF, $FF, $FF, $FF, $FF, $06, $FF |
LA67E: .byte $FF, $10, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $0C, $06, $FF, $06, $FF, $FF | LA67E: .byte $FF, $10, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $0C, $06, $FF, $06, $FF, $FF |
LA68E: .byte $FF, $FF, $08, $FF, $FF, $FF, $08, $FF, $08, $1B, $06, $19, $19, $2A, $0B, $FF | LA68E: .byte $FF, $FF, $08, $FF, $FF, $FF, $08, $FF, $08, $1B, $06, $19, $19, $2A, $0B, $FF |
LA69E: .byte $FF, $0F, $04, $03, $02, $05, $06, $07, $08, $09, $0A, $06, $FF, $03, $12, $14 | LA69E: .byte $FF, $0F, $04, $03, $02, $05, $06, $07, $08, $09, $0A, $06, $FF, $03, $12, $14 |
LA6AE: .byte $15, $14, $07, $16, $15, $13, $0B, $FF, $0C, $07, $19, $19, $19, $2A, $0E, $FF | LA6AE: .byte $15, $14, $07, $16, $15, $13, $0B, $FF, $0C, $07, $19, $19, $19, $2A, $0E, $FF |
LA6BE: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $06, $FF, $08, $FF, $FF | LA6BE: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $06, $FF, $08, $FF, $FF |
LA6CE: .byte $FF, $FF, $FF, $FF, $FF, $FF, $01, $FF, $0A, $1B, $04, $0F, $06, $2A, $0E, $FF | LA6CE: .byte $FF, $FF, $FF, $FF, $FF, $FF, $01, $FF, $0A, $1B, $04, $0F, $06, $2A, $0E, $FF |
LA6DE: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $06, $FF, $06, $FF, $FF | LA6DE: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $06, $FF, $06, $FF, $FF |
LA6EE: .byte $FF, $FF, $FF, $FF, $FF, $FF, $02, $FF, $06, $FF, $FF, $FF, $FF, $FF, $09, $FF | LA6EE: .byte $FF, $FF, $FF, $FF, $FF, $FF, $02, $FF, $06, $FF, $FF, $FF, $FF, $FF, $09, $FF |
LA6FE: .byte $FF, $08, $17, $09, $14, $13, $18, $12, $14, $19, $13, $04, $FF, $08, $1D, $1F | LA6FE: .byte $FF, $08, $17, $09, $14, $13, $18, $12, $14, $19, $13, $04, $FF, $08, $1D, $1F |
LA70E: .byte $06, $1F, $19, $1E, $1E, $1C, $03, $28, $29, $29, $29, $2B, $29, $2A, $0E, $FF | LA70E: .byte $06, $1F, $19, $1E, $1E, $1C, $03, $28, $29, $29, $29, $2B, $29, $2A, $0E, $FF |
LA71E: .byte $FF, $FF, $FF, $FF, $FF, $FF, $06, $FF, $FF, $FF, $FF, $08, $FF, $08, $1D, $1F | LA71E: .byte $FF, $FF, $FF, $FF, $FF, $FF, $06, $FF, $FF, $FF, $FF, $08, $FF, $08, $1D, $1F |
LA72E: .byte $1E, $19, $07, $19, $19, $2C, $06, $06, $2B, $2B, $1A, $1A, $1A, $2A, $0B, $FF | LA72E: .byte $1E, $19, $07, $19, $19, $2C, $06, $06, $2B, $2B, $1A, $1A, $1A, $2A, $0B, $FF |
LA73E: .byte $FF, $FF, $FF, $FF, $FF, $FF, $06, $FF, $0B, $FF, $FF, $0B, $FF, $06, $07, $04 | LA73E: .byte $FF, $FF, $FF, $FF, $FF, $FF, $06, $FF, $0B, $FF, $FF, $0B, $FF, $06, $07, $04 |
LA74E: .byte $0F, $10, $0B, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $09, $FF | LA74E: .byte $0F, $10, $0B, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $09, $FF |
LA75E: .byte $FF, $FF, $FF, $FF, $FF, $FF, $06, $FF, $07, $17, $18, $0C, $FF, $08, $21, $25 | LA75E: .byte $FF, $FF, $FF, $FF, $FF, $FF, $06, $FF, $07, $17, $18, $0C, $FF, $08, $21, $25 |
LA76E: .byte $25, $22, $03, $21, $25, $20, $00, $27, $2C, $2C, $06, $04, $0F, $10, $0E, $FF | LA76E: .byte $25, $22, $03, $21, $25, $20, $00, $27, $2C, $2C, $06, $04, $0F, $10, $0E, $FF |
LA77E: .byte $FF, $FF, $FF, $FF, $FF, $FF, $03, $1C, $07, $17, $18, $0C, $FF, $0A, $21, $23 | LA77E: .byte $FF, $FF, $FF, $FF, $FF, $FF, $03, $1C, $07, $17, $18, $0C, $FF, $0A, $21, $23 |
LA78E: .byte $25, $22, $03, $21, $24, $24, $24, $23, $23, $06, $24, $25, $22, $11, $2D, $FF | LA78E: .byte $25, $22, $03, $21, $24, $24, $24, $23, $23, $06, $24, $25, $22, $11, $2D, $FF |
LA79E: .byte $FF, $FF, $FF, $FF, $FF, $FF, $08, $01, $07, $17, $18, $0C, $FF, $09, $FF, $FF | LA79E: .byte $FF, $FF, $FF, $FF, $FF, $FF, $08, $01, $07, $17, $18, $0C, $FF, $09, $FF, $FF |
LA7AE: .byte $FF, $06, $06, $FF, $FF, $FF, $FF, $FF, $FF, $07, $26, $25, $22, $0B, $2D, $FF | LA7AE: .byte $FF, $06, $06, $FF, $FF, $FF, $FF, $FF, $FF, $07, $26, $25, $22, $0B, $2D, $FF |
LA7BE: .byte $FF, $0B, $FF, $FF, $FF, $FF, $FF, $02, $0B, $FF, $FF, $08, $FF, $0A, $12, $14 | LA7BE: .byte $FF, $0B, $FF, $FF, $FF, $FF, $FF, $02, $0B, $FF, $FF, $08, $FF, $0A, $12, $14 |
LA7CE: .byte $13, $03, $12, $15, $13, $0D, $12, $14, $06, $14, $18, $15, $19, $07, $09, $FF | LA7CE: .byte $13, $03, $12, $15, $13, $0D, $12, $14, $06, $14, $18, $15, $19, $07, $09, $FF |
LA7DE: .byte $FF, $09, $17, $1C, $10, $19, $18, $03, $13, $10, $18, $0C, $FF, $06, $FF, $FF | LA7DE: .byte $FF, $09, $17, $1C, $10, $19, $18, $03, $13, $10, $18, $0C, $FF, $06, $FF, $FF |
LA7EE: .byte $FF, $09, $04, $0F, $10, $0B, $FF, $FF, $08, $12, $16, $16, $16, $13, $0E, $FF | LA7EE: .byte $FF, $09, $04, $0F, $10, $0B, $FF, $FF, $08, $12, $16, $16, $16, $13, $0E, $FF |
LA7FE: .byte $FF, $0A, $17, $1C, $1C, $1C, $18, $03, $13, $19, $12, $0B, $FF, $00, $FF, $FF | LA7FE: .byte $FF, $0A, $17, $1C, $1C, $1C, $18, $03, $13, $19, $12, $0B, $FF, $00, $FF, $FF |
LA80E: .byte $0B, $08, $12, $19, $19, $07, $FF, $FF, $08, $05, $FF, $FF, $FF, $FF, $06, $FF | LA80E: .byte $0B, $08, $12, $19, $19, $07, $FF, $FF, $08, $05, $FF, $FF, $FF, $FF, $06, $FF |
LA81E: .byte $FF, $05, $FF, $FF, $0B, $FF, $FF, $08, $FF, $FF, $FF, $FF, $0B, $FF, $FF, $FF | LA81E: .byte $FF, $05, $FF, $FF, $0B, $FF, $FF, $08, $FF, $FF, $FF, $FF, $0B, $FF, $FF, $FF |
LA82E: .byte $FF, $06, $FF, $FF, $FF, $FF, $FF, $05, $06, $01, $FF, $FF, $FF, $FF, $0B, $FF | LA82E: .byte $FF, $06, $FF, $FF, $FF, $FF, $FF, $05, $06, $01, $FF, $FF, $FF, $FF, $0B, $FF |
LA83E: .byte $FF, $05, $FF, $FF, $07, $17, $18, $04, $13, $14, $14, $16, $0C, $FF, $05, $FF | LA83E: .byte $FF, $05, $FF, $FF, $07, $17, $18, $04, $13, $14, $14, $16, $0C, $FF, $05, $FF |
LA84E: .byte $FF, $05, $0F, $18, $17, $18, $19, $29, $05, $02, $FF, $FF, $FF, $FF, $05, $FF | LA84E: .byte $FF, $05, $0F, $18, $17, $18, $19, $29, $05, $02, $FF, $FF, $FF, $FF, $05, $FF |
LA85E: .byte $FF, $05, $FF, $FF, $08, $FF, $FF, $05, $FF, $0B, $10, $18, $0D, $FF, $0A, $20 | LA85E: .byte $FF, $05, $FF, $FF, $08, $FF, $FF, $05, $FF, $0B, $10, $18, $0D, $FF, $0A, $20 |
LA86E: .byte $22, $0D, $25, $26, $26, $26, $1D, $0E, $0E, $03, $23, $24, $24, $15, $07, $FF | LA86E: .byte $22, $0D, $25, $26, $26, $26, $1D, $0E, $0E, $03, $23, $24, $24, $15, $07, $FF |
LA87E: .byte $FF, $05, $FF, $FF, $23, $17, $18, $06, $22, $0C, $FF, $0B, $0E, $FF, $0B, $FF | LA87E: .byte $FF, $05, $FF, $FF, $23, $17, $18, $06, $22, $0C, $FF, $0B, $0E, $FF, $0B, $FF |
LA88E: .byte $FF, $04, $FF, $FF, $FF, $FF, $05, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $08, $FF | LA88E: .byte $FF, $04, $FF, $FF, $FF, $FF, $05, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $08, $FF |
LA89E: .byte $FF, $23, $22, $1A, $13, $10, $14, $1C, $16, $06, $21, $0C, $0E, $FF, $0A, $1C | LA89E: .byte $FF, $23, $22, $1A, $13, $10, $14, $1C, $16, $06, $21, $0C, $0E, $FF, $0A, $1C |
LA8AE: .byte $1D, $03, $20, $21, $21, $22, $06, $23, $0F, $28, $27, $27, $27, $19, $07, $FF | LA8AE: .byte $1D, $03, $20, $21, $21, $22, $06, $23, $0F, $28, $27, $27, $27, $19, $07, $FF |
LA8BE: .byte $FF, $0B, $FF, $1E, $1F, $20, $20, $20, $0F, $15, $21, $24, $0E, $FF, $04, $FF | LA8BE: .byte $FF, $0B, $FF, $1E, $1F, $20, $20, $20, $0F, $15, $21, $24, $0E, $FF, $04, $FF |
LA8CE: .byte $FF, $FF, $FF, $FF, $FF, $FF, $04, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $08, $FF | LA8CE: .byte $FF, $FF, $FF, $FF, $FF, $FF, $04, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $08, $FF |
LA8DE: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $1D, $1B, $17, $18, $0C, $FF, $04, $11 | LA8DE: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $1D, $1B, $17, $18, $0C, $FF, $04, $11 |
LA8EE: .byte $10, $12, $13, $14, $14, $15, $03, $1C, $1E, $1E, $1F, $1F, $1F, $1D, $07, $FF | LA8EE: .byte $10, $12, $13, $14, $14, $15, $03, $1C, $1E, $1E, $1F, $1F, $1F, $1D, $07, $FF |
LA8FE: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $0B, $FF, $0C, $16 | LA8FE: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $0B, $FF, $0C, $16 |
LA90E: .byte $18, $17, $18, $17, $0F, $17, $17, $1A, $1A, $17, $1B, $1B, $17, $19, $09, $FF | LA90E: .byte $18, $17, $18, $17, $0F, $17, $17, $1A, $1A, $17, $1B, $1B, $17, $19, $09, $FF |
LA91E: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF | LA91E: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF |
LA91F: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF | LA91F: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF |
| |
CopyMap: | CopyMap: |
LA93E: LDA #$3E ; | LA93E: LDA #$3E ; |
LA940: STA $00 ; | LA940: STA $00 ; |
LA942: LDA #$A5 ; | LA942: LDA #$A5 ; |
LA944: STA $01 ; | LA944: STA $01 ; |
LA946: LDA #$00 ; | LA946: LDA #$00 ; |
LA948: STA $02 ; | LA948: STA $02 ; |
LA94A: LDA #$70 ;Loads contents of world map into --> | LA94A: LDA #$70 ;Loads contents of world map into --> |
LA94C: STA $03 ;RAM at addresses $7000 thru $73FF. | LA94C: STA $03 ;RAM at addresses $7000 thru $73FF. |
LA94E: LDX #$04 ; | LA94E: LDX #$04 ; |
LA950:* LDY #$00 ; | LA950:* LDY #$00 ; |
LA952:* LDA ($00),Y ; | LA952:* LDA ($00),Y ; |
LA954: STA ($02),Y ; | LA954: STA ($02),Y ; |
LA956: INY ; | LA956: INY ; |
LA957: BNE - ; | LA957: BNE - ; |
LA959: INC $01 ; | LA959: INC $01 ; |
LA95B: INC $03 ; | LA95B: INC $03 ; |
LA95D: DEX ; | LA95D: DEX ; |
LA95E: BNE -- ; | LA95E: BNE -- ; |
LA960: RTS ; | LA960: RTS ; |
| |
;Unused tile patterns. | ;Unused tile patterns. |
LA961: .byte $00, $40, $90, $D0, $08, $5C, $0C, $00, $00, $C0, $70, $F8, $FC, $F4, $FC, $10 | LA961: .byte $00, $40, $90, $D0, $08, $5C, $0C, $00, $00, $C0, $70, $F8, $FC, $F4, $FC, $10 |
LA962: .byte $22, $56, $03, $2B, $74, $37, $0D, $3F, $5F, $7D, $7F, $7F, $5F, $3F, $0F, $68 | LA962: .byte $22, $56, $03, $2B, $74, $37, $0D, $3F, $5F, $7D, $7F, $7F, $5F, $3F, $0F, $68 |
LA981: .byte $F6, $BC, $5E, $3C, $DE, $7C, $F0, $FC, $DE, $FE, $FE, $FE, $FE, $FC, $F0, $00 | LA981: .byte $F6, $BC, $5E, $3C, $DE, $7C, $F0, $FC, $DE, $FE, $FE, $FE, $FE, $FC, $F0, $00 |
LA991: .byte $00, $7F, $80, $80, $FF, $7F, $00, $00, $7F, $80, $7F, $FF, $FF, $7F, $00, $00 | LA991: .byte $00, $7F, $80, $80, $FF, $7F, $00, $00, $7F, $80, $7F, $FF, $FF, $7F, $00, $00 |
LA9A1: .byte $00, $FC, $01, $03, $FF, $FE, $00, $00, $FE, $03, $FF, $FF, $FF, $FE, $00, $00 | LA9A1: .byte $00, $FC, $01, $03, $FF, $FE, $00, $00, $FE, $03, $FF, $FF, $FF, $FE, $00, $00 |
LA9B1: .byte $10, $20, $20, $00, $20, $00, $00, $3C, $42, $81, $81, $81, $81, $42, $3C, $7F | LA9B1: .byte $10, $20, $20, $00, $20, $00, $00, $3C, $42, $81, $81, $81, $81, $42, $3C, $7F |
LA9C1: .byte $7F, $3F, $1F, $80, $0F, $08, $88, $12, $80, $C0, $E0, $E0, $EF, $E8, $E8, $FC | LA9C1: .byte $7F, $3F, $1F, $80, $0F, $08, $88, $12, $80, $C0, $E0, $E0, $EF, $E8, $E8, $FC |
LA9D1: .byte $FC, $FC, $F8, $1C, $DC, $58, $5C, $48, $04, $0C, $18, $1C, $DC, $18, $1C, $0F | LA9D1: .byte $FC, $FC, $F8, $1C, $DC, $58, $5C, $48, $04, $0C, $18, $1C, $DC, $18, $1C, $0F |
LA9E1: .byte $00, $9F, $3F, $7F, $DB, $00, $00, $E0, $E0, $FF, $FF, $FF, $DB, $00, $00, $DC | LA9E1: .byte $00, $9F, $3F, $7F, $DB, $00, $00, $E0, $E0, $FF, $FF, $FF, $DB, $00, $00, $DC |
LA9F1: .byte $18, $EC, $F4, $F8, $6C, $00, $00, $1C, $18, $FC, $FC, $FC, $6C, $00, $00, $FF | LA9F1: .byte $18, $EC, $F4, $F8, $6C, $00, $00, $1C, $18, $FC, $FC, $FC, $6C, $00, $00, $FF |
LAA01: .byte $FF, $C0, $C0, $CF, $CB, $CC, $CC, $00, $00, $1F, $3F, $3F, $38, $3B, $3B, $FC | LAA01: .byte $FF, $C0, $C0, $CF, $CB, $CC, $CC, $00, $00, $1F, $3F, $3F, $38, $3B, $3B, $FC |
LAA11: .byte $FC, $0C, $0C, $CC, $4C, $CC, $CC, $00, $04, $EC, $FC, $FC, $3C, $BC, $BC, $CB | LAA11: .byte $FC, $0C, $0C, $CC, $4C, $CC, $CC, $00, $04, $EC, $FC, $FC, $3C, $BC, $BC, $CB |
LAA21: .byte $CF, $C0, $C0, $FF, $FF, $00, $00, $3B, $30, $3F, $1F, $7F, $FF, $00, $00, $4C | LAA21: .byte $CF, $C0, $C0, $FF, $FF, $00, $00, $3B, $30, $3F, $1F, $7F, $FF, $00, $00, $4C |
LAA31: .byte $CC, $0C, $0C, $FC, $FC, $00, $00, $3C, $3C, $FC, $EC, $FC, $FC, $00, $00, $FE | LAA31: .byte $CC, $0C, $0C, $FC, $FC, $00, $00, $3C, $3C, $FC, $EC, $FC, $FC, $00, $00, $FE |
LAA41: .byte $82, $82, $82, $82, $FE, $00, $00, $00, $7E, $56, $56, $7E, $FE, $00, $00, $20 | LAA41: .byte $82, $82, $82, $82, $FE, $00, $00, $00, $7E, $56, $56, $7E, $FE, $00, $00, $20 |
LAA51: .byte $00, $00, $18, $20, $00, $00, $18, $1C, $F7, $3C, $18, $1C, $F7, $3C, $18, $E2 | LAA51: .byte $00, $00, $18, $20, $00, $00, $18, $1C, $F7, $3C, $18, $1C, $F7, $3C, $18, $E2 |
LAA61: .byte $80, $10, $20, $00, $00, $80, $00, $E2, $98, $2C, $5E, $7E, $3C, $98, $00, $7E | LAA61: .byte $80, $10, $20, $00, $00, $80, $00, $E2, $98, $2C, $5E, $7E, $3C, $98, $00, $7E |
LAA71: .byte $00, $7E, $00, $7E, $00, $7E, $00, $6E, $00, $6E, $00, $6E, $00, $6E, $00, $10 | LAA71: .byte $00, $7E, $00, $7E, $00, $7E, $00, $6E, $00, $6E, $00, $6E, $00, $6E, $00, $10 |
LAA81: .byte $F4, $08, $04, $C5, $24, $23, $05, $E8, $F8, $0E, $E6, $F7, $37, $2E, $FD, $00 | LAA81: .byte $F4, $08, $04, $C5, $24, $23, $05, $E8, $F8, $0E, $E6, $F7, $37, $2E, $FD, $00 |
LAA91: .byte $5F, $20, $48, $D7, $88, $18, $80, $3F, $3F, $E0, $C7, $CF, $B8, $98, $7F, $F8 | LAA91: .byte $5F, $20, $48, $D7, $88, $18, $80, $3F, $3F, $E0, $C7, $CF, $B8, $98, $7F, $F8 |
LAAA1: .byte $10, $10, $10, $D7, $08, $00, $EF, $F8, $10, $30, $B7, $F7, $30, $DF, $EF, $FF | LAAA1: .byte $10, $10, $10, $D7, $08, $00, $EF, $F8, $10, $30, $B7, $F7, $30, $DF, $EF, $FF |
LAAB1: .byte $00, $08, $08, $EF, $08, $10, $EF, $FF, $00, $18, $DB, $FF, $38, $F7, $EF, $FF | LAAB1: .byte $00, $08, $08, $EF, $08, $10, $EF, $FF, $00, $18, $DB, $FF, $38, $F7, $EF, $FF |
LAAC1: .byte $7F, $3F, $5F, $4F, $07, $03, $01, $00, $B0, $C0, $E0, $F0, $F8, $FC, $FE, $FE | LAAC1: .byte $7F, $3F, $5F, $4F, $07, $03, $01, $00, $B0, $C0, $E0, $F0, $F8, $FC, $FE, $FE |
LAAD1: .byte $FE, $FE, $FA, $FA, $FE, $FE, $FE, $00, $1A, $06, $0A, $1A, $3E, $7E, $FE, $01 | LAAD1: .byte $FE, $FE, $FA, $FA, $FE, $FE, $FE, $00, $1A, $06, $0A, $1A, $3E, $7E, $FE, $01 |
LAAE1: .byte $03, $07, $4F, $5F, $27, $7F, $00, $FF, $FF, $FF, $FF, $FF, $E7, $FF, $00, $7E | LAAE1: .byte $03, $07, $4F, $5F, $27, $7F, $00, $FF, $FF, $FF, $FF, $FF, $E7, $FF, $00, $7E |
LAAF1: .byte $BE, $DA, $EA, $F6, $CA, $FC, $00, $FE, $FE, $FA, $FA, $FE, $CE, $FE, $00, $CF | LAAF1: .byte $BE, $DA, $EA, $F6, $CA, $FC, $00, $FE, $FE, $FA, $FA, $FE, $CE, $FE, $00, $CF |
LAB01: .byte $BF, $70, $60, $C4, $C8, $C0, $C0, $47, $BF, $70, $27, $4B, $57, $5F, $DF, $CC | LAB01: .byte $BF, $70, $60, $C4, $C8, $C0, $C0, $47, $BF, $70, $27, $4B, $57, $5F, $DF, $CC |
LAB11: .byte $F4, $38, $18, $0C, $0C, $0C, $0C, $CC, $F4, $38, $98, $CC, $EC, $EC, $EC, $C0 | LAB11: .byte $F4, $38, $18, $0C, $0C, $0C, $0C, $CC, $F4, $38, $98, $CC, $EC, $EC, $EC, $C0 |
LAB21: .byte $C0, $60, $70, $BF, $CF, $00, $00, $DF, $CF, $67, $70, $BF, $4F, $00, $00, $0C | LAB21: .byte $C0, $60, $70, $BF, $CF, $00, $00, $DF, $CF, $67, $70, $BF, $4F, $00, $00, $0C |
LAB31: .byte $0C, $18, $38, $F4, $CC, $00, $00, $EC, $CC, $98, $38, $F4, $CC, $00, $00, $FF | LAB31: .byte $0C, $18, $38, $F4, $CC, $00, $00, $EC, $CC, $98, $38, $F4, $CC, $00, $00, $FF |
LAB41: .byte $FF, $C0, $DF, $D0, $D0, $DF, $C0, $00, $00, $3F, $3F, $35, $35, $20, $3F, $FC | LAB41: .byte $FF, $C0, $DF, $D0, $D0, $DF, $C0, $00, $00, $3F, $3F, $35, $35, $20, $3F, $FC |
LAB51: .byte $FC, $0C, $EC, $2C, $2C, $EC, $0C, $00, $04, $FC, $FC, $5C, $5C, $1C, $FC, $FF | LAB51: .byte $FC, $0C, $EC, $2C, $2C, $EC, $0C, $00, $04, $FC, $FC, $5C, $5C, $1C, $FC, $FF |
LAB61: .byte $00, $00, $E4, $00, $CF, $00, $00, $7F, $00, $00, $E3, $00, $BF, $00, $00, $FC | LAB61: .byte $00, $00, $E4, $00, $CF, $00, $00, $7F, $00, $00, $E3, $00, $BF, $00, $00, $FC |
LAB71: .byte $00, $00, $F9, $00, $87, $00, $00, $FC, $00, $00, $F7, $00, $67, $00, $00, $FE | LAB71: .byte $00, $00, $F9, $00, $87, $00, $00, $FC, $00, $00, $F7, $00, $67, $00, $00, $FE |
LAB81: .byte $02, $02, $02, $FE, $00, $00, $7F, $00, $FE, $0E, $FE, $FE, $00, $00, $00, $7F | LAB81: .byte $02, $02, $02, $FE, $00, $00, $7F, $00, $FE, $0E, $FE, $FE, $00, $00, $00, $7F |
LAB91: .byte $40, $40, $40, $7F, $00, $00, $FE, $00, $3F, $30, $3F, $7F, $00, $00, $00, $40 | LAB91: .byte $40, $40, $40, $7F, $00, $00, $FE, $00, $3F, $30, $3F, $7F, $00, $00, $00, $40 |
LABA1: .byte $40, $40, $7F, $00, $00, $00, $FF, $3F, $30, $3F, $7F, $00, $00, $FF, $FF, $02 | LABA1: .byte $40, $40, $7F, $00, $00, $00, $FF, $3F, $30, $3F, $7F, $00, $00, $FF, $FF, $02 |
LABB1: .byte $02, $02, $FE, $00, $00, $00, $FF, $FE, $0E, $FE, $FE, $00, $00, $FF, $FF, $FF | LABB1: .byte $02, $02, $FE, $00, $00, $00, $FF, $FE, $0E, $FE, $FE, $00, $00, $FF, $FF, $FF |
LABC1: .byte $FF, $C0, $D0, $C0, $C0, $C0, $C0, $00, $00, $3F, $27, $3F, $3F, $3F, $3F, $FC | LABC1: .byte $FF, $C0, $D0, $C0, $C0, $C0, $C0, $00, $00, $3F, $27, $3F, $3F, $3F, $3F, $FC |
LABD1: .byte $FC, $0C, $4C, $0C, $0C, $0C, $0C, $00, $04, $FC, $9C, $FC, $FC, $FC, $FC, $C0 | LABD1: .byte $FC, $0C, $4C, $0C, $0C, $0C, $0C, $00, $04, $FC, $9C, $FC, $FC, $FC, $FC, $C0 |
LABE1: .byte $C0, $D0, $C0, $FF, $FF, $00, $00, $3F, $3F, $27, $3F, $3F, $7F, $00, $00, $0C | LABE1: .byte $C0, $D0, $C0, $FF, $FF, $00, $00, $3F, $3F, $27, $3F, $3F, $7F, $00, $00, $0C |
LABF1: .byte $0C, $4C, $0C, $FC, $FC, $00, $00, $FC, $FC, $9C, $FC, $FC, $FC, $00, $00 | LABF1: .byte $0C, $4C, $0C, $FC, $FC, $00, $00, $FC, $FC, $9C, $FC, $FC, $FC, $00, $00 |
| |
;------------------------------------------[ Area music data ]--------------------------------------- | ;------------------------------------------[ Area music data ]--------------------------------------- |
| |
EndSQ1Data: | EndSQ1Data: |
LAC00: .byte $C2 ; | LAC00: .byte $C2 ; |
LAC01: .byte $B4 ;7/8 seconds + | LAC01: .byte $B4 ;7/8 seconds + |
LAc02: .byte $2A ;A3 | | LAc02: .byte $2A ;A3 | |
LAC03: .byte $30 ;C4 | Repeat 2 times. | LAC03: .byte $30 ;C4 | Repeat 2 times. |
LAC04: .byte $2E ;B3 | | LAC04: .byte $2E ;B3 | |
LAC05: .byte $2C ;A#3 + | LAC05: .byte $2C ;A#3 + |
LAC06: .byte $FF ; | LAC06: .byte $FF ; |
LAC07: .byte $2A ;A3 | LAC07: .byte $2A ;A3 |
LAC08: .byte $2A ;A3 | LAC08: .byte $2A ;A3 |
LAC09: .byte $C2 ; | LAC09: .byte $C2 ; |
LAC0A: .byte $B0 ;1/4 seconds + | LAC0A: .byte $B0 ;1/4 seconds + |
LAC0B: .byte $3C ;F#4 | | LAC0B: .byte $3C ;F#4 | |
LAC0C: .byte $42 ;A4 | | LAC0C: .byte $42 ;A4 | |
LAC0D: .byte $4C ;D5 | | LAC0D: .byte $4C ;D5 | |
LAC0E: .byte $54 ;F#5 | | LAC0E: .byte $54 ;F#5 | |
LAC0F: .byte $B2 ;7/32 seconds | | LAC0F: .byte $B2 ;7/32 seconds | |
LAC10: .byte $5A ;A5 | | LAC10: .byte $5A ;A5 | |
LAC11: .byte $56 ;G5 | | LAC11: .byte $56 ;G5 | |
LAC12: .byte $54 ;F#5 | | LAC12: .byte $54 ;F#5 | |
LAC13: .byte $B4 ;7/8 seconds | | LAC13: .byte $B4 ;7/8 seconds | |
LAC14: .byte $4C ;D5 | | LAC14: .byte $4C ;D5 | |
LAC15: .byte $B0 ;1/4 seconds | | LAC15: .byte $B0 ;1/4 seconds | |
LAC16: .byte $38 ;E4 | Repeat 2 times. | LAC16: .byte $38 ;E4 | Repeat 2 times. |
LAC17: .byte $3C ;F#4 | | LAC17: .byte $3C ;F#4 | |
LAC18: .byte $3E ;G4 | | LAC18: .byte $3E ;G4 | |
LAC19: .byte $42 ;A4 | | LAC19: .byte $42 ;A4 | |
LAC1A: .byte $B2 ;7/32 seconds | | LAC1A: .byte $B2 ;7/32 seconds | |
LAC1B: .byte $4C ;D5 | | LAC1B: .byte $4C ;D5 | |
LAC1C: .byte $42 ;A4 | | LAC1C: .byte $42 ;A4 | |
LAC1D: .byte $B0 ;1/4 seconds | | LAC1D: .byte $B0 ;1/4 seconds | |
LAC1E: .byte $56 ;G5 | | LAC1E: .byte $56 ;G5 | |
LAC1F: .byte $54 ;F#5 | | LAC1F: .byte $54 ;F#5 | |
LAC20: .byte $4C ;D5 | | LAC20: .byte $4C ;D5 | |
LAC21: .byte $42 ;A4 | | LAC21: .byte $42 ;A4 | |
LAC22: .byte $B3 ;7/16 seconds | | LAC22: .byte $B3 ;7/16 seconds | |
LAC23: .byte $3E ;G4 | | LAC23: .byte $3E ;G4 | |
LAC24: .byte $4C ;D5 + | LAC24: .byte $4C ;D5 + |
LAC25: .byte $FF ; | LAC25: .byte $FF ; |
LAC26: .byte $C2 ; | LAC26: .byte $C2 ; |
LAC27: .byte $B3 ;7/16 seconds + | LAC27: .byte $B3 ;7/16 seconds + |
LAC28: .byte $4A ;C#5 | | LAC28: .byte $4A ;C#5 | |
LAC29: .byte $B2 ;7/32 seconds | | LAC29: .byte $B2 ;7/32 seconds | |
LAC2A: .byte $4C ;D5 | | LAC2A: .byte $4C ;D5 | |
LAC2B: .byte $42 ;A4 | | LAC2B: .byte $42 ;A4 | |
LAC2C: .byte $54 ;F#5 | | LAC2C: .byte $54 ;F#5 | |
LAC2D: .byte $50 ;E5 | | LAC2D: .byte $50 ;E5 | |
LAC2E: .byte $56 ;G5 | | LAC2E: .byte $56 ;G5 | |
LAC2F: .byte $54 ;F#5 | | LAC2F: .byte $54 ;F#5 | |
LAC30: .byte $B1 ;7/64 seconds | | LAC30: .byte $B1 ;7/64 seconds | |
LAC31: .byte $50 ;E5 | | LAC31: .byte $50 ;E5 | |
LAC32: .byte $4C ;D5 | Repeat 2 times. | LAC32: .byte $4C ;D5 | Repeat 2 times. |
LAC33: .byte $44 ;A#4 | | LAC33: .byte $44 ;A#4 | |
LAC34: .byte $3E ;G4 | | LAC34: .byte $3E ;G4 | |
LAC35: .byte $B2 ;7/32 seconds | | LAC35: .byte $B2 ;7/32 seconds | |
LAC36: .byte $3C ;F#4 | | LAC36: .byte $3C ;F#4 | |
LAC37: .byte $4C ;D5 | | LAC37: .byte $4C ;D5 | |
LAC38: .byte $B1 ;7/64 seconds | | LAC38: .byte $B1 ;7/64 seconds | |
LAC39: .byte $40 ;Ab4 | | LAC39: .byte $40 ;Ab4 | |
LAC3A: .byte $46 ;B4 | | LAC3A: .byte $46 ;B4 | |
LAC3B: .byte $B2 ;7/32 seconds | | LAC3B: .byte $B2 ;7/32 seconds | |
LAC3C: .byte $50 ;E5 | | LAC3C: .byte $50 ;E5 | |
LAC3D: .byte $4C ;D5 | | LAC3D: .byte $4C ;D5 | |
LAC3E: .byte $50 ;E5 + | LAC3E: .byte $50 ;E5 + |
LAC3F: .byte $FF ; | LAC3F: .byte $FF ; |
LAC40: .byte $C4 ; | LAC40: .byte $C4 ; |
LAC41: .byte $B3 ;7/16 seconds + | LAC41: .byte $B3 ;7/16 seconds + |
LAC42: .byte $2A ;A3 | | LAC42: .byte $2A ;A3 | |
LAC43: .byte $30 ;C4 | Repeat 4 times. | LAC43: .byte $30 ;C4 | Repeat 4 times. |
LAC44: .byte $2E ;B3 | | LAC44: .byte $2E ;B3 | |
LAC45: .byte $2C ;A#3 + | LAC45: .byte $2C ;A#3 + |
LAC46: .byte $FF ; | LAC46: .byte $FF ; |
LAC47: .byte $B4 ;7/8 seconds | LAC47: .byte $B4 ;7/8 seconds |
LAC48: .byte $34 ;D4 | LAC48: .byte $34 ;D4 |
LAC49: .byte $B3 ;7/16 seconds | LAC49: .byte $B3 ;7/16 seconds |
LAC4A: .byte $38 ;E4 | LAC4A: .byte $38 ;E4 |
LAC4B: .byte $3E ;G4 | LAC4B: .byte $3E ;G4 |
LAC4C: .byte $B4 ;7/8 seconds | LAC4C: .byte $B4 ;7/8 seconds |
LAC4D: .byte $3C ;F#4 | LAC4D: .byte $3C ;F#4 |
LAC4E: .byte $B3 ;7/16 seconds | LAC4E: .byte $B3 ;7/16 seconds |
LAC4F: .byte $3E ;G4 | LAC4F: .byte $3E ;G4 |
LAC50: .byte $44 ;A#4 | LAC50: .byte $44 ;A#4 |
LAC51: .byte $B5 ;1 13/16 seconds | LAC51: .byte $B5 ;1 13/16 seconds |
LAC52: .byte $34 ;D4 | LAC52: .byte $34 ;D4 |
LAC53: .byte $B1 ;7/64 seconds | LAC53: .byte $B1 ;7/64 seconds |
LAC54: .byte $2A ;A3 | LAC54: .byte $2A ;A3 |
LAC55: .byte $B6 ;21/32 seconds | LAC55: .byte $B6 ;21/32 seconds |
LAC56: .byte $1C ;D3 | LAC56: .byte $1C ;D3 |
LAC57: .byte $B2 ;7/32 seconds | LAC57: .byte $B2 ;7/32 seconds |
LAC58: .byte $02 ;No sound | LAC58: .byte $02 ;No sound |
LAC59: .byte $B5 ;1 13/16 seconds | LAC59: .byte $B5 ;1 13/16 seconds |
LAC5A: .byte $26 ;G3 | LAC5A: .byte $26 ;G3 |
LAC5B: .byte $B1 ;7/64 seconds | LAC5B: .byte $B1 ;7/64 seconds |
LAC5C: .byte $24 ;F#3 | LAC5C: .byte $24 ;F#3 |
LAC5D: .byte $B8 ;21/64 seconds | LAC5D: .byte $B8 ;21/64 seconds |
LAC5E: .byte $06 ;D2 | LAC5E: .byte $06 ;D2 |
LAC5F: .byte $12 ;A2 | LAC5F: .byte $12 ;A2 |
LAC60: .byte $1C ;D3 | LAC60: .byte $1C ;D3 |
LAC61: .byte $B9 ;9/32 seconds | LAC61: .byte $B9 ;9/32 seconds |
LAC62: .byte $02 ;No sound | LAC62: .byte $02 ;No sound |
LAC63: .byte $B8 ;21/64 seconds | LAC63: .byte $B8 ;21/64 seconds |
LAC64: .byte $24 ;F#3 | LAC64: .byte $24 ;F#3 |
LAC65: .byte $2A ;A3 | LAC65: .byte $2A ;A3 |
LAC66: .byte $34 ;D4 | LAC66: .byte $34 ;D4 |
LAC67: .byte $B9 ;9/32 seconds | LAC67: .byte $B9 ;9/32 seconds |
LAC68: .byte $02 ;No sound | LAC68: .byte $02 ;No sound |
LAC69: .byte $B5 ;1 13/16 seconds | LAC69: .byte $B5 ;1 13/16 seconds |
LAC6A: .byte $38 ;E4 | LAC6A: .byte $38 ;E4 |
LAC6B: .byte $B1 ;7/64 seconds | LAC6B: .byte $B1 ;7/64 seconds |
LAC6C: .byte $2C ;A#3 | LAC6C: .byte $2C ;A#3 |
LAC6D: .byte $B3 ;7/16 seconds | LAC6D: .byte $B3 ;7/16 seconds |
LAC6E: .byte $26 ;G3 | LAC6E: .byte $26 ;G3 |
LAC6F: .byte $2A ;A3 | LAC6F: .byte $2A ;A3 |
LAC70: .byte $B5 ;1 13/16 seconds | LAC70: .byte $B5 ;1 13/16 seconds |
LAC71: .byte $2A ;A3 | LAC71: .byte $2A ;A3 |
LAC72: .byte $B1 ;7/64 seconds | LAC72: .byte $B1 ;7/64 seconds |
LAC73: .byte $02 ;No sound | LAC73: .byte $02 ;No sound |
LAC74: .byte $B8 ;21/64 seconds | LAC74: .byte $B8 ;21/64 seconds |
LAC75: .byte $26 ;G3 | LAC75: .byte $26 ;G3 |
LAC76: .byte $24 ;F#3 | LAC76: .byte $24 ;F#3 |
LAC77: .byte $1C ;D3 | LAC77: .byte $1C ;D3 |
LAC78: .byte $B9 ;9/32 seconds | LAC78: .byte $B9 ;9/32 seconds |
LAC79: .byte $02 ;No sound | LAC79: .byte $02 ;No sound |
LAC7A: .byte $B8 ;21/64 seconds | LAC7A: .byte $B8 ;21/64 seconds |
LAC7B: .byte $20 ;E3 | LAC7B: .byte $20 ;E3 |
LAC7C: .byte $1C ;D3 | LAC7C: .byte $1C ;D3 |
LAC7D: .byte $20 ;E3 | LAC7D: .byte $20 ;E3 |
LAC7E: .byte $B9 ;9/32 seconds | LAC7E: .byte $B9 ;9/32 seconds |
LAC7F: .byte $02 ;No sound | LAC7F: .byte $02 ;No sound |
LAC80: .byte $B4 ;7/8 seconds | LAC80: .byte $B4 ;7/8 seconds |
LAC81: .byte $1C ;D3 | LAC81: .byte $1C ;D3 |
LAC82: .byte $B8 ;21/64 seconds | LAC82: .byte $B8 ;21/64 seconds |
LAC83: .byte $26 ;G3 | LAC83: .byte $26 ;G3 |
LAC84: .byte $2C ;A#3 | LAC84: .byte $2C ;A#3 |
LAC85: .byte $34 ;D4 | LAC85: .byte $34 ;D4 |
LAC86: .byte $B9 ;9/32 seconds | LAC86: .byte $B9 ;9/32 seconds |
LAC87: .byte $02 ;No sound | LAC87: .byte $02 ;No sound |
LAC88: .byte $B8 ;21/64 seconds | LAC88: .byte $B8 ;21/64 seconds |
LAC89: .byte $3E ;G4 | LAC89: .byte $3E ;G4 |
LAC8A: .byte $44 ;A#4 | LAC8A: .byte $44 ;A#4 |
LAC8B: .byte $4C ;D5 | LAC8B: .byte $4C ;D5 |
LAC8C: .byte $B9 ;9/32 seconds | LAC8C: .byte $B9 ;9/32 seconds |
LAC8D: .byte $02 ;No sound | LAC8D: .byte $02 ;No sound |
LAC8E: .byte $C8 ; | LAC8E: .byte $C8 ; |
LAC8F: .byte $B0 ;1/4 seconds + | LAC8F: .byte $B0 ;1/4 seconds + |
LAC90: .byte $3C ;F#4 | | LAC90: .byte $3C ;F#4 | |
LAC91: .byte $42 ;A4 | | LAC91: .byte $42 ;A4 | |
LAC92: .byte $3C ;F#4 | | LAC92: .byte $3C ;F#4 | |
LAC93: .byte $42 ;A4 | | LAC93: .byte $42 ;A4 | |
LAC94: .byte $42 ;A4 | | LAC94: .byte $42 ;A4 | |
LAC95: .byte $46 ;B4 | | LAC95: .byte $46 ;B4 | |
LAC96: .byte $42 ;A4 | | LAC96: .byte $42 ;A4 | |
LAC97: .byte $46 ;B4 | Repeat 8 times. | LAC97: .byte $46 ;B4 | Repeat 8 times. |
LAC98: .byte $4C ;D5 | | LAC98: .byte $4C ;D5 | |
LAC99: .byte $50 ;E5 | | LAC99: .byte $50 ;E5 | |
LAC9A: .byte $4C ;D5 | | LAC9A: .byte $4C ;D5 | |
LAC9B: .byte $50 ;E5 | | LAC9B: .byte $50 ;E5 | |
LAC9C: .byte $50 ;E5 | | LAC9C: .byte $50 ;E5 | |
LAC9D: .byte $54 ;F#5 | | LAC9D: .byte $54 ;F#5 | |
LAC9E: .byte $50 ;E5 | | LAC9E: .byte $50 ;E5 | |
LAC9F: .byte $54 ;F#5 + | LAC9F: .byte $54 ;F#5 + |
LACA0: .byte $FF ; | LACA0: .byte $FF ; |
LACA1: .byte $C2 ; | LACA1: .byte $C2 ; |
LACA2: .byte $B4 ;7/8 seconds + | LACA2: .byte $B4 ;7/8 seconds + |
LACA3: .byte $2A ;A3 | | LACA3: .byte $2A ;A3 | |
LACA4: .byte $B3 ;7/16 seconds | | LACA4: .byte $B3 ;7/16 seconds | |
LACA5: .byte $34 ;D4 | | LACA5: .byte $34 ;D4 | |
LACA6: .byte $B5 ;1 13/16 seconds| | LACA6: .byte $B5 ;1 13/16 seconds| |
LACA7: .byte $32 ;C#4 | | LACA7: .byte $32 ;C#4 | |
LACA8: .byte $B1 ;7/64 seconds | | LACA8: .byte $B1 ;7/64 seconds | |
LACA9: .byte $2E ;B3 | Repeat 2 times. | LACA9: .byte $2E ;B3 | Repeat 2 times. |
LACAA: .byte $B4 ;7/8 seconds | | LACAA: .byte $B4 ;7/8 seconds | |
LACAB: .byte $2A ;A3 | | LACAB: .byte $2A ;A3 | |
LACAC: .byte $B3 ;7/16 seconds | | LACAC: .byte $B3 ;7/16 seconds | |
LACAD: .byte $1C ;D3 | | LACAD: .byte $1C ;D3 | |
LACAE: .byte $B5 ;1 13/16 seconds| | LACAE: .byte $B5 ;1 13/16 seconds| |
LACAF: .byte $26 ;G3 | | LACAF: .byte $26 ;G3 | |
LACB0: .byte $B1 ;7/64 seconds | | LACB0: .byte $B1 ;7/64 seconds | |
LACB1: .byte $24 ;F#3 + | LACB1: .byte $24 ;F#3 + |
LACB2: .byte $FF ; | LACB2: .byte $FF ; |
LACB3: .byte $B4 ;7/8 seconds | LACB3: .byte $B4 ;7/8 seconds |
LACB4: .byte $2A ;A3 | LACB4: .byte $2A ;A3 |
LACB5: .byte $B8 ;21/64 seconds | LACB5: .byte $B8 ;21/64 seconds |
LACB6: .byte $18 ;C3 | LACB6: .byte $18 ;C3 |
LACB7: .byte $26 ;G3 | LACB7: .byte $26 ;G3 |
LACB8: .byte $30 ;C4 | LACB8: .byte $30 ;C4 |
LACB9: .byte $B9 ;9/32 seconds | LACB9: .byte $B9 ;9/32 seconds |
LACBA: .byte $02 ;No sound | LACBA: .byte $02 ;No sound |
LACBB: .byte $B8 ;21/64 seconds | LACBB: .byte $B8 ;21/64 seconds |
LACBC: .byte $1C ;D3 | LACBC: .byte $1C ;D3 |
LACBD: .byte $26 ;G3 | LACBD: .byte $26 ;G3 |
LACBE: .byte $30 ;C4 | LACBE: .byte $30 ;C4 |
LACBF: .byte $B9 ;9/32 seconds | LACBF: .byte $B9 ;9/32 seconds |
LACC0: .byte $02 ;No sound | LACC0: .byte $02 ;No sound |
LACC1: .byte $B4 ;7/8 seconds | LACC1: .byte $B4 ;7/8 seconds |
LACC2: .byte $34 ;D4 | LACC2: .byte $34 ;D4 |
LACC3: .byte $B8 ;21/64 seconds | LACC3: .byte $B8 ;21/64 seconds |
LACC4: .byte $3A ;F4 | LACC4: .byte $3A ;F4 |
LACC5: .byte $30 ;C4 | LACC5: .byte $30 ;C4 |
LAcc6: .byte $26 ;G3 | LAcc6: .byte $26 ;G3 |
LACC7: .byte $B9 ;9/32 seconds | LACC7: .byte $B9 ;9/32 seconds |
LACC8: .byte $02 ;No sound | LACC8: .byte $02 ;No sound |
LACC9: .byte $B8 ;21/64 seconds | LACC9: .byte $B8 ;21/64 seconds |
LACCA: .byte $3E ;G4 | LACCA: .byte $3E ;G4 |
LACCB: .byte $38 ;E4 | LACCB: .byte $38 ;E4 |
LACCC: .byte $30 ;C4 | LACCC: .byte $30 ;C4 |
LACCD: .byte $B9 ;9/32 seconds | LACCD: .byte $B9 ;9/32 seconds |
LACCE: .byte $02 ;No sound | LACCE: .byte $02 ;No sound |
LACCF: .byte $B4 ;7/8 seconds | LACCF: .byte $B4 ;7/8 seconds |
LACD0: .byte $34 ;D4 | LACD0: .byte $34 ;D4 |
LACD1: .byte $B2 ;7/32 seconds | LACD1: .byte $B2 ;7/32 seconds |
LACD2: .byte $1C ;D3 | LACD2: .byte $1C ;D3 |
LACD3: .byte $2A ;A3 | LACD3: .byte $2A ;A3 |
LACD4: .byte $26 ;G3 | LACD4: .byte $26 ;G3 |
LACD5: .byte $30 ;C4 | LACD5: .byte $30 ;C4 |
LACD6: .byte $C2 ; | LACD6: .byte $C2 ; |
LACD7: .byte $B0 ;1/4 seconds + | LACD7: .byte $B0 ;1/4 seconds + |
LACD8: .byte $38 ;E4 | | LACD8: .byte $38 ;E4 | |
LACD9: .byte $38 ;E4 | | LACD9: .byte $38 ;E4 | |
LACDA: .byte $38 ;E4 | | LACDA: .byte $38 ;E4 | |
LACDB: .byte $02 ;No sound | | LACDB: .byte $02 ;No sound | |
LACDC: .byte $02 ;No sound | | LACDC: .byte $02 ;No sound | |
LACDD: .byte $02 ;No sound | | LACDD: .byte $02 ;No sound | |
LACDE: .byte $38 ;E4 | | LACDE: .byte $38 ;E4 | |
LACDF: .byte $38 ;E4 | Repeat 2 times. | LACDF: .byte $38 ;E4 | Repeat 2 times. |
LACE0: .byte $38 ;E4 | | LACE0: .byte $38 ;E4 | |
LACE1: .byte $02 ;No sound | | LACE1: .byte $02 ;No sound | |
LACE2: .byte $38 ;E4 | | LACE2: .byte $38 ;E4 | |
LACE3: .byte $38 ;E4 | | LACE3: .byte $38 ;E4 | |
LACE4: .byte $38 ;E4 | | LACE4: .byte $38 ;E4 | |
LACE5: .byte $38 ;E4 | | LACE5: .byte $38 ;E4 | |
LACE6: .byte $38 ;E4 | | LACE6: .byte $38 ;E4 | |
LACE7: .byte $02 ;No sound + | LACE7: .byte $02 ;No sound + |
LACE8: .byte $FF ; | LACE8: .byte $FF ; |
LACE9: .byte $B4 ;7/8 seconds | LACE9: .byte $B4 ;7/8 seconds |
LACEA: .byte $38 ;E4 | LACEA: .byte $38 ;E4 |
LACEB: .byte $B2 ;7/32 seconds | LACEB: .byte $B2 ;7/32 seconds |
LACEC: .byte $02 ;No sound | LACEC: .byte $02 ;No sound |
LACED: .byte $B0 ;1/4 seconds | LACED: .byte $B0 ;1/4 seconds |
LACEE: .byte $1C ;D3 | LACEE: .byte $1C ;D3 |
LACEF: .byte $02 ;No sound | LACEF: .byte $02 ;No sound |
LACF0: .byte $1C ;D3 | LACF0: .byte $1C ;D3 |
LACF1: .byte $1C ;D3 | LACF1: .byte $1C ;D3 |
LACF2: .byte $B2 ;7/32 seconds | LACF2: .byte $B2 ;7/32 seconds |
LACF3: .byte $06 ;D2 | LACF3: .byte $06 ;D2 |
LACF4: .byte $00 ;End of end music. | LACF4: .byte $00 ;End of end music. |
| |
EndTriangleData: | EndTriangleData: |
LACF5: .byte $CA ; | LACF5: .byte $CA ; |
LACF6: .byte $B0 ;1/4 seconds + | LACF6: .byte $B0 ;1/4 seconds + |
LACF7: .byte $2A ;A3 | | LACF7: .byte $2A ;A3 | |
LACF8: .byte $2A ;A3 | | LACF8: .byte $2A ;A3 | |
LACF9: .byte $2A ;A3 | | LACF9: .byte $2A ;A3 | |
LACFA: .byte $02 ;No sound | | LACFA: .byte $02 ;No sound | |
LACFB: .byte $02 ;No sound | | LACFB: .byte $02 ;No sound | |
LACFC: .byte $02 ;No sound | | LACFC: .byte $02 ;No sound | |
LACFD: .byte $2A ;A3 | Repeat 10 times. | LACFD: .byte $2A ;A3 | Repeat 10 times. |
LACFE: .byte $2A ;A3 | | LACFE: .byte $2A ;A3 | |
LACFF: .byte $2A ;A3 | | LACFF: .byte $2A ;A3 | |
LAD00: .byte $02 ;No sound | | LAD00: .byte $02 ;No sound | |
LAD01: .byte $2A ;A3 | | LAD01: .byte $2A ;A3 | |
LAD02: .byte $2A ;A3 | | LAD02: .byte $2A ;A3 | |
LAD03: .byte $2A ;A3 | | LAD03: .byte $2A ;A3 | |
LAD04: .byte $2A ;A3 | | LAD04: .byte $2A ;A3 | |
LAD05: .byte $2A ;A3 | | LAD05: .byte $2A ;A3 | |
LAD06: .byte $02 ;No sound + | LAD06: .byte $02 ;No sound + |
LAD07: .byte $FF ; | LAD07: .byte $FF ; |
LAD08: .byte $C2 ; | LAD08: .byte $C2 ; |
LAD09: .byte $B2 ;7/32 seconds + | LAD09: .byte $B2 ;7/32 seconds + |
LAD0A: .byte $34 ;D4 | | LAD0A: .byte $34 ;D4 | |
LAD0B: .byte $34 ;D4 | | LAD0B: .byte $34 ;D4 | |
LAD0C: .byte $32 ;C#4 | | LAD0C: .byte $32 ;C#4 | |
LAD0D: .byte $32 ;C#4 | | LAD0D: .byte $32 ;C#4 | |
LAD0E: .byte $2E ;B3 | | LAD0E: .byte $2E ;B3 | |
LAD0f: .byte $2E ;B3 | | LAD0f: .byte $2E ;B3 | |
LAD10: .byte $2A ;A3 | | LAD10: .byte $2A ;A3 | |
LAD11: .byte $2A ;A3 | Repeat 2 times. | LAD11: .byte $2A ;A3 | Repeat 2 times. |
LAD12: .byte $26 ;G3 | | LAD12: .byte $26 ;G3 | |
LAD13: .byte $26 ;G3 | | LAD13: .byte $26 ;G3 | |
LAD14: .byte $24 ;F#3 | | LAD14: .byte $24 ;F#3 | |
LAD15: .byte $24 ;F#3 | | LAD15: .byte $24 ;F#3 | |
LAD16: .byte $20 ;E3 | | LAD16: .byte $20 ;E3 | |
LAD17: .byte $20 ;E3 | | LAD17: .byte $20 ;E3 | |
LAD18: .byte $2A ;A3 | | LAD18: .byte $2A ;A3 | |
LAD19: .byte $2A ;A3 + | LAD19: .byte $2A ;A3 + |
LAD1A: .byte $FF ; | LAD1A: .byte $FF ; |
LAD1B: .byte $C2 ; | LAD1B: .byte $C2 ; |
LAD1C: .byte $26 ;G3 + | LAD1C: .byte $26 ;G3 + |
LAD1D: .byte $26 ;G3 | | LAD1D: .byte $26 ;G3 | |
LAD1E: .byte $24 ;F#3 | | LAD1E: .byte $24 ;F#3 | |
LAD1F: .byte $24 ;F#3 | | LAD1F: .byte $24 ;F#3 | |
LAD20: .byte $30 ;C4 | | LAD20: .byte $30 ;C4 | |
LAD21: .byte $30 ;C4 | | LAD21: .byte $30 ;C4 | |
LAD22: .byte $2E ;B3 | | LAD22: .byte $2E ;B3 | |
LAD23: .byte $2E ;B3 | Repeat 2 times. | LAD23: .byte $2E ;B3 | Repeat 2 times. |
LAD24: .byte $2C ;A#3 | | LAD24: .byte $2C ;A#3 | |
LAD25: .byte $2C ;A#3 | | LAD25: .byte $2C ;A#3 | |
LAD26: .byte $2A ;A3 | | LAD26: .byte $2A ;A3 | |
LAD27: .byte $2A ;A3 | | LAD27: .byte $2A ;A3 | |
LAD28: .byte $28 ;Ab3 | | LAD28: .byte $28 ;Ab3 | |
LAD29: .byte $28 ;Ab3 | | LAD29: .byte $28 ;Ab3 | |
LAD2A: .byte $2A ;A3 | | LAD2A: .byte $2A ;A3 | |
LAD2B: .byte $2A ;A3 + | LAD2B: .byte $2A ;A3 + |
LAD2C: .byte $FF ; | LAD2C: .byte $FF ; |
LAD2D: .byte $C8 ; | LAD2D: .byte $C8 ; |
LAD2E: .byte $B0 ;1/4 seconds + | LAD2E: .byte $B0 ;1/4 seconds + |
LAD2F: .byte $1C ;D3 | | LAD2F: .byte $1C ;D3 | |
LAD30: .byte $1C ;D3 | | LAD30: .byte $1C ;D3 | |
LAD31: .byte $1C ;D3 | | LAD31: .byte $1C ;D3 | |
LAD32: .byte $02 ;No sound | | LAD32: .byte $02 ;No sound | |
LAD33: .byte $02 ;No sound | | LAD33: .byte $02 ;No sound | |
LAD34: .byte $02 ;No sound | | LAD34: .byte $02 ;No sound | |
LAD35: .byte $1C ;D3 | Repeat 8 times. | LAD35: .byte $1C ;D3 | Repeat 8 times. |
LAD36: .byte $1C ;D3 | | LAD36: .byte $1C ;D3 | |
LAD37: .byte $1C ;D3 | | LAD37: .byte $1C ;D3 | |
LAD38: .byte $02 ;No sound | | LAD38: .byte $02 ;No sound | |
LAD39: .byte $1C ;D3 | | LAD39: .byte $1C ;D3 | |
LAD3A: .byte $1C ;D3 | | LAD3A: .byte $1C ;D3 | |
LAD3B: .byte $1C ;D3 | | LAD3B: .byte $1C ;D3 | |
LAD3C: .byte $1C ;D3 | | LAD3C: .byte $1C ;D3 | |
LAD3D: .byte $1C ;D3 | | LAD3D: .byte $1C ;D3 | |
LAD3E: .byte $02 ;No sound + | LAD3E: .byte $02 ;No sound + |
LAD3F: .byte $FF ; | LAD3F: .byte $FF ; |
LAD40: .byte $D8 ; | LAD40: .byte $D8 ; |
LAD41: .byte $BA ;1/32 seconds + | LAD41: .byte $BA ;1/32 seconds + |
LAD42: .byte $64 ;D6 | | LAD42: .byte $64 ;D6 | |
LAD43: .byte $02 ;No sound | | LAD43: .byte $02 ;No sound | |
LAD44: .byte $64 ;D6 | | LAD44: .byte $64 ;D6 | |
LAD45: .byte $02 ;No sound | | LAD45: .byte $02 ;No sound | |
LAD46: .byte $B9 ;9/32 seconds | | LAD46: .byte $B9 ;9/32 seconds | |
LAD47: .byte $02 ;No sound | | LAD47: .byte $02 ;No sound | |
LAD48: .byte $BA ;1/32 Seconds | | LAD48: .byte $BA ;1/32 Seconds | |
LAD49: .byte $72 ;A6 | | LAD49: .byte $72 ;A6 | |
LAD4A: .byte $02 ;No sound | | LAD4A: .byte $02 ;No sound | |
LAD4B: .byte $72 ;A6 | | LAD4B: .byte $72 ;A6 | |
LAD4C: .byte $02 ;No sound | | LAD4C: .byte $02 ;No sound | |
LAD4D: .byte $B9 ;9/32 seconds | Repeat 24 times. | LAD4D: .byte $B9 ;9/32 seconds | Repeat 24 times. |
LAD4E: .byte $02 ;No sound | | LAD4E: .byte $02 ;No sound | |
LAD4F: .byte $BA ;1/32 seconds | | LAD4F: .byte $BA ;1/32 seconds | |
LAD50: .byte $7C ;D7 | | LAD50: .byte $7C ;D7 | |
LAD51: .byte $02 ;No sound | | LAD51: .byte $02 ;No sound | |
LAD52: .byte $7C ;D7 | | LAD52: .byte $7C ;D7 | |
LAD53: .byte $02 ;No sound | | LAD53: .byte $02 ;No sound | |
LAD54: .byte $B9 ;9/32 seconds | | LAD54: .byte $B9 ;9/32 seconds | |
LAD55: .byte $02 ;No sound | | LAD55: .byte $02 ;No sound | |
LAD56: .byte $BA ;1/32 seconds | | LAD56: .byte $BA ;1/32 seconds | |
LAD57: .byte $72 ;A6 | | LAD57: .byte $72 ;A6 | |
LAD58: .byte $02 ;No sound | | LAD58: .byte $02 ;No sound | |
LAD59: .byte $72 ;A6 | | LAD59: .byte $72 ;A6 | |
LAD5A: .byte $02 ;No sound | | LAD5A: .byte $02 ;No sound | |
LAD5B: .byte $B9 ;9/32 seconds | | LAD5B: .byte $B9 ;9/32 seconds | |
LAD5C: .byte $02 ;No sound + | LAD5C: .byte $02 ;No sound + |
LAD5D: .byte $FF ; | LAD5D: .byte $FF ; |
LAD5E: .byte $C4 ; | LAD5E: .byte $C4 ; |
LAD5F: .byte $B1 ;7/64 seconds + | LAD5F: .byte $B1 ;7/64 seconds + |
LAD60: .byte $34 ;D4 | | LAD60: .byte $34 ;D4 | |
LAD61: .byte $34 ;D4 | | LAD61: .byte $34 ;D4 | |
LAD62: .byte $34 ;D4 | | LAD62: .byte $34 ;D4 | |
LAD63: .byte $34 ;D4 | | LAD63: .byte $34 ;D4 | |
LAD64: .byte $02 ;No sound | | LAD64: .byte $02 ;No sound | |
LAD65: .byte $24 ;F#3 | | LAD65: .byte $24 ;F#3 | |
LAD66: .byte $24 ;F#3 | | LAD66: .byte $24 ;F#3 | |
LAD67: .byte $24 ;F#3 | | LAD67: .byte $24 ;F#3 | |
LAD68: .byte $20 ;E3 | | LAD68: .byte $20 ;E3 | |
LAD69: .byte $20 ;E3 | | LAD69: .byte $20 ;E3 | |
LAD6A: .byte $20 ;E3 | | LAD6A: .byte $20 ;E3 | |
LAD6B: .byte $20 ;E3 | | LAD6B: .byte $20 ;E3 | |
LAD6C: .byte $2A ;A3 | | LAD6C: .byte $2A ;A3 | |
LAD6D: .byte $2A ;A3 | | LAD6D: .byte $2A ;A3 | |
LAD6E: .byte $2A ;A3 | | LAD6E: .byte $2A ;A3 | |
LAD6F: .byte $2A ;A3 | Repeat 4 times. | LAD6F: .byte $2A ;A3 | Repeat 4 times. |
LAD70: .byte $02 ;No sound | | LAD70: .byte $02 ;No sound | |
LAD71: .byte $24 ;F#3 | | LAD71: .byte $24 ;F#3 | |
LAD72: .byte $24 ;F#3 | | LAD72: .byte $24 ;F#3 | |
LAD73: .byte $24 ;F#3 | | LAD73: .byte $24 ;F#3 | |
LAD74: .byte $24 ;F#3 | | LAD74: .byte $24 ;F#3 | |
LAD75: .byte $24 ;F#3 | | LAD75: .byte $24 ;F#3 | |
LAD76: .byte $24 ;F#3 | | LAD76: .byte $24 ;F#3 | |
LAD77: .byte $24 ;F#3 | | LAD77: .byte $24 ;F#3 | |
LAD78: .byte $B8 ;21/64 seconds | | LAD78: .byte $B8 ;21/64 seconds | |
LAD79: .byte $26 ;G3 | | LAD79: .byte $26 ;G3 | |
LAD7A: .byte $1C ;D3 | | LAD7A: .byte $1C ;D3 | |
LAD7B: .byte $20 ;E3 | | LAD7B: .byte $20 ;E3 | |
LAD7C: .byte $B9 ;9/32 seconds | | LAD7C: .byte $B9 ;9/32 seconds | |
LAD7D: .byte $02 ;No sound | | LAD7D: .byte $02 ;No sound | |
LAD7E: .byte $B8 ;21/64 seconds | | LAD7E: .byte $B8 ;21/64 seconds | |
LAD7F: .byte $2C ;A#3 | | LAD7F: .byte $2C ;A#3 | |
LAD80: .byte $2A ;A3 | | LAD80: .byte $2A ;A3 | |
LAD81: .byte $26 ;G3 | | LAD81: .byte $26 ;G3 | |
LAD82: .byte $B9 ;9/32 seconds | | LAD82: .byte $B9 ;9/32 seconds | |
LAD83: .byte $02 ;No sound + | LAD83: .byte $02 ;No sound + |
LAD84: .byte $FF ; | LAD84: .byte $FF ; |
LAD85: .byte $C3 ; | LAD85: .byte $C3 ; |
LAD86: .byte $B0 ;1/4 seconds + | LAD86: .byte $B0 ;1/4 seconds + |
LAD87: .byte $34 ;D4 | | LAD87: .byte $34 ;D4 | |
LAD88: .byte $34 ;D4 | | LAD88: .byte $34 ;D4 | |
LAD89: .byte $34 ;D4 | | LAD89: .byte $34 ;D4 | |
LAD8A: .byte $02 ;No sound | | LAD8A: .byte $02 ;No sound | |
LAD8B: .byte $02 ;No sound | | LAD8B: .byte $02 ;No sound | |
LAD8C: .byte $02 ;No sound | | LAD8C: .byte $02 ;No sound | |
LAD8D: .byte $34 ;D4 | | LAD8D: .byte $34 ;D4 | |
LAD8E: .byte $34 ;D4 | | LAD8E: .byte $34 ;D4 | |
LAD8F: .byte $34 ;D4 | | LAD8F: .byte $34 ;D4 | |
LAD90: .byte $02 ;No sound | | LAD90: .byte $02 ;No sound | |
LAD91: .byte $34 ;D4 | | LAD91: .byte $34 ;D4 | |
LAD92: .byte $34 ;D4 | | LAD92: .byte $34 ;D4 | |
LAD93: .byte $34 ;D4 | | LAD93: .byte $34 ;D4 | |
LAD94: .byte $34 ;D4 | Repeat 3 times. | LAD94: .byte $34 ;D4 | Repeat 3 times. |
LAD95: .byte $34 ;D4 | | LAD95: .byte $34 ;D4 | |
LAD96: .byte $02 ;No sound | | LAD96: .byte $02 ;No sound | |
LAD97: .byte $2C ;A#3 | | LAD97: .byte $2C ;A#3 | |
LAD98: .byte $2C ;A#3 | | LAD98: .byte $2C ;A#3 | |
LAD99: .byte $2C ;A#3 | | LAD99: .byte $2C ;A#3 | |
LAD9A: .byte $02 ;No sound | | LAD9A: .byte $02 ;No sound | |
LAD9B: .byte $02 ;No sound | | LAD9B: .byte $02 ;No sound | |
LAD9C: .byte $02 ;No sound | | LAD9C: .byte $02 ;No sound | |
LAD9D: .byte $2C ;A#3 | | LAD9D: .byte $2C ;A#3 | |
LAD9E: .byte $2C ;A#3 | | LAD9E: .byte $2C ;A#3 | |
LAD9F: .byte $30 ;C4 | | LAD9F: .byte $30 ;C4 | |
LADA0: .byte $02 ;No sound | | LADA0: .byte $02 ;No sound | |
LADA1: .byte $30 ;C4 | | LADA1: .byte $30 ;C4 | |
LADA2: .byte $30 ;C4 | | LADA2: .byte $30 ;C4 | |
LADA3: .byte $30 ;C4 | | LADA3: .byte $30 ;C4 | |
LADA4: .byte $30 ;C4 | | LADA4: .byte $30 ;C4 | |
LADA5: .byte $30 ;C4 | | LADA5: .byte $30 ;C4 | |
LADA6: .byte $02 ;No sound + | LADA6: .byte $02 ;No sound + |
LADA7: .byte $FF ; | LADA7: .byte $FF ; |
LADA8: .byte $C2 ; | LADA8: .byte $C2 ; |
LADA9: .byte $1C ;D3 + | LADA9: .byte $1C ;D3 + |
LADAA: .byte $1C ;D3 | | LADAA: .byte $1C ;D3 | |
LADAB: .byte $1C ;D3 | | LADAB: .byte $1C ;D3 | |
LADAC: .byte $02 ;No sound | | LADAC: .byte $02 ;No sound | |
LADAD: .byte $02 ;No sound | | LADAD: .byte $02 ;No sound | |
LADAE: .byte $02 ;No sound | | LADAE: .byte $02 ;No sound | |
LADAF: .byte $1C ;D3 | Repeat 2 times. | LADAF: .byte $1C ;D3 | Repeat 2 times. |
LADB0: .byte $1C ;D3 | | LADB0: .byte $1C ;D3 | |
LADB1: .byte $1C ;D3 | | LADB1: .byte $1C ;D3 | |
LADB2: .byte $02 ;No sound | | LADB2: .byte $02 ;No sound | |
LADB3: .byte $1C ;D3 | | LADB3: .byte $1C ;D3 | |
LADB4: .byte $1C ;D3 | | LADB4: .byte $1C ;D3 | |
LADB5: .byte $1C ;D3 | | LADB5: .byte $1C ;D3 | |
LADB6: .byte $1C ;D3 | | LADB6: .byte $1C ;D3 | |
LADB7: .byte $1C ;D3 | | LADB7: .byte $1C ;D3 | |
LADB8: .byte $02 ;No sound + | LADB8: .byte $02 ;No sound + |
LADB9: .byte $FF ; | LADB9: .byte $FF ; |
LADBA: .byte $B4 ;7/8 seconds | LADBA: .byte $B4 ;7/8 seconds |
LADBB: .byte $1C ;D3 | LADBB: .byte $1C ;D3 |
LADBC: .byte $B2 ;7/32 seconds | LADBC: .byte $B2 ;7/32 seconds |
LADBD: .byte $02 ;No sound | LADBD: .byte $02 ;No sound |
LADBE: .byte $B0 ;1/4 seconds | LADBE: .byte $B0 ;1/4 seconds |
LADBF: .byte $1C ;D3 | LADBF: .byte $1C ;D3 |
LADC0: .byte $02 ;No sound | LADC0: .byte $02 ;No sound |
LADC1: .byte $1C ;D3 | LADC1: .byte $1C ;D3 |
LADC2: .byte $1C ;D3 | LADC2: .byte $1C ;D3 |
LADC3: .byte $B2 ;7/32 seconds | LADC3: .byte $B2 ;7/32 seconds |
LADC4: .byte $1C ;D3 | LADC4: .byte $1C ;D3 |
| |
EndSQ2Data: | EndSQ2Data: |
LADC5: .byte $C2 ; | LADC5: .byte $C2 ; |
LADC6: .byte $B4 ;7/8 seconds + | LADC6: .byte $B4 ;7/8 seconds + |
LADC7: .byte $20 ;E3 | | LADC7: .byte $20 ;E3 | |
LADC8: .byte $2A ;A3 | Repeat 2 times. | LADC8: .byte $2A ;A3 | Repeat 2 times. |
LADC9: .byte $28 ;Ab3 | | LADC9: .byte $28 ;Ab3 | |
LADCA: .byte $26 ;G3 + | LADCA: .byte $26 ;G3 + |
LADCB: .byte $FF ; | LADCB: .byte $FF ; |
LADCC: .byte $20 ;E3 | LADCC: .byte $20 ;E3 |
LADCD: .byte $20 ;E3 | LADCD: .byte $20 ;E3 |
LADCE: .byte $C2 ; | LADCE: .byte $C2 ; |
LADCF: .byte $B0 ;1/4 seconds + | LADCF: .byte $B0 ;1/4 seconds + |
LADD0: .byte $34 ;D4 | | LADD0: .byte $34 ;D4 | |
LADD1: .byte $3C ;F#4 | | LADD1: .byte $3C ;F#4 | |
LADD2: .byte $42 ;A4 | | LADD2: .byte $42 ;A4 | |
LADD3: .byte $4C ;D5 | | LADD3: .byte $4C ;D5 | |
LADD4: .byte $B2 ;7/32 seconds | | LADD4: .byte $B2 ;7/32 seconds | |
LADD5: .byte $54 ;F#5 | | LADD5: .byte $54 ;F#5 | |
LADD6: .byte $50 ;E5 | | LADD6: .byte $50 ;E5 | |
LADD7: .byte $4C ;D5 | | LADD7: .byte $4C ;D5 | |
LADD8: .byte $B3 ;7/16 seconds | | LADD8: .byte $B3 ;7/16 seconds | |
LADD9: .byte $42 ;A4 | Repeat 2 times. | LADD9: .byte $42 ;A4 | Repeat 2 times. |
LADDA: .byte $3C ;F#4 | | LADDA: .byte $3C ;F#4 | |
LADDB: .byte $B3 ;7/16 seconds | | LADDB: .byte $B3 ;7/16 seconds | |
LADDC: .byte $46 ;B4 | | LADDC: .byte $46 ;B4 | |
LADDD: .byte $B2 ;7/32 seconds | | LADDD: .byte $B2 ;7/32 seconds | |
LADDE: .byte $34 ;D4 | | LADDE: .byte $34 ;D4 | |
LADDF: .byte $B1 ;7/64 seconds | | LADDF: .byte $B1 ;7/64 seconds | |
LADE0: .byte $4C ;D5 | | LADE0: .byte $4C ;D5 | |
LADE1: .byte $B0 ;1/4 seconds | | LADE1: .byte $B0 ;1/4 seconds | |
LADE2: .byte $42 ;A4 | | LADE2: .byte $42 ;A4 | |
LADE3: .byte $3C ;F#4 | | LADE3: .byte $3C ;F#4 | |
LADE4: .byte $B3 ;7/16 seconds | | LADE4: .byte $B3 ;7/16 seconds | |
LADE5: .byte $38 ;E4 | | LADE5: .byte $38 ;E4 | |
LADE6: .byte $46 ;B4 + | LADE6: .byte $46 ;B4 + |
LADE7: .byte $FF ; | LADE7: .byte $FF ; |
LADE8: .byte $C2 ; | LADE8: .byte $C2 ; |
LADE9: .byte $B3 ;7/16 seconds + | LADE9: .byte $B3 ;7/16 seconds + |
LADEA: .byte $38 ;E4 | | LADEA: .byte $38 ;E4 | |
LADEB: .byte $B2 ;7/32 seconds | | LADEB: .byte $B2 ;7/32 seconds | |
LADEC: .byte $3C ;F#4 | | LADEC: .byte $3C ;F#4 | |
LADED: .byte $34 ;D4 | | LADED: .byte $34 ;D4 | |
LADEE: .byte $34 ;D4 | | LADEE: .byte $34 ;D4 | |
LADEF: .byte $30 ;C4 | | LADEF: .byte $30 ;C4 | |
LADF0: .byte $38 ;E4 | | LADF0: .byte $38 ;E4 | |
LADF1: .byte $34 ;D4 | | LADF1: .byte $34 ;D4 | |
LADF2: .byte $44 ;A#4 | Repeat 2 times. | LADF2: .byte $44 ;A#4 | Repeat 2 times. |
LADF3: .byte $38 ;E4 | | LADF3: .byte $38 ;E4 | |
LADF4: .byte $34 ;D4 | | LADF4: .byte $34 ;D4 | |
LADF5: .byte $42 ;A4 | | LADF5: .byte $42 ;A4 | |
LADF6: .byte $B1 ;7/64 seconds | | LADF6: .byte $B1 ;7/64 seconds | |
LADF7: .byte $3A ;F4 | | LADF7: .byte $3A ;F4 | |
LADF8: .byte $40 ;Ab4 | | LADF8: .byte $40 ;Ab4 | |
LADF9: .byte $B2 ;7/32 seconds | | LADF9: .byte $B2 ;7/32 seconds | |
LADFA: .byte $46 ;B4 | | LADFA: .byte $46 ;B4 | |
LADFB: .byte $3E ;G4 | | LADFB: .byte $3E ;G4 | |
LADFC: .byte $3E ;G4 + | LADFC: .byte $3E ;G4 + |
LADFD: .byte $FF ; | LADFD: .byte $FF ; |
LADFE: .byte $C4 ; | LADFE: .byte $C4 ; |
LADFF: .byte $B2 ;7/32 seconds + | LADFF: .byte $B2 ;7/32 seconds + |
LAE00: .byte $3C ;F#4 | | LAE00: .byte $3C ;F#4 | |
LAE01: .byte $42 ;A4 | | LAE01: .byte $42 ;A4 | |
LAE02: .byte $4C ;D5 | | LAE02: .byte $4C ;D5 | |
LAE03: .byte $42 ;A4 | Repeat 4 times. | LAE03: .byte $42 ;A4 | Repeat 4 times. |
LAE04: .byte $3E ;G4 | | LAE04: .byte $3E ;G4 | |
LAE05: .byte $42 ;A4 | | LAE05: .byte $42 ;A4 | |
LAE06: .byte $4C ;D5 | | LAE06: .byte $4C ;D5 | |
LAE07: .byte $3E ;G4 + | LAE07: .byte $3E ;G4 + |
LAE08: .byte $FF ; | LAE08: .byte $FF ; |
LAE09: .byte $C2 ; | LAE09: .byte $C2 ; |
LAE0A: .byte $72 ;A6 + | LAE0A: .byte $72 ;A6 + |
LAE0B: .byte $6E ;G6 | | LAE0B: .byte $6E ;G6 | |
LAE0C: .byte $6C ;F#6 | | LAE0C: .byte $6C ;F#6 | |
LAE0D: .byte $68 ;E6 | | LAE0D: .byte $68 ;E6 | |
LAE0E: .byte $6E ;G6 | | LAE0E: .byte $6E ;G6 | |
LAE0F: .byte $6C ;F#6 | | LAE0F: .byte $6C ;F#6 | |
LAE10: .byte $64 ;D6 | | LAE10: .byte $64 ;D6 | |
LAE11: .byte $68 ;E6 + | LAE11: .byte $68 ;E6 + |
LAE12: .byte $FF ; | LAE12: .byte $FF ; |
LAE13: .byte $B4 ;7/8 seconds | LAE13: .byte $B4 ;7/8 seconds |
LAE14: .byte $4C ;D5 | LAE14: .byte $4C ;D5 |
LAE15: .byte $B3 ;7/16 seconds | LAE15: .byte $B3 ;7/16 seconds |
LAE16: .byte $56 ;G5 | LAE16: .byte $56 ;G5 |
LAE17: .byte $50 ;E5 | LAE17: .byte $50 ;E5 |
LAE18: .byte $B4 ;7/8 seconds | LAE18: .byte $B4 ;7/8 seconds |
LAE19: .byte $54 ;F#5 | LAE19: .byte $54 ;F#5 |
LAE1A: .byte $B3 ;7/16 seconds | LAE1A: .byte $B3 ;7/16 seconds |
LAE1B: .byte $56 ;G5 | LAE1B: .byte $56 ;G5 |
LAE1C: .byte $5C ;A#5 | LAE1C: .byte $5C ;A#5 |
LAE1D: .byte $B4 ;7/8 seconds | LAE1D: .byte $B4 ;7/8 seconds |
LAE1E: .byte $4C ;D5 | LAE1E: .byte $4C ;D5 |
LAE1F: .byte $B3 ;7/16 seconds | LAE1F: .byte $B3 ;7/16 seconds |
LAE20: .byte $50 ;E5 | LAE20: .byte $50 ;E5 |
LAE21: .byte $56 ;G5 | LAE21: .byte $56 ;G5 |
LAE22: .byte $B4 ;7/8 seconds | LAE22: .byte $B4 ;7/8 seconds |
LAE23: .byte $54 ;F#5 | LAE23: .byte $54 ;F#5 |
LAE24: .byte $B3 ;7/16 seconds | LAE24: .byte $B3 ;7/16 seconds |
LAE25: .byte $56 ;G5 | LAE25: .byte $56 ;G5 |
LAE26: .byte $5C ;A#5 | LAE26: .byte $5C ;A#5 |
LAE27: .byte $C4 ; | LAE27: .byte $C4 ; |
LAE28: .byte $B1 ;7/64 seconds + | LAE28: .byte $B1 ;7/64 seconds + |
LAE29: .byte $5A ;A5 | | LAE29: .byte $5A ;A5 | |
LAE2A: .byte $42 ;A4 | | LAE2A: .byte $42 ;A4 | |
LAE2B: .byte $56 ;G5 | | LAE2B: .byte $56 ;G5 | |
LAE2C: .byte $42 ;A4 | | LAE2C: .byte $42 ;A4 | |
LAE2D: .byte $54 ;F#5 | | LAE2D: .byte $54 ;F#5 | |
LAE2E: .byte $42 ;A4 | | LAE2E: .byte $42 ;A4 | |
LAE2F: .byte $50 ;E5 | Repeat 4 times. | LAE2F: .byte $50 ;E5 | Repeat 4 times. |
LAE30: .byte $42 ;A4 | | LAE30: .byte $42 ;A4 | |
LAE31: .byte $56 ;G5 | | LAE31: .byte $56 ;G5 | |
LAE32: .byte $3E ;G4 | | LAE32: .byte $3E ;G4 | |
LAE33: .byte $54 ;F#5 | | LAE33: .byte $54 ;F#5 | |
LAE34: .byte $3E ;G4 | | LAE34: .byte $3E ;G4 | |
LAE35: .byte $4C ;D5 | | LAE35: .byte $4C ;D5 | |
LAE36: .byte $3E ;G4 | | LAE36: .byte $3E ;G4 | |
LAE37: .byte $50 ;E5 | | LAE37: .byte $50 ;E5 | |
LAE38: .byte $3E ;G4 + | LAE38: .byte $3E ;G4 + |
LAE39: .byte $FF ; | LAE39: .byte $FF ; |
LAE3A: .byte $C8 ; | LAE3A: .byte $C8 ; |
LAE3B: .byte $B0 ;1/4 seconds + | LAE3B: .byte $B0 ;1/4 seconds + |
LAE3C: .byte $3C ;F#4 | | LAE3C: .byte $3C ;F#4 | |
LAE3D: .byte $3E ;G4 | | LAE3D: .byte $3E ;G4 | |
LAE3E: .byte $3C ;F#4 | | LAE3E: .byte $3C ;F#4 | |
LAE3F: .byte $3E ;G4 | | LAE3F: .byte $3E ;G4 | |
LAE40: .byte $42 ;A4 | | LAE40: .byte $42 ;A4 | |
LAE41: .byte $46 ;B4 | | LAE41: .byte $46 ;B4 | |
LAE42: .byte $42 ;A4 | Repeat 8 times. | LAE42: .byte $42 ;A4 | Repeat 8 times. |
LAE43: .byte $46 ;B4 | | LAE43: .byte $46 ;B4 | |
LAE44: .byte $4C ;D5 | | LAE44: .byte $4C ;D5 | |
LAE45: .byte $50 ;E5 | | LAE45: .byte $50 ;E5 | |
LAE46: .byte $4C ;D5 | | LAE46: .byte $4C ;D5 | |
LAE47: .byte $50 ;E5 | | LAE47: .byte $50 ;E5 | |
LAE48: .byte $50 ;E5 | | LAE48: .byte $50 ;E5 | |
LAE49: .byte $54 ;F#5 | | LAE49: .byte $54 ;F#5 | |
LAE4A: .byte $50 ;E5 | | LAE4A: .byte $50 ;E5 | |
LAE4B: .byte $54 ;F#5 + | LAE4B: .byte $54 ;F#5 + |
LAE4C: .byte $FF ; | LAE4C: .byte $FF ; |
LAE4D: .byte $C3 ; | LAE4D: .byte $C3 ; |
LAE4E: .byte $B0 ;1/4 seconds + | LAE4E: .byte $B0 ;1/4 seconds + |
LAE4F: .byte $42 ;A4 | | LAE4F: .byte $42 ;A4 | |
LAE50: .byte $42 ;A4 | | LAE50: .byte $42 ;A4 | |
LAE51: .byte $42 ;A4 | | LAE51: .byte $42 ;A4 | |
LAE52: .byte $02 ;No sound | | LAE52: .byte $02 ;No sound | |
LAE53: .byte $02 ;No sound | | LAE53: .byte $02 ;No sound | |
LAE54: .byte $02 ;No sound | | LAE54: .byte $02 ;No sound | |
LAE55: .byte $42 ;A4 | | LAE55: .byte $42 ;A4 | |
LAE56: .byte $42 ;A4 | | LAE56: .byte $42 ;A4 | |
LAE57: .byte $42 ;A4 | | LAE57: .byte $42 ;A4 | |
LAE58: .byte $02 ;No sound | | LAE58: .byte $02 ;No sound | |
LAE59: .byte $42 ;A4 | | LAE59: .byte $42 ;A4 | |
LAE5A: .byte $42 ;A4 | | LAE5A: .byte $42 ;A4 | |
LAE5B: .byte $42 ;A4 | | LAE5B: .byte $42 ;A4 | |
LAE5C: .byte $42 ;A4 | | LAE5C: .byte $42 ;A4 | |
LAE5D: .byte $42 ;A4 | Repeat 3 times. | LAE5D: .byte $42 ;A4 | Repeat 3 times. |
LAE5E: .byte $02 ;No sound | | LAE5E: .byte $02 ;No sound | |
LAE5F: .byte $3A ;F4 | | LAE5F: .byte $3A ;F4 | |
LAE60: .byte $3A ;F4 | | LAE60: .byte $3A ;F4 | |
LAE61: .byte $3A ;F4 | | LAE61: .byte $3A ;F4 | |
LAE62: .byte $02 ;No sound | | LAE62: .byte $02 ;No sound | |
LAE63: .byte $02 ;No sound | | LAE63: .byte $02 ;No sound | |
LAE64: .byte $02 ;No sound | | LAE64: .byte $02 ;No sound | |
LAE65: .byte $3A ;F4 | | LAE65: .byte $3A ;F4 | |
LAE66: .byte $3A ;F4 | | LAE66: .byte $3A ;F4 | |
LAE67: .byte $3E ;G4 | | LAE67: .byte $3E ;G4 | |
LAE68: .byte $02 ;No sound | | LAE68: .byte $02 ;No sound | |
LAE69: .byte $3E ;G4 | | LAE69: .byte $3E ;G4 | |
LAE6A: .byte $3E ;G4 | | LAE6A: .byte $3E ;G4 | |
LAE6B: .byte $3E ;G4 | | LAE6B: .byte $3E ;G4 | |
LAE6C: .byte $3E ;G4 | | LAE6C: .byte $3E ;G4 | |
LAE6D: .byte $3E ;G4 | | LAE6D: .byte $3E ;G4 | |
LAE6E: .byte $02 ;No sound + | LAE6E: .byte $02 ;No sound + |
LAE6F: .byte $FF ; | LAE6F: .byte $FF ; |
LAE70: .byte $C2 ; | LAE70: .byte $C2 ; |
LAE71: .byte $42 ;A4 + | LAE71: .byte $42 ;A4 + |
LAE72: .byte $42 ;A4 | | LAE72: .byte $42 ;A4 | |
LAE73: .byte $42 ;A4 | | LAE73: .byte $42 ;A4 | |
LAE74: .byte $02 ;No sound | | LAE74: .byte $02 ;No sound | |
LAE75: .byte $02 ;No sound | | LAE75: .byte $02 ;No sound | |
LAE76: .byte $02 ;No sound | | LAE76: .byte $02 ;No sound | |
LAE77: .byte $42 ;A4 | | LAE77: .byte $42 ;A4 | |
LAE78: .byte $42 ;A4 | Repeat 2 times. | LAE78: .byte $42 ;A4 | Repeat 2 times. |
LAE79: .byte $42 ;A4 | | LAE79: .byte $42 ;A4 | |
LAE7A: .byte $02 ;No sound | | LAE7A: .byte $02 ;No sound | |
LAE7B: .byte $42 ;A4 | | LAE7B: .byte $42 ;A4 | |
LAE7C: .byte $42 ;A4 | | LAE7C: .byte $42 ;A4 | |
LAE7D: .byte $42 ;A4 | | LAE7D: .byte $42 ;A4 | |
LAE7E: .byte $42 ;A4 | | LAE7E: .byte $42 ;A4 | |
LAE7F: .byte $42 ;A4 | | LAE7F: .byte $42 ;A4 | |
LAE80: .byte $02 ;No sound + | LAE80: .byte $02 ;No sound + |
LAE81: .byte $FF ; | LAE81: .byte $FF ; |
LAE82: .byte $B4 ;7/8 seconds | LAE82: .byte $B4 ;7/8 seconds |
LAE83: .byte $2A ;A3 | LAE83: .byte $2A ;A3 |
LAE84: .byte $B2 ;7/32 seconds | LAE84: .byte $B2 ;7/32 seconds |
LAE85: .byte $02 ;No sound | LAE85: .byte $02 ;No sound |
LAE86: .byte $B0 ;1/4 seconds | LAE86: .byte $B0 ;1/4 seconds |
LAE87: .byte $2A ;A3 | LAE87: .byte $2A ;A3 |
LAE88: .byte $02 ;No sound | LAE88: .byte $02 ;No sound |
LAE89: .byte $2A ;A3 | LAE89: .byte $2A ;A3 |
LAE8A: .byte $2A ;A3 | LAE8A: .byte $2A ;A3 |
LAE8B: .byte $B2 ;7/32 seconds | LAE8B: .byte $B2 ;7/32 seconds |
LAE8C: .byte $2A ;A3 | LAE8C: .byte $2A ;A3 |
LAE8D: .byte $00 ;End of end music. | LAE8D: .byte $00 ;End of end music. |
| |
EndNoiseData: | EndNoiseData: |
LAE8E: .byte $CA ; | LAE8E: .byte $CA ; |
LAE8F: .byte $B0 ;1/4 seconds + | LAE8F: .byte $B0 ;1/4 seconds + |
LAE90: .byte $04 ;Drumbeat 01 | | LAE90: .byte $04 ;Drumbeat 01 | |
LAE91: .byte $04 ;Drumbeat 01 | | LAE91: .byte $04 ;Drumbeat 01 | |
LAE92: .byte $04 ;Drumbeat 01 | | LAE92: .byte $04 ;Drumbeat 01 | |
LAE93: .byte $01 ;Drumbeat 00 | | LAE93: .byte $01 ;Drumbeat 00 | |
LAE94: .byte $01 ;Drumbeat 00 | | LAE94: .byte $01 ;Drumbeat 00 | |
LAE95: .byte $01 ;Drumbeat 00 | | LAE95: .byte $01 ;Drumbeat 00 | |
LAE96: .byte $04 ;Drumbeat 01 | | LAE96: .byte $04 ;Drumbeat 01 | |
LAE97: .byte $04 ;Drumbeat 01 | Repeat 10 times. | LAE97: .byte $04 ;Drumbeat 01 | Repeat 10 times. |
LAE98: .byte $04 ;Drumbeat 01 | | LAE98: .byte $04 ;Drumbeat 01 | |
LAE99: .byte $01 ;Drumbeat 00 | | LAE99: .byte $01 ;Drumbeat 00 | |
LAE9A: .byte $04 ;Drumbeat 01 | | LAE9A: .byte $04 ;Drumbeat 01 | |
LAE9B: .byte $04 ;Drumbeat 01 | | LAE9B: .byte $04 ;Drumbeat 01 | |
LAE9C: .byte $04 ;Drumbeat 01 | | LAE9C: .byte $04 ;Drumbeat 01 | |
LAE9D: .byte $04 ;Drumbeat 01 | | LAE9D: .byte $04 ;Drumbeat 01 | |
LAE9E: .byte $04 ;Drumbeat 01 | | LAE9E: .byte $04 ;Drumbeat 01 | |
LAE9F: .byte $01 ;Drumbeat 00 + | LAE9F: .byte $01 ;Drumbeat 00 + |
LAEA0: .byte $FF ; | LAEA0: .byte $FF ; |
LAEA1: .byte $D8 ; | LAEA1: .byte $D8 ; |
LAEA2: .byte $B2 ;7/32 seconds + | LAEA2: .byte $B2 ;7/32 seconds + |
LAEA3: .byte $04 ;Drumbeat 01 | Repeat 24 times. | LAEA3: .byte $04 ;Drumbeat 01 | Repeat 24 times. |
LAEA4: .byte $07 ;Drumbeat 02 + | LAEA4: .byte $07 ;Drumbeat 02 + |
LAEA5: .byte $FF ; | LAEA5: .byte $FF ; |
LAEA6: .byte $C4 ; | LAEA6: .byte $C4 ; |
LAEA7: .byte $B0 ;1/4 seconds + | LAEA7: .byte $B0 ;1/4 seconds + |
LAEA8: .byte $04 ;Drumbeat 01 | | LAEA8: .byte $04 ;Drumbeat 01 | |
LAEA9: .byte $04 ;Drumbeat 01 | | LAEA9: .byte $04 ;Drumbeat 01 | |
LAEAA: .byte $04 ;Drumbeat 01 | | LAEAA: .byte $04 ;Drumbeat 01 | |
LAEAB: .byte $01 ;Drumbeat 00 | | LAEAB: .byte $01 ;Drumbeat 00 | |
LAEAC: .byte $01 ;Drumbeat 00 | | LAEAC: .byte $01 ;Drumbeat 00 | |
LAEAD: .byte $01 ;Drumbeat 00 | | LAEAD: .byte $01 ;Drumbeat 00 | |
LAEAE: .byte $04 ;Drumbeat 01 | Repeat 4 times. | LAEAE: .byte $04 ;Drumbeat 01 | Repeat 4 times. |
LAEAF: .byte $04 ;Drumbeat 01 | | LAEAF: .byte $04 ;Drumbeat 01 | |
LAEB0: .byte $04 ;Drumbeat 01 | | LAEB0: .byte $04 ;Drumbeat 01 | |
LAEB1: .byte $01 ;Drumbeat 00 | | LAEB1: .byte $01 ;Drumbeat 00 | |
LAEB2: .byte $04 ;Drumbeat 01 | | LAEB2: .byte $04 ;Drumbeat 01 | |
LAEB3: .byte $04 ;Drumbeat 01 | | LAEB3: .byte $04 ;Drumbeat 01 | |
LAEB4: .byte $04 ;Drumbeat 01 | | LAEB4: .byte $04 ;Drumbeat 01 | |
LAEB5: .byte $04 ;Drumbeat 01 | | LAEB5: .byte $04 ;Drumbeat 01 | |
LAEB6: .byte $04 ;Drumbeat 01 | | LAEB6: .byte $04 ;Drumbeat 01 | |
LAEB7: .byte $01 ;Drumbeat 00 + | LAEB7: .byte $01 ;Drumbeat 00 + |
LAEB8: .byte $FF ; | LAEB8: .byte $FF ; |
LAEB9: .byte $C8 ; | LAEB9: .byte $C8 ; |
LAEBA: .byte $B1 ;7/64 seconds + | LAEBA: .byte $B1 ;7/64 seconds + |
LAEBB: .byte $04 ;Drumbeat 01 | | LAEBB: .byte $04 ;Drumbeat 01 | |
LAEBC: .byte $B0 ;1/4 seconds | | LAEBC: .byte $B0 ;1/4 seconds | |
LAEBD: .byte $04 ;Drumbeat 01 | | LAEBD: .byte $04 ;Drumbeat 01 | |
LAEBE: .byte $04 ;Drumbeat 01 | | LAEBE: .byte $04 ;Drumbeat 01 | |
LAEBF: .byte $B1 ;7/64 seconds | | LAEBF: .byte $B1 ;7/64 seconds | |
LAEC0: .byte $04 ;Drumbeat 01 | | LAEC0: .byte $04 ;Drumbeat 01 | |
LAEC1: .byte $B0 ;1/4 seconds | | LAEC1: .byte $B0 ;1/4 seconds | |
LAEC2: .byte $04 ;Drumbeat 01 | | LAEC2: .byte $04 ;Drumbeat 01 | |
LAEC3: .byte $04 ;Drumbeat 01 | Repeat 8 times. | LAEC3: .byte $04 ;Drumbeat 01 | Repeat 8 times. |
LAEC4: .byte $B1 ;7/64 seconds | | LAEC4: .byte $B1 ;7/64 seconds | |
LAEC5: .byte $04 ;Drumbeat 01 | | LAEC5: .byte $04 ;Drumbeat 01 | |
LAEC6: .byte $B0 ;1/4 seconds | | LAEC6: .byte $B0 ;1/4 seconds | |
LAEC7: .byte $04 ;Drumbeat 01 | | LAEC7: .byte $04 ;Drumbeat 01 | |
LAEC8: .byte $04 ;Drumbeat 01 | | LAEC8: .byte $04 ;Drumbeat 01 | |
LAEC9: .byte $B1 ;7/64 seconds | | LAEC9: .byte $B1 ;7/64 seconds | |
LAECA: .byte $07 ;Drumbeat 02 | | LAECA: .byte $07 ;Drumbeat 02 | |
LAECB: .byte $B0 ;1/4 seconds | | LAECB: .byte $B0 ;1/4 seconds | |
LAECC: .byte $04 ;Drumbeat 01 | | LAECC: .byte $04 ;Drumbeat 01 | |
LAECD: .byte $04 ;Drumbeat 01 + | LAECD: .byte $04 ;Drumbeat 01 + |
LAECE: .byte $FF ; | LAECE: .byte $FF ; |
LAECF: .byte $D0 ; | LAECF: .byte $D0 ; |
LAED0: .byte $B2 ;7/32 seconds + Repeat 16 times. | LAED0: .byte $B2 ;7/32 seconds + Repeat 16 times. |
LAED1: .byte $04 ;Drumbeat01 + | LAED1: .byte $04 ;Drumbeat01 + |
LAED2: .byte $FF ; | LAED2: .byte $FF ; |
LAED3: .byte $E0 ; | LAED3: .byte $E0 ; |
LAED4: .byte $B1 ;7/64 seconds + | LAED4: .byte $B1 ;7/64 seconds + |
LAED5: .byte $04 ;Drumbeat 01 | Repeat 32 times. | LAED5: .byte $04 ;Drumbeat 01 | Repeat 32 times. |
LAED6: .byte $04 ;Drumbeat 01 + | LAED6: .byte $04 ;Drumbeat 01 + |
LAED7: .byte $FF ; | LAED7: .byte $FF ; |
LAED8: .byte $E0 ; | LAED8: .byte $E0 ; |
LAED9: .byte $B0 ;1/4 seconds + | LAED9: .byte $B0 ;1/4 seconds + |
LAEDA: .byte $04 ;Drumbeat 01 | | LAEDA: .byte $04 ;Drumbeat 01 | |
LAEDB: .byte $04 ;Drumbeat 01 | | LAEDB: .byte $04 ;Drumbeat 01 | |
LAEDC: .byte $B1 ;7/64 seconds | | LAEDC: .byte $B1 ;7/64 seconds | |
LAEDD: .byte $07 ;Drumbeat 02 | Repeat 32 times. | LAEDD: .byte $07 ;Drumbeat 02 | Repeat 32 times. |
LAEDE: .byte $B0 ;1/4 seconds | | LAEDE: .byte $B0 ;1/4 seconds | |
LAEDF: .byte $0A ;Drumbeat 03 | | LAEDF: .byte $0A ;Drumbeat 03 | |
LAEE0: .byte $04 ;Drumbeat 01 | | LAEE0: .byte $04 ;Drumbeat 01 | |
LAEE1: .byte $B1 ;7/64 seconds | | LAEE1: .byte $B1 ;7/64 seconds | |
LAEE2: .byte $07 ;Drumbeat 02 + | LAEE2: .byte $07 ;Drumbeat 02 + |
LAEE3: .byte $FF ; | LAEE3: .byte $FF ; |
LAEE4: .byte $C8 ; | LAEE4: .byte $C8 ; |
LAEE5: .byte $B0 ;1/4 seconds + | LAEE5: .byte $B0 ;1/4 seconds + |
LAEE6: .byte $04 ;Drumbeat 01 | | LAEE6: .byte $04 ;Drumbeat 01 | |
LAEE7: .byte $04 ;Drumbeat 01 | | LAEE7: .byte $04 ;Drumbeat 01 | |
LAEE8: .byte $04 ;Drumbeat 01 | | LAEE8: .byte $04 ;Drumbeat 01 | |
LAEE9: .byte $01 ;Drumbeat 00 | | LAEE9: .byte $01 ;Drumbeat 00 | |
LAEEA: .byte $01 ;Drumbeat 00 | | LAEEA: .byte $01 ;Drumbeat 00 | |
LAEEB: .byte $01 ;Drumbeat 00 | | LAEEB: .byte $01 ;Drumbeat 00 | |
LAEEC: .byte $04 ;Drumbeat 01 | Repeat 8 times. | LAEEC: .byte $04 ;Drumbeat 01 | Repeat 8 times. |
LAEED: .byte $04 ;Drumbeat 01 | | LAEED: .byte $04 ;Drumbeat 01 | |
LAEEE: .byte $04 ;Drumbeat 01 | | LAEEE: .byte $04 ;Drumbeat 01 | |
LAEEF: .byte $01 ;Drumbeat 00 | | LAEEF: .byte $01 ;Drumbeat 00 | |
LAEF0: .byte $04 ;Drumbeat 01 | | LAEF0: .byte $04 ;Drumbeat 01 | |
LAEF1: .byte $04 ;Drumbeat 01 | | LAEF1: .byte $04 ;Drumbeat 01 | |
LAEF2: .byte $04 ;Drumbeat 01 | | LAEF2: .byte $04 ;Drumbeat 01 | |
LAEF3: .byte $04 ;Drumbeat 01 | | LAEF3: .byte $04 ;Drumbeat 01 | |
LAEF4: .byte $04 ;Drumbeat 01 | | LAEF4: .byte $04 ;Drumbeat 01 | |
LAEF5: .byte $01 ;Drumbeat 00 + | LAEF5: .byte $01 ;Drumbeat 00 + |
LAEF6: .byte $FF ; | LAEF6: .byte $FF ; |
LAEF7: .byte $B4 ;7/8 seconds | LAEF7: .byte $B4 ;7/8 seconds |
LAEF8: .byte $07 ;Drumbeat 02 | LAEF8: .byte $07 ;Drumbeat 02 |
LAEF9: .byte $B2 ;7/32 seconds | LAEF9: .byte $B2 ;7/32 seconds |
LAEFA: .byte $01 ;Drumbeat 00 | LAEFA: .byte $01 ;Drumbeat 00 |
LAEFB: .byte $B0 ;1/4 seconds | LAEFB: .byte $B0 ;1/4 seconds |
LAEFC: .byte $07 ;Drumbeat 02 | LAEFC: .byte $07 ;Drumbeat 02 |
LAEFD: .byte $01 ;Drumbeat 00 | LAEFD: .byte $01 ;Drumbeat 00 |
LAEFE: .byte $07 ;Drumbeat 02 | LAEFE: .byte $07 ;Drumbeat 02 |
LAEFF: .byte $07 ;Drumbeat 02 | LAEFF: .byte $07 ;Drumbeat 02 |
LAF00: .byte $B2 ;7/32 seconds | LAF00: .byte $B2 ;7/32 seconds |
LAF01: .byte $07 ;Drumbeat 02 | LAF01: .byte $07 ;Drumbeat 02 |
LAF02: .byte $00 ;End of end music. | LAF02: .byte $00 ;End of end music. |
| |
;Unused tile patterns. | ;Unused tile patterns. |
LAF03: .byte $80, $40, $20, $10, $88, $00, $00, $00, $00, $00, $00, $00, $80, $04, $00, $02 | LAF03: .byte $80, $40, $20, $10, $88, $00, $00, $00, $00, $00, $00, $00, $80, $04, $00, $02 |
LAF13: .byte $02, $00, $00, $00, $00, $07, $03, $03, $03, $01, $00, $00, $00, $84, $C4, $42 | LAF13: .byte $02, $00, $00, $00, $00, $07, $03, $03, $03, $01, $00, $00, $00, $84, $C4, $42 |
LAF23: .byte $62, $21, $31, $11, $11, $80, $C0, $C0, $E0, $E0, $F0, $F0, $F0, $00, $00, $00 | LAF23: .byte $62, $21, $31, $11, $11, $80, $C0, $C0, $E0, $E0, $F0, $F0, $F0, $00, $00, $00 |
LAF33: .byte $00, $00, $00, $00, $01, $00, $00, $00, $00, $01, $01, $03, $03, $11, $11, $31 | LAF33: .byte $00, $00, $00, $00, $01, $00, $00, $00, $00, $01, $01, $03, $03, $11, $11, $31 |
LAF43: .byte $21, $63, $62, $C4, $84, $F0, $F0, $F0, $E0, $E0, $E0, $C0, $80, $01, $13, $16 | LAF43: .byte $21, $63, $62, $C4, $84, $F0, $F0, $F0, $E0, $E0, $E0, $C0, $80, $01, $13, $16 |
LAF53: .byte $2C, $78, $B3, $EC, $F0, $07, $1F, $1E, $3C, $78, $F0, $E0, $00, $08, $10, $20 | LAF53: .byte $2C, $78, $B3, $EC, $F0, $07, $1F, $1E, $3C, $78, $F0, $E0, $00, $08, $10, $20 |
LAF63: .byte $40, $80, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $82, $CC, $4E | LAF63: .byte $40, $80, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $82, $CC, $4E |
LAF73: .byte $4C, $40, $4C, $4C, $4C, $82, $CC, $CE, $CC, $C0, $CC, $CC, $CC, $00, $00, $00 | LAF73: .byte $4C, $40, $4C, $4C, $4C, $82, $CC, $CE, $CC, $C0, $CC, $CC, $CC, $00, $00, $00 |
LAF83: .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 | LAF83: .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 |
LAF93: .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 | LAF93: .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 |
LAFA3: .byte $01, $03, $06, $0C, $18, $00, $00, $00, $00, $00, $01, $03, $07, $0F, $3C, $E0 | LAFA3: .byte $01, $03, $06, $0C, $18, $00, $00, $00, $00, $00, $01, $03, $07, $0F, $3C, $E0 |
LAFB3: .byte $84, $08, $30, $60, $E0, $00, $02, $1F, $7A, $F4, $C8, $98, $10, $19, $31, $33 | LAFB3: .byte $84, $08, $30, $60, $E0, $00, $02, $1F, $7A, $F4, $C8, $98, $10, $19, $31, $33 |
LABC3: .byte $63, $63, $67, $E7, $E7, $06, $0E, $0C, $1C, $1C, $18, $18, $18, $C0, $C0, $80 | LABC3: .byte $63, $63, $67, $E7, $E7, $06, $0E, $0C, $1C, $1C, $18, $18, $18, $C0, $C0, $80 |
LAFD3: .byte $80, $80, $00, $00, $00, $30, $30, $60, $60, $60, $E0, $E0, $E0, $C7, $C7, $C7 | LAFD3: .byte $80, $80, $00, $00, $00, $30, $30, $60, $60, $60, $E0, $E0, $E0, $C7, $C7, $C7 |
LAFE3: .byte $C7, $C7, $C7, $C7, $C7, $38, $38, $38, $38, $38, $38, $38, $38, $20, $20, $20 | LAFE3: .byte $C7, $C7, $C7, $C7, $C7, $38, $38, $38, $38, $38, $38, $38, $38, $20, $20, $20 |
LAFF3: .byte $20, $20, $20, $20, $20, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0 | LAFF3: .byte $20, $20, $20, $20, $20, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $C0 |
| |
IntroSQ2Data: | IntroSQ2Data: |
LB000: .byte $C2 ; | LB000: .byte $C2 ; |
LB001: .byte $B4 ;7/8 seconds + | LB001: .byte $B4 ;7/8 seconds + |
LB002: .byte $64 ;D6 | | LB002: .byte $64 ;D6 | |
LB003: .byte $74 ;A#6 | | LB003: .byte $74 ;A#6 | |
LB004: .byte $6A ;F6 | | LB004: .byte $6A ;F6 | |
LB005: .byte $02 ;No sound | Repeat 2 times. | LB005: .byte $02 ;No sound | Repeat 2 times. |
LB006: .byte $64 ;D6 | | LB006: .byte $64 ;D6 | |
LB007: .byte $78 ;C7 | | LB007: .byte $78 ;C7 | |
LB008: .byte $74 ;A#6 | | LB008: .byte $74 ;A#6 | |
LB009: .byte $02 ;No sound + | LB009: .byte $02 ;No sound + |
LB00A: .byte $FF ; | LB00A: .byte $FF ; |
LB00B: .byte $C2 ; | LB00B: .byte $C2 ; |
LB00C: .byte $B2 ;7/32 seconds + | LB00C: .byte $B2 ;7/32 seconds + |
LB00D: .byte $72 ;A6 | | LB00D: .byte $72 ;A6 | |
LB00E: .byte $5A ;A5 | | LB00E: .byte $5A ;A5 | |
LB00F: .byte $6E ;G6 | | LB00F: .byte $6E ;G6 | |
LB010: .byte $56 ;G5 | | LB010: .byte $56 ;G5 | |
LB011: .byte $6C ;F#6 | | LB011: .byte $6C ;F#6 | |
LB012: .byte $54 ;F#5 | | LB012: .byte $54 ;F#5 | |
LB013: .byte $68 ;E6 | Repeat 2 times. | LB013: .byte $68 ;E6 | Repeat 2 times. |
LB014: .byte $50 ;E5 | | LB014: .byte $50 ;E5 | |
LB015: .byte $6E ;G6 | | LB015: .byte $6E ;G6 | |
LB016: .byte $56 ;G5 | | LB016: .byte $56 ;G5 | |
LB017: .byte $6C ;F#6 | | LB017: .byte $6C ;F#6 | |
LB018: .byte $54 ;F#5 | | LB018: .byte $54 ;F#5 | |
LB019: .byte $68 ;E6 | | LB019: .byte $68 ;E6 | |
LB01A: .byte $50 ;E5 | | LB01A: .byte $50 ;E5 | |
LB01B: .byte $64 ;D6 | | LB01B: .byte $64 ;D6 | |
LB01C: .byte $4C ;D5 + | LB01C: .byte $4C ;D5 + |
LB01D: .byte $FF ; | LB01D: .byte $FF ; |
LB01E: .byte $C4 ; | LB01E: .byte $C4 ; |
LB01F: .byte $72 ;A6 + | LB01F: .byte $72 ;A6 + |
LB020: .byte $5A ;A5 | | LB020: .byte $5A ;A5 | |
LB021: .byte $6E ;G6 | | LB021: .byte $6E ;G6 | |
LB022: .byte $5A ;A5 | | LB022: .byte $5A ;A5 | |
LB023: .byte $6C ;F#6 | | LB023: .byte $6C ;F#6 | |
LB024: .byte $5A ;A5 | | LB024: .byte $5A ;A5 | |
LB025: .byte $68 ;E6 | | LB025: .byte $68 ;E6 | |
LB026: .byte $5A ;A5 | Repeat 4 times. | LB026: .byte $5A ;A5 | Repeat 4 times. |
LB027: .byte $6E ;G6 | | LB027: .byte $6E ;G6 | |
LB028: .byte $56 ;G5 | | LB028: .byte $56 ;G5 | |
LB029: .byte $6C ;F#6 | | LB029: .byte $6C ;F#6 | |
LB02A: .byte $56 ;G5 | | LB02A: .byte $56 ;G5 | |
LB02B: .byte $68 ;E6 | | LB02B: .byte $68 ;E6 | |
LB02C: .byte $56 ;G5 | | LB02C: .byte $56 ;G5 | |
LB02D: .byte $64 ;D6 | | LB02D: .byte $64 ;D6 | |
LB02E: .byte $56 ;G5 + | LB02E: .byte $56 ;G5 + |
LB02F: .byte $FF ; | LB02F: .byte $FF ; |
LB030: .byte $B2 ;7/32 seconds | LB030: .byte $B2 ;7/32 seconds |
LB031: .byte $5A ;A5 | LB031: .byte $5A ;A5 |
LB032: .byte $B1 ;7/64 seconds | LB032: .byte $B1 ;7/64 seconds |
LB033: .byte $42 ;A4 | LB033: .byte $42 ;A4 |
LB034: .byte $B2 ;7/32 seconds | LB034: .byte $B2 ;7/32 seconds |
LB035: .byte $56 ;G5 | LB035: .byte $56 ;G5 |
LB036: .byte $B1 ;7/64 seconds | LB036: .byte $B1 ;7/64 seconds |
LB037: .byte $42 ;A4 | LB037: .byte $42 ;A4 |
LB038: .byte $B2 ;7/32 seconds | LB038: .byte $B2 ;7/32 seconds |
LB039: .byte $54 ;F#5 | LB039: .byte $54 ;F#5 |
LB03A: .byte $B1 ;7/64 seconds | LB03A: .byte $B1 ;7/64 seconds |
LB03B: .byte $42 ;A4 | LB03B: .byte $42 ;A4 |
LB03C: .byte $B2 ;7/32 seconds | LB03C: .byte $B2 ;7/32 seconds |
LB03D: .byte $50 ;E5 | LB03D: .byte $50 ;E5 |
LB03E: .byte $B1 ;7/64 seconds | LB03E: .byte $B1 ;7/64 seconds |
LB03F: .byte $42 ;A4 | LB03F: .byte $42 ;A4 |
LB040: .byte $B2 ;7/32 seconds | LB040: .byte $B2 ;7/32 seconds |
LB041: .byte $5A ;A5 | LB041: .byte $5A ;A5 |
LB042: .byte $B1 ;7/64 seconds | LB042: .byte $B1 ;7/64 seconds |
LB043: .byte $42 ;A4 | LB043: .byte $42 ;A4 |
LB044: .byte $B2 ;7/32 seconds | LB044: .byte $B2 ;7/32 seconds |
LB045: .byte $56 ;G5 | LB045: .byte $56 ;G5 |
LB046: .byte $B1 ;7/64 seconds | LB046: .byte $B1 ;7/64 seconds |
LB047: .byte $42 ;A4 | LB047: .byte $42 ;A4 |
LB048: .byte $B2 ;7/32 seconds | LB048: .byte $B2 ;7/32 seconds |
LB049: .byte $52 ;F5 | LB049: .byte $52 ;F5 |
LB04A: .byte $B1 ;7/64 seconds | LB04A: .byte $B1 ;7/64 seconds |
LB04B: .byte $42 ;A4 | LB04B: .byte $42 ;A4 |
LB04C: .byte $B2 ;7/32 seconds | LB04C: .byte $B2 ;7/32 seconds |
LB04D: .byte $50 ;E5 | LB04D: .byte $50 ;E5 |
LB04E: .byte $B1 ;7/64 seconds | LB04E: .byte $B1 ;7/64 seconds |
LB04F: .byte $42 ;A4 | LB04F: .byte $42 ;A4 |
LB050: .byte $B2 ;7/32 seconds | LB050: .byte $B2 ;7/32 seconds |
LB051: .byte $5A ;A5 | LB051: .byte $5A ;A5 |
LB052: .byte $B1 ;7/64 seconds | LB052: .byte $B1 ;7/64 seconds |
LB053: .byte $44 ;A#4 | LB053: .byte $44 ;A#4 |
LB054: .byte $B2 ;7/32 seconds | LB054: .byte $B2 ;7/32 seconds |
LB055: .byte $56 ;G5 | LB055: .byte $56 ;G5 |
LB056: .byte $B1 ;7/64 seconds | LB056: .byte $B1 ;7/64 seconds |
LB057: .byte $44 ;A#4 | LB057: .byte $44 ;A#4 |
LB058: .byte $B2 ;7/32 seconds | LB058: .byte $B2 ;7/32 seconds |
LB059: .byte $52 ;F5 | LB059: .byte $52 ;F5 |
LB05A: .byte $B1 ;7/64 seconds | LB05A: .byte $B1 ;7/64 seconds |
LB05B: .byte $44 ;A#4 | LB05B: .byte $44 ;A#4 |
LB05C: .byte $B2 ;7/32 seconds | LB05C: .byte $B2 ;7/32 seconds |
LB05D: .byte $56 ;G5 | LB05D: .byte $56 ;G5 |
LB05E: .byte $B1 ;7/64 seconds | LB05E: .byte $B1 ;7/64 seconds |
LB05F: .byte $44 ;A#4 | LB05F: .byte $44 ;A#4 |
LB060: .byte $C4 ; | LB060: .byte $C4 ; |
LB061: .byte $5A ;A5 + | LB061: .byte $5A ;A5 + |
LB062: .byte $50 ;E5 | Repeat 4 times. | LB062: .byte $50 ;E5 | Repeat 4 times. |
LB063: .byte $46 ;B4 + | LB063: .byte $46 ;B4 + |
LB064: .byte $FF ; | LB064: .byte $FF ; |
LB065: .byte $C3 ; | LB065: .byte $C3 ; |
LB066: .byte $58 ;Ab5 + | LB066: .byte $58 ;Ab5 + |
LB067: .byte $50 ;E5 | Repeat 3 times. | LB067: .byte $50 ;E5 | Repeat 3 times. |
LB068: .byte $46 ;B4 + | LB068: .byte $46 ;B4 + |
LB069: .byte $FF ; | LB069: .byte $FF ; |
LB06A: .byte $58 ;Ab5 | LB06A: .byte $58 ;Ab5 |
LB06B: .byte $50 ;E5 | LB06B: .byte $50 ;E5 |
LB06C: .byte $B0 ;1/4 seconds | LB06C: .byte $B0 ;1/4 seconds |
LB06D: .byte $46 ;B4 | LB06D: .byte $46 ;B4 |
LB06E: .byte $02 ;No sound | LB06E: .byte $02 ;No sound |
LB06F: .byte $E0 ; | LB06F: .byte $E0 ; |
LB070: .byte $B6 ;21/32 seconds + | LB070: .byte $B6 ;21/32 seconds + |
LB071: .byte $1C ;D3 | Repeat 32 times. | LB071: .byte $1C ;D3 | Repeat 32 times. |
LB072: .byte $B2 ;7/32 seconds | | LB072: .byte $B2 ;7/32 seconds | |
LB073: .byte $02 ;No sound + | LB073: .byte $02 ;No sound + |
LB074: .byte $FF ; | LB074: .byte $FF ; |
LB075: .byte $00 ;End intro music. | LB075: .byte $00 ;End intro music. |
| |
IntroTriangleData: | IntroTriangleData: |
LB076: .byte $D0 | LB076: .byte $D0 |
LB077: .byte $B6 ;21/32 seconds + | LB077: .byte $B6 ;21/32 seconds + |
LB078: .byte $2A ;A3 | | LB078: .byte $2A ;A3 | |
LB079: .byte $B1 ;7/64 seconds | Repeat 16 times. | LB079: .byte $B1 ;7/64 seconds | Repeat 16 times. |
LB07A: .byte $2A ;A3 | | LB07A: .byte $2A ;A3 | |
LB07B: .byte $B1 ;7/64 seconds | | LB07B: .byte $B1 ;7/64 seconds | |
LB07C: .byte $02 ;No sound + | LB07C: .byte $02 ;No sound + |
LB07D: .byte $FF ; | LB07D: .byte $FF ; |
LB07E: .byte $B4 ;7/8 seconds | LB07E: .byte $B4 ;7/8 seconds |
LB07F: .byte $4C ;D5 | LB07F: .byte $4C ;D5 |
LB080: .byte $60 ;C6 | LB080: .byte $60 ;C6 |
LB081: .byte $5E ;B5 | LB081: .byte $5E ;B5 |
LB082: .byte $5C ;A#5 | LB082: .byte $5C ;A#5 |
LB083: .byte $54 ;F#5 | LB083: .byte $54 ;F#5 |
LB084: .byte $60 ;C6 | LB084: .byte $60 ;C6 |
LB085: .byte $5C ;A#5 | LB085: .byte $5C ;A#5 |
LB086: .byte $56 ;G5 | LB086: .byte $56 ;G5 |
LB087: .byte $C2 ; | LB087: .byte $C2 ; |
LB088: .byte $34 ;D4 + | LB088: .byte $34 ;D4 + |
LB089: .byte $48 ;C5 | | LB089: .byte $48 ;C5 | |
LB08A: .byte $46 ;B4 | | LB08A: .byte $46 ;B4 | |
LB08B: .byte $44 ;A#4 | Repeat 2 times. | LB08B: .byte $44 ;A#4 | Repeat 2 times. |
LB08C: .byte $3C ;F#4 | | LB08C: .byte $3C ;F#4 | |
LB08D: .byte $48 ;C5 | | LB08D: .byte $48 ;C5 | |
LB08E: .byte $44 ;A#4 | | LB08E: .byte $44 ;A#4 | |
LB08F: .byte $3E ;G4 + | LB08F: .byte $3E ;G4 + |
LB090: .byte $FF ; | LB090: .byte $FF ; |
LB091: .byte $C2 ; | LB091: .byte $C2 ; |
LB092: .byte $B2 ;7/32 seconds + | LB092: .byte $B2 ;7/32 seconds + |
LB093: .byte $34 ;D4 | | LB093: .byte $34 ;D4 | |
LB094: .byte $B1 ;7/64 seconds | Repeat 2 times. | LB094: .byte $B1 ;7/64 seconds | Repeat 2 times. |
LB095: .byte $42 ;A4 | | LB095: .byte $42 ;A4 | |
LB096: .byte $B5 ;1 13/16 seconds| | LB096: .byte $B5 ;1 13/16 seconds| |
LB097: .byte $4C ;D5 + | LB097: .byte $4C ;D5 + |
LB098: .byte $FF ; | LB098: .byte $FF ; |
LB099: .byte $C2 ; | LB099: .byte $C2 ; |
LB09A: .byte $B2 ;7/32 seconds + | LB09A: .byte $B2 ;7/32 seconds + |
LB09B: .byte $2C ;A#3 | | LB09B: .byte $2C ;A#3 | |
LB09C: .byte $B1 ;7/64 seconds | Repeat 2 times. | LB09C: .byte $B1 ;7/64 seconds | Repeat 2 times. |
LB09D: .byte $3A ;F4 | | LB09D: .byte $3A ;F4 | |
LB09E: .byte $B5 ;1 13/16 seconds| | LB09E: .byte $B5 ;1 13/16 seconds| |
LB09F: .byte $48 ;C5 + | LB09F: .byte $48 ;C5 + |
LB0A0: .byte $FF ; | LB0A0: .byte $FF ; |
LB0A1: .byte $C2 ; | LB0A1: .byte $C2 ; |
LB0A2: .byte $B2 ;7/32 seconds + | LB0A2: .byte $B2 ;7/32 seconds + |
LB0A3: .byte $1E ;D#3 | | LB0A3: .byte $1E ;D#3 | |
LB0A4: .byte $B1 ;7/64 seconds | Repeat 2 times. | LB0A4: .byte $B1 ;7/64 seconds | Repeat 2 times. |
LB0A5: .byte $2C ;A#3 | | LB0A5: .byte $2C ;A#3 | |
LB0A6: .byte $B5 ;1 13/16 seconds| | LB0A6: .byte $B5 ;1 13/16 seconds| |
LB0A7: .byte $36 ;D#4 + | LB0A7: .byte $36 ;D#4 + |
LB0A8: .byte $FF ; | LB0A8: .byte $FF ; |
LB0A9: .byte $C4 ; | LB0A9: .byte $C4 ; |
LB0AA: .byte $B2 ;7/32 seconds + | LB0AA: .byte $B2 ;7/32 seconds + |
LB0AB: .byte $20 ;E3 | | LB0AB: .byte $20 ;E3 | |
LB0AC: .byte $B1 ;7/64 seconds | Repeat 4 times. | LB0AC: .byte $B1 ;7/64 seconds | Repeat 4 times. |
LB0AD: .byte $2E ;B3 | | LB0AD: .byte $2E ;B3 | |
LB0AE: .byte $B5 ;1 13/16 seconds| | LB0AE: .byte $B5 ;1 13/16 seconds| |
LB0AF: .byte $38 ;E4 + | LB0AF: .byte $38 ;E4 + |
LB0B0: .byte $FF ; | LB0B0: .byte $FF ; |
LB0B1: .byte $E0 ; | LB0B1: .byte $E0 ; |
LB0B2: .byte $B6 ;21/32 seconds + | LB0B2: .byte $B6 ;21/32 seconds + |
LB0B3: .byte $2A ;A3 | | LB0B3: .byte $2A ;A3 | |
LB0B4: .byte $B1 ;7/64 seconds | Repeat 32 times. | LB0B4: .byte $B1 ;7/64 seconds | Repeat 32 times. |
LB0B5: .byte $2A ;A3 | | LB0B5: .byte $2A ;A3 | |
LB0B6: .byte $B1 ;7/64 seconds | | LB0B6: .byte $B1 ;7/64 seconds | |
LB0B7: .byte $02 ;No sound + | LB0B7: .byte $02 ;No sound + |
LB0B8: .byte $FF ; | LB0B8: .byte $FF ; |
| |
IntroSQ1Data: | IntroSQ1Data: |
LB0B9: .byte $D0 ; | LB0B9: .byte $D0 ; |
LB0BA: .byte $B6 ;21/32 seconds + | LB0BA: .byte $B6 ;21/32 seconds + |
LB0BB: .byte $06 ;D2 | Repeat 16 times. | LB0BB: .byte $06 ;D2 | Repeat 16 times. |
LB0BC: .byte $B2 ;7/32 seconds | | LB0BC: .byte $B2 ;7/32 seconds | |
LB0BD: .byte $02 ;No sound + | LB0BD: .byte $02 ;No sound + |
LB0BE: .byte $FF ; | LB0BE: .byte $FF ; |
LB0BF: .byte $C8 ; | LB0BF: .byte $C8 ; |
LB0C0: .byte $B4 ;7/8 seconds + Repeat 8 times. | LB0C0: .byte $B4 ;7/8 seconds + Repeat 8 times. |
LB0C1: .byte $02 ;No sound + | LB0C1: .byte $02 ;No sound + |
LB0C2: .byte $FF ; | LB0C2: .byte $FF ; |
LB0C3: .byte $B2 ;7/32 seconds | LB0C3: .byte $B2 ;7/32 seconds |
LB0C4: .byte $24 ;F#3 | LB0C4: .byte $24 ;F#3 |
LB0C5: .byte $26 ;G3 | LB0C5: .byte $26 ;G3 |
LB0C6: .byte $2A ;A3 | LB0C6: .byte $2A ;A3 |
LB0C7: .byte $2E ;B3 | LB0C7: .byte $2E ;B3 |
LB0C8: .byte $34 ;D4 | LB0C8: .byte $34 ;D4 |
LB0C9: .byte $38 ;E4 | LB0C9: .byte $38 ;E4 |
LB0CA: .byte $3C ;F#4 | LB0CA: .byte $3C ;F#4 |
LB0CB: .byte $3E ;G4 | LB0CB: .byte $3E ;G4 |
LB0CC: .byte $B6 ;21/32 seconds | LB0CC: .byte $B6 ;21/32 seconds |
LB0CD: .byte $42 ;A4 | LB0CD: .byte $42 ;A4 |
LB0CE: .byte $B1 ;7/64 seconds | LB0CE: .byte $B1 ;7/64 seconds |
LB0CF: .byte $3E ;G4 | LB0CF: .byte $3E ;G4 |
LB0D0: .byte $3C ;F#4 | LB0D0: .byte $3C ;F#4 |
LB0D1: .byte $B6 ;21/32 seconds | LB0D1: .byte $B6 ;21/32 seconds |
LB0D2: .byte $3E ;G4 | LB0D2: .byte $3E ;G4 |
LB0D3: .byte $B1 ;7/64 seconds | LB0D3: .byte $B1 ;7/64 seconds |
LB0D4: .byte $3C ;F#4 | LB0D4: .byte $3C ;F#4 |
LB0D5: .byte $38 ;E4 | LB0D5: .byte $38 ;E4 |
LB0D6: .byte $B6 ;21/32 seconds | LB0D6: .byte $B6 ;21/32 seconds |
LB0D7: .byte $34 ;D4 | LB0D7: .byte $34 ;D4 |
LB0D8: .byte $B2 ;7/32 seconds | LB0D8: .byte $B2 ;7/32 seconds |
LB0D9: .byte $42 ;A4 | LB0D9: .byte $42 ;A4 |
LB0DA: .byte $B4 ;7/8 seconds | LB0DA: .byte $B4 ;7/8 seconds |
LB0DB: .byte $4C ;D5 | LB0DB: .byte $4C ;D5 |
LB0DC: .byte $B3 ;7/16 seconds | LB0DC: .byte $B3 ;7/16 seconds |
LB0DD: .byte $44 ;A#4 | LB0DD: .byte $44 ;A#4 |
LB0DE: .byte $42 ;A4 | LB0DE: .byte $42 ;A4 |
LB0DF: .byte $3E ;G4 | LB0DF: .byte $3E ;G4 |
LB0E0: .byte $3C ;F#4 | LB0E0: .byte $3C ;F#4 |
LB0E1: .byte $B6 ;21/32 seconds | LB0E1: .byte $B6 ;21/32 seconds |
LB0E2: .byte $38 ;E4 | LB0E2: .byte $38 ;E4 |
LB0E3: .byte $B2 ;7/32 seconds | LB0E3: .byte $B2 ;7/32 seconds |
LB0E4: .byte $3C ;F#4 | LB0E4: .byte $3C ;F#4 |
LB0E5: .byte $B6 ;21/32 seconds | LB0E5: .byte $B6 ;21/32 seconds |
LB0E6: .byte $42 ;A4 | LB0E6: .byte $42 ;A4 |
LB0E7: .byte $B2 ;7/32 seconds | LB0E7: .byte $B2 ;7/32 seconds |
LB0E8: .byte $4C ;D5 | LB0E8: .byte $4C ;D5 |
LB0E9: .byte $B6 ;21/32 seconds | LB0E9: .byte $B6 ;21/32 seconds |
LB0EA: .byte $38 ;E4 | LB0EA: .byte $38 ;E4 |
LB0EB: .byte $B2 ;7/32 seconds | LB0EB: .byte $B2 ;7/32 seconds |
LB0EC: .byte $3C ;F#4 | LB0EC: .byte $3C ;F#4 |
LB0ED: .byte $B4 ;7/8 seconds | LB0ED: .byte $B4 ;7/8 seconds |
LB0EE: .byte $34 ;D4 | LB0EE: .byte $34 ;D4 |
LB0EF: .byte $B3 ;7/16 seconds | LB0EF: .byte $B3 ;7/16 seconds |
LB0F0: .byte $2A ;A3 | LB0F0: .byte $2A ;A3 |
LB0F1: .byte $2E ;B3 | LB0F1: .byte $2E ;B3 |
LB0F2: .byte $34 ;D4 | LB0F2: .byte $34 ;D4 |
LB0F3: .byte $38 ;E4 | LB0F3: .byte $38 ;E4 |
LB0F4: .byte $B6 ;21/32 seconds | LB0F4: .byte $B6 ;21/32 seconds |
LB0F5: .byte $34 ;D4 | LB0F5: .byte $34 ;D4 |
LB0F6: .byte $B2 ;7/32 seconds | LB0F6: .byte $B2 ;7/32 seconds |
LB0F7: .byte $2C ;A#3 | LB0F7: .byte $2C ;A#3 |
LB0F8: .byte $B4 ;7/8 seconds | LB0F8: .byte $B4 ;7/8 seconds |
LB0F9: .byte $26 ;G3 | LB0F9: .byte $26 ;G3 |
LB0FA: .byte $B5 ;1 13/16 seconds | LB0FA: .byte $B5 ;1 13/16 seconds |
LB0FB: .byte $38 ;E4 | LB0FB: .byte $38 ;E4 |
LB0FC: .byte $3C ;F#4 | LB0FC: .byte $3C ;F#4 |
LB0FD: .byte $42 ;A4 | LB0FD: .byte $42 ;A4 |
LB0FE: .byte $4C ;D5 | LB0FE: .byte $4C ;D5 |
LB0FF: .byte $34 ;D4 | LB0FF: .byte $34 ;D4 |
LB100: .byte $3A ;F4 | LB100: .byte $3A ;F4 |
LB101: .byte $48 ;C5 | LB101: .byte $48 ;C5 |
LB102: .byte $42 ;A4 | LB102: .byte $42 ;A4 |
LB103: .byte $36 ;D#4 | LB103: .byte $36 ;D#4 |
LB104: .byte $3E ;G4 | LB104: .byte $3E ;G4 |
LB105: .byte $4C ;D5 | LB105: .byte $4C ;D5 |
LB106: .byte $44 ;A#4 | LB106: .byte $44 ;A#4 |
LB107: .byte $42 ;A4 | LB107: .byte $42 ;A4 |
LB108: .byte $38 ;E4 | LB108: .byte $38 ;E4 |
LB109: .byte $2E ;B3 | LB109: .byte $2E ;B3 |
LB10A: .byte $38 ;E4 | LB10A: .byte $38 ;E4 |
LB10B: .byte $40 ;Ab4 | LB10B: .byte $40 ;Ab4 |
LB10C: .byte $38 ;E4 | LB10C: .byte $38 ;E4 |
LB10D: .byte $2E ;B3 | LB10D: .byte $2E ;B3 |
LB10E: .byte $38 ;E4 | LB10E: .byte $38 ;E4 |
LB10F: .byte $E0 ; | LB10F: .byte $E0 ; |
LB110: .byte $B6 ;21/32 seconds + | LB110: .byte $B6 ;21/32 seconds + |
LB111: .byte $06 ;D2 | Repeat 32 times. | LB111: .byte $06 ;D2 | Repeat 32 times. |
LB112: .byte $B2 ;7/32 seconds | | LB112: .byte $B2 ;7/32 seconds | |
LB113: .byte $02 ;No sound + | LB113: .byte $02 ;No sound + |
LB114: .byte $FF ; | LB114: .byte $FF ; |
| |
IntroNoiseIndexData: | IntroNoiseIndexData: |
LB115: .byte $D0 ; | LB115: .byte $D0 ; |
LB116: .byte $B4 ;7/8 Seconds + Repeat 16 times. | LB116: .byte $B4 ;7/8 Seconds + Repeat 16 times. |
LB117: .byte $04 ;Drumbeat 01 + | LB117: .byte $04 ;Drumbeat 01 + |
LB118: .byte $FF ; | LB118: .byte $FF ; |
LB119: .byte $CC ; | LB119: .byte $CC ; |
LB11A: .byte $B2 ;7/32 Seconds + | LB11A: .byte $B2 ;7/32 Seconds + |
LB11B: .byte $04 ;Drumbeat 01 | | LB11B: .byte $04 ;Drumbeat 01 | |
LB11C: .byte $04 ;Drumbeat 01 | | LB11C: .byte $04 ;Drumbeat 01 | |
LB11D: .byte $B5 ;1 13/16 Seconds| | LB11D: .byte $B5 ;1 13/16 Seconds| |
LB11E: .byte $07 ;Drumbeat 02 | | LB11E: .byte $07 ;Drumbeat 02 | |
LB11F: .byte $B0 ;1/4 Seconds | | LB11F: .byte $B0 ;1/4 Seconds | |
LB120: .byte $04 ;Drumbeat 01 | Repeat 12 times. | LB120: .byte $04 ;Drumbeat 01 | Repeat 12 times. |
LB121: .byte $04 ;Drumbeat 01 | | LB121: .byte $04 ;Drumbeat 01 | |
LB122: .byte $B6 ;21/32 Seconds | | LB122: .byte $B6 ;21/32 Seconds | |
LB123: .byte $04 ;Drumbeat 01 | | LB123: .byte $04 ;Drumbeat 01 | |
LB124: .byte $B1 ;7/64 Seconds | | LB124: .byte $B1 ;7/64 Seconds | |
LB125: .byte $04 ;Drumbeat 01 | | LB125: .byte $04 ;Drumbeat 01 | |
LB126: .byte $04 ;Drumbeat 01 + | LB126: .byte $04 ;Drumbeat 01 + |
LB127: .byte $FF ; | LB127: .byte $FF ; |
LB128: .byte $CA ; | LB128: .byte $CA ; |
LB129: .byte $B1 ;7/64 Seconds + | LB129: .byte $B1 ;7/64 Seconds + |
LB12A: .byte $04 ;Drumbeat 01 | | LB12A: .byte $04 ;Drumbeat 01 | |
LB12B: .byte $04 ;Drumbeat 01 | | LB12B: .byte $04 ;Drumbeat 01 | |
LB12C: .byte $04 ;Drumbeat 01 | Repeat 10 times. | LB12C: .byte $04 ;Drumbeat 01 | Repeat 10 times. |
LB12D: .byte $07 ;Drumbeat 02 | | LB12D: .byte $07 ;Drumbeat 02 | |
LB12E: .byte $04 ;Drumbeat 01 | | LB12E: .byte $04 ;Drumbeat 01 | |
LB12F: .byte $04 ;Drumbeat 01 + | LB12F: .byte $04 ;Drumbeat 01 + |
LB130: .byte $FF ; | LB130: .byte $FF ; |
LB131: .byte $E0 ; | LB131: .byte $E0 ; |
LB132: .byte $B4 ;7/8 Seconds + Repeat 32 times. | LB132: .byte $B4 ;7/8 Seconds + Repeat 32 times. |
LB133: .byte $04 ;Drumbeat 01 + | LB133: .byte $04 ;Drumbeat 01 + |
LB134: .byte $FF ; | LB134: .byte $FF ; |
| |
;Unused tile patterns. | ;Unused tile patterns. |
LB135: .byte $E0, $E0, $F0, $00, $00, $00, $00, $00, $00, $00, $00, $21, $80, $40, $02, $05 | LB135: .byte $E0, $E0, $F0, $00, $00, $00, $00, $00, $00, $00, $00, $21, $80, $40, $02, $05 |
LB145: .byte $26, $52, $63, $00, $00, $00, $06, $07, $67, $73, $73, $FF, $AF, $2F, $07, $0B | LB145: .byte $26, $52, $63, $00, $00, $00, $06, $07, $67, $73, $73, $FF, $AF, $2F, $07, $0B |
LB155: .byte $8D, $A7, $B1, $00, $00, $00, $00, $00, $80, $80, $80, $F8, $B8, $F8, $F8, $F0 | LB155: .byte $8D, $A7, $B1, $00, $00, $00, $00, $00, $80, $80, $80, $F8, $B8, $F8, $F8, $F0 |
LB165: .byte $F0, $F8, $FC, $00, $00, $00, $00, $00, $00, $00, $00, $07, $07, $07, $07, $07 | LB165: .byte $F0, $F8, $FC, $00, $00, $00, $00, $00, $00, $00, $00, $07, $07, $07, $07, $07 |
LB175: .byte $03, $03, $01, $00, $00, $00, $00, $00, $00, $00, $80, $FF, $C7, $83, $03, $C7 | LB175: .byte $03, $03, $01, $00, $00, $00, $00, $00, $00, $00, $80, $FF, $C7, $83, $03, $C7 |
LB185: .byte $CF, $FE, $EC, $00, $30, $78, $F8, $30, $00, $01, $12, $F5, $EA, $FB, $FD, $F9 | LB185: .byte $CF, $FE, $EC, $00, $30, $78, $F8, $30, $00, $01, $12, $F5, $EA, $FB, $FD, $F9 |
LB195: .byte $1E, $0E, $44, $07, $03, $03, $01, $01, $E0, $10, $48, $2B, $3B, $1B, $5A, $D0 | LB195: .byte $1E, $0E, $44, $07, $03, $03, $01, $01, $E0, $10, $48, $2B, $3B, $1B, $5A, $D0 |
LB1A5: .byte $D1, $C3, $C3, $3B, $3B, $9B, $DA, $D0, $D0, $C0, $C0, $2C, $23, $20, $20, $30 | LB1A5: .byte $D1, $C3, $C3, $3B, $3B, $9B, $DA, $D0, $D0, $C0, $C0, $2C, $23, $20, $20, $30 |
LB1B5: .byte $98, $CF, $C7, $00, $00, $00, $00, $00, $00, $00, $30, $1F, $80, $C0, $C0, $60 | LB1B5: .byte $98, $CF, $C7, $00, $00, $00, $00, $00, $00, $00, $30, $1F, $80, $C0, $C0, $60 |
LB1C5: .byte $70, $FC, $C0, $00, $00, $00, $00, $00, $00, $00, $00, $01, $00, $00, $00, $00 | LB1C5: .byte $70, $FC, $C0, $00, $00, $00, $00, $00, $00, $00, $00, $01, $00, $00, $00, $00 |
LB1D5: .byte $00, $00, $00, $80, $80, $C0, $78, $4C, $C7, $80, $80, $C4, $A5, $45, $0B, $1B | LB1D5: .byte $00, $00, $00, $80, $80, $C0, $78, $4C, $C7, $80, $80, $C4, $A5, $45, $0B, $1B |
LB1E5: .byte $03, $03, $00, $3A, $13, $31, $63, $C3, $83, $03, $04, $E6, $E6, $C4, $8E, $1C | LB1E5: .byte $03, $03, $00, $3A, $13, $31, $63, $C3, $83, $03, $04, $E6, $E6, $C4, $8E, $1C |
LB1F5: .byte $3C, $18, $30, $E8, $E8, $C8, $90, $60, $00, $00, $00 | LB1F5: .byte $3C, $18, $30, $E8, $E8, $C8, $90, $60, $00, $00, $00 |
| |
;------------------------------------------[ Sound Engine ]------------------------------------------ | ;------------------------------------------[ Sound Engine ]------------------------------------------ |
| |
;SFXdata. The top four entries are used by the noise music player for drum beats. | ;SFXdata. The top four entries are used by the noise music player for drum beats. |
LB200: .byte $00 ;Base for drum beat music data. | LB200: .byte $00 ;Base for drum beat music data. |
| |
DrumBeat00SFXData: | DrumBeat00SFXData: |
LB201: .byte $10, $01, $18 ;Noise channel music data #$01. | LB201: .byte $10, $01, $18 ;Noise channel music data #$01. |
DrumBeat01SFXData: | DrumBeat01SFXData: |
LB204: .byte $00, $01, $38 ;Noise channel music data #$04. | LB204: .byte $00, $01, $38 ;Noise channel music data #$04. |
DrumBeat02SFXData: | DrumBeat02SFXData: |
LB207: .byte $01, $02, $40 ;Noise channel music data #$07. | LB207: .byte $01, $02, $40 ;Noise channel music data #$07. |
DrumBeat03SFXData: | DrumBeat03SFXData: |
LB20A: .byte $00, $09, $58 ;Noise channel music data #$0A. | LB20A: .byte $00, $09, $58 ;Noise channel music data #$0A. |
GamePausedSFXData: | GamePausedSFXData: |
LB20D: .byte $80, $7F, $80, $48 | LB20D: .byte $80, $7F, $80, $48 |
ScrewAttSFXData: | ScrewAttSFXData: |
LB211: .byte $35, $7F, $00, $B0 | LB211: .byte $35, $7F, $00, $B0 |
MissileLaunchSFXData: | MissileLaunchSFXData: |
LB215: .byte $19, $7F, $0E, $A0 | LB215: .byte $19, $7F, $0E, $A0 |
BombExplodeSFXData: | BombExplodeSFXData: |
LB219: .byte $0D, $7F, $0F, $08 | LB219: .byte $0D, $7F, $0F, $08 |
SamusWalkSFXData: | SamusWalkSFXData: |
LB21D: .byte $16, $7F, $0B, $18 | LB21D: .byte $16, $7F, $0B, $18 |
SpitFlameSFXData: | SpitFlameSFXData: |
LB221: .byte $13, $7F, $0E, $F8 | LB221: .byte $13, $7F, $0E, $F8 |
SamusHitSQ1SQ2SFXData: | SamusHitSQ1SQ2SFXData: |
LC225: .byte $C1, $89, $02, $0F | LC225: .byte $C1, $89, $02, $0F |
BossHitSQ2SFXData: | BossHitSQ2SFXData: |
LB229: .byte $34, $BA, $E0, $05 | LB229: .byte $34, $BA, $E0, $05 |
BossHitSQ1SFXData: | BossHitSQ1SFXData: |
LB22D: .byte $34, $BB, $CE, $05 | LB22D: .byte $34, $BB, $CE, $05 |
IncorrectPasswordSQ1SFXData: | IncorrectPasswordSQ1SFXData: |
LB231: .byte $B6, $7F, $00, $C2 | LB231: .byte $B6, $7F, $00, $C2 |
IncorrectPasswordSQ2SFXData: | IncorrectPasswordSQ2SFXData: |
LB235: .byte $B6, $7F, $04, $C2 | LB235: .byte $B6, $7F, $04, $C2 |
TimeBombTickSFXData: | TimeBombTickSFXData: |
LB239: .byte $17, $7F, $66, $89 | LB239: .byte $17, $7F, $66, $89 |
EnergyPickupSFXData: | EnergyPickupSFXData: |
LB23D: .byte $89, $7F, $67, $18 | LB23D: .byte $89, $7F, $67, $18 |
MissilePickupSFXData: | MissilePickupSFXData: |
LB241: .byte $8B, $7F, $FD, $28 | LB241: .byte $8B, $7F, $FD, $28 |
MetalSFXData: | MetalSFXData: |
LB245: .byte $02, $7F, $A8, $F8 | LB245: .byte $02, $7F, $A8, $F8 |
LongRangeShotSFXData: | LongRangeShotSFXData: |
LB249: .byte $D7, $83, $58, $F8 | LB249: .byte $D7, $83, $58, $F8 |
ShortRangeShotSFXData: | ShortRangeShotSFXData: |
LB24D: .byte $D6, $82, $58, $F8 | LB24D: .byte $D6, $82, $58, $F8 |
JumpSFXData: | JumpSFXData: |
LB251: .byte $95, $8C, $40, $B9 | LB251: .byte $95, $8C, $40, $B9 |
EnemyHitSFXData: | EnemyHitSFXData: |
LB255: .byte $1D, $9A, $20, $8F | LB255: .byte $1D, $9A, $20, $8F |
BugOutOFHoleSFXData: | BugOutOFHoleSFXData: |
LB259: .byte $16, $8D, $E0, $42 | LB259: .byte $16, $8D, $E0, $42 |
WaveBeamSFXData: | WaveBeamSFXData: |
LB25D: .byte $19, $7F, $6F, $40 | LB25D: .byte $19, $7F, $6F, $40 |
IceBeamSFXData: | IceBeamSFXData: |
LB261: .byte $18, $7F, $80, $40 | LB261: .byte $18, $7F, $80, $40 |
BombLaunch1SFXData: | BombLaunch1SFXData: |
LB265: .byte $07, $7F, $40, $28 | LB265: .byte $07, $7F, $40, $28 |
BombLaunch2SFXData: | BombLaunch2SFXData: |
LB269: .byte $07, $7F, $45, $28 | LB269: .byte $07, $7F, $45, $28 |
SamusToBallSFXData: | SamusToBallSFXData: |
LB26D: .byte $7F, $7F, $DD, $3B | LB26D: .byte $7F, $7F, $DD, $3B |
MetroidHitSFXData: | MetroidHitSFXData: |
LB26E: .byte $7F, $7F, $FF, $98 | LB26E: .byte $7F, $7F, $FF, $98 |
SamusDieSFXData: | SamusDieSFXData: |
LB275: .byte $7F, $7F, $40, $08 | LB275: .byte $7F, $7F, $40, $08 |
SamusBeepSFXData: | SamusBeepSFXData: |
LB279: .byte $09, $7F, $30, $48 | LB279: .byte $09, $7F, $30, $48 |
BigEnemyHitSFXData: | BigEnemyHitSFXData: |
LB27D: .byte $03, $7F, $42, $18 | LB27D: .byte $03, $7F, $42, $18 |
StatueRaiseSFXData: | StatueRaiseSFXData: |
LB281: .byte $03, $7F, $11, $09 | LB281: .byte $03, $7F, $11, $09 |
DoorSFXData: | DoorSFXData: |
LB285: .byte $7F, $7F, $30, $B2 | LB285: .byte $7F, $7F, $30, $B2 |
| |
;The following table is used by the CheckSFXFlag routine. The first two bytes of each row | ;The following table is used by the CheckSFXFlag routine. The first two bytes of each row |
ChooseNextSFXRoutineTbl: | ChooseNextSFXRoutineTbl: |
| |
LB289: .word $B2BB, $B322 ;Noise init SFX (1st). | LB289: .word $B2BB, $B322 ;Noise init SFX (1st). |
LB28D: .byte $00 | LB28D: .byte $00 |
| |
LB28E: .word $B2CB, $B4EE ;Noise continue SFX (2nd). | LB28E: .word $B2CB, $B4EE ;Noise continue SFX (2nd). |
LB292: .byte $00 | LB292: .byte $00 |
| |
LB293: .word $B2DB, $B330 ;SQ1 init SFX (5th). | LB293: .word $B2DB, $B330 ;SQ1 init SFX (5th). |
LB297: .byte $01 | LB297: .byte $01 |
| |
LB298: .word $B2EB, $B4EE ;SQ2 continue SFX (6th). | LB298: .word $B2EB, $B4EE ;SQ2 continue SFX (6th). |
LB29C: .byte $01 | LB29C: .byte $01 |
| |
LB29D: .word $B2FB, $B344 ;Triangle init SFX (7th). | LB29D: .word $B2FB, $B344 ;Triangle init SFX (7th). |
LB2A1: .byte $03 | LB2A1: .byte $03 |
| |
LB2A2: .word $B30B, $B4EE ;Triangle continue SFX (8th). | LB2A2: .word $B30B, $B4EE ;Triangle continue SFX (8th). |
LB2A6: .byte $03 | LB2A6: .byte $03 |
| |
LB2A7: .word $BC06, $B35C ;Multi init SFX (3rd). | LB2A7: .word $BC06, $B35C ;Multi init SFX (3rd). |
LB2AB: .byte $04 | LB2AB: .byte $04 |
| |
LB2AC: .word $BC16, $B364 ;Multi continue SFX (4th). | LB2AC: .word $BC16, $B364 ;Multi continue SFX (4th). |
LB2B0: .byte $04 | LB2B0: .byte $04 |
| |
LB2B1: .word $BC26, $BC4B ;temp flag Music (10th). | LB2B1: .word $BC26, $BC4B ;temp flag Music (10th). |
LB2B5: .byte $00 | LB2B5: .byte $00 |
| |
LB2B6: .word $BC26, $BC3D ;Music (9th). | LB2B6: .word $BC26, $BC3D ;Music (9th). |
LB2BA: .byte $00 | LB2BA: .byte $00 |
| |
;The tables below contain addresses for SFX handling routines. | ;The tables below contain addresses for SFX handling routines. |
| |
;Noise Init SFX handling routine addresses: | ;Noise Init SFX handling routine addresses: |
LB2BB: .word $B4EE ;No sound. | LB2BB: .word $B4EE ;No sound. |
LB2BD: .word $B52B ;Screw attack init SFX. | LB2BD: .word $B52B ;Screw attack init SFX. |
LB2BF: .word $B56E ;Missile launch init SFX. | LB2BF: .word $B56E ;Missile launch init SFX. |
LB2C1: .word $B583 ;Bomb explode init SFX. | LB2C1: .word $B583 ;Bomb explode init SFX. |
LB2C3: .word $B598 ;Samus walk init SFX. | LB2C3: .word $B598 ;Samus walk init SFX. |
LB2C5: .word $B50F ;Spit flame init SFX. | LB2C5: .word $B50F ;Spit flame init SFX. |
LB2C7: .word $B4EE ;No sound. | LB2C7: .word $B4EE ;No sound. |
LB2C9: .word $B4EE ;No sound. | LB2C9: .word $B4EE ;No sound. |
| |
;Noise Continue SFX handling routine addresses: | ;Noise Continue SFX handling routine addresses: |
| |
LB2CB: .word $B4EE ;No sound. | LB2CB: .word $B4EE ;No sound. |
LB2CD: .word $B539 ;Screw attack continue SFX. | LB2CD: .word $B539 ;Screw attack continue SFX. |
LB2CF: .word $B57B ;Missile launch continue SFX. | LB2CF: .word $B57B ;Missile launch continue SFX. |
LB2D1: .word $B58A ;Bomb explode continue SFX. | LB2D1: .word $B58A ;Bomb explode continue SFX. |
LB2D3: .word $B58A ;Samus walk continue SFX. | LB2D3: .word $B58A ;Samus walk continue SFX. |
LB2D5: .word $B516 ;Spit flame continue SFX. | LB2D5: .word $B516 ;Spit flame continue SFX. |
LB2D7: .word $B4EE ;No sound. | LB2D7: .word $B4EE ;No sound. |
LB2D9: .word $B4EE ;No sound. | LB2D9: .word $B4EE ;No sound. |
| |
;SQ1 Init SFX handling routine addresses: | ;SQ1 Init SFX handling routine addresses: |
| |
LB2DB: .word $B6CD ;Missile pickup init SFX. | LB2DB: .word $B6CD ;Missile pickup init SFX. |
LB2DD: .word $B6E7 ;Energy pickup init SFX. | LB2DD: .word $B6E7 ;Energy pickup init SFX. |
LB2DF: .word $B735 ;Metal init SFX. | LB2DF: .word $B735 ;Metal init SFX. |
LB2E1: .word $B716 ;Bullet fire init SFX. | LB2E1: .word $B716 ;Bullet fire init SFX. |
LB2E3: .word $B73C ;Bird out of hole init SFX. | LB2E3: .word $B73C ;Bird out of hole init SFX. |
LB2E5: .word $B710 ;Enemy hit init SFX. | LB2E5: .word $B710 ;Enemy hit init SFX. |
LB2E7: .word $B703 ;Samus jump init SFX. | LB2E7: .word $B703 ;Samus jump init SFX. |
LB2E9: .word $B77A ;Wave beam init SFX. | LB2E9: .word $B77A ;Wave beam init SFX. |
| |
;SQ1 Continue SFX handling routine addresses: | ;SQ1 Continue SFX handling routine addresses: |
| |
LB2EB: .word $B6B0 ;Missile pickup continue SFX. | LB2EB: .word $B6B0 ;Missile pickup continue SFX. |
LB2ED: .word $B6D3 ;Energy pickup continue SFX. | LB2ED: .word $B6D3 ;Energy pickup continue SFX. |
LB2EF: .word $B6ED ;Metal continue SFX. | LB2EF: .word $B6ED ;Metal continue SFX. |
LB2F1: .word $B74F ;Bullet fire continue SFX. | LB2F1: .word $B74F ;Bullet fire continue SFX. |
LB2F3: .word $B6ED ;Bird out of hole continue SFX. | LB2F3: .word $B6ED ;Bird out of hole continue SFX. |
LB2F5: .word $B6ED ;Enemy hit continue SFX. | LB2F5: .word $B6ED ;Enemy hit continue SFX. |
LB2F7: .word $B6ED ;Samus jump continue SFX. | LB2F7: .word $B6ED ;Samus jump continue SFX. |
LB2F9: .word $B781 ;Wave beam continue SFX. | LB2F9: .word $B781 ;Wave beam continue SFX. |
| |
;Triangle init handling routine addresses: | ;Triangle init handling routine addresses: |
| |
LB2FB: .word $B8D2 ;Samus die init SFX. | LB2FB: .word $B8D2 ;Samus die init SFX. |
LB2FD: .word $B7AC ;Door open close init SFX. | LB2FD: .word $B7AC ;Door open close init SFX. |
LB2FF: .word $B8A7 ;Metroid hit init SFX. | LB2FF: .word $B8A7 ;Metroid hit init SFX. |
LB301: .word $B921 ;Statue raise init SFX. | LB301: .word $B921 ;Statue raise init SFX. |
LB303: .word $B7D9 ;Beep init SFX. | LB303: .word $B7D9 ;Beep init SFX. |
LB305: .word $B7EF ;Big enemy hit init SFX. | LB305: .word $B7EF ;Big enemy hit init SFX. |
LB307: .word $B834 ;Samus to ball init SFX. | LB307: .word $B834 ;Samus to ball init SFX. |
LB309: .word $B878 ;Bomb launch init SFX. | LB309: .word $B878 ;Bomb launch init SFX. |
| |
;Triangle continue handling routine addresses: | ;Triangle continue handling routine addresses: |
| |
LB30B: .word $B8ED ;Samus die continue SFX. | LB30B: .word $B8ED ;Samus die continue SFX. |
LB30E: .word $B7CB ;Door open close continue SFX. | LB30E: .word $B7CB ;Door open close continue SFX. |
LB30F: .word $B8B1 ;Metroid hit continue SFX. | LB30F: .word $B8B1 ;Metroid hit continue SFX. |
LB311: .word $B940 ;Statue raise continue SFX. | LB311: .word $B940 ;Statue raise continue SFX. |
LB313: .word $B7E7 ;Beep continue SFX. | LB313: .word $B7E7 ;Beep continue SFX. |
LB315: .word $B80E ;Big enemy hit continue SFX. | LB315: .word $B80E ;Big enemy hit continue SFX. |
LB317: .word $B84F ;Samus to ball continue SFX. | LB317: .word $B84F ;Samus to ball continue SFX. |
LB319: .word $B87F ;Bomb launch continue SFX. | LB319: .word $B87F ;Bomb launch continue SFX. |
| |
LoadNoiseSFXInitFlags: | LoadNoiseSFXInitFlags: |
LB31B: LDA NoiseSFXFlag ;Load A with Noise init SFX flags, (1st SFX cycle). | LB31B: LDA NoiseSFXFlag ;Load A with Noise init SFX flags, (1st SFX cycle). |
LB31E: LDX #$89 ;Lower address byte in ChooseNextSFXRoutineTbl. | LB31E: LDX #$89 ;Lower address byte in ChooseNextSFXRoutineTbl. |
LB320: BNE GotoSFXCheckFlags ;Branch always. | LB320: BNE GotoSFXCheckFlags ;Branch always. |
| |
LoadNoiseSFXContFlags: | LoadNoiseSFXContFlags: |
LB322: LDA NoiseContSFX ;Load A with Noise continue flags, (2nd SFX cycle). | LB322: LDA NoiseContSFX ;Load A with Noise continue flags, (2nd SFX cycle). |
LB325: LDX #$8E ;Lower address byte in ChooseNextSFXRoutineTbl. | LB325: LDX #$8E ;Lower address byte in ChooseNextSFXRoutineTbl. |
LB327: BNE GotoSFXCheckFlags ;Branch always. | LB327: BNE GotoSFXCheckFlags ;Branch always. |
| |
LoadSQ1SFXInitFlags: | LoadSQ1SFXInitFlags: |
LB329: LDA SQ1SFXFlag ;Load A with SQ1 init flags, (5th SFX cycle). | LB329: LDA SQ1SFXFlag ;Load A with SQ1 init flags, (5th SFX cycle). |
LB32C: LDX #$93 ;Lower address byte in ChooseNextSFXRoutineTbl. | LB32C: LDX #$93 ;Lower address byte in ChooseNextSFXRoutineTbl. |
LB32E: BNE GotoSFXCheckFlags ;Branch always. | LB32E: BNE GotoSFXCheckFlags ;Branch always. |
| |
LoadSQ1SFXContFlags: | LoadSQ1SFXContFlags: |
LB330: LDA SQ1ContSFX ;Load A with SQ1 continue flags, (6th SFX cycle). | LB330: LDA SQ1ContSFX ;Load A with SQ1 continue flags, (6th SFX cycle). |
LB333: LDX #$98 ;Lower address byte in ChooseNextSFXRoutineTbl. | LB333: LDX #$98 ;Lower address byte in ChooseNextSFXRoutineTbl. |
LB335: BNE GotoSFXCheckFlags ;Branch always. | LB335: BNE GotoSFXCheckFlags ;Branch always. |
| |
GotoSFXCheckFlags: | GotoSFXCheckFlags: |
LB337: JSR CheckSFXFlag ;($B4BD)Checks to see if SFX flags set. | LB337: JSR CheckSFXFlag ;($B4BD)Checks to see if SFX flags set. |
LB33A: JMP ($00E2) ;if no flag found, Jump to next SFX cycle,--> | LB33A: JMP ($00E2) ;if no flag found, Jump to next SFX cycle,--> |
;else jump to specific SFX handling routine. | ;else jump to specific SFX handling routine. |
LoadSTriangleSFXInitFlags: | LoadSTriangleSFXInitFlags: |
LB33D: LDA TriangleSFXFlag ;Load A with Triangle init flags, (7th SFX cycle). | LB33D: LDA TriangleSFXFlag ;Load A with Triangle init flags, (7th SFX cycle). |
LB340: LDX #$9D ;Lower address byte in ChooseNextSFXRoutineTbl. | LB340: LDX #$9D ;Lower address byte in ChooseNextSFXRoutineTbl. |
LB342: BNE GotoSFXCheckFlags ;Brach always. | LB342: BNE GotoSFXCheckFlags ;Brach always. |
| |
LoadTriangleSFXContFlags: | LoadTriangleSFXContFlags: |
LB344: LDA TriangleContSFX ;Load A with Triangle continue flags, (8th SFX cycle). | LB344: LDA TriangleContSFX ;Load A with Triangle continue flags, (8th SFX cycle). |
LB347: LDX #$A2 ;Lower address byte in ChooseNextSFXRoutineTbl. | LB347: LDX #$A2 ;Lower address byte in ChooseNextSFXRoutineTbl. |
LB349: BNE GotoSFXCheckFlags ;Branch always. | LB349: BNE GotoSFXCheckFlags ;Branch always. |
| |
LoadMultiSFXInitFlags: | LoadMultiSFXInitFlags: |
LB34B: LDA MultiSFXFlag ;Load A with Multi init flags, (3rd SFX cycle). | LB34B: LDA MultiSFXFlag ;Load A with Multi init flags, (3rd SFX cycle). |
LB34E: LDX #$A7 ;Lower address byte in ChooseNextSFXRoutineTbl. | LB34E: LDX #$A7 ;Lower address byte in ChooseNextSFXRoutineTbl. |
LB350: JSR CheckSFXFlag ;($B4BD)Checks to see if SFX or music flags set. | LB350: JSR CheckSFXFlag ;($B4BD)Checks to see if SFX or music flags set. |
LB353: JSR FindMusicInitIndex ;($BC53)Find bit containing music init flag. | LB353: JSR FindMusicInitIndex ;($BC53)Find bit containing music init flag. |
LB356: JSR Add8 ;($BC64)Add 8 to MusicInitIndex. | LB356: JSR Add8 ;($BC64)Add 8 to MusicInitIndex. |
LB359: JMP ($00E2) ;If no flag found, Jump to next SFX cycle,--> | LB359: JMP ($00E2) ;If no flag found, Jump to next SFX cycle,--> |
;else jump to specific SFX handling subroutine. | ;else jump to specific SFX handling subroutine. |
LoadMultiSFXContFlags: | LoadMultiSFXContFlags: |
LB35C: LDA MultiContSFX ;Load A with $68C flags (4th SFX cycle). | LB35C: LDA MultiContSFX ;Load A with $68C flags (4th SFX cycle). |
LB35F: LDX #$AC ;Lower address byte in ChooseNextSFXRoutineTbl. | LB35F: LDX #$AC ;Lower address byte in ChooseNextSFXRoutineTbl. |
LB361: JMP GotoSFXCheckFlags ;($B337)Checks to see if SFX or music flags set. | LB361: JMP GotoSFXCheckFlags ;($B337)Checks to see if SFX or music flags set. |
| |
LoadSQ1Flags: | LoadSQ1Flags: |
LB364: JSR LoadSQ1SFXInitFlags ;($B329)Check for SQ1 init flags. | LB364: JSR LoadSQ1SFXInitFlags ;($B329)Check for SQ1 init flags. |
LB367: RTS ; | LB367: RTS ; |
| |
LoadSQ1ChannelSFX: ;Used to determine which sound registers to change--> | LoadSQ1ChannelSFX: ;Used to determine which sound registers to change--> |
LB368: LDA #$00 ;($4000 - $4003) - SQ1. | LB368: LDA #$00 ;($4000 - $4003) - SQ1. |
LB36A: BEQ + ;Branch always. | LB36A: BEQ + ;Branch always. |
| |
LoadTriangleChannelSFX: ;Used to determine which sound registers to change--> | LoadTriangleChannelSFX: ;Used to determine which sound registers to change--> |
LB36C: LDA #$08 ;($4008 - $400B) - Triangle. | LB36C: LDA #$08 ;($4008 - $400B) - Triangle. |
LB36E: BNE + ;Branch always. | LB36E: BNE + ;Branch always. |
| |
LoadNoiseChannelSFX: ;Used to determine which sound registers to change--> | LoadNoiseChannelSFX: ;Used to determine which sound registers to change--> |
LB370: LDA #$0C ;($400C - $400F) - Noise. | LB370: LDA #$0C ;($400C - $400F) - Noise. |
LB372: BNE + ;Branch always. | LB372: BNE + ;Branch always. |
| |
LoadSQ2ChannelSFX: ;Used to determine which sound registers to change--> | LoadSQ2ChannelSFX: ;Used to determine which sound registers to change--> |
LB374: LDA #$04 ;($4004 - $4007) - SQ2. | LB374: LDA #$04 ;($4004 - $4007) - SQ2. |
| |
LoadSFXData: | LoadSFXData: |
LB376:* STA $E0 ;Lower address byte of desired APU control register. | LB376:* STA $E0 ;Lower address byte of desired APU control register. |
LB378: LDA #$40 ; | LB378: LDA #$40 ; |
LB37A: STA $E1 ;Upper address byte of desired APU control register. | LB37A: STA $E1 ;Upper address byte of desired APU control register. |
LB37C: STY $E2 ;Lower address byte of data to load into sound channel. | LB37C: STY $E2 ;Lower address byte of data to load into sound channel. |
LB37E: LDA #$B2 ; | LB37E: LDA #$B2 ; |
LB380: STA $E3 ;Upper address byte of data to load into sound channel. | LB380: STA $E3 ;Upper address byte of data to load into sound channel. |
LB382: LDY #$00 ;Starting index for loading four byte sound data. | LB382: LDY #$00 ;Starting index for loading four byte sound data. |
| |
LoadSFXRegisters: | LoadSFXRegisters: |
LB384:* LDA ($E2),Y ;Load A with SFX data byte. | LB384:* LDA ($E2),Y ;Load A with SFX data byte. |
LB386: STA ($E0),Y ;Store A in SFX register. | LB386: STA ($E0),Y ;Store A in SFX register. |
LB388: INY ; | LB388: INY ; |
LB389: TYA ;The four registers associated with each sound--> | LB389: TYA ;The four registers associated with each sound--> |
LB38A: CMP #$04 ;channel are loaded one after the other (the loop--> | LB38A: CMP #$04 ;channel are loaded one after the other (the loop--> |
LB38C: BNE - ;repeats four times). | LB38C: BNE - ;repeats four times). |
LB38E: RTS ; | LB38E: RTS ; |
| |
PauseSFX: | PauseSFX: |
LB38F:* INC SFXPaused ;SFXPaused=#$01 | LB38F:* INC SFXPaused ;SFXPaused=#$01 |
LB392: JSR ClearSounds ;($B43E)Clear sound registers of data. | LB392: JSR ClearSounds ;($B43E)Clear sound registers of data. |
LB395: STA PauseSFXStatus ;PauseSFXStatus=#$00 | LB395: STA PauseSFXStatus ;PauseSFXStatus=#$00 |
LB398: RTS ; | LB398: RTS ; |
| |
LB399:* LDA SFXPaused ;Has SFXPaused been set? if not, branch | LB399:* LDA SFXPaused ;Has SFXPaused been set? if not, branch |
LB39C: BEQ -- ; | LB39C: BEQ -- ; |
LB39E: LDA PauseSFXStatus ;For the first #$12 frames after the game has been--> | LB39E: LDA PauseSFXStatus ;For the first #$12 frames after the game has been--> |
LB3A1: CMP #$12 ;paused, play GamePaused SFX. If paused for #$12--> | LB3A1: CMP #$12 ;paused, play GamePaused SFX. If paused for #$12--> |
LB3A3: BEQ ++ ;frames or more, branch to exit. | LB3A3: BEQ ++ ;frames or more, branch to exit. |
LB3A5: AND #$03 ; | LB3A5: AND #$03 ; |
LB3A7: CMP #$03 ;Every fourth frame, repeat GamePaused SFX | LB3A7: CMP #$03 ;Every fourth frame, repeat GamePaused SFX |
LB3A9: BNE + ; | LB3A9: BNE + ; |
LB3AB: LDY #$0D ;Lower address byte of GamePaused SFX data(Base=$B200) | LB3AB: LDY #$0D ;Lower address byte of GamePaused SFX data(Base=$B200) |
LB3AD: JSR LoadSQ1ChannelSFX ;($B368) Load GamePaused SFX data. | LB3AD: JSR LoadSQ1ChannelSFX ;($B368) Load GamePaused SFX data. |
LB3B0:* INC PauseSFXStatus ; | LB3B0:* INC PauseSFXStatus ; |
LB3B3:* RTS ; | LB3B3:* RTS ; |
| |
;----------------------------------[ Sound Engine Entry Point ]----------------------------------- | ;----------------------------------[ Sound Engine Entry Point ]----------------------------------- |
| |
SoundEngine: | SoundEngine: |
LB3B4: LDA #$C0 ;Set APU to 5 frame cycle, disable frame interrupt. | LB3B4: LDA #$C0 ;Set APU to 5 frame cycle, disable frame interrupt. |
LB3B6: STA APUCommonCntrl1 ; | LB3B6: STA APUCommonCntrl1 ; |
LB3B9: LDA NoiseSFXFlag ;is bit zero is set in NoiseSFXFlag(Silence--> | LB3B9: LDA NoiseSFXFlag ;is bit zero is set in NoiseSFXFlag(Silence--> |
LB3BC: LSR ;music)? If yes, branch. | LB3BC: LSR ;music)? If yes, branch. |
LB3BD: BCS ++ ; | LB3BD: BCS ++ ; |
LB3BF: LDA MainRoutine ; | LB3BF: LDA MainRoutine ; |
LB3C1: CMP #$05 ;Is game paused? If yes, branch. | LB3C1: CMP #$05 ;Is game paused? If yes, branch. |
LB3C3: BEQ --- ; | LB3C3: BEQ --- ; |
LB3C5: LDA #$00 ;Clear SFXPaused when game is running. | LB3C5: LDA #$00 ;Clear SFXPaused when game is running. |
LB3C7: STA SFXPaused ; | LB3C7: STA SFXPaused ; |
LB3CA: JSR LoadNoiseSFXInitFlags ;($B31B)Check noise SFX flags. | LB3CA: JSR LoadNoiseSFXInitFlags ;($B31B)Check noise SFX flags. |
LB3CD: JSR LoadMultiSFXInitFlags ;($B34B)Check multichannel SFX flags. | LB3CD: JSR LoadMultiSFXInitFlags ;($B34B)Check multichannel SFX flags. |
LB3D0: JSR LoadSTriangleSFXInitFlags ;($B33D)Check triangle SFX flags. | LB3D0: JSR LoadSTriangleSFXInitFlags ;($B33D)Check triangle SFX flags. |
LB3D3: JSR LoadMusicTempFlags ;($BC36)Check music flags. | LB3D3: JSR LoadMusicTempFlags ;($BC36)Check music flags. |
| |
ClearSFXFlags: | ClearSFXFlags: |
LB3D6:* LDA #$00 ; | LB3D6:* LDA #$00 ; |
LB3D8: STA NoiseSFXFlag ; | LB3D8: STA NoiseSFXFlag ; |
LB3DB: STA SQ1SFXFlag ; | LB3DB: STA SQ1SFXFlag ; |
LB3DE: STA SQ2SFXFlag ;Clear all SFX flags. | LB3DE: STA SQ2SFXFlag ;Clear all SFX flags. |
LB3E1: STA TriangleSFXFlag ; | LB3E1: STA TriangleSFXFlag ; |
LB3E4: STA MultiSFXFlag ; | LB3E4: STA MultiSFXFlag ; |
LB3E7: STA MusicInitFlag ; | LB3E7: STA MusicInitFlag ; |
LB3EA: RTS ; | LB3EA: RTS ; |
| |
LB3EB:* JSR InitializeSoundAddresses ;($B404)Prepare to start playing music. | LB3EB:* JSR InitializeSoundAddresses ;($B404)Prepare to start playing music. |
LB3EE: BEQ -- ;Branch always. | LB3EE: BEQ -- ;Branch always. |
| |
CheckRepeatMusic: | CheckRepeatMusic: |
LB3F0: LDA MusicRepeat ; | LB3F0: LDA MusicRepeat ; |
LB3F3: BEQ + ;If music is supposed to repeat, reset music,--> | LB3F3: BEQ + ;If music is supposed to repeat, reset music,--> |
LB3F5: LDA CurrentMusic ;flags else branch to exit. | LB3F5: LDA CurrentMusic ;flags else branch to exit. |
LB3F8: STA CurrentMusicRepeat ; | LB3F8: STA CurrentMusicRepeat ; |
LB3FB: RTS ; | LB3FB: RTS ; |
| |
CheckMusicFlags: | CheckMusicFlags: |
LB3FC: LDA CurrentMusic ;Loads A with current music flags and compares it--> | LB3FC: LDA CurrentMusic ;Loads A with current music flags and compares it--> |
LB3FF: CMP CurrentSFXFlags ;with current SFX flags. If both are equal,--> | LB3FF: CMP CurrentSFXFlags ;with current SFX flags. If both are equal,--> |
LB402: BEQ ++ ;just clear music counters, else clear everything. | LB402: BEQ ++ ;just clear music counters, else clear everything. |
| |
InitializeSoundAddresses: ; | InitializeSoundAddresses: ; |
LB404:* JSR ClearMusicAndSFXAddresses ;($B41D)Jumps to all subroutines needed to reset--> | LB404:* JSR ClearMusicAndSFXAddresses ;($B41D)Jumps to all subroutines needed to reset--> |
LB407: JSR ClearSounds ;($B43E)all sound addresses in order to start--> | LB407: JSR ClearSounds ;($B43E)all sound addresses in order to start--> |
LB40A:* JSR ClearSpecialAddresses ;($B40E)playing music. | LB40A:* JSR ClearSpecialAddresses ;($B40E)playing music. |
LB40D: RTS ; | LB40D: RTS ; |
| |
ClearSpecialAddresses: | ClearSpecialAddresses: |
LB40E: LDA #$00 ; | LB40E: LDA #$00 ; |
LB410: STA TriangleCounterCntrl ;Clears addresses used for repeating music,--> | LB410: STA TriangleCounterCntrl ;Clears addresses used for repeating music,--> |
LB413: STA SFXPaused ;pausing music and controlling triangle length. | LB413: STA SFXPaused ;pausing music and controlling triangle length. |
LB416: STA CurrentMusicRepeat ; | LB416: STA CurrentMusicRepeat ; |
LB419: STA MusicRepeat ; | LB419: STA MusicRepeat ; |
LB41C: RTS ; | LB41C: RTS ; |
| |
ClearMusicAndSFXAddresses: ; | ClearMusicAndSFXAddresses: ; |
LB41D: LDA #$00 ; | LB41D: LDA #$00 ; |
LB41F: STA SQ1InUse ; | LB41F: STA SQ1InUse ; |
LB422: STA SQ2InUse ; | LB422: STA SQ2InUse ; |
LB425: STA TriangleInUse ; | LB425: STA TriangleInUse ; |
LB428: STA WriteMultiChannelData ; | LB428: STA WriteMultiChannelData ; |
LB42B: STA NoiseContSFX ;Clears any SFX or music--> | LB42B: STA NoiseContSFX ;Clears any SFX or music--> |
LB42E: STA SQ1ContSFX ;currently being played. | LB42E: STA SQ1ContSFX ;currently being played. |
LB431: STA SQ2ContSFX ; | LB431: STA SQ2ContSFX ; |
LB434: STA TriangleContSFX ; | LB434: STA TriangleContSFX ; |
LB437: STA MultiContSFX ; | LB437: STA MultiContSFX ; |
LB43A: STA CurrentMusic ; | LB43A: STA CurrentMusic ; |
LB43D: RTS ; | LB43D: RTS ; |
| |
ClearSounds: ; | ClearSounds: ; |
LB43E: LDA #$10 ; | LB43E: LDA #$10 ; |
LB440: STA SQ1Cntrl0 ; | LB440: STA SQ1Cntrl0 ; |
LB443: STA SQ2Cntrl0 ; | LB443: STA SQ2Cntrl0 ; |
LB446: STA NoiseCntrl0 ;Clears all sounds that might be in--> | LB446: STA NoiseCntrl0 ;Clears all sounds that might be in--> |
LB449: LDA #$00 ;The sound channel registers. | LB449: LDA #$00 ;The sound channel registers. |
LB44B: STA TriangleCntrl0 ; | LB44B: STA TriangleCntrl0 ; |
LB44E: STA DMCCntrl1 ; | LB44E: STA DMCCntrl1 ; |
LB451: RTS ; | LB451: RTS ; |
| |
SelectSFXRoutine: | SelectSFXRoutine: |
LB452: LDX ChannelType ; | LB452: LDX ChannelType ; |
LB455: STA NoiseSFXLength,X ;Stores frame length of SFX in corresponding address. | LB455: STA NoiseSFXLength,X ;Stores frame length of SFX in corresponding address. |
LB458: TXA ; | LB458: TXA ; |
LB459: BEQ ++ ;Branch if SFX uses noise channel. | LB459: BEQ ++ ;Branch if SFX uses noise channel. |
LB45B: CMP #$01 ; | LB45B: CMP #$01 ; |
LB45D: BEQ + ;Branch if SFX uses SQ1 channel. | LB45D: BEQ + ;Branch if SFX uses SQ1 channel. |
LB45F: CMP #$02 ; | LB45F: CMP #$02 ; |
LB461: BEQ MusicBranch00 ;Branch if SFX uses SQ2 channel. | LB461: BEQ MusicBranch00 ;Branch if SFX uses SQ2 channel. |
LB463: CMP #$03 ; | LB463: CMP #$03 ; |
LB465: BEQ MusicBranch01 ;Branch if SFX uses triangle wave. | LB465: BEQ MusicBranch01 ;Branch if SFX uses triangle wave. |
LB467: RTS ;Exit if SFX routine uses no channels. | LB467: RTS ;Exit if SFX routine uses no channels. |
| |
LB468:* JSR LoadSQ1ChannelSFX ;($B368)Prepare to load SQ1 channel with data. | LB468:* JSR LoadSQ1ChannelSFX ;($B368)Prepare to load SQ1 channel with data. |
LB46B: BEQ ++ ;Branch always. | LB46B: BEQ ++ ;Branch always. |
MusicBranch00: ; | MusicBranch00: ; |
LB46D: JSR LoadSQ2ChannelSFX ;($B374)Prepare to load SQ2 channel with data. | LB46D: JSR LoadSQ2ChannelSFX ;($B374)Prepare to load SQ2 channel with data. |
LB470: BEQ ++ ;Branch always. | LB470: BEQ ++ ;Branch always. |
MusicBranch01: ; | MusicBranch01: ; |
LB472: JSR LoadTriangleChannelSFX ;($B36C)Prepare to load triangle channel with data. | LB472: JSR LoadTriangleChannelSFX ;($B36C)Prepare to load triangle channel with data. |
LB475: BEQ ++ ;Branch always. | LB475: BEQ ++ ;Branch always. |
LB477:* JSR LoadNoiseChannelSFX ;($B370)Prepare to load noise channel with data. | LB477:* JSR LoadNoiseChannelSFX ;($B370)Prepare to load noise channel with data. |
LB47A:* JSR UpdateContFlags ;($B493)Set continuation flags for this SFX. | LB47A:* JSR UpdateContFlags ;($B493)Set continuation flags for this SFX. |
LB47D: TXA ; | LB47D: TXA ; |
LB47E: STA NoiseInUse,X ;Indicate sound channel is in use. | LB47E: STA NoiseInUse,X ;Indicate sound channel is in use. |
LB481: LDA #$00 ; | LB481: LDA #$00 ; |
LB483: STA ThisNoiseFrame,X ; | LB483: STA ThisNoiseFrame,X ; |
LB486: STA NoiseSFXData,X ;Clears all the following addresses before going--> | LB486: STA NoiseSFXData,X ;Clears all the following addresses before going--> |
LB489: STA MultiSFXData,X ;to the proper SFX handling routine. | LB489: STA MultiSFXData,X ;to the proper SFX handling routine. |
LB48C: STA ScrewAttackSFXData,X ; | LB48C: STA ScrewAttackSFXData,X ; |
LB48F: STA WriteMultiChannelData ; | LB48F: STA WriteMultiChannelData ; |
LB492: RTS ; | LB492: RTS ; |
| |
UpdateContFlags: | UpdateContFlags: |
LB493:* LDX ChannelType ;Loads X register with sound channel just changed. | LB493:* LDX ChannelType ;Loads X register with sound channel just changed. |
LB496: LDA NoiseContSFX,X ;Clear existing continuation SFX--> | LB496: LDA NoiseContSFX,X ;Clear existing continuation SFX--> |
LB499: AND #$00 ;flags for that channel. | LB499: AND #$00 ;flags for that channel. |
LB49B: ORA CurrentSFXFlags ;Load new continuation flags. | LB49B: ORA CurrentSFXFlags ;Load new continuation flags. |
LB49E: STA NoiseContSFX,X ;Save results. | LB49E: STA NoiseContSFX,X ;Save results. |
LB4A1: RTS ; | LB4A1: RTS ; |
| |
ClearCurrentSFXFlags: | ClearCurrentSFXFlags: |
LB4A2: LDA #$00 ;Once SFX has completed, this block clears the--> | LB4A2: LDA #$00 ;Once SFX has completed, this block clears the--> |
LB4A4: STA CurrentSFXFlags ;SFX flag from the current flag register. | LB4A4: STA CurrentSFXFlags ;SFX flag from the current flag register. |
LB4A7: BEQ - ; | LB4A7: BEQ - ; |
| |
IncrementSFXFrame: | IncrementSFXFrame: |
LB4A9: LDX ChannelType ;Load SFX channel number. | LB4A9: LDX ChannelType ;Load SFX channel number. |
LB4AC: INC ThisNoiseFrame,X ;increment current frame to play on given channel. | LB4AC: INC ThisNoiseFrame,X ;increment current frame to play on given channel. |
LB4AF: LDA ThisNoiseFrame,X ;Load current frame to play on given channel. | LB4AF: LDA ThisNoiseFrame,X ;Load current frame to play on given channel. |
LB4B2: CMP NoiseSFXLength,X ;Check to see if current frame is last frame to play. | LB4B2: CMP NoiseSFXLength,X ;Check to see if current frame is last frame to play. |
LB4B5: BNE + ; | LB4B5: BNE + ; |
LB4B7: LDA #$00 ;If current frame is last frame,--> | LB4B7: LDA #$00 ;If current frame is last frame,--> |
LB4B9: STA ThisNoiseFrame,X ;reset current frame to 0. | LB4B9: STA ThisNoiseFrame,X ;reset current frame to 0. |
LB4BC:* RTS ; | LB4BC:* RTS ; |
| |
;The CheckSFXFlag routine loads E0 thru E3 with the below values: | ;The CheckSFXFlag routine loads E0 thru E3 with the below values: |
| |
CheckSFXFlag: | CheckSFXFlag: |
LB4BD: STA CurrentSFXFlags ;Store any set flags in $064D. | LB4BD: STA CurrentSFXFlags ;Store any set flags in $064D. |
LB4C0: STX $E4 ; | LB4C0: STX $E4 ; |
LB4C2: LDY #$B2 ; | LB4C2: LDY #$B2 ; |
LB4C4: STY $E5 ; | LB4C4: STY $E5 ; |
LB4C6: LDY #$00 ;Y=0 for counting loop ahead. | LB4C6: LDY #$00 ;Y=0 for counting loop ahead. |
LB4C8:* LDA ($E4),Y ; | LB4C8:* LDA ($E4),Y ; |
LB4CA: STA $00E0,Y ;See table above for values loaded into $E0--> | LB4CA: STA $00E0,Y ;See table above for values loaded into $E0--> |
LB4CD: INY ;thru $E3 during this loop. | LB4CD: INY ;thru $E3 during this loop. |
LB4CE: TYA ; | LB4CE: TYA ; |
LB4CF: CMP #$04 ;Loop repeats four times to load the values. | LB4CF: CMP #$04 ;Loop repeats four times to load the values. |
LB4D1: BNE - ; | LB4D1: BNE - ; |
LB4D3: LDA ($E4),Y ; | LB4D3: LDA ($E4),Y ; |
LB4D5: STA ChannelType ;#$00=SQ1,#$01=SQ2,#$02=Triangle,#$03=Noise | LB4D5: STA ChannelType ;#$00=SQ1,#$01=SQ2,#$02=Triangle,#$03=Noise |
LB4D8: LDY #$00 ;Set y to 0 for counting loop ahead. | LB4D8: LDY #$00 ;Set y to 0 for counting loop ahead. |
LB4DA: LDA CurrentSFXFlags ; | LB4DA: LDA CurrentSFXFlags ; |
LB4DD: PHA ;Push current SFX flags on stack. | LB4DD: PHA ;Push current SFX flags on stack. |
LB4DE:* ASL CurrentSFXFlags ; | LB4DE:* ASL CurrentSFXFlags ; |
LB4E1: BCS + ;This portion of the routine loops a maximum of--> | LB4E1: BCS + ;This portion of the routine loops a maximum of--> |
LB4E3: INY ;eight times looking for any SFX flags that have--> | LB4E3: INY ;eight times looking for any SFX flags that have--> |
LB4E4: INY ;been set in the current SFX cycle. If a flag--> | LB4E4: INY ;been set in the current SFX cycle. If a flag--> |
LB4E5: TYA ;is found, Branch to SFXFlagFound for further--> | LB4E5: TYA ;is found, Branch to SFXFlagFound for further--> |
LB4E6: CMP #$10 ;processing, if no flags are set, continue to--> | LB4E6: CMP #$10 ;processing, if no flags are set, continue to--> |
LB4E8: BNE - ;next SFX cycle. | LB4E8: BNE - ;next SFX cycle. |
| |
RestoreSFXFlags: | RestoreSFXFlags: |
LB4EA: PLA ; | LB4EA: PLA ; |
LB4EB: STA CurrentSFXFlags ;Restore original data in CurrentSFXFlags. | LB4EB: STA CurrentSFXFlags ;Restore original data in CurrentSFXFlags. |
LB4EE: RTS ; | LB4EE: RTS ; |
| |
SFXFlagFound: ; | SFXFlagFound: ; |
LB4EF:* LDA ($E0),Y ;This routine stores the starting address of the--> | LB4EF:* LDA ($E0),Y ;This routine stores the starting address of the--> |
LB4F1: STA $E2 ;specific SFX handling routine for the SFX flag--> | LB4F1: STA $E2 ;specific SFX handling routine for the SFX flag--> |
LB4F3: INY ;found. The address is stored in registers--> | LB4F3: INY ;found. The address is stored in registers--> |
LB4F4: LDA ($E0),Y ;$E2 and $E3. | LB4F4: LDA ($E0),Y ;$E2 and $E3. |
LB4F6: STA $E3 ; | LB4F6: STA $E3 ; |
LB4F8: JMP RestoreSFXFlags ;($B4EA)Restore original data in CurrentSFXFlags. | LB4F8: JMP RestoreSFXFlags ;($B4EA)Restore original data in CurrentSFXFlags. |
| |
;-----------------------------------[ SFX Handling Routines ]--------------------------------------- | ;-----------------------------------[ SFX Handling Routines ]--------------------------------------- |
;on the SFX. It starts out quiet, then becomes louder then goes quiet again. | ;on the SFX. It starts out quiet, then becomes louder then goes quiet again. |
SpitFlamesTbl: | SpitFlamesTbl: |
LB4FB: .byte $12, $13, $14, $15, $16, $17, $18, $19, $1A, $1B, $1C, $1D, $1B, $1A, $19, $17 | LB4FB: .byte $12, $13, $14, $15, $16, $17, $18, $19, $1A, $1B, $1C, $1D, $1B, $1A, $19, $17 |
LB50B: .byte $16, $15, $14, $12 | LB50B: .byte $16, $15, $14, $12 |
| |
SpitFlameSFXStart: | SpitFlameSFXStart: |
LB50F: LDA #$14 ;Number of frames to play sound before a change. | LB50F: LDA #$14 ;Number of frames to play sound before a change. |
LB511: LDY #$21 ;Lower byte of sound data start address(base=$B200). | LB511: LDY #$21 ;Lower byte of sound data start address(base=$B200). |
LB513: JMP SelectSFXRoutine ;($B452)Setup registers for SFX. | LB513: JMP SelectSFXRoutine ;($B452)Setup registers for SFX. |
| |
SpitFlameSFXContinue: | SpitFlameSFXContinue: |
LB516: JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. | LB516: JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. |
LB519: BNE + ;If more frames to process, branch. | LB519: BNE + ;If more frames to process, branch. |
LB51B: JMP EndNoiseSFX ;($B58F)End SFX. | LB51B: JMP EndNoiseSFX ;($B58F)End SFX. |
LB51E:* LDY NoiseSFXData ; | LB51E:* LDY NoiseSFXData ; |
LB521: LDA $B4FB,Y ;Load data from table above and store in NoiseCntrl0. | LB521: LDA $B4FB,Y ;Load data from table above and store in NoiseCntrl0. |
LB524: STA NoiseCntrl0 ; | LB524: STA NoiseCntrl0 ; |
LB527: INC NoiseSFXData ;Increment to next entry in data table. | LB527: INC NoiseSFXData ;Increment to next entry in data table. |
LB52A: RTS | LB52A: RTS |
| |
ScrewAttackSFXStart: | ScrewAttackSFXStart: |
LB52B: LDA #$05 ;Number of frames to play sound before a change. | LB52B: LDA #$05 ;Number of frames to play sound before a change. |
LB52D: LDY #$11 ;Lower byte of sound data start address(base=$B200). | LB52D: LDY #$11 ;Lower byte of sound data start address(base=$B200). |
LB52F: JSR SelectSFXRoutine ;($B452)Setup registers for SFX. | LB52F: JSR SelectSFXRoutine ;($B452)Setup registers for SFX. |
LB532: LDA $B213 ;#$00. | LB532: LDA $B213 ;#$00. |
LB535: STA NoiseSFXData ;Clear NoiseSFXData. | LB535: STA NoiseSFXData ;Clear NoiseSFXData. |
LB538:* RTS ; | LB538:* RTS ; |
| |
ScrewAttackSFXContinue: | ScrewAttackSFXContinue: |
LB539: LDA ScrewAttackSFXData ;Prevents period index from being incremented until--> | LB539: LDA ScrewAttackSFXData ;Prevents period index from being incremented until--> |
LB53C: CMP #$02 ;after the tenth frame of the SFX. | LB53C: CMP #$02 ;after the tenth frame of the SFX. |
LB53E: BEQ + ;Branch if not ready to increment. | LB53E: BEQ + ;Branch if not ready to increment. |
LB540: JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. | LB540: JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. |
LB543: BNE - ; | LB543: BNE - ; |
LB545: INC ScrewAttackSFXData ;Increment every fifth frame. | LB545: INC ScrewAttackSFXData ;Increment every fifth frame. |
LB548: RTS ; | LB548: RTS ; |
| |
LB549:* JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. | LB549:* JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. |
LB54C: BNE IncrementPeriodIndex ;Start increasing period index after first ten frames. | LB54C: BNE IncrementPeriodIndex ;Start increasing period index after first ten frames. |
LB54E: DEC NoiseSFXData ; | LB54E: DEC NoiseSFXData ; |
LB551: DEC NoiseSFXData ;Decrement NoiseSFXData by three every fifth frame. | LB551: DEC NoiseSFXData ;Decrement NoiseSFXData by three every fifth frame. |
LB554: DEC NoiseSFXData ; | LB554: DEC NoiseSFXData ; |
LB557: INC MultiSFXData ;Increment MultiSFXData. When it is equal to #$0F--> | LB557: INC MultiSFXData ;Increment MultiSFXData. When it is equal to #$0F--> |
LB55A: LDA MultiSFXData ;end screw attack SFX. MultiSFXData does not--> | LB55A: LDA MultiSFXData ;end screw attack SFX. MultiSFXData does not--> |
LB55D: CMP #$0F ;appear to be linked to multi SFX channels in--> | LB55D: CMP #$0F ;appear to be linked to multi SFX channels in--> |
LB55F: BNE -- ;this routine. | LB55F: BNE -- ;this routine. |
LB561: JMP EndNoiseSFX ;($B58F)End SFX. | LB561: JMP EndNoiseSFX ;($B58F)End SFX. |
| |
IncrementPeriodIndex: | IncrementPeriodIndex: |
LB564: INC NoiseSFXData ;Incrementing the period index has the effect of--> | LB564: INC NoiseSFXData ;Incrementing the period index has the effect of--> |
LB567: LDA NoiseSFXData ;lowering the frequency of the noise SFX. | LB567: LDA NoiseSFXData ;lowering the frequency of the noise SFX. |
LB56A: STA NoiseCntrl2 ; | LB56A: STA NoiseCntrl2 ; |
LB56D: RTS ; | LB56D: RTS ; |
| |
MissileLaunchSFXStart: | MissileLaunchSFXStart: |
LB56E: LDA #$18 ;Number of frames to play sound before a change. | LB56E: LDA #$18 ;Number of frames to play sound before a change. |
LB570: LDY #$15 ;Lower byte of sound data start address(base=$B200). | LB570: LDY #$15 ;Lower byte of sound data start address(base=$B200). |
LB572: JSR GotoSelectSFXRoutine ;($B587)Prepare to setup registers for SFX. | LB572: JSR GotoSelectSFXRoutine ;($B587)Prepare to setup registers for SFX. |
LB575: LDA #$0A ; | LB575: LDA #$0A ; |
LB577: STA NoiseSFXData ;Start increment index for noise channel at #$0A. | LB577: STA NoiseSFXData ;Start increment index for noise channel at #$0A. |
LB57A: RTS ; | LB57A: RTS ; |
| |
MissileLaunchSFXContine: | MissileLaunchSFXContine: |
LB57B: JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. | LB57B: JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. |
LB57E: BNE IncrementPeriodIndex ; | LB57E: BNE IncrementPeriodIndex ; |
LB580: JMP EndNoiseSFX ;($B58F)End SFX. | LB580: JMP EndNoiseSFX ;($B58F)End SFX. |
| |
BombExplodeSFXStart: | BombExplodeSFXStart: |
LB583: LDA #$30 ;Number of frames to play sound before a change. | LB583: LDA #$30 ;Number of frames to play sound before a change. |
LB585: LDY #$19 ;Lower byte of sound data start address(base=$B200). | LB585: LDY #$19 ;Lower byte of sound data start address(base=$B200). |
| |
GotoSelectSFXRoutine: | GotoSelectSFXRoutine: |
LB587:* JMP SelectSFXRoutine ;($B452)Setup registers for SFX. | LB587:* JMP SelectSFXRoutine ;($B452)Setup registers for SFX. |
| |
;The following routine is used to continue BombExplode and SamusWalk SFX. | ;The following routine is used to continue BombExplode and SamusWalk SFX. |
| |
NoiseSFXContinue: | NoiseSFXContinue: |
LB58A: JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. | LB58A: JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. |
LB58D: BNE MusicBranch02 ;If more frames to process, branch to exit. | LB58D: BNE MusicBranch02 ;If more frames to process, branch to exit. |
| |
EndNoiseSFX: | EndNoiseSFX: |
LB58F: JSR ClearCurrentSFXFlags ;($B4A2)Clear all SFX flags. | LB58F: JSR ClearCurrentSFXFlags ;($B4A2)Clear all SFX flags. |
LB592: LDA #$10 ; | LB592: LDA #$10 ; |
LB594: STA NoiseCntrl0 ;disable envelope generator(sound off). | LB594: STA NoiseCntrl0 ;disable envelope generator(sound off). |
| |
MusicBranch02: | MusicBranch02: |
LB597: RTS ;Exit for multiple routines. | LB597: RTS ;Exit for multiple routines. |
| |
SamusWalkSFXStart: | SamusWalkSFXStart: |
LB598: LDA NoiseContSFX ;If MissileLaunch, SamusWalk or SpitFire SFX are--> | LB598: LDA NoiseContSFX ;If MissileLaunch, SamusWalk or SpitFire SFX are--> |
LB59B: AND #$34 ;already being played, branch to exit. | LB59B: AND #$34 ;already being played, branch to exit. |
LB59D: BNE MusicBranch02 ; | LB59D: BNE MusicBranch02 ; |
LB59F: LDA #$03 ;Number of frames to play sound before a change. | LB59F: LDA #$03 ;Number of frames to play sound before a change. |
LB5A1: LDY #$1D ;Lower byte of sound data start address(base=$B200). | LB5A1: LDY #$1D ;Lower byte of sound data start address(base=$B200). |
LB5A3: BNE - ;Branch always. | LB5A3: BNE - ;Branch always. |
| |
MultiSFXInit: | MultiSFXInit: |
LB5A5: STA MultiSFXLength ; | LB5A5: STA MultiSFXLength ; |
LB5A8: JSR LoadSQ2ChannelSFX ;($B374)Set SQ2 SFX data. | LB5A8: JSR LoadSQ2ChannelSFX ;($B374)Set SQ2 SFX data. |
LB5AB: JSR UpdateContFlags ;($B493)Set continue SFX flag. | LB5AB: JSR UpdateContFlags ;($B493)Set continue SFX flag. |
LB5AE: LDA #$01 ; | LB5AE: LDA #$01 ; |
LB5B0: STA SQ1InUse ;Disable music from using SQ1 and SQ2 while--> | LB5B0: STA SQ1InUse ;Disable music from using SQ1 and SQ2 while--> |
LB5B3: LDA #$02 ;SFX are playing. | LB5B3: LDA #$02 ;SFX are playing. |
LB5B5: STA SQ2InUse ; | LB5B5: STA SQ2InUse ; |
LB5B8: LDA #$00 ; | LB5B8: LDA #$00 ; |
LB5BA: STA SQ1ContSFX ; | LB5BA: STA SQ1ContSFX ; |
LB5BD: STA SQ1SFXData ; | LB5BD: STA SQ1SFXData ; |
LB5C0: STA SQ1SQ2SFXData ;Clear all listed memory addresses. | LB5C0: STA SQ1SQ2SFXData ;Clear all listed memory addresses. |
LB5C3: STA SQ1SFXPeriodLow ; | LB5C3: STA SQ1SFXPeriodLow ; |
LB5C6: STA ThisMultiFrame ; | LB5C6: STA ThisMultiFrame ; |
LB5C9: STA WriteMultiChannelData ; | LB5C9: STA WriteMultiChannelData ; |
LB5CC: RTS ; | LB5CC: RTS ; |
| |
EndMultiSFX: | EndMultiSFX: |
LB5CD: LDA #$10 ; | LB5CD: LDA #$10 ; |
LB5CF: STA SQ1Cntrl0 ;Disable SQ1 envelope generator(sound off). | LB5CF: STA SQ1Cntrl0 ;Disable SQ1 envelope generator(sound off). |
LB5D2: STA SQ2Cntrl0 ;Disable SQ2 envelope generator(sound off). | LB5D2: STA SQ2Cntrl0 ;Disable SQ2 envelope generator(sound off). |
LB5D5: LDA #$7F ; | LB5D5: LDA #$7F ; |
LB5D7: STA SQ1Cntrl1 ;Disable SQ1 sweep. | LB5D7: STA SQ1Cntrl1 ;Disable SQ1 sweep. |
LB5DA: STA SQ2Cntrl1 ;Disable SQ2 sweep. | LB5DA: STA SQ2Cntrl1 ;Disable SQ2 sweep. |
LB5DD: JSR ClearCurrentSFXFlags ;($B4A2)Clear all SFX flags. | LB5DD: JSR ClearCurrentSFXFlags ;($B4A2)Clear all SFX flags. |
LB5E0: LDA #$00 ; | LB5E0: LDA #$00 ; |
LB5E2: STA SQ1InUse ; | LB5E2: STA SQ1InUse ; |
LB5E5: STA SQ2InUse ;Allows music player to use SQ1 and SQ2 channels. | LB5E5: STA SQ2InUse ;Allows music player to use SQ1 and SQ2 channels. |
LB5E8: INC WriteMultiChannelData ; | LB5E8: INC WriteMultiChannelData ; |
LB5EB: RTS ; | LB5EB: RTS ; |
| |
BossHitSFXStart: | BossHitSFXStart: |
LB5EC: LDY #$2D ;Low byte of SQ1 sound data start address(base=$B200). | LB5EC: LDY #$2D ;Low byte of SQ1 sound data start address(base=$B200). |
LB5EE: JSR LoadSQ1ChannelSFX ;($B368)Set SQ1 SFX data. | LB5EE: JSR LoadSQ1ChannelSFX ;($B368)Set SQ1 SFX data. |
LB5F1: LDY #$29 ;Low byte of SQ2 sound data start address(base=$B200). | LB5F1: LDY #$29 ;Low byte of SQ2 sound data start address(base=$B200). |
LB5F3: JMP MultiSFXInit ;($B5A5)Initiate multi channel SFX. | LB5F3: JMP MultiSFXInit ;($B5A5)Initiate multi channel SFX. |
| |
BossHitSFXContinue: | BossHitSFXContinue: |
LB5F6: INC SQ1SFXData ;Increment index to data in table below. | LB5F6: INC SQ1SFXData ;Increment index to data in table below. |
LB5F9: LDY SQ1SFXData ; | LB5F9: LDY SQ1SFXData ; |
LB5FC: LDA $B63C,Y ; | LB5FC: LDA $B63C,Y ; |
LB5FF: STA SQ1Cntrl0 ;Load SQ1Cntrl0 and SQ2Cntrl0 from table below. | LB5FF: STA SQ1Cntrl0 ;Load SQ1Cntrl0 and SQ2Cntrl0 from table below. |
LB602: STA SQ2Cntrl0 ; | LB602: STA SQ2Cntrl0 ; |
LB605: LDA SQ1SFXData ; | LB605: LDA SQ1SFXData ; |
LB608: CMP #$14 ;After #$14 frames, end SFX. | LB608: CMP #$14 ;After #$14 frames, end SFX. |
LB60A: BEQ ++ ; | LB60A: BEQ ++ ; |
LB60C: CMP #$06 ;After six or more frames of SFX, branch. | LB60C: CMP #$06 ;After six or more frames of SFX, branch. |
LB60E: BCC + ; | LB60E: BCC + ; |
LB610: LDA RandomNumber1 ; | LB610: LDA RandomNumber1 ; |
LB612: ORA #$10 ;Set bit 5. | LB612: ORA #$10 ;Set bit 5. |
LB614: AND #$7F ;Randomly set bits 7, 3, 2, 1 and 0. | LB614: AND #$7F ;Randomly set bits 7, 3, 2, 1 and 0. |
LB616: STA SQ1SFXPeriodLow ;Store in SQ1 period low. | LB616: STA SQ1SFXPeriodLow ;Store in SQ1 period low. |
LB619: ROL ; | LB619: ROL ; |
LB61A: STA SQ1SQ2SFXData ; | LB61A: STA SQ1SQ2SFXData ; |
LB61D: JMP WriteSQ1SQ2PeriodLow ;($B62C)Write period low data to SQ1 and SQ2. | LB61D: JMP WriteSQ1SQ2PeriodLow ;($B62C)Write period low data to SQ1 and SQ2. |
LB620:* INC SQ1SQ2SFXData ; | LB620:* INC SQ1SQ2SFXData ; |
LB623: INC SQ1SQ2SFXData ;Increment SQ1 and SQ2 period low by two. | LB623: INC SQ1SQ2SFXData ;Increment SQ1 and SQ2 period low by two. |
LB626: INC SQ1SFXPeriodLow ; | LB626: INC SQ1SFXPeriodLow ; |
LB629: INC SQ1SFXPeriodLow ; | LB629: INC SQ1SFXPeriodLow ; |
| |
WriteSQ1SQ2PeriodLow: | WriteSQ1SQ2PeriodLow: |
LB62C: LDA SQ1SQ2SFXData ; | LB62C: LDA SQ1SQ2SFXData ; |
LB62F: STA SQ2Cntrl2 ;Write new SQ1 and SQ2 period lows to SQ1 and SQ2--> | LB62F: STA SQ2Cntrl2 ;Write new SQ1 and SQ2 period lows to SQ1 and SQ2--> |
LB632: LDA SQ1SFXPeriodLow ;channels. | LB632: LDA SQ1SFXPeriodLow ;channels. |
LB635: STA SQ1Cntrl2 ; | LB635: STA SQ1Cntrl2 ; |
LB638: RTS ; | LB638: RTS ; |
| |
LB639:* JMP EndMultiSFX ;($B5CD)End SFX. | LB639:* JMP EndMultiSFX ;($B5CD)End SFX. |
| |
BossHitSFXDataTbl: | BossHitSFXDataTbl: |
LB63C: .byte $38, $3D, $3F, $3F, $3F, $3F, $3F, $3D, $3B, $39, $3B, $3D, $3F, $3D, $3B, $39 | LB63C: .byte $38, $3D, $3F, $3F, $3F, $3F, $3F, $3D, $3B, $39, $3B, $3D, $3F, $3D, $3B, $39 |
LB64C: .byte $3B, $3D, $3F, $39 | LB64C: .byte $3B, $3D, $3F, $39 |
| |
SamusHitSFXContinue: | SamusHitSFXContinue: |
LB650: JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. | LB650: JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. |
LB653: BNE + ;If more SFX frames to process, branch. | LB653: BNE + ;If more SFX frames to process, branch. |
LB655: JMP EndMultiSFX ;($B5CD)End SFX. | LB655: JMP EndMultiSFX ;($B5CD)End SFX. |
LB658:* LDY #$25 ;Low byte of SQ1 sound data start address(base=$B200). | LB658:* LDY #$25 ;Low byte of SQ1 sound data start address(base=$B200). |
LB65A: JSR LoadSQ1ChannelSFX ;($B368)Set SQ1 SFX data. | LB65A: JSR LoadSQ1ChannelSFX ;($B368)Set SQ1 SFX data. |
LB65D: LDA RandomNumber1 ; | LB65D: LDA RandomNumber1 ; |
LB65F: AND #$0F ;Randomly set last four bits of SQ1 period low. | LB65F: AND #$0F ;Randomly set last four bits of SQ1 period low. |
LB661: STA SQ1Cntrl2 ; | LB661: STA SQ1Cntrl2 ; |
LB664: LDY #$25 ;Low byte of SQ2 sound data start address(base=$B200). | LB664: LDY #$25 ;Low byte of SQ2 sound data start address(base=$B200). |
LB666: JSR LoadSQ2ChannelSFX ;($B374)Set SQ2 SFX data. | LB666: JSR LoadSQ2ChannelSFX ;($B374)Set SQ2 SFX data. |
LB669: LDA RandomNumber1 ; | LB669: LDA RandomNumber1 ; |
LB66B: LSR ;Multiply random number by 4. | LB66B: LSR ;Multiply random number by 4. |
LB66C: LSR ; | LB66C: LSR ; |
LB66D: AND #$0F ; | LB66D: AND #$0F ; |
LB66F: STA SQ2Cntrl2 ;Randomly set bits 2 and 3 of SQ2 period low. | LB66F: STA SQ2Cntrl2 ;Randomly set bits 2 and 3 of SQ2 period low. |
LB672: RTS ; | LB672: RTS ; |
| |
SamusHitSFXStart: | SamusHitSFXStart: |
LB673: LDY #$25 ;Low byte of SQ1 sound data start address(base=$B200). | LB673: LDY #$25 ;Low byte of SQ1 sound data start address(base=$B200). |
LB675: JSR LoadSQ1ChannelSFX ;($B368)Set SQ1 SFX data. | LB675: JSR LoadSQ1ChannelSFX ;($B368)Set SQ1 SFX data. |
LB678: LDA RandomNumber1 ; | LB678: LDA RandomNumber1 ; |
LB67A: AND #$0F ;Randomly set last four bits of SQ1 period low. | LB67A: AND #$0F ;Randomly set last four bits of SQ1 period low. |
LB67C: STA SQ1Cntrl2 ; | LB67C: STA SQ1Cntrl2 ; |
LB67F: CLC ; | LB67F: CLC ; |
LB680: LDA RandomNumber1 ;Randomly set last three bits of SQ2 period low+1. | LB680: LDA RandomNumber1 ;Randomly set last three bits of SQ2 period low+1. |
LB682: AND #$03 ; | LB682: AND #$03 ; |
LB684: ADC #$01 ;Number of frames to play sound before a change. | LB684: ADC #$01 ;Number of frames to play sound before a change. |
LB686: LDY #$25 ;Low byte of SQ2 sound data start address(base=$B200). | LB686: LDY #$25 ;Low byte of SQ2 sound data start address(base=$B200). |
LB688: JSR MultiSFXInit ;($B5A5)Initiate multi channel SFX. | LB688: JSR MultiSFXInit ;($B5A5)Initiate multi channel SFX. |
LB68B: LDA RandomNumber1 ; | LB68B: LDA RandomNumber1 ; |
LB68D: LSR ;Multiply random number by 4. | LB68D: LSR ;Multiply random number by 4. |
LB68E: LSR ; | LB68E: LSR ; |
LB68F: AND #$0F ; | LB68F: AND #$0F ; |
LB691: STA SQ2Cntrl2 ;Randomly set bits 2 and 3 of SQ2 period low. | LB691: STA SQ2Cntrl2 ;Randomly set bits 2 and 3 of SQ2 period low. |
LB694:* RTS ; | LB694:* RTS ; |
| |
IncorrectPasswordSFXStart: | IncorrectPasswordSFXStart: |
LB695: LDY #$31 ;Low byte of SQ1 sound data start address(base=$B200). | LB695: LDY #$31 ;Low byte of SQ1 sound data start address(base=$B200). |
LB697: JSR LoadSQ1ChannelSFX ;($B368)Set SQ1 SFX data. | LB697: JSR LoadSQ1ChannelSFX ;($B368)Set SQ1 SFX data. |
LB69A: LDA #$20 ;Number of frames to play sound before a change. | LB69A: LDA #$20 ;Number of frames to play sound before a change. |
LB69C: LDY #$35 ;Low byte of SQ2 sound data start address(base=$B200). | LB69C: LDY #$35 ;Low byte of SQ2 sound data start address(base=$B200). |
LB69E: JMP MultiSFXInit ;($B5A5)Initiate multi channel SFX. | LB69E: JMP MultiSFXInit ;($B5A5)Initiate multi channel SFX. |
| |
IncorrectPasswordSFXContinue: | IncorrectPasswordSFXContinue: |
LB6A1: JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. | LB6A1: JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. |
LB6A4: BNE - ;If more frames to process, branch to exit. | LB6A4: BNE - ;If more frames to process, branch to exit. |
LB6A6: JMP EndMultiSFX ;($B5CD)End SFX. | LB6A6: JMP EndMultiSFX ;($B5CD)End SFX. |
| |
;The following table is used by the below routine to load SQ1Cntrl2 data in the | ;The following table is used by the below routine to load SQ1Cntrl2 data in the |
| |
MissilePickupSFXTbl: | MissilePickupSFXTbl: |
LB6A9: .byte $BD, $8D, $7E, $5E, $46, $3E, $00 | LB6A9: .byte $BD, $8D, $7E, $5E, $46, $3E, $00 |
| |
MissilePickupSFXContinue: | MissilePickupSFXContinue: |
LB6B0: JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. | LB6B0: JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. |
LB6B3: BNE MusicBranch03 ;If more frames to process, branch to exit. | LB6B3: BNE MusicBranch03 ;If more frames to process, branch to exit. |
LB6B5: LDY SQ1SFXData ; | LB6B5: LDY SQ1SFXData ; |
LB6B8: LDA MissilePickupSFXTbl,Y ;Load SFX data from table above. | LB6B8: LDA MissilePickupSFXTbl,Y ;Load SFX data from table above. |
LB6BB: BNE + ; | LB6BB: BNE + ; |
LB6BD: JMP EndSQ1SFX ;($B6F2)SFX completed. | LB6BD: JMP EndSQ1SFX ;($B6F2)SFX completed. |
LB6C0:* STA SQ1Cntrl2 ; | LB6C0:* STA SQ1Cntrl2 ; |
LB6C3: LDA $B244 ;#$28. | LB6C3: LDA $B244 ;#$28. |
LB6C6: STA SQ1Cntrl3 ;load SQ1Cntrl3 with #$28. | LB6C6: STA SQ1Cntrl3 ;load SQ1Cntrl3 with #$28. |
LB6C9: INC SQ1SFXData ;Increment index to data table above every 5 frames. | LB6C9: INC SQ1SFXData ;Increment index to data table above every 5 frames. |
| |
MusicBranch03: | MusicBranch03: |
LB6CC: RTS ;Exit from multiple routines. | LB6CC: RTS ;Exit from multiple routines. |
| |
MissilePickupSFXStart: | MissilePickupSFXStart: |
LB6CD: LDA #$05 ;Number of frames to play sound before a change. | LB6CD: LDA #$05 ;Number of frames to play sound before a change. |
LB6CF: LDY #$41 ;Lower byte of sound data start address(base=$B200). | LB6CF: LDY #$41 ;Lower byte of sound data start address(base=$B200). |
LB6D1: BNE +++ ;Branch always. | LB6D1: BNE +++ ;Branch always. |
| |
EnergyPickupSFXContinue: | EnergyPickupSFXContinue: |
LB6D3: JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. | LB6D3: JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. |
LB6D6: BNE MusicBranch03 ;If more frames to process, branch to exit. | LB6D6: BNE MusicBranch03 ;If more frames to process, branch to exit. |
LB6D8: INC SQ1SFXData ; | LB6D8: INC SQ1SFXData ; |
LB6DB: LDA SQ1SFXData ;Every six frames, reload SFX info. Does it--> | LB6DB: LDA SQ1SFXData ;Every six frames, reload SFX info. Does it--> |
LB6DE: CMP #$03 ;three times for a total of 18 frames. | LB6DE: CMP #$03 ;three times for a total of 18 frames. |
LB6E0: BEQ + ; | LB6E0: BEQ + ; |
LB6E2: LDY #$3D ; | LB6E2: LDY #$3D ; |
LB6E4: JMP LoadSQ1ChannelSFX ;($B368)Set SQ1 SFX data. | LB6E4: JMP LoadSQ1ChannelSFX ;($B368)Set SQ1 SFX data. |
| |
EnergyPickupSFXStart: | EnergyPickupSFXStart: |
LB6E7: LDA #$06 ;Number of frames to play sound before a change. | LB6E7: LDA #$06 ;Number of frames to play sound before a change. |
LB6E9: LDY #$3D ;Lower byte of sound data start address(base=$B200). | LB6E9: LDY #$3D ;Lower byte of sound data start address(base=$B200). |
LB6EB: BNE +++ ;Branch always. | LB6EB: BNE +++ ;Branch always. |
| |
;The following continue routine is used by the metal, out of hole, | ;The following continue routine is used by the metal, out of hole, |
| |
SQ1SFXContinue: | SQ1SFXContinue: |
LB6ED: JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. | LB6ED: JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. |
LB6F0: BNE MusicBranch03 ; | LB6F0: BNE MusicBranch03 ; |
| |
EndSQ1SFX: | EndSQ1SFX: |
LB6F2:* LDA #$10 ; | LB6F2:* LDA #$10 ; |
LB6F4: STA SQ1Cntrl0 ;Disable envelope generator(sound off). | LB6F4: STA SQ1Cntrl0 ;Disable envelope generator(sound off). |
LB6F7: LDA #$00 ; | LB6F7: LDA #$00 ; |
LB6F9: STA SQ1InUse ;Allows music to use SQ1 channel. | LB6F9: STA SQ1InUse ;Allows music to use SQ1 channel. |
LB6FC: JSR ClearCurrentSFXFlags ;($B4A2)Clear all SFX flags. | LB6FC: JSR ClearCurrentSFXFlags ;($B4A2)Clear all SFX flags. |
LB6FF: INC WriteMultiChannelData ;Allows music routines to load SQ1 and SQ2 music. | LB6FF: INC WriteMultiChannelData ;Allows music routines to load SQ1 and SQ2 music. |
LB702: RTS ; | LB702: RTS ; |
| |
SamusJumpSFXStart: | SamusJumpSFXStart: |
LB703: LDA CurrentMusic ;If escape music is playing, exit without playing--> | LB703: LDA CurrentMusic ;If escape music is playing, exit without playing--> |
LB706: CMP #$04 ;Samus jump SFX. | LB706: CMP #$04 ;Samus jump SFX. |
LB708: BEQ MusicBranch03 ; | LB708: BEQ MusicBranch03 ; |
LB70A: LDA #$0C ;Number of frames to play sound before a change. | LB70A: LDA #$0C ;Number of frames to play sound before a change. |
LB70C: LDY #$51 ;Lower byte of sound data start address(base=$B200). | LB70C: LDY #$51 ;Lower byte of sound data start address(base=$B200). |
LB70E: BNE SelectSFX1 ;Branch always. | LB70E: BNE SelectSFX1 ;Branch always. |
| |
EnemyHitSFXStart: | EnemyHitSFXStart: |
LB710: LDA #$08 ;Number of frames to play sound before a change. | LB710: LDA #$08 ;Number of frames to play sound before a change. |
LB712: LDY #$55 ;Lower byte of sound data start address(base=$B200). | LB712: LDY #$55 ;Lower byte of sound data start address(base=$B200). |
LB714: BNE SelectSFX1 ;Branch always. | LB714: BNE SelectSFX1 ;Branch always. |
| |
BulletFireSFXStart: | BulletFireSFXStart: |
LB716: LDA HasBeamSFX ; | LB716: LDA HasBeamSFX ; |
LB719: LSR ;If Samus has ice beam, branch. | LB719: LSR ;If Samus has ice beam, branch. |
LB71A: BCS +++++ ; | LB71A: BCS +++++ ; |
LB71C: LDA SQ1ContSFX ;If MissilePickup, EnergyPickup, BirdOutOfHole--> | LB71C: LDA SQ1ContSFX ;If MissilePickup, EnergyPickup, BirdOutOfHole--> |
LB71F: AND #$CC ;or EnemyHit SFX already playing, branch to exit. | LB71F: AND #$CC ;or EnemyHit SFX already playing, branch to exit. |
LB721: BNE MusicBranch03 ; | LB721: BNE MusicBranch03 ; |
LB723: LDA HasBeamSFX ; | LB723: LDA HasBeamSFX ; |
LB726: ASL ;If Samus has long beam, branch. | LB726: ASL ;If Samus has long beam, branch. |
LB727: BCS + ; | LB727: BCS + ; |
LB729: LDA #$03 ;Number of frames to play sound before a change. | LB729: LDA #$03 ;Number of frames to play sound before a change. |
LB72B: LDY #$4D ;Lower byte of sound data start address(base=$B200). | LB72B: LDY #$4D ;Lower byte of sound data start address(base=$B200). |
LB72D: BNE SelectSFX1 ;Branch always (Plays ShortBeamSFX). | LB72D: BNE SelectSFX1 ;Branch always (Plays ShortBeamSFX). |
| |
HasLongBeamSFXStart: | HasLongBeamSFXStart: |
LB72F:* LDA #$07 ;Number of frames to play sound before a change. | LB72F:* LDA #$07 ;Number of frames to play sound before a change. |
LB731: LDY #$49 ;Lower byte of sound data start address(base=$B200). | LB731: LDY #$49 ;Lower byte of sound data start address(base=$B200). |
LB733: BNE SelectSFX1 ;Branch always. | LB733: BNE SelectSFX1 ;Branch always. |
| |
MetalSFXStart: | MetalSFXStart: |
LB735: LDA #$0B ;Number of frames to play sound before a change. | LB735: LDA #$0B ;Number of frames to play sound before a change. |
LB737: LDY #$45 ;Lower byte of sound data start address(base=$B200). | LB737: LDY #$45 ;Lower byte of sound data start address(base=$B200). |
| |
SelectSFX1: | SelectSFX1: |
LB739:* JMP SelectSFXRoutine ;($B452)Setup registers for SFX. | LB739:* JMP SelectSFXRoutine ;($B452)Setup registers for SFX. |
| |
BirdOutOfHoleSFXStart: | BirdOutOfHoleSFXStart: |
LB73C: LDA CurrentMusic ;If escape music is playing, use this SFX to make--> | LB73C: LDA CurrentMusic ;If escape music is playing, use this SFX to make--> |
LB73F: CMP #$04 ;the bomb ticking sound, else play regular SFX. | LB73F: CMP #$04 ;the bomb ticking sound, else play regular SFX. |
LB741: BEQ + ; | LB741: BEQ + ; |
LB743: LDA #$16 ;Number of frames to play sound before a change. | LB743: LDA #$16 ;Number of frames to play sound before a change. |
LB745: LDY #$59 ;Lower byte of sound data start address(base=$B200). | LB745: LDY #$59 ;Lower byte of sound data start address(base=$B200). |
LB747: BNE SelectSFX1 ;Branch always. | LB747: BNE SelectSFX1 ;Branch always. |
LB749:* LDA #$07 ;Number of frames to play sound before a change. | LB749:* LDA #$07 ;Number of frames to play sound before a change. |
LB74B: LDY #$39 ;Lower byte of sound data start address(base=$B200). | LB74B: LDY #$39 ;Lower byte of sound data start address(base=$B200). |
LB74D: BNE SelectSFX1 ;Branch always. | LB74D: BNE SelectSFX1 ;Branch always. |
| |
BulletFireSFXContinue: | BulletFireSFXContinue: |
LB74F: LDA HasBeamSFX ; | LB74F: LDA HasBeamSFX ; |
LB752: LSR ;If Samus has ice beam, branch. | LB752: LSR ;If Samus has ice beam, branch. |
LB753: BCS +++ ; | LB753: BCS +++ ; |
LB755: JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. | LB755: JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. |
LB758: BNE + ;If more frames to process, branch to exit. | LB758: BNE + ;If more frames to process, branch to exit. |
LB75A: JMP EndSQ1SFX ;($B6F2)If SFX finished, jump. | LB75A: JMP EndSQ1SFX ;($B6F2)If SFX finished, jump. |
LB75D:* RTS ; | LB75D:* RTS ; |
| |
HasIceBeamSFXStart: | HasIceBeamSFXStart: |
LB75E:* LDA #$07 ;Number of frames to play sound before a change. | LB75E:* LDA #$07 ;Number of frames to play sound before a change. |
LB760: LDY #$61 ;Lower byte of sound data start address(base=$B200). | LB760: LDY #$61 ;Lower byte of sound data start address(base=$B200). |
LB762: JMP SelectSFXRoutine ;($B452)Setup registers for SFX. | LB762: JMP SelectSFXRoutine ;($B452)Setup registers for SFX. |
| |
HasIceBeamSFXContinue: | HasIceBeamSFXContinue: |
LB765:* JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. | LB765:* JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. |
LB768: BNE + ;If more frames to process, branch. | LB768: BNE + ;If more frames to process, branch. |
LB76A: JMP EndSQ1SFX ;($B6F2)If SFX finished, jump. | LB76A: JMP EndSQ1SFX ;($B6F2)If SFX finished, jump. |
LB76D:* LDA SQ1SFXData ; | LB76D:* LDA SQ1SFXData ; |
LB770: AND #$01 ;Determine index for IceBeamSFXDataTbl below. | LB770: AND #$01 ;Determine index for IceBeamSFXDataTbl below. |
LB772: TAY ; | LB772: TAY ; |
LB773: LDA IceBeamSFXDataTbl,Y ;Loads A with value from IceBeamSFXDataTbl below. | LB773: LDA IceBeamSFXDataTbl,Y ;Loads A with value from IceBeamSFXDataTbl below. |
LB776: BNE ++ ; | LB776: BNE ++ ; |
| |
IceBeamSFXDataTbl: | IceBeamSFXDataTbl: |
LB778: .byte $93 ;Ice beam SFX period low data. | LB778: .byte $93 ;Ice beam SFX period low data. |
LB779: .byte $81 ; | LB779: .byte $81 ; |
| |
WaveBeamSFXStart: | WaveBeamSFXStart: |
LB77A: LDA #$08 ;Number of frames to play sound before a change. | LB77A: LDA #$08 ;Number of frames to play sound before a change. |
LB77C: LDY #$5D ;Lower byte of sound data start address(base=$B200). | LB77C: LDY #$5D ;Lower byte of sound data start address(base=$B200). |
LB77E: JMP SelectSFXRoutine ;($B452)Setup registers for SFX. | LB77E: JMP SelectSFXRoutine ;($B452)Setup registers for SFX. |
| |
WaveBeamSFXContinue: | WaveBeamSFXContinue: |
LB781: JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. | LB781: JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. |
LB784: BNE + ;If more frames to process, branch. | LB784: BNE + ;If more frames to process, branch. |
LB786: LDY SQ1SQ2SFXData ; | LB786: LDY SQ1SQ2SFXData ; |
LB789: INC SQ1SQ2SFXData ;Load wave beam SFXDisable/enable envelope length--> | LB789: INC SQ1SQ2SFXData ;Load wave beam SFXDisable/enable envelope length--> |
LB78C: LDA WaveBeamSFXDisLngthTbl,Y ;data from WaveBeamSFXDisableLengthTbl. | LB78C: LDA WaveBeamSFXDisLngthTbl,Y ;data from WaveBeamSFXDisableLengthTbl. |
LB78F: STA SQ1Cntrl0 ; | LB78F: STA SQ1Cntrl0 ; |
LB792: BNE MusicBranch10 ;If at end of WaveBeamSFXDisableLengthTbl, end SFX. | LB792: BNE MusicBranch10 ;If at end of WaveBeamSFXDisableLengthTbl, end SFX. |
LB794: JMP EndSQ1SFX ;($B6F2)If SFX finished, jump. | LB794: JMP EndSQ1SFX ;($B6F2)If SFX finished, jump. |
LB797:* LDA SQ1SFXData | LB797:* LDA SQ1SFXData |
LB79A: AND #$01 ; | LB79A: AND #$01 ; |
LB79C: TAY ;Load wave beam SFX period low data from--> | LB79C: TAY ;Load wave beam SFX period low data from--> |
LB79D: LDA WaveBeamSFXPeriodLowTbl,Y ;WaveBeamSFXPeriodLowTbl. | LB79D: LDA WaveBeamSFXPeriodLowTbl,Y ;WaveBeamSFXPeriodLowTbl. |
| |
LoadSQ1PeriodLow: | LoadSQ1PeriodLow: |
LB7A0:* STA SQ1Cntrl2 ;Change the period low data for SQ1 channel. | LB7A0:* STA SQ1Cntrl2 ;Change the period low data for SQ1 channel. |
LB7A3: INC SQ1SFXData ; | LB7A3: INC SQ1SFXData ; |
| |
MusicBranch10: | MusicBranch10: |
LB7A6: RTS ;Exit for multiple routines. | LB7A6: RTS ;Exit for multiple routines. |
| |
WaveBeamSFXPeriodLowTbl: | WaveBeamSFXPeriodLowTbl: |
LB7A7: .byte $58 ;Wave beam SFX period low data. | LB7A7: .byte $58 ;Wave beam SFX period low data. |
LB7A8: .byte $6F ; | LB7A8: .byte $6F ; |
| |
WaveBeamSFXDisLngthTbl: | WaveBeamSFXDisLngthTbl: |
LB7A9: .byte $93 ; | LB7A9: .byte $93 ; |
LB7AA: .byte $91 ;Wave beam SFX Disable/enable envelope length data. | LB7AA: .byte $91 ;Wave beam SFX Disable/enable envelope length data. |
LB7AB: .byte $00 ; | LB7AB: .byte $00 ; |
| |
DoorOpenCloseSFXStart: | DoorOpenCloseSFXStart: |
LB7AC: LDA $B287 ;#$30. | LB7AC: LDA $B287 ;#$30. |
LB7AF: STA TrianglePeriodLow ;Set triangle period low data byte. | LB7AF: STA TrianglePeriodLow ;Set triangle period low data byte. |
LB7B2: LDA $B288 ;#$B2. | LB7B2: LDA $B288 ;#$B2. |
LB7B5: AND #$07 ;Set triangle period high data byte. | LB7B5: AND #$07 ;Set triangle period high data byte. |
LB7B7: STA TrianglePeriodHigh ;#$B7. | LB7B7: STA TrianglePeriodHigh ;#$B7. |
LB7BA: LDA #$0F ; | LB7BA: LDA #$0F ; |
LB7BC: STA TriangleChangeLow ;Change triangle channel period low every frame by #$0F. | LB7BC: STA TriangleChangeLow ;Change triangle channel period low every frame by #$0F. |
LB7BF: LDA #$00 ; | LB7BF: LDA #$00 ; |
LB7C1: STA TriangleChangeHigh ;No change in triangle channel period high. | LB7C1: STA TriangleChangeHigh ;No change in triangle channel period high. |
LB7C4: LDA #$1F ;Number of frames to play sound before a change. | LB7C4: LDA #$1F ;Number of frames to play sound before a change. |
LB7C6: LDY #$85 ;Lower byte of sound data start address(base=$B200). | LB7C6: LDY #$85 ;Lower byte of sound data start address(base=$B200). |
LB7C8: JMP SelectSFXRoutine ;($B452)Setup registers for SFX. | LB7C8: JMP SelectSFXRoutine ;($B452)Setup registers for SFX. |
| |
DoorOpenCloseSFXContinue: | DoorOpenCloseSFXContinue: |
LB7CB: JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. | LB7CB: JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. |
LB7CE: BNE + ; | LB7CE: BNE + ; |
LB7D0: JMP EndTriangleSFX ;($B896)End SFX. | LB7D0: JMP EndTriangleSFX ;($B896)End SFX. |
LB7D3:* JSR DecreaseTrianglePeriods ;($B98C)Decrease periods. | LB7D3:* JSR DecreaseTrianglePeriods ;($B98C)Decrease periods. |
LB7D6: JMP WriteTrianglePeriods ;($B869)Save new periods. | LB7D6: JMP WriteTrianglePeriods ;($B869)Save new periods. |
| |
BeepSFXStart: | BeepSFXStart: |
LB7D9: LDA TriangleContSFX ;If BombLaunchSFX is already playing, branch--> | LB7D9: LDA TriangleContSFX ;If BombLaunchSFX is already playing, branch--> |
LB7DC: AND #$80 ;without playing BeepSFX. | LB7DC: AND #$80 ;without playing BeepSFX. |
LB7DE: BNE MusicBranch10 ; | LB7DE: BNE MusicBranch10 ; |
LB7E0: LDA #$03 ;Number of frames to play sound before a change. | LB7E0: LDA #$03 ;Number of frames to play sound before a change. |
LB7E2: LDY #$79 ;Lower byte of sound data start address(base=$B200). | LB7E2: LDY #$79 ;Lower byte of sound data start address(base=$B200). |
LB7E4: JMP SelectSFXRoutine ;($B452)Setup registers for SFX. | LB7E4: JMP SelectSFXRoutine ;($B452)Setup registers for SFX. |
| |
BeepSFXContinue: | BeepSFXContinue: |
LB7E7: JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. | LB7E7: JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. |
LB7EA: BNE MusicBranch10 ;If more frames to process, branch to exit. | LB7EA: BNE MusicBranch10 ;If more frames to process, branch to exit. |
LB7EC: JMP EndTriangleSFX ;($B896)End SFX. | LB7EC: JMP EndTriangleSFX ;($B896)End SFX. |
| |
BigEnemyHitSFXStart: | BigEnemyHitSFXStart: |
LB7EF: LDA #$12 ;Increase triangle low period by #$12 every frame. | LB7EF: LDA #$12 ;Increase triangle low period by #$12 every frame. |
LB7F1: STA TriangleChangeLow ; | LB7F1: STA TriangleChangeLow ; |
LB7F4: LDA #$00 ; | LB7F4: LDA #$00 ; |
LB7F6: STA TriangleChangeHigh ;Does not change triangle period high. | LB7F6: STA TriangleChangeHigh ;Does not change triangle period high. |
LB7F9: LDA $B27F ;#$42. | LB7F9: LDA $B27F ;#$42. |
LB7FC: STA TrianglePeriodLow ;Save new triangle period low data. | LB7FC: STA TrianglePeriodLow ;Save new triangle period low data. |
LB7FF: LDA $B280 ;#$18. | LB7FF: LDA $B280 ;#$18. |
LB802: AND #$07 ;#$1F. | LB802: AND #$07 ;#$1F. |
LB804: STA TrianglePeriodHigh ;Save new triangle period high data. | LB804: STA TrianglePeriodHigh ;Save new triangle period high data. |
LB807: LDA #$0A ;Number of frames to play sound before a change. | LB807: LDA #$0A ;Number of frames to play sound before a change. |
LB809: LDY #$7D ;Lower byte of sound data start address(base=$B200). | LB809: LDY #$7D ;Lower byte of sound data start address(base=$B200). |
LB80B: JMP SelectSFXRoutine ;($B452)Setup registers for SFX. | LB80B: JMP SelectSFXRoutine ;($B452)Setup registers for SFX. |
| |
BigEnemyHitSFXContinue: | BigEnemyHitSFXContinue: |
LB80E: JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. | LB80E: JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. |
LB811: BNE + ;If more frames to process, branch | LB811: BNE + ;If more frames to process, branch |
LB813: JMP EndTriangleSFX ;($B896)End SFX | LB813: JMP EndTriangleSFX ;($B896)End SFX |
LB816:* JSR IncreaseTrianglePeriods ;($B978)Increase periods. | LB816:* JSR IncreaseTrianglePeriods ;($B978)Increase periods. |
LB819: LDA RandomNumber1 ; | LB819: LDA RandomNumber1 ; |
LB81B: AND #$3C ; | LB81B: AND #$3C ; |
LB81D: STA TriangleSFXData ; | LB81D: STA TriangleSFXData ; |
LB820: LDA TrianglePeriodLow ;Randomly set or clear bits 2, 3, 4 and 5 in--> | LB820: LDA TrianglePeriodLow ;Randomly set or clear bits 2, 3, 4 and 5 in--> |
LB823: AND #$C3 ;triangle channel period low. | LB823: AND #$C3 ;triangle channel period low. |
LB825: ORA TriangleSFXData ; | LB825: ORA TriangleSFXData ; |
LB828: STA TriangleCntrl2 ; | LB828: STA TriangleCntrl2 ; |
LB82B: LDA TrianglePeriodHigh ; | LB82B: LDA TrianglePeriodHigh ; |
LB82E: ORA #$40 ;Set 4th bit in triangle channel period high. | LB82E: ORA #$40 ;Set 4th bit in triangle channel period high. |
LB830: STA TriangleCntrl3 ; | LB830: STA TriangleCntrl3 ; |
LB833: RTS ; | LB833: RTS ; |
| |
SamusToBallSFXStart: | SamusToBallSFXStart: |
LB834: LDA #$08 ;Number of frames to play sound before a change. | LB834: LDA #$08 ;Number of frames to play sound before a change. |
LB836: LDY #$6D ;Lower byte of sound data start address(base=$B200). | LB836: LDY #$6D ;Lower byte of sound data start address(base=$B200). |
LB838: JSR SelectSFXRoutine ;($B452)Setup registers for SFX. | LB838: JSR SelectSFXRoutine ;($B452)Setup registers for SFX. |
LB83B: LDA #$05 ; | LB83B: LDA #$05 ; |
LB83D: STA PercentDifference ;Stores percent difference. In this case 5 = 1/5 = 20%. | LB83D: STA PercentDifference ;Stores percent difference. In this case 5 = 1/5 = 20%. |
LB840: LDA $B26F ;#$DD. | LB840: LDA $B26F ;#$DD. |
LB843: STA TrianglePeriodLow ;Save new triangle period low data. | LB843: STA TrianglePeriodLow ;Save new triangle period low data. |
LB846: LDA $B270 ;#$3B. | LB846: LDA $B270 ;#$3B. |
LB849: AND #$07 ;#$02. | LB849: AND #$07 ;#$02. |
LB84B: STA TrianglePeriodHigh ;Save new triangle period high data. | LB84B: STA TrianglePeriodHigh ;Save new triangle period high data. |
LB84E: RTS ; | LB84E: RTS ; |
| |
SamusToBallSFXContinue: | SamusToBallSFXContinue: |
LB84F: JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. | LB84F: JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. |
LB852: BNE + ;If more frames to process, branch. | LB852: BNE + ;If more frames to process, branch. |
LB854: JMP EndTriangleSFX ;($B896)End SFX. | LB854: JMP EndTriangleSFX ;($B896)End SFX. |
LB857:* JSR DivideTrianglePeriods ;($B9A0)reduces triangle period low by 20% each frame. | LB857:* JSR DivideTrianglePeriods ;($B9A0)reduces triangle period low by 20% each frame. |
LB85A: LDA TriangleLowPercentage ; | LB85A: LDA TriangleLowPercentage ; |
LB85D: STA TriangleChangeLow ;Store new values to change triangle periods. | LB85D: STA TriangleChangeLow ;Store new values to change triangle periods. |
LB860: LDA TriangleHighPercentage ; | LB860: LDA TriangleHighPercentage ; |
LB863: STA TriangleChangeHigh ; | LB863: STA TriangleChangeHigh ; |
LB866: JSR DecreaseTrianglePeriods ;($B98C)Decrease periods. | LB866: JSR DecreaseTrianglePeriods ;($B98C)Decrease periods. |
| |
WriteTrianglePeriods: | WriteTrianglePeriods: |
LB869: LDA TrianglePeriodLow ;Write TrianglePeriodLow to triangle channel. | LB869: LDA TrianglePeriodLow ;Write TrianglePeriodLow to triangle channel. |
LB86C: STA TriangleCntrl2 ; | LB86C: STA TriangleCntrl2 ; |
LB86F: LDA TrianglePeriodHigh ; | LB86F: LDA TrianglePeriodHigh ; |
LB872: ORA #$08 ;Write TrianglePeriodHigh to triangle channel. | LB872: ORA #$08 ;Write TrianglePeriodHigh to triangle channel. |
LB874: STA TriangleCntrl3 ; | LB874: STA TriangleCntrl3 ; |
LB877: RTS ; | LB877: RTS ; |
| |
BombLaunchSFXStart: | BombLaunchSFXStart: |
LB878: LDA #$04 ;Number of frames to play sound before a change. | LB878: LDA #$04 ;Number of frames to play sound before a change. |
LB87A: LDY #$65 ;Lower byte of sound data start address(base=$B200). | LB87A: LDY #$65 ;Lower byte of sound data start address(base=$B200). |
LB87C: JMP SelectSFXRoutine ;($B452)Setup registers for SFX. | LB87C: JMP SelectSFXRoutine ;($B452)Setup registers for SFX. |
| |
BombLaunchSFXContinue: | BombLaunchSFXContinue: |
LB87F: JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. | LB87F: JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. |
LB882: BNE MusicBranch04 ;If more frames to process, branch to exit. | LB882: BNE MusicBranch04 ;If more frames to process, branch to exit. |
LB884: INC TriangleSFXData ; | LB884: INC TriangleSFXData ; |
LB887: LDA TriangleSFXData ;After four frames, load second part of SFX. | LB887: LDA TriangleSFXData ;After four frames, load second part of SFX. |
LB88A: CMP #$02 ; | LB88A: CMP #$02 ; |
LB88C: BNE + ; | LB88C: BNE + ; |
LB88E: JMP EndTriangleSFX ;($B896)End SFX. | LB88E: JMP EndTriangleSFX ;($B896)End SFX. |
LB891:* LDY #$69 ;Lower byte of sound data start address(base=$B200). | LB891:* LDY #$69 ;Lower byte of sound data start address(base=$B200). |
LB893: JMP LoadTriangleChannelSFX ;($B36C)Prepare to load triangle channel with data. | LB893: JMP LoadTriangleChannelSFX ;($B36C)Prepare to load triangle channel with data. |
| |
EndTriangleSFX: | EndTriangleSFX: |
LB896: LDA #$00 ; | LB896: LDA #$00 ; |
LB898: STA TriangleCntrl0 ;clear TriangleCntr0(sound off). | LB898: STA TriangleCntrl0 ;clear TriangleCntr0(sound off). |
LB89B: STA TriangleInUse ;Allows music to use triangle channel. | LB89B: STA TriangleInUse ;Allows music to use triangle channel. |
LB89E: LDA #$18 ; | LB89E: LDA #$18 ; |
LB8A0: STA TriangleCntrl3 ;Set length index to #$03. | LB8A0: STA TriangleCntrl3 ;Set length index to #$03. |
LB8A3: JSR ClearCurrentSFXFlags ;($B4A2)Clear all SFX flags. | LB8A3: JSR ClearCurrentSFXFlags ;($B4A2)Clear all SFX flags. |
| |
MusicBranch04: | MusicBranch04: |
LB8A6: RTS ;Exit from for multiple routines. | LB8A6: RTS ;Exit from for multiple routines. |
| |
MetroidHitSFXStart: | MetroidHitSFXStart: |
LB8A7: LDA #$03 ;Number of frames to play sound before a change. | LB8A7: LDA #$03 ;Number of frames to play sound before a change. |
LB8A9: LDY #$71 ;Lower byte of sound data start address(base=$B200). | LB8A9: LDY #$71 ;Lower byte of sound data start address(base=$B200). |
LB8AB: JSR SelectSFXRoutine ;($B452)Setup registers for SFX. | LB8AB: JSR SelectSFXRoutine ;($B452)Setup registers for SFX. |
LB8AE: JMP RndTrianglePeriods ;($B8C3)MetroidHit SFX has several different sounds. | LB8AE: JMP RndTrianglePeriods ;($B8C3)MetroidHit SFX has several different sounds. |
| |
MetroiHitSFXContinue: | MetroiHitSFXContinue: |
LB8B1: JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. | LB8B1: JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. |
LB8B4: BEQ + ; | LB8B4: BEQ + ; |
LB8B6: INC TriangleSFXData ; | LB8B6: INC TriangleSFXData ; |
LB8B9: LDA TriangleSFXData ;Randomize triangle periods nine times throughout--> | LB8B9: LDA TriangleSFXData ;Randomize triangle periods nine times throughout--> |
LB8BC: CMP #$09 ;the course of the SFX. | LB8BC: CMP #$09 ;the course of the SFX. |
LB8BE: BNE MusicBranch04 ;If SFX not done, branch. | LB8BE: BNE MusicBranch04 ;If SFX not done, branch. |
LB8C0: JMP EndTriangleSFX ;($B896)End SFX. | LB8C0: JMP EndTriangleSFX ;($B896)End SFX. |
| |
RndTrianglePeriods: | RndTrianglePeriods: |
LB8C3:* LDA RandomNumber1 ;Randomly set or reset bits 7, 4, 2 and 1 of--> | LB8C3:* LDA RandomNumber1 ;Randomly set or reset bits 7, 4, 2 and 1 of--> |
LB8C5: ORA #$6C ;triangle channel period low. | LB8C5: ORA #$6C ;triangle channel period low. |
LB8C7: STA TriangleCntrl2 ; | LB8C7: STA TriangleCntrl2 ; |
LB8CA: AND #$01 ; | LB8CA: AND #$01 ; |
LB8CC: ORA #$F8 ;Randomly set or reset last bit of triangle--> | LB8CC: ORA #$F8 ;Randomly set or reset last bit of triangle--> |
LB8CE: STA TriangleCntrl3 ;channel period high. | LB8CE: STA TriangleCntrl3 ;channel period high. |
LB8D1: RTS ; | LB8D1: RTS ; |
| |
SamusDieSFXStart: | SamusDieSFXStart: |
LB8D2: JSR InitializeSoundAddresses ;($B404)Clear all sound addresses. | LB8D2: JSR InitializeSoundAddresses ;($B404)Clear all sound addresses. |
LB8D5: LDA #$0E ;Number of frames to play sound before a change. | LB8D5: LDA #$0E ;Number of frames to play sound before a change. |
LB8D7: LDY #$75 ;Lower byte of sound data start address(base=$B200). | LB8D7: LDY #$75 ;Lower byte of sound data start address(base=$B200). |
LB8D9: JSR SelectSFXRoutine ;($B452)Setup registers for SFX. | LB8D9: JSR SelectSFXRoutine ;($B452)Setup registers for SFX. |
LB8DC: LDA #$15 ;Decrease triangle SFX periods by 4.8% every frame. | LB8DC: LDA #$15 ;Decrease triangle SFX periods by 4.8% every frame. |
LB8DE: STA PercentDifference ; | LB8DE: STA PercentDifference ; |
LB8E1: LDA $B277 ;#$40. | LB8E1: LDA $B277 ;#$40. |
LB8E4: STA TrianglePeriodLow ; | LB8E4: STA TrianglePeriodLow ; |
LB8E7: LDA #$00 ;Initial values of triangle periods. | LB8E7: LDA #$00 ;Initial values of triangle periods. |
LB8E9: STA TrianglePeriodHigh ; | LB8E9: STA TrianglePeriodHigh ; |
LB8EC:* RTS ; | LB8EC:* RTS ; |
| |
SamusDieSFXContinue: | SamusDieSFXContinue: |
LB8ED: JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. | LB8ED: JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. |
LB8F0: BNE + ; | LB8F0: BNE + ; |
LB8F2: LDA #$20 ;Store change in triangle period low. | LB8F2: LDA #$20 ;Store change in triangle period low. |
LB8F4: STA TriangleChangeLow ; | LB8F4: STA TriangleChangeLow ; |
LB8F7: LDA #$00 ; | LB8F7: LDA #$00 ; |
LB8F9: STA TriangleChangeHigh ;No change in triangle period high. | LB8F9: STA TriangleChangeHigh ;No change in triangle period high. |
LB8FC: JSR DecreaseTrianglePeriods ;($B98C)Decrease periods. | LB8FC: JSR DecreaseTrianglePeriods ;($B98C)Decrease periods. |
LB8FF: INC TriangleSFXData ; | LB8FF: INC TriangleSFXData ; |
LB902: LDA TriangleSFXData ; | LB902: LDA TriangleSFXData ; |
LB905: CMP #$06 ; | LB905: CMP #$06 ; |
LB907: BNE - ;If more frames to process, branch to exit. | LB907: BNE - ;If more frames to process, branch to exit. |
LB909: JMP EndTriangleSFX ;($B896)End SFX. | LB909: JMP EndTriangleSFX ;($B896)End SFX. |
LB90C:* JSR DivideTrianglePeriods ;($B9A0)reduces triangle period low. | LB90C:* JSR DivideTrianglePeriods ;($B9A0)reduces triangle period low. |
LB90F: LDA TriangleLowPercentage ; | LB90F: LDA TriangleLowPercentage ; |
LB912: STA TriangleChangeLow ;Update triangle periods. | LB912: STA TriangleChangeLow ;Update triangle periods. |
LB915: LDA TriangleHighPercentage ; | LB915: LDA TriangleHighPercentage ; |
LB918: STA TriangleChangeHigh ; | LB918: STA TriangleChangeHigh ; |
LB91B: JSR IncreaseTrianglePeriods ;($B978)Increase periods. | LB91B: JSR IncreaseTrianglePeriods ;($B978)Increase periods. |
LB91E: JMP WriteTrianglePeriods ;($B869)Save new periods. | LB91E: JMP WriteTrianglePeriods ;($B869)Save new periods. |
| |
StatueRaiseSFXStart: | StatueRaiseSFXStart: |
LB921: LDA $B283 ;#$11. | LB921: LDA $B283 ;#$11. |
LB924: STA TrianglePeriodLow ;Save period low data. | LB924: STA TrianglePeriodLow ;Save period low data. |
LB927: LDA $B284 ;#$09. | LB927: LDA $B284 ;#$09. |
LB92A: AND #$07 ; | LB92A: AND #$07 ; |
LB92C: STA TrianglePeriodHigh ;Store last three bits in $B284. | LB92C: STA TrianglePeriodHigh ;Store last three bits in $B284. |
LB92F: LDA #$00 ; | LB92F: LDA #$00 ; |
LB931: STA TriangleChangeHigh ;No change in Triangle period high. | LB931: STA TriangleChangeHigh ;No change in Triangle period high. |
LB934: LDA #$0B ; | LB934: LDA #$0B ; |
LB936: STA TriangleChangeLow ; | LB936: STA TriangleChangeLow ; |
LB939: LDA #$06 ;Number of frames to play sound before a change. | LB939: LDA #$06 ;Number of frames to play sound before a change. |
LB93B: LDY #$81 ;Lower byte of sound data start address(base=$B200). | LB93B: LDY #$81 ;Lower byte of sound data start address(base=$B200). |
LB93D: JMP SelectSFXroutine ;($B452)Setup registers for SFX. | LB93D: JMP SelectSFXroutine ;($B452)Setup registers for SFX. |
| |
StatueRaiseSFXContinue: | StatueRaiseSFXContinue: |
LB940: JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. | LB940: JSR IncrementSFXFrame ;($B4A9)Get next databyte to process in SFX. |
LB943: BNE ++ ; | LB943: BNE ++ ; |
LB945: INC TriangleSFXData ;Increment TriangleSFXData every 6 frames. | LB945: INC TriangleSFXData ;Increment TriangleSFXData every 6 frames. |
LB948: LDA TriangleSFXData ; | LB948: LDA TriangleSFXData ; |
LB94B: CMP #$09 ;When TriangleSFXData = #$09, end SFX. | LB94B: CMP #$09 ;When TriangleSFXData = #$09, end SFX. |
LB94D: BNE + ; | LB94D: BNE + ; |
LB94F: JMP EndTriangleSFX ;($B896)End SFX. | LB94F: JMP EndTriangleSFX ;($B896)End SFX. |
LB952:* LDA TriangleChangeLow ; | LB952:* LDA TriangleChangeLow ; |
LB955: PHA ;Save triangle periods. | LB955: PHA ;Save triangle periods. |
LB956: LDA TriangleChangeHigh ; | LB956: LDA TriangleChangeHigh ; |
LB959: PHA ; | LB959: PHA ; |
LB95A: LDA #$25 ; | LB95A: LDA #$25 ; |
LB95C: STA TriangleChangeLow ; | LB95C: STA TriangleChangeLow ; |
LB95F: LDA #$00 ;No change in triangle period high. | LB95F: LDA #$00 ;No change in triangle period high. |
LB961: STA TriangleChangeHigh ; | LB961: STA TriangleChangeHigh ; |
LB964: JSR IncreaseTrianglePeriods ;($B978)Increase periods. | LB964: JSR IncreaseTrianglePeriods ;($B978)Increase periods. |
LB967: PLA ; | LB967: PLA ; |
LB968: STA TriangleChangeHigh ;Restore triangle periods. | LB968: STA TriangleChangeHigh ;Restore triangle periods. |
LB96B: PLA ; | LB96B: PLA ; |
LB96C: STA TriangleChangeLow ; | LB96C: STA TriangleChangeLow ; |
LB96F: JMP WriteTrianglePeriods ;($B869)Save new periods. | LB96F: JMP WriteTrianglePeriods ;($B869)Save new periods. |
LB972:* JSR DecreaseTrianglePeriods ;($B98C)Decrease periods. | LB972:* JSR DecreaseTrianglePeriods ;($B98C)Decrease periods. |
LB975: JMP WriteTrianglePeriods ;($B869)Save new periods. | LB975: JMP WriteTrianglePeriods ;($B869)Save new periods. |
| |
IncreaseTrianglePeriods: | IncreaseTrianglePeriods: |
LB978: CLC | LB978: CLC |
LB979: LDA TrianglePeriodLow ; | LB979: LDA TrianglePeriodLow ; |
LB97C: ADC TriangleChangeLow ;Calculate new TrianglePeriodLow. | LB97C: ADC TriangleChangeLow ;Calculate new TrianglePeriodLow. |
LB97F: STA TrianglePeriodLow ; | LB97F: STA TrianglePeriodLow ; |
LB982: LDA TrianglePeriodHigh ; | LB982: LDA TrianglePeriodHigh ; |
LB985: ADC TriangleChangeHigh ;Calculate new TrianglePeriodHigh. | LB985: ADC TriangleChangeHigh ;Calculate new TrianglePeriodHigh. |
LB988: STA TrianglePeriodHigh ; | LB988: STA TrianglePeriodHigh ; |
LB98B: RTS ; | LB98B: RTS ; |
| |
DecreaseTrianglePeriods: | DecreaseTrianglePeriods: |
LB98C: SEC | LB98C: SEC |
LB98D: LDA TrianglePeriodLow ; | LB98D: LDA TrianglePeriodLow ; |
LB990: SBC TriangleChangeLow ;Calculate new TrianglePeriodLow. | LB990: SBC TriangleChangeLow ;Calculate new TrianglePeriodLow. |
LB993: STA TrianglePeriodLow ; | LB993: STA TrianglePeriodLow ; |
LB996: LDA TrianglePeriodHigh ; | LB996: LDA TrianglePeriodHigh ; |
LB999: SBC TriangleChangeHigh ;Calculate new TrianglePeriodHigh. | LB999: SBC TriangleChangeHigh ;Calculate new TrianglePeriodHigh. |
LB99C: STA TrianglePeriodHigh ; | LB99C: STA TrianglePeriodHigh ; |
LB99F: RTS ; | LB99F: RTS ; |
| |
DivideTrianglePeriods: | DivideTrianglePeriods: |
LB9A0: LDA TrianglePeriodLow ; | LB9A0: LDA TrianglePeriodLow ; |
LB9A3: PHA ;Store TrianglePeriodLow and TrianglePeriodHigh. | LB9A3: PHA ;Store TrianglePeriodLow and TrianglePeriodHigh. |
LB9A4: LDA TrianglePeriodHigh ; | LB9A4: LDA TrianglePeriodHigh ; |
LB9A7: PHA ; | LB9A7: PHA ; |
LB9A8: LDA #$00 ; | LB9A8: LDA #$00 ; |
LB9AA: STA DivideData ; | LB9AA: STA DivideData ; |
LB9AD: LDX #$10 ; | LB9AD: LDX #$10 ; |
LB9AF: ROL TrianglePeriodLow ; | LB9AF: ROL TrianglePeriodLow ; |
LB9B2: ROL TrianglePeriodHigh ; | LB9B2: ROL TrianglePeriodHigh ; |
LB9B5:* ROL DivideData ;The following routine takes the triangle period--> | LB9B5:* ROL DivideData ;The following routine takes the triangle period--> |
LB9B8: LDA DivideData ;high and triangle period low values and reduces--> | LB9B8: LDA DivideData ;high and triangle period low values and reduces--> |
LB9BB: CMP PercentDifference ;them by a certain percent. The percent is--> | LB9BB: CMP PercentDifference ;them by a certain percent. The percent is--> |
LB9BE: BCC + ;determined by the value stored in--> | LB9BE: BCC + ;determined by the value stored in--> |
LB9C0: SBC PercentDifference ;PercentDifference. If PercentDifference=#$05,--> | LB9C0: SBC PercentDifference ;PercentDifference. If PercentDifference=#$05,--> |
LB9C3: STA DivideData ;then the values will be reduced by 20%(1/5).--> | LB9C3: STA DivideData ;then the values will be reduced by 20%(1/5).--> |
LB9C6:* ROL TrianglePeriodLow ;If PercentDifference=#$0A,Then the value will--> | LB9C6:* ROL TrianglePeriodLow ;If PercentDifference=#$0A,Then the value will--> |
LB9C9: ROL TrianglePeriodHigh ;be reduced by 10%(1/10), etc. This function is--> | LB9C9: ROL TrianglePeriodHigh ;be reduced by 10%(1/10), etc. This function is--> |
LB9CC: DEX ;basically a software emulation of a sweep function. | LB9CC: DEX ;basically a software emulation of a sweep function. |
LB9CD: BNE -- ; | LB9CD: BNE -- ; |
LB9CF: LDA TrianglePeriodLow ; | LB9CF: LDA TrianglePeriodLow ; |
LB9D2: STA TriangleLowPercentage ; | LB9D2: STA TriangleLowPercentage ; |
LB9D5: LDA TrianglePeriodHigh ; | LB9D5: LDA TrianglePeriodHigh ; |
LB9D8: STA TriangleHighPercentage ; | LB9D8: STA TriangleHighPercentage ; |
LB9DB: PLA ; | LB9DB: PLA ; |
LB9DC: STA TrianglePeriodHigh ;Restore TrianglePerodLow and TrianglePeriodHigh. | LB9DC: STA TrianglePeriodHigh ;Restore TrianglePerodLow and TrianglePeriodHigh. |
LB9DF: PLA ; | LB9DF: PLA ; |
LB9E0: STA TrianglePeriodLow ; | LB9E0: STA TrianglePeriodLow ; |
LB9E3: RTS ; | LB9E3: RTS ; |
| |
;--------------------------------------[ End SFX routines ]------------------------------------- | ;--------------------------------------[ End SFX routines ]------------------------------------- |
| |
SetVolumeAndDisableSweep: | SetVolumeAndDisableSweep: |
LB9E4: LDA #$7F ; | LB9E4: LDA #$7F ; |
LB9E6: STA MusicSQ1Sweep ;Disable sweep generator on SQ1 and SQ2. | LB9E6: STA MusicSQ1Sweep ;Disable sweep generator on SQ1 and SQ2. |
LB9E9: STA MusicSQ2Sweep ; | LB9E9: STA MusicSQ2Sweep ; |
LB9EC: STX SQ1DutyEnvelope ;Store duty cycle and volume data for SQ1 and SQ2. | LB9EC: STX SQ1DutyEnvelope ;Store duty cycle and volume data for SQ1 and SQ2. |
LB9EF: STY SQ2DutyEnvelope ; | LB9EF: STY SQ2DutyEnvelope ; |
LB9F2: RTS ; | LB9F2: RTS ; |
| |
ResetVolumeIndex: | ResetVolumeIndex: |
LB9F3: LDA SQ1MusicFrameCount ;If at the beginning of a new SQ1 note, set--> | LB9F3: LDA SQ1MusicFrameCount ;If at the beginning of a new SQ1 note, set--> |
LB9F6: CMP #$01 ;SQ1VolumeIndex = #$01. | LB9F6: CMP #$01 ;SQ1VolumeIndex = #$01. |
LB9F8: BNE + ; | LB9F8: BNE + ; |
LB9FA: STA SQ1VolumeIndex ; | LB9FA: STA SQ1VolumeIndex ; |
LB9FD:* LDA SQ2MusicFrameCount ; | LB9FD:* LDA SQ2MusicFrameCount ; |
LBA00: CMP #$01 ;If at the beginning of a new SQ2 note, set--> | LBA00: CMP #$01 ;If at the beginning of a new SQ2 note, set--> |
LBA02: BNE + ;SQ2VolumeIndex = #$01. | LBA02: BNE + ;SQ2VolumeIndex = #$01. |
LBA04: STA SQ2VolumeIndex ; | LBA04: STA SQ2VolumeIndex ; |
LBA07:* RTS ; | LBA07:* RTS ; |
| |
LoadSQ1SQ2Periods: | LoadSQ1SQ2Periods: |
LBA08: LDA WriteMultiChannelData ;If a Multi channel data does not need to be--> | LBA08: LDA WriteMultiChannelData ;If a Multi channel data does not need to be--> |
LBA0B: BEQ + ;loaded, branch to exit. | LBA0B: BEQ + ;loaded, branch to exit. |
LBA0D: LDA #$00 ; | LBA0D: LDA #$00 ; |
LBA0F: STA WriteMultiChannelData ;Clear multi channel data write flag. | LBA0F: STA WriteMultiChannelData ;Clear multi channel data write flag. |
LBA12: LDA MusicSQ1Sweep ; | LBA12: LDA MusicSQ1Sweep ; |
LBA15: STA SQ1Cntrl1 ; | LBA15: STA SQ1Cntrl1 ; |
LBA18: LDA MusicSQ1PeriodLow ; | LBA18: LDA MusicSQ1PeriodLow ; |
LBA1B: STA SQ1Cntrl2 ;Loads SQ1 channel addresses $4001, $4002, $4003. | LBA1B: STA SQ1Cntrl2 ;Loads SQ1 channel addresses $4001, $4002, $4003. |
LBA1E: LDA MusicSQ1PeriodHigh ; | LBA1E: LDA MusicSQ1PeriodHigh ; |
LBA21: STA SQ1Cntrl3 ; | LBA21: STA SQ1Cntrl3 ; |
LBA24: LDA MusicSQ2Sweep ; | LBA24: LDA MusicSQ2Sweep ; |
LBA27: STA SQ2Cntrl1 ; | LBA27: STA SQ2Cntrl1 ; |
LBA2A: LDA MusicSQ2PeriodLow ; | LBA2A: LDA MusicSQ2PeriodLow ; |
LBA2D: STA SQ2Cntrl2 ;Loads SQ2 channel addresses $4005, $4006, $4007. | LBA2D: STA SQ2Cntrl2 ;Loads SQ2 channel addresses $4005, $4006, $4007. |
LBA30: LDA MusicSQ2PeriodHigh ; | LBA30: LDA MusicSQ2PeriodHigh ; |
LBA33: STA SQ2Cntrl3 ; | LBA33: STA SQ2Cntrl3 ; |
LBA36:* RTS ; | LBA36:* RTS ; |
| |
LoadSQ1SQ2Channels: | LoadSQ1SQ2Channels: |
LBA37: LDX #$00 ;Load SQ1 channel data. | LBA37: LDX #$00 ;Load SQ1 channel data. |
LBA39: JSR WriteSQCntrl0 ;($BA41)Write Cntrl0 data. | LBA39: JSR WriteSQCntrl0 ;($BA41)Write Cntrl0 data. |
LBA3C: INX ;Load SQ2 channel data. | LBA3C: INX ;Load SQ2 channel data. |
LBA3D: JSR WriteSQCntrl0 ;($BA41)Write Cntrl0 data. | LBA3D: JSR WriteSQCntrl0 ;($BA41)Write Cntrl0 data. |
LBA40: RTS ; | LBA40: RTS ; |
| |
WriteSQCntrl0: | WriteSQCntrl0: |
LBA41: LDA SQ1VolumeCntrl,X ;Load SQ channel volume data. If zero, branch to exit. | LBA41: LDA SQ1VolumeCntrl,X ;Load SQ channel volume data. If zero, branch to exit. |
LBA44: BEQ +++++ ; | LBA44: BEQ +++++ ; |
LBA46: STA VolumeCntrlAddress ; | LBA46: STA VolumeCntrlAddress ; |
LBA48: JSR LoadSQ1SQ2Periods ;($BA08)Load SQ1 and SQ2 control information. | LBA48: JSR LoadSQ1SQ2Periods ;($BA08)Load SQ1 and SQ2 control information. |
LBA4B: LDA SQ1VolumeData,X ; | LBA4B: LDA SQ1VolumeData,X ; |
LBA4E: CMP #$10 ;If sound channel is not currently--> | LBA4E: CMP #$10 ;If sound channel is not currently--> |
LBA50: BEQ +++++++ ;playing sound, branch. | LBA50: BEQ +++++++ ;playing sound, branch. |
LBA52: LDY #$00 ; | LBA52: LDY #$00 ; |
LBA54:* DEC VolumeCntrlAddress ;Desired entry in VolumeCntrlAdressTbl. | LBA54:* DEC VolumeCntrlAddress ;Desired entry in VolumeCntrlAdressTbl. |
LBA56: BEQ + ; | LBA56: BEQ + ; |
LBA58: INY ;*2(2 byte address to find voulume control data). | LBA58: INY ;*2(2 byte address to find voulume control data). |
LBA59: INY ; | LBA59: INY ; |
LBA5A: BNE - ;Keep decrementing until desired address is found. | LBA5A: BNE - ;Keep decrementing until desired address is found. |
LBA5C:* LDA VolumeCntrlAddressTbl,Y ;Base is $BCB0. | LBA5C:* LDA VolumeCntrlAddressTbl,Y ;Base is $BCB0. |
LBA5F: STA $EC ;Volume data address low byte. | LBA5F: STA $EC ;Volume data address low byte. |
LBA61: LDA VolumeCntrlAddressTbl+1,Y ;Base is $BCB1. | LBA61: LDA VolumeCntrlAddressTbl+1,Y ;Base is $BCB1. |
LBA64: STA $ED ;Volume data address high byte. | LBA64: STA $ED ;Volume data address high byte. |
LBA66: LDY SQ1VolumeIndex,X ;Index to desired volume data. | LBA66: LDY SQ1VolumeIndex,X ;Index to desired volume data. |
LBA69: LDA ($EC),Y ;Load desired volume for current channel into--> | LBA69: LDA ($EC),Y ;Load desired volume for current channel into--> |
LBA6B: STA Cntrl0Data ;Cntrl0Data. | LBA6B: STA Cntrl0Data ;Cntrl0Data. |
LBA6D: CMP #$FF ;If last entry in volume table is #$FF, restore--> | LBA6D: CMP #$FF ;If last entry in volume table is #$FF, restore--> |
LBA6F: BEQ MusicBranch05 ;volume to its original level after done reading--> | LBA6F: BEQ MusicBranch05 ;volume to its original level after done reading--> |
LBA71: CMP #$F0 ;Volume data. If #$F0 is last entry, turn sound--> | LBA71: CMP #$F0 ;Volume data. If #$F0 is last entry, turn sound--> |
LBA73: BEQ MusicBranch06 ;off on current channel until next note. | LBA73: BEQ MusicBranch06 ;off on current channel until next note. |
LBA75: LDA SQ1DutyEnvelope,X ;Remove duty cycle data For current channel and--> | LBA75: LDA SQ1DutyEnvelope,X ;Remove duty cycle data For current channel and--> |
LBA78: AND #$F0 ;add this frame of volume data and store results--> | LBA78: AND #$F0 ;add this frame of volume data and store results--> |
LBA7A: ORA Cntrl0Data ;in Cntrl0Data. | LBA7A: ORA Cntrl0Data ;in Cntrl0Data. |
LBA7C: TAY ; | LBA7C: TAY ; |
LBA7D:* INC SQ1VolumeIndex,X ;Increment Index to volume data. | LBA7D:* INC SQ1VolumeIndex,X ;Increment Index to volume data. |
LBA80:* LDA SQ1InUse,X ;If SQ1 or SQ2(depends on loop iteration) in use,--> | LBA80:* LDA SQ1InUse,X ;If SQ1 or SQ2(depends on loop iteration) in use,--> |
LBA83: BNE + ;branch to exit, else write SQ(1 or 2)Cntrl0. | LBA83: BNE + ;branch to exit, else write SQ(1 or 2)Cntrl0. |
LBA85: TXA ; | LBA85: TXA ; |
LBA86: BEQ ++ ;If currently on SQ1, branch to write SQ1 data. | LBA86: BEQ ++ ;If currently on SQ1, branch to write SQ1 data. |
| |
WriteSQ2Cntrl0: ; | WriteSQ2Cntrl0: ; |
LBA88: STY SQ2Cntrl0 ;Write SQ2Cntrl0 data. | LBA88: STY SQ2Cntrl0 ;Write SQ2Cntrl0 data. |
LBA8B:* RTS ; | LBA8B:* RTS ; |
| |
WriteSQ1Cntrl0: ; | WriteSQ1Cntrl0: ; |
LBA8C:* STY SQ1Cntrl0 ;Write SQ1Cntrl0 data. | LBA8C:* STY SQ1Cntrl0 ;Write SQ1Cntrl0 data. |
LBA8F: RTS ; | LBA8F: RTS ; |
| |
MusicBranch05: | MusicBranch05: |
LBA90: LDY SQ1DutyEnvelope,X ;Restore original volume of sound channel. | LBA90: LDY SQ1DutyEnvelope,X ;Restore original volume of sound channel. |
LBA93: BNE --- ;Branch always. | LBA93: BNE --- ;Branch always. |
| |
MusicBranch06: | MusicBranch06: |
LBA95: LDY #$10 ;Disable envelope generator and set volume to 0. | LBA95: LDY #$10 ;Disable envelope generator and set volume to 0. |
LBA97: BNE --- ;Branch always. | LBA97: BNE --- ;Branch always. |
LBA99:* LDY #$10 ;Disable envelope generator and set volume to 0. | LBA99:* LDY #$10 ;Disable envelope generator and set volume to 0. |
LBA9B: BNE ----- ;Branch always. | LBA9B: BNE ----- ;Branch always. |
| |
GotoCheckRepeatMusic: | GotoCheckRepeatMusic: |
LBA9D:* JSR CheckRepeatMusic ;($B3F0)Resets music flags if music repeats. | LBA9D:* JSR CheckRepeatMusic ;($B3F0)Resets music flags if music repeats. |
LBAA0: RTS ; | LBAA0: RTS ; |
| |
GotoLoadSQ1SQ2Channels: | GotoLoadSQ1SQ2Channels: |
LBAA1:* JSR LoadSQ1SQ2Channels ;($BA37)Load SQ1 and SQ2 channel data. | LBAA1:* JSR LoadSQ1SQ2Channels ;($BA37)Load SQ1 and SQ2 channel data. |
LBAA4: RTS ; | LBAA4: RTS ; |
| |
LoadCurrentMusicFrameData: | LoadCurrentMusicFrameData: |
LBAA5: JSR ResetVolumeIndex ;($B9F3)Reset index if at the beginning of a new note. | LBAA5: JSR ResetVolumeIndex ;($B9F3)Reset index if at the beginning of a new note. |
LBAA8: LDA #$00 ; | LBAA8: LDA #$00 ; |
LBAAA: TAX ;X = #$00. | LBAAA: TAX ;X = #$00. |
LBAAB: STA ThisSoundChannel ;(#$00, #$04, #$08 or #$0C). | LBAAB: STA ThisSoundChannel ;(#$00, #$04, #$08 or #$0C). |
LBAAE: BEQ ++ ; | LBAAE: BEQ ++ ; |
LBAB0:* TXA ; | LBAB0:* TXA ; |
LBAB1: LSR ; | LBAB1: LSR ; |
LBAB2: TAX ;Increment to next sound channel(1,2 or 3). | LBAB2: TAX ;Increment to next sound channel(1,2 or 3). |
; | ; |
IncrementToNextChannel: ; | IncrementToNextChannel: ; |
LBAB3: INX ; | LBAB3: INX ; |
LBAB4: TXA ; | LBAB4: TXA ; |
LBAB5: CMP #$04 ;If done with four sound channels, branch to load--> | LBAB5: CMP #$04 ;If done with four sound channels, branch to load--> |
LBAB7: BEQ -- ;sound channel SQ1 SQ2 data. | LBAB7: BEQ -- ;sound channel SQ1 SQ2 data. |
LBAB9: LDA ThisSoundChannel ;Add 4 to the least significant byte of the current--> | LBAB9: LDA ThisSoundChannel ;Add 4 to the least significant byte of the current--> |
LBABC: CLC ;sound channel start address. This moves to next--> | LBABC: CLC ;sound channel start address. This moves to next--> |
LBABD: ADC #$04 ;sound channel address ranges to process. | LBABD: ADC #$04 ;sound channel address ranges to process. |
LBABF: STA ThisSoundChannel ; | LBABF: STA ThisSoundChannel ; |
LBAC2:* TXA ; | LBAC2:* TXA ; |
LBAC3: ASL ;*2(two bytes for sound channel info base address). | LBAC3: ASL ;*2(two bytes for sound channel info base address). |
LBAC4: TAX ; | LBAC4: TAX ; |
LBAC5: LDA SQ1LowBaseByte,X ; | LBAC5: LDA SQ1LowBaseByte,X ; |
LBAC8: STA $E6 ;Load sound channel info base address into $E6--> | LBAC8: STA $E6 ;Load sound channel info base address into $E6--> |
LBACA: LDA SQ1HighBaseByte,X ;and $E7. ($E6=low byte, $E7=high byte). | LBACA: LDA SQ1HighBaseByte,X ;and $E7. ($E6=low byte, $E7=high byte). |
LBACD: STA $E7 ; | LBACD: STA $E7 ; |
LBACF: LDA SQ1HighBaseByte,X ;If no data for this sound channel, branch--> | LBACF: LDA SQ1HighBaseByte,X ;If no data for this sound channel, branch--> |
LBAD2: BEQ -- ;to find data for next sound channel. | LBAD2: BEQ -- ;to find data for next sound channel. |
LBAD4: TXA ; | LBAD4: TXA ; |
LBAD5: LSR ;/2. Determine current sound channel (0,1,2 or3). | LBAD5: LSR ;/2. Determine current sound channel (0,1,2 or3). |
LBAD6: TAX ; | LBAD6: TAX ; |
LBAD7: DEC SQ1MusicFrameCount,X ;Decrement the current sound channel frame count--> | LBAD7: DEC SQ1MusicFrameCount,X ;Decrement the current sound channel frame count--> |
LBADA: BNE IncrementToNextChannel ;If not zero, branch to check next channel, else--> | LBADA: BNE IncrementToNextChannel ;If not zero, branch to check next channel, else--> |
;load the next set of sound channel data. | ;load the next set of sound channel data. |
LoadNextChannelIndexData: | LoadNextChannelIndexData: |
LBADC: LDY SQ1MusicIndexIndex,X ;Load current channel index to music data index. | LBADC: LDY SQ1MusicIndexIndex,X ;Load current channel index to music data index. |
LBADF: INC SQ1MusicIndexIndex,X ;Increment current channel index to music data index. | LBADF: INC SQ1MusicIndexIndex,X ;Increment current channel index to music data index. |
LBAE2: LDA ($E6),Y ; | LBAE2: LDA ($E6),Y ; |
LBAE4: BEQ ---- ;Branch if music has reached the end. | LBAE4: BEQ ---- ;Branch if music has reached the end. |
LBAE6: TAY ;Transfer music data index to Y (base=$BE77) . | LBAE6: TAY ;Transfer music data index to Y (base=$BE77) . |
LBAE7: CMP #$FF ; | LBAE7: CMP #$FF ; |
LBAE9: BEQ + ;At end of loop? If yes, branch. | LBAE9: BEQ + ;At end of loop? If yes, branch. |
LBAEB: AND #$C0 ; | LBAEB: AND #$C0 ; |
LBAED: CMP #$C0 ;At beginnig of new loop? if yes, branch. | LBAED: CMP #$C0 ;At beginnig of new loop? if yes, branch. |
LBAEF: BEQ ++ ; | LBAEF: BEQ ++ ; |
LBAF1: JMP LoadMusicChannel ;($BB1C)Load music data into channel. | LBAF1: JMP LoadMusicChannel ;($BB1C)Load music data into channel. |
| |
RepeatMusicLoop: | RepeatMusicLoop: |
LBAF4:* LDA SQ1RepeatCounter,X ;If loop counter has reached zero, branch to exit. | LBAF4:* LDA SQ1RepeatCounter,X ;If loop counter has reached zero, branch to exit. |
LBAF7: BEQ ++ ; | LBAF7: BEQ ++ ; |
LBAF9: DEC SQ1RepeatCounter,X ;Decrement loop counter. | LBAF9: DEC SQ1RepeatCounter,X ;Decrement loop counter. |
LBAFC: LDA SQ1LoopIndex,X ;Load loop index for proper channel and store it in--> | LBAFC: LDA SQ1LoopIndex,X ;Load loop index for proper channel and store it in--> |
LBAFF: STA SQ1MusicIndexIndex,X ;music index index address. | LBAFF: STA SQ1MusicIndexIndex,X ;music index index address. |
LBB02: BNE ++ ;Branch unless music has reached the end. | LBB02: BNE ++ ;Branch unless music has reached the end. |
| |
StartNewMusicLoop: | StartNewMusicLoop: |
LBB04:* TYA ; | LBB04:* TYA ; |
LBB05: AND #$3F ;Remove last six bits of loop controller and save--> | LBB05: AND #$3F ;Remove last six bits of loop controller and save--> |
LBB07: STA SQ1RepeatCounter,X ;in repeat counter addresses. # of times to loop. | LBB07: STA SQ1RepeatCounter,X ;in repeat counter addresses. # of times to loop. |
LBB0A: DEC SQ1RepeatCounter,X ;Decrement loop counter. | LBB0A: DEC SQ1RepeatCounter,X ;Decrement loop counter. |
LBB0D: LDA SQ1MusicIndexIndex,X ;Store location of loop start in loop index address. | LBB0D: LDA SQ1MusicIndexIndex,X ;Store location of loop start in loop index address. |
LBB10: STA SQ1LoopIndex,X ; | LBB10: STA SQ1LoopIndex,X ; |
LBB13:* JMP LoadNextChannelIndexData ;($BADC)Load next channel index data. | LBB13:* JMP LoadNextChannelIndexData ;($BADC)Load next channel index data. |
| |
LBB16:* JMP LoadNoiseChannelMusic ;($BBDE)Load data for noise channel music. | LBB16:* JMP LoadNoiseChannelMusic ;($BBDE)Load data for noise channel music. |
| |
LBB19:* JMP LoadTriangleCntrl0 ;($BBB7)Load Cntrl0 byte of triangle channel. | LBB19:* JMP LoadTriangleCntrl0 ;($BBB7)Load Cntrl0 byte of triangle channel. |
| |
LoadMusicChannel: | LoadMusicChannel: |
LBB1C: TYA ; | LBB1C: TYA ; |
LBB1D: AND #$B0 ; | LBB1D: AND #$B0 ; |
LBB1F: CMP #$B0 ;Is data byte music note length data? If not, branch. | LBB1F: CMP #$B0 ;Is data byte music note length data? If not, branch. |
LBB21: BNE + ; | LBB21: BNE + ; |
LBB23: TYA ; | LBB23: TYA ; |
LBB24: AND #$0F ;Separate note length data. | LBB24: AND #$0F ;Separate note length data. |
LBB26: CLC ; | LBB26: CLC ; |
LBB27: ADC NoteLengthTblOffset ;Find proper note lengths table for current music. | LBB27: ADC NoteLengthTblOffset ;Find proper note lengths table for current music. |
LBB2A: TAY ; | LBB2A: TAY ; |
LBB2B: LDA NoteLengths0Tbl,Y ;(Base is $BEF7)Load note length and store in--> | LBB2B: LDA NoteLengths0Tbl,Y ;(Base is $BEF7)Load note length and store in--> |
LBB2E: STA SQ1FrameCountInit,X ;frame count init address. | LBB2E: STA SQ1FrameCountInit,X ;frame count init address. |
LBB31: TAY ;Y now contains note length. | LBB31: TAY ;Y now contains note length. |
LBB32: TXA ; | LBB32: TXA ; |
LBB33: CMP #$02 ;If loading Triangle channel data, branch. | LBB33: CMP #$02 ;If loading Triangle channel data, branch. |
LBB35: BEQ - ; | LBB35: BEQ - ; |
| |
LoadSoundDataIndexIndex: | LoadSoundDataIndexIndex: |
LBB37: LDY SQ1MusicIndexIndex,X ;Load current index to sound data index. | LBB37: LDY SQ1MusicIndexIndex,X ;Load current index to sound data index. |
LBB3A: INC SQ1MusicIndexIndex,X ;Increment music index index address. | LBB3A: INC SQ1MusicIndexIndex,X ;Increment music index index address. |
LBB3D: LDA ($E6),Y ;Load index to sound channel music data. | LBB3D: LDA ($E6),Y ;Load index to sound channel music data. |
LBB3F: TAY ; | LBB3F: TAY ; |
LBB40:* TXA ; | LBB40:* TXA ; |
LBB41: CMP #$03 ;If loading Noise channel data, branch. | LBB41: CMP #$03 ;If loading Noise channel data, branch. |
LBB43: BEQ --- ; | LBB43: BEQ --- ; |
LBB45: PHA ;Push music channel number on stack(0, 1 or 2). | LBB45: PHA ;Push music channel number on stack(0, 1 or 2). |
LBB46: LDX ThisSoundChannel ; | LBB46: LDX ThisSoundChannel ; |
LBB49: LDA MusicNotesTbl+1,Y ;(Base=$BE78)Load A with music channel period low data. | LBB49: LDA MusicNotesTbl+1,Y ;(Base=$BE78)Load A with music channel period low data. |
LBB4C: BEQ + ;If data is #$00, skip period high and low loading. | LBB4C: BEQ + ;If data is #$00, skip period high and low loading. |
LBB4E: STA MusicSQ1PeriodLow,X ;Store period low data in proper period low address. | LBB4E: STA MusicSQ1PeriodLow,X ;Store period low data in proper period low address. |
LBB51: LDA MusicNotesTbl,Y ;(Base=$BE77)Load A with music channel period high data. | LBB51: LDA MusicNotesTbl,Y ;(Base=$BE77)Load A with music channel period high data. |
LBB54: ORA #$08 ;Ensure minimum index length of 1. | LBB54: ORA #$08 ;Ensure minimum index length of 1. |
LBB56: STA MusicSQ1PeriodHigh,X ;Store period high data in proper period high address. | LBB56: STA MusicSQ1PeriodHigh,X ;Store period high data in proper period high address. |
LBB59:* TAY ; | LBB59:* TAY ; |
LBB5A: PLA ;Pull stack and restore channel number to X. | LBB5A: PLA ;Pull stack and restore channel number to X. |
LBB5B: TAX ; | LBB5B: TAX ; |
LBB5C: TYA ; | LBB5C: TYA ; |
LBB5D: BNE + ;If period information was present, branch. | LBB5D: BNE + ;If period information was present, branch. |
| |
NoPeriodInformation: | NoPeriodInformation: |
LBB5F: LDA #$00 ;Turn off channel volume since no period data present. | LBB5F: LDA #$00 ;Turn off channel volume since no period data present. |
LBB61: STA Cntrl0Data ; | LBB61: STA Cntrl0Data ; |
LBB63: TXA ; | LBB63: TXA ; |
LBB64: CMP #$02 ;If loading triangle channel data, branch. | LBB64: CMP #$02 ;If loading triangle channel data, branch. |
LBB66: BEQ ++ ; | LBB66: BEQ ++ ; |
LBB68: LDA #$10 ;Turn off volume and disable env. generator(SQ1,SQ2). | LBB68: LDA #$10 ;Turn off volume and disable env. generator(SQ1,SQ2). |
LBB6A: STA Cntrl0Data ; | LBB6A: STA Cntrl0Data ; |
LBB6C: BNE ++ ;Branch always. | LBB6C: BNE ++ ;Branch always. |
| |
PeriodInformationFound: | PeriodInformationFound: |
LBB6E:* LDA SQ1DutyEnvelope,X ;Store channel duty cycle and volume info in $EA. | LBB6E:* LDA SQ1DutyEnvelope,X ;Store channel duty cycle and volume info in $EA. |
LBB71: STA Cntrl0Data ; | LBB71: STA Cntrl0Data ; |
LBB73:* TXA ; | LBB73:* TXA ; |
LBB74: DEC SQ1InUse,X ; | LBB74: DEC SQ1InUse,X ; |
LBB77: CMP SQ1InUse,X ;If SQ1 or SQ2 are being used by SFX routines, branch. | LBB77: CMP SQ1InUse,X ;If SQ1 or SQ2 are being used by SFX routines, branch. |
LBB7A: BEQ +++ ; | LBB7A: BEQ +++ ; |
LBB7C: INC SQ1InUse,X ;Restore not in use status of SQ1 or SQ2. | LBB7C: INC SQ1InUse,X ;Restore not in use status of SQ1 or SQ2. |
LBB7F: LDY ThisSoundChannel ; | LBB7F: LDY ThisSoundChannel ; |
LBB82: TXA ; | LBB82: TXA ; |
LBB83: CMP #$02 ;If loading triangle channel data, branch. | LBB83: CMP #$02 ;If loading triangle channel data, branch. |
LBB85: BEQ + ; | LBB85: BEQ + ; |
LBB87: LDA SQ1VolumeCntrl,X ;If $062E or $062F has volume data, skip writing--> | LBB87: LDA SQ1VolumeCntrl,X ;If $062E or $062F has volume data, skip writing--> |
LBB8A: BNE ++ ;Cntrl0Data to SQ1 or SQ2. | LBB8A: BNE ++ ;Cntrl0Data to SQ1 or SQ2. |
LBB8C:* LDA Cntrl0Data ; | LBB8C:* LDA Cntrl0Data ; |
LBB8E: STA SQ1Cntrl0,Y ;Write Cntrl0Data. | LBB8E: STA SQ1Cntrl0,Y ;Write Cntrl0Data. |
LBB91:* LDA Cntrl0Data ; | LBB91:* LDA Cntrl0Data ; |
LBB93: STA SQ1VolumeData,X ;Store volume data index to volume data. | LBB93: STA SQ1VolumeData,X ;Store volume data index to volume data. |
LBB96: LDA MusicSQ1PeriodLow,Y ; | LBB96: LDA MusicSQ1PeriodLow,Y ; |
LBB99: STA SQ1Cntrl2,Y ; | LBB99: STA SQ1Cntrl2,Y ; |
LBB9C: LDA MusicSQ1PeriodHigh,Y ;Write data to three sound channel addresses. | LBB9C: LDA MusicSQ1PeriodHigh,Y ;Write data to three sound channel addresses. |
LBB9F: STA SQ1Cntrl3,Y ; | LBB9F: STA SQ1Cntrl3,Y ; |
LBBA2: LDA MusicSQ1Sweep,X ; | LBBA2: LDA MusicSQ1Sweep,X ; |
LBBA5: STA SQ1Cntrl1,Y ; | LBBA5: STA SQ1Cntrl1,Y ; |
| |
LoadNewMusicFrameCount: | LoadNewMusicFrameCount: |
LBBA8: LDA SQ1FrameCountInit,X ;Load new music frame count and store it in music--> | LBBA8: LDA SQ1FrameCountInit,X ;Load new music frame count and store it in music--> |
LBBAB: STA SQ1MusicFrameCount,X ;frame count address. | LBBAB: STA SQ1MusicFrameCount,X ;frame count address. |
LBBAE: JMP IncrementToNextChannel ;($BAB3)Move to next sound channel. | LBBAE: JMP IncrementToNextChannel ;($BAB3)Move to next sound channel. |
| |
SQ1SQ2InUse: | SQ1SQ2InUse: |
LBBB1:* INC SQ1InUse,X ;Restore in use status of SQ1 or SQ1. | LBBB1:* INC SQ1InUse,X ;Restore in use status of SQ1 or SQ1. |
LBBB4: JMP LoadNewMusicFrameCount ;($BBA8)Load new music frame count. | LBBB4: JMP LoadNewMusicFrameCount ;($BBA8)Load new music frame count. |
| |
LoadTriangleCntrl0: | LoadTriangleCntrl0: |
LBBB7: LDA TriangleCounterCntrl ; | LBBB7: LDA TriangleCounterCntrl ; |
LBBBA: AND #$0F ;If lower bits set, branch to play shorter note. | LBBBA: AND #$0F ;If lower bits set, branch to play shorter note. |
LBBBC: BNE ++ ; | LBBBC: BNE ++ ; |
LBBBE: LDA TriangleCounterCntrl ; | LBBBE: LDA TriangleCounterCntrl ; |
LBBC1: AND #$F0 ;If upper bits are set, branch to play longer note. | LBBC1: AND #$F0 ;If upper bits are set, branch to play longer note. |
LBBC3: BNE + ; | LBBC3: BNE + ; |
LBBC5: TYA ; | LBBC5: TYA ; |
LBBC6: JMP AddTriangleLength ;($BBCD)Calculate length to play note. | LBBC6: JMP AddTriangleLength ;($BBCD)Calculate length to play note. |
LBBC9:* LDA #$FF ;Disable length cntr(play until triangle data changes). | LBBC9:* LDA #$FF ;Disable length cntr(play until triangle data changes). |
LBBCB: BNE + ;Branch always. | LBBCB: BNE + ;Branch always. |
| |
AddTriangleLength: | AddTriangleLength: |
LBBCD: CLC ; | LBBCD: CLC ; |
LBBCE: ADC #$FF ;Add #$FF(Effectively subtracts 1 from A). | LBBCE: ADC #$FF ;Add #$FF(Effectively subtracts 1 from A). |
LBBD0: ASL ;*2. | LBBD0: ASL ;*2. |
LBBD1: ASL ;*2. | LBBD1: ASL ;*2. |
LBBD2: CMP #$3C ; | LBBD2: CMP #$3C ; |
LBBD4: BCC + ;If result is greater than #$3C, store #$3C(highest--> | LBBD4: BCC + ;If result is greater than #$3C, store #$3C(highest--> |
LBBD6: LDA #$3C ;triangle linear count allowed). | LBBD6: LDA #$3C ;triangle linear count allowed). |
LBBD8:* STA TriLinearCount ; | LBBD8:* STA TriLinearCount ; |
LBBDB:* JMP LoadSoundDataIndexIndex ;($BB37)Load index to sound data index. | LBBDB:* JMP LoadSoundDataIndexIndex ;($BB37)Load index to sound data index. |
| |
LoadNoiseChannelMusic: | LoadNoiseChannelMusic: |
LBBDE: LDA NoiseContSFX ; | LBBDE: LDA NoiseContSFX ; |
LBBE1: AND #$FC ;If playing any Noise SFX, branch to exit. | LBBE1: AND #$FC ;If playing any Noise SFX, branch to exit. |
LBBE3: BNE + ; | LBBE3: BNE + ; |
LBBE5: LDA $B200,Y ; | LBBE5: LDA $B200,Y ; |
LBBE8: STA NoiseCntrl0 ;Load noise channel with drum beat SFX starting--> | LBBE8: STA NoiseCntrl0 ;Load noise channel with drum beat SFX starting--> |
LBBEB: LDA $B201,Y ;at address B201. The possible values of Y are--> | LBBEB: LDA $B201,Y ;at address B201. The possible values of Y are--> |
LBBEE: STA NoiseCntrl2 ;#$01, #$04, #$07 or #$0A. | LBBEE: STA NoiseCntrl2 ;#$01, #$04, #$07 or #$0A. |
LBBF1: LDA $B202,Y ; | LBBF1: LDA $B202,Y ; |
LBBF4: STA NoiseCntrl3 ; | LBBF4: STA NoiseCntrl3 ; |
LBBF7:* JMP LoadNewMusicFrameCount ;($BBA8)Load new music frame count. | LBBF7:* JMP LoadNewMusicFrameCount ;($BBA8)Load new music frame count. |
| |
;The following table is used by the InitializeMusic routine to find the index for loading | ;The following table is used by the InitializeMusic routine to find the index for loading |
| |
InitMusicIndexTbl: | InitMusicIndexTbl: |
LBBFA: .byte $41 ;Ridley area music. | LBBFA: .byte $41 ;Ridley area music. |
LBBFB: .byte $8F ;Tourian music. | LBBFB: .byte $8F ;Tourian music. |
LBBFC: .byte $34 ;Item room music. | LBBFC: .byte $34 ;Item room music. |
LBBFD: .byte $27 ;Kraid area music. | LBBFD: .byte $27 ;Kraid area music. |
LBBFE: .byte $1A ;Norfair music. | LBBFE: .byte $1A ;Norfair music. |
LBBFF: .byte $0D ;Escape music. | LBBFF: .byte $0D ;Escape music. |
LBC00: .byte $00 ;Mother brain music. | LBC00: .byte $00 ;Mother brain music. |
LBC01: .byte $82 ;Brinstar music. | LBC01: .byte $82 ;Brinstar music. |
LBC02: .byte $68 ;Fade in music. | LBC02: .byte $68 ;Fade in music. |
LBC03: .byte $75 ;Power up music. | LBC03: .byte $75 ;Power up music. |
LBC04: .byte $4E ;End music. | LBC04: .byte $4E ;End music. |
LBC05: .byte $5B ;Intro music. | LBC05: .byte $5B ;Intro music. |
| |
;The tables below contain addresses for SFX and music handling routines. | ;The tables below contain addresses for SFX and music handling routines. |
;Multi channel Init SFX and music handling routine addresses: | ;Multi channel Init SFX and music handling routine addresses: |
| |
LBC06: .word $BC80 ;Fade in music. | LBC06: .word $BC80 ;Fade in music. |
LBC08: .word $BC7A ;Power up music. | LBC08: .word $BC7A ;Power up music. |
LBC0A: .word $BC86 ;End game music. | LBC0A: .word $BC86 ;End game music. |
LBC0C: .word $BC7A ;Intro music. | LBC0C: .word $BC7A ;Intro music. |
LBC0E: .word $B4EE ;No sound. | LBC0E: .word $B4EE ;No sound. |
LBC10: .word $B673 ;Samus hit init SFX. | LBC10: .word $B673 ;Samus hit init SFX. |
LBC12: .word $B5EC ;Boss hit init SFX. | LBC12: .word $B5EC ;Boss hit init SFX. |
LBC14: .word $B695 ;Incorrect password init SFX. | LBC14: .word $B695 ;Incorrect password init SFX. |
| |
;Multi channel continue SFX handling routine addresses: | ;Multi channel continue SFX handling routine addresses: |
| |
LBC16: .word $B4EE ;No sound. | LBC16: .word $B4EE ;No sound. |
LBC18: .word $B4EE ;No sound. | LBC18: .word $B4EE ;No sound. |
LBC1A: .word $B4EE ;No sound. | LBC1A: .word $B4EE ;No sound. |
LBC1C: .word $B4EE ;No sound. | LBC1C: .word $B4EE ;No sound. |
LBC1E: .word $B4EE ;No sound. | LBC1E: .word $B4EE ;No sound. |
LBC20: .word $B650 ;Samus hit continue SFX. | LBC20: .word $B650 ;Samus hit continue SFX. |
LBC22: .word $B5F6 ;Boss hit continue SFX. | LBC22: .word $B5F6 ;Boss hit continue SFX. |
LBC24: .word $B6A1 ;Incorrect password continue SFX. | LBC24: .word $B6A1 ;Incorrect password continue SFX. |
| |
;Music handling routine addresses: | ;Music handling routine addresses: |
| |
LBC26: .word $BC83 ;Ridley area music. | LBC26: .word $BC83 ;Ridley area music. |
LBC28: .word $BC77 ;Tourian music. | LBC28: .word $BC77 ;Tourian music. |
LBC2A: .word $BC77 ;Item room music. | LBC2A: .word $BC77 ;Item room music. |
LBC2C: .word $BC77 ;Kraid area music. | LBC2C: .word $BC77 ;Kraid area music. |
LBC2E: .word $BC80 ;Norfair music. | LBC2E: .word $BC80 ;Norfair music. |
LBC30: .word $BC7D ;Escape music. | LBC30: .word $BC7D ;Escape music. |
LBC32: .word $BC77 ;Mother brain music. | LBC32: .word $BC77 ;Mother brain music. |
LBC34: .word $BC80 ;Brinstar music. | LBC34: .word $BC80 ;Brinstar music. |
| |
;-----------------------------------[ Entry point for music routines ]-------------------------------- | ;-----------------------------------[ Entry point for music routines ]-------------------------------- |
| |
LoadMusicTempFlags: | LoadMusicTempFlags: |
LBC36: LDA CurrentMusicRepeat ;Load A with temp music flags, (9th SFX cycle). | LBC36: LDA CurrentMusicRepeat ;Load A with temp music flags, (9th SFX cycle). |
LBC39: LDX #$B6 ;Lower address byte in ChooseNextSFXRoutineTbl. | LBC39: LDX #$B6 ;Lower address byte in ChooseNextSFXRoutineTbl. |
LBC3B: BNE + ;Branch always. | LBC3B: BNE + ;Branch always. |
| |
LoadMusicInitFlags: | LoadMusicInitFlags: |
LBC3D: LDA MusicInitFlag ;Load A with Music flags, (10th SFX cycle). | LBC3D: LDA MusicInitFlag ;Load A with Music flags, (10th SFX cycle). |
LBC40: LDX #$B1 ;Lower address byte in ChooseNextSFXRoutineTbl. | LBC40: LDX #$B1 ;Lower address byte in ChooseNextSFXRoutineTbl. |
LBC42:* JSR CheckSFXFlag ;($B4BD)Checks to see if SFX or music flags set. | LBC42:* JSR CheckSFXFlag ;($B4BD)Checks to see if SFX or music flags set. |
LBC45: JSR FindMusicInitIndex ;($BC53)Find bit containing music init flag. | LBC45: JSR FindMusicInitIndex ;($BC53)Find bit containing music init flag. |
LBC48: JMP ($00E2) ;If no flag found, Jump to next SFX cycle,--> | LBC48: JMP ($00E2) ;If no flag found, Jump to next SFX cycle,--> |
;else jump to specific SFX handling subroutine. | ;else jump to specific SFX handling subroutine. |
| |
ContinueMusic: ;11th and last SFX cycle. | ContinueMusic: ;11th and last SFX cycle. |
LBC4B: LDA CurrentMusic ; | LBC4B: LDA CurrentMusic ; |
LBC4E: BEQ +++ ;Branch to exit of no music playing. | LBC4E: BEQ +++ ;Branch to exit of no music playing. |
LBC50: JMP LoadCurrentMusicFrameData ;($BAA5)Load info for current frame of music data. | LBC50: JMP LoadCurrentMusicFrameData ;($BAA5)Load info for current frame of music data. |
| |
;MusicInitIndex values correspond to the following music: | ;MusicInitIndex values correspond to the following music: |
| |
FindMusicInitIndex: | FindMusicInitIndex: |
LBC53: LDA #$FF ;Load MusicInitIndex with #$FF. | LBC53: LDA #$FF ;Load MusicInitIndex with #$FF. |
LBC55: STA MusicInitIndex ; | LBC55: STA MusicInitIndex ; |
LBC58: LDA CurrentSFXFlags ; | LBC58: LDA CurrentSFXFlags ; |
LBC5B: BEQ ++ ;Branch to exit if no SFX flags set for Multi SFX. | LBC5B: BEQ ++ ;Branch to exit if no SFX flags set for Multi SFX. |
LBC5D:* INC MusicInitIndex ; | LBC5D:* INC MusicInitIndex ; |
LBC60: ASL ;Shift left until bit flag is in carry bit. | LBC60: ASL ;Shift left until bit flag is in carry bit. |
LBC61: BCC - ;Loop until SFX flag found. Store bit--> | LBC61: BCC - ;Loop until SFX flag found. Store bit--> |
LBC63:* RTS ;number of music in MusicInitIndex. | LBC63:* RTS ;number of music in MusicInitIndex. |
| |
;The following routine is used to add eight to the music index when looking for music flags | ;The following routine is used to add eight to the music index when looking for music flags |
;in the MultiSFX address. | ;in the MultiSFX address. |
Add8: | Add8: |
LBC64: LDA MusicInitIndex ; | LBC64: LDA MusicInitIndex ; |
LBC67: CLC ; | LBC67: CLC ; |
LBC68: ADC #$08 ;Add #$08 to MusicInitIndex. | LBC68: ADC #$08 ;Add #$08 to MusicInitIndex. |
LBC6A: STA MusicInitIndex ; | LBC6A: STA MusicInitIndex ; |
LBC6D: RTS ; | LBC6D: RTS ; |
| |
LBC6E: LDA CurrentMusic ; | LBC6E: LDA CurrentMusic ; |
LBC71: ORA #$F0 ;This code does not appear to be used in this page. | LBC71: ORA #$F0 ;This code does not appear to be used in this page. |
LBC73: STA CurrentMusic ; | LBC73: STA CurrentMusic ; |
LBC76:* RTS ; | LBC76:* RTS ; |
| |
Music00Start: | Music00Start: |
LBC77: JMP Music00Init ;($BCAA)Initialize music 00. | LBC77: JMP Music00Init ;($BCAA)Initialize music 00. |
| |
Music01Start: | Music01Start: |
LBC7A: JMP Music01Init ;($BCA4)Initialize music 01. | LBC7A: JMP Music01Init ;($BCA4)Initialize music 01. |
| |
Music02Start: | Music02Start: |
LBC7D: JMP Music02Init ;($BC9A)Initialize music 02. | LBC7D: JMP Music02Init ;($BC9A)Initialize music 02. |
| |
Msic03Start: | Msic03Start: |
LBC80: JMP Music03Init ;($BC96)Initialize music 03. | LBC80: JMP Music03Init ;($BC96)Initialize music 03. |
| |
Music04Start: | Music04Start: |
LBC83: JMP Music04Init ;($BC89)Initialize music 04. | LBC83: JMP Music04Init ;($BC89)Initialize music 04. |
| |
Music05Start: | Music05Start: |
LBC86: JMP Music05Init ;($BC9E)Initialize music 05. | LBC86: JMP Music05Init ;($BC9E)Initialize music 05. |
| |
Music04Init: | Music04Init: |
LBC89: LDA #$B3 ;Duty cycle and volume data for SQ1 and SQ2. | LBC89: LDA #$B3 ;Duty cycle and volume data for SQ1 and SQ2. |
| |
XYMusicInit: | XYMusicInit: |
LBC8B:* TAX ;Duty cycle and volume data for SQ1. | LBC8B:* TAX ;Duty cycle and volume data for SQ1. |
LBC8C: TAY ;Duty cycle and volume data for SQ2. | LBC8C: TAY ;Duty cycle and volume data for SQ2. |
| |
LBC8D:* JSR SetVolumeAndDisableSweep ;($B9E4)Set duty cycle and volume data for SQ1 and SQ2. | LBC8D:* JSR SetVolumeAndDisableSweep ;($B9E4)Set duty cycle and volume data for SQ1 and SQ2. |
LBC90: JSR InitializeMusic ;($BF19)Setup music registers. | LBC90: JSR InitializeMusic ;($BF19)Setup music registers. |
LBC93: JMP LoadCurrentMusicFrameData ;($BAA5)Load info for current frame of music data. | LBC93: JMP LoadCurrentMusicFrameData ;($BAA5)Load info for current frame of music data. |
| |
Music03Init: | Music03Init: |
LBC96: LDA #$34 ;Duty cycle and volume data for SQ1 and SQ2. | LBC96: LDA #$34 ;Duty cycle and volume data for SQ1 and SQ2. |
LBC98: BNE -- ;Branch always | LBC98: BNE -- ;Branch always |
| |
Music02Init: | Music02Init: |
LBC9A: LDA #$F4 ;Duty cycle and volume data for SQ1 and SQ2. | LBC9A: LDA #$F4 ;Duty cycle and volume data for SQ1 and SQ2. |
LBC9C: BNE -- ;Branch always | LBC9C: BNE -- ;Branch always |
| |
Music05Init: | Music05Init: |
LBC9E: LDX #$F5 ;Duty cycle and volume data for SQ1. | LBC9E: LDX #$F5 ;Duty cycle and volume data for SQ1. |
LBCA0: LDY #$F6 ;Duty cycle and volume data for SQ2. | LBCA0: LDY #$F6 ;Duty cycle and volume data for SQ2. |
LBCA2: BNE - ;Branch always | LBCA2: BNE - ;Branch always |
| |
Music01Init: | Music01Init: |
LBCA4: LDX #$B6 ;Duty cycle and volume data for SQ1. | LBCA4: LDX #$B6 ;Duty cycle and volume data for SQ1. |
LBCA6: LDY #$F6 ;Duty cycle and volume data for SQ2. | LBCA6: LDY #$F6 ;Duty cycle and volume data for SQ2. |
LBCA8: BNE - ;Branch always | LBCA8: BNE - ;Branch always |
| |
Music00Init: | Music00Init: |
LBCAA: LDX #$92 ;Duty cycle and volume data for SQ1. | LBCAA: LDX #$92 ;Duty cycle and volume data for SQ1. |
LBCAC: LDY #$96 ;Duty cycle and volume data for SQ2. | LBCAC: LDY #$96 ;Duty cycle and volume data for SQ2. |
LBCAE: BNE - ;Branch always | LBCAE: BNE - ;Branch always |
| |
;The following address table provides starting addresses of the volume data tables below: | ;The following address table provides starting addresses of the volume data tables below: |
VolumeCntrlAddressTbl: | VolumeCntrlAddressTbl: |
LBCB0: .word $BCBA, $BCC5, $BCCF, $BCDA, $BD03 | LBCB0: .word $BCBA, $BCC5, $BCCF, $BCDA, $BD03 |
| |
VolumeDataTbl1: | VolumeDataTbl1: |
LBCBA: .byte $01, $02, $02, $03, $03, $04, $05, $06, $07, $08, $FF | LBCBA: .byte $01, $02, $02, $03, $03, $04, $05, $06, $07, $08, $FF |
| |
VolumeDataTbl2: | VolumeDataTbl2: |
LBCC5: .byte $02, $04, $05, $06, $07, $08, $07, $06, $05, $FF | LBCC5: .byte $02, $04, $05, $06, $07, $08, $07, $06, $05, $FF |
| |
VolumeDataTbl3: | VolumeDataTbl3: |
LBCCF: .byte $00, $0D, $09, $07, $06, $05, $05, $05, $04, $04, $FF | LBCCF: .byte $00, $0D, $09, $07, $06, $05, $05, $05, $04, $04, $FF |
| |
VolumeDataTbl4: | VolumeDataTbl4: |
LBCDA: .byte $02, $06, $07, $07, $07, $06, $06, $06, $06, $05, $05, $05, $04, $04, $04, $03 | LBCDA: .byte $02, $06, $07, $07, $07, $06, $06, $06, $06, $05, $05, $05, $04, $04, $04, $03 |
LBCEA: .byte $03, $03, $03, $02, $03, $03, $03, $03, $03, $02, $02, $02, $02, $02, $02, $02 | LBCEA: .byte $03, $03, $03, $02, $03, $03, $03, $03, $03, $02, $02, $02, $02, $02, $02, $02 |
LBCFA: .byte $02, $02, $02, $01, $01, $01, $01, $01, $F0 | LBCFA: .byte $02, $02, $02, $01, $01, $01, $01, $01, $F0 |
| |
VolumeDataTbl5: | VolumeDataTbl5: |
LBD03: .byte $0A, $0A, $09, $08, $07, $06, $05, $04, $03, $02, $07, $07, $06, $05, $04, $04 | LBD03: .byte $0A, $0A, $09, $08, $07, $06, $05, $04, $03, $02, $07, $07, $06, $05, $04, $04 |
LBD13: .byte $03, $02, $02, $02, $05, $05, $05, $04, $03, $02, $02, $02, $01, $01, $04, $04 | LBD13: .byte $03, $02, $02, $02, $05, $05, $05, $04, $03, $02, $02, $02, $01, $01, $04, $04 |
LBD23: .byte $03, $02, $01, $02, $02, $01, $01, $01, $02, $02, $02, $01, $01, $F0 | LBD23: .byte $03, $02, $01, $02, $02, $01, $01, $01, $02, $02, $02, $01, $01, $F0 |
| |
;The init music table loads addresses $062B thru $0637 with the initial data needed to play the | ;The init music table loads addresses $062B thru $0637 with the initial data needed to play the |
| |
;Mother brain music(not used this memory page). | ;Mother brain music(not used this memory page). |
LBD31: .byte $0B, $FF, $F5, $00, $00 | LBD31: .byte $0B, $FF, $F5, $00, $00 |
LBD36: .word $0100, $0300, $0500, $0000 | LBD36: .word $0100, $0300, $0500, $0000 |
| |
;Escape music(not used this memory page). | ;Escape music(not used this memory page). |
LBD3E: .byte $0B, $FF, $00, $02, $02 | LBD3E: .byte $0B, $FF, $00, $02, $02 |
LBD43: .word $0100, $0300, $0500, $0700 | LBD43: .word $0100, $0300, $0500, $0700 |
| |
;Norfair music(not used this memory page). | ;Norfair music(not used this memory page). |
LBD4B: .byte $0B, $FF, $F0, $04, $04 | LBD4B: .byte $0B, $FF, $F0, $04, $04 |
LBD50: .word $0100, $0300, $0500, $0700 | LBD50: .word $0100, $0300, $0500, $0700 |
| |
;Kraid area music(not used this memory page). | ;Kraid area music(not used this memory page). |
LBD58: .byte $00, $FF, $F0, $00, $00 | LBD58: .byte $00, $FF, $F0, $00, $00 |
LBD5D: .word $0100, $0300, $0500, $0000 | LBD5D: .word $0100, $0300, $0500, $0000 |
| |
;Item room music. | ;Item room music. |
LBD65: .byte $0B, $FF, $03, $00, $00 | LBD65: .byte $0B, $FF, $03, $00, $00 |
LBD6A: .word $BDDA, $BDDC, $BDCD, $0000 | LBD6A: .word $BDDA, $BDDC, $BDCD, $0000 |
| |
;Ridley area music(not used this memory page). | ;Ridley area music(not used this memory page). |
LBD72: .byte $0B, $FF, $F0, $01, $01 | LBD72: .byte $0B, $FF, $F0, $01, $01 |
LBD77: .word $0100, $0300, $0500, $0000 | LBD77: .word $0100, $0300, $0500, $0000 |
| |
;End game music | ;End game music |
LBD7F: .byte $17, $00, $00, $02, $01 | LBD7F: .byte $17, $00, $00, $02, $01 |
LBD84: .word $AC00, $ADC5, $ACF5, $AE8E | LBD84: .word $AC00, $ADC5, $ACF5, $AE8E |
| |
;Intro music | ;Intro music |
LBD8C: .byte $17, $00, $F0, $02, $05 | LBD8C: .byte $17, $00, $F0, $02, $05 |
LBD91: .word $B0B9, $B000, $B076, $B115 | LBD91: .word $B0B9, $B000, $B076, $B115 |
| |
;Fade in music | ;Fade in music |
LBD99: .byte $0B, $00, $F0, $02, $00 | LBD99: .byte $0B, $00, $F0, $02, $00 |
LBD9E: .word $BE3E, $BE1D, $BE36, $0000 | LBD9E: .word $BE3E, $BE1D, $BE36, $0000 |
| |
;Power up music | ;Power up music |
LBDA6: .byte $00, $00, $F0, $01, $00 | LBDA6: .byte $00, $00, $F0, $01, $00 |
LBDAB: .word $BDF7, $BE0D, $BE08, $0000 | LBDAB: .word $BDF7, $BE0D, $BE08, $0000 |
| |
;Brinstar music(not used this memory page). | ;Brinstar music(not used this memory page). |
LBDB3: .byte $0B, $FF, $00, $02, $03 | LBDB3: .byte $0B, $FF, $00, $02, $03 |
LBDB8: .word $0100, $0300, $0500, $0700 | LBDB8: .word $0100, $0300, $0500, $0700 |
| |
;Tourian music | ;Tourian music |
LBDC0: .byte $0B, $FF, $03, $00, $00 | LBDC0: .byte $0B, $FF, $03, $00, $00 |
LBDC5: .word $BE59, $BE47, $BE62, $0000 | LBDC5: .word $BE59, $BE47, $BE62, $0000 |
| |
ItemRoomTriangleIndexData: | ItemRoomTriangleIndexData: |
LBDCD: .byte $C8 ; | LBDCD: .byte $C8 ; |
LBDCE: .byte $B0 ;3/32 seconds + | LBDCE: .byte $B0 ;3/32 seconds + |
LBDCF: .byte $38 ;E3 | | LBDCF: .byte $38 ;E3 | |
LBDD0: .byte $3A ;F3 | | LBDD0: .byte $3A ;F3 | |
LBDD1: .byte $3C ;F#3 | | LBDD1: .byte $3C ;F#3 | |
LBDD2: .byte $3E ;G3 | | LBDD2: .byte $3E ;G3 | |
LBDD3: .byte $40 ;Ab3 | Repeat 8 times | LBDD3: .byte $40 ;Ab3 | Repeat 8 times |
LBDD4: .byte $3E ;G3 | | LBDD4: .byte $3E ;G3 | |
LBDD5: .byte $3C ;F#3 | | LBDD5: .byte $3C ;F#3 | |
LBDD6: .byte $3A ;F3 | | LBDD6: .byte $3A ;F3 | |
LBDD7: .byte $B6 ;1 3/16 seconds | | LBDD7: .byte $B6 ;1 3/16 seconds | |
LBDD8: .byte $02 ;no sound + | LBDD8: .byte $02 ;no sound + |
LBDD9: .byte $FF ; | LBDD9: .byte $FF ; |
| |
ItemRoomSQ1IndexData: | ItemRoomSQ1IndexData: |
LBDDA: .byte $B8 ;1/4 seconds | LBDDA: .byte $B8 ;1/4 seconds |
LBDDB: .byte $02 ;No sound | LBDDB: .byte $02 ;No sound |
| |
ItemRoomSQ2IndexData: | ItemRoomSQ2IndexData: |
LBDDC: .byte $B3 ;3/4 seconds | LBDDC: .byte $B3 ;3/4 seconds |
LBDDD: .byte $02 ;No sound | LBDDD: .byte $02 ;No sound |
LBDDE: .byte $B2 ;3/8 seconds | LBDDE: .byte $B2 ;3/8 seconds |
LBDDF: .byte $74 ;A#6 | LBDDF: .byte $74 ;A#6 |
LBDE0: .byte $02 ;No sound | LBDE0: .byte $02 ;No sound |
LBDE1: .byte $6A ;F5 | LBDE1: .byte $6A ;F5 |
LBDE2: .byte $02 ;No sound | LBDE2: .byte $02 ;No sound |
LBDE3: .byte $72 ;A6 | LBDE3: .byte $72 ;A6 |
LBDE4: .byte $02 ;No sound | LBDE4: .byte $02 ;No sound |
LBDE5: .byte $62 ;C#5 | LBDE5: .byte $62 ;C#5 |
LBDE6: .byte $B4 ;1 1/2 seconds | LBDE6: .byte $B4 ;1 1/2 seconds |
LBDE7: .byte $02 ;No sound | LBDE7: .byte $02 ;No sound |
LBDE8: .byte $B2 ;3/8 seconds | LBDE8: .byte $B2 ;3/8 seconds |
LBDE9: .byte $60 ;C5 | LBDE9: .byte $60 ;C5 |
LBDEA: .byte $02 ;No sound | LBDEA: .byte $02 ;No sound |
LBDEB: .byte $6C ;F#5 | LBDEB: .byte $6C ;F#5 |
LBDEC: .byte $02 ;No sound | LBDEC: .byte $02 ;No sound |
LBDED: .byte $76 ;B6 | LBDED: .byte $76 ;B6 |
LBDEE: .byte $B3 ;3/4 seconds | LBDEE: .byte $B3 ;3/4 seconds |
LBDEF: .byte $02 ;No sound | LBDEF: .byte $02 ;No sound |
LBDF0: .byte $B2 ;3/8 seconds | LBDF0: .byte $B2 ;3/8 seconds |
LBDF1: .byte $7E ;F6 | LBDF1: .byte $7E ;F6 |
LBDF2: .byte $02 ;No sound | LBDF2: .byte $02 ;No sound |
LBDF3: .byte $7C ;D6 | LBDF3: .byte $7C ;D6 |
LBDF4: .byte $B3 ;3/4 seconds | LBDF4: .byte $B3 ;3/4 seconds |
LBDF5: .byte $02 ;No sound | LBDF5: .byte $02 ;No sound |
LBDF6: .byte $00 ;End item room music. | LBDF6: .byte $00 ;End item room music. |
| |
PowerUpSQ1IndexData: | PowerUpSQ1IndexData: |
LBDF7: .byte $B3 ;1/2 seconds | LBDF7: .byte $B3 ;1/2 seconds |
LBDF8: .byte $48 ;C4 | LBDF8: .byte $48 ;C4 |
LBDF9: .byte $42 ;A4 | LBDF9: .byte $42 ;A4 |
LBDFA: .byte $B2 ;1/4 seconds | LBDFA: .byte $B2 ;1/4 seconds |
LBDFB: .byte $3E ;G3 | LBDFB: .byte $3E ;G3 |
LBDFC: .byte $38 ;E3 | LBDFC: .byte $38 ;E3 |
LBDFD: .byte $30 ;C3 | LBDFD: .byte $30 ;C3 |
LBDFE: .byte $38 ;E3 | LBDFE: .byte $38 ;E3 |
LBDFF: .byte $4C ;D4 | LBDFF: .byte $4C ;D4 |
LBE00: .byte $44 ;A#4 | LBE00: .byte $44 ;A#4 |
LBE01: .byte $3E ;G3 | LBE01: .byte $3E ;G3 |
LBE02: .byte $36 ;D#3 | LBE02: .byte $36 ;D#3 |
LBE03: .byte $C8 ; | LBE03: .byte $C8 ; |
LBE04: .byte $B0 ;1/16 seconds + | LBE04: .byte $B0 ;1/16 seconds + |
LBE05: .byte $38 ;E3 | Repeat 8 times | LBE05: .byte $38 ;E3 | Repeat 8 times |
LBE06: .byte $3C ;F#3 + | LBE06: .byte $3C ;F#3 + |
LBE07: .byte $FF | LBE07: .byte $FF |
| |
PowerUpTriangleIndexData: | PowerUpTriangleIndexData: |
LBE08: .byte $B4 ;1 second | LBE08: .byte $B4 ;1 second |
LBE09: .byte $2C ;A#3 | LBE09: .byte $2C ;A#3 |
LBE0A: .byte $2A ;A3 | LBE0A: .byte $2A ;A3 |
LBE0B: .byte $1E ;D#2 | LBE0B: .byte $1E ;D#2 |
LBE0C: .byte $1C ;D2 | LBE0C: .byte $1C ;D2 |
| |
PowerUpSQ2IndexData: | PowerUpSQ2IndexData: |
LBE0D: .byte $B2 ;1/4 seconds | LBE0D: .byte $B2 ;1/4 seconds |
LBE0E: .byte $22 ;F2 | LBE0E: .byte $22 ;F2 |
LBE0F: .byte $2C ;A#3 | LBE0F: .byte $2C ;A#3 |
LBE10: .byte $30 ;C3 | LBE10: .byte $30 ;C3 |
LBE11: .byte $34 ;D3 | LBE11: .byte $34 ;D3 |
LBE12: .byte $38 ;E3 | LBE12: .byte $38 ;E3 |
LBE13: .byte $30 ;C3 | LBE13: .byte $30 ;C3 |
LBE14: .byte $26 ;G2 | LBE14: .byte $26 ;G2 |
LBE15: .byte $30 ;C3 | LBE15: .byte $30 ;C3 |
LBE16: .byte $3A ;F3 | LBE16: .byte $3A ;F3 |
LBE17: .byte $34 ;D3 | LBE17: .byte $34 ;D3 |
LBE18: .byte $2C ;A#3 | LBE18: .byte $2C ;A#3 |
LBE19: .byte $26 ;G2 | LBE19: .byte $26 ;G2 |
LBE1A: .byte $B4 ;1 second | LBE1A: .byte $B4 ;1 second |
LBE1B: .byte $2A ;A3 | LBE1B: .byte $2A ;A3 |
LBE1C: .byte $00 ;End power up music. | LBE1C: .byte $00 ;End power up music. |
| |
FadeInSQ2IndexData: | FadeInSQ2IndexData: |
LBE1D: .byte $C4 | LBE1D: .byte $C4 |
LBE1E: .byte $B0 ;3/32 seconds + | LBE1E: .byte $B0 ;3/32 seconds + |
LBE1F: .byte $3E ;G3 | Repeat 4 times | LBE1F: .byte $3E ;G3 | Repeat 4 times |
LBE20: .byte $30 ;C3 + | LBE20: .byte $30 ;C3 + |
LBE21: .byte $FF ; | LBE21: .byte $FF ; |
LBE22: .byte $C4 ; | LBE22: .byte $C4 ; |
LBE23: .byte $42 ;A4 + Repeat 4 times | LBE23: .byte $42 ;A4 + Repeat 4 times |
LBE24: .byte $30 ;C3 + | LBE24: .byte $30 ;C3 + |
LBE25: .byte $FF ; | LBE25: .byte $FF ; |
LBE26: .byte $C4 ; | LBE26: .byte $C4 ; |
LBE27: .byte $3A ;F3 + Repeat 4 times | LBE27: .byte $3A ;F3 + Repeat 4 times |
LBE28: .byte $2C ;A#3 + | LBE28: .byte $2C ;A#3 + |
LBE29: .byte $FF ; | LBE29: .byte $FF ; |
LBE2A: .byte $C4 ; | LBE2A: .byte $C4 ; |
LBE2B: .byte $38 ;E3 + Repeat 4 times | LBE2B: .byte $38 ;E3 + Repeat 4 times |
LBE2C: .byte $26 ;G2 + | LBE2C: .byte $26 ;G2 + |
LBE2D: .byte $FF ; | LBE2D: .byte $FF ; |
LBE2E: .byte $C4 ; | LBE2E: .byte $C4 ; |
LBE2F: .byte $34 ;D3 + Repeat 4 times | LBE2F: .byte $34 ;D3 + Repeat 4 times |
LBE30: .byte $20 ;E2 + | LBE30: .byte $20 ;E2 + |
LBE31: .byte $FF ; | LBE31: .byte $FF ; |
LBE32: .byte $E0 ; | LBE32: .byte $E0 ; |
LBE33: .byte $34 ;D3 + Repeat 32 times | LBE33: .byte $34 ;D3 + Repeat 32 times |
LBE34: .byte $24 ;F#2 + | LBE34: .byte $24 ;F#2 + |
LBE35: .byte $FF ; | LBE35: .byte $FF ; |
| |
FadeInTriangleIndexData: | FadeInTriangleIndexData: |
LBE36: .byte $B3 ;3/4 seconds | LBE36: .byte $B3 ;3/4 seconds |
LBE37: .byte $36 ;D#3 | LBE37: .byte $36 ;D#3 |
LBE38: .byte $34 ;D3 | LBE38: .byte $34 ;D3 |
LBE39: .byte $30 ;C3 | LBE39: .byte $30 ;C3 |
LBE3A: .byte $2A ;A3 | LBE3A: .byte $2A ;A3 |
LBE3B: .byte $B4 ;1 1/2 seconds | LBE3B: .byte $B4 ;1 1/2 seconds |
LBE3C: .byte $1C ;D2 | LBE3C: .byte $1C ;D2 |
LBE3D: .byte $1C ;D2 | LBE3D: .byte $1C ;D2 |
| |
FadeInSQ1IndexData: | FadeInSQ1IndexData: |
LBE3E: .byte $B3 ;3/4 seconds | LBE3E: .byte $B3 ;3/4 seconds |
LBE3F: .byte $34 ;D3 | LBE3F: .byte $34 ;D3 |
LBE40: .byte $3A ;F3 | LBE40: .byte $3A ;F3 |
LBE41: .byte $34 ;D3 | LBE41: .byte $34 ;D3 |
LBE42: .byte $30 ;C3 | LBE42: .byte $30 ;C3 |
LBE43: .byte $B4 ;1 1/2 seconds | LBE43: .byte $B4 ;1 1/2 seconds |
LBE44: .byte $2A ;A3 | LBE44: .byte $2A ;A3 |
LBE45: .byte $2A ;A3 | LBE45: .byte $2A ;A3 |
LBE46: .byte $00 ;End fade in music. | LBE46: .byte $00 ;End fade in music. |
| |
TourianSQ2IndexData: | TourianSQ2IndexData: |
LBE47: .byte $B4 ;1 1/2 seconds | LBE47: .byte $B4 ;1 1/2 seconds |
LBE48: .byte $12 ;A2 | LBE48: .byte $12 ;A2 |
LBE49: .byte $B3 ;3/4 seconds | LBE49: .byte $B3 ;3/4 seconds |
LBE4A: .byte $10 ;Ab1 | LBE4A: .byte $10 ;Ab1 |
LBE4B: .byte $18 ;C2 | LBE4B: .byte $18 ;C2 |
LBE4C: .byte $16 ;B2 | LBE4C: .byte $16 ;B2 |
LBE4D: .byte $0A ;F1 | LBE4D: .byte $0A ;F1 |
LBE4E: .byte $B4 ;1 1/2 seconds | LBE4E: .byte $B4 ;1 1/2 seconds |
LBE4F: .byte $14 ;A#2 | LBE4F: .byte $14 ;A#2 |
LBE50: .byte $12 ;A2 | LBE50: .byte $12 ;A2 |
LBE51: .byte $B3 ;3/4 seconds | LBE51: .byte $B3 ;3/4 seconds |
LBE52: .byte $10 ;Ab1 | LBE52: .byte $10 ;Ab1 |
LBE53: .byte $06 ;D1 | LBE53: .byte $06 ;D1 |
LBE54: .byte $0E ;G1 | LBE54: .byte $0E ;G1 |
LBE55: .byte $04 ;C#1 | LBE55: .byte $04 ;C#1 |
LBE56: .byte $B4 ;1 1/2 seconds | LBE56: .byte $B4 ;1 1/2 seconds |
LBE57: .byte $0C ;F#1 | LBE57: .byte $0C ;F#1 |
LBE58: .byte $00 ;End Tourian music. | LBE58: .byte $00 ;End Tourian music. |
| |
TourianSQ1IndexData: | TourianSQ1IndexData: |
LBE59: .byte $E0 ; | LBE59: .byte $E0 ; |
LBE5A: .byte $B0 ;3/32 seconds + | LBE5A: .byte $B0 ;3/32 seconds + |
LBE5B: .byte $54 ;F#4 | | LBE5B: .byte $54 ;F#4 | |
LBE5C: .byte $4E ;D#4 | | LBE5C: .byte $4E ;D#4 | |
LBE5D: .byte $48 ;C4 | Repeat 32 times | LBE5D: .byte $48 ;C4 | Repeat 32 times |
LBE5E: .byte $42 ;A4 | | LBE5E: .byte $42 ;A4 | |
LBE5F: .byte $48 ;C4 | | LBE5F: .byte $48 ;C4 | |
LBE60: .byte $4E ;D#4 + | LBE60: .byte $4E ;D#4 + |
LBE61: .byte $FF ; | LBE61: .byte $FF ; |
| |
TourianTriangleIndexData: | TourianTriangleIndexData: |
LBE62: .byte $E0 ; | LBE62: .byte $E0 ; |
LBE63: .byte $B3 ;3/4 seconds + | LBE63: .byte $B3 ;3/4 seconds + |
LBE64: .byte $02 ;No sound | | LBE64: .byte $02 ;No sound | |
LBE65: .byte $B0 ;3/32 seconds | | LBE65: .byte $B0 ;3/32 seconds | |
LBE66: .byte $3C ;F#3 | | LBE66: .byte $3C ;F#3 | |
LBE67: .byte $40 ;Ab3 | | LBE67: .byte $40 ;Ab3 | |
LBE68: .byte $44 ;A#4 | | LBE68: .byte $44 ;A#4 | |
LBE69: .byte $4A ;C#4 | | LBE69: .byte $4A ;C#4 | |
LBE6A: .byte $4E ;D#4 | | LBE6A: .byte $4E ;D#4 | |
LBE6B: .byte $54 ;F#4 | | LBE6B: .byte $54 ;F#4 | |
LBE6C: .byte $58 ;Ab4 | Repeat 32 times | LBE6C: .byte $58 ;Ab4 | Repeat 32 times |
LBE6D: .byte $5C ;A#5 | | LBE6D: .byte $5C ;A#5 | |
LBE6E: .byte $62 ;C#5 | | LBE6E: .byte $62 ;C#5 | |
LBE6F: .byte $66 ;D#5 | | LBE6F: .byte $66 ;D#5 | |
LBE70: .byte $6C ;F#5 | | LBE70: .byte $6C ;F#5 | |
LBE71: .byte $70 ;Ab5 | | LBE71: .byte $70 ;Ab5 | |
LBE72: .byte $74 ;A#6 | | LBE72: .byte $74 ;A#6 | |
LBE73: .byte $7A ;C#6 | | LBE73: .byte $7A ;C#6 | |
LBE74: .byte $B3 ;3/4 seconds | | LBE74: .byte $B3 ;3/4 seconds | |
LBE75: .byte $02 ;No sound + | LBE75: .byte $02 ;No sound + |
LBE76: .byte $FF | LBE76: .byte $FF |
| |
;The following table contains the musical notes used by the music player. The first byte is | ;The following table contains the musical notes used by the music player. The first byte is |
| |
MusicNotesTbl: | MusicNotesTbl: |
LBE77: .byte $07 ;55.0Hz (A1) Index #$00 (Not used) | LBE77: .byte $07 ;55.0Hz (A1) Index #$00 (Not used) |
LBE78: .byte $F0 ; | LBE78: .byte $F0 ; |
| |
LBE79: .byte $00 ;No sound Index #$02 | LBE79: .byte $00 ;No sound Index #$02 |
LBE7A: .byte $00 ; | LBE7A: .byte $00 ; |
| |
LBE7B: .byte $06 ;69.3Hz (C#2) Index #$04 | LBE7B: .byte $06 ;69.3Hz (C#2) Index #$04 |
LBE7C: .byte $4E ; | LBE7C: .byte $4E ; |
| |
LBE7D: .byte $05 ;73.4Hz (D2) Index #$06 | LBE7D: .byte $05 ;73.4Hz (D2) Index #$06 |
LBE7E: .byte $F3 ; | LBE7E: .byte $F3 ; |
| |
LBE7F: .byte $05 ;82.4Hz (E2) Index #$08 | LBE7F: .byte $05 ;82.4Hz (E2) Index #$08 |
LBE80: .byte $4D ; | LBE80: .byte $4D ; |
| |
LBE81: .byte $05 ;87.3Hz (F2) Index #$0A | LBE81: .byte $05 ;87.3Hz (F2) Index #$0A |
LBE82: .byte $01 ; | LBE82: .byte $01 ; |
| |
LBE83: .byte $04 ;92.5Hz (F#2) Index #$0C | LBE83: .byte $04 ;92.5Hz (F#2) Index #$0C |
LBE84: .byte $B9 ; | LBE84: .byte $B9 ; |
| |
LBE85: .byte $04 ;98.0Hz (G2) Index #$0E | LBE85: .byte $04 ;98.0Hz (G2) Index #$0E |
LBE86: .byte $75 ; | LBE86: .byte $75 ; |
| |
LBE87: .byte $04 ;103.8Hz (Ab2) Index #$10 | LBE87: .byte $04 ;103.8Hz (Ab2) Index #$10 |
LBE88: .byte $35 ; | LBE88: .byte $35 ; |
| |
LBE89: .byte $03 ;110.0Hz (A2) Index #$12 | LBE89: .byte $03 ;110.0Hz (A2) Index #$12 |
LBE8A: .byte $F8 ; | LBE8A: .byte $F8 ; |
| |
LBE8B: .byte $03 ;116.5Hz (A#2) Index #$14 | LBE8B: .byte $03 ;116.5Hz (A#2) Index #$14 |
LBE8C: .byte $BF ; | LBE8C: .byte $BF ; |
| |
LBE8D: .byte $03 ;123.5Hz (B2) Index #$16 | LBE8D: .byte $03 ;123.5Hz (B2) Index #$16 |
LBE8E: .byte $89 ; | LBE8E: .byte $89 ; |
| |
LBE8F: .byte $03 ;130.7Hz (C3) Index #$18 | LBE8F: .byte $03 ;130.7Hz (C3) Index #$18 |
LBE90: .byte $57 ; | LBE90: .byte $57 ; |
| |
LBE91: .byte $03 ;138.5Hz (C#3) Index #$1A | LBE91: .byte $03 ;138.5Hz (C#3) Index #$1A |
LBE92: .byte $27 ; | LBE92: .byte $27 ; |
| |
LBE93: .byte $02 ;146.8Hz (D3) Index #$1C | LBE93: .byte $02 ;146.8Hz (D3) Index #$1C |
LBE94: .byte $F9 ; | LBE94: .byte $F9 ; |
| |
LBE95: .byte $02 ;155.4Hz (D#3) Index #$1E | LBE95: .byte $02 ;155.4Hz (D#3) Index #$1E |
LBE96: .byte $CF ; | LBE96: .byte $CF ; |
| |
LBE97: .byte $02 ;164.8Hz (E3) Index #$20 | LBE97: .byte $02 ;164.8Hz (E3) Index #$20 |
LBE98: .byte $A6 ; | LBE98: .byte $A6 ; |
| |
LBE99: .byte $02 ;174.5Hz (F3) Index #$22 | LBE99: .byte $02 ;174.5Hz (F3) Index #$22 |
LBE9A: .byte $80 ; | LBE9A: .byte $80 ; |
| |
LBE9B: .byte $02 ;184.9Hz (F#3) Index #$24 | LBE9B: .byte $02 ;184.9Hz (F#3) Index #$24 |
LBE9C: .byte $5C ; | LBE9C: .byte $5C ; |
| |
LBE9D: .byte $02 ;196.0Hz (G3) Index #$26 | LBE9D: .byte $02 ;196.0Hz (G3) Index #$26 |
LBE9E: .byte $3A ; | LBE9E: .byte $3A ; |
| |
LBE9F: .byte $02 ;207.6Hz (Ab3) Index #$28 | LBE9F: .byte $02 ;207.6Hz (Ab3) Index #$28 |
LBEA0: .byte $1A ; | LBEA0: .byte $1A ; |
| |
LBEA1: .byte $01 ;219.8Hz (A3) Index #$2A | LBEA1: .byte $01 ;219.8Hz (A3) Index #$2A |
LBEA2: .byte $FC ; | LBEA2: .byte $FC ; |
| |
LBEA3: .byte $01 ;233.1Hz (A#3) Index #$2C | LBEA3: .byte $01 ;233.1Hz (A#3) Index #$2C |
LBEA4: .byte $DF ; | LBEA4: .byte $DF ; |
| |
LBEA5: .byte $01 ;247.0Hz (B3) Index #$2E | LBEA5: .byte $01 ;247.0Hz (B3) Index #$2E |
LBEA6: .byte $C4 ; | LBEA6: .byte $C4 ; |
| |
LBEA7: .byte $01 ;261.4Hz (C4) Index #$30 | LBEA7: .byte $01 ;261.4Hz (C4) Index #$30 |
LBEA8: .byte $AB ; | LBEA8: .byte $AB ; |
| |
LBEA9: .byte $01 ;276.9Hz (C#4) Index #$32 | LBEA9: .byte $01 ;276.9Hz (C#4) Index #$32 |
LBEAA: .byte $93 ; | LBEAA: .byte $93 ; |
| |
LBEAB: .byte $01 ;293.6Hz (D4) Index #$34 | LBEAB: .byte $01 ;293.6Hz (D4) Index #$34 |
LBEAC: .byte $7C ; | LBEAC: .byte $7C ; |
| |
LBEAD: .byte $01 ;310.8Hz (D#4) Index #$36 | LBEAD: .byte $01 ;310.8Hz (D#4) Index #$36 |
LBEAE: .byte $67 ; | LBEAE: .byte $67 ; |
| |
LBEAF: .byte $01 ;330.0Hz (E4) Index #$38 | LBEAF: .byte $01 ;330.0Hz (E4) Index #$38 |
LBEB0: .byte $52 ; | LBEB0: .byte $52 ; |
| |
LBEB1: .byte $01 ;349.6Hz (F4) Index #$3A | LBEB1: .byte $01 ;349.6Hz (F4) Index #$3A |
LBEB2: .byte $3F ; | LBEB2: .byte $3F ; |
| |
LBEB3: .byte $01 ;370.4Hz (F#4) Index #$3C | LBEB3: .byte $01 ;370.4Hz (F#4) Index #$3C |
LBEB4: .byte $2D ; | LBEB4: .byte $2D ; |
| |
LBEB5: .byte $01 ;392.5Hz (G4) Index #$3E | LBEB5: .byte $01 ;392.5Hz (G4) Index #$3E |
LBEB6: .byte $1C ; | LBEB6: .byte $1C ; |
| |
LBEB7: .byte $01 ;415.9Hz (Ab4) Index #$40 | LBEB7: .byte $01 ;415.9Hz (Ab4) Index #$40 |
LBEB8: .byte $0C ; | LBEB8: .byte $0C ; |
| |
LBEB9: .byte $00 ;440.4Hz (A4) Index #$42 | LBEB9: .byte $00 ;440.4Hz (A4) Index #$42 |
LBEBA: .byte $FD ; | LBEBA: .byte $FD ; |
| |
LBEBB: .byte $00 ;468.1Hz (A#4) Index #$44 | LBEBB: .byte $00 ;468.1Hz (A#4) Index #$44 |
LBEBC: .byte $EE ; | LBEBC: .byte $EE ; |
| |
LBEBD: .byte $00 ;495.0Hz (B4) Index #$46 | LBEBD: .byte $00 ;495.0Hz (B4) Index #$46 |
LBEBE: .byte $E1 ; | LBEBE: .byte $E1 ; |
| |
LBEBF: .byte $00 ;525.2Hz (C5) Index #$48 | LBEBF: .byte $00 ;525.2Hz (C5) Index #$48 |
LBEC0: .byte $D4 ; | LBEC0: .byte $D4 ; |
| |
LBEC1: .byte $00 ;556.6Hz (C#5) Index #$4A | LBEC1: .byte $00 ;556.6Hz (C#5) Index #$4A |
LBEC2: .byte $C8 ; | LBEC2: .byte $C8 ; |
| |
LBEC3: .byte $00 ;588.8Hz (D5) Index #$4C | LBEC3: .byte $00 ;588.8Hz (D5) Index #$4C |
LBEC4: .byte $BD ; | LBEC4: .byte $BD ; |
| |
LBEC5: .byte $00 ;625.0Hz (D#5) Index #$4E | LBEC5: .byte $00 ;625.0Hz (D#5) Index #$4E |
LBEC6: .byte $B2 ; | LBEC6: .byte $B2 ; |
| |
LBEC7: .byte $00 ;662.0Hz (E5) Index #$50 | LBEC7: .byte $00 ;662.0Hz (E5) Index #$50 |
LBEC8: .byte $A8 ; | LBEC8: .byte $A8 ; |
| |
LBEC9: .byte $00 ;699.2Hz (F5) Index #$52 | LBEC9: .byte $00 ;699.2Hz (F5) Index #$52 |
LBECA: .byte $9F ; | LBECA: .byte $9F ; |
| |
LBECB: .byte $00 ;740.9Hz (F#5) Index #$54 | LBECB: .byte $00 ;740.9Hz (F#5) Index #$54 |
LBECC: .byte $96 ; | LBECC: .byte $96 ; |
| |
LBECD: .byte $00 ;787.9Hz (G5) Index #$56 | LBECD: .byte $00 ;787.9Hz (G5) Index #$56 |
LBECE: .byte $8D ; | LBECE: .byte $8D ; |
| |
LBECF: .byte $00 ;834.9Hz (Ab5) Index #$58 | LBECF: .byte $00 ;834.9Hz (Ab5) Index #$58 |
LBED0: .byte $85 ; | LBED0: .byte $85 ; |
| |
LBED1: .byte $00 ;880.9HZ (A5) Index #$5A | LBED1: .byte $00 ;880.9HZ (A5) Index #$5A |
LBED2: .byte $7E ; | LBED2: .byte $7E ; |
| |
LBED3: .byte $00 ;940.1Hz (A#5) Index #$5C | LBED3: .byte $00 ;940.1Hz (A#5) Index #$5C |
LBED4: .byte $76 ; | LBED4: .byte $76 ; |
| |
LBED5: .byte $00 ;990.0Hz (B5) Index #$5E | LBED5: .byte $00 ;990.0Hz (B5) Index #$5E |
LBED6: .byte $70 ; | LBED6: .byte $70 ; |
| |
LBED7: .byte $00 ;1055Hz (C6) Index #$60 | LBED7: .byte $00 ;1055Hz (C6) Index #$60 |
LBED8: .byte $69 ; | LBED8: .byte $69 ; |
| |
LBED9: .byte $00 ;1118Hz (C#6) Index #$62 | LBED9: .byte $00 ;1118Hz (C#6) Index #$62 |
LBEDA: .byte $63 ; | LBEDA: .byte $63 ; |
| |
LBEDB: .byte $00 ;1178Hz (D6) Index #$64 | LBEDB: .byte $00 ;1178Hz (D6) Index #$64 |
LBEDC: .byte $5E ; | LBEDC: .byte $5E ; |
| |
LBEDD: .byte $00 ;1257Hz (D#6) Index #$66 | LBEDD: .byte $00 ;1257Hz (D#6) Index #$66 |
LBEDE: .byte $58 ; | LBEDE: .byte $58 ; |
| |
LBEDF: .byte $00 ;1332Hz (E6) Index #$68 | LBEDF: .byte $00 ;1332Hz (E6) Index #$68 |
LBEE0: .byte $53 ; | LBEE0: .byte $53 ; |
| |
LBEE1: .byte $00 ;1398Hz (F6) Index #$6A | LBEE1: .byte $00 ;1398Hz (F6) Index #$6A |
LBEE2: .byte $4F ; | LBEE2: .byte $4F ; |
| |
LBEE3: .byte $00 ;1492Hz (F#6) Index #$6C | LBEE3: .byte $00 ;1492Hz (F#6) Index #$6C |
LBEE4: .byte $4A ; | LBEE4: .byte $4A ; |
| |
LBEE5: .byte $00 ;1576Hz (G6) Index #$6E | LBEE5: .byte $00 ;1576Hz (G6) Index #$6E |
LBEE6: .byte $46 ; | LBEE6: .byte $46 ; |
| |
LBEE7: .byte $00 ;1670Hz (Ab6) Index #$70 | LBEE7: .byte $00 ;1670Hz (Ab6) Index #$70 |
LBEE8: .byte $42 ; | LBEE8: .byte $42 ; |
| |
LBEE9: .byte $00 ;1776Hz (A6) Index #$72 | LBEE9: .byte $00 ;1776Hz (A6) Index #$72 |
LBEEA: .byte $3E ; | LBEEA: .byte $3E ; |
| |
LBEEB: .byte $00 ;1896Hz (A#6) Index #$74 | LBEEB: .byte $00 ;1896Hz (A#6) Index #$74 |
LBEEC: .byte $3A ; | LBEEC: .byte $3A ; |
| |
LBEED: .byte $00 ;1998Hz (B6) Index #$76 | LBEED: .byte $00 ;1998Hz (B6) Index #$76 |
LBEEE: .byte $37 ; | LBEEE: .byte $37 ; |
| |
LBEEF: .byte $00 ;2111Hz (C7) Index #$78 | LBEEF: .byte $00 ;2111Hz (C7) Index #$78 |
LBEF0: .byte $34 ; | LBEF0: .byte $34 ; |
| |
LBEF1: .byte $00 ;2238Hz (C#7) Index #$7A | LBEF1: .byte $00 ;2238Hz (C#7) Index #$7A |
LBEF2: .byte $31 ; | LBEF2: .byte $31 ; |
| |
LBEF3: .byte $00 ;2380Hz (D7) Index #$7C | LBEF3: .byte $00 ;2380Hz (D7) Index #$7C |
LBEF4: .byte $2E ; | LBEF4: .byte $2E ; |
| |
LBEF5: .byte $00 ;2796Hz (F7) Index #$7E | LBEF5: .byte $00 ;2796Hz (F7) Index #$7E |
LBEF6: .byte $27 ; | LBEF6: .byte $27 ; |
| |
;The following tables are used to load the music frame count addresses ($0640 thru $0643). The | ;The following tables are used to load the music frame count addresses ($0640 thru $0643). The |
| |
NoteLengths0Tbl: | NoteLengths0Tbl: |
LBEF7: .byte $04 ;About 1/16 seconds ($B0) | LBEF7: .byte $04 ;About 1/16 seconds ($B0) |
LBEF8: .byte $08 ;About 1/8 seconds ($B1) | LBEF8: .byte $08 ;About 1/8 seconds ($B1) |
LBEF9: .byte $10 ;About 1/4 seconds ($B2) | LBEF9: .byte $10 ;About 1/4 seconds ($B2) |
LBEFA: .byte $20 ;About 1/2 seconds ($B3) | LBEFA: .byte $20 ;About 1/2 seconds ($B3) |
LBEFB: .byte $40 ;About 1 seconds ($B4) | LBEFB: .byte $40 ;About 1 seconds ($B4) |
LBEFC: .byte $18 ;About 3/8 seconds ($B5) | LBEFC: .byte $18 ;About 3/8 seconds ($B5) |
LBEFD: .byte $30 ;About 3/4 seconds ($B6) | LBEFD: .byte $30 ;About 3/4 seconds ($B6) |
LBEFE: .byte $0C ;About 3/16 seconds ($B7) | LBEFE: .byte $0C ;About 3/16 seconds ($B7) |
LBEFF: .byte $0B ;About 11/64 seconds ($B8) | LBEFF: .byte $0B ;About 11/64 seconds ($B8) |
LBF00: .byte $05 ;About 5/64 seconds ($B9) | LBF00: .byte $05 ;About 5/64 seconds ($B9) |
LBF01: .byte $02 ;About 1/32 seconds ($BA) | LBF01: .byte $02 ;About 1/32 seconds ($BA) |
| |
;Used by item room, fade in, Brinstar music, Ridley area music, Mother brain music, | ;Used by item room, fade in, Brinstar music, Ridley area music, Mother brain music, |
| |
NoteLengths1Tbl: | NoteLengths1Tbl: |
LBF02: .byte $06 ;About 3/32 seconds ($B0) | LBF02: .byte $06 ;About 3/32 seconds ($B0) |
LBF03: .byte $0C ;About 3/16 seconds ($B1) | LBF03: .byte $0C ;About 3/16 seconds ($B1) |
LBF04: .byte $18 ;About 3/8 seconds ($B2) | LBF04: .byte $18 ;About 3/8 seconds ($B2) |
LBF05: .byte $30 ;About 3/4 seconds ($B3) | LBF05: .byte $30 ;About 3/4 seconds ($B3) |
LBF06: .byte $60 ;About 1 1/2 seconds ($B4) | LBF06: .byte $60 ;About 1 1/2 seconds ($B4) |
LBF07: .byte $24 ;About 9/16 seconds ($B5) | LBF07: .byte $24 ;About 9/16 seconds ($B5) |
LBF08: .byte $48 ;About 1 3/16 seconds ($B6) | LBF08: .byte $48 ;About 1 3/16 seconds ($B6) |
LBF09: .byte $12 ;About 9/32 seconds ($B7) | LBF09: .byte $12 ;About 9/32 seconds ($B7) |
LBF0A: .byte $10 ;About 1/4 seconds ($B8) | LBF0A: .byte $10 ;About 1/4 seconds ($B8) |
LBF0B: .byte $08 ;About 1/8 seconds ($B9) | LBF0B: .byte $08 ;About 1/8 seconds ($B9) |
LBF0C: .byte $03 ;About 3/64 seconds ($BA) | LBF0C: .byte $03 ;About 3/64 seconds ($BA) |
| |
;Used by intro and end game music. | ;Used by intro and end game music. |
| |
NoteLengths2Tbl: | NoteLengths2Tbl: |
LBF0D: .byte $10 ;About 1/4 seconds ($B0) | LBF0D: .byte $10 ;About 1/4 seconds ($B0) |
LBF0E: .byte $07 ;About 7/64 seconds ($B1) | LBF0E: .byte $07 ;About 7/64 seconds ($B1) |
LBF0F: .byte $0E ;About 7/32 seconds ($B2) | LBF0F: .byte $0E ;About 7/32 seconds ($B2) |
LBF10: .byte $1C ;About 7/16 seconds ($B3) | LBF10: .byte $1C ;About 7/16 seconds ($B3) |
LBF11: .byte $38 ;About 7/8 seconds ($B4) | LBF11: .byte $38 ;About 7/8 seconds ($B4) |
LBF12: .byte $70 ;About 1 13/16 seconds ($B5) | LBF12: .byte $70 ;About 1 13/16 seconds ($B5) |
LBF13: .byte $2A ;About 21/32 seconds ($B6) | LBF13: .byte $2A ;About 21/32 seconds ($B6) |
LBF14: .byte $54 ;About 1 5/16 seconds ($B7) | LBF14: .byte $54 ;About 1 5/16 seconds ($B7) |
LBF15: .byte $15 ;About 21/64 seconds ($B8) | LBF15: .byte $15 ;About 21/64 seconds ($B8) |
LBF16: .byte $12 ;About 9/32 seconds ($B9) | LBF16: .byte $12 ;About 9/32 seconds ($B9) |
LBF17: .byte $02 ;About 1/32 seconds ($BA) | LBF17: .byte $02 ;About 1/32 seconds ($BA) |
LBF18: .byte $03 ;About 3/64 seconds ($BB) | LBF18: .byte $03 ;About 3/64 seconds ($BB) |
| |
InitializeMusic: | InitializeMusic: |
LBF19: JSR CheckMusicFlags ;($B3FC)Check to see if restarting current music. | LBF19: JSR CheckMusicFlags ;($B3FC)Check to see if restarting current music. |
LBF1C: LDA CurrentSFXFlags ;Load current SFX flags and store CurrentMusic address. | LBF1C: LDA CurrentSFXFlags ;Load current SFX flags and store CurrentMusic address. |
LBF1F: STA CurrentMusic ; | LBF1F: STA CurrentMusic ; |
LBF22: LDA MusicInitIndex ; | LBF22: LDA MusicInitIndex ; |
LBF25: TAY ; | LBF25: TAY ; |
LBF26: LDA InitMusicIndexTbl,Y ;($BBFA)Find index for music in InitMusicInitIndexTbl. | LBF26: LDA InitMusicIndexTbl,Y ;($BBFA)Find index for music in InitMusicInitIndexTbl. |
LBF29: TAY ; | LBF29: TAY ; |
LBF2A: LDX #$00 ; | LBF2A: LDX #$00 ; |
| |
LBF2C:* LDA InitMusicTbl,Y ;Base is $BD31. | LBF2C:* LDA InitMusicTbl,Y ;Base is $BD31. |
LBF2F: STA NoteLengthTblOffset,X ; | LBF2F: STA NoteLengthTblOffset,X ; |
LBF32: INY ;The following loop repeats 13 times to--> | LBF32: INY ;The following loop repeats 13 times to--> |
LBF33: INX ;load the initial music addresses --> | LBF33: INX ;load the initial music addresses --> |
LBF34: TXA ;(registers $062B thru $0637). | LBF34: TXA ;(registers $062B thru $0637). |
LBF35: CMP #$0D ; | LBF35: CMP #$0D ; |
LBF37: BNE - ; | LBF37: BNE - ; |
| |
LBF39: LDA #$01 ;Resets addresses $0640 thru $0643 to #$01.--> | LBF39: LDA #$01 ;Resets addresses $0640 thru $0643 to #$01.--> |
LBF3B: STA SQ1MusicFrameCount ;These addresses are used for counting the--> | LBF3B: STA SQ1MusicFrameCount ;These addresses are used for counting the--> |
LBF3E: STA SQ2MusicFrameCount ;number of frames music channels have been playing. | LBF3E: STA SQ2MusicFrameCount ;number of frames music channels have been playing. |
LBF41: STA TriangleMusicFrameCount ; | LBF41: STA TriangleMusicFrameCount ; |
LBF44: STA NoiseMusicFrameCount ; | LBF44: STA NoiseMusicFrameCount ; |
LBF47: LDA #$00 ; | LBF47: LDA #$00 ; |
LBF49: STA SQ1MusicIndexIndex ; | LBF49: STA SQ1MusicIndexIndex ; |
LBF4C: STA SQ2MusicIndexIndex ;Resets addresses $0638 thru $063B to #$00.--> | LBF4C: STA SQ2MusicIndexIndex ;Resets addresses $0638 thru $063B to #$00.--> |
LBF4F: STA TriangleMusicIndexIndex ;These are the index to find sound channel data index. | LBF4F: STA TriangleMusicIndexIndex ;These are the index to find sound channel data index. |
LBF52: STA NoiseMusicIndexIndex ; | LBF52: STA NoiseMusicIndexIndex ; |
LBF55: RTS ; | LBF55: RTS ; |
| |
;Not used. | ;Not used. |
LBF56: .byte $10, $07, $0E, $1C, $38, $70, $2A, $54, $15, $12, $02, $03, $20, $2C, $B4, $AD | LBF56: .byte $10, $07, $0E, $1C, $38, $70, $2A, $54, $15, $12, $02, $03, $20, $2C, $B4, $AD |
LBF66: .byte $4D, $06, $8D, $8D, $06, $AD, $5E, $06, $A8, $B9, $2A, $BC, $A8, $A2, $00, $B9 | LBF66: .byte $4D, $06, $8D, $8D, $06, $AD, $5E, $06, $A8, $B9, $2A, $BC, $A8, $A2, $00, $B9 |
LBF76: .byte $61, $BD, $9D, $2B, $06, $C8, $E8, $8A, $C9, $0D, $D0, $F3, $A9, $01, $8D, $40 | LBF76: .byte $61, $BD, $9D, $2B, $06, $C8, $E8, $8A, $C9, $0D, $D0, $F3, $A9, $01, $8D, $40 |
LBF86: .byte $06, $8D, $41, $06, $8D, $42, $06, $8D, $43, $06, $A9, $00, $8D, $38, $06, $8D | LBF86: .byte $06, $8D, $41, $06, $8D, $42, $06, $8D, $43, $06, $A9, $00, $8D, $38, $06, $8D |
LBF96: .byte $39, $06, $8D, $3A, $06, $8D, $3B, $06, $60, $FF, $00, $00, $00, $00, $00, $00 | LBF96: .byte $39, $06, $8D, $3A, $06, $8D, $3B, $06, $60, $FF, $00, $00, $00, $00, $00, $00 |
LBFA6: .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 | LBFA6: .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 |
| |
;----------------------------------------------[ RESET ]-------------------------------------------- | ;----------------------------------------------[ RESET ]-------------------------------------------- |
| |
RESET: | RESET: |
LBFB0: SEI ;Disables interrupt. | LBFB0: SEI ;Disables interrupt. |
LBFB1: CLD ;Sets processor to binary mode. | LBFB1: CLD ;Sets processor to binary mode. |
LBFB2: LDX #$00 ; | LBFB2: LDX #$00 ; |
LBFB4: STX PPUControl0 ;Clear PPU control registers. | LBFB4: STX PPUControl0 ;Clear PPU control registers. |
LBFB7: STX PPUControl1 ; | LBFB7: STX PPUControl1 ; |
LBFBA:* LDA PPUStatus ; | LBFBA:* LDA PPUStatus ; |
LBFBD: BPL - ;Wait for VBlank. | LBFBD: BPL - ;Wait for VBlank. |
LBFBF:* LDA PPUStatus ; | LBFBF:* LDA PPUStatus ; |
LBFC2: BPL - ; | LBFC2: BPL - ; |
LBFC4: ORA #$FF ; | LBFC4: ORA #$FF ; |
LBFC6: STA MMC1Reg0 ;Reset MMC1 chip.--> | LBFC6: STA MMC1Reg0 ;Reset MMC1 chip.--> |
LBFC9: STA MMC1Reg1 ;(MSB is set). | LBFC9: STA MMC1Reg1 ;(MSB is set). |
LBFCC: STA MMC1Reg2 ; | LBFCC: STA MMC1Reg2 ; |
LBFCF: STA MMC1Reg3 ; | LBFCF: STA MMC1Reg3 ; |
LBFD2: JMP Startup ;($C01A)Does preliminry housekeeping. | LBFD2: JMP Startup ;($C01A)Does preliminry housekeeping. |
| |
;Not used. | ;Not used. |
LBFD5: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $00, $00, $00, $00, $00 | LBFD5: .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $00, $00, $00, $00, $00 |
LBFE5: .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 | LBFE5: .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 |
LBFF5: .byte $00, $00, $00, $00, $00 | LBFF5: .byte $00, $00, $00, $00, $00 |
| |
;----------------------------------------[ Interrupt vectors ]-------------------------------------- | ;----------------------------------------[ Interrupt vectors ]-------------------------------------- |
| |
LBFFA: .word NMI ;($C0D9)NMI vector. | LBFFA: .word NMI ;($C0D9)NMI vector. |
LBFFC: .word RESET ;($FFB0)Reset vector. | LBFFC: .word RESET ;($FFB0)Reset vector. |
LBFFE: .word RESET ;($FFB0)IRQ vector. | LBFFE: .word RESET ;($FFB0)IRQ vector. |
</code> | </code> |
| |