Skip to content

Instantly share code, notes, and snippets.

@yuriks
Created September 24, 2013 05:02
Show Gist options
  • Save yuriks/6680577 to your computer and use it in GitHub Desktop.
Save yuriks/6680577 to your computer and use it in GitHub Desktop.
This is a script disassembly from a classic game (self-written disassembler). Can you guess which game is it?
; chunks\chunk1c6.bin - object D1h - entrypoint 84CEh vm
84CE: SPRVM.IP $8A0E ; Sets sub-vm instruction pointer
84D1: SPRVM.RUN ; Invoke animation VM
84D2: LDA #0 ; LoaD A { A = op0; }
84D5: STA ($selectedCharacter) ; STore A to memory
84D8: LDA #1000 ; LoaD A { A = op0; }
84DB: OBJPROP.ORA #8 ; OR current object property op0/2 with A
84DD: LDA #1234 ; LoaD A { A = op0; }
84E0: JE ($200), $84FF ; Jump if Equal { if (*op0 == A) goto op1; }
84E5: LDA #5678 ; LoaD A { A = op0; }
84E8: JE ($204), $84FF ; Jump if Equal { if (*op0 == A) goto op1; }
84ED: LDA #1234 ; LoaD A { A = op0; }
84F0: STA ($200) ; STore A to memory
84F3: LDA #5678 ; LoaD A { A = op0; }
84F6: STA ($204) ; STore A to memory
84F9: LDA #0 ; LoaD A { A = op0; }
84FC: STA ($cheatsEnabled) ; STore A to memory
84FF: LDA #DC ; LoaD A { A = op0; }
8502: OBJPROP.STA #1C ; STore A to current object op0/2
8504: YIELD ; save IP and yield
8505: NOP
8506: LDA #0 ; LoaD A { A = op0; }
8509: OBJPROP.JE #1C, $865F ; jump if current object property op0/2 == A
850D: TBS #0, #1 ; Test Bit & Set { A = bool((1 << op0/2) & op1) }
8511: TBJ #18, ($buttonsPressed), $856F ; Test Bit & Jump { if ((1 << op0/2) & op1) goto op3; }
8517: TBS #1E, ($buttonsPressed) ; Test Bit & Set { A = bool((1 << op0/2) & op1) }
851B: TBJE #0, #1, $856F ; Test Bit & Jump if Equal { if (bool((1 << op0/2) & op1) == A) goto op3; }
8521: JMP $8504 ; unconditional JuMP { goto op0; }
;---------
8524: PAL1.FADE #1F, #1F, #1F ; Set palette fade amount. (color1)
8528: YIELD ; save IP and yield
8529: NOP
852A: PAL1.FADE #18, #18, #18 ; Set palette fade amount. (color1)
852E: YIELD ; save IP and yield
852F: NOP
8530: PAL1.FADE #10, #10, #10 ; Set palette fade amount. (color1)
8534: YIELD ; save IP and yield
8535: NOP
8536: PAL1.FADE #8, #8, #8 ; Set palette fade amount. (color1)
853A: YIELD ; save IP and yield
853B: NOP
853C: PAL1.RESTORE ; Remove palette fade. (color1)
853D: RET ; Return to IP saved on link register
;---------
853E: PAL1.FADE #4, #4, #4 ; Set palette fade amount. (color1)
8542: YIELD ; save IP and yield
8543: NOP
8544: PAL1.FADE #8, #8, #8 ; Set palette fade amount. (color1)
8548: YIELD ; save IP and yield
8549: NOP
854A: PAL1.FADE #C, #C, #C ; Set palette fade amount. (color1)
854E: YIELD ; save IP and yield
854F: NOP
8550: PAL1.FADE #10, #10, #10 ; Set palette fade amount. (color1)
8554: YIELD ; save IP and yield
8555: NOP
8556: PAL1.FADE #14, #14, #14 ; Set palette fade amount. (color1)
855A: YIELD ; save IP and yield
855B: NOP
855C: PAL1.FADE #18, #18, #18 ; Set palette fade amount. (color1)
8560: YIELD ; save IP and yield
8561: NOP
8562: PAL1.FADE #1C, #1C, #1C ; Set palette fade amount. (color1)
8566: YIELD ; save IP and yield
8567: NOP
8568: PAL1.FADE #1F, #1F, #1F ; Set palette fade amount. (color1)
856C: YIELD ; save IP and yield
856D: NOP
856E: RET ; Return to IP saved on link register
;---------
856F: TBS #0, #1 ; Test Bit & Set { A = bool((1 << op0/2) & op1) }
8573: AB #0, ($236) ; Assign Bit { if (A != 0) { A = (1 << op0/2); } *op1 = *op1 & ~(1 << op0/2) | A; }
8577: LDA #81 ; LoaD A { A = op0; }
857A: STA ($348) ; STore A to memory
857D: CALL $853E ; Save next IP to link reg and jump
8580: SPECIAL.COPYSTATUS #856F ; Copy statusbar area to middle of screen
8584: LDA #0 ; LoaD A { A = op0; }
8587: OBJPROP.STA #2E ; STore A to current object op0/2
8589: SPRVM.IP $8A31 ; Sets sub-vm instruction pointer
858C: CALL $8524 ; Save next IP to link reg and jump
858F: SPRVM.RUN ; Invoke animation VM
8590: YIELD ; save IP and yield
8591: NOP
8592: DIALOG.COLOR #0 ; Appends a dialog color change command
8595: DIALOG.STRING #FF, #E, #E ; Appends a putString command
859E: DIALOG.STRING #100, #E, #10 ; Appends a putString command
85A7: DIALOG.STRING #110, #E, #12 ; Appends a putString command
85B0: YIELD ; save IP and yield
85B1: NOP
85B2: SPR.SHOW ; Unhide all the object's sprites.
85B3: LDA #C8 ; LoaD A { A = op0; }
85B6: OBJPROP.STA #1C ; STore A to current object op0/2
85B8: SPRVM.IP $8A23 ; Sets sub-vm instruction pointer
85BB: SPRVM.RUN ; Invoke animation VM
85BC: YIELD ; save IP and yield
85BD: NOP
85BE: TBS #16, ($buttonsPressed) ; Test Bit & Set { A = bool((1 << op0/2) & op1) }
85C2: TBJE #0, #1, $8608 ; Test Bit & Jump if Equal { if (bool((1 << op0/2) & op1) == A) goto op3; }
85C8: TBS #14, ($buttonsPressed) ; Test Bit & Set { A = bool((1 << op0/2) & op1) }
85CC: TBJE #0, #1, $8621 ; Test Bit & Jump if Equal { if (bool((1 << op0/2) & op1) == A) goto op3; }
85D2: LDA #4E ; LoaD A { A = op0; }
85D5: JE ($lastTypedKey), $8678 ; Jump if Equal { if (*op0 == A) goto op1; }
85DA: LDA #50 ; LoaD A { A = op0; }
85DD: JE ($lastTypedKey), $868A ; Jump if Equal { if (*op0 == A) goto op1; }
85E2: LDA #51 ; LoaD A { A = op0; }
85E5: JE ($lastTypedKey), $8674 ; Jump if Equal { if (*op0 == A) goto op1; }
85EA: TBS #0, #1 ; Test Bit & Set { A = bool((1 << op0/2) & op1) }
85EE: TBJ #18, ($buttonsPressed), $8666 ; Test Bit & Jump { if ((1 << op0/2) & op1) goto op3; }
85F4: TBS #1E, ($buttonsPressed) ; Test Bit & Set { A = bool((1 << op0/2) & op1) }
85F8: TBJE #0, #1, $8666 ; Test Bit & Jump if Equal { if (bool((1 << op0/2) & op1) == A) goto op3; }
85FE: LDA #0 ; LoaD A { A = op0; }
8601: OBJPROP.JE #1C, $865F ; jump if current object property op0/2 == A
8605: JMP $85BB ; unconditional JuMP { goto op0; }
;---------
8608: LDA #DC ; LoaD A { A = op0; }
860B: OBJPROP.STA #1C ; STore A to current object op0/2
860D: LDA #1 ; LoaD A { A = op0; }
8610: OBJPROP.SUB #2E ; SUBtract A from current object property op0/2
8612: OBJPROP.LDA #2E ; LoaD A from current object op0/2
8614: JL #0, $8637 ; Jump if Less (signed) { if (op0 < A) goto op1; }
8619: LDA #2 ; LoaD A { A = op0; }
861C: OBJPROP.STA #2E ; STore A to current object op0/2
861E: JMP $8637 ; unconditional JuMP { goto op0; }
;---------
8621: LDA #DC ; LoaD A { A = op0; }
8624: OBJPROP.STA #1C ; STore A to current object op0/2
8626: LDA #1 ; LoaD A { A = op0; }
8629: OBJPROP.ADD #2E ; ADD A from current object property op0/2
862B: OBJPROP.LDA #2E ; LoaD A from current object op0/2
862D: JGE #3, $8637 ; Jump if Greater or Equal (signed) { if (op0 >= A) goto op1; }
8632: LDA #0 ; LoaD A { A = op0; }
8635: OBJPROP.STA #2E ; STore A to current object op0/2
8637: LDA #DC ; LoaD A { A = op0; }
863A: OBJPROP.STA #1C ; STore A to current object op0/2
863C: AUDIO.SFX #4301 ; Play sound effect
863F: LDA #0 ; LoaD A { A = op0; }
8642: OBJPROP.JE #2E, $8653 ; jump if current object property op0/2 == A
8646: LDA #2 ; LoaD A { A = op0; }
8649: OBJPROP.JE #2E, $8659 ; jump if current object property op0/2 == A
864D: SPRVM.IP $8A3E ; Sets sub-vm instruction pointer
8650: JMP $85BB ; unconditional JuMP { goto op0; }
;---------
8653: SPRVM.IP $8A31 ; Sets sub-vm instruction pointer
8656: JMP $85BB ; unconditional JuMP { goto op0; }
;---------
8659: SPRVM.IP $8A4B ; Sets sub-vm instruction pointer
865C: JMP $85BB ; unconditional JuMP { goto op0; }
;---------
865F: LDA #1 ; LoaD A { A = op0; }
8662: STA ($demo_status) ; STore A to memory
8665: FINISH.LEVEL ; yield & finish level
;---------
8666: LDA #1 ; LoaD A { A = op0; }
8669: OBJPROP.JE #2E, $868A ; jump if current object property op0/2 == A
866D: LDA #0 ; LoaD A { A = op0; }
8670: OBJPROP.JE #2E, $8678 ; jump if current object property op0/2 == A
8674: SPECIAL.QUIT #1 ; Quit game
;---------
8678: AUDIO.SFX #7F3E ; Play sound effect
867B: YIELD ; save IP and yield
867C: NOP
867D: LDA #1 ; LoaD A { A = op0; }
8680: STA ($demo_status) ; STore A to memory
8683: LDA #2B ; LoaD A { A = op0; }
8686: STA ($lvlh_nextLevel) ; STore A to memory
8689: FINISH.LEVEL ; yield & finish level
;---------
868A: AUDIO.SFX #613D ; Play sound effect
868D: SPRVM.IP $8A3E ; Sets sub-vm instruction pointer
8690: SPRVM.RUN ; Invoke animation VM
8691: YIELD ; save IP and yield
8692: NOP
8693: SPRVM.IP $8A15 ; Sets sub-vm instruction pointer
8696: SPRVM.RUN ; Invoke animation VM
8697: DIALOG.COLOR #0 ; Appends a dialog color change command
869A: DIALOG.STRING #101, #E, #E ; Appends a putString command
86A3: DIALOG.STRING #100, #E, #10 ; Appends a putString command
86AC: DIALOG.STRING #101, #E, #12 ; Appends a putString command
86B5: SPRVM.IP $8A58 ; Sets sub-vm instruction pointer
86B8: LDA #0 ; LoaD A { A = op0; }
86BB: OBJPROP.STA #2E ; STore A to current object op0/2
86BD: LDA #0 ; LoaD A { A = op0; }
86C0: OBJPROP.STA #1C ; STore A to current object op0/2
86C2: LDA #0 ; LoaD A { A = op0; }
86C5: STA ($lastTypedKey) ; STore A to memory
86C8: LDA #0 ; LoaD A { A = op0; }
86CB: STA ($28E) ; STore A to memory
86CE: SPRVM.RUN ; Invoke animation VM
86CF: YIELD ; save IP and yield
86D0: NOP
86D1: LDA #0 ; LoaD A { A = op0; }
86D4: JE ($lastTypedKey), $86FF ; Jump if Equal { if (*op0 == A) goto op1; }
86D9: LDA #80 ; LoaD A { A = op0; }
86DC: JE ($lastTypedKey), $86FF ; Jump if Equal { if (*op0 == A) goto op1; }
86E1: LDA #81 ; LoaD A { A = op0; }
86E4: JE ($lastTypedKey), $8989 ; Jump if Equal { if (*op0 == A) goto op1; }
86E9: LDA ($lastTypedKey) ; LoaD A from memory
86EC: OBJPROP.STA #16 ; STore A to current object op0/2
86EE: OBJPROP.LDA #16 ; LoaD A from current object op0/2
86F0: STA ($28E) ; STore A to memory
86F3: LDA #0 ; LoaD A { A = op0; }
86F6: STA ($lastTypedKey) ; STore A to memory
86F9: CALL $8955 ; Save next IP to link reg and jump
86FC: JMP $88C9 ; unconditional JuMP { goto op0; }
;---------
86FF: CALL $8765 ; Save next IP to link reg and jump
8702: TBS #16, ($buttonsDown) ; Test Bit & Set { A = bool((1 << op0/2) & op1) }
8706: TBJE #0, #1, $878D ; Test Bit & Jump if Equal { if (bool((1 << op0/2) & op1) == A) goto op3; }
870C: TBS #14, ($buttonsDown) ; Test Bit & Set { A = bool((1 << op0/2) & op1) }
8710: TBJE #0, #1, $881F ; Test Bit & Jump if Equal { if (bool((1 << op0/2) & op1) == A) goto op3; }
8716: TBS #0, #1 ; Test Bit & Set { A = bool((1 << op0/2) & op1) }
871A: TBJ #A, ($buttonsDown), $882E ; Test Bit & Jump { if ((1 << op0/2) & op1) goto op3; }
8720: TBS #0, #1 ; Test Bit & Set { A = bool((1 << op0/2) & op1) }
8724: TBJ #8, ($buttonsDown), $879C ; Test Bit & Jump { if ((1 << op0/2) & op1) goto op3; }
872A: LDA #80 ; LoaD A { A = op0; }
872D: JE ($lastTypedKey), $88B4 ; Jump if Equal { if (*op0 == A) goto op1; }
8732: TBS #0, #1 ; Test Bit & Set { A = bool((1 << op0/2) & op1) }
8736: TBJ #12, ($buttonsDown), $88B4 ; Test Bit & Jump { if ((1 << op0/2) & op1) goto op3; }
873C: TBS #0, #1 ; Test Bit & Set { A = bool((1 << op0/2) & op1) }
8740: TBJ #10, ($buttonsDown), $88C9 ; Test Bit & Jump { if ((1 << op0/2) & op1) goto op3; }
8746: LDA #46 ; LoaD A { A = op0; }
8749: JE ($lastTypedKey), $86CE ; Jump if Equal { if (*op0 == A) goto op1; }
874E: TBS #0, #1 ; Test Bit & Set { A = bool((1 << op0/2) & op1) }
8752: TBJ #18, ($buttonsPressed), $8989 ; Test Bit & Jump { if ((1 << op0/2) & op1) goto op3; }
8758: TBS #0, #1 ; Test Bit & Set { A = bool((1 << op0/2) & op1) }
875C: TBJ #1E, ($buttonsPressed), $8989 ; Test Bit & Jump { if ((1 << op0/2) & op1) goto op3; }
8762: JMP $86CE ; unconditional JuMP { goto op0; }
;---------
8765: DIALOG.COLOR #0 ; Appends a dialog color change command
8768: DIALOG.CHAR ($currentPassword), #10, #12 ; Appends a putChar command
8771: DIALOG.CHAR ($312), #11, #12 ; Appends a putChar command
877A: DIALOG.CHAR ($314), #12, #12 ; Appends a putChar command
8783: DIALOG.CHAR ($316), #13, #12 ; Appends a putChar command
878C: RET ; Return to IP saved on link register
;---------
878D: LDA #0 ; LoaD A { A = op0; }
8790: OBJPROP.JNE #1C, $88AE ; jump if current object property op0/2 != A
8794: LDA #3 ; LoaD A { A = op0; }
8797: OBJPROP.STA #1C ; STore A to current object op0/2
8799: JMP $87A8 ; unconditional JuMP { goto op0; }
;---------
879C: LDA #0 ; LoaD A { A = op0; }
879F: OBJPROP.JNE #1C, $88AE ; jump if current object property op0/2 != A
87A3: LDA #2 ; LoaD A { A = op0; }
87A6: OBJPROP.STA #1C ; STore A to current object op0/2
87A8: AUDIO.SFX #4301 ; Play sound effect
87AB: CALL $8921 ; Save next IP to link reg and jump
87AE: LDA #5A ; LoaD A { A = op0; }
87B1: OBJPROP.JE #16, $87E7 ; jump if current object property op0/2 == A
87B5: LDA #39 ; LoaD A { A = op0; }
87B8: OBJPROP.JE #16, $87EF ; jump if current object property op0/2 == A
87BC: LDA #21 ; LoaD A { A = op0; }
87BF: OBJPROP.JE #16, $87F7 ; jump if current object property op0/2 == A
87C3: LDA #44 ; LoaD A { A = op0; }
87C6: OBJPROP.JE #16, $87FF ; jump if current object property op0/2 == A
87CA: LDA #48 ; LoaD A { A = op0; }
87CD: OBJPROP.JE #16, $8807 ; jump if current object property op0/2 == A
87D1: LDA #4E ; LoaD A { A = op0; }
87D4: OBJPROP.JE #16, $880F ; jump if current object property op0/2 == A
87D8: LDA #54 ; LoaD A { A = op0; }
87DB: OBJPROP.JE #16, $8817 ; jump if current object property op0/2 == A
87DF: LDA #1 ; LoaD A { A = op0; }
87E2: OBJPROP.ADD #16 ; ADD A from current object property op0/2
87E4: JMP $88AE ; unconditional JuMP { goto op0; }
;---------
87E7: LDA #30 ; LoaD A { A = op0; }
87EA: OBJPROP.STA #16 ; STore A to current object op0/2
87EC: JMP $88AE ; unconditional JuMP { goto op0; }
;---------
87EF: LDA #21 ; LoaD A { A = op0; }
87F2: OBJPROP.STA #16 ; STore A to current object op0/2
87F4: JMP $88AE ; unconditional JuMP { goto op0; }
;---------
87F7: LDA #42 ; LoaD A { A = op0; }
87FA: OBJPROP.STA #16 ; STore A to current object op0/2
87FC: JMP $88AE ; unconditional JuMP { goto op0; }
;---------
87FF: LDA #46 ; LoaD A { A = op0; }
8802: OBJPROP.STA #16 ; STore A to current object op0/2
8804: JMP $88AE ; unconditional JuMP { goto op0; }
;---------
8807: LDA #4A ; LoaD A { A = op0; }
880A: OBJPROP.STA #16 ; STore A to current object op0/2
880C: JMP $88AE ; unconditional JuMP { goto op0; }
;---------
880F: LDA #50 ; LoaD A { A = op0; }
8812: OBJPROP.STA #16 ; STore A to current object op0/2
8814: JMP $88AE ; unconditional JuMP { goto op0; }
;---------
8817: LDA #56 ; LoaD A { A = op0; }
881A: OBJPROP.STA #16 ; STore A to current object op0/2
881C: JMP $88AE ; unconditional JuMP { goto op0; }
;---------
881F: LDA #0 ; LoaD A { A = op0; }
8822: OBJPROP.JNE #1C, $88AE ; jump if current object property op0/2 != A
8826: LDA #3 ; LoaD A { A = op0; }
8829: OBJPROP.STA #1C ; STore A to current object op0/2
882B: JMP $883A ; unconditional JuMP { goto op0; }
;---------
882E: LDA #0 ; LoaD A { A = op0; }
8831: OBJPROP.JNE #1C, $88AE ; jump if current object property op0/2 != A
8835: LDA #2 ; LoaD A { A = op0; }
8838: OBJPROP.STA #1C ; STore A to current object op0/2
883A: AUDIO.SFX #4301 ; Play sound effect
883D: CALL $8921 ; Save next IP to link reg and jump
8840: LDA #21 ; LoaD A { A = op0; }
8843: OBJPROP.JE #16, $8879 ; jump if current object property op0/2 == A
8847: LDA #30 ; LoaD A { A = op0; }
884A: OBJPROP.JE #16, $8881 ; jump if current object property op0/2 == A
884E: LDA #42 ; LoaD A { A = op0; }
8851: OBJPROP.JE #16, $8889 ; jump if current object property op0/2 == A
8855: LDA #46 ; LoaD A { A = op0; }
8858: OBJPROP.JE #16, $8891 ; jump if current object property op0/2 == A
885C: LDA #4A ; LoaD A { A = op0; }
885F: OBJPROP.JE #16, $8899 ; jump if current object property op0/2 == A
8863: LDA #50 ; LoaD A { A = op0; }
8866: OBJPROP.JE #16, $88A1 ; jump if current object property op0/2 == A
886A: LDA #56 ; LoaD A { A = op0; }
886D: OBJPROP.JE #16, $88A9 ; jump if current object property op0/2 == A
8871: LDA #1 ; LoaD A { A = op0; }
8874: OBJPROP.SUB #16 ; SUBtract A from current object property op0/2
8876: JMP $88AE ; unconditional JuMP { goto op0; }
;---------
8879: LDA #39 ; LoaD A { A = op0; }
887C: OBJPROP.STA #16 ; STore A to current object op0/2
887E: JMP $88AE ; unconditional JuMP { goto op0; }
;---------
8881: LDA #5A ; LoaD A { A = op0; }
8884: OBJPROP.STA #16 ; STore A to current object op0/2
8886: JMP $88AE ; unconditional JuMP { goto op0; }
;---------
8889: LDA #21 ; LoaD A { A = op0; }
888C: OBJPROP.STA #16 ; STore A to current object op0/2
888E: JMP $88AE ; unconditional JuMP { goto op0; }
;---------
8891: LDA #44 ; LoaD A { A = op0; }
8894: OBJPROP.STA #16 ; STore A to current object op0/2
8896: JMP $88AE ; unconditional JuMP { goto op0; }
;---------
8899: LDA #48 ; LoaD A { A = op0; }
889C: OBJPROP.STA #16 ; STore A to current object op0/2
889E: JMP $88AE ; unconditional JuMP { goto op0; }
;---------
88A1: LDA #4E ; LoaD A { A = op0; }
88A4: OBJPROP.STA #16 ; STore A to current object op0/2
88A6: JMP $88AE ; unconditional JuMP { goto op0; }
;---------
88A9: LDA #54 ; LoaD A { A = op0; }
88AC: OBJPROP.STA #16 ; STore A to current object op0/2
88AE: CALL $8955 ; Save next IP to link reg and jump
88B1: JMP $86CE ; unconditional JuMP { goto op0; }
;---------
88B4: LDA #0 ; LoaD A { A = op0; }
88B7: OBJPROP.JE #2E, $86CE ; jump if current object property op0/2 == A
88BB: LDA #1 ; LoaD A { A = op0; }
88BE: OBJPROP.SUB #2E ; SUBtract A from current object property op0/2
88C0: LDA #0 ; LoaD A { A = op0; }
88C3: STA ($lastTypedKey) ; STore A to memory
88C6: JMP $88E7 ; unconditional JuMP { goto op0; }
;---------
88C9: LDA #3 ; LoaD A { A = op0; }
88CC: OBJPROP.JE #2E, $86CE ; jump if current object property op0/2 == A
88D0: LDA #1 ; LoaD A { A = op0; }
88D3: OBJPROP.ADD #2E ; ADD A from current object property op0/2
88D5: CALL $8921 ; Save next IP to link reg and jump
88D8: LDA #20 ; LoaD A { A = op0; }
88DB: OBJPROP.JNE #16, $88E7 ; jump if current object property op0/2 != A
88DF: LDA #42 ; LoaD A { A = op0; }
88E2: OBJPROP.STA #16 ; STore A to current object op0/2
88E4: CALL $8955 ; Save next IP to link reg and jump
88E7: AUDIO.SFX #4301 ; Play sound effect
88EA: LDA #0 ; LoaD A { A = op0; }
88ED: OBJPROP.JE #2E, $8909 ; jump if current object property op0/2 == A
88F1: LDA #1 ; LoaD A { A = op0; }
88F4: OBJPROP.JE #2E, $890F ; jump if current object property op0/2 == A
88F8: LDA #2 ; LoaD A { A = op0; }
88FB: OBJPROP.JE #2E, $8915 ; jump if current object property op0/2 == A
88FF: LDA #3 ; LoaD A { A = op0; }
8902: OBJPROP.JE #2E, $891B ; jump if current object property op0/2 == A
8906: JMP $86CE ; unconditional JuMP { goto op0; }
;---------
8909: SPRVM.IP $8A58 ; Sets sub-vm instruction pointer
890C: JMP $86CE ; unconditional JuMP { goto op0; }
;---------
890F: SPRVM.IP $8A65 ; Sets sub-vm instruction pointer
8912: JMP $86CE ; unconditional JuMP { goto op0; }
;---------
8915: SPRVM.IP $8A72 ; Sets sub-vm instruction pointer
8918: JMP $86CE ; unconditional JuMP { goto op0; }
;---------
891B: SPRVM.IP $8A7F ; Sets sub-vm instruction pointer
891E: JMP $86CE ; unconditional JuMP { goto op0; }
;---------
8921: LDA #0 ; LoaD A { A = op0; }
8924: OBJPROP.JE #2E, $893D ; jump if current object property op0/2 == A
8928: LDA #1 ; LoaD A { A = op0; }
892B: OBJPROP.JE #2E, $8943 ; jump if current object property op0/2 == A
892F: LDA #2 ; LoaD A { A = op0; }
8932: OBJPROP.JE #2E, $8949 ; jump if current object property op0/2 == A
8936: LDA #3 ; LoaD A { A = op0; }
8939: OBJPROP.JE #2E, $894F ; jump if current object property op0/2 == A
893D: LDA ($currentPassword) ; LoaD A from memory
8940: OBJPROP.STA #16 ; STore A to current object op0/2
8942: RET ; Return to IP saved on link register
;---------
8943: LDA ($312) ; LoaD A from memory
8946: OBJPROP.STA #16 ; STore A to current object op0/2
8948: RET ; Return to IP saved on link register
;---------
8949: LDA ($314) ; LoaD A from memory
894C: OBJPROP.STA #16 ; STore A to current object op0/2
894E: RET ; Return to IP saved on link register
;---------
894F: LDA ($316) ; LoaD A from memory
8952: OBJPROP.STA #16 ; STore A to current object op0/2
8954: RET ; Return to IP saved on link register
;---------
8955: LDA #0 ; LoaD A { A = op0; }
8958: OBJPROP.JE #2E, $8971 ; jump if current object property op0/2 == A
895C: LDA #1 ; LoaD A { A = op0; }
895F: OBJPROP.JE #2E, $8977 ; jump if current object property op0/2 == A
8963: LDA #2 ; LoaD A { A = op0; }
8966: OBJPROP.JE #2E, $897D ; jump if current object property op0/2 == A
896A: LDA #3 ; LoaD A { A = op0; }
896D: OBJPROP.JE #2E, $8983 ; jump if current object property op0/2 == A
8971: OBJPROP.LDA #16 ; LoaD A from current object op0/2
8973: STA ($currentPassword) ; STore A to memory
8976: RET ; Return to IP saved on link register
;---------
8977: OBJPROP.LDA #16 ; LoaD A from current object op0/2
8979: STA ($312) ; STore A to memory
897C: RET ; Return to IP saved on link register
;---------
897D: OBJPROP.LDA #16 ; LoaD A from current object op0/2
897F: STA ($314) ; STore A to memory
8982: RET ; Return to IP saved on link register
;---------
8983: OBJPROP.LDA #16 ; LoaD A from current object op0/2
8985: STA ($316) ; STore A to memory
8988: RET ; Return to IP saved on link register
;---------
8989: LDA #4D ; LoaD A { A = op0; }
898C: JNE ($currentPassword), $89BF ; Jump if Not Equal { if (*op0 != A) goto op1; }
8991: LDA #30 ; LoaD A { A = op0; }
8994: JNE ($312), $89BF ; Jump if Not Equal { if (*op0 != A) goto op1; }
8999: LDA #4D ; LoaD A { A = op0; }
899C: JNE ($314), $89BF ; Jump if Not Equal { if (*op0 != A) goto op1; }
89A1: LDA #59 ; LoaD A { A = op0; }
89A4: JNE ($316), $89BF ; Jump if Not Equal { if (*op0 != A) goto op1; }
89A9: LDA #1 ; LoaD A { A = op0; }
89AC: STA ($cheatsEnabled) ; STore A to memory
89AF: AUDIO.SFX #7F3E ; Play sound effect
89B2: DIALOG.CLEAR ; Appends a clear command
89B3: SPR.HIDE2 ; Hides all the object's sprites using the HIDDEN2 flag.
89B4: LDA #1 ; LoaD A { A = op0; }
89B7: OBJPROP.STA #2E ; STore A to current object op0/2
89B9: SPRVM.IP $8A3E ; Sets sub-vm instruction pointer
89BC: JMP $858F ; unconditional JuMP { goto op0; }
;---------
89BF: CHECK.PASSWORD ; Executes a password check and sets global variables acoordingly.
89C0: LDA #0 ; LoaD A { A = op0; }
89C3: JNE ($passwordCheckError), $89CC ; Jump if Not Equal { if (*op0 != A) goto op1; }
89C8: AUDIO.SFX #7F3E ; Play sound effect
89CB: FINISH.LEVEL ; yield & finish level
;---------
89CC: AUDIO.SFX #6103 ; Play sound effect
89CF: SPR.HIDE2 ; Hides all the object's sprites using the HIDDEN2 flag.
89D0: YIELD ; save IP and yield
89D1: NOP
89D2: DIALOG.STRING #10E, #A, #12 ; Appends a putString command
89DB: YIELD ; save IP and yield
89DC: NOP
89DD: LDA #28 ; LoaD A { A = op0; }
89E0: OBJPROP.STA #1C ; STore A to current object op0/2
89E2: YIELD ; save IP and yield
89E3: NOP
89E4: TBS #0, #1 ; Test Bit & Set { A = bool((1 << op0/2) & op1) }
89E8: TBJ #18, ($buttonsPressed), $8A02 ; Test Bit & Jump { if ((1 << op0/2) & op1) goto op3; }
89EE: TBS #1E, ($buttonsPressed) ; Test Bit & Set { A = bool((1 << op0/2) & op1) }
89F2: TBJE #0, #1, $8A02 ; Test Bit & Jump if Equal { if (bool((1 << op0/2) & op1) == A) goto op3; }
89F8: LDA #0 ; LoaD A { A = op0; }
89FB: OBJPROP.JE #1C, $8A02 ; jump if current object property op0/2 == A
89FF: JMP $89E2 ; unconditional JuMP { goto op0; }
;---------
8A02: DIALOG.CLEAR ; Appends a clear command
8A03: LDA #1 ; LoaD A { A = op0; }
8A06: OBJPROP.STA #2E ; STore A to current object op0/2
8A08: SPRVM.IP $8A3E ; Sets sub-vm instruction pointer
8A0B: JMP $858F ; unconditional JuMP { goto op0; }
;---------
8A0E-sprvm: SPR.SIZE #2 ; Set size of sprites. (0=8, 1=32, 2=16)
8A10-sprvm: SPR.TILES #0, #4 ; Set list of tile indices for sprites.
8A13-sprvm: SPR.SET.HIDDEN2 ; Set hidden2 flag on sprites.
8A14-sprvm: YIELD ; Save IP and yield
8A15-sprvm: SPR.TAGS #1, #2 ; Set list of sprite tags.
8A18-sprvm: FILTER #1 ; Set the value of the tag filter.
8A1A-sprvm: SPR.SET.HIDDEN2 ; Set hidden2 flag on sprites.
8A1B-sprvm: FILTER #2 ; Set the value of the tag filter.
8A1D-sprvm: SPR.CLR.HIDDEN12 ; Clear hidden and hidden2 flags on sprites.
8A1E-sprvm: FILTER #0 ; Set the value of the tag filter.
8A20-sprvm: JMP $8A8C ; Unconditional JuMP { goto op0; }
;---------
8A23-sprvm: SPR.TAGS #1, #2 ; Set list of sprite tags.
8A26-sprvm: FILTER #1 ; Set the value of the tag filter.
8A28-sprvm: SPR.CLR.HIDDEN12 ; Clear hidden and hidden2 flags on sprites.
8A29-sprvm: FILTER #2 ; Set the value of the tag filter.
8A2B-sprvm: SPR.SET.HIDDEN2 ; Set hidden2 flag on sprites.
8A2C-sprvm: FILTER #0 ; Set the value of the tag filter.
8A2E-sprvm: JMP $8A8C ; Unconditional JuMP { goto op0; }
;---------
8A31-sprvm: SPR.XPOS #FFDC, #FFF4 ; Set X sprite positions relative to object.
8A36-sprvm: SPR.YPOS #14, #34 ; Set Y sprite positions relative to object.
8A3B-sprvm: JMP $8A8C ; Unconditional JuMP { goto op0; }
;---------
8A3E-sprvm: SPR.XPOS #FFDC, #FFF4 ; Set X sprite positions relative to object.
8A43-sprvm: SPR.YPOS #24, #34 ; Set Y sprite positions relative to object.
8A48-sprvm: JMP $8A8C ; Unconditional JuMP { goto op0; }
;---------
8A4B-sprvm: SPR.XPOS #FFDC, #FFF4 ; Set X sprite positions relative to object.
8A50-sprvm: SPR.YPOS #34, #34 ; Set Y sprite positions relative to object.
8A55-sprvm: JMP $8A8C ; Unconditional JuMP { goto op0; }
;---------
8A58-sprvm: SPR.XPOS #FFDC, #FFFC ; Set X sprite positions relative to object.
8A5D-sprvm: SPR.YPOS #24, #34 ; Set Y sprite positions relative to object.
8A62-sprvm: JMP $8A8C ; Unconditional JuMP { goto op0; }
;---------
8A65-sprvm: SPR.XPOS #FFDC, #4 ; Set X sprite positions relative to object.
8A6A-sprvm: SPR.YPOS #24, #34 ; Set Y sprite positions relative to object.
8A6F-sprvm: JMP $8A8C ; Unconditional JuMP { goto op0; }
;---------
8A72-sprvm: SPR.XPOS #FFDC, #C ; Set X sprite positions relative to object.
8A77-sprvm: SPR.YPOS #24, #34 ; Set Y sprite positions relative to object.
8A7C-sprvm: JMP $8A8C ; Unconditional JuMP { goto op0; }
;---------
8A7F-sprvm: SPR.XPOS #FFDC, #14 ; Set X sprite positions relative to object.
8A84-sprvm: SPR.YPOS #24, #34 ; Set Y sprite positions relative to object.
8A89-sprvm: JMP $8A8C ; Unconditional JuMP { goto op0; }
;---------
8A8C-sprvm: YIELD ; Save IP and yield
8A8D-sprvm: JMP $8A8C ; Unconditional JuMP { goto op0; }
;---------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment