This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;let's try synching up with a cycle | |
syncloop: | |
in a, ($7E) ;11 | |
cp 60 ;18 | |
push af ;28 | |
pop af ;39 | |
ld d, a ;43 | |
nop ;47 | |
jp nz, syncloop ;57 (1/4 a scanline) | |
first: ;now guarantee the start of next scanline |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
the block pointed to by 0x10 in the quest header is the quest scripting block. every entry in this block is 0x8 bytes long, consisting of four shorts; the first is the opcode, the other three are arguments (though argument three goes unused by any ops until G). in MH1, opcodes from -2 to 2D are implemented, but only around half are actually used. I will denote unused opcodes with an X prefix, and opcodes added by G with a G prefix. The unused opcodes will likely be documented better in the future, my focus here is on the used opcodes. | |
-2: Triggers the cameras for quest failure | |
-1: Triggers the monster camera for quest clear, sends a packet | |
00: X Waits until 3C7474 is 0 | |
01: Waits for monster goals completion (all monsters stored value 0) | |
02: Sets the goal for Monster arg1 to arg2; slaying a monster decrements the stored arg2. can be used multiple times to set a max of two monsters. | |
03: X Check item goal, seems to be an early version that checks player inventory? | |
04: Sets the delivery item goal for item arg1 t |