Prev: 8535 Up: Map Next: 898F
858F: Main room logic.
Input
Output
Command strings holding logic and checks for each room.
Value Description
00 Exit position test
01 Obj position test
FF End of string
FE end of command
FD Run action
When the command was 'FD'
00
01 Pick up object
Logic_Room00 858F DEFB $01,$3A,$88 [IF] (01) position (3a, 88)
8592 DEFB $FD,$01 [THEN] (FD) Action:Pickup object (01)
8594 DEFB $FE [ENDIF]
8595 DEFB $00,$08,$A0 [IF] exit (08, 0a)
8598 DEFB $FD,$02,$11,$E8,$98 [THEN] (FD) Exit to room (11) position (e8, 98)
859D DEFB $FE [ENDIF]
859E DEFB $FF [END]
Room 01
Logic_Room01 859F DEFB $01,$48,$98 [IF] Checks (01) to see if Wally is within position (48, 98) Room object slot.
85A2 DEFB $FD,$01 [THEN] Picks up object (FD, 01)
85A4 DEFB $FE [ENDIF]
85A5 DEFB $00,$C8,$88 [IF] exit (c8,88)
85A8 DEFB $FD,$02,$02,$08,$98 [THEN] (FD, 02) Enter new room(02) at position (08, 98)
85AD DEFB $FE [ENDIF]
85AE DEFB $00,$00,$48 [IF] exit (00, 48)
85B1 DEFB $FD,$02,$05,$D8,$98 [THEN] (FD, 02) Enter new room(05) at position (D8, 98)
85B6 DEFB $FE [ENDIF]
85B7 DEFB $00,$E8,$88 [IF] exit (e8, 88)
85BA DEFB $08 [AND] 'test for carring towel and boxing glove trap'
85BB DEFB $FD,$02,$03,$2E,$98 [THEN] (FD, 02) Enter new room (03) at position (2e, 98)
85C0 DEFB $FE [ENDIF] (FE),
85C1 DEFB $FF [END]
Room 02
Logic_Room02 85C2 DEFB $01,$98,$98 [IF] (01) position (98, 98)
85C5 DEFB $02,$0B,$FD,$01 [THEN] (FD) exit (02) to room (0B) position (FD, 01)
85C9 DEFB $FE [ENDIF]
85CA DEFB $00,$08,$88 [IF] (00) exit (08, 88)
85CD DEFB $FD,$02,$01,$C8,$98 [THEN] (FD) exit (02) to room (01) position (c8, 98)
85D2 DEFB $FE [ENDIF]
85D3 DEFB $00,$E8,$88 [IF] (00) exit (e8, 88)
85D6 DEFB $FD,$02,$04,$08,$98 [THEN] (FD) exit (02) to room (04) position (08, 98)
85DB DEFB $FE [ENDIF]
85DC DEFB $00,$38,$88 [IF] (00) exit (38, 88)
85DF DEFB $FD,$02,$03,$E8,$98 [THEN] (FD) exit (02) to room (03) position (e8, 98)
85E4 DEFB $FE [ENDIF]
85E5 DEFB $FF [END]
Room 03
Logic_Room03 85E6 DEFB $01,$CC,$70 aa [IF] (00) position (cc, 70)
85E9 DEFB $FD [THEN]
85EA DEFB $01 (01) Pick up object
85EB DEFB $FE [ENDIF]
85EC DEFB $00,$E8,$88 [IF] (00) position (e8, 88)
85EF DEFB $08 (08) Boxing Glove Trap safe?
85F0 DEFB $FD [THEN]
85F1 DEFB $02,$02,$38,$98 (02) Enter room (02) at position (38, 98)
85F5 DEFB $FE [ENDIF]
85F6 DEFB $00,$30,$88,$FD,$02,$01,$E8,$98
85FE DEFB $FE,$00,$08,$88,$FD,$02,$06,$08
8606 DEFB $98,$FE,$FF
Logic_Room04 8609 DEFB $01,$78,$98 [IF] (01) position (78, 98)
860C DEFB $FD [THEN]
860D DEFB $01 pickup (01)
860E DEFB $FE [ENDIF]
860F DEFB $00,$78,$88 [IF] (00) position (78, 88)
8612 DEFB $06 [AND] (06) Lift is OFF
8613 DEFB $FD [THEN]
8614 DEFB $09 Turn lift on (09)
8615 DEFB $FE [ENDIF]
8616 DEFB $00,$E8,$98 [IF] (00) position (E8, 98)
8619 DEFB $FD [THEN]
861A DEFB $02,$09,$E8,$98 Enter (02) room (09) at (E8, 98)
861E DEFB $FE [ENDIF]
861F DEFB $00,$08,$88 [IF] (00) position (08, 88)
8622 DEFB $02,$03 [AND] pockets (02) hold object (03) Door Handle
8624 DEFB $FD [THEN]
8625 DEFB $02,$02,$E8,$98 Enter (02) room (02) at (E8, 98)
8629 DEFB $FE [ENDIF]
862A DEFB $FF [END]
Logic_Room05 862B DEFB $01,$68,$98 [IF] (01) position (68, 98)
862E DEFB $FD [THEN]
862F DEFB $01 Pickup (01)
8630 DEFB $FE [ENDIF]
8631 DEFB $00,$E8,$98 [IF] (00) position (E8, 98)
8634 DEFB $FD [THEN]
8635 DEFB $02,$01,$10,$48 Enter (02) room (01) at (10, 48)
8639 DEFB $FE [ENDIF]
863A DEFB $00,$28,$88 [IF] (00) position (28, 88)
863D DEFB $02,$14 [AND] pockets (02) hold object (14) The Penny
863F DEFB $FD [THEN]
8640 DEFB $02,$0C,$20,$98 Enter (02) room (0c) at (20, 98)
8644 DEFB $FE [ENDIF]
8645 DEFB $00,$08,$88 [IF] (01) position (78, 98)
8648 DEFB $FD [THEN]
8649 DEFB $02,$0A,$E8,$98 Enter (02) room (0A) at (E8, 98)
864D DEFB $FE [ENDIF]
864E DEFB $FF [END]
Logic_Room06 864F DEFB $01,$78,$98 [IF] (01) position (78, 98)
8652 DEFB $FD [THEN]
8653 DEFB $01 Pickup (01)
8654 DEFB $FE [ENDIF]
8655 DEFB $00,$28,$98 [IF] (00) position (28, 98)
8658 DEFB $02,$10 [AND] pockets (02) hold object (10) Bucket
865A DEFB $FD [THEN]
865B DEFB $06 Empty (06) bucket.
865C DEFB $FE [ENDIF]
865D DEFB $00,$08,$88 [IF] (00) position (08, 88)
8660 DEFB $02,$10 [AND] pockets (02) hold object (10) Bucket
8662 DEFB $FD [THEN]
8663 DEFB $06 Empty (06) bucket.
8664 DEFB $FE [ENDIF]
8665 DEFB $00,$E8,$98 [IF] (00) position (E8, 98)
8668 DEFB $02,$10 [AND] pockets (02) hold object (10) Bucket
866A DEFB $FD [THEN]
866B DEFB $06 Empty (06) bucket.
866C DEFB $FE [ENDIF]
866D DEFB $00,$28,$98 [IF] (00) position (28, 98)
8670 DEFB $FD [THEN]
8671 DEFB $02,$09,$08,$98 Enter (02) room (09) at (08, 98)
8675 DEFB $FE [ENDIF]
8676 DEFB $00,$08,$88 [IF] (00) position (08, 88)
8679 DEFB $FD [THEN]
867A DEFB $02,$03,$08,$98 Enter (02) room (03) at (08, 98)
867E DEFB $FE [ENDIF]
867F DEFB $00,$E8,$98 [IF] (00) position (E8, 98)
8682 DEFB $FD [THEN]
8683 DEFB $02,$07,$10,$48 Enter (02) room (07) at (10, 48)
8687 DEFB $FE [ENDIF]
8688 DEFB $FF [END]
Rocket Room
Logic_Room07 8689 DEFB $01,$60,$98 [IF] (01) position (06, 98)
868C DEFB $FD [THEN]
868D DEFB $01 pickup (01)
868E DEFB $FE [ENDIF]
868F DEFB $00,$00,$48 [IF] (00) position (00, 48)
8692 DEFB $FD [THEN]
8693 DEFB $02,$06,$DE,$98 Enter (02) room (06) at (DE, 98)
8697 DEFB $FE ENDIF
8698 DEFB $00,$E8,$88 [IF] (00) position (E8, 08)
869B DEFB $08 [AND] (08) Boxing glove trap is safe
869C DEFB $04 [AND] (04) Lift is on
869D DEFB $FD [THEN]
869E DEFB $02,$08,$E8,$98 Enter (02) room (08) at (E8, 98)
86A2 DEFB $0C,$02 Set (02) lift light number (02)
86A4 DEFB $FE [ENDIF]
86A5 DEFB $00,$C2,$98 [IF] (00) position (C2, 98)
86A8 DEFB $02,$08 [AND] (02) pockets hold object (08) Fuel can.
86AA DEFB $03 [AND] (03) fuel can is full.
86AB DEFB $FD [THEN]
86AC DEFB $10 Liftoff (10) rocket
86AD DEFB $02,$19,$30,$88 Enter (02) room (19) at (30, 88)
86B1 DEFB $FE [ENDIF]
86B2 DEFB $FF [END]
Room 08 : Lift
Logic_Room08 86B3 DEFB $01,$08,$80,$02,$0E,$FD,$00,$0E
86BB DEFB $FE,$00,$3D,$88,$FD,$0A,$03,$0C
86C3 DEFB $00,$FE,$00,$6D,$88,$FD,$0A,$01
86CB DEFB $0C,$01,$FE,$00,$9D,$88,$FD,$0A
86D3 DEFB $00,$0C,$02,$FE,$00,$CD,$88,$FD
86DB DEFB $0A,$02,$0C,$03,$FE,$00,$E8,$88
86E3 DEFB $08,$05,$03,$FD,$0B,$02,$16,$08
86EB DEFB $98,$FE
86ED DEFB $00,$E8,$88 [IF](00) position (E8, 88)
86F0 DEFB $05,$02 [AND] (05) LiftFloorNo == (02)
86F2 DEFB $FD [THEN]
86F3 DEFB $0B Decrease lift count (0B)
86F4 DEFB $02,$10,$08,$98 Exit (2) to room (10) position (08, 98)
86F8 DEFB $FE [ENDIF]
86F9 DEFB $00,$E8,$88,$05,$01,$FD,$0B,$02
8701 DEFB $0F,$08,$98,$FE,$00,$E8,$88,$05
8709 DEFB $00,$FD,$0B,$02,$07,$E8,$98,$FE
8711 DEFB $FF
Logic_Room09 8712 DEFB $01,$C8,$28 [IF] (01) position (C8, 28)
8715 DEFB $FD [THEN]
8716 DEFB $01 (01) pickup
8717 DEFB $FE [ENDIF]
8718 DEFB $00,$70,$98 [IF] (00) position (86, 68)
871B DEFB $FD [THEN]
871C DEFB $0F Help Off (0F)
871D DEFB $02,$0E,$60,$98 Enter (02) room (0E) at (60, 98)
8721 DEFB $FE [ENDIF]
8722 DEFB $FF [END]
Logic_Room0A 8723 DEFB $01,$86,$68,$FD,$01,$FE,$00,$50
872B DEFB $88,$02,$02,$FD,$02,$0B,$08,$98
8733 DEFB $FE,$00,$E8,$88,$08,$FD,$02,$05
873B DEFB $08,$98,$FE,$00,$08,$88,$FD,$02
8743 DEFB $0D,$E8,$98,$FE,$FF
Logic_Room0B 8748 DEFB $01,$48,$98,$FD,$01,$FE,$02,$0D
8750 DEFB $02,$1D,$FD,$04,$FE,$00,$08,$88
8758 DEFB $FD,$02,$0A,$50,$98,$FE,$00,$E8
8760 DEFB $88,$FD,$02,$0C,$20,$98,$FE,$FF
Logic_Room0C 8768 DEFB $01,$B0,$98,$FD,$01,$FE,$00,$20
8770 DEFB $88,$FD,$02,$05,$28,$98,$FE,$FF
Logic_Room0D 8778 DEFB $01,$C0,$78,$02,$1A,$FD,$00,$1A
8780 DEFB $FE,$00,$E8,$88,$FD,$02,$0A,$08
8788 DEFB $98,$FE,$00,$08,$88,$FD,$02,$0E
8790 DEFB $E8,$98,$FE,$00,$00,$48,$FD,$02
8798 DEFB $10,$D4,$98,$FE,$FF
Logic_Room0E 879D DEFB $01,$8C,$68,$FD,$01,$FE,$00,$E8
87A5 DEFB $88,$FD,$02,$0D,$08,$98,$FE,$00
87AD DEFB $08,$88,$FD,$02,$0F,$E8,$98,$FE
87B5 DEFB $FF
Logic_Room0F 87B6 DEFB $01,$90,$70,$02,$13,$FD,$00,$13
87BE DEFB $FE,$00,$E8,$88,$08,$FD,$02,$0E
87C6 DEFB $08,$98,$FE,$00,$08,$88,$04,$FD
87CE DEFB $02,$08,$E8,$98,$0C,$01,$FE,$FF
Logic_Room10 87D6 DEFB $01,$32,$80,$FD,$01,$FE,$00,$E8
87DE DEFB $98,$FD,$02,$0D,$10,$48,$FE,$00
87E6 DEFB $08,$88,$04,$FD,$02,$08,$E8,$98
87EE DEFB $0C,$03,$FE,$00,$68,$88,$FD,$02
87F6 DEFB $11,$E8,$98,$FE,$01,$C0,$88,$FD
87FE DEFB $12,$FE,$FF
Logic_Room11 8801 DEFB $01,$74,$70,$02,$0C,$FD,$00,$0C
8809 DEFB $FE,$00,$E8,$88,$08,$FD,$02,$10
8811 DEFB $68,$98,$FE,$00,$B1,$88,$FD,$02
8819 DEFB $12,$08,$98,$FE,$FF
Logic_Room12 881E DEFB $01,$C0,$80,$02,$05,$FD,$00,$05
8826 DEFB $FE,$00,$08,$88,$FD,$02,$11,$B1
882E DEFB $98,$FE,$00,$E8,$88,$FD,$02,$13
8836 DEFB $08,$98,$FE,$00,$78,$60,$07,$FD
883E DEFB $0E,$FE,$FF
Logic_Room13 8841 DEFB $01,$78,$98,$FD,$01,$FE,$00,$08
8849 DEFB $88,$FD,$02,$12,$E8,$98,$FE,$00
8851 DEFB $E8,$88,$FD,$02,$14,$B9,$98,$FE
8859 DEFB $02,$10,$01,$58,$98,$FD,$03,$FE
8861 DEFB $FF
Logic_Room14 8862 DEFB $01,$38,$98,$FD,$01,$FE,$01,$8A
886A DEFB $98,$02,$1F,$FD,$14,$FE,$00,$B9
8872 DEFB $88,$FD,$02,$13,$E8,$98,$FE,$00
887A DEFB $E8,$88,$08,$FD,$02,$15,$08,$98
8882 DEFB $FE,$FF
Logic_Room15 8884 DEFB $01,$60,$98,$FD,$01,$FE,$00,$08
888C DEFB $88,$FD,$02,$14,$E8,$98,$FE,$00
8894 DEFB $D4,$88,$FD,$13,$FE,$FF
Logic_Room16 889A DEFB $01,$DE,$98,$FD,$01,$FE,$00,$08
88A2 DEFB $88,$04,$FD,$02,$08,$E8,$98,$0C
88AA DEFB $00,$FE,$00,$E8,$88,$FD,$02,$17
88B2 DEFB $18,$98,$FE,$00,$B8,$88,$FD,$02
88BA DEFB $1A,$08,$98,$FE,$FF
Logic_Room17 88BF DEFB $01,$78,$68,$FD,$01,$FE,$00,$18
88C7 DEFB $88,$FD,$02,$16,$E8,$98,$FE,$00
88CF DEFB $B4,$40,$FD,$02,$18,$30,$68,$FE
88D7 DEFB $FF
Logic_Room18 88D8 DEFB $01,$64,$68,$02,$18,$FD,$00,$18
88E0 DEFB $FE,$00,$10,$68,$FD,$02,$17,$98
88E8 DEFB $50,$FE,$00,$E1,$60,$FD,$02,$1C
88F0 DEFB $80,$28,$FE,$FF
Logic_Room19 88F4 DEFB $01,$46,$88,$FD,$01,$FE,$00,$E8
88FC DEFB $78,$FD,$02,$1D,$10,$98,$FE,$00
8904 DEFB $12,$88,$02,$08,$02,$0D,$FD,$05
890C DEFB $FE,$00,$12,$88,$02,$08,$FD,$11
8914 DEFB $08,$02,$07,$B0,$98,$FE,$FF
Logic_Room1A 891B DEFB $01,$68,$70,$FD,$01,$FE,$00,$08
8923 DEFB $88,$FD,$02,$16,$B8,$98,$FE,$00
892B DEFB $E8,$88,$02,$09,$FD,$02,$1B,$08
8933 DEFB $98,$FE,$02,$08,$01,$36,$98,$FD
893B DEFB $07,$FE,$FF
Logic_Room1B 893E DEFB $01,$B0,$70,$FD,$01,$FE,$02,$0D
8946 DEFB $02,$1D,$FD,$04,$FE,$00,$08,$88
894E DEFB $FD,$02,$1A,$E8,$98,$FE,$00,$98
8956 DEFB $98,$FD,$02,$04,$32,$98,$FE,$FF
Logic_Room1C 895E DEFB $01,$32,$88,$FD,$01,$FE,$00,$E8
8966 DEFB $A0,$FD,$02,$00,$F0,$28,$FE,$00
896E DEFB $00,$88,$FD,$02,$15,$D0,$98,$FE
8976 DEFB $FF
Logic_Room1D 8977 DEFB $01,$A8,$60 [IF] (01) position (A8, 60)
897A DEFB $FD [THEN]
897B DEFB $01 Pickup object.
897C DEFB $FE [ENDIF]
897D DEFB $00,$08,$88 [IF] (00) position (08, 88)
8980 DEFB $FD [THEN]
8981 DEFB $02,$19,$E8,$88 Exit (02) to room (19) at (E8, 88)
8985 DEFB $FE [ENDIF]
8986 DEFB $00,$40,$88 [IF] (00) position (40, 88)
8989 DEFB $02,$04 [AND] pockets hold object (04) Magnet
898B DEFB $FD [THEN]
898C DEFB $0D Unlock magnetic lock.
898D DEFB $FE [ENDIF]
898E DEFB $FF [END]
Prev: 8535 Up: Map Next: 898F