Data for Zeb and Zebbo Zeb Palette: $B3/878B - $B3/87AA 00 38 1D 02 15 00 08 00 03 00 BD 00 13 00 0E 00 0B 00 5A 7F C0 7E E0 6D E0 54 E0 03 A0 02 40 01 Zeb Graphic AI structure table: $B3/87AB 02 00 B7 89 ;tilemap $B3/87AF 02 00 BE 89 ;tilemap $B3/87B3 02 00 C5 89 ;tilemap $B3/87B7 02 00 CC 89 ;tilemap $B3/87BB 02 00 D3 89 ;tilemap $B3/87BF 02 00 CC 89 ;tilemap $B3/87C3 02 00 C5 89 ;tilemap $B3/87C7 02 00 BE 89 ;tilemap $B3/87CB ED 80 AB 87 ;return to 87AB $B3/87CF 01 00 B7 89 ;tilemap $B3/87D3 01 00 BE 89 ;tilemap $B3/87D7 01 00 CC 89 ;tilemap $B3/87DB 01 00 D3 89 ;tilemap $B3/87DF 01 00 CC 89 ;tilemap $B3/87E3 01 00 BE 89 ;tilemap $B3/87E7 ED 80 CF 87 ;return to 87CF $B3/87EB 02 00 DA 89 ;tilemap $B3/87EF 02 00 E1 89 ;tilemap $B3/87F3 02 00 E8 89 ;tilemap $B3/87F7 02 00 EF 89 ;tilemap $B3/87FB 02 00 F6 89 ;tilemap $B3/88FF 02 00 EF 89 ;tilemap $B3/8803 02 00 E8 89 ;tilemap $B3/8807 02 00 E1 89 ;tilemap $B3/880B ED 80 EB 87 ;return to 87EB $B3/880F 01 00 DA 89 ;tilemap $B3/8813 01 00 E1 89 ;tilemap $B3/8817 01 00 EF 89 ;tilemap $B3/881B 01 00 F6 89 ;tilemap $B3/881F 01 00 EF 89 ;tilemap $B3/8823 01 00 E1 89 ;tilemap $B3/8827 ED 80 0F 88 ;return to 880F TABLE OF ENTRIES TO DIRECT TO CORRECT GRAPHIC AI TABLE LOCATION $B3/882B - $B3/883A AB 87 CF 87 EB 87 0F 88 1D 8A 31 8A 45 8A 59 8A Initialization AI $B3/883B AE 54 0E LDX $0E54 [$A0:0E54] ;current enemy index $B3/883E BD 7A 0F LDA $0F7A,x[$A0:153A] ;enemy X pos (from room pop) $B3/8841 9D AA 0F STA $0FAA,x[$A0:156A] ;spare enemy RAM $B3/8844 BD 7E 0F LDA $0F7E,x[$A0:153E] ;enemy Y pos (from room pop_) $B3/8847 9D AC 0F STA $0FAC,x[$A0:156C] ;spare enemy RAM $B3/884A 38 SEC $B3/884B E9 10 00 SBC #$0010 $B3/884E 9F 00 78 7E STA $7E7800,x[$7E:7DC0] ;more general enemy use RAM $B3/8852 A9 80 88 LDA #$8880 ;alternate entry point in running AI $B3/8855 9D B2 0F STA $0FB2,x[$A0:1572] ;spare enemy RAM (probably used as a loading index for where to enter running AI) $B3/8858 A9 30 00 LDA #$0030 $B3/885B 9D AE 0F STA $0FAE,x[$A0:156E] ;spawning timer $B3/885E A9 00 00 LDA #$0000 $B3/8861 9D B0 0F STA $0FB0,x[$A0:1570] ;again $B3/8864 9F 02 78 7E STA $7E7802,x[$7E:7DC2] ;and again $B3/8868 A9 AB 87 LDA #$87AB ;start of Zeb graphic AI $B3/886B 9D 92 0F STA $0F92,x[$A0:1552] ;pointer to AI structure. Acts like PLMs instruction pointer $B3/886E BD B4 0F LDA $0FB4,x[$A0:1574] ;SPEED in SMILE $B3/8871 F0 06 BEQ $06 [$8879] ;if set, end now $B3/8873 A9 1D 8A LDA #$8A1D ;otherwise load start of Zebbo graphic AI structure $B3/8876 9D 92 0F STA $0F92,x[$A0:1552] ;and store here as pointer to AI structure $B3/8879 6B RTL Running AI. $B3/887A AE 54 0E LDX $0E54 [$A0:0E54] ;current enemy index $B3/887D 7C B2 0F JMP ($0FB2,x)[$A0:0000] ;jump to location in running AI $B3/8880 AE 54 0E LDX $0E54 [$A0:0E54] ;current enemy index $B3/8883 22 70 AD A0 JSL $A0AD70[$A0:AD70] ;determines if enemy is on screen or not $B3/8887 D0 06 BNE $06 [$888F] ;if negative, end $B3/8889 A9 90 88 LDA #$8890 ;boundary checks in running AI $B3/888C 9D B2 0F STA $0FB2,x[$A0:1572] ;entrance to running AI $B3/888F 6B RTL check if samus is in bounds for enemy spawn $B3/8890 22 DD AE A0 JSL $A0AEDD[$A0:AEDD] ;subtract samus Y from enemy Y $B3/8894 10 23 BPL $23 [$88B9] ;if plus, end (samus below enemy) $B3/8896 C9 A0 FF CMP #$FFA0 ;vertical distance value $B3/8899 30 1E BMI $1E [$88B9] ;if minus, end (samus too high) $B3/889B 22 E5 AE A0 JSL $A0AEE5[$A0:AEE5] ;subtract samus x from enemy x $B3/889F A8 TAY $B3/88A0 3E A8 0F ROL $0FA8,x[$A0:1568] ;spare enemy ram, never initialized $B3/88A3 2A ROL A $B3/88A4 7E A8 0F ROR $0FA8,x[$A0:1568] $B3/88A7 BD 7A 0F LDA $0F7A,x[$A0:153A] ;enemy x position $B3/88AA 38 SEC $B3/88AB ED F6 0A SBC $0AF6 [$A0:0AF6] ;samus x position $B3/88AE 10 04 BPL $04 [$88B4] ;branch if plus (samus to left of enemy) $B3/88B0 49 FF FF EOR #$FFFF ;invert all values $B3/88B3 1A INC A ;and incriment once $B3/88B4 C9 40 00 CMP #$0040 ;compare with horizontal distance value $B3/88B7 90 01 BCC $01 [$88BA] ;if carry clear (within distance) go to next section of AI $B3/88B9 6B RTL makes enemy visible and loads correct entry point for graphic AI to $0F92 $B3/88BA A9 E3 88 LDA #$88E3 ;vertical movement routine when rising from spawn point $B3/88BD 9D B2 0F STA $0FB2,x[$A0:1572] ;entrance to running AI $B3/88C0 BD 86 0F LDA $0F86,x[$A0:1546] ;property bits $B3/88C3 29 FF FE AND #$FEFF ;turn oN 8th bit $B3/88C6 9D 86 0F STA $0F86,x[$A0:1546] ;makes sure enemy is visible $B3/88C9 A9 00 00 LDA #$0000 $B3/88CC 9D 90 0F STA $0F90,x[$A0:1550] ;unknown $B3/88CF 3C A8 0F BIT $0FA8,x[$A0:1568] ;check bit (facing left/right) $B3/88D2 30 05 BMI $05 [$88D9] ;if minus (left), branch $B3/88D4 A9 02 00 LDA #$0002 ;load 0002 $B3/88D7 80 03 BRA $03 [$88DC] ;and jump next instruction $B3/88D9 A9 00 00 LDA #$0000 ;otherwise load 0000 $B3/88DC 9D B0 0F STA $0FB0,x[$A0:1570] ;initialized to 0000 $B3/88DF 20 8B 89 JSR $898B [$A0:898B] ;decides where to enter correct graphic AI table $B3/88E2 6B RTL vertical movement routine when rising from spawn point $B3/88E3 A9 FF FF LDA #$FFFF $B3/88E6 18 CLC $B3/88E7 7D 80 0F ADC $0F80,x[$A0:1540] ;adds 1 to sub-pixel y pos. $B3/88EA 9D 80 0F STA $0F80,x[$A0:1540] ;enemy sub-pixel Y pos. $B3/88ED A9 FE FF LDA #$FFFE $B3/88F0 7D 7E 0F ADC $0F7E,x[$A0:153E] ;adds 2 $B3/88F3 9D 7E 0F STA $0F7E,x[$A0:153E] ;enemy Y pos (from room pop_) $B3/88F6 BF 00 78 7E LDA $7E7800,x[$7E:7DC0] ;initialized to FFEF $B3/88FA DD 7E 0F CMP $0F7E,x[$A0:153E] ;compare to y pos. $B3/88FD 30 1C BMI $1C [$891B] ;if minus, end $B3/88FF BD 7E 0F LDA $0F7E,x[$A0:153E] ;enemy y pos. $B3/8902 CD FA 0A CMP $0AFA [$A0:0AFA] ;compare to samus y $B3/8905 90 02 BCC $02 [$8909] ;if carry clear, skip next instruction $B3/8907 80 12 BRA $12 [$891B] ;branch always to end $B3/8909 BD B0 0F LDA $0FB0,x[$A0:1570] ;load (either 0000 or 0002) $B3/890C 09 01 00 ORA #$0001 ;set first bit $B3/890F 9D B0 0F STA $0FB0,x[$A0:1570] ;and store it back $B3/8912 20 8B 89 JSR $898B [$A0:898B] ;decides where to enter correct graphic AI table $B3/8915 A9 1C 89 LDA #$891C ;horizontal movement routine $B3/8918 9D B2 0F STA $0FB2,x[$A0:1572] ;entrance to running AI $B3/891B 6B RTL horizontal movement routine $B3/891C 3C A8 0F BIT $0FA8,x[$A0:1568] ;check bit (facing left/right) $B3/891F 10 15 BPL $15 [$8936] ;if plus (right), branch $B3/8921 BD 7C 0F LDA $0F7C,x[$A0:153C] ;enemy sub-pixel X pos $B3/8924 38 SEC ;set carry $B3/8925 E9 00 00 SBC #$0000 ;subtract 0000 $B3/8928 9D 7C 0F STA $0F7C,x[$A0:153C] ;store back to sub-pixel x pos $B3/892B BD 7A 0F LDA $0F7A,x[$A0:153A] ;enemy X pos $B3/892E E9 02 00 SBC #$0002 ;subtract 0002 $B3/8931 9D 7A 0F STA $0F7A,x[$A0:153A] ;store back to enemy X pos $B3/8934 80 13 BRA $13 [$8949] ;branch always $B3/8936 A9 00 00 LDA #$0000 ;load 0000 $B3/8939 18 CLC ;clear carry $B3/893A 7D 7C 0F ADC $0F7C,x[$A0:153C] ;add enemy sub-pixel X pos $B3/893D 9D 7C 0F STA $0F7C,x[$A0:153C] ;store back to enemy sub-pixel X pos $B3/8940 A9 02 00 LDA #$0002 ;load 0002 $B3/8943 7D 7A 0F ADC $0F7A,x[$A0:153A] ;add enemy X pos $B3/8946 9D 7A 0F STA $0F7A,x[$A0:153A] ;store back to enemy X pos $B3/8949 22 8E C1 A0 JSL $A0C18E[$A0:C18E] ;determines if enemy is leaving screen SEC (A=0001) or CLC (A=0000) dependent $B3/894D B0 01 BCS $01 [$8950] ;if carry set, branch to next section $B3/894F 6B RTL enemy offscreen and spawning routine $B3/8950 BD AA 0F LDA $0FAA,x[$A0:156A] ;mirror of enemy x pos (initialized spawn location) $B3/8953 9D 7A 0F STA $0F7A,x[$A0:153A] ;enemy X pos $B3/8956 9E 7C 0F STZ $0F7C,x[$A0:153C] ;enemy sub-pixel X pos $B3/8959 BD AC 0F LDA $0FAC,x[$A0:156C] ;mirror of enemy y pos (initialized spawn location) $B3/895C 9D 7E 0F STA $0F7E,x[$A0:153E] ;enemy Y pos $B3/895F 9D 80 0F STA $0F80,x[$A0:1540] ;enemy sub-pixel Y pos $B3/8962 9E B0 0F STZ $0FB0,x[$A0:1570] ;usually either 0000 or 0002 $B3/8965 20 8B 89 JSR $898B [$A0:898B] ;decides where to enter correct graphic AI table $B3/8968 BD 86 0F LDA $0F86,x[$A0:1546] ;property bits $B3/896B 09 00 01 ORA #$0100 ;make sure enemy is invisible $B3/896E 9D 86 0F STA $0F86,x[$A0:1546] ;store back to property bits $B3/8971 A9 30 00 LDA #$0030 $B3/8974 9D AE 0F STA $0FAE,x[$A0:156E] ;spawning timer $B3/8977 A9 7E 89 LDA #$897E ;spawning timer routine $B3/897A 9D B2 0F STA $0FB2,x[$A0:1572] ;entrance to running AI $B3/897D 6B RTL spwaning timer? $B3/897E DE AE 0F DEC $0FAE,x[$A0:156E] ;decriment spawning timer $B3/8981 F0 01 BEQ $01 [$8984] ;if equal, skip to see if respawn needed $B3/8983 6B RTL $B3/8984 A9 90 88 LDA #$8890 ;check if samus is in bounds for enemy spawn $B3/8987 9D B2 0F STA $0FB2,x[$A0:1572] ;entrance to running AI $B3/898A 6B RTL decides where to enter correct graphic AI table $B3/898B AE 54 0E LDX $0E54 [$A0:0E54] ;current enemy index $B3/898E BD B0 0F LDA $0FB0,x[$A0:1570] ;load (either 0000 or 0002) $B3/8991 DF 02 78 7E CMP $7E7802,x[$7E:7DC2] ;compare here (initialized to 0000) $B3/8995 F0 1F BEQ $1F [$89B6] ;if equal, end $B3/8997 9F 02 78 7E STA $7E7802,x[$7E:7DC2] ;if not, store back to here $B3/899B 0A ASL A ;shift left $B3/899C A8 TAY ;transfer to Y $B3/899D BD B4 0F LDA $0FB4,x[$A0:1574] ;load speed value in smile $B3/89A0 D0 05 BNE $05 [$89A7] ;if negative, branch (zeb 0000, zebbo 0002) $B3/89A2 B9 2B 88 LDA $882B,y[$A0:882D] ;if zeb, load graphic AI table entry value (left/right) $B3/89A5 80 03 BRA $03 [$89AA] ;and branch $B3/89A7 B9 33 88 LDA $8833,y[$A0:8835] ;if zebbo, load graphic AI table entry value (left/right) $B3/89AA 9D 92 0F STA $0F92,x[$A0:1552] ;pointer to AI structure $B3/89AD A9 01 00 LDA #$0001 ;load 0001 $B3/89B0 9D 94 0F STA $0F94,x[$A0:1554] ;action delay (Used with $0F92) $B3/89B3 9E 90 0F STZ $0F90,x[$A0:1550] ;store 0 to 0F90 (unknown) $B3/89B6 60 RTS Zeb Graphic tilemaps: $B3/89B7 01 00 F8 81 F8 00 21 $B3/89BE 01 00 F8 81 F8 02 21 $B3/89C5 01 00 F8 81 F8 04 21 $B3/89CC 01 00 F8 81 F8 06 21 $B3/89D3 01 00 F8 81 F8 08 21 $B3/89DA 01 00 F8 81 F8 00 61 $B3/89E1 01 00 F8 81 F8 02 61 $B3/89E8 01 00 F8 81 F8 04 61 $B3/89EF 01 00 F8 81 F8 06 61 $B3/89F6 01 00 F8 81 F8 08 61 Zebbo Palette: $B3/89FD - $B3/8A1C 00 38 95 3F 8B 2E 20 01 60 00 EE 3A 49 22 A4 11 62 09 BB 39 F5 30 6E 2C 27 28 93 7F CE 6E 29 62 Zebbo Graphic AI structure table: $B3/8A1D 02 00 82 8A ;tilemap $B3/8A21 01 00 89 8A ;tilemap $B3/8A25 02 00 90 8A ;tilemap $B3/8A29 01 00 89 8A ;tilemap $B3/8A2D ED 80 1D 8A ;return to 8A1D $B3/8A31 03 00 6D 8A ;tilemap $B3/8A35 03 00 74 8A ;tilemap $B3/8A39 03 00 7B 8A ;tilemap $B3/8A3D 03 00 74 8A ;tilemap $B3/8A41 ED 80 31 8A ;return to 8A31 $B3/8A45 02 00 AC 8A ;tilemap $B3/8A49 01 00 B3 8A ;tilemap $B3/8A4D 02 00 BA 8A ;tilemap $B3/8A51 01 00 B3 8A ;tilemap $B3/8A55 ED 80 45 8A ;return to 8A45 $B3/8A59 03 00 97 8A ;tilemap $B3/8A5D 03 00 9E 8A ;tilemap $B3/8A61 03 00 A5 8A ;tilemap $B3/8A65 03 00 9E 8A ;tilemap $B3/8A69 ED 80 59 8A ;return to 8A59 Zebbo Graphic tilemaps: $B3/8A6D 01 00 F8 81 F8 00 21 $B3/8A74 01 00 F8 81 F8 02 21 $B3/8A7B 01 00 F8 81 F8 04 21 $B3/8A82 01 00 F8 81 F8 06 21 $B3/8A89 01 00 F8 81 F8 08 21 $B3/8A90 01 00 F8 81 F8 0A 21 $B3/8A97 01 00 F8 81 F8 00 61 $B3/8A9E 01 00 F8 81 F8 02 61 $B3/8AA5 01 00 F8 81 F8 04 61 $B3/8AAC 01 00 F8 81 F8 06 61 $B3/8AB3 01 00 F8 81 F8 08 61 $B3/8ABA 01 00 F8 81 F8 0A 61