Prev: BF53 Up: Map Next: C61F
C00B: Object records
Every object, character and door in the game has a record here. They are backed up at start-up and restored when the game restarts. As an example, the short strong sword (object 14) at C1F4 in the original game:
$01,$FF,$03,$04,$00,$40,$80,$94, $84,$06,$9D,$05,$68,$06,$00,$00, $07, $0B,$57,$92,$FF
Byte 0: the number of locations the object occupies. Ordinary objects and characters have 1; doors have 2 (one on each side).
Byte 1: who is holding it, or what it is inside: an object number, or $FF for nobody. The curious map starts with 62 (Gandalf) here, the large key with 71 (a troll), the food with 33 (the cupboard). In my modified tape the sword has 0 here: Bilbo.
Byte 2: size. Byte 3: weight, which for a character is also how much it can carry. Byte 4: attributes, used in three ways. Bits 0-3 say how the object's contents are described (9F89): 0 in, 1 on, 2 behind, 3 under, 4 tied to; only contents 'in' or 'on' something fall out when it is broken (9257). Bits 4-6 are the character's side (1 Bilbo and his friends, 2 goblins and Gollum, 4 elves; Elrond has both 1 and 4): characters on the same side cannot attack or capture each other (90B4, A316). Bit 7, on a door or window, means Bilbo cannot pass through it unaided (8D19).
Byte 5: STRENGTH, byte 6: DEFENCE (see 90DB). The sword's strength is $40 (64).
Byte 7: flags. Bit 0 locked; bit 1 'pours' (a liquid, which evaporates when dropped); bit 2 full; bit 3 broken (for a character: dead); bit 4 on (lit); bit 5 open; bit 6 alive (a character); bit 7 visible. The words for these states come from the tables at A13B: LOCKED/UNLOCKED, FULL/EMPTY, BROKEN, ON/OFF, OPEN/CLOSED, ALIVE/DEAD.
Bytes 8-15: four word slots (little-endian references, offsets from 6000): the noun followed by adjectives. For the sword: $0684 SWORD, $059D SHORT, $0668 STRONG, 0.
Then one location byte per location (byte 0 says how many): here room 7, the trolls' cave. Changing this byte (at C204) moves the sword; I changed it to 1 so that the sword starts with Bilbo.
Then a list of the object's own action handlers, three bytes each: an action number (see AA47) and the address of a routine to run when that action is done to the object. An entry with action 0 straight after a matching entry is run as well, so several routines can be chained. The list ends with $FF. The sword's list has one entry: action 11 (STRIKE) runs 9257. The wine's has action 33 (DRINK) followed by action 0 running A9ED, which is what makes Bilbo drunk. Actions that an object has no handler for fall back on the default handlers at C61F (see 946F).
Offset 16 (the first location byte) is what the movement routine updates (8D19). For Bilbo, this is C01B.
C00B DEFB $01,$FF,$10,$40,$10,$40,$40,$E0 Object 0: you (strength 64, defence 64)
C013 DEFB $AC,$87,$00,$00,$00,$00,$00,$00
C01B DEFB $01,$1B,$1F,$92,$00,$3C,$90,$FF
C023 DEFB $01,$FF,$C0,$60,$00,$C0,$C0,$E0 Object 60: red golden dragon (strength 192, defence 192)
C02B DEFB $CC,$01,$3A,$05,$F7,$02,$00,$00
C033 DEFB $29,$FF
C035 DEFB $02,$FF,$FF,$FF,$00,$00,$10,$80 Object 5: round green door (strength 0, defence 16)
C03D DEFB $C4,$01,$63,$05,$08,$03,$00,$00
C045 DEFB $01,$04,$0B,$57,$92,$0C,$A2,$90
C04D DEFB $10,$78,$90,$18,$4E,$8E,$1E,$9D
C055 DEFB $8E,$25,$88,$A2,$26,$88,$A2,$2C
C05D DEFB $04,$94,$FF
C060 DEFB $02,$FF,$FF,$FF,$00,$00,$90,$81 Object 1: heavy rock door (strength 0, defence 144)
C068 DEFB $C4,$01,$2B,$03,$57,$05,$00,$00
C070 DEFB $07,$06,$0B,$57,$92,$0C,$A2,$90
C078 DEFB $10,$78,$90,$18,$4E,$8E,$1E,$9D
C080 DEFB $8E,$25,$68,$A2,$26,$68,$A2,$2C
C088 DEFB $04,$94,$FF
C08B DEFB $01,$FF,$00,$00,$00,$00,$00,$80 Object 43: golden key (strength 0, defence 0)
C093 DEFB $A9,$03,$F7,$02,$00,$00,$00,$00
C09B DEFB $4F,$FF
C09D DEFB $01,$1F,$00,$00,$00,$00,$00,$80 Object 2: small curious key (strength 0, defence 0)
C0A5 DEFB $A9,$03,$E5,$05,$63,$01,$00,$00
C0AD DEFB $0D,$FF
C0AF DEFB $01,$47,$01,$01,$00,$00,$00,$80 Object 4: large key (strength 0, defence 0)
C0B7 DEFB $A9,$03,$C3,$03,$00,$00,$00,$00
C0BF DEFB $05,$FF
C0C1 DEFB $01,$3E,$02,$00,$00,$00,$02,$80 Object 3: curious map (strength 0, defence 2)
C0C9 DEFB $30,$14,$63,$01,$00,$00,$43,$B4
C0D1 DEFB $01,$1C,$B8,$A6,$FF
C0D6 DEFB $02,$FF,$FF,$FF,$00,$FF,$00,$80 Object 6: small insignificant crack (strength 255, defence 0)
C0DE DEFB $51,$01,$E5,$05,$85,$03,$00,$00
C0E6 DEFB $0E,$0F,$10,$98,$A2,$0C,$A2,$90
C0EE DEFB $1E,$9D,$8E,$18,$4E,$8E,$FF
C0F5 DEFB $05,$FF,$A0,$50,$00,$40,$40,$80 Object 7: spider web (strength 64, defence 64)
C0FD DEFB $7A,$07,$27,$06,$00,$00,$00,$00
C105 DEFB $1A,$1C,$1B,$1D,$32,$0B,$57,$92
C10D DEFB $00,$A7,$A2,$1E,$9D,$8E,$FF
C114 DEFB $03,$FF,$FF,$FF,$00,$00,$00,$81 Object 8: red door (strength 0, defence 0)
C11C DEFB $C4,$01,$3A,$05,$00,$00,$00,$00
C124 DEFB $1F,$1E,$20,$10,$78,$90,$0C,$A2
C12C DEFB $90,$18,$4E,$8E,$1E,$9D,$8E,$25
C134 DEFB $64,$A2,$26,$64,$A2,$2C,$04,$94
C13C DEFB $FF
C13D DEFB $03,$FF,$FF,$FF,$00,$00,$00,$86 Object 9: fast black river (strength 0, defence 0)
C145 DEFB $4E,$05,$57,$02,$A5,$00,$54,$B4
C14D DEFB $42,$43,$19,$11,$92,$93,$0E,$92
C155 DEFB $93,$19,$5A,$8E,$32,$40,$A2,$FF
C15D DEFB $02,$FF,$FF,$FF,$00,$00,$00,$86 Object 42: fast river (strength 0, defence 0)
C165 DEFB $4E,$05,$57,$02,$00,$00,$00,$00
C16D DEFB $17,$21,$11,$92,$93,$0E,$92,$93
C175 DEFB $19,$5A,$8E,$32,$FD,$A1,$FF
C17C DEFB $02,$FF,$40,$FF,$00,$50,$50,$80 Object 10: goblins back door (strength 80, defence 80)
C184 DEFB $C4,$01,$EC,$02,$7C,$00,$00,$00
C18C DEFB $13,$14,$10,$78,$90,$0C,$A2,$90
C194 DEFB $0B,$57,$92,$18,$4E,$8E,$1E,$9D
C19C DEFB $8E,$2C,$04,$94,$0B,$57,$92,$FF
C1A4 DEFB $02,$FF,$FF,$FF,$00,$00,$00,$01 Object 11: mountains side door (strength 0, defence 0)
C1AC DEFB $C4,$01,$5A,$04,$AA,$05,$00,$00
C1B4 DEFB $2A,$2B,$0C,$A2,$90,$00,$96,$A9
C1BC DEFB $26,$60,$A2,$00,$8E,$A2,$1E,$9D
C1C4 DEFB $8E,$18,$4E,$8E,$2C,$04,$94,$FF
C1CC DEFB $02,$FF,$FF,$FF,$00,$00,$30,$80 Object 12: large trap door (strength 0, defence 48)
C1D4 DEFB $C4,$01,$C3,$03,$E4,$06,$00,$00
C1DC DEFB $20,$21,$10,$77,$A5,$0C,$77,$A5
C1E4 DEFB $0B,$57,$92,$18,$4E,$8E,$1E,$9D
C1EC DEFB $8E,$2C,$04,$94,$00,$DB,$A4,$FF
C1F4 DEFB $01,$FF,$03,$04,$00,$40,$80,$94 Object 14: short strong sword (strength 64, defence 128)
C1FC DEFB $84,$06,$9D,$05,$68,$06,$00,$00
C204 DEFB $07,$0B,$57,$92,$FF
C209 DEFB $01,$FF,$00,$00,$00,$FF,$00,$80 Object 16: valuable golden ring (strength 255, defence 0)
C211 DEFB $41,$05,$39,$07,$F7,$02,$00,$00
C219 DEFB $3D,$28,$C0,$A2,$16,$EC,$A2,$FF
C221 DEFB $01,$42,$02,$02,$00,$02,$02,$80 Object 15: red key (strength 2, defence 2)
C229 DEFB $A9,$03,$3A,$05,$00,$00,$00,$00
C231 DEFB $20,$FF
C233 DEFB $02,$FF,$FF,$FF,$00,$FF,$FF,$80 Object 17: goblins door (strength 255, defence 255)
C23B DEFB $C4,$01,$EC,$02,$00,$00,$00,$00
C243 DEFB $10,$0D,$10,$E7,$A3,$0C,$A2,$90
C24B DEFB $1E,$9D,$8E,$18,$4E,$8E,$2C,$04
C253 DEFB $94,$FF
C255 DEFB $01,$FF,$02,$02,$04,$20,$05,$80 Object 18: rope (strength 32, defence 5)
C25D DEFB $5F,$05,$00,$00,$00,$00,$00,$00
C265 DEFB $07,$2B,$08,$A7,$2E,$78,$A1,$31
C26D DEFB $6A,$A7,$FF
C270 DEFB $02,$FF,$FF,$FF,$00,$FF,$FF,$80 Object 13: magic door (strength 255, defence 255)
C278 DEFB $C4,$01,$28,$04,$00,$00,$00,$00
C280 DEFB $1E,$1C,$1E,$9D,$8E,$18,$4E,$8E
C288 DEFB $2C,$04,$94,$1C,$14,$A6,$FF
C28F DEFB $01,$FF,$15,$60,$10,$70,$88,$E0 Object 62: gandalf (strength 112, defence 136)
C297 DEFB $C1,$82,$00,$00,$00,$00,$00,$00
C29F DEFB $01,$FF
C2A1 DEFB $01,$FF,$1D,$50,$10,$68,$78,$E0 Object 63: thorin (strength 104, defence 120)
C2A9 DEFB $B8,$86,$00,$00,$00,$00,$00,$00
C2B1 DEFB $01,$0F,$DB,$90,$00,$31,$A6,$FF
C2B9 DEFB $01,$FF,$70,$FF,$40,$40,$30,$E0 Object 64: wood elf (strength 64, defence 48)
C2C1 DEFB $0E,$02,$A2,$07,$00,$00,$00,$00
C2C9 DEFB $1C,$FF
C2CB DEFB $01,$FF,$20,$30,$50,$40,$40,$E0 Object 65: elrond (strength 64, defence 64)
C2D3 DEFB $11,$82,$00,$00,$00,$00,$00,$00
C2DB DEFB $09,$FF
C2DD DEFB $01,$FF,$20,$03,$00,$20,$20,$84 Object 19: barrel (strength 32, defence 32)
C2E5 DEFB $84,$10,$00,$00,$00,$00,$00,$00
C2ED DEFB $20,$10,$78,$90,$0C,$A2,$90,$11
C2F5 DEFB $B9,$91,$23,$D3,$8E,$22,$6E,$93
C2FD DEFB $38,$1B,$A9,$36,$86,$A4,$0B,$57
C305 DEFB $92,$FF
C307 DEFB $01,$13,$1F,$05,$00,$00,$00,$82 Object 20: wine (strength 0, defence 0)
C30F DEFB $96,$37,$00,$00,$00,$00,$00,$00
C317 DEFB $20,$21,$06,$92,$00,$ED,$A9,$FF
C31F DEFB $01,$FF,$30,$30,$40,$20,$70,$60 Object 66: butler (strength 32, defence 112)
C327 DEFB $DC,$00,$00,$00,$00,$00,$00,$00
C32F DEFB $20,$FF
C331 DEFB $01,$FF,$30,$30,$00,$37,$37,$E0 Object 67: vicious warg (strength 55, defence 55)
C339 DEFB $9E,$07,$45,$07,$00,$00,$00,$00
C341 DEFB $15,$FF
C343 DEFB $01,$FF,$1F,$05,$00,$00,$00,$82 Object 21: water (strength 0, defence 0)
C34B DEFB $62,$37,$00,$00,$00,$00,$00,$00
C353 DEFB $00,$21,$06,$92,$FF
C358 DEFB $01,$FF,$1F,$05,$00,$00,$00,$82 Object 22: black water (strength 0, defence 0)
C360 DEFB $62,$07,$A5,$00,$00,$00,$00,$00
C368 DEFB $00,$21,$58,$A2,$FF
C36D DEFB $08,$FF,$00,$05,$00,$00,$00,$82 Object 23: water (strength 0, defence 0)
C375 DEFB $62,$07,$00,$00,$00,$00,$00,$00
C37D DEFB $08,$21,$22,$24,$31,$2D,$11,$17
C385 DEFB $21,$74,$A1,$FF
C389 DEFB $03,$FF,$1F,$05,$00,$00,$00,$82 Object 24: black water (strength 0, defence 0)
C391 DEFB $62,$07,$A5,$00,$00,$00,$00,$00
C399 DEFB $19,$42,$43,$21,$58,$A2,$FF
C3A0 DEFB $01,$FF,$05,$05,$20,$20,$40,$E0 Object 68: gollum (strength 32, defence 64)
C3A8 DEFB $FD,$82,$00,$00,$00,$00,$00,$00
C3B0 DEFB $11,$FF
C3B2 DEFB $01,$FF,$30,$10,$10,$60,$60,$E0 Object 70: bard (strength 96, defence 96)
C3BA DEFB $80,$80,$00,$00,$00,$00,$00,$00
C3C2 DEFB $23,$FF
C3C4 DEFB $01,$46,$05,$03,$00,$10,$10,$80 Object 25: bow (strength 16, defence 16)
C3CC DEFB $C3,$10,$00,$00,$00,$00,$00,$00
C3D4 DEFB $23,$0B,$57,$92,$FF
C3D9 DEFB $01,$46,$02,$01,$00,$10,$10,$80 Object 26: strong arrow (strength 16, defence 16)
C3E1 DEFB $6B,$10,$68,$06,$00,$00,$00,$00
C3E9 DEFB $23,$0B,$57,$92,$FF
C3EE DEFB $02,$FF,$60,$FF,$80,$70,$70,$80 Object 27: window (strength 112, defence 112)
C3F6 DEFB $90,$07,$00,$00,$00,$00,$00,$00
C3FE DEFB $0D,$12,$1E,$78,$A6,$0B,$78,$A6
C406 DEFB $10,$55,$A6,$0C,$55,$A6,$18,$78
C40E DEFB $A6,$FF
C410 DEFB $02,$FF,$05,$05,$00,$80,$80,$94 Object 28: torch (strength 128, defence 128)
C418 DEFB $DB,$16,$00,$00,$00,$00,$00,$00
C420 DEFB $10,$1E,$FF
C423 DEFB $01,$FF,$65,$65,$00,$00,$00,$80 Object 29: sand (strength 0, defence 0)
C42B DEFB $80,$35,$00,$00,$00,$00,$00,$00
C433 DEFB $0D,$39,$CF,$8F,$11,$B9,$91,$FF
C43B DEFB $01,$1D,$FF,$FF,$03,$80,$80,$81 Object 30: trap door (strength 128, defence 128)
C443 DEFB $C4,$01,$E4,$06,$00,$00,$00,$00
C44B DEFB $0D,$0B,$57,$92,$26,$88,$A2,$10
C453 DEFB $78,$90,$FF
C456 DEFB $01,$1E,$FF,$FF,$00,$00,$00,$A0 Object 31: goblins cache (strength 0, defence 0)
C45E DEFB $E2,$00,$EC,$02,$00,$00,$00,$00
C466 DEFB $0D,$11,$B9,$91,$14,$75,$8C,$FF
C46E DEFB $01,$FF,$FF,$FF,$02,$00,$00,$80 Object 32: heavy curtain (strength 0, defence 0)
C476 DEFB $6A,$11,$2B,$03,$00,$00,$00,$00
C47E DEFB $16,$10,$78,$90,$0C,$A2,$90,$FF
C486 DEFB $01,$24,$FF,$FF,$00,$00,$00,$80 Object 33: large cupboard (strength 0, defence 0)
C48E DEFB $5B,$11,$C3,$03,$00,$00,$00,$00
C496 DEFB $16,$10,$78,$90,$0C,$A2,$90,$11
C49E DEFB $B9,$91,$14,$75,$8C,$0B,$57,$92
C4A6 DEFB $FF
C4A7 DEFB $01,$21,$05,$05,$00,$01,$00,$80 Object 34: food (strength 1, defence 0)
C4AF DEFB $8F,$32,$00,$00,$00,$00,$00,$00
C4B7 DEFB $16,$1B,$1F,$92,$FF
C4BC DEFB $01,$FF,$20,$20,$00,$05,$05,$80 Object 35: valuable treasure (strength 5, defence 5)
C4C4 DEFB $E8,$06,$39,$07,$00,$00,$00,$00
C4CC DEFB $29,$FF
C4CE DEFB $01,$20,$FF,$FF,$00,$00,$00,$A0 Object 36: wall (strength 0, defence 0)
C4D6 DEFB $5E,$17,$00,$00,$00,$00,$00,$00
C4DE DEFB $16,$11,$00,$00,$FF
C4E3 DEFB $01,$FF,$40,$FF,$00,$00,$00,$80 Object 37: wooden chest (strength 0, defence 0)
C4EB DEFB $22,$01,$A6,$07,$00,$00,$00,$00
C4F3 DEFB $01,$10,$78,$90,$0C,$A2,$90,$11
C4FB DEFB $B9,$91,$0E,$B9,$91,$14,$75,$8C
C503 DEFB $0B,$57,$92,$36,$86,$A4,$FF
C50A DEFB $01,$FF,$40,$FF,$00,$00,$00,$A0 Object 41: wooden boat (strength 0, defence 0)
C512 DEFB $B8,$00,$A6,$07,$00,$00,$00,$00
C51A DEFB $43,$11,$B9,$91,$0E,$B9,$91,$14
C522 DEFB $75,$8C,$0B,$57,$92,$36,$86,$A4
C52A DEFB $00,$92,$A7,$FF
C52E DEFB $01,$FF,$90,$90,$00,$A0,$A0,$E0 Object 71: hideous troll (strength 160, defence 160)
C536 DEFB $FC,$06,$3B,$03,$00,$00,$00,$00
C53E DEFB $05,$FF
C540 DEFB $01,$FF,$90,$90,$00,$A0,$A0,$E0 Object 72: vicious troll (strength 160, defence 160)
C548 DEFB $FC,$06,$45,$07,$00,$00,$00,$00
C550 DEFB $05,$FF
C552 DEFB $01,$FF,$05,$05,$00,$01,$00,$80 Object 38: lunch (strength 1, defence 0)
C55A DEFB $23,$34,$00,$00,$00,$00,$00,$00
C562 DEFB $00,$1B,$1F,$92,$FF
C567 DEFB $02,$FF,$90,$FF,$00,$00,$00,$80 Object 39: strong portcullis (strength 0, defence 0)
C56F DEFB $F5,$04,$68,$06,$00,$00,$00,$00
C577 DEFB $21,$22,$1E,$9D,$8E,$FF
C57D DEFB $01,$FF,$FE,$FE,$00,$FF,$FF,$80 Object 40: stone (strength 255, defence 255)
C585 DEFB $45,$36,$00,$00,$00,$00,$00,$00
C58D DEFB $2F,$FF
C58F DEFB $01,$FF,$40,$30,$20,$48,$60,$E0 Object 61: nasty goblin (strength 72, defence 96)
C597 DEFB $E6,$02,$6E,$04,$00,$00,$00,$00
C59F DEFB $0F,$0F,$DB,$90,$00,$6A,$A3,$FF
C5A7 DEFB $01,$FF,$40,$30,$20,$48,$60,$E0 Object 69: hideous goblin (strength 72, defence 96)
C5AF DEFB $E6,$02,$3B,$03,$00,$00,$00,$00
C5B7 DEFB $3A,$0F,$DB,$90,$00,$6A,$A3,$FF
C5BF DEFB $01,$FF,$40,$30,$20,$48,$60,$E0 Object 73: horrible goblin (strength 72, defence 96)
C5C7 DEFB $E6,$02,$65,$03,$00,$00,$00,$00
C5CF DEFB $12,$0F,$DB,$90,$00,$6A,$A3,$FF
C5D7 DEFB $01,$FF,$40,$30,$20,$48,$60,$E0 Object 74: mean goblin (strength 72, defence 96)
C5DF DEFB $E6,$02,$38,$04,$00,$00,$00,$00
C5E7 DEFB $38,$0F,$DB,$90,$00,$6A,$A3,$FF
C5EF DEFB $01,$FF,$40,$30,$20,$48,$60,$E0 Object 75: vicious goblin (strength 72, defence 96)
C5F7 DEFB $E6,$02,$45,$07,$00,$00,$00,$00
C5FF DEFB $40,$0F,$DB,$90,$00,$6A,$A3,$FF
C607 DEFB $01,$FF,$40,$30,$20,$48,$60,$E0 Object 76: disgusting goblin (strength 72, defence 96)
C60F DEFB $E6,$02,$B6,$01,$00,$00,$00,$00
C617 DEFB $10,$0F,$DB,$90,$00,$6A,$A3,$FF
Prev: BF53 Up: Map Next: C61F