- The timer interrupt is cleared on writes to the Compare register (see: #6.3.4).
- Only software interrupt bits are writable into the Cause register (see: #6.3.6).
This would fix the User and Supervisor modes entering an exception and being unable to service it as they have no way to return to Kernel mode.
The CPU would get stuck in a coprocessor unusable exception loop servicing or exiting it.
See VR4300 user manual #6.4.1, or #6.3.5, Operating Modes.
- Don't clear the render target since we're fully overwriting it anyways.
- Pass null pointers instead of filling out full regions for the texture and render target.
This achieves the same effect.
- Create the renderer in the constructor, since we're doing everything in the same thread anyways.
That gets rid of the check on every frame.
Implemented the LH opcode.
Something isn't quite right, as not all cases were fixed (RDP hello world works, but I8RLEVideo, I8VideoDecode and a few others still aren't totally right). Also, some games still incorrectly set the User mode among other bits in the status register.
Cartridge (big-endian): 1234
RAM (little-endian): 4321
Source 16-bit image: 12-34 (2 pixels)
Emulated image should be 21-43 (big => little), but the word swap made it 43-21 (pixel swapped)
Output: 4321 => 2143
- Blitting the frame buffer works for 240p and 480p, though due to the usage of the scale-up values, some lines don't make it through in 480p. Additionally, something is wrong with 16-bit buffers.
- Running the window thread on the main thread since the main thread created the window. Windows isn't able to poll SDL events on a different thread.
- Disposing the SDL window on the thread which created it instead of relying on the finaliser to destroy it. Not doing so triggers a segfault as DestroyRenderer gets called. No need to destroy textures when disposing of the renderer as it does it.
- Display string for Point struct.
Previously, it would cause infinite looping when iterating a value downwards, as the code relied on underflow logic to eventually return true in comparisons. With unsigned numbers, that would never occur.
Specifically, some ROMs iterate the TLB index down and used a BGEZ opcode.
- Added SDL video output.
- Send VI interrupts when the currently scanned line hits the interrupt register's.
- Added some program options related to video.
- Manually restore execute bit on Unix.
- Use full paths everywhere instead of relying on current working directory.
- Less early returns on update operations.
- Formatting.