All information disassembled by DChronos. Please credit. Info date: 2-22-2010 ASM marked with '***' haven't had their descriptions worked out yet. NOTE: This document is not yet complete. Names may change and descriptions may change. However, this contains most of the info you need to create your animation or boss statue. For now, this is meant for advanced users that can understand what's going on below. I'll create a guide sometime for boss statues, but for now, I have a zip file called 'animtiles.zip' that contains explanations about how to create your own animations. For now, if you use that as well as the data sets below, you should be able to figure out how to set up a statue on your own. If you want to create a statue, keep in mind that the way I set the data up below is how you want to set it up yourself. Each set of 2 or 4 bytes must be together, but you can arrange much of it how you want, IE, an ASM pointer must be with the data it's using that is grouped on the same text line, but you can rearrange when the ASM pointer/data is ran during the animation sequence... stuff like that. For the moment, the only thing I have not yet dealt with is setting the statue up via the default method the game uses... instead, I used a plain animation pointer that all the rest of the animations use and set only the statue room to use it. The limitations at the moment are that the bank that the palette data and routines are in, for when the statue fades from gold to gray, only have enough space for 1 more statue... but you can get around this easily by making your own routine and data set wherever you want to set the right values in ram for it. The real limit for this is that there is only enough space in the animation stack (so to speak) only has enough room for 6 animations going at the same time in any 1 room. You might be able to get around this by using setting up more than 6 with a palette animation instead, but if you have any tiles changed during the animation, you'll have to DMA them manually. I'll be updating this guide sometime, but right now, I'm worn out from all the disassebly I've been doing and all the time I spent working on this. So I think I may go onto another thing for now. Keep checking the thread's first post for updates! -> http://forum.metroidconstruction.com, in the Super Metroid forum. Also, my addresses below may randomly be HEX or ROM in the ASM... adresses starting with 3 are in a hex editor, addresses starting with a (bank): are ROM, and the simple 4 number addresses can be either, since adding a 3 in front gets you the direct HEX address or adding the bank number gets you the ROM address. NOTE: Names and info below may change. Animation Data ------*-------------------*- 81CB | BA 81 | Pre-Animation ASM -+-------------------+- 81CD | 0A 00:E4 8E | Animation Table [Game Frame Count; GFX Pointer] 81D1 | 0A 00:64 8F | (Each line is Frame Data) 81D5 | 0A 00:E4 8F | 81D9 | 0A 00:64 8F | -+-------------------+- 81DD | B7 80:CD 81 | Post-Animation ASM -----*-------------------*- [Animation Loop ASM Pointer; Animation Table Start Address] Load Data -----*-------------------*- 826F | CB 81:80 00:C0 19 | [Animation Data Start Address; # GFX Bytes; VRAM Address] -----*-------------------*- Animation Data - Contains all data used during the animation. -> Animation Data Start Address: Above, 81CB, the starting address used by the ASM that loads and stores the animation data that's used by the animation routine. Can either be a pointer to ASM that needs to be ran before loading the data, or the animation table itself. A routine checks to see what's being loaded and branches accordingly. * Pre-Animation ASM - ASM ran before moving onto loading the animation table, and data that may be used by the pre animation ASM. Example: -> BA 81: Pointer to check if Phantoon is dead before deciding to run animation. * Animation Table - Table of animation frame data that is used during animation. Each frame is made up of 2 parts that are 2 bytes each: -> Game Frame Count: Number of in-game frames each animation frame is on screen for. -> GFX Pointer: Address where the current frame's graphics are located, within same bank. * Post-Animation ASM - Pointers to ASM to run after each animation loop, usually the loop ASM, and data that may be used by the post animation ASM. Example: -> Animation Loop ASM Pointer: Pointer to ASM that loads the Animation Table Start Address. -> Animation Table Start Address: Pointer to frame 1 of the animation loop. Load Data - Contains the initial data used to load the animation data. -> Load Data Start Address: Above, 826F, the starting address used by the ASM that loads and stores the graphics loading data that's used by the animation routine. * Animation Data Start Address - Pointer to the start of the animation data, either ASM pointer or the start of the animation table. * # GFX Bytes - Number of graphic bytes to transfer to VRAM each animation frame. * VRAM Address - Address in VRAM to store the transferred graphics to. -- Start Addresses -- Animation Data Start Address - Above, 81CB, the starting address used by the ASM that loads and stores the animation data that's used by the animation ASM. Can either be a pointer to ASM that needs to be ran before loading the data, or the animation table itself. A routine checks to see what's being loaded and branches accordingly. PHB PHK | A | DB | X | Y | DP | S | PB:PC | nvmxdizc e -- 38000 (from 100A0, 11392, 8E34B) -- [Write $8000 to 7E:1EF1; turn on animation] 8000 | 08 | PHP | Push P to stack 8001 | C2 20 | REP #$20 | Reset m on P (16-bit Memory and Accumulator) 8003 | A9 00 80 | LDA #$8000 | Load the value #$8000 to A 8006 | 0C F1 1E | TSB $1EF1 | OR A with value at 7E:1EF1, store result ($8000) to 7E:1EF1 8009 | 28 | PLP | Pull P from stack 800A | 6B | RTL | Pull PB:PC from stack, return to main routine -- 3800B (from 10D00, 8E239) -- [Write $0000 to 7E:1EF1; turn off animation] 800B | 08 | PHP | Push P to stack 800C | C2 20 | REP #$20 | Reset m on P (16-bit Memory and Accumulator) 800E | A9 00 80 | LDA #$8000 | Load the value #$8000 to A 8011 | 1C F1 1E | TRB $1EF1 | Invert A ($7FFF), AND with value at 7E:1EF1; store result ($0000) to 7E:1EF1 8014 | 28 | PLP | Pull P from stack 8015 | 6B | RTL | Pull PB:PC from stack, return to main routine -- 38016 (from 20AA, 164B5) -- [Write $0000 to 7E:1EF5-7E:1F00 (load data start address)] 8016 | 08 | PHP | Push P to stack 8017 | C2 30 | REP #$30 | Reset m,x on P (16-bit Memory, Accumulator, X, and Y) 8019 | DA | PHX | Push X to stack 801A | A2 0A 00 | LDX #$000A | Load the value #$000A to X 801D | 9E F5 1E | STZ $1EF5, x | Store zero to 7E:1EF5 + X (load data start address) 8020 | CA | DEX | Decrement X by 1; set z if X = 0, set n if X is negative 8021 | CA | DEX | Decrement X by 1; set z if X = 0, set n if X is negative 8022 | 10 F9 | BPL $F9 | If X still positive, branch to 3801D, otherwise continue 8024 | FA | PLX | Pull X from stack 8025 | 28 | PLP | Pull P from stack 8026 | 6B | RTL | Pull PB:PC from stack, return to main routine -- 38027 (from 4329C, 432C4, 45967, 45A28, 4ACB7, 791DA, 791E1, 791E8, 791EF, 7B974, 7E1DB) -- [Y=(load data start address); loads value at 7E:1EF5-7E:1F00 (load data start address), checks to see if zero. If not, decrement x by 2 and load/check next address until it finds a clear spot, then branches out to 3803D] From | Tiles Animated | Load Data Pointer in Y ------+----------------------+------------------------ 4329C | (FX1 Lava) | Y=82AB 432C4 | (FX1 Acid) | Y=82C9 45967 | (FX1 Rain) | Y=82E7 45A28 | (FX1 Flower Petals) | Y=82FD 4ACB7 | (All Other BG Tiles) | Y= Varied, see below 791DA | (Kraid's Eye) | Y=8558 (Initiating ASM below) 791E1 | (Phantoon's Eye) | Y=854C 791E8 | (Draygon's Eye) | Y=855E 791EF | (Ridley's Eye) | Y=8552 7B974 | (Treadmill, right) | Y=8275 7E1DB | (Treadmill, left) | Y=827B 8027 | 08 | PHP | Push P to stack 8028 | 8B | PHB | Push DB to stack 8029 | DA | PHX | Push X to stack 802A | 4B | PHK | Push PB to stack 802B | AB | PLB | Pull DB from stack; DB is now same as PB (87) 802C | A2 0A 00 | LDX #$000A | Load the value #$000A to X 802F | BD F5 1E | LDA $1EF5, x | Load value at 7E:1EF5 + X (load data start address) to A 8032 | F0 09 | BEQ $09 | If A is zero, branch to 3803D, otherwise continue 8034 | CA | DEX | Decrement X by 1; set z if X = 0, set n if X is negative 8035 | CA | DEX | Decrement X by 1; set z if X = 0, set n if X is negative 8036 | 10 F7 | BPL $F7 | If X still positive, branch to 3802F, otherwise continue 8038 | FA | PLX | Pull X from stack 8039 | AB | PLB | Pull DB from stack 803A | 28 | PLP | Pull P from stack 803B | 38 | SEC | Set carry bit 803C | 6B | RTL | Pull PB:PC from stack, return to main routine -- 3803D (from branch at 38032) -- [Write (load data start address), (animation data start address), (# gfx bytes), (VRAM address), and (initial game frame count) to clear spot at respective addresses (RAM + X)] 803D | 98 | TYA | Transfer Y (load data start address) to A 803E | 9D F5 1E | STA $1EF5, x | Store A (load data start address) to 7E:1EF5 + X (first clear spot) 8041 | 9E 01 1F | STZ $1F01, x | Store zero to 7E:1F01 + X (unknown) 8044 | B9 00 00 | LDA $0000, y | Load (animation data start address) to A 8047 | 9D 0D 1F | STA $1F0D, x | Store A (animation data start address) to 7E:1F0D + X 804A | 9E 25 1F | STZ $1F25, x | Store zero to 7E:1F25 + X (gfx pointer) 804D | B9 02 00 | LDA $0002, y | Load (# gfx bytes) to A 8050 | 9D 31 1F | STA $1F31, x | Store (# gfx bytes) to 7E:1F31 + X 8053 | B9 04 00 | LDA $0004, y | Load (VRAM address) to A 8056 | 9D 3D 1F | STA $1F3D, x | Store (VRAM address) to 7E:1F3D + X 8059 | A9 01 00 | LDA #$0001 | Load the value #$0001 (initial game frame count) to A 805C | 9D 19 1F | STA $1F19, x | Store $0001 (initial game frame count) to 7E:1F19 + X 805F | FA | PLX | Pull X from stack 8060 | AB | PLB | Pull DB from stack 8061 | 28 | PLP | Pull P from stack 8062 | 18 | CLC | Clear carry bit 8063 | 6B | RTL | Pull PB:PC from stack, return to main routine -- 38064 (from 10B75, 16659, 16737) -- [Check if animation is on or off; if not, skip to end, if so, load and store (animation data index), then check to see if 7E:1EF5 is 0; if so, decrement x by 2 and repeat, otherwise jump to 38085] 8064 | 08 | PHP | Push P to stack 8065 | 8B | PHB | Push DB to stack 8066 | 4B | PHK | Push PB to stack 8067 | AB | PLB | Pull DB from stack; DB is now same as PB (87) 8068 | 2C F1 1E | BIT $1EF1 | Test value at 7E:1EF1, set n if bit 15 is 1, set v if bit 14 1; AND with A, set z if result is zero 806B | 10 15 | BPL $15 | If bit 15 of 7E:1EF1 was 0 (n=0), branch to 38082, otherwise continue 806D | A2 0A 00 | LDX #$000A | Load the value #$000A (animation data index) to X 8070 | 8E F3 1E | STX $1EF3 | Store X (animation data index) to 7E:1EF3 8073 | BD F5 1E | LDA $1EF5, x | Load value at 7E:1EF5 + X (load data start address) to A 8076 | F0 06 | BEQ $06 | If A is zero, branch to 3807E, otherwise continue 8078 | 20 85 80 | JSR $8085 | Push PC (807A) to stack and jump to 38085 807B | AE F3 1E | LDX $1EF3 | Load value at 7E:1EF3 (animation data index) to X 807E | CA | DEX | Decrement X by 1; set z if X = 0, set n if X is negative 807F | CA | DEX | Decrement X by 1; set z if X = 0, set n if X is negative 8080 | 10 EE | BPL $EE | If X still positive, branch to 38070, otherwise continue 8082 | AB | PLB | Pull DB from stack 8083 | 28 | PLP | Pull P from stack 8084 | 6B | RTL | Pull PB:PC from stack, return to main routine -- 38085 (from jump at 38078) -- [Check to see if value at (animation data start address) is the start of the animation table or an asm pointer, then advances (animation data start address) to start of animation data and jumps to asm at pointer if pointer, and advances (animation data start address) to next frame] 8085 | AE F3 1E | LDX $1EF3 | Load value at 7E:1EF3 (animation data index) to X 8088 | DE 19 1F | DEC $1F19, x | Decrement the value at 7E:1F19 + X by 1; set z if value is 0, set n if bit 15 of value is 1 808B | D0 24 | BNE $24 | If value at 7E:1F19 (initial game frame count / game frame count) is not zero, branch to 380B1, otherwise continue 808D | BC 0D 1F | LDY $1F0D, x | Load value at 7E:1F0D + X (animation data start address) to Y 8090 | B9 00 00 | LDA $0000, y | Load (game frame count / asm pointer) to A 8093 | 10 0B | BPL $0B | If bit 15 of A is zero (game frame count), branch to 380A0; if bit 15 of A is 1 (asm pointer), continue 8095 | 8D 49 1F | STA $1F49 | Store (asm pointer) to 7E:1F49 8098 | C8 | INY | Increment Y by 1 8099 | C8 | INY | Increment Y by 1 (to address of next asm pointer or game frame count) 809A | F4 8F 80 | PEA $808F | Push the address $808F to stack (this is to RTS to 38090 later) 809D | 6C 49 1F | JMP ($1F49) | Jump to address of (asm pointer) 80A0 | 9D 19 1F | STA $1F19, x | Store A (game frame count) to 7E:1F19 + X 80A3 | B9 02 00 | LDA $0002, y | Load (gfx pointer) to A 80A6 | 9D 25 1F | STA $1F25, x | Store (gfx pointer) to 7E:1F25 + X 80A9 | 98 | TYA | Transfer (animation data start address) to A 80AA | 18 | CLC | Clear carry bit 80AB | 69 04 00 | ADC #$0004 | Add the value #$0004 to (animation data start address) to get address of next frame's data 80AE | 9D 0D 1F | STA $1F0D, x | Store next (animation data start address) to 7E:1F0D + X 80B1 | 60 | RTS | Pull PC from stack, return to 3807B -- 380B2 (from jump at 3809D) -- [Deletes (load data start address); cancels animation] 80B2 | 9E F5 1E | STZ $1EF5, x | Store zero to 7E:1EF5 + X (load data start address) 80B5 | 68 | PLA | Pull A from stack (pulls return to 38090) 80B6 | 60 | RTS | Pull PC from stack, return to 3807B -- 380B7 (from jump at 3809D) -- [Loads (animation start address) for frame 1 and transfers to Y; loops animation] (*** does more than just looping animation) 80B7 | B9 00 00 | LDA $0000, y | Load (animation data start address) to A 80BA | A8 | TAY | Transfer (animation data start address) to Y 80BB | 60 | RTS | Pull PC from stack, return to 38090 Alternately: 80B7 | B9 00 00 | LDA $0000, y | Load (data pointer) at $0000 + Y to A 80BA | A8 | TAY | Transfer (data pointer) to Y 80BB | 60 | RTS | Pull PC from stack, return to 38090 (Some ASM below is completely unknown, nothing in-bank jumps to it, but it has an RTS... might be beta stuff that isn't used. Haven't checked.) -- 380BC -- 80BC | 8C 49 1F | STY $1F49 | 80BF | 88 | DEY | 80C0 | B9 00 00 | LDA $0000, y | 80C3 | EB | XBA | 80C4 | 30 05 | BMI $05 | 80C6 | 29 FF 00 | AND #$00FF | 80C9 | 80 03 | BRA $03 | 80CB | 09 00 FF | ORA #$FF00 | 80CE | 18 | CLC | 80CF | 6D 49 1F | ADC $1F49 | 80D2 | A8 | TAY | 80D3 | 60 | RTS | -- 380D4 -- 80D4 | DE 01 1F | DEC $1F01, x | 80D7 | D0 DE | BNE $DE | 80D9 | C8 | INY | 80DA | C8 | INY | 80DB | 60 | RTS | -- 380DC -- 80DC | DE 01 1F | DEC $1F01, x | 80DF | D0 DB | BNE $DB | 80E1 | C8 | INY | 80E2 | 60 | RTS | -- 380E3 -- 80E3 | E2 20 | SEP #$20 (+ m) | 80E5 | B9 00 00 | LDA $0000, y | 80E8 | 9D 01 1F | STA $1F01, x | 80EB | C2 20 | REP #$20 (- m) | 80ED | C8 | INY | 80EE | 60 | RTS | -- 380EF -- 80EF | 60 | RTS | -- 380F0 -- 80F0 | B9 00 00 | LDA $0000, y | 80F3 | 29 FF 00 | AND #$00FF | 80F6 | 22 C1 8F 80 | JSR $808FC1 | 80FA | C8 | INY | 80FB | 60 | RTS | -- 380FC -- 80FC | B9 00 00 | LDA $0000, y | 80FF | 29 FF 00 | AND #$00FF | 8102 | 22 49 90 80 | JSR $809049 | 8106 | C8 | INY | 8107 | 60 | RTS | -- 38108 -- 8108 | B9 00 00 | LDA $0000, y | 810B | 29 FF 00 | AND #$00FF | 810E | 22 CB 90 80 | JSR $8090CB | 8112 | C8 | INY | 8113 | 60 | RTS | -- 38114 -- 8114 | B9 00 00 | LDA $0000, y | 8117 | 29 FF 00 | AND #$00FF | 811A | 22 4D 91 80 | JSR $80914D | 811E | C8 | INY | 811F | 60 | RTS | -- 38120 -- 8120 | B9 00 00 | LDA $0000, y | 8123 | C8 | INY | 8124 | 29 FF 00 | AND #$00FF | 8127 | 22 DC 81 80 | JSR $8081DC | 812B | 90 03 | BCC $03 | 812D | 4C B7 80 | JMP $80B7 | 8130 | C8 | INY | 8131 | C8 | INY | 8132 | 60 | RTS | -- 38133 -- 8133 | B9 00 00 | LDA $0000, y | 8136 | 29 FF 00 | AND #$00FF | 8139 | 22 A6 81 80 | JSR $8081A6 | 813D | C8 | INY | 813E | 60 | RTS | -- 3813F -- [Check to see if the statue death event for the selected boss has already been done, cancels animation if it has] 813F | B9 00 00 | LDA $0000, y | Load the value at $0000 + Y ($0006, $0007, $0008, $0009) to A 8142 | C8 | INY | Increment Y by 1 8143 | C8 | INY | Increment Y by 1 8144 | 22 33 82 80 | JSR $808233 | Puch PB:PC (87:8147) to stack and jump to 80:8233 8148 | 90 03 | BCC $03 | If carry flag is zero, branch to 814D, otherwise continue (statue not dead, continue animation) 814A | 4C B7 80 | JMP $80B7 | Jump to 80B7 (statue already dead, jump to continue with pointer to dead data set) 814D | C8 | INY | Increment Y by 1 814E | C8 | INY | Increment Y by 1 814F | 60 | RTS | Pull PC from stack and return to (38090) -- 38150 -- [Sets the statue death event on at 7E:D820 + X] 8150 | B9 00 00 | LDA $0000, y | Load the value at $0000 + Y to A 8153 | 22 FA 81 80 | JSR $8081FA | Push PB:PC to stack and jump to 80:81FA 8157 | C8 | INY | Increment Y by 1 8158 | C8 | INY | Increment Y by 1 8159 | 60 | RTS | Pull PC from stack and return to (38090) -- 3815A -- 815A | A9 00 00 | LDA #$0000 | 815D | 22 84 F0 90 | JSR $90F084 | 8161 | 60 | RTS | -- 38162 -- 8162 | A9 01 00 | LDA #$0001 | 8165 | 22 84 F0 90 | JSR $90F084 | 8169 | 60 | RTS | -- 3816A, Animation Data, Ground Spikes -- 816A | 08 00 04 9C (game frame count, frame tile offset) 816E | 08 00 84 9C 8172 | 08 00 04 9D 8176 | 08 00 84 9C 817A | B7 80 6A 81 (asm pointer, table start) -- 3817E, Animation Table, Wall Spikes -- 817E | 08 00 84 9D 8182 | 08 00 04 9E 8186 | 08 00 84 9E 818A | 08 00 04 9E 818E | B7 80 7E 81 -- 38192, Animation Table, Water Surface in Background -- 8192 | 0A 00 64 85 8196 | 0A 00 64 87 819A | 0A 00 64 89 819E | 0A 00 64 87 81A2 | B7 80 92 81 -- 381A6, Animation Table, Lava / Acid Background -- 81A6 | 0A 00 64 8B 81AA | 0A 00 24 8C 81AE | 0A 00 E4 8C 81B2 | 0A 00 A4 8D 81B6 | B7 80 A6 81 -- 381BA -- [Jump to 80:81DC, check to see if Phantoon is alive or dead; Return and branch accordingly to set up or skip animations] 81BA | A9 01 00 | LDA #$0001 | Load the value #$0001 (boss bit to check) to A 81BD | 22 DC 81 80 | JSR $8081DC | Push PB:PC to stack and jump to 80:81DC 81C1 | B0 07 | BCS $07 | Branch to 81CA if carry flag set 81C3 | 68 | PLA | Pull A from stack (pulls return to 38090) 81C4 | A9 01 00 | LDA #$0001 | Load the value #$0001 to A (number of frames until next boss death check?) 81C7 | 9D 19 1F | STA $1F19, x | Store A (game frame count) to 7E:1F19 81CA | 60 | RTS | Pull PC and return to: 38090 if carry flag set (boss dead); 380A0 if carry flag clear (boss alive) -- 381CB, Animation Table - Metroid in Background Monitor -- 81CB | BA 81 (asm pointer, check if Phantoon is dead?) 81CD | 0A 00 E4 8E 81D1 | 0A 00 64 8F 81D5 | 0A 00 E4 8F 81D9 | 0A 00 64 8F 81DD | B7 80 CD 81 -- 381E1, Animation Table - Treadmill (moving to Right) -- 81E1 | BA 81 81E3 | 01 00 64 8E 81E7 | 01 00 84 8E 81EB | 01 00 A4 8E 81EF | 01 00 C4 8E 81F3 | B7 80 E3 81 -- 381F7, Animation Table - Treadmill (moving to Left) -- 81F7 | BA 81 81F9 | 01 00 C4 8E 81FD | 01 00 A4 8E 8201 | 01 00 84 8E 8205 | 01 00 64 8E 8209 | B7 80 F9 81 -- 3820D, Animation Table - Brinstar Sucker Plant -- 820D | 10 00 64 99 8211 | 10 00 44 9A 8215 | 10 00 24 9B 8219 | 10 00 44 9A 821D | B7 80 0D 82 -- 38221, Animation Table - Falling Sand Ceiling Tiles -- 8221 | 0A 00 E4 91 8225 | 0A 00 24 92 8229 | 0A 00 64 92 822D | 0A 00 A4 92 8231 | B7 80 21 82 -- 38235, Animation Table - Falling Sand -- 8235 | 0A 00 64 91 8239 | 0A 00 84 91 823D | 0A 00 A4 91 8241 | 0A 00 C4 91 8245 | B7 80 35 82 -- 38249, Null Table (used by Null Animation Pointers ($824B) in bank $83) -- 8249 | B2 80 -- 3824B, BG Tile Load Data -- [Y=address | table start, # bytes/frame, vram placement] 824B | 49 82 00 00 00 00 (Blank data, no animation; deletes and cancels itself) 8251 | 6A 81 80 00 80 38 (Ground Spikes) 8257 | 7E 81 80 00 60 3D (Wall Spikes) 825D | 92 81 00 02 00 1B (Water Surface in Background) 8263 | A6 81 C0 00 00 0A (Lava / Acid Background, old Tourian set) 8269 | A6 81 C0 00 40 06 (Lava / Acid Background, Tourian) 826F | CB 81 80 00 C0 19 (Metroid in Background Monitor) 8275 | E1 81 20 00 E0 00 (Treadmill, moving right) 827B | F7 81 20 00 E0 00 (Treadmill, moving left) 8281 | 0D 82 E0 00 10 04 (Brinstar Sucker Plant) 8287 | 21 82 40 00 00 10 (Falling Sand Ceiling Tiles) 828D | 35 82 20 00 20 10 (Falling Sand) 89AC67 89AC8D Animation index(es) set by room itself, from there, pointer obtained by animation index(es) into area's animation pointer table. Byte loaded at FX1 byte table + 0E and shifted, carry set = animate tile at pointer in table. -- 38293, Animation Table - FX1 Lava -- 8293 | 0D 00 64 A5 8297 | 0D 00 A4 A5 829B | 0D 00 E4 A5 829F | 0D 00 24 A6 82A3 | 0D 00 64 A6 82A7 | B7 80 93 82 (asm pointer, table start) 82AB | 93 82 40 00 80 42 (table start, # bytes/frame, vram placement) -- 382B1, Animation Table - FX1 Acid -- 82B1 | 0A 00 A4 A6 82B5 | 0A 00 E4 A6 82B9 | 0A 00 24 A7 82BD | 0A 00 64 A7 82C1 | 0A 00 A4 A7 82C5 | B7 80 B1 82 82C9 | B1 82 40 00 80 42 -- 382CF, Animation Table - FX1 Rain -- 82CF | 0A 00 74 A8 82D3 | 0A 00 C4 A8 82D7 | 0A 00 14 A9 82DB | 0A 00 64 A9 82DF | 0A 00 B4 A9 82E3 | B7 80 CF 82 82E7 | CF 82 50 00 80 42 -- 382ED, Animation Table - FX1 Flower Petals (spores) -- 82ED | 0A 00 E4 A7 82F1 | 0A 00 14 A8 82F5 | 0A 00 44 A8 82F9 | B7 80 ED 82 82FD | ED 82 30 00 80 42 -- 38303 -- [Check boss death bits at 7E:D828 + (region index) to see wether to loop eye animation or have statue die] 8303 | DA | PHX | Push X to stack 8304 | B9 01 00 | LDA $0001, y | Load the value at $0001 + Y (region index) to A 8307 | 29 FF 00 | AND #$00FF | And A with the value #$00FF 830A | AA | TAX | Transfer A (region index) to X 830B | BF 28 D8 7E | LDA $7ED828, x | Load the value at 7ED828 + X to A 830F | FA | PLX | Pull X from stack 8310 | 39 00 00 | AND $0000, y | And A with the value at $0000 + Y (boss death bit check) 8313 | C8 | INY | Increment Y by 1 8314 | C8 | INY | Increment Y by 1 8315 | 29 FF 00 | AND #$00FF | And A with the value #$00FF 8318 | F0 03 | BEQ $03 | If A is equal to zero, branch to 831D, otherwise continue 831A | 4C B7 80 | JMP $80B7 | Jump to 80B7 831D | C8 | INY | Increment Y by 1 831E | C8 | INY | Increment Y by 1 831F | 60 | RTS | Pull PC from stack and return to (38090) -- 38320 -- [Load crystal data pointer, jump to ASM to set up X/Y pos and palette] 8320 | 5A | PHY | Push Y to stack 8321 | B9 00 00 | LDA $0000, y | Load the value at $0000 + Y to A 8324 | A0 6A BA | LDY #$BA6A | Load the value #$BA6A (data pointer for crystal) to Y 8327 | 22 97 80 86 | JSR $868097 | Push PB:PC to stack and jump to 86:8097 832B | 7A | PLY | Pull Y from stack 832C | C8 | INY | Increment Y by 1 832D | C8 | INY | Increment Y by 1 832E | 60 | RTS | Pull PC from stack and return to (38090) -- 3832F -- [Load ghost data pointer, jump to ASM to set up X/Y pos] 832F | 5A | PHY | Push Y to stack 8330 | B9 00 00 | LDA $0000, y | Load the value at $0000 + Y to A 8333 | A0 94 BA | LDY #$BA94 | Load the value #$BA94 (data pointer for ghost) to Y 8336 | 22 97 80 86 | JSR $868097 | Push PB:PC to stack and jump to 86:8097 833A | 7A | PLY | Pull Y from stack 833B | C8 | INY | Increment Y by 1 833C | C8 | INY | Increment Y by 1 833D | 60 | RTS | Pull PC from stack and return to (38090) -- 3833E -- [*** check to see if statue ID positive or negative, loops animation if negative? I suppose this is used to keep the other crystals animating during another's death sequence] 833E | AD 6F 1E | LDA $1E6F | Load the value at 7E:1E6F to A 8341 | 10 03 | BPL $03 | If the value was positive, branch to 8346, otherwise continue 8343 | 4C B7 80 | JMP $80B7 | Jump to 80B7 8346 | C8 | INY | Increment Y by 1 8347 | C8 | INY | Increment Y by 1 8348 | 60 | RTS | Pull PC from stack and return to (38090) -- 38349 -- [*** sets statue ID at 7E:1E6F for check above?] 8349 | B9 00 00 | LDA $0000, y | Load the value at $0000 + Y ($0001, $0002, $0004, $0008 or $8000) to A 834C | 0C 6F 1E | TSB $1E6F | OR A with value at 7E:1E6F, store result ($0001, $0002, $0004, $0008) to 7E:1E6F 834F | C8 | INY | Increment Y by 1 8350 | C8 | INY | Increment Y by 1 8351 | 60 | RTS | Pull PC from stack and return to (38090) -- 38352 -- [*** resets statue ID at 7E:1E6F to zero?] 8352 | B9 00 00 | LDA $0000, y | Load the value at $0000 + Y ($8001, $8002, $8004, $8008) to A 8355 | 1C 6F 1E | TRB $1E6F | Invert A ($7FFE, $7FFD, $7FFB, $7FF7 or $FFFE, $FFFD, $FFFB, $FFF7), AND with value at 7E:1E6F; store result ($0000) to 7E:1E6F 8358 | C8 | INY | Increment Y by 1 8359 | C8 | INY | Increment Y by 1 835A | 60 | RTS | Pull PC from stack and return to (38090) -- 3835B -- [Stores #$0000 (black) to 7E:C000/7E:C002/7E:C004 + (palette store index) to change eye to black] 835B | DA | PHX | Push X to stack 835C | BE 00 00 | LDX $0000, y | Load the value at $0000 + Y (palette store index) to X 835F | A9 00 00 | LDA #$0000 | Load the value #$0000 to A 8362 | 9F 00 C0 7E | STA $7EC000, x | Store A (zero) to 7E:C000 + X 8366 | 9F 02 C0 7E | STA $7EC002, x | Store A (zero) to 7E:C002 + X 836A | 9F 04 C0 7E | STA $7EC004, x | Store A (zero) to 7E:C004 + X 836E | FA | PLX | Pull X from stack 836F | C8 | INY | Increment Y by 1 8370 | C8 | INY | Increment Y by 1 8371 | 60 | RTS | Pull PC from stack and return to (38090) -- 38372 -- (*** Partially unknown, but jumps to ASM that sets up data for the statue's palette fade from gold to gray) 8372 | 5A | PHY | Push Y to stack 8373 | B9 00 00 | LDA $0000, y | Load the value at $0000 + Y to A 8376 | A8 | TAY | Transfer A to Y 8377 | 22 E9 C4 8D | JSR $8DC4E9 | Push PB:PC to stack and jump to 8D:C4E9 837B | 7A | PLY | Pull Y from stack 837C | C8 | INY | Increment Y by 1 837D | C8 | INY | Increment Y by 1 837E | 60 | RTS | Pull PC from stack and return to (38090) -- 3837F -- [Set statue's color palette to gray (not fading), used to when statue is already set as dead] 837F | DA | PHX | Push X to stack 8380 | 5A | PHY | Push Y to stack 8381 | BE 00 00 | LDX $0000, y | Load $0000 + Y (palette store index) to X 8384 | A0 00 00 | LDY #$0000 | Load the value #$0000 (palette load index) to Y 8387 | B9 9C 83 | LDA $839C, y | Load (palette value) at $839C + Y to A 838A | 9F 00 C2 7E | STA $7EC200, x | Store (palette value) to 7E:C200 + X 838E | E8 | INX | Increment X by 1 838F | E8 | INX | Increment X by 1 8390 | C8 | INY | Increment Y by 1 8391 | C8 | INY | Increment Y by 1 8392 | C0 10 00 | CPY #$0010 | Compare Y to the value #$0010 8395 | D0 F0 | BNE $F0 | If result is not equal to zero, branch to 8387, otherwise continue 8397 | 7A | PLY | Pull Y from stack 8398 | FA | PLX | Pull X from stack 8399 | C8 | INY | Increment Y by 1 839A | C8 | INY | Increment Y by 1 839B | 60 | RTS | Pull PC from stack and return to (38090) -- 3839C -- [Statues' dead color palette, transfered by routine at 3837F] 00 38 58 7F D5 6E 71 5A EE 49 6A 35 E7 24 83 10 Note: first color is transparency... no idea why they replaced that and not the last color used on the statues... ************************************************************************************************* Statue animation data ************************************************************************************************* Initiating ASM is below. -- 383AC, Phantoon's Eye -- (check to see if statue death event has occurred, animates or cancels if it didn't or did already) 83AC | 49 83 01 00 (Statue ID ASM?; statue ID byte? (stored to $7E:1E6F)) 83B0 | 3F 81 06 00 (Statue death event bit check; event bit to check) 83B4 | 0A 84 (pointer to data to set dead palette and cancel animation if event occurred) (Main animation loop) 83B6 | 06 00 64 93 | Frame 0, initial 83BA | 0C 00 E4 93 | Frame 1 83BE | 0C 00 64 94 | Frame 2 83C2 | 0C 00 E4 93 | Frame 3 83C6 | 10 00 64 93 | Frame 4 (check boss death bits, branch to data set to use) 83CA | 03 83 01 03 (asm to check boss death bit; boss bit check byte; region index byte) 83CE | D8 83 (pointer to statue dying data set) (removes ID from $7E:1E6F and loops animation back to frame 2) 83D0 | 52 83 01 00 (asm; value to remove statue ID?) 83D4 | B7 80 BA 83 (loop asm; frame 2 pointer) (data to set up statue death) 83D8 | 3E 83 BA 83 (check if statue ID negative, loop if it is?; frame 2 pointer) 83DC | 49 83 00 80 (asm to set statue ID negative?; value to set ID negative with) 83E0 | 5B 83 58 01 (asm to store zero (black) to eye colors; palette store index) (Eye fadeout, not seen due to eye color black... but you can remove that effect or put it anywhere) 83E4 | 10 00 E4 93 | Fadeout, frame 1 83E8 | 10 00 64 94 | Fadeout, frame 2 83EC | 20 83 00 00 (ASM to load crystal X/Y position and palette; index value for data table) 83F0 | C0 00 E4 97 | Fadeout, frame 3 (used as timer between crystal break and ghost leaving statue) (crystal break starts at frame 6F; time between setup of crystal and ghost must be C0 frames or ghost sound effect will be off, since crystal does the sound effects) (sets ghost sprite position and starts palette fade effect) 83F4 | 2F 83 00 00 (ASM to load ghost X/Y position; index value for data table) 83F8 | 72 83 55 F7 (Partially unknown, sets death palette index for fade; Pointer to data (ASM and data pointers)) 83FC | 80 00 E4 97 | Dead frame (used as timer between ghost death and palette fade and starting next statue death) (set statue death and cancel animation) 8400 | 50 81 06 00 (ASM to set statue death event; Statue ID/event byte) 8404 | 52 83 01 80 (asm sets ID at $7E:1E6F to 0; value used to TRB $7E:1E6F) 8408 | B2 80 (cancel animation) (set palette and cancel animation if event for death was already set (0040 at 7ED820)) 840A | 52 83 01 80 (asm sets ID at $7E:1E6F to 0; value used to TRB $7E:1E6F) 840E | 7F 83 40 01 (ASM for storing death color palette; index to store color palette to at $7E:C200) 8412 | B2 80 (cancel animation) -- 38414, Ridley's Eye - See above data set for info -- 49 83 02 00 3F 81 07 00 72 84 841E | 0A 00 E4 94 8422 | 0C 00 24 95 8426 | 0C 00 64 95 842A | 0C 00 24 95 842E | 10 00 E4 94 8432 | 03 83 01 02 40 84 8438 | 52 83 02 00 B7 80 22 84 (loop) 8440 | 3E 83 22 84 49 83 00 80 5B 83 32 01 844C | 10 00 24 95 8450 | 10 00 64 95 8454 | 20 83 02 00 8458 | C0 00 64 98 845C | 2F 83 02 00 72 83 51 F7 8464 | 80 00 64 98 (dead) -- 38468 -- 50 81 07 00 52 83 02 80 B2 80 -- 8472 -- 52 83 02 80 7F 83 20 01 B2 80 -- 3847C, Kraid's Eye - See above data set for info -- 49 83 04 00 3F 81 09 00 DA 84 8486 | 04 00 24 97 848A | 0C 00 64 97 848E | 0C 00 A4 97 8492 | 0C 00 64 97 8496 | 10 00 24 97 849A | 03 83 01 01 A8 84 84A0 | 52 83 04 00 B7 80 8A 84 84A8 | 3E 83 8A 84 49 83 00 80 5B 83 F8 00 84B4 | 10 00 64 97 84B8 | 10 00 A4 97 84BC | 20 83 06 00 84C0 | C0 00 A4 98 84C4 | 2F 83 06 00 72 83 4D F7 84CC | 80 00 A4 98 (dead) -- 384D0 -- 50 81 09 00 52 83 04 80 B2 80 -- 84DA -- 52 83 04 80 7F 83 E0 00 B2 80 -- 384E4, Draygon's Eye - See above data set for info -- 49 83 08 00 3F 81 08 00 42 85 84EE | 08 00 A4 95 84F2 | 0C 00 24 96 84F6 | 0C 00 A4 96 84FA | 0C 00 24 96 84FE | 10 00 A4 95 8502 | 03 83 01 04 10 85 8508 | 52 83 08 00 B7 80 F2 84 8510 | 3E 83 F2 84 49 83 00 80 5B 83 D2 00 851C | 10 00 24 96 8520 | 10 00 A4 96 8524 | 20 83 04 00 8528 | C0 00 E4 98 852C | 2F 83 04 00 72 83 49 F7 8534 | 80 00 E4 98 (dead) -- 38538 -- 50 81 08 00 52 83 08 80 B2 80 -- 8542 -- 52 83 08 80 7F 83 C0 00 B2 80 -- 3854C, Statue Tile Load Data -- 854C | AC 83 80 00 00 78 Phantoon (data start pointer; #bytes/frame; VRAM address) 8552 | 14 84 40 00 20 72 Ridley 8558 | 7C 84 40 00 40 0B Kraid 855E | E4 84 80 00 A0 0C Draygon ************************************************************************************************* Graphics ************************************************************************************************* For the below, I typed out how the 8x8 tiles in each animation are set up on the screen, from tile #0 to tile # whatever the number of tiles are. Tiel layout shows where each tile goes in relation to the other on screen. -- 38564, Graphics - Water Surface in Background -- 16 tiles per frame: 0123|4567|89AB|CDEF 0123;4567;89AB;CDEF <- disregard, still deciding wether to use | or ; for above... Tile layout: Row 1: 0123 Row 2: 4567 Row 3: 89AB Row 4: CDEF 8564 | Frame 1 8764 | Frame 2,4 8964 | Frame 3 -- 38B64, Graphics - Lava / Acid Background -- 6 tiles per frame: 01|23|45 Tile layout: Row 1: 01 Row 2: 23 Row 3: 45 8B64 | Frame 1 8C24 | Frame 2 8CE4 | Frame 3 8DA4 | Frame 4 -- 38E64, Graphics - Treadmill (moving right or left) -- 1 tile per frame: 0 Tile layout: Row 1: 00 8E64 | Frame 1 or Frame 4 8E84 | Frame 2 or Frame 3 8EA4 | Frame 3 or Frame 2 8EC4 | Frame 4 or Frame 1 -- 38EE4, Graphics - Metroid in Background Monitor -- 4 tiles per frame: 01|23 Tile layout: Row 1: 01 Row 2: 23 8EE4 | Frame 1 8F64 | Frame 2,4 8FE4 | Frame 3 -- 39064, Free Space -- -- 39164, Graphics - Falling Sand -- 1 tile per frame: 0 Tile layout: Row 1: 00 9164 | Frame 1 9184 | Frame 2 91A4 | Frame 3 91C4 | Frame 4 -- 391E4, Graphics - Falling Sand Ceiling Tiles -- 2 tiles per frame: 01 Tile layout: Row 1: 01 91E4 | Frame 1 9224 | Frame 2 9264 | Frame 3 92A4 | Frame 4 -- 392E4, Free Space -- -- 39364, Graphics, Phantoon Statue Eye -- 4 tiles per frame: 01|23 Tile layout: Row 1: 01 Row 2: 23 9364 | Frame 0,4 93E4 | Frame 1,3 9464 | Frame 2 93E4 9364 -- 394E4, Graphics - Ridley Statue Eye -- 2 tiles per frame: 01 Tile layout: Row 1: 01 94E4 | Frame 4, Initial 9524 | Frame 1,3 9564 | Frame 2 9524 94E4 -- 395A4, Graphics - Draygon Statue Eye -- 4 tiles per frame: 01|23 Tile layout: Row 1: 01 Row 2: 23 95A4 | Frame 4, Initial 9624 | Frame 1,3 96A4 | Frame 2 9624 95A4 -- 39724, Graphics - Kraid Statue Eye -- 2 tiles per frame: 01 Tile layout: Row 1: 01 9724 | Frame 4, Initial 9764 | Frame 1,3 97A4 | Frame 2 9764 9724 -- 397E4, Graphics - Statue Eyes (dead) -- 97E4 | Phantoon, 4 tiles 9864 | Ridley, 2 tiles 98A4 | Kraid, 2 tiles 98E4 | Draygon, 4 tiles -- 39964, Graphics - Brinstar Sucker Plant -- 7 tiles per frame: 012|3456 Tile layout: Row 1: x012 Row 2: 3456 (Tile 3 is the same all frames.) 9964 | Frame 1 9A44 | Frame 2,4 9B24 | Frame 3 -- 39C04, Grpahics - Ground Spikes -- 4 tiles per frame: 01|23 Tile layout: Row 1: 01 Row 2: 23 9C04 | Frame 1 9C84 | Frame 2,4 9D04 | Frame 3 -- 39D84, Graphics - Wall Spikes -- 4 tiles per frame: 01|23 Tile layout: Row 1: 01 Row 2: 23 9D84 | Frame 1 9E04 | Frame 2,4 9E84 | Frame 3 -- 39F04, Free Space -- -- 3A564, Graphics (GAMEBOY Mode) - FX1 Lava -- 4 tiles per frame: 012|3 Tile layout: Row 1: 012 Row 2+: 333 A564 | Frame 1 A5A4 | Frame 2 A5E4 | Frame 3 A624 | Frame 4 A664 | Frame 5 -- 3A6A4, Graphics (GAMEBOY Mode) - FX1 Acid -- 4 tiles per frame: 012|3 Tile layout: Row 1: 012 Row 2+: 333 A6A4 | Frame 1 A6E4 | Frame 2 A724 | Frame 3 A764 | Frame 4 A7A4 | Frame 5 -- 3A7E4, Graphics (GAMEBOY Mode) - FX1 Flower Petals (spores) -- 3 tiles per frame: 012 Tile layout: none A7E4 | Frame 1 A814 | Frame 2 A844 | Frame 3 -- 3A874, Graphics (GAMEBOY Mode) - FX1 Rain -- 5 tiles per frame: 01234 Tile layout: none A874 | Frame 1 A8C4 | Frame 2 A914 | Frame 3 A964 | Frame 4 A9B4 | Frame 5 -- 3AA04, Free Space -- -- 3AD64, Crystal shards, ghost, crystal shine -- AD64 | Crystal shine, frame 9, 8, 7 ADC4 | Crystal shard? ADE4 | Ghost, row 3, row 2 (x2), row 3? AEA4 | Crystal shards breaking, frame 1, 2, 3, 4? AF24 | Empty? AF64 | Ghost face; 4 tiles AFA4 | Crystal shine, frame 6; 4 tiles AFE4 | Crystal shine, frame 5; 4 tiles B024 | Crystal shine, frame 4; 4 tiles B064 | Crystal shine, frame 3; 4 tiles B0A4 | Crystal shine, frame 2; 4 tiles B0E4 | Crystal shine, frame 1; 8 tiles (2 x 4tiles) -- 3B364, Graphics - Ridley and Phantoon Statue Sprite -- -- 3C964, Free Space -- =========================== 80:81DC (*** checks boss death bits to set or clear carry, set carry if boss is dead) 81DC | DA | PHX | Push X to stack 81DD | 5A | PHY | Push Y to stack 81DE | 08 | PHP | Push P to stack 81DF | E2 20 | SEP #$20 | Set m on P (16-bit Memory and Accumulator) 81E1 | 8D E7 05 | STA $05E7 | Store A (boss bit to check) to 7E:05E7 81E4 | AE 9F 07 | LDX $079F | Load the value at 7E:079F (current region) to X 81E7 | BF 28 D8 7E | LDA $7ED828, X | Laod the value at 7E:D828 + X (boss even bits) to A 81EB | 2D E7 05 | AND $05E7 | And A with the value 7E:05E7 81EE | D0 05 | BNE $05 | If value is not equal to zero, branch to 81F5, otherwise continue 81F0 | 28 | PLP | Pull P from stack 81F1 | 7A | PLY | Pull Y from stack 81F2 | FA | PLX | Pull X from stack 81F3 | 18 | CLC | Clear the carry flag (boss bit 0, boss not dead) 81F4 | 6B | RTL | Pull PB:PC from stack and return to 87:81C1 81F5 | 28 | PLP | Pull P from stack 81F6 | 7A | PLY | Pull P from stack 81F7 | FA | PLX | Pull P from stack 81F8 | 38 | SEC | Set the carry flag (boss bit 1, boss is dead) 81F9 | 6B | RTL | Pull PB:PC from stack and return to 87:81C1 --------- $89/AF2E B9 F0 AB LDA $ABF0,y[$83:AC16] A:0080 X:840A Y:0026 D:0000 DB:83 S:1FF0 P:envmxdizCHC:0142 VC:185 00 FL:202 $89/AF31 60 RTS A:9080 X:840A Y:0026 D:0000 DB:83 S:1FF0 P:eNvmxdizCHC:0178 VC:185 00 FL:202 $89/AC34 8D 64 19 STA $1964 [$83:1964] A:9080 X:840A Y:0026 D:0000 DB:83 S:1FF2 P:eNvmxdizCHC:0224 VC:185 00 FL:201 $89/AC37 AE 66 19 LDX $1966 [$83:1966] A:9080 X:840A Y:0026 D:0000 DB:83 S:1FF2 P:eNvmxdizCHC:0264 VC:185 00 FL:201 $89/AC3A BD 09 00 LDA $0009,x[$83:8413] A:9080 X:840A Y:0026 D:0000 DB:83 S:1FF2 P:eNvmxdizCHC:0304 VC:185 00 FL:201 $89/AC3D 29 FF 00 AND #$00FF A:0226 X:840A Y:0026 D:0000 DB:83 S:1FF2 P:envmxdizCHC:0340 VC:185 00 FL:201 $89/AC40 F0 12 BEQ $12 [$AC54] A:0026 X:840A Y:0026 D:0000 DB:83 S:1FF2 P:envmxdizCHC:0364 VC:185 00 FL:201 $89/AC42 A8 TAY A:0026 X:840A Y:0026 D:0000 DB:83 S:1FF2 P:envmxdizCHC:0382 VC:185 00 FL:201 $89/AC43 A9 00 88 LDA #$8800 A:0026 X:840A Y:0026 D:0000 DB:83 S:1FF2 P:envmxdizCHC:0400 VC:185 00 FL:201 $89/AC46 85 13 STA $13 [$00:0013] A:8800 X:840A Y:0026 D:0000 DB:83 S:1FF2 P:eNvmxdizCHC:0424 VC:185 00 FL:201 $89/AC48 B9 18 AC LDA $AC18,y[$83:AC3E] A:8800 X:840A Y:0026 D:0000 DB:83 S:1FF2 P:eNvmxdizCHC:0458 VC:185 00 FL:201 $89/AC4B 85 12 STA $12 [$00:0012] A:DB8A X:840A Y:0026 D:0000 DB:83 S:1FF2 P:eNvmxdizCHC:0494 VC:185 00 FL:201 $89/AC4D 4B PHK A:DB8A X:840A Y:0026 D:0000 DB:83 S:1FF2 P:eNvmxdizCHC:0528 VC:185 00 FL:201 $89/AC4E F4 53 AC PEA $AC53 [$83:AC53] A:DB8A X:840A Y:0026 D:0000 DB:83 S:1FF1 P:eNvmxdizCHC:0554 VC:185 00 FL:201 $89/AC51 DC 12 00 JML [$0012][$88:DB8A] A:DB8A X:840A Y:0026 D:0000 DB:83 S:1FEF P:eNvmxdizCHC:0594 VC:185 00 FL:201 -- 8F:91D7 (791D7), Statue eye animation loading ASM (ran via layer1_2 pointer) -- [Loads the animation load data for the boss statue eyes] 91D7 | A0 58 85 | LDY #$8558 | Load the value #$8558 to Y 91DA | 22 27 80 87 | JSL $878027 | Push PB:PC to stack and jump to 87:8027 91DE | A0 4C 85 | LDY #$854C | Load the value #$854C to Y 91E1 | 22 27 80 87 | JSL $878027 | Push PB:PC to stack and jump to 87:8027 91E5 | A0 5E 85 | LDY #$855E | Load the value #$855E to Y 91E8 | 22 27 80 87 | JSL $878027 | Push PB:PC to stack and jump to 87:8027 91EC | A0 52 85 | LDY #$8552 | Load the value #$8552 to Y 91EF | 22 27 80 87 | JSL $878027 | Push PB:PC to stack and jump to 87:8027 91F3 | 60 | RTS | Pull PC from stack and return to main routine -- 8F:8A54, Statue door PLM data -- 48 C8 01 06 48 94 00 00 (pointer to plm asm, X/Y position, PLM data, end) -- A0:EFFF (crystal), A0:F03F (statue), enemy DNA data -- 00 16 45 D7 B8 0B B8 0B 00 00 00 00 AA 00 00 00 00 00 C8 D7 01 00 00 00 C7 D7 0F 80 4C 80 41 80 00 00 00 00 00 00 00 00 4C 80 00 00 00 00 00 00 4C 80 4C 80 00 00 64 B3 87 06 00 00 1C EC 00 00 00 86 45 D7 B8 0B B8 0B 00 00 00 00 AA 00 00 00 00 00 4C 80 01 00 00 00 4C 80 0F 80 4C 80 41 80 00 00 00 00 00 00 00 00 4C 80 00 00 00 00 00 00 4C 80 4C 80 00 00 64 AD 87 06 00 00 1C EC 00 00 15004C | pointer 804C: 6B 8041 | 22 7E 95 A0 | hit AI 8045 | 6B 800F | 22 DF 9F A0 | grapple AI 6B -- 109081, statue room sprite data (only first one with speed 0000 used?) -- 05 <- ??? maybe previous room's enemies to clear room 3F D7 80 00 B0 01 00 00 00 2C 00 00 00 00 40 02 <- Elevator FF EF 78 00 B8 00 00 00 00 20 00 00 00 00 00 00 <- statue setup? FF EF 8E 00 55 00 00 00 00 20 00 00 02 00 00 00 <- deleting these seems to affect nothing FF EF 84 00 88 00 00 00 00 20 00 00 04 00 00 00 <--' FF FF <- End of sprite data 00 <- maybe enemies to clear room... -- AA:D7C7 (1557C7), statue setup(?) initiation AI -- D7C7 | 6B <- running AI pointer to here...? (*** does something with sprite data, sets up some other sprite data, stores 2 sprite palettes) D7C8 | AE 54 0E | LDX $0E54 | Current Enemy Index D7CB | 9E 96 0F | STZ $0F96, X | Which SNES palette the enemy uses (when drawing the sprite, from enemy set number). ORAed with other data to stick directly into OAM. D7CE | A9 01 00 | LDA #$0001 | D7D1 | 9D 94 0F | STA $0F94, X | action delay? D7D4 | 9E 90 0F | STZ $0F90, X | ??? D7D7 | BC B4 0F | LDY $0FB4, X | speed value in smile? D7DA | B9 10 D8 | LDA $D810, Y | D7DD | 9D 92 0F | STA $0F92, X | pointer to AI structure. Acts like PLMs instruction pointer ($1D27,X). Positive Enemy instructions set delay timer and 0F8E, and highest bit of 0F88 D7E0 | BC B4 0F | LDY $0FB4, X | speed value in smile? D7E3 | D0 15 | BNE $15 | If the value was not equal to zero, branch to D7FA, otherwise continue D7E5 | A0 BE BA | LDY #$BABE | Load the value #$BABE to Y D7E8 | 22 97 80 86 | JSL $868097 | Push PB:PC to stack and jump to 86:8097 D7EC | A0 A2 BA | LDY #$BAA2 | Load the value #$BAA2 to Y D7EF | 22 97 80 86 | JSL $868097 | Push PB:PC to stack and jump to 86:8097 D7F3 | A0 B0 BA | LDY #$BAB0 | Load the value #$BAB0 to Y D7F6 | 22 97 80 86 | JSL $868097 | Push PB:PC to stack and jump to 86:8097 D7FA | A2 1E 00 | LDX #$001E | Load the value #$001E (palette index?) to X D7FD | BD 85 D7 | LDA $D785, X | Load the value at $D785 + X to A D800 | 9F E0 C3 7E | STA $7EC3E0, X | Store A to 7E:C3E0 + X D804 | BD 65 D7 | LDA $D765, X | Load the value at $D765 + X to A D807 | 9F 40 C3 7E | STA $7EC340, X | Store A to 7E:C340 + X D80B | CA | DEX | Decrement X by 1 D80C | CA | DEX | Decrement X by 1 D80D | 10 EE | BPL $EE | If X is still positive, branch to D7FD, otherwise continue D80F | 6B | RTL | Pull PB:PC from stack and return to main routine D745 | 00 38 FF 57 FF 2B 3C 1F 78 02 B0 01 0B 01 87 00 <- what? this has to be the other palette... 44 00 1F 00 12 00 09 00 FF 7F FF 7F FF 7F 00 00 D765 | 00 38 FF 57 FF 2B 3C 1F 78 02 B0 01 0B 01 87 00 Palette for Ridley/Phantoon? 44 00 FF 7F FF 7F FF 7F FF 03 52 02 29 01 00 00 D785 | 00 38 F9 27 75 23 D2 1A 4E 16 AB 11 27 0D 84 04 Palette for ???? 00 00 5F 7F 1F 7C 16 58 0C 30 94 52 CE 39 08 21 D810 | B9 D7 A5 D7 AF D7 <- pointer to AI stuff..?, selected via speed value in SMILE, the 3 sprites use 0000, 0002, 0004 D7A5 | 7C 80 77 77 3B D8 ED 80 A7 D7 <- Unknown ai stuff..? D7AF | 7C 80 77 77 B0 D8 ED 80 B1 D7 D7B9 | 7C 80 00 01 16 D8 77 77 16 D8 D816 | 07 00 28 C2 F8 9C 1F sprite? 18 C2 F8 9A 1F 08 C2 F8 98 1F F8 C3 F8 96 1F E8 C3 F8 94 1F D8 C3 F8 92 1F C8 C3 F8 90 1F D83B | 17 00 E5 C3 18 44 23 sprite? E5 C3 08 2C 23 F5 C3 18 46 23 0D 00 20 7D 23 0D 00 18 6D 23 05 00 18 48 23 15 C2 08 42 23 05 C2 08 40 23 F5 C3 08 2E 23 D5 C3 08 2A 23 15 C2 F8 28 23 05 C2 F8 26 23 F5 C3 F8 24 23 E5 C3 F8 22 23 D5 C3 F8 20 23 15 C2 E8 0E 23 05 C2 E8 0C 23 F5 C3 E8 0A 23 E5 C3 E8 08 23 15 C2 D8 06 23 05 C2 D8 04 23 F5 C3 D8 02 23 E5 C3 D8 00 23 D8B0 | 13 00 08 00 1C 87 25 sprite? 00 00 1C 86 25 F8 01 1C 85 25 F0 01 1C 84 25 00 00 04 83 25 00 00 FC 81 25 F8 01 04 82 25 F8 01 FC 80 25 08 C2 EC 61 25 E8 C3 EC 4D 25 08 C2 FC 65 25 08 C2 0C 6B 25 F8 C3 0C 69 25 E8 C3 0C 67 25 E8 C3 FC 63 25 00 C2 EC 60 25 F0 C3 EC 4E 25 00 C2 DC 4B 25 F0 C3 DC 49 25 D911 | 00 38 no idea 55 57 4F 4A E4 1C 60 0C B2 56 0D 3E 68 2D 26 25 FF 03 F7 02 10 02 08 01 1F 00 18 00 0E 00 5A BC B0 0F B9 6E 10 49 80 00 7A 4C 56 D9 5A BC B0 0F B9 6E 10 7A 4C 56 D9 BD A9 0F 49 80 00 4C 56 D9 BD A9 0F DA 5A 9B 29 FF 00 0A AA 64 12 64 14 BF 43 B4 A0 10 02 C6 14 85 13 B9 7C 0F 18 65 12 99 7C 0F B9 7A 0F 65 14 99 7A 0F 64 12 64 14 BF C3 B3 A0 10 02 C6 14 85 13 B9 80 0F 18 65 12 99 80 0F B9 7E 0F 65 14 99 7E 0F 7A FA 6B 6B 5A A0 25 BE 22 27 80 86 48 A0 33 BE 22 27 80 86 68 A0 41 BE 22 27 80 86 7A 6B 5A BC B0 0F AD DB DE 99 B2 0F AD DD DE 99 F2 0F AD DF DE 99 32 10 AD E1 DE 99 72 10 AD E3 DE 99 B2 10 AD E5 DE 99 F2 10 AD E7 DE 99 32 11 7A 6B 3A 81 40 02 ED 80 0E DA 3A 81 40 02 BA D9 ED 80 1E DA 3A 81 14 00 ED 80 0E DA 3A 81 14 00 BA D9 ED 80 1E DA 0A 00 28 E0 0A 00 2F E0 0A 00 36 E0 ED 80 0E DA 03 00 5C DF 03 00 63 DF 03 00 6A DF ED -- AA:807C -- BD 86 0F 09 00 02 9D 86 0F 68 F4 AE C2 below 6B C2AF | 60 --------- -- 88:84B9 (404B9) -- (hdma pointer check routine, checks for pointer to run, then runs it? or looks for place to store it... something) 08 8B C2 30 22 0C 8F 80 AD 78 0A D0 1B 2C 92 05 50 16 A9 00 80 8D 92 05 22 35 84 88 40 28 CE 8A 22 35 84 88 40 29 80 8B 4B AB C2 30 AD 82 19 8D 86 19 2C B0 18 10 29 E2 30 A2 00 86 85 8E B3 18 8E B2 18 BD B4 18 F0 0A 05 85 85 85 20 1C 85 AE B2 18 E8 E8 E0 0C D0 E8 20 00 80 AB 28 6B 64 85 AB 28 6B PHP PHB REP #$30 JSL $808F0C ; $F0C IN ROM LDA $0A78 BNE BRANCH_ALPHA BIT $0592 BVC BRANCH_ALPHA LDA #$8000 STA $0592 JSL $888435 ; $40435 IN ROM RTI PLP DEC $228A AND $84, X DEY RTI AND #$8B80 BRANCH_ALPHA PHK PLB REP #$30 LDA $1982 STA $1986 BIT $18B0 BPL BRANCH_BETA SEP #$30 LDX #$00 STX $85 STX $18B3 BRANCH_DELTA STX $18B2 LDA $18B4, X BEQ BRANCH_GAMMA ORA $85 STA $85 JSR $851C ; $4051C IN ROM LDX $18B2 BRANCH_GAMMA INX INX CPX #$0C BNE BRANCH_DELTA JSR $8000 ; $40000 IN ROM PLB PLP RTL $40517 ALTERNATE ENTRY POINT STZ $85 BRANCH_BETA PLB PLP RTL -- 88:851C (4051C) -- | C2 20 | REP #$20 | BD F0 18 | LDA $18F0, X | 85 12 | STA $12 | BD FC 18 | LDA $18FC, X | 85 14 | STA $14 | 4B | PHK | F4 2E 85 | PEA #$852E | DC 12 00 | JML [$0012] | E2 10 | SEP #$10 | C2 20 | REP #$20 | AE B2 18 | LDX $18B2 | DE E4 18 | DEC $18E4, X | D0 2B | BNE $2B | BC C1 18 | LDY $18C1, X | 5A | PHY | AB | PLB | BD CC 18 | LDA $18CC, X | C2 10 | REP #$10 | A8 | TAY | B9 00 00 | LDA $0000, Y | 10 0A | BPL $0A | 85 12 | STA $12 | C8 | INY | C8 | INY | F4 45 85 | PEA #$8545 | 6C 12 00 | JMP ($0012) | 9D E4 18 | STA $18E4, X | 98 | TYA | 18 | CLC | 69 04 00 | ADC #$0004 | 9D CC 18 | STA $18CC, X | B9 02 00 | LDA $0002, Y | 9D D8 18 | STA $18D8, X | E2 30 | SEP #$30 | 60 | RTS -- 88:DBD7 (45BD7) -- (*** checking event bits at 7E:D828 for statue deaths, and other stuff) | 08 | PHP | C2 30 | REP #$30 | A9 06 00 | LDA #$0006 | 22 33 82 80 | JSL $808233 | 90 3B | BCC $3B | A9 07 00 | LDA #$0007 | 22 33 82 80 | JSL $808233 | 90 32 | BCC $32 | A9 08 00 | LDA #$0008 | 22 33 82 80 | JSL $808233 | 90 29 | BCC $29 | A9 09 00 | LDA #$0009 | 22 33 82 80 | JSL $808233 | 90 20 | BCC $20 | A9 10 00 | LDA #$0010 | 0C 6F 1E | TSB $1E6F | AD 6F 1E | LDA $1E6F | 30 15 | BMI $15 | A9 2C 01 | LDA #$012C | 9D 2C 19 | STA $192C, X | AE B2 18 | LDX $18B2 | A9 01 00 | LDA #$0001 | 9D E4 18 | STA $18E4, X | FE CC 18 | INC $18CC, X | FE CC 18 | INC $18CC, X | 20 CB DB | JSR $DBCB | 28 | PLP | 6B | RTL -- 88:DBCB (45BCB) -- | BD 20 19 | LDA $1920, X | 18 | CLC | 6D 15 09 | ADC $0915 | 8F 00 9E 7E | STA $7E9E00 | 60 | RTS --------- -- 88:DC69 (45C69) -- (*** don't know, but sets statue sink done event...) 20 1D B2 A9 0D 00 8D 3E 18 A9 20 00 0C 40 18 AD 78 0A D0 3C BD 14 19 18 69 00 C0 9D 14 19 BD 20 19 69 FF FF 9D 20 19 C9 10 FF D0 21 DA 08 C2 10 22 D7 83 84 06 0C 73 B7 28 FA A9 0A 00 22 FA 81 80 A9 01 00 9D E4 18 FE CC 18 FE CC 18 20 CB DB 6B $45C69-$45CB9 { JSR $B21D ; $4321D IN ROM LDA #$000D STA $183E LDA #$0020 TSB $1840 LDA $0A78 BNE BRANCH_ALPHA LDA $1914, X CLC ADC #$C000 STA $1914, X LDA $1920, X ADC #$FFFF STA $1920, X CMP #$FF10 BNE BRANCH_BETA PHX PHP REP #$10 JSL $8483D7 ; $203D7 IN ROM ASL $0C ADC ($B7, S), Y PLP PLX LDA #$000A <-- this turns C0 03 to C0 07 at 7E:D820 JSL $8081FA ; $1FA IN ROM LDA #$0001 STA $18E4, X INC $18CC, X INC $18CC, X BRANCH_BETA JSR $DBCB ; $45BCB IN ROM BRANCH_ALPHA RTL --------- (Doing something involving checking event bits...) -- 80:8233 (00233) -- (*** sets or clears carry to set wether the event was completed or not) 8233 | DA | PHX | Push X to stack 8234 | 5A | PHY | Push Y to stack 8235 | 08 | PHP | Push P to stack 8236 | C2 30 | REP #$30 | Reset m,x on P (16-bit Memory, Accumulator, X, and Y) 8238 | 22 8E 81 80 | JSL $80818E | Push PB:PC (80:823B) to stack and jump to 80:818E 823C | BF 20 D8 7E | LDA $7ED820, X | Load the value at 7E:D820 + X to A 8240 | 2D E7 05 | AND $05E7 | AND A by the value at 7E:05E7 8243 | D0 05 | BNE $05 | If A is not equal to zero, branch to 824A, otherwise continue 8245 | 28 | PLP | Pull P from stack 8246 | 7A | PLY | Pull Y from stack 8247 | FA | PLX | Pull X from stack 8248 | 18 | CLC | Clear the carry flag 8249 | 6B | RTL | Pull PB:PC from stack and return to 87:8148 824A | 28 | PLP | Pull P from stack 824B | 7A | PLY | Pull Y from stack 824C | FA | PLX | Pull X from stack 824D | 38 | SEC | Set the carry flag 824E | 6B | RTL | Pull PB:PC from stack and return to 87:8148 --------- -- 80:818E (0018E) -- [Use statue death event value to determine event bit at 7E:D820 to load / store) 818E | AA | TAX | Transfer A to X 818F | 10 01 | BPL $01 | If A/X is positive, branch to 8192, otherwise continue 8191 | 00 | BRK | If A/X was negative, crash the game??? 8192 | 9C E7 05 | STZ $05E7 | Store zero to 7E:05E7 (Event bit check?) 8195 | 48 | PHA | Push A to stack 8196 | 29 07 00 | AND #$0007 | And A by the value #$0007 8199 | 38 | SEC | Set carry flag 819A | 2E E7 05 | ROL $05E7 | Rotate the value at 7E:05E7 to the left 819D | 3A | DEC A | Decrement A by 1 819E | 10 FA | BPL $FA | If A still positive, branch to 819A, otherwise continue 81A0 | 68 | PLA | Pull A from the stack 81A1 | 4A | LSR A | Logical Shift A to the right (devide A by 2) 81A2 | 4A | LSR A | Logical Shift A to the right (devide A by 2) 81A3 | 4A | LSR A | Logical Shift A to the right (devide A by 2) 81A4 | AA | TAX | Transfer A to X 81A5 | 6B | RTL | Pull PB:PC from stack and return to 80:823C --------- -- 86:8097 (30097) -- (*** setting up sprite stuff for crystal and ghost, as well as the Ridley, Phantoon, and statue base sprites) 8097 | 08 | PHP | Push P to stack 8098 | 8B | PHB | Push Data Bank to stack 8099 | DA | PHX | Push X to stack 809A | 5A | PHY | Push Y to stack 809B | 8D 93 19 | STA $1993 | Store A to 7E:1993 809E | 4B | PHK | Push Program Bank to stack 809F | AB | PLB | Pull Data Bank from stack 80A0 | BB | TYX | Transfer Y to X 80A1 | A0 22 00 | LDY #$0022 | Load the value #$0022 to Y 80A4 | B9 97 19 | LDA $1997, Y | Load the value at 7E:1997 + Y to A 80A7 | F0 0A | BEQ $0A | If A was equal to zero, branch to 80B3, otherwise continue 80A9 | 88 | DEY | Decrement Y by 1 80AA | 88 | DEY | Decrement Y by 1 80AB | 10 F7 | BPL $F7 | If Y is still positive, branch to 80A4, otherwise continue 80AD | 7A | PLY | Pull Y from stack 80AE | FA | PLX | Pull X from stack 80AF | AB | PLB | Pull Data Bank from stack 80B0 | 28 | PLP | Pull P from stack 80B1 | 38 | SEC | Set the carry flag 80B2 | 6B | RTL | Pull PB:PC from stack and return to (87:832B) 80B3 | A9 00 00 | LDA #$0000 | Load the value #$0000 to A 80B6 | 99 BB 19 | STA $19BB, Y | Store A to 7E:19BB + Y 80B9 | 8A | TXA | Transfer X to A 80BA | 99 97 19 | STA $1997, Y | Store A to 7E:1997 + Y 80BD | BD 02 00 | LDA $0002, X | Load the value at $0002 + X to A 80C0 | 99 03 1A | STA $1A03, Y | Store A to 7E:1A03 + Y 80C3 | BD 04 00 | LDA $0004, X | Load the value at $0004 + X to A 80C6 | 99 47 1B | STA $1B47, Y | Store A to 7E:1B47 + Y 80C9 | BD 06 00 | LDA $0006, X | Load the value at $0006 + X to A 80CC | 99 B3 1B | STA $1BB3, Y | Store A to 7E:1BB3 + Y 80CF | BD 08 00 | LDA $0008, X | Load the value at $0008 + X to A 80D2 | 99 D7 1B | STA $1BD7, Y | Store A to 7E:1BD7 + Y 80D5 | A9 01 00 | LDA #$0001 | Load the value #$0001 to A 80D8 | 99 8F 1B | STA $1B8F, Y | Store A to 7E:1B8F + Y 80DB | A9 00 80 | LDA #$8000 | Load the value #$8000 to A 80DE | 99 6B 1B | STA $1B6B, Y | Store A to 7E:1B6B + Y 90E1 | A9 00 00 | LDA #$0000 | Load the value #$0000 to A 80E4 | 99 FF 1A | STA $1AFF, Y | Store A to 7E:1AFF + Y 80E7 | 99 23 1B | STA $1B23, Y | Store A to 7E:1B23 + Y 80EA | 99 DF 19 | STA $19DF, Y | Store A to 7E:19DF + Y 80ED | 99 DF 19 | STA $19DF, Y | Store A to 7E:19DF + Y 80F0 | 99 27 1A | STA $1A27, Y | Store A to 7E:1A27 + Y 80F3 | 99 6F 1A | STA $1A6F, Y | Store A to 7E:1A6F + Y 80F6 | 99 FB 1B | STA $1BFB, Y | Store A to 7E:1BFB + Y 80F9 | 5A | PHY | Push Y to stack 80FA | FC 00 00 | JSR ($0000, X) | Push PC to stack and jump to the address stored at ($0000 + X) 80FD | 68 | PLA | Pull A from stack 80FE | 7A | PLY | Pull Y from stack 80FF | FA | PLX | Pull X from stack 8100 | AB | PLB | Pull DB from stack 8101 | 28 | PLP | Pull P from stack 8102 | 18 | CLC | Clear the carry flag 8103 | 6B | RTL | Pull PC:PB from stack and return to (87:832B) BA5C | 7A B8 77 B9 A1 B7 00 00 00 30 00 00 FC 84 BA6A | 8E B8 FB 84 B3 B7 00 00 00 30 00 00 FC 84 (crystal shine) BA78 | B5 B8 82 B9 02 B8 00 00 00 30 00 00 FC 84 BA86 | E8 B8 FB 84 23 B8 00 00 00 30 00 00 FC 84 BA94 | F8 B8 FD B9 4E B8 00 00 00 30 00 00 FC 84 (ghost) BAA2 | 51 B9 42 BA 6A B8 00 00 00 20 00 00 FC 84 BAB0 | 64 B9 42 BA 72 B8 00 00 00 20 00 00 FC 84 BABE | 3E B9 42 BA 5A B8 00 00 00 20 00 00 FC 84 ---- B7A1 | 08 00 86 90 Animation frames...? 08 00 8D 90 08 00 94 90 08 00 9B 90 54 81 B7B3 | 08 00 0F 91 08 00 EF 90 08 00 E8 90 07 00 E1 90 07 00 DA 90 07 00 D3 90 06 00 CC 90 06 00 C5 90 05 00 BE 90 B802 | 03 00 25 91 03 00 2C 91 18 B8 03 00 3A 91 03 00 33 91 C6 81 02 B8 B818 | 5A, 8A, A0 86 BA, 22 97 80 86, 7A, 60 B823 | 04 00 A2 90, 41 B8 08 00 04 00 A9 90, 41 B8 04 00 04 00 B0 90, 41 B8 02 00 04 00 B7 90 54 81 B841 | BD 93 1A, 18, 79 00 00, 9D 93 1A, C8, C8, 60 B84E | 08 00 41 91 08 00 57 91 AB 81 4E B8 B85A | 80 00 6D 91 61 81 37 BA 77 07 6D 91 AB 81 62 B8 B86A | 77 07 92 91 AB 81 6A B8 B872 | 77 07 07 92 AB 81 72 B8 84FC | 54 81 00 10 00 80 AB 81 FE 84 AE C4 0D BF 02 64 7F --------- -- 86:B93E (3393E) -- [Load and store statue Base sprite X and Y position] | A9 78 00 | LDA #$0078 | X | 99 FF 1A | STA $1AFF, Y | | 99 4B 1A | STA $1A4B, Y | | A9 B8 00 | LDA #$00B8 | Y | 99 23 1B | STA $1B23, Y | | 99 93 1A | STA $1A93, Y | | 60 | RTS | --------- -- 86:B951 (33951) -- [Load and store Ridley statue sprite X and Y position] | A9 8E 00 | LDA #$008E | X | 99 FF 1A | STA $1AFF, Y | | 99 4B 1A | STA $1A4B, Y | | A9 55 00 | LDA #$0055 | Y | 99 23 1B | STA $1B23, Y | | 99 93 1A | STA $1A93, Y | | 60 | RTS | --------- -- 86:B964 (33964) -- [Load and store Phantoon statue sprite X and Y position] | A9 84 00 | LDA #$0084 | X | 99 FF 1A | STA $1AFF, Y | | 99 4B 1A | STA $1A4B, Y | | A9 88 00 | LDA #$0088 | Y | 99 23 1B | STA $1B23, Y | | 99 93 1A | STA $1A93, Y | | 60 | RTS | --------- -- 86:BA42 (33A42) -- (*** does something involving the statues' position to the background...) | BD FF 1A | LDA $1AFF, X | 9D 4B 1A | STA $1A4B, X | AF 00 9E 7E | LDA $7E9E00 | 49 FF FF | EOR #$FFFF | 1A | INC A | 18 | CLC | 6D 15 09 | ADC $0915 | 18 | CLC | 7D 23 1B | ADC $1B23, X | 9D 93 1A | STA $1A93, X | 60 | RTS --------- -- -- --------- -- 86:B88E (3388E) -- (*** Load and store X / Y positions and store 4 palette colors for crystal shine/break) B88E | AE 93 19 | LDX $1993 | Load the value at 7E:1993 to X B891 | BD 0E B9 | LDA $B90E, X | Load the value at $B90E + X to A B894 | 99 4B 1A | STA $1A4B, Y | Store A to 7E:1A4B + Y B897 | BD 16 B9 | LDA $B916, X | Load the value at $B916 + X to A B89A | 99 93 1A | STA $1A93, Y | Store A to 7E:1A93 + Y B89D | 8A | TXA | Transfer X to A B89E | 0A | ASL A | Arithmetic shift A to the left (multiply by 2) B89F | 0A | ASL A | Arithmetic shift A to the left (multiply by 2) B8A0 | A8 | TAY | Transfer A to Y B8A1 | A2 F2 01 | LDX #$01F2 | Load the value #$01F2 to X B8A4 | B9 1E B9 | LDA $B91E, Y | Load the value at $B91E + Y to A B8A7 | 9F 00 C0 7E | STA $7EC000, X | Store A to 7E:C000 + X B8AB | C8 | INY | Increment Y by 1 B8AC | C8 | INY | Increment Y by 1 B8AD | E8 | INX | Increment X by 1 B8AE | E8 | INX | Increment X by 1 B8AF | E0 FA 01 | CPX #$01FA | Compare X to the value #$01FA B8B2 | D0 F0 | BNE $F0 | If X not equal to #$01FA, branch to B8A4, otherwise continue B8B4 | 60 | RTS | Pull PC from stack and return to 80FC Values chosen via sprite index: B90E | 84 00 7A 00 9E 00 68 00 (X position: Phantoon, Ridley, Draygon, Kraid) B916 | 90 00 51 00 80 00 72 00 (Y position: Phantoon, Ridley, Draygon, Kraid) B91E | FF 6B 3B 03 16 02 73 01 (4 color palette for Phantoon's crystal shine/break/shards) 5F 7F 1F 7C 16 58 0C 30 (4 color palette for Ridley's crystal shine/break/shards) 5A 7F C0 7E E0 6D E0 54 (4 color palette for Draygon's crystal shine/break/shards) FA 6B E0 3B 80 26 80 15 (4 color palette for Kraid's crystal shine/break/shards) --------- -- 86:B8F8 (338F8) -- (*** Load and store X / Y positions for ghost) B8F8 | AE 93 19 | LDX $1993 | Load the value at 7E:1993 to X B8FB | BD 0E B9 | LDA $B90E, X | Load the value at $B90E + X to A B8FE | 99 4B 1A | STA $1A4B, Y | Store A to 7E:1A4B + Y B901 | BD 16 B9 | LDA $B916, X | Load the value at $B916 + X to A B904 | 99 93 1A | STA $1A93, Y | Store A to 7E:1A93 + Y B907 | A9 00 FC | LDA #$FC00 | Load the value #$FC00 to A B90A | 99 DB 1A | STA $1ADB, Y | Store A to 7E:1ADB + Y B90D | 60 | RTS | Pull PC from stack and return to 80FC --------- -- 8D:C4E9 (6C4E9) -- (*** unknown... setting up some kind of ASM to be ran later for fading to dead palette?) C4E9 | 08 | PHP | Push P to stack C4EA | 8B | PHB | Push DB to stack C4EB | DA | PHX | Push X to stack C4EC | 4B | PHK | Push PB to stack C4ED | AB | PLB | Pull DB from stack C4EE | A2 0E 00 | LDX #$000E | Load the value #$000E to X C4F1 | BD 7D 1E | LDA $1E7D, X | Load the value at 7E:1E7D to X C4F4 | F0 09 | BEQ | If the value was zero, branch to C4FF, otherwise continue C4F6 | CA | DEX | Decrement X by 1 C4F7 | CA | DEX | Decrement X by 1 C4F8 | 10 F7 | BPL | If X still positive, branch to C4F1, otherwise continue C4FA | FA | PLX | Pull X from stack C4FB | AB | PLB | Pull DB from stack C4FC | 28 | PLP | Pull P from stack C4FD | 38 | SEC | Set the carry flag C4FE | 6B | RTL | Pull PC:PB from stack and return to (87:837B) C4FF | 98 | TYA | Transfer Y to A C500 | 9D 7D 1E | STA $1E7D, X | Store A to 7E:1E7D + X C503 | 9E 8D 1E | STZ $1E8D, X | Store zero to 7E:1E8D + X C506 | A9 26 C5 | LDA #$C526 | Load the value #$C526 to A C509 | 9D AD 1E | STA $1EAD, X | Store A to 7E:1EAD + X C50C | B9 02 00 | LDA $0002, Y | Load the value at $0002 + Y to X C50F | 9D BD 1E | STA $1EBD, X | Store A to 7E:1EBD + X C512 | A9 01 00 | LDA #$0001 | Load the value #$0001 to A C515 | 9D CD 1E | STA $1ECD, X | Store A to 7E:1ECD + X C518 | 9E DD 1E | STZ $1EDD, X | Store zero to 7E:1EDD + X C51B | 8A | TXA | Transfer X to A C51C | BB | TYX | Transfer Y to X C51D | A8 | TAY | Transfer A to Y C51E | FC 00 00 | JSR ($0000, X) | Push PC to stack and jump to the address stored at ($0000 + X) C521 | FA | PLX | Pull X from stack C522 | AB | PLB | Pull DB from stack C523 | 28 | PLP | Pull P from stack C524 | 18 | CLC | Clear the carry flag C525 | 6B | RTL | Pull PB:PC from stack and return to (87:837B) -- F745 -- 85 C6 20 E2 85 C6 22 E2 ??? RTS; Data pointer for below (F749, Draygon) 85 C6 2A E2 ??? RTS; Data pointer for below (F74D, Kraid) 85 C6 32 E2 ??? RTS; Data pointer for below (F751, Ridley) 85 C6 3A E2 ??? RTS; Data pointer for below (F755, Phantoon) 85 C6 E9 E2 85 C6 31 E3 40 E4 5E E4 85 C6 3B EB 85 C6 6E EC 85 C6 E2 EA 85 C6 E2 EA 85 C6 99 ED 30 F7 2D EE 85 C6 D7 EE 85 C6 F7 EF 85 C6 8E F0 85 C6 D1 F1 85 C6 D9 F2 85 C6 E1 F3 85 C6 E9 F4 85 C6 41 F5 85 C6 79 F5 85 C6 32 F6 85 C6 2A F6 55 C6 32 01? -- E222 -- 55 C6 C0 00 1E C6 3E E2 (Draygon) ASM pointer; palette index for fade to dead store; ???; ??? 55 C6 E0 00 1E C6 3E E2 (Kraid) 55 C6 20 01 1E C6 3E E2 (Ridley) 55 C6 40 01 08 00 00 00 (Phantoon) --------- -- 8D:C685 (6C685) -- [Just returns, no Pre-ran ASM] C685 | 60 | RTS | Pull PC from stack and return to C521 --------- -- 80:81FA (001FA) -- [Jump to check which statue death event bit to set and where, then sets event bit to on] 81FA | DA | PHX | Push X to stack 81FB | 5A | PHY | Push Y to stack 81FC | 08 | PHP | Push P to stack 81FD | C2 30 | REP #$30 | Reset m,x on P (16-bit Memory, Accumulator, X, and Y) 81FF | 22 8E 81 80 | JSL $80818E | Push PB:PC to stack and jump to 80:818E 8203 | BF 20 D8 7E | LDA $7ED820, X | Load the value at 7E:D820 + X to A 8207 | 0D E7 05 | ORA $05E7 | OR A by the value at 7E:05E7 820A | 9F 20 D8 7E | STA $7ED820, X | Store A to 7E:D820 + X 820E | 28 | PLP | Pull P from stack 820F | 7A | PLY | Pull Y from stack 8210 | FA | PLX | Pull X from stack 8211 | 6B | RTL | Pull PB:PC from stack and return to (87:8157) ================================ ==== ANIMATION TABLES.TXT ====== ================================ (FX1 Lava) Y=82AB (FX1 Acid) Y=82C9 (FX1 Rain) Y=82E7 (FX1 Flower Petals) Y=82FD (Treadmill, right) Y=8275 (Treadmill, left) Y=827B -- 0x3816A, Animation Data - Ground Spikes -- 08 00 04 9C (game frame count, frame tiles offset) 08 00 84 9C 08 00 04 9D 08 00 84 9C B7 80 6A 81 (asm pointer, table start) -- 0x3817E, Animation Table - Wall Spikes -- 08 00 84 9D 08 00 04 9E 08 00 84 9E 08 00 04 9E B7 80 7E 81 -- 0x38192, Animation Table - Water Surface in Background-- 0A 00 64 85 0A 00 64 87 0A 00 64 89 0A 00 64 87 B7 80 92 81 -- 0x381A6, Animation Table - Lava / Acid Background -- 0A 00 64 8B 0A 00 24 8C 0A 00 E4 8C 0A 00 A4 8D B7 80 A6 81 -- 0x381BA -- [ASM that checks if Phantoon is dead... place pointer $81BA at the start of your animation data to keep it from animating until Phantoon is dead, or change the load data pointer to frame 1 instead of the $81BA pointer to let these animations run even if Phantoon is alive] | A9 01 00 | LDA #$0001 | | | | | | | | | 22 DC 81 80 | JSR $8081DC | | | | | | | | | B0 07 | BCS $07 | | | | | | | | | 68 | PLA | | | | | | | | | A9 01 00 | LDA #$0001 | | | | | | | | | 9D 19 1F | STA $1F19, x | | | | | | | | | 60 | RTS | | | | | | | | -- 0x381CB, Animation Table, Metroid in Background Monitor -- BA 81 (asm pointer, check if Phantoon is dead?) 0A 00 E4 8E 0A 00 64 8F 0A 00 E4 8F 0A 00 64 8F B7 80 CD 81 -- 0x381E1, Animation Table, Treadmill (moving to Right) -- BA 81 01 00 64 8E 01 00 84 8E 01 00 A4 8E 01 00 C4 8E B7 80 E3 81 -- 0x381F7, Animation Table, Treadmill (moving to Left) -- BA 81 01 00 C4 8E 01 00 A4 8E 01 00 84 8E 01 00 64 8E B7 80 F9 81 -- 0x3820D, Animation Table, Brinstar Sucker Plant -- 10 00 64 99 10 00 44 9A 10 00 24 9B 10 00 44 9A B7 80 0D 82 -- 0x38221, Animation Table, Falling Sand Ceiling Tiles -- 0A 00 E4 91 0A 00 24 92 0A 00 64 92 0A 00 A4 92 B7 80 21 82 -- 0x38235, Animation Table, Falling Sand -- 0A 00 64 91 0A 00 84 91 0A 00 A4 91 0A 00 C4 91 B7 80 35 82 -- 0x38249 -- B2 80 49 82 (not sure what this is yet, failsafe infinity loop? pointed to in animation pointers) <---- 00 00 00 00 (null?) -- 0x38251, Animation pointers -- 6A 81 80 00 80 38; $8251 (Ground Spikes) <- (table start, # bytes/frame, vram placement) 7E 81 80 00 60 3D; $8257 (Wall Spikes) 92 81 00 02 00 1B; $825D (Crateria water surface in background) A6 81 C0 00 00 0A; $8263 (lava/acid bg, destroyed tourian set) A6 81 C0 00 40 06; $8269 (lava/acid bg, tourian) CB 81 80 00 C0 19; $826F (Metroid on monitor) E1 81 20 00 E0 00; $8275 (Treadmill, right) F7 81 20 00 E0 00; $827B (Treadmill, left) 0D 82 E0 00 10 04; $8281 (sucker plant) 21 82 40 00 00 10; $8287 (Falling sand, ceiling) 35 82 20 00 20 10; $828D (Falling sand) 89AC67 89AC8D Animation index(es) set by room itself, from there, pointer obtained by animation index(es) into area's animation pointer table. -- 0x38293, Animation Table, FX1 Lava -- 0D 00 64 A5 0D 00 A4 A5 0D 00 E4 A5 0D 00 24 A6 0D 00 64 A6 B7 80 93 82 (asm pointer, table start) 93 82 40 00 80 42 (table start, # bytes/frame, vram placement) -- 0x382B1, Animation Table, FX1 Acid -- 0A 00 A4 A6 0A 00 E4 A6 0A 00 24 A7 0A 00 64 A7 0A 00 A4 A7 B7 80 B1 82 B1 82 40 00 80 42 -- 0x382CF, Animation Table, FX1 Rain -- 0A 00 74 A8 0A 00 C4 A8 0A 00 14 A9 0A 00 64 A9 0A 00 B4 A9 B7 80 CF 82 CF 82 50 00 80 42 -- 0x382ED, Animation Table, FX1 Flower Petals (spores) -- 0A 00 E4 A7 0A 00 14 A8 0A 00 44 A8 B7 80 ED 82 ED 82 30 00 80 42