Paul Holden
7380c3f852
Overhaul handling of software rendering.
...
This fixes a number of roms like Rayman.
2023-09-23 22:17:57 +01:00
Paul Holden
b594b29843
Fix software rendering for Rayman and Donald Duck (pitch was wrong).
2023-09-23 22:17:57 +01:00
Paul Holden
d8ce4c93db
Improve executeGBI2_MoveMem debug output.
2023-09-23 22:17:57 +01:00
Paul Holden
067c22eb84
Remove logGLCall.
2023-09-23 22:17:57 +01:00
Paul Holden
c01945887b
Fix texture wrapping issues for texrects that have negative dsdx or dtdy.
2023-09-23 22:17:57 +01:00
Paul Holden
e20267d2f6
Remove unused imports.
2023-09-23 22:17:57 +01:00
Paul Holden
d2b8074ef2
Tidy
2023-09-23 22:17:57 +01:00
Paul Holden
6c4c1a617a
bun update
2023-09-23 22:17:57 +01:00
Paul Holden
9d18353bd9
Rename to eq for brevity.
2023-09-23 22:17:57 +01:00
Paul Holden
10e428e36f
Add some tests for event_queue.
2023-09-23 22:17:57 +01:00
Paul Holden
761021bc18
Make recompiler export the functions it needs.
2023-09-23 22:17:57 +01:00
Paul Holden
6a77a1b984
Move tests alongside source.
2023-09-23 22:17:57 +01:00
Paul Holden
5d476c4ce2
Fix tests.
2023-09-23 22:17:56 +01:00
Paul Holden
c7dcff1a80
Tidy raiseX() functions.
2023-09-23 22:17:56 +01:00
Paul Holden
c35bf10e68
Move causeExcCode constants to cpu_constants.js.
2023-09-23 22:17:56 +01:00
Paul Holden
081cfaeab9
Tidy and dedupe more instruction decode helpers.
2023-09-23 22:17:56 +01:00
Paul Holden
4c70291c24
Fix and dedupe simpleOp.
2023-09-23 22:17:56 +01:00
Paul Holden
185af2c31f
Fix asserts.
2023-09-23 22:17:56 +01:00
Paul Holden
dba431578c
Move cpu1 instruction handling to cpu1.js.
2023-09-23 22:17:56 +01:00
Paul Holden
88e1ab857b
Move checkCauseIP3Consistent to CPU0.
2023-09-23 22:17:56 +01:00
Paul Holden
1e5c017b0e
Remove some unused functions.
2023-09-23 22:17:56 +01:00
Paul Holden
2f331b816c
Dedupe instruction decode helpers.
2023-09-23 22:17:56 +01:00
Paul Holden
446127e17b
Split all the code generation out of r4300.js.
2023-09-23 22:17:56 +01:00
Paul Holden
cbd881a02a
Use this rather than cpu0.
2023-09-23 22:17:56 +01:00
Paul Holden
71b3435b43
Actually remove n64js.getRamDataView.
2023-09-23 22:17:56 +01:00
Paul Holden
9de368dff2
Remove n64js.getRamDataView.
2023-09-23 22:17:56 +01:00
Paul Holden
e7c1fceeea
Move getRamS32Array to hle.js.
2023-09-23 22:17:56 +01:00
Paul Holden
5ad008c239
Push n64js.getRamU8Array to call sites and remove.
2023-09-23 22:17:56 +01:00
Paul Holden
e4899bbf86
Remove n64js.checkSIStatusConsistent.
2023-09-23 22:17:56 +01:00
Paul Holden
026d7139a1
getRandomU32 is unused.
2023-09-23 22:17:56 +01:00
Paul Holden
07e6d3d042
Log some more details from the rom header.
2023-09-23 22:17:56 +01:00
Paul Holden
3c2b111e6b
Move systemFrequency to Hardware.
2023-09-23 22:17:56 +01:00
Paul Holden
6f4b3cb0a4
Add a TODO
2023-09-23 22:17:56 +01:00
Paul Holden
e30bce9682
Periodically log audio sync.
2023-09-23 22:17:56 +01:00
Paul Holden
e7d70154e3
Skip render frames if we start running too far ahead of realtime.
2023-09-23 22:17:56 +01:00
Paul Holden
c4a3c1faf0
Fix some system constants based on https://n64brew.dev/wiki/ROM_Header .
2023-09-23 22:17:56 +01:00
Paul Holden
13137b723d
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-23 22:17:56 +01:00
Paul Holden
5d4a51f3f3
Fix lint warnings.
2023-09-23 22:17:56 +01:00
Paul Holden
93081b85b6
Fix call to unmappedAddressValue.
2023-09-23 22:17:56 +01:00
Paul Holden
919a481396
Update info.
2023-09-23 22:17:56 +01:00
Paul Holden
a1a4dd0d3e
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-23 22:17:56 +01:00
Paul Holden
6107f4995f
Rename countdown arg to cycles.
2023-09-23 22:17:56 +01:00
Paul Holden
64aa2b2850
Encapsulate more code in EventQueue.
2023-09-23 22:17:56 +01:00
Paul Holden
467d711d06
Split event queue out to a separate class.
2023-09-23 22:17:56 +01:00
Paul Holden
69269e8f72
Move run to CPU0.
2023-09-23 22:17:56 +01:00
Paul Holden
293fffcccd
Move runImpl to CPU0.
2023-09-23 22:17:56 +01:00
Paul Holden
7ea9432a22
Move handleEmulatedException to CPU0.
2023-09-23 22:17:56 +01:00
Paul Holden
93d1a4aae6
Move onEventCountdownReached to CPU0.
2023-09-23 22:17:56 +01:00
Paul Holden
b3b62a18e6
Rename handleCount -> onEventCountdownReached.
2023-09-23 22:17:56 +01:00
Paul Holden
565062c2bd
Tidy
2023-09-23 22:17:56 +01:00