Project

General

Profile

Feature #47

Updated by I. Valentin about 3 years ago

Implement field opcodes. 

 In the tables below there is every opcode used in the game, and it's current status. They will be updated. 


 **Script Flow & Control** 

 |Byte|Opcode |Prio. |Status |Notes | 
 |--|--|--|--|--| 
 |0x00|RET|HIGH|OK|Implemented in Q-Gears.| 
 |0x01|REQ|HIGH|OK|Implemented in Q-Gears.| 
 |0x02|REQSW|HIGH|OK|Implemented in Q-Gears.| 
 |0x03|REQEW|HIGH|OK|Implemented in Q-Gears.| 
 |0x04|PREQ|HIGH|    |    | 
 |0x05|PRQSW|HIGH|    |    | 
 |0x06|PRQEW|HIGH|    |    | 
 |0x07|RETTO|HIGH|OK|Implemented in Q-Gears.| 
 |0x10|JMPF|HIGH|OK|Implemented in Q-Gears.| 
 |0x11|JMPFL|HIGH|OK|Implemented in Q-Gears.| 
 |0x12|JMPB|HIGH|OK|Implemented in Q-Gears.| 
 |0x13|JMPBL|HIGH|OK|Implemented in Q-Gears.| 
 |0x14|IFUB|HIGH|OK|Implemented in Q-Gears.| 
 |0x15|IFUBL|HIGH|OK|Implemented in Q-Gears.| 
 |0x16|IFSW|HIGH|OK|Implemented in Q-Gears.| 
 |0x17|IFSWL|HIGH|OK|Implemented in Q-Gears.| 
 |0x18|IFUW|HIGH|OK|Implemented in Q-Gears.| 
 |0x19|IFUWL|HIGH|OK|Implemented in Q-Gears.| 
 |0x24|WAIT|HIGH|OK|Implemented in Q-Gears.| 
 |0x30|IFKEY|HIGH|    |    | 
 |0x31|IFKEYON|HIGH|OK|2022-09-21 |0x31|IFKEYON|HIGH|OK|2022- Implemented in commit:0a55786.|    | 
 |0x32|IFKEYOFF|HIGH|OK|2022-09-21 |0x32|IFKEYOFF|HIGH|OK|2022- Implemented in commit:0a55786.|    | 
 |0x5F|NOP|NONE|    |Unused in OG.| 
 |0xCB|IFPRTYQ|MID|    |    | 
 |0xCC|IFMEMBQ|MID|    |    | 


 **System & Module Control** 
 |Byte|Opcode |Prio. |Status |Notes | 
 |--|--|--|--|--| 
 |0x0E|DSKCG|NONE|    |Disk change, unused in V-Gears.| 
 |0x0F|SPECIAL|MID|    |Has subopcodes| 
 |0x20|MINIGAME|LOW|    |    | 
 |0x22|BTMD2|MID|    |    | 
 |0x23|BTRLD|MID|    |    | 
 |0x4B|BTLTB|LOW|    |    | 
 |0x60|MAPJUMP|HIGH|OK|Implemented in Q-Gears.| 
 |0x6E|LSTMP|MID|    |    | 
 |0x70|BATTLE|MID|    |    | 
 |0x71|BTLON|LOW|OK|Implemented in Q-Gears.| 
 |0x72|BTLMD|MID|    |    | 
 |0xD2|MPJPO|HIGH|OK|Implemented in Q-Gears.| 
 |0xD8|PMJMP|NONE|    |Unused in OG.| 
 |0xD9|PMJMP2|NONE|    |Unused in OG.| 
 |0xFF|GAMEOVER|LOW|    |    | 


 **Assignment & Mathematics** 
 |Byte|Opcode |Prio. |Status |Notes | 
 |--|--|--|--|--| 
 |0x76|PLUS!|HIGH|OK|Implemented in Q-Gears.| 
 |0x77|PLUS2!|HIGH|OK|Implemented in Q-Gears.| 
 |0x78|MINUS!|HIGH|OK|Implemented in Q-Gears.| 
 |0x79|MINUS2!|HIGH|OK|Implemented in Q-Gears.| 
 |0x7A|INC!|HIGH|OK|Implemented in Q-Gears.| 
 |0x7B|INC2!|HIGH|OK|Implemented in Q-Gears.| 
 |0x7C|DEC!|HIGH|OK|Implemented in Q-Gears.| 
 |0x7D|DEC2!|HIGH|OK|Implemented in Q-Gears.| 
 |0x7F|RDMSD|HIGH|OK|Implemented in Q-Gears.| 
 |0x80|SETBYTE|HIGH|OK|Implemented in Q-Gears.| 
 |0x81|SETWORD|HIGH|OK|Implemented in Q-Gears.| 
 |0x82|BITON|HIGH|OK|2022-09-21 |0x82|BITON|HIGH|OK|2022- Implemented in commit:0a55786.|    | 
 |0x83|BITOFF|HIGH|OK|2022-09-21 |0x83|BITOFF|HIGH|OK|2022- Implemented in commit:0a55786.|    | 
 |0x84|BITXOR|HIGH|    |    | 
 |0x85|PLUS|HIGH|OK|Implemented in Q-Gears.| 
 |0x86|PLUS2|HIGH|OK|Implemented in Q-Gears.| 
 |0x87|MINUS|HIGH|OK|Implemented in Q-Gears.| 
 |0x88|MINUS2|HIGH|OK|Implemented in Q-Gears.| 
 |0x89|MUL|    |    |    | 
 |0x8A|MUL2|    |    |    | 
 |0x8B|DIV|    |    |    | 
 |0x8C|DIV2|    |    |    | 
 |0x8D|MOD|HIGH|OK|Implemented in Q-Gears.| 
 |0x8E|MOD2|    |    |    | 
 |0x8F|AND|    |    |    | 
 |0x90|AND2|    |    |    | 
 |0x91|OR|    |    |    | 
 |0x92|OR2|    |    |    | 
 |0x93|XOR|    |    |    | 
 |0x94|XOR2|    |    |    | 
 |0x95|INC|HIGH|OK|Implemented in Q-Gears.| 
 |0x96|INC2|HIGH|OK|Implemented in Q-Gears.| 
 |0x97|DEC|HIGH|OK|Implemented in Q-Gears.| 
 |0x98|DEC2|HIGH|OK|Implemented in Q-Gears.| 
 |0x99|RANDOM|HIGH|OK|Implemented in Q-Gears.| 
 |0x9A|LBYTE|    |    |    | 
 |0x9B|HBYTE|    |    |    | 
 |0x9C|2BYTE|    |    |    | 
 |0xD4|SIN|    |    |    | 
 |0xD5|COS|    |    |    | 

 **Windowing & Menu** 
 |Byte|Opcode |Prio. |Status |Notes | 
 |--|--|--|--|--| 
 |0x21|TUTOR|LOW|    |    | 
 |0x2E|WCLS|MID|    |    | 
 |0x2F|WSIZW|MID|    |    | 
 |0x36|WSPCL|MID|    |    | 
 |0x37|WNUMB|MID|    |    | 
 |0x38|STTIM|MID|    |    | 
 |0x40|MESSAGE|HIGH|OK|Implemented in Q-Gears.| 
 |0x41|MPARA|MID|    |    | 
 |0x42|MPRA2|MID|    |    | 
 |0x43|MPNAM|HIGH|OK|Implemented in Q-Gears.| 
 |0x48|ASK|HIGH|    |    | 
 |0x49|MENU|MID|20%|2022-10-28 Name menu implemented on commit:3c2b5db.| implemented.| 
 |0x4A|MENU2|HIGH|OK|Implemented in Q-Gears.| 
 |0x50|WINDOW|HIGH|OK|Implemented in Q-Gears.| 
 |0x51|WMOVE|LOW|    |    | 
 |0x52|WMODE|HIGH|    |    | 
 |0x53|WREST|LOW|    |    | 
 |0x54|WCLSE|HIGH|OK|Implemented in Q-Gears.| 
 |0x55|WROW|NONE|    |Unused in OG.| 
 |0x56|GWCOL|NONE|    |Unused in OG.| 
 |0x57|SWCOL|LOW|    |    | 

 **Party & Inventory** 
 |Byte|Opcode |Prio. |Status |Notes | 
 |--|--|--|--|--| 
 |0x0A|SPTYE|LOW|    |    | 
 |0x0B|GTPYE|LOW|    |    | 
 |0x39|GOLDu|LOW|OK|2022-10-15 |0x39|GOLDu|LOW|OK|2022- Implemented on commit: 991d329. . Needs testing    | 
 |0x3A|GOLDd|LOW|OK|2022-10-15 |0x3A|GOLDd|LOW|OK|2022- Implemented on commit: 991d329. . Needs testing    | 
 |0x3B|CHGLD|LOW|OK|2022-10-15 |0x3B|CHGLD|LOW|OK|2022- Implemented on commit: 991d329. . Needs testing    | 
 |0x3C|HMPMAX1|LOW|    |    | 
 |0x3D|HMPMAX2|LOW|    |    | 
 |0x3E|MHMMX|LOW|    |    | 
 |0x3F|HMPMAX3|LOW|    |    | 
 |0x45|MPu|LOW|    |    | 
 |0x47|MPd|LOW|    |    | 
 |0x4D|HPu|LOW|    |    | 
 |0x4F|HPd|LOW|    |    | 
 |0x58|STITM|MID|OK|2022-10-15 |0x58|STITM|MID|OK|2022- Implemented on commit: 991d329.| | 
 |0x59|DLITM|MID|OK|2022-10-15 |0x59|DLITM|MID|OK|2022- Implemented on commit: 991d329.| | 
 |0x5A|CKITM|MID|OK|2022-10-15 |0x5A|CKITM|MID|OK|2022- Implemented on commit: 991d329.| | 
 |0x5B|SMTRA|MID|    |    | 
 |0x5C|DMTRA|MID|    |    | 
 |0x5D|CMTRA|MID|    |    | 
 |0x74|GETPC|HIGH|    |    | 
 |0xC8|PRTYP|HIGH|    |    | 
 |0xC9|PRTYM|HIGH|    |    | 
 |0xCA|PRTYE|HIGH|    |    | 
 |0xCB|IFPRTYQ|HIGH|    |    | 
 |0xCC|IFMEMBQ|HIGH|    |    | 
 |0xCD|MMBud|MID|    |    | 
 |0xCE|MMBLK|MID|    |    | 
 |0xCF|MMBUK|MID|    |    | 

 **Field Models, Animation & 3D/Walkmesh** 
 |Byte|Opcode |Prio. |Status |Notes | 
 |--|--|--|--|--| 
 |0x08|JOIN|MID|OK|2022-09-21 |0x08|JOIN|MID|OK|2022- Implemented in commit:0a55786.| on commit: | 
 |0x09|SPLIT|MID|OK|2022-09-21 |0x09|SPLIT|MID|OK|2022- Implemented in commit:0a55786.| on commit: | 
 |0x26|BLINK|TODO|    |    | 
 |0x28|KAWAI|???|    |Has opcodes.| 
 |0x29|KAWIW|LOW|    |    | 
 |0x2A|PMOVA|LOW|    |    | 
 |0x2B|SLIP|NONE|    |Unused in OG.| 
 |0x33|UC|HIGH|    |    | 
 |0x34|PDIRA|LOW|    |    | 
 |0x35|PTURA|LOW|    |    | 
 |0x6D|IDLCK|HIGH|OK|Implemented in Q-Gears (as walkmesh instruction).| 
 |0x73|PGTDR|LOW|    |    | 
 |0x75|PXYZI|LOW|    |    | 
 |0x7E|TLKON|HIGH|OK|Implemented in Q-Gears.| 
 |0xA0|PC|HIGH|OK|Implemented in Q-Gears.| 
 |0xA1|CHAR|HIGH|OK|Implemented in Q-Gears.| 
 |0xA2|DFANM|HIGH|OK|Implemented in Q-Gears.| 
 |0xA3|ANIME1|HIGH|OK|Implemented in Q-Gears.| 
 |0xA4|VISI|HIGH|OK|Implemented in Q-Gears.| 
 |0xA5|XYZI|HIGH|OK|Implemented in Q-Gears.| 
 |0xA6|XYI|HIGH|    |    | 
 |0xA7|XYZ|HIGH|    |    | 
 |0xA8|MOVE|HIGH|OK|Implemented in Q-Gears.| 
 |0xA9|CMOVE|HIGH|    |    | 
 |0xAA|MOVA|HIGH|    |    | 
 |0xAB|TURA|LOW|    |    | 
 |0xAC|ANIMW|HIGH|    |    | 
 |0xAD|FMOVE|HIGH|    |    | 
 |0xAE|ANIME2|MID|    |    | 
 |0xAF|ANIM!1|MID|    |    | 
 |0xB0|CANIM1|MID|    |    | 
 |0xB1|CANM!1|MID|    |    | 
 |0xB2|MSPED|MID|OK|Implemented in Q-Gears.| 
 |0xB3|DIR|LOW|OK|Implemented in Q-Gears.| 
 |0xB4|TURNGEN|LOW|OK|Implemented in Q-Gears.| 
 |0xB5|TURN|LOW|    |    | 
 |0xB6|DIRA|LOW|    |    | 
 |0xB7|GETDIR|MID|    |    | 
 |0xB8|GETAXY|HIGH|    |    | 
 |0xB9|GETAI|HIGH|OK|Implemented in Q-Gears.| 
 |0xBA|ANIM!2|MID|OK|Implemented in Q-Gears.| 
 |0xBB|CANIM2|MID|OK|Implemented in Q-Gears.| 
 |0xBC|CANM!2|MID|OK|Implemented in Q-Gears.| 
 |0xBD|ASPED|LOW|    |    | 
 |0xBF|CC|HIGH|OK|Implemented in Q-Gears.| 
 |0xC0|JUMP|HIGH|OK|2022-09-26 |0xC0|JUMP|HIGH|OK|2022- Implemented on commit:8d2cdb9.| commit: | 
 |0xC1|AXYZI|HIGH|OK|2022-09-26 |0xC1|AXYZI|HIGH|OK|2022- Implemented on commit:8d2cdb9.| commit: | 
 |0xC2|LADER|HIGH|OK|2022-09-26 |0xC2|LADER|HIGH|OK|2022- Implemented on commit:8d2cdb9.| commit: | 
 |0xC3|OFST|MID|OK|2022-09-08 |0xC3|OFST|MID|OK|2022- Implemented on commit:2c32eb4.| commit: | 
 |0xC4|OFSTW|MID|OK|2022-09-08 |0xC4|OFSTW|MID|OK|2022- Implemented on commit:2c32eb4.| commit: | 
 |0xC5|TALKR|MID|    |    | 
 |0xC6|SLIDR|MID|    |    | 
 |0xC7|SOLID|HIGH|OK|Implemented in Q-Gears.| 
 |0xD0|LINE|HIGH|OK|2022-09-15 |0xD0|LINE|HIGH|OK|2022 Implemented, not as instruction, but as entity, in commit:442672f.| entity.| 
 |0xD1|LINON|HIGH|    |    | 
 |0xD3|SLINE|???|    |    | 
 |0xD6|TLKR2|MID|    |    | 
 |0xD7|SLDR2|MID|    |    | 
 |0xDC|CCANM|MID|    |    | 
 |0xDB|FCFIX|LOW|    |    | 
 |0xDD|ANIMB|LOW|    |    | 
 |0xDE|TURNW|LOW|    |    | 

 **Background & Palette** 
 |Byte|Opcode |Prio. |Status |Notes | 
 |--|--|--|--|--| 
 |0x27|BGMOVIE|NONE|    |Unused in OG.| 
 |0x2C|BGPDH|LOW|    |    | 
 |0x2D|BGSCR|LOW|    |    | 
 |0xDF|MPPAL|LOW|    |    | 
 |0xE0|BGON|LOW|    |    | 
 |0xE1|BGOFF|LOW|    |    | 
 |0xE2|BGROL|LOW|    |    | 
 |0xE3|BGROL2|LOW|    |    | 
 |0xE4|BGCLR|LOW|    |    | 
 |0xE5|STPAL|LOW|    |    | 
 |0xE6|LDPAL|LOW|    |    | 
 |0xE7|CPPAL|LOW|    |    | 
 |0xE8|RTPAL|LOW|    |    | 
 |0xE9|ADPAL|LOW|    |    | 
 |0xEA|MPPAL2|LOW|    |    | 
 |0xEB|STPLS|LOW|    |    | 
 |0xEC|LDPLS|LOW|    |    | 
 |0xED|CPPAL2|LOW|    |    | 
 |0xEE|RTPAL2|LOW|    |    | 
 |0xEF|ADPAL2|LOW|    |    | 

 **Camera, Audio & Video** 
 |Byte|Opcode |Prio. |Status |Notes | 
 |--|--|--|--|--| 
 |0x25|NFADE|MID|OK|Implemented in Q-Gears.| 
 |0x5E|SHAKE|LOW|    |    | 
 |0x61|SCRLO|NONE|    |Unused in OG.| 
 |0x62|SCRLC|??|    |    | 
 |0x63|SCRLA|MID|OK|Implemented in Q-Gears.| 
 |0x64|SCR2D|MID|OK|Implemented in Q-Gears.| 
 |0x65|SCRCC|HIGH|    |    | 
 |0x66|SCR2DC|MID|OK|Implemented in Q-Gears.| 
 |0x67|SCRLW|MID|OK|Implemented in Q-Gears.| 
 |0x68|SCR2DL|MID|    |    | 
 |0x6A|WVOFT|MID|OK|2022-10-26 |0x6A|WVOFT|MID|OK|2022- Implemented on commit:8191ec8.| commit: | 
 |0x6B|FADE|MID|OK|Implemented in Q-Gears.| 
 |0x6C|FADEW|MID|    |    | 
 |0x6F|SCRLP|MID|    |    | 
 |0xDA|AKAO2|MID|    |    | 
 |0xF0|MUSIC|MID|    |    | 
 |0xF1|SOUND|MID|    |    | 
 |0xF2|AKAO|MID|    |    | 
 |0xF3|MUSVT|NONE|    |Unused in OG.| 
 |0xF4|MUSVM|NONE|    |Unused in OG.| 
 |0xF5|MULCK|LOW|    |    | 
 |0xF6|BMUSC|LOW|    |    | 
 |0xF7|CHMPH|NONE|    |Unused in OG.| 
 |0xF8|PMVIE|LOW|    |    | 
 |0xF9|MOVIE|LOW|    |    | 
 |0xFA|MVIEF|LOW|    |    | 
 |0xFB|MVCAM|LOW|    |    | 
 |0xFC|FMUSC|LOW|    |    | 
 |0xFD|CMUSC|LOW|    |    | 
 |0xFE|CHMST|LOW|    |    | 

 **Unknown** 
 |Byte|Opcode|Note | 
 |--|--|--| 
 |0x69|MPDSP|Unknown, used in OG.| 
 |0x9D|SETX|Unused    in OG.| 
 |0x9E|GETX|Unused    in OG.| 
 |0x9F|SEARCHX|Unused    in OG.| 

Back