; Routine: Animate Ridley's ribs { $A6:DA0C AF 0C 78 7E LDA $7E780C[$7E:780C] $A6:DA10 3A DEC A $A6:DA11 8F 0C 78 7E STA $7E780C[$7E:780C] $A6:DA15 D0 F4 BNE $F4 [$DA0B] $A6:DA17 AF 0A 78 7E LDA $7E780A[$7E:780A] $A6:DA1B AA TAX $A6:DA1C BD 00 00 LDA $0000,x[$A6:DA71] $A6:DA1F 10 06 BPL $06 [$DA27] $A6:DA21 8F 0A 78 7E STA $7E780A[$7E:780A] $A6:DA25 80 F4 BRA $F4 [$DA1B] $A6:DA27 8F 0C 78 7E STA $7E780C[$7E:780C] $A6:DA2B AC 30 03 LDY $0330 [$7E:0330] $A6:DA2E A9 00 B0 LDA #$B000 $A6:DA31 99 D3 00 STA $00D3,y[$7E:00D3] $A6:DA34 99 DA 00 STA $00DA,y[$7E:00DA] $A6:DA37 BD 02 00 LDA $0002,x[$A6:DA73] $A6:DA3A 99 D2 00 STA $00D2,y[$7E:00D2] $A6:DA3D BD 04 00 LDA $0004,x[$A6:DA75] $A6:DA40 99 D9 00 STA $00D9,y[$7E:00D9] $A6:DA43 A9 20 72 LDA #$7220 $A6:DA46 99 D5 00 STA $00D5,y[$7E:00D5] $A6:DA49 A9 20 73 LDA #$7320 $A6:DA4C 99 DC 00 STA $00DC,y[$7E:00DC] $A6:DA4F A9 40 00 LDA #$0040 $A6:DA52 99 D0 00 STA $00D0,y[$7E:00D0] $A6:DA55 99 D7 00 STA $00D7,y[$7E:00D7] $A6:DA58 98 TYA $A6:DA59 18 CLC $A6:DA5A 69 0E 00 ADC #$000E $A6:DA5D A8 TAY $A6:DA5E 8C 30 03 STY $0330 [$7E:0330] $A6:DA61 A9 00 00 LDA #$0000 $A6:DA64 99 D0 00 STA $00D0,y[$7E:00DE] $A6:DA67 8A TXA $A6:DA68 18 CLC $A6:DA69 69 06 00 ADC #$0006 $A6:DA6C 8F 0A 78 7E STA $7E780A[$7E:780A] $A6:DA70 60 RTS $A6:DA71 db 14, 00, 40, 98, 40, 9A, 14, 00, 00, B8, 00, B9, 14, 00, 40, B8, 40, B9, 14, 00, 00, B8, 00, B9, 71, DA } ; Routine: Write to VRAM for Ridley's claws { $A6:DA8B A2 D0 DA LDX #$DAD0 $A6:DA8E 90 03 BCC $03 [$DA93] $A6:DA90 A2 D4 DA LDX #$DAD4 $A6:DA93 AC 30 03 LDY $0330 [$7E:0330] $A6:DA96 A9 00 B0 LDA #$B000 $A6:DA99 99 D3 00 STA $00D3,y[$7E:00D3] $A6:DA9C 99 DA 00 STA $00DA,y[$7E:00DA] $A6:DA9F BD 00 00 LDA $0000,x[$A6:DAD4] $A6:DAA2 99 D2 00 STA $00D2,y[$7E:00D2] $A6:DAA5 BD 02 00 LDA $0002,x[$A6:DAD6] $A6:DAA8 99 D9 00 STA $00D9,y[$7E:00D9] $A6:DAAB A9 C0 7A LDA #$7AC0 $A6:DAAE 99 D5 00 STA $00D5,y[$7E:00D5] $A6:DAB1 A9 C0 7B LDA #$7BC0 $A6:DAB4 99 DC 00 STA $00DC,y[$7E:00DC] $A6:DAB7 A9 80 00 LDA #$0080 $A6:DABA 99 D0 00 STA $00D0,y[$7E:00D0] $A6:DABD 99 D7 00 STA $00D7,y[$7E:00D7] $A6:DAC0 98 TYA $A6:DAC1 18 CLC $A6:DAC2 69 0E 00 ADC #$000E $A6:DAC5 A8 TAY $A6:DAC6 8C 30 03 STY $0330 [$7E:0330] $A6:DAC9 A9 00 00 LDA #$0000 $A6:DACC 99 D0 00 STA $00D0,y[$7E:00DE] $A6:DACF 60 RTS $A6:DAD0 db 80, A9, 80, AB, 80, B8, 80, B9 } ; Routine: Drawing routine for Ridley's wings { $A6:DAD8 AF 20 78 7E LDA $7E7820[$7E:7820] ; Ridley's direction (0 = left, 2 = right) $A6:DADC F0 06 BEQ $06 [$DAE4] $A6:DADE 3A DEC A $A6:DADF F0 20 BEQ $20 [$DB01] $A6:DAE1 A9 0A 00 LDA #$000A $A6:DAE4 18 CLC $A6:DAE5 6F 0E 78 7E ADC $7E780E[$7E:780E] $A6:DAE9 0A ASL A $A6:DAEA AA TAX $A6:DAEB BC 02 DB LDY $DB02,x[$A6:DB0C] $A6:DAEE AF 18 78 7E LDA $7E7818[$7E:7818] $A6:DAF2 85 16 STA $16 [$7E:0016] $A6:DAF4 AD 7A 0F LDA $0F7A [$7E:0F7A] ; Ridley's X position $A6:DAF7 85 12 STA $12 [$7E:0012] $A6:DAF9 AD 7E 0F LDA $0F7E [$7E:0F7E] ; Ridley's Y position $A6:DAFC 85 14 STA $14 [$7E:0014] $A6:DAFE 4C 13 DC JMP $DC13 [$A6:DC13] ; General use draw, $16 has pallete, Y is pointer to sprite data. $A6:DB01 60 RTS $A6:DB02 db 4A, DD, 6A, DD, 85, DD, 96, DD, A7, DD, C2, DD, A7, DD, 96, DD, 85, DD, 6A, DD, E2, DD, 02, DE, 1D, DE, 2E, DE, 3F, DE, 5A, DE, 3F, DE, 2E, DE, 1D, DE, 02, DE } ; Routine: Draw tail { $A6:DB2A AD 86 0F LDA $0F86 [$7E:0F86] ; Property bits of Ridley $A6:DB2D 29 00 01 AND #$0100 $A6:DB30 F0 01 BEQ $01 [$DB33] $A6:DB33 AF A4 20 7E LDA $7E20A4[$7E:20A4] ; Tail tip X position $A6:DB37 85 12 STA $12 [$7E:0012] $A6:DB39 AF A6 20 7E LDA $7E20A6[$7E:20A6] ; Tail tip Y position $A6:DB3D 85 14 STA $14 [$7E:0014] $A6:DB3F AF A2 20 7E LDA $7E20A2[$7E:20A2] $A6:DB43 18 CLC $A6:DB44 6F 8E 20 7E ADC $7E208E[$7E:208E] $A6:DB48 18 CLC $A6:DB49 69 08 00 ADC #$0008 $A6:DB4C 29 F0 00 AND #$00F0 $A6:DB4F 4A LSR A $A6:DB50 4A LSR A $A6:DB51 4A LSR A $A6:DB52 AA TAX $A6:DB53 BC BA DC LDY $DCBA,x[$A6:DCD0] $A6:DB56 20 C2 DB JSR $DBC2 [$A6:DBC2] $A6:DB59 AF 92 20 7E LDA $7E2092[$7E:2092] $A6:DB5D 85 14 STA $14 [$7E:0014] $A6:DB5F AF 90 20 7E LDA $7E2090[$7E:2090] $A6:DB63 85 12 STA $12 [$7E:0012] $A6:DB65 A0 9E DC LDY #$DC9E $A6:DB68 20 C2 DB JSR $DBC2 [$A6:DBC2] $A6:DB6B AF 7C 20 7E LDA $7E207C[$7E:207C] $A6:DB6F 85 12 STA $12 [$7E:0012] $A6:DB71 AF 7E 20 7E LDA $7E207E[$7E:207E] $A6:DB75 85 14 STA $14 [$7E:0014] $A6:DB77 A0 9E DC LDY #$DC9E $A6:DB7A 20 C2 DB JSR $DBC2 [$A6:DBC2] $A6:DB7D AF 68 20 7E LDA $7E2068[$7E:2068] $A6:DB81 85 12 STA $12 [$7E:0012] $A6:DB83 AF 6A 20 7E LDA $7E206A[$7E:206A] $A6:DB87 85 14 STA $14 [$7E:0014] $A6:DB89 A0 97 DC LDY #$DC97 $A6:DB8C 20 C2 DB JSR $DBC2 [$A6:DBC2] $A6:DB8F AF 54 20 7E LDA $7E2054[$7E:2054] $A6:DB93 85 12 STA $12 [$7E:0012] $A6:DB95 AF 56 20 7E LDA $7E2056[$7E:2056] $A6:DB99 85 14 STA $14 [$7E:0014] $A6:DB9B A0 97 DC LDY #$DC97 $A6:DB9E 20 C2 DB JSR $DBC2 [$A6:DBC2] $A6:DBA1 AF 40 20 7E LDA $7E2040[$7E:2040] $A6:DBA5 85 12 STA $12 [$7E:0012] $A6:DBA7 AF 42 20 7E LDA $7E2042[$7E:2042] $A6:DBAB 85 14 STA $14 [$7E:0014] $A6:DBAD A0 90 DC LDY #$DC90 $A6:DBB0 20 C2 DB JSR $DBC2 [$A6:DBC2] $A6:DBB3 AF 2C 20 7E LDA $7E202C[$7E:202C] $A6:DBB7 85 12 STA $12 [$7E:0012] $A6:DBB9 AF 2E 20 7E LDA $7E202E[$7E:202E] $A6:DBBD 85 14 STA $14 [$7E:0014] $A6:DBBF A0 90 DC LDY #$DC90 $A6:DBC2 AF 18 78 7E LDA $7E7818[$7E:7818] $A6:DBC6 85 16 STA $16 [$7E:0016] $A6:DBC8 4C 13 DC JMP $DC13 [$A6:DC13] ; General use draw, $16 has pallete, Y is pointer to sprite data. $A6:DBCB 85 00 STA $00 [$7E:0000] $A6:DBCD 1A INC A $A6:DBCE 1A INC A $A6:DBCF 85 03 STA $03 [$7E:0003] $A6:DBD1 E2 20 SEP #$20 $A6:DBD3 A9 7E LDA #$7E $A6:DBD5 85 02 STA $02 [$7E:0002] $A6:DBD7 85 05 STA $05 [$7E:0005] $A6:DBD9 C2 20 REP #$20 $A6:DBDB A7 00 LDA [$00] [$7E:7806] $A6:DBDD 30 02 BMI $02 [$DBE1] $A6:DBE1 AA TAX $A6:DBE2 BD 00 00 LDA $0000,x[$A6:BF31] $A6:DBE5 30 0D BMI $0D [$DBF4] $A6:DBE7 C7 03 CMP [$03] [$7E:7808] $A6:DBE9 D0 1F BNE $1F [$DC0A] $A6:DBEB E8 INX $A6:DBEC E8 INX $A6:DBED E8 INX $A6:DBEE E8 INX $A6:DBEF BD 00 00 LDA $0000,x[$A6:BF35] $A6:DBF2 10 0A BPL $0A [$DBFE] $A6:DBF4 85 06 STA $06 [$7E:0006] $A6:DBF6 E8 INX $A6:DBF7 E8 INX $A6:DBF8 F4 EE DB PEA $DBEE $A6:DBFB 6C 06 00 JMP ($0006)[$A6:BFF2] $A6:DBFE A9 01 00 LDA #$0001 $A6:DC01 87 03 STA [$03] [$7E:7808] $A6:DC03 8A TXA $A6:DC04 87 00 STA [$00] [$7E:7806] $A6:DC06 BC 02 00 LDY $0002,x[$A6:BF37] $A6:DC09 60 RTS $A6:DC0A A7 03 LDA [$03] [$7E:7808] $A6:DC0C 1A INC A $A6:DC0D 87 03 STA [$03] [$7E:7808] $A6:DC0F BC 02 00 LDY $0002,x[$A6:BF37] $A6:DC12 60 RTS } ; Jump target: General use draw, $16 has pallete, Y is pointer to sprite data. { $A6:DC13 B9 00 00 LDA $0000,y[$A6:BFFD] $A6:DC16 C8 INY $A6:DC17 C8 INY $A6:DC18 85 18 STA $18 [$7E:0018] $A6:DC1A AE 90 05 LDX $0590 [$7E:0590] $A6:DC1D 18 CLC $A6:DC1E B9 01 00 LDA $0001,y[$A6:C000] $A6:DC21 29 00 FF AND #$FF00 $A6:DC24 10 03 BPL $03 [$DC29] $A6:DC26 09 FF 00 ORA #$00FF $A6:DC29 EB XBA $A6:DC2A 18 CLC $A6:DC2B 65 14 ADC $14 [$7E:0014] $A6:DC2D 38 SEC $A6:DC2E ED 15 09 SBC $0915 [$7E:0915] $A6:DC31 30 4F BMI $4F [$DC82] $A6:DC33 C9 E0 00 CMP #$00E0 $A6:DC36 10 4A BPL $4A [$DC82] $A6:DC38 85 1A STA $1A [$7E:001A] $A6:DC3A B9 00 00 LDA $0000,y[$A6:BFFF] $A6:DC3D 65 12 ADC $12 [$7E:0012] $A6:DC3F 38 SEC $A6:DC40 ED 11 09 SBC $0911 [$7E:0911] $A6:DC43 9D 70 03 STA $0370,x[$7E:0370] $A6:DC46 29 00 01 AND #$0100 $A6:DC49 F0 0E BEQ $0E [$DC59] $A6:DC4B BF 9F 85 81 LDA $81859F,x[$81:859F] $A6:DC4F 85 1C STA $1C [$7E:001C] $A6:DC51 B2 1C LDA ($1C) [$7E:0570] $A6:DC53 1F 9F 83 81 ORA $81839F,x[$81:839F] $A6:DC57 92 1C STA ($1C) [$7E:0570] $A6:DC59 B9 00 00 LDA $0000,y[$A6:BFFF] $A6:DC5C 10 0E BPL $0E [$DC6C] $A6:DC5E BF 9F 85 81 LDA $81859F,x[$81:85AF] $A6:DC62 85 1C STA $1C [$7E:001C] $A6:DC64 B2 1C LDA ($1C) [$7E:0570] $A6:DC66 1F A1 83 81 ORA $8183A1,x[$81:83B1] $A6:DC6A 92 1C STA ($1C) [$7E:0570] $A6:DC6C A5 1A LDA $1A [$7E:001A] $A6:DC6E 9D 71 03 STA $0371,x[$7E:0371] $A6:DC71 B9 03 00 LDA $0003,y[$A6:C002] $A6:DC74 05 16 ORA $16 [$7E:0016] $A6:DC76 9D 72 03 STA $0372,x[$7E:0372] $A6:DC79 8A TXA $A6:DC7A 18 CLC $A6:DC7B 69 04 00 ADC #$0004 $A6:DC7E 29 FF 01 AND #$01FF $A6:DC81 AA TAX $A6:DC82 98 TYA $A6:DC83 18 CLC $A6:DC84 69 05 00 ADC #$0005 $A6:DC87 A8 TAY $A6:DC88 C6 18 DEC $18 [$7E:0018] $A6:DC8A D0 92 BNE $92 [$DC1E] $A6:DC8C 8E 90 05 STX $0590 [$7E:0590] $A6:DC8F 60 RTS ; Data used here? { $A6:BFFD db 05, 00, 00, 00, 08, 0D, F5, F8, 01, 08, 0D, B5, 00, 00, F0, 0D, 75, F8, 01, F0, 0D, 35, F8, 81, F8, 42, 37, 05, 00, 00, 00, 08, 0D, F5, F8, 01, 08, 0D, B5, 00, 00, F0, 0D, 75, F8, 01, F0, 0D, 35, F8, 81, F8, 4C, 37, 05, 00, 00, 00, 08, 0D, F5, F8, 01, 08, 0D, B5, 00, 00, F0, 0D, 75, F8, 01, F0, 0D, 35, F8, 81, F8, 4E, 37 } } ; Data used for drawing stuff? { $A6:DC90 db 01, 00, F8, C3, F8, E0, 31, 01, 00, F8, C3, F8, E2, 31, 01, 00, F8, C3, F8, E4, 31 $A6:DCBA db 2E, DD, 27, DD, 20, DD, 19, DD, 12, DD, 0B, DD, 04, DD, FD, DC, F6, DC, EF, DC, E8, DC, E1, DC, DA, DC, 43, DD, 3C, DD, 35, DD, 01, 00, F0, C3, F8, E6, 31, 01, 00, F0, C3, F4, E8, 31, 01, 00, F2, C3, F3, EA, 31, 01, 00, F4, C3, F0, EC, 31, 01, 00, F8, C3, F0, EE, 31, 01, 00, FC, C3, F0, EC, 71, 01, 00, FE, C3, F3, EA, 71, 01, 00, 00, C2, F4, E8, 71, 01, 00, 00, C2, F8, E6, 71, 01, 00, 00, C2, FC, E8, F1, 01, 00, FE, C3, FE, EA, F1, 01, 00, FC, C3, 00, EC, F1, 01, 00, F9, C3, 00, EE, F1, 01, 00, F4, C3, FF, EC, B1, 01, 00, F2, C3, FE, EA, B1, 01, 00, F0, C3, FC, E8, B1, 06, 00, 2C, 00, D7, 08, 31, 0C, 00, EF, 28, 31, 1C, C2, DF, 16, 31, 0C, C2, DF, 14, 31, 1C, C2, D7, 06, 31, 0C, C2, D7, 04, 31, 05, 00, 2C, 00, E4, 1D, 31, 1C, C2, E4, 1B, 31, 0C, C2, E4, 19, 31, 1C, C2, DC, 0B, 31, 0C, C2, DC, 09, 31, 03, 00, 2C, 00, F0, 48, 31, 1C, C2, E8, 36, 31, 0C, C2, E8, 34, 31, 03, 00, 2C, 00, E8, 48, B1, 1C, C2, E8, 36, B1, 0C, C2, E8, 34, B1, 05, 00, 2C, 00, F2, 1D, B1, 1C, C2, EA, 1B, B1, 0C, C2, EA, 19, B1, 1C, C2, F2, 0B, B1, 0C, C2, F2, 09, B1, 06, 00, 2C, 00, FF, 08, B1, 0C, 00, E7, 28, B1, 1C, C2, EF, 16, B1, 0C, C2, EF, 14, B1, 1C, C2, F7, 06, B1, 0C, C2, F7, 04, B1, 06, 00, CC, 01, D7, 08, 71, EC, 01, EF, 28, 71, D4, C3, DF, 16, 71, E4, C3, DF, 14, 71, D4, C3, D7, 06, 71, E4, C3, D7, 04, 71, 05, 00, CC, 01, E4, 1D, 71, D4, C3, E4, 1B, 71, E4, C3, E4, 19, 71, D4, C3, DC, 0B, 71, E4, C3, DC, 09, 71, 03, 00, CC, 01, F0, 48, 71, D4, C3, E8, 36, 71, E4, C3, E8, 34, 71, 03, 00, CC, 01, E8, 48, F1, D4, C3, E8, 36, F1, E4, C3, E8, 34, F1, 05, 00, CC, 01, F2, 1D, F1, D4, C3, EA, 1B, F1, E4, C3, EA, 19, F1, D4, C3, F2, 0B, F1, E4, C3, F2, 09, F1, 06, 00, CC, 01, FF, 08, F1, EC, 01, E7, 28, F1, D4, C3, EF, 16, F1, E4, C3, EF, 14, F1, D4, C3, F7, 06, F1, E4, C3, F7, 04, F1 }