Commit graph

1886 commits

Author SHA1 Message Date
Paul Holden
acf2687ae6 Move runImpl to CPU0. 2023-09-09 13:25:35 +01:00
Paul Holden
0f5bab3e72 Move handleEmulatedException to CPU0. 2023-09-09 13:23:09 +01:00
Paul Holden
6995b8ba82 Move onEventCountdownReached to CPU0. 2023-09-09 13:20:57 +01:00
Paul Holden
75de93a6b8 Rename handleCount -> onEventCountdownReached. 2023-09-09 13:17:19 +01:00
Paul Holden
0b43e77b46 Tidy 2023-09-09 13:15:20 +01:00
Paul Holden
4e7641a5b4 Simplify kEventRunForCycles handling in speedHack. 2023-09-09 12:13:39 +01:00
Paul Holden
fc8b48fce4 Tidy 2023-09-09 12:01:53 +01:00
Paul Holden
fd72639e9a Use for/of. 2023-09-09 12:00:33 +01:00
Paul Holden
795170c8de Add an option for whether to run audio task processing. 2023-09-09 11:45:31 +01:00
Paul Holden
64932dd261 Implement Audio.
This doesn't do much unless M_AUDTASK is set to be unhandled in hleProcessRSPTask.
2023-09-09 11:43:09 +01:00
Paul Holden
87b84242cd Remove bounds checks for get/setVec. 2023-09-09 11:15:40 +01:00
Paul Holden
966e0dba42 Optimise RSP to remove some BigInt conversions. 2023-09-09 11:13:33 +01:00
Paul Holden
8603803dac Don't run speedHack when the RSP is running. 2023-09-09 10:00:09 +01:00
Paul Holden
1281ecb797 Fix COUNT so that it increments once every 2 instructions. 2023-09-09 09:48:13 +01:00
Paul Holden
18a9a09f25 Fix reference to undefined var. 2023-09-08 20:29:42 +01:00
Paul Holden
18825cb8d7 Rename getCount to getOpsExecuted. 2023-09-08 20:27:07 +01:00
Paul Holden
fa871da6df Add accessors for accumulator low/mid/high which avoid BigInt conversions. 2023-09-07 20:42:58 +01:00
Paul Holden
5eced9fbd6 Reduce nesting in speedHack. 2023-09-07 20:40:07 +01:00
Paul Holden
24cd4d11c5 Remove wrappers around executeX functions.
The extra level of indirection is showing up in the profiler.
2023-09-07 20:32:30 +01:00
Paul Holden
68d2e11a18 Fix lint warnings. 2023-09-07 09:04:26 +01:00
Paul Holden
95a7c58908 Add a getCyclesUntilEvent helper and fix getVblCount.
This wasn't working correclty as the countdown value is relative to the previous event.
2023-09-07 09:03:41 +01:00
Paul Holden
efe98e966a Refactor setGLBlendMode. 2023-09-06 22:05:37 +01:00
Paul Holden
3f0ecb7818 Debug color images. 2023-09-06 21:39:33 +01:00
Paul Holden
a34dd5e01f Fix lint errors. 2023-09-06 21:37:25 +01:00
Paul Holden
09027e2afd Add eslint config. 2023-09-06 21:32:00 +01:00
Paul Holden
66369c507a Fix lint errors. 2023-09-06 21:31:31 +01:00
Paul Holden
108207f5d7 Improve accuracy of SP DMAs.
* Add double buffering
* Correctly set the full and busy registers/bits
* Register latching
2023-09-06 08:57:58 +01:00
Paul Holden
523d0fb04d Improve accuracy of PI DMA emulation.
* Set BUSY bit during transfer.
* Set ERROR bit if registers modified during transfer.
* Trigger interrupt after a delay based on transfer length.
* Cancel any interrupts if RESET bit written.
2023-09-05 23:12:04 +01:00
Paul Holden
59d0f015b8 Make the SystemEvent type a string so it doesn't need to be maintained centrally, and move VI interrupt stuff to vi.js. 2023-09-05 22:50:59 +01:00
Paul Holden
0263c6469e Add handler function to SystemEvent. 2023-09-05 22:06:55 +01:00
Paul Holden
ba6c58c8e1 Improve cpu status table. 2023-09-05 08:48:58 +01:00
Paul Holden
acc33b1d1d Show single value for VCC/VCO. 2023-09-05 08:44:25 +01:00
Paul Holden
a0e79f4d16 Fix toHex when bits >= 32. 2023-09-05 08:39:20 +01:00
Paul Holden
0be061ee05 Tidy 2023-09-05 08:27:56 +01:00
Paul Holden
28c5bfcff0 Add some TODOs. 2023-09-05 08:26:45 +01:00
Paul Holden
075779ece2 Add some todos. 2023-09-05 08:25:21 +01:00
Paul Holden
ff42adbe65 Add a tab for RSP task state. 2023-09-05 08:23:18 +01:00
Paul Holden
2c91a2dc78 Rename toString64_bigint to toString64. 2023-09-04 23:25:21 +01:00
Paul Holden
249072e5fa Replace uses of toString64 with toString64_bigint. 2023-09-04 23:22:23 +01:00
Paul Holden
ab46538170 Apply masking in toHex. 2023-09-04 23:19:29 +01:00
Paul Holden
e531253c9c Fix toString64_bigint formatting (wasn't padding with zeros) and resolve toStringN TODO. 2023-09-04 23:11:52 +01:00
Paul Holden
5d1de5af5b Add VCO, VCC, VCE. 2023-09-04 22:57:19 +01:00
Paul Holden
db40a0e037 Show RSP registers. 2023-09-04 22:51:38 +01:00
Paul Holden
c313787131 Hoist opsExecuted out as a local var. 2023-09-04 22:03:46 +01:00
Paul Holden
5ad78f3f5c Flesh out disassembly for the RSP debugger. 2023-09-04 22:02:19 +01:00
Paul Holden
1bceb9a0ff Make imem wrap when disassembling.
This is parimarily for the debugger which disassembles a range around the PC.
2023-09-04 22:01:33 +01:00
Paul Holden
e8dcfa823f Refactor makeRecentMemoryAccesses to use a helper function to resolve the memory access. 2023-09-04 21:56:24 +01:00
Paul Holden
b09f0cf66c Wrap up lastPC in CPUDebugState. 2023-09-04 20:45:35 +01:00
Paul Holden
4c70f74352 Fix rollup config for rollup v3. 2023-09-04 20:37:47 +01:00
Paul Holden
8fb4eaf2d9 Add disassembleRange helper to CPUDebugState. 2023-09-04 08:51:48 +01:00