Paul Holden
79b63e9958
Simplify screen->device transforms.
...
Viewports still aren't implemented correcty but the new code is a lot simpler and now supports canvas scaling.
2023-09-14 22:56:40 +01:00
Paul Holden
cf7fa8f443
Add a Transform2D class.
2023-09-14 22:47:01 +01:00
Paul Holden
f6d62586ea
Add a Vector2 class.
2023-09-13 23:55:46 +01:00
Paul Holden
1248ff30d7
Rename Matrix to Matrix4x4.
2023-09-13 23:48:52 +01:00
Paul Holden
edeb41077d
Tidy
2023-09-13 08:06:07 +01:00
Paul Holden
808beabe70
Overhaul handling of software rendering.
...
This fixes a number of roms like Rayman.
2023-09-12 23:58:50 +01:00
Paul Holden
9423e884a1
Fix software rendering for Rayman and Donald Duck (pitch was wrong).
2023-09-11 23:11:39 +01:00
Paul Holden
1474fc2c30
Improve executeGBI2_MoveMem debug output.
2023-09-11 22:29:45 +01:00
Paul Holden
073f7b808f
Remove logGLCall.
2023-09-11 08:10:52 +01:00
Paul Holden
936ad8bc84
Fix texture wrapping issues for texrects that have negative dsdx or dtdy.
2023-09-10 22:30:11 +01:00
Paul Holden
85ab7aefa7
Remove unused imports.
2023-09-10 21:20:35 +01:00
Paul Holden
80ea0f2ea0
Tidy
2023-09-10 21:20:10 +01:00
Paul Holden
7298cb2aa1
bun update
2023-09-10 21:13:34 +01:00
Paul Holden
a61f4042f2
Rename to eq for brevity.
2023-09-10 21:10:53 +01:00
Paul Holden
c2a7c7e45d
Add some tests for event_queue.
2023-09-10 20:52:30 +01:00
Paul Holden
3e6b19e194
Make recompiler export the functions it needs.
2023-09-10 20:27:54 +01:00
Paul Holden
6352e7a5c8
Move tests alongside source.
2023-09-10 20:11:56 +01:00
Paul Holden
b1d5476528
Fix tests.
2023-09-10 20:06:49 +01:00
Paul Holden
a7a2fb5a1f
Tidy raiseX() functions.
2023-09-10 18:17:40 +01:00
Paul Holden
5d958dffdd
Move causeExcCode constants to cpu_constants.js.
2023-09-10 17:58:00 +01:00
Paul Holden
4032dff5da
Tidy and dedupe more instruction decode helpers.
2023-09-10 16:07:11 +01:00
Paul Holden
016c0ee058
Fix and dedupe simpleOp.
2023-09-10 15:51:34 +01:00
Paul Holden
1b57724a03
Fix asserts.
2023-09-10 15:36:56 +01:00
Paul Holden
66e4238521
Move cpu1 instruction handling to cpu1.js.
2023-09-10 15:36:47 +01:00
Paul Holden
f8d82400aa
Move checkCauseIP3Consistent to CPU0.
2023-09-10 15:12:28 +01:00
Paul Holden
0d2d8ac8f7
Remove some unused functions.
2023-09-10 15:09:31 +01:00
Paul Holden
256835d60e
Dedupe instruction decode helpers.
2023-09-10 15:08:25 +01:00
Paul Holden
5a62c1406d
Split all the code generation out of r4300.js.
2023-09-10 14:57:43 +01:00
Paul Holden
296daf8ce7
Use this rather than cpu0.
2023-09-10 14:28:20 +01:00
Paul Holden
a7a9b62520
Actually remove n64js.getRamDataView.
2023-09-10 14:24:42 +01:00
Paul Holden
8860b24c87
Remove n64js.getRamDataView.
2023-09-10 14:24:18 +01:00
Paul Holden
0a27b84aa7
Move getRamS32Array to hle.js.
2023-09-10 14:21:18 +01:00
Paul Holden
163e00e63b
Push n64js.getRamU8Array to call sites and remove.
2023-09-10 14:18:42 +01:00
Paul Holden
d13259fcf3
Remove n64js.checkSIStatusConsistent.
2023-09-10 14:12:04 +01:00
Paul Holden
786ce5dc33
getRandomU32 is unused.
2023-09-10 14:10:32 +01:00
Paul Holden
b13a8b04a6
Log some more details from the rom header.
2023-09-10 14:04:31 +01:00
Paul Holden
28bf76f920
Move systemFrequency to Hardware.
2023-09-10 13:51:58 +01:00
Paul Holden
6a31580e17
Add a TODO
2023-09-10 13:51:15 +01:00
Paul Holden
ac4a16d9f8
Periodically log audio sync.
2023-09-10 10:21:41 +01:00
Paul Holden
311a1d4fe3
Skip render frames if we start running too far ahead of realtime.
2023-09-10 10:16:29 +01:00
Paul Holden
9bb8645908
Fix some system constants based on https://n64brew.dev/wiki/ROM_Header .
2023-09-10 10:09:51 +01:00
Paul Holden
37e32b9fb5
VI interrupts should be based on the system clock, not the video clock.
...
This increases the number of cycles available per VI. It's still not accurate because we're assuming 1 cycle per op.
2023-09-10 10:08:42 +01:00
Paul Holden
56cc957a8a
Fix lint warnings.
2023-09-09 22:35:36 +01:00
Paul Holden
36bbc78cbf
Fix call to unmappedAddressValue.
2023-09-09 22:27:47 +01:00
Paul Holden
b90eef6171
Update info.
2023-09-09 22:20:22 +01:00
Paul Holden
b88892c283
Reimplemt EventQueue as a linked list.
...
The main goal was to move the countdown variable from the event to eventqueue itself. This is more fiddly but it avoids an extra memory dereference on every instruction execution.
2023-09-09 22:11:33 +01:00
Paul Holden
d8d9e75157
Rename countdown arg to cycles.
2023-09-09 14:02:43 +01:00
Paul Holden
7f50c9509e
Encapsulate more code in EventQueue.
2023-09-09 14:01:52 +01:00
Paul Holden
aa542563bf
Split event queue out to a separate class.
2023-09-09 13:51:55 +01:00
Paul Holden
808dd4388d
Move run to CPU0.
2023-09-09 13:29:39 +01:00