--------------------------- OBJECT MAPS $148400-$14FFFF pointers: $148000-$1483FF --------------------------- byte 0 object mold size property byte 1 lower bits: multiple objects upper bits: offset flags 0x object offset flag (default, not really set) 1x treasure chest flag 2x battle engagement flag byte 2 lower bits: extra movement speed upper bits: object behavior bit 3 object turns around and faces Mario when touched/engaged bit 4 bit 5 bit 6 sets animation sequence; if not set, no animation bit 7 no floating (ie. if z coord higher than ground, it falls) byte 3 object interaction bit 1 cannot move around if Z > 0 bit 3 cannot jump on bit 6 sets object(s) physical field(s) byte 4 bits 0-1: object palette offset (0-3) byte 4,5 (12-bit) object attribute assignment (divide by 4 = object attribute byte) byte 5,6 (12-bit) movement sequence assignment (000-3FF) byte 7,8 (12-bit) event byte (if byte 2 = 0x) formation pack (if byte 2 = 2x) byte 8 event initiator (if byte 2 = 0x) 1x press A from any side 2x press A from front 3x do anything EXCEPT touch any side 4x press A from any side / touch any side 5X press A from front / touch from front 6x do anything 7x hit from below 8X jump on 9x jump on / hit from below Ax touch any side Bx touch from front Cx do anything EXCEPT press A treasure initiator (if byte 2 = 1x) 1x-Cx same as event initiator values battle initiator (if byte 2 = 2x) bit 0 pack # +256 (never used since max index = 0xFF anyways) bit 1-3 0 = remove permanently from level 1 = remove from level temporarily 2 = do not remove at all returns after entering area again bit 2 is not removed when defeated in battle bit 3 returns after entering area again 1x-Cx same as event initiator values byte 9 lower bits: (bits 0 - 2) object offset (if byte 2 = 0x) (bits 3,4) ??? star XP increments (if byte 2 = 1x) (read from 0x39BC44) x0 monsters give 1 XP x1 monsters give 2 XP x2 monsters give 5 XP x3 monsters give 8 XP x4 monsters give 13 XP x5 monsters give 11 XP x6 monsters give 0 XP x7 monsters give 5 XP x8 monsters give 6 XP x9 monsters give 9 XP movement offset (if byte 2 = 2x) upper bits: (bits 5-7) event offset (if byte 2 = 0x) treasure type/item (if byte 2 = 1x) 0x Mushroom (restore all HP/FP) 1x Invincible Star 2x Flower (max FP +1) 3x Frog Coin default is an item byte, but usually the event script declares the item formation pack offset (if byte 2 = 2x) byte 10 X coordinate byte 11 Y coordinate byte 12 bits 0-4: elevation (up to 0x1F) bits 5-7: radial position 00 right 20 down-right 40 foward 60 down-left 80 left A0 up-left C0 up E0 up-right bytes 9-12 can be subsequently repeated (with different values) for each multiple object ------------------------------ LAND'S END UNDERGROUND, AREA 4 $14BFC3 ------------------------------ 65 ;pointer to data 2F 48 40 ;byte 1 sets 15 extra objects (for the Geckits) ;byte 2 faces Mario when touched ;byte 3 object interaction 7B 05 F0 ;object attribute: $15E ($57B / 4) ;movement byte: 300 (AND $F00 by $3FF) 52 C0 ;byte 1 formation pack assignment: $52 ;byte 2 engage in battle 80 88 12 A0 ;byte 1 formation pack offset upper bits: formation pack $5A (52 + 8) ;byte 2 X coordinate ;byte 3 Y coordinate ;byte 4 direction/height (faces up-left) 80 8C 11 60 ;the other 15 Geckits' properties 80 86 15 20 80 89 16 A0 80 8B 15 60 80 8E 14 20 80 85 19 A0 80 88 1B 60 80 8B 19 20 80 8E 1B A0 80 87 21 60 80 8B 20 20 80 8D 1F A0 80 8A 24 60 80 8C 25 20 80 8E 23 20 00 40 50 13 14 CA ;Shaman movement/object, 0A1/413 02 A7 00 83 15 60 00 40 40 93 11 CA ;Trampoline movement/object, 0A1/193 8F 86 00 86 1D 60 11 40 40 DF 17 CA ;Treasure Chest (w/star) movement/object, 0A1/7DF 01 77 18 82 95 63 ;the two different treasure chests (1st star, 2nd star) 19 82 95 63 /////////////////////////////////////////////////////////////////////// byte 1 only check bits 0-1 if bit 4 set, otherwise they are redundant bit 0 sprite 4 tile index +24 bit 1 sprite 4 tile index +32 bit 0,1 sprite 4 tile index +40 bit 2 is never used bit 3 no partition for shadows (used when shadows not needed) bit 4 ??? bit 5,6 0 NPCs start palette at index 0 (used when Mario is not present) 1 NPCs start palette at index 1 (used when Mario is present) 2 NPCs start palette at index 2 (used when treasure chest uses item bag, mushroom, or flower) 3 NPCs start palette at index 3 (used when one or more allies present, but not initially visible) bit 7 sprites use 8 palettes (if not set, the second 4 pal are the same as the first 4 pal) store the sprites only if visible byte 2 - uses addr 00:01A0 - 00:01A5, for sprite 1 byte 3 - uses addr 00:01A6 - 00:01AB, for sprite 2 byte 4 - uses addr 00:01AC - 00:01AF, for sprite 3 NOTE: if another NPC uses the same sprite, then bytes 2-4 will affect it too save point sprites aren't included at all 1st addr is width of sprites 1 = 24 pixels wide 2 = 3 = 32 pixels wide BY DEFAULT ALL SPRITES ARE 24 PIXELS WIDE lower bits special values: 0 - 1st addr: store 0x03 (ie. the sprites are 32 pixels wide) 2nd addr: store 0xFF 3rd addr: ??? (depends on value of bits 4,5,6 shift right twice, clears if they're 0) 4th addr: bits 4,5,6 shift right twice and store does nothing with bit 7 1 - 1st addr: store 0x01 (ie. the sprites are 24 pixels wide) 2nd addr: store 0xFF 3rd addr: clear 4th addr: bits 4,5,6 shift right twice and store does nothing with bit 7 7 - 1st addr: store 0xFF 2nd addr: no change 3rd addr: clear 4th addr: clear does nothing with other bits THIS VALUE SKIPS THE BYTE AND ASSIGNS THE SPRITES USING THE NExT BYTE other values: 2 - sprite #$5E (treasure chest) 1st addr: store 0x08 2nd addr: 3rd addr: store 0x80 4th addr: clear 5th addr: shift byte 2 bits 5,6 left three times, 6th addr: clear 3 - sprite #$5F (empty treasure chest) (never used) 4 - sprite #$C0 (coin) 1st addr: store 0x0A 2nd addr: 3rd addr: clear 4th addr: clear 5 - never used 6 - never used bit 3 and bit 4 are never used for all 3 bytes upper bits special values: 1 - 2 - 3 - 4 - 5 - 6 - 7 - for debugging, set the exec to C09995, and log the **SECOND** time it breaks