Normal Geemer 0006 B0E5 0F00 0500 0800 0800 A3 00 2300 0000 69E6 0100 0100 C2E6 0A80 4C80 4180 0000 0000 00000000 0000 000000000000 2380 2D80 000000 80AE 05 24F2 48EC DBE1 Initializaion: LDX $0E54 LDA $0F92, X AND #$0003 ;Orientation? Direction to wall: 0 = left, 1 = right, 2 = up, 3 = down ASL A TAY LDA $E2CC, Y ;Initial instruction STA $0F92, X LDA #$804D ;Points to a #$0000. STA $0F8E, X ;Advanced hit detection. Probably isn't used by geemers. LDA #$0001 STA $0F94, X ;Set instruction delay to 1 LDA #$E6C1 STA $0FB2, X ;RTL LDA $0FB4, X ;Speed CMP #$00FF BEQ BRANCH_ALPHA ASL A TAY ;Valid Y are 0 to 3A (0 to 1D for Speed. 1F points to a 0000) LDA $E5F0, Y ;Speeds range from 0 (with 1F) to 8.8 (with 1D) STA $0FA8, X ;Vertical speed STA $0FAA, X ;Horizontal speed BRANCH_ALPHA LDA $0F86, X ;Property bits... AND #$0003 ;These two are unknown... orientation? 2 = left, 3 = up, 0 = right?, 1 = down? BNE BRANCH_BETA LDA $0FA8, X EOR #$FFFF INC A STA $0FA8, X ;Invert Vertical Speed RTL BRANCH_BETA CMP #$0002 BNE BRANCH_GAMMA LDA $0FAA, X EOR #$FFFF INC A STA $0FAA, X ;Invert Horizontal Speed BRANCH_GAMMA RTL Geemer AI instruction starts: Left, Right, Up, Down E25C, E278, E294, E2B0 E25C: 60 E6 C8 E6 03 00 0E E5 03 00 24 E5 03 00 3A E5 03 00 50 E5 03 00 66 E5 ED 80 60 E2 E278: 60 E6 C8 E6 03 00 C4 E3 03 00 DA E3 03 00 F0 E3 03 00 06 E4 03 00 1C E4 ED 80 7C E2 E294: 60 E6 F2 E7 03 00 32 E4 03 00 48 E4 03 00 5E E4 03 00 74 E4 03 00 8A E4 ED 80 98 E2 E2B0: 60 E6 F2 E7 03 00 E8 E2 03 00 FE E2 03 00 14 E3 03 00 2A E3 03 00 40 E3 ED 80 B4 E2 E660: Put argument (2 bytes) into 0FB2,X 80ED: Go to the argument for the next instruction Main movement AI LDX $0E54 JMP ($0FB2, X) (E6C8 = vertical movement, E7F2 = horizontal movement) Vertical: LDA $1840 ;Screen shake type CMP #$001E BNE BRANCH_ALPHA LDA $183E ;Screen shake duration CMP #$0014 BNE BRANCH_ALPHA LDA $0FB2, X STA $7E7806, X LDA #$E785 ;falling AI? STA $0FB2, X BRANCH_ALPHA STZ $12 STZ $14 LDA $0FA8, X BPL BRANCH_BETA DEC $14 ;So, top byte is 00 if plus, FF if minus. BRANCH_BETA STA $13 ;Speed is measured in 1/100 of a pixel LDA $14 BPL BRANCH_GAMMA DEC A BRA BRANCH_DELTA BRANCH_GAMMA INC A BRANCH_DELTA STA $14 JSL $A0C6AB ; $1046AB IN ROM BCC BRANCH_EPSILON LDA #$0000 STA $7E7808, X JSL $A0C8AD ; $1048AD IN ROM STZ $12 STZ $14 LDA $0FAA, X BPL BRANCH_ZETA DEC $14 BRANCH_ZETA STA $13 JSL $A0C786 ; $104786 IN ROM BCS BRANCH_THETA RTL BRANCH_THETA LDA $0FA8, X EOR #$FFFF INC A STA $0FA8, X LDY $0FB6, X LDA $0FAA, X BPL BRANCH_IOTA LDA $E630, Y BRA BRANCH_KAPPA BRANCH_IOTA LDA $E63C, Y BRANCH_KAPPA STA $0F92, X LDA #$0001 STA $0F94, X RTL BRANCH_EPSILON LDA $7E7808, X INC A STA $7E7808, X CMP #$0004 BMI BRANCH_LAMBDA LDA $0FB2, X STA $7E7806, X LDA #$E785 STA $0FB2, X RTL BRANCH_LAMBDA LDA $0FAA, X EOR #$FFFF INC A STA $0FAA, X LDY $0FB6, X LDA $0FAA, X BPL BRANCH_MU LDA $E630, Y BRA BRANCH_NU BRANCH_MU LDA $E63C, Y BRANCH_NU STA $0F92, X LDA #$0001 STA $0F94, X RTL Geemer 'Boss' A0:F850 0006 A2DF 0070 0500 0800 0800 A3 01 2300 0000 69E6 0100 0100 C2E6 2380 XXXX 4180 0000 0400 00000000 0000 000000000000 2380 2D80 000000 80AE 05 24F2 48EC DBE1 tile pal hp dmg wide high Bank # of hurt Boss AI Norm Grap Hurt Froz XRay die PB Tch. Beam tile | | | | get ptr Ptr "hurt" snd. num Init Move AI AI AI or anim Pntr Pntr Pntr set | | | name pointer lgth frames Run AI? Rsrv | | pointer to enemy resistances ??? Once AI | pointer to enemy drop chances, CHANGE 0006A2DF0070050008000800A3012300000069E601000100C2E6238060F441800000040000000000000000000000000023802D8000000080AE0524F248ECDBE1 Speed will be 7 A3:F460 LDA $0F9C,X CMP #$0010 BMI Setup BEQ Finish BPL Dieing Finish: LDA $7ED828 ORA #$0004 STA $7ED828 JML $A0A3AF Setup: LDA #$00A6 STA $0F9C,X Dieing: AND #$0007 BNE SkipExplosion JSL $808111 AND #$001F SBC #$0010 ADC $0F7A,X STA $12 LDA $05E6 AND #$001F SBC #$0010 ADC $0F7E,X STA $14 LDA #$0003 STA $16 STZ $18 JSL $B4BC26 LDA #$0010 JSL $809125 SkipExplosion: LDA $0FA8,X BMI $04 DEC DEC BRA $02 INC INC STA $0FA8,X LDA $0FAA,X BMI $02 DEC DEC INC STA $0FAA,X JMP $E6C2 BD9C0FC910003013F0021015AF28D87E0904008F28D87E5CAFA3A0A9A6009D9C0F290700D02F22118180291F00E910007D7A0F8512ADE605291F00E910007D7E0F8514A90300851664182226BCB4A9100022259180BDA80F30043A3A80021A1A9DA80FBDAA0F30023A3A1A9DAA0F4CC2E6