Commit graph

1886 commits

Author SHA1 Message Date
Paul Holden
5bcc7719c7 Use subRegion in PIFMemDevice. 2023-08-27 11:53:34 +01:00
Paul Holden
a92e4d7772 subDataView isn't used. 2023-08-27 11:48:36 +01:00
Paul Holden
7f253f82ac Use MemoryRegions for imem and dmem. 2023-08-27 11:47:45 +01:00
Paul Holden
87b52b7d46 Use a MemoryRegion in the disassembler. 2023-08-27 11:46:40 +01:00
Paul Holden
86063255a4 Remove n64js.rsp_task_view and use a MemoryRegion. 2023-08-27 11:46:24 +01:00
Paul Holden
4b0af873d5 Update simulateBoot to use a MemoryRegion. 2023-08-27 11:34:55 +01:00
Paul Holden
a8daca82c9 Don't log when writing to PI_BSD_DOM regs. 2023-08-27 11:33:03 +01:00
Paul Holden
46c6528a6b Update joybus to use a MemoryRegion. 2023-08-27 11:32:23 +01:00
Paul Holden
bac4e94959 Allow MemoryRegion to be constructed with an offset and length and add a subRegion helper. 2023-08-27 11:28:40 +01:00
Paul Holden
ee2c4de48e Use subDataView for the RSP task dataview. 2023-08-27 10:31:14 +01:00
Paul Holden
fe259a3395 Add a subDataView helper. 2023-08-27 10:27:12 +01:00
Paul Holden
b8b75ec16e Make memoryCopy a member of MemoryRegion. 2023-08-27 10:17:20 +01:00
Paul Holden
e008b97039 Split joybus handling into separate configure and execute parts.
This is needed because it's possible to write 1 to the control byte once, then repeatedly read the memory to get the latest values.

This makes some CIC-NUS-6105 games slightly less broken, because they don't try to interpret the challenge bytes as joybus commands.
2023-08-27 10:12:26 +01:00
Paul Holden
f2bc5396e0 Remove a TODO 2023-08-26 14:53:00 +01:00
Paul Holden
5ec00d302a Tidy 2023-08-26 13:49:09 +01:00
Paul Holden
19d0cef44a Keep simplifying execute() 2023-08-26 13:47:25 +01:00
Paul Holden
06c98f5d0c Tidy 2023-08-26 13:20:55 +01:00
Paul Holden
735714ed1c Use subarray with an explicit length rather than tempOutput. 2023-08-26 13:16:57 +01:00
Paul Holden
9aa59f2e9a for loop and switch 2023-08-26 13:08:23 +01:00
Paul Holden
66e81b7d8e Split controllers.js out of joybus.js. 2023-08-26 11:49:45 +01:00
Paul Holden
6ac1fe2ccb Just pass the inputs into Joybus constructor. 2023-08-26 11:44:45 +01:00
Paul Holden
e00578a5ed Split Controllers out of Joybus. 2023-08-26 11:43:20 +01:00
Paul Holden
a3571a6a00 Maintain a single list of channels. 2023-08-26 11:39:00 +01:00
Paul Holden
b518c24ac6 Move command processing from Joybus Controller/Cartridge. 2023-08-26 11:27:59 +01:00
Paul Holden
db4ad7868f Improve logging 2023-08-26 11:16:04 +01:00
Paul Holden
e29e6a4081 Split pif device out into separate module. 2023-08-26 11:15:27 +01:00
Paul Holden
bc1a6f2a5c Rename "pi ram" to "pif mem". 2023-08-26 11:12:08 +01:00
Paul Holden
1db1854839 Log unhandled writes to the PIF RAM control byte. 2023-08-26 11:06:00 +01:00
Paul Holden
c9972ce6a8 Rename controllers -> joybus. 2023-08-26 11:03:22 +01:00
Paul Holden
7773127d7f Simplify rx handling and correctly handle underflow/overflow. 2023-08-26 10:28:35 +01:00
Paul Holden
ea17f8d88e Add some constants for device ids. 2023-08-26 10:02:04 +01:00
Paul Holden
16dd29d449 Tidy cartridge RTC commands. 2023-08-26 09:08:59 +01:00
Paul Holden
722ff9b2d1 Tidy eeprom handling. 2023-08-26 00:22:29 +01:00
Paul Holden
b56ff79176 Eeprom is 4k and 16k bits, not bytes. 2023-08-25 23:54:54 +01:00
Paul Holden
36f634349e Add support for checking the address crc. 2023-08-25 23:37:20 +01:00
Paul Holden
3a1e1c45e4 Overhaul controllerpak support. 2023-08-25 23:15:24 +01:00
Paul Holden
6211b9d29c Move mempacks to Hardware. 2023-08-24 21:12:23 +01:00
Paul Holden
1f55d4abde Tidy 2023-08-24 21:10:49 +01:00
Paul Holden
3f2c2f4232 Improve the accuracy of TLUT emulation by taking "quadrication" into account.
This fixes a number of glitches with CI4 textures.
2023-08-24 00:14:31 +01:00
Paul Holden
7c3ac2cc46 Implement some unimplmented ops and improve logging. 2023-08-23 09:20:48 +01:00
Paul Holden
435d00d05e Split hle disassembly out into separate module. 2023-08-23 08:52:13 +01:00
Paul Holden
bd042a0395 Use template strings. 2023-08-23 08:44:04 +01:00
Paul Holden
fa27ea5653 Fix fillRect alpha blending. 2023-08-23 08:34:58 +01:00
Paul Holden
0abf3bb57b Mask rdpSegmentAddress against 8MB. 2023-08-23 08:28:46 +01:00
Paul Holden
3e1402a7ee Use template strings. 2023-08-23 08:15:23 +01:00
Paul Holden
d1d5a50a72 Split out setGLBlendMode. 2023-08-23 08:04:08 +01:00
Paul Holden
803ca84c57 Fix winding order in executeGBI2_Tri1. 2023-08-22 23:36:47 +01:00
Paul Holden
e09d9e0b6f Use template strings. 2023-08-22 23:36:27 +01:00
Paul Holden
fa06f2401e Show either the normal or color depending on whether lighting is enabled. 2023-08-22 23:23:39 +01:00
Paul Holden
f12d91b3a8 Fix padding for vertices table. 2023-08-22 23:13:34 +01:00