simer/sp1187 pointed out that undefined CP0 registers all
share a common value (that is, a write to any undefined CP0
register effectively acts as a write to *all* undefined CP0
registers).
This commit implements the specified behaviour.
Thanks to Tiny Tiger and AIO for helping to point this out.
One of the arguments was being overwritten before it was
used, which caused an issue with the SSE2 codepath (while
the SSE4.1 one was fine).
Somewhere in the world, somebody with more knowledge than
I is probably screaming about how wrong this NTSC signal
stuff is, but it's at least less worse than what was there
before!
The way interlaced signals are handled is still VERY wrong
(I need to swizzle in the lines from each field before
shipping a framebuffer off to the GPU).
That being said, some ROMs like LaC fire demo and one of
SonCrap's demos look correct now (there is no flickering).
This is sloppy patchwork, but it's better sloppy patchwork
than the previous sloppy patchwork! Will need to resample
the audio and work with flucutations in subframe timing to
solve the rest of the popping.
tl;dr: Using LUTs to shift and byteswap all in one x86
instruction is awesome for performance, but makes things
absolutely horrendous to debug.
With this commit, audio mixing on the RSP works properly.
I seriously screwed up the TLB lookup logic so bad that
only the first 8 TLB entries were being probed. Fix that.
This fixes (at least) Paper Mario and Mario Tennis.
The action taken for (D) Index_Write_Back_Invalidate was
wrong. As it turns out, the VR4300 manual has an extremely
serious typo in the operation section.
According to the manual, this cache operation should use
the virtual address to index a block (line) in the cache.
If that line is not in the INVALID state, it should be
unconditionally flushed out to memory and the line should
then be invalidated.
The hardware, however, seems to only write back the block
(line) in the event that the line is VALID and DIRTY. It
does, however, invalidate the line regardless of whether
or not the line was DIRTY. That is to say, CLEAN lines get
invalidated as well.
This commit fixes the erroneous behavior.
Originally these functions were intended to workaround
problems experienced by RSP vector register caching,
but we don't use it anymore so we can just nix them.
Fixes#41
Add a "running" boolean to the master device struct, and set it to false
when the main window is closed. All the tight inner while (1) loops now
become while (running).
Closes#24
Thanks to simer and Happy for pointing out something that
also cropped up in MAME: http://forums.bannister.org/
ubbthreads.php?ubb=showflat&Number=94626#Post94626
This hack fixes Banjo-Kazooie.
Fixes a bug introduced in a4f0d72. read_pif_rom and read_pif_ram were
replaced with a unified read_pif_rom_and_ram, but the excess si instance
remained in the instance mapping.
This field is required in order to distinguish between regional
versions where the game ID is the same but the save type differ,
such as the Castlevania games.
Also added more Japanese-specific game IDs and edited some descriptions.