Commit Graph

889 Commits

Author SHA1 Message Date
jtuu
f8dc1af8ea Split VM code into separate files. 2019-10-15 15:34:30 +03:00
jtuu
9facc6357c Dispose threads when VM halts. 2019-10-11 15:02:54 +03:00
jtuu
c7b27846c8 [VM] Quick and dirty implementation of window_msg, add_msg and winend. 2019-10-11 12:49:20 +03:00
jtuu
4499009e5a Added methods for reading strings at specific offsets to Cursor. 2019-10-11 12:48:49 +03:00
jtuu
21299646e4 [VM] Implemented arg_pushs and arg_pusha. 2019-10-11 11:11:06 +03:00
jtuu
2909b1bb3e Reworked VirtualMachineMemoryBuffer to extend ArrayBufferCursor. 2019-10-11 10:49:47 +03:00
jtuu
aad45b0929 Added methods for writing data at a specific offset to WritableCursor. 2019-10-11 10:39:13 +03:00
jtuu
6ed419cf35 Use undefined instead of null as the empty value. 2019-10-11 09:14:34 +03:00
Daan Vanden Bosch
9b1bc675a2 Fixed compilation issues and fixed bug in SimpleListProperty (length was not correctly initialized). 2019-10-11 00:04:01 +02:00
Daan Vanden Bosch
a5dd34cda7 Merge remote-tracking branch 'github/master' 2019-10-10 23:12:04 +02:00
Daan Vanden Bosch
ff8f02fe5b Refactored events model and added a basic view for it behind a feature flag. 2019-10-10 23:11:52 +02:00
jtuu
f8c75d7dad [VM] Reworked the argument stack to emulate the PSOBB client more accurately. 2019-10-10 21:07:21 +03:00
jtuu
5248dbe0a0 [VM] Reworked register storage to emulate the PSOBB client more accurately. 2019-10-10 21:07:21 +03:00
Daan Vanden Bosch
c287fdeb2f Renamed event-related types. Updated feature list. 2019-10-10 19:47:38 +02:00
Daan Vanden Bosch
2d534d2567 primitive reinterpretation functions are now while converting NPCs to dat data. 2019-10-10 13:56:15 +02:00
Daan Vanden Bosch
9803bfe125 Wave data is now parsed/written and converted to models. 2019-10-10 13:47:43 +02:00
jtuu
dbe4f3ab78 [VM] Implemented stack_push(m) and stack_pop(m) opcodes. 2019-10-07 20:52:44 +03:00
Daan Vanden Bosch
345c9ab0dc Improved typing of ListProperty. 2019-10-07 18:26:45 +02:00
Daan Vanden Bosch
295bb71c15 Merge remote-tracking branch 'github/master' 2019-10-05 21:12:11 +02:00
Daan Vanden Bosch
0583b7499e Added ASM editor history navigation with mouse buttons and keyboard. 2019-10-05 21:11:58 +02:00
jtuu
f0d1d67b24 Lint and remove console.logs. 2019-10-04 14:21:51 +03:00
jtuu
3a8b189b0a [VM] Implemented conditional jump opcodes.
jmp_on, jmp_off, jmp_=, jmpi_=, jmp_!=, jmpi_!=, ujmp_>, ujmpi_>, jmp_>, jmpi_>, ujmp_<, ujmpi_<, jmp_<, jmpi_<, ujmp_>=, ujmpi_>=, jmp_>=, jmpi_>=, ujmp_<=, ujmpi_<=, jmp_<=, jmpi_<=
2019-10-04 14:17:34 +03:00
Daan Vanden Bosch
efed622e94 Fixed regression. 2019-10-03 17:28:48 +02:00
Daan Vanden Bosch
421487e21f String segment strings are now displayed with "\n" escape sequence instead of "<cr>". 2019-10-03 17:06:23 +02:00
Daan Vanden Bosch
3670df618b Monaco popups were obscured by golden layout. 2019-10-03 16:46:26 +02:00
Daan Vanden Bosch
544ed46263 "Go to label definition" now works with arguments passed via the stack. 2019-10-03 16:40:43 +02:00
Daan Vanden Bosch
ee4a293d3e Fixed some bugs. 2019-10-03 00:18:11 +02:00
Daan Vanden Bosch
b85b7147a6 Removed an unnecessary todo and added a useful one. 2019-10-03 00:07:40 +02:00
Daan Vanden Bosch
f67752e277 "Go to label definition" now works fully for instructions with inline arguments. 2019-10-02 23:59:24 +02:00
Daan Vanden Bosch
90f0e0f7bd Basic go to label definition functionality. 2019-10-02 23:34:09 +02:00
Daan Vanden Bosch
971444f847 F5 keybinding for "Run in VM". Bugfix for feature flags. 2019-10-02 21:15:35 +02:00
Daan Vanden Bosch
f2d746642f
Merge pull request #2 from jtuu/vm
Merging incomplete feature branch 'vm' behind a feature flag
2019-10-02 20:53:41 +02:00
jtuu
1a7e9ee9ac [VM] Put the "run in VM" button behind a feature flag called "vm". 2019-10-02 21:46:20 +03:00
jtuu
d9110f0041 [VM] Push entire Arg object to stack instead of just its value. 2019-10-02 21:46:19 +03:00
jtuu
2e672c12b2 [VM] Implemented shift_left and shift_right opcodes. 2019-10-02 21:46:17 +03:00
jtuu
c628c30e1b [VM] Compare opcode numbers not the objects. 2019-10-02 21:46:13 +03:00
jtuu
78ed5c8071 [VM] Implemented opcodes for basic numeric operations. 2019-10-02 21:46:11 +03:00
jtuu
bdd7e8b174 [VM] Assign arguments to variables to make accessing them terser. 2019-10-02 21:46:09 +03:00
jtuu
806ab0ddd5 [VM] Implement arg_pushr, b, w, and s correctly. Remove arg_pusha and o because they are tricky and low priority. 2019-10-02 21:46:07 +03:00
jtuu
98acdbf7f9 [VM] Added arg stack. 2019-10-02 21:46:05 +03:00
jtuu
5458d06d8e [VM] Changed the icon for the VM button. 2019-10-02 21:46:02 +03:00
jtuu
80a4aa784f [VM] Added a button to run the current quest in the VM.
Made the VM work with output from the assembler.
Added some comments to the VM and cleaned it up a little bit.
2019-10-02 21:43:53 +03:00
Daan Vanden Bosch
bffd8f51d9 Fixed unit tests. 2019-10-02 20:20:59 +02:00
Daan Vanden Bosch
6396eb1bdf Feature flags. 2019-10-02 20:10:02 +02:00
Daan Vanden Bosch
ed571b9061 Added asm meta data to IR. 2019-10-02 19:57:43 +02:00
Daan Vanden Bosch
7bde9988e8 Tiny bugfix. 2019-10-02 18:32:00 +02:00
Daan Vanden Bosch
fc5a34946e Opcode is now structured cloning-safe. All IR is now structured cloning-safe. 2019-10-02 14:25:47 +02:00
Daan Vanden Bosch
16b89a01d0 Param is now structured cloning-safe. 2019-10-02 13:56:00 +02:00
Daan Vanden Bosch
fa76002d1c Instruction is now structured cloning-safe. 2019-10-02 13:44:55 +02:00
Daan Vanden Bosch
431c0545f2 Added the basic Monaco machinery for providing symbol definitions. 2019-10-02 13:28:14 +02:00