lorom ;TODO: ;Edit tile falling ;Edit boss location ;Add log entry ;Add randomized Zebes start ;Make Zebes actually start ;Some stuff for Ceres's escape ;org $A6F674 ; DB $80 ;Always branch - door in Ridley's room never opens. Wait no, let's hi-jack it instead! Maybe? ;Other stuff: ;Edited graphics at B0BA00 in TLP for a cracked tile ;Used SMILE to add a Ceres stair tile and the cracked tile in Ridley's room org $82CA9B ;For now, just moving Ridley's Ceres position. Might redo the code here later and free up a bunch of ROM. print pc DW $00A0, $0080 DW $FFFF ;Also changing graphics from layer 2 to layer 1 ;Map for Ceres has been copy-pasted and then simply hex-edited. ;Scroll routine optimization print pc org $9096C0 print pc ; PHP ; REP #$30 LDA $0AF6 CMP $0B10 BPL + LDA $0B12 SEC SBC $0AF8 STA $0DA4 LDA $0B10 SBC $0AF6 ; CLC ; ADC $9EAD ; STA $0DA2 BRA ++ + LDA $0AF8 SEC SBC $0B12 STA $0DA4 LDA $0AF6 SBC $0B10 ++ ; CLC ; ADC $9EAD INC CMP #$0010 BMI + LDA #$0010 STZ $0DA4 + STA $0DA2 ; PLP RTS print pc org $90EA5E print pc DB $00 ;Allow pausing in Ceres ;Unreserve graphics for Ceres (I think these are for special PLM graphics?) print pc org $848232 print pc JSR CeresCheck BEQ + ; PHP PHB ; REP #$30 PHK PLB STZ $1C2D TDC TAX - PHX LDY $1C2F, X JSR $8764 ; $20764 IN ROM PLX INX INX CPX #$0008 BPL - PLB ; PLP + RTL ;Startup equipment print pc org $81B2CB print pc REP #$30 LDA #$0063 STA $09C4 STA $09C2 ; LDA #$0000 STZ $09C8 STZ $09C6 ; LDA #$0000 STZ $09CC STZ $09CA ; LDA #$0000 STZ $09D0 STZ $09CE STZ $09D2 STZ $09A8 STZ $09A6 LDA #$1004 STA $09A4 STA $09A2 STZ $09C0 STZ $09D4 STZ $09D6 STZ $09D8 ; LDA #$0800 ;Unnecessary, I think ; STA $09AA ; LDA #$0400 ; STA $09AC ; LDA #$0200 ; STA $09AE ; LDA #$0100 ; STA $09B0 LDA #$8000 STA $09B6 LSR STA $09B8 LSR STA $09BA LDA #$0080 STA $09B4 LSR STA $09B2 LSR STA $09BC LSR STA $09BE STZ $09DA STZ $09DC STZ $09DE STZ $09E0 STZ $09E2 STZ $09E4 STZ $09EA LDA #$0001 STA $09E6 STA $09E8 TDC LDX #$00DE - STA $7ED830,X DEX DEX BPL - LDX #$06FE - STA $7ECD52, X DEX DEX BPL - LDX #$0012 - LDA.w PiratePuzzleDefault,X STA $7ED93A,X DEX DEX BPL - RTS PiratePuzzleDefault: DB $E9, $09, $E4 : DW 1243 DB $E0, $EB, $EB : DW 1170 DB $E9, $09, $E4 : DW 1103 DB $E1, $EB, $EA : DW 1000 print pc org $A6F665 Waiting: org $A6F66A print pc LDA $7ED82E LSR BCC Waiting JMP A6Free ;Move text to layer 2 print pc org $A6C162 print pc DW $48CB ;Moving Emergency print pc org $A6C456 print pc DW $4905 ;Move line 1 print pc org $A6C470 print pc DW $4945 print pc org $A6C486 print pc DW $4985 ;Change shaking from BG2 to BG1 (23 --> 08, 1D --> 02, 21 --> 06) print pc org $A6F770 print pc LDY #$0002 print pc org $A6D943 print pc LDA #$0006 print pc org $A6AADD print pc LDA #$0008 print pc org $A6FF82 ;Why did I put this here? print pc A6Free: JSL $8483D7 DB $02, $0C DW #$F143 JMP $812F ;Should be fine by itself ;org $949E24 ; DW $B62F ;Guess we aren't using this. Oops! print pc org $94A022 print pc DW CeresBombedBlock print pc org $94937B print pc DW $D098 ;Prevent the block from being walkthrough. Blue suit or something may glitch it, but that should be impossible. print pc org $84F143 print pc DW $84E6 : DW CeresCrumblePLM CeresCrumblePLM: DW $0001 : DW CeresBombBlock DW $86BC CeresBombBlock: DW $0001 : DW $F05F ;Make sure the BTS is 08 in SMILE DW $0000 CeresBombedBlock: DW $CEDA : DW CeresBombedBlockInst CeresBombedBlockInst: ;Possible graphics: 124, 126, 127... ;Let's try D27, 124, 125, 01F DW $0004 : DW CeresBB1 DW $8C46 : DB $0A DW $0004 : DW CeresBB2 DW $0004 : DW CeresBB3 DW $0001 : DW CeresAir DW $86BC CeresBB1: DW $0001 : DW $8D27 DW $0000 CeresBB2: DW $0001 : DW $0124 DW $0000 CeresBB3: DW $0001 : DW $0125 DW $0000 CeresAir: DW $0001 : DW $001F DW $0000 CeresCheck: LDA $079F CMP #$0006 RTS print pc