Commit graph

736 commits

Author SHA1 Message Date
Tyler J. Stachecki
2bc82052c3 Change default visibility to hidden, expose entrypoint.
If we restrict the number of entrypoints to limit the scope
of what can be called from outside the .so, the compiler can
generate more optimized code.
2016-09-04 09:21:36 -04:00
Tyler J. Stachecki
1e8c169d4f Build a .so version of CEN64. 2016-09-04 09:16:05 -04:00
Jason
1c518539c2 Add note about debugger not existing 2016-08-31 21:45:04 -04:00
Jason
6cd0777286 Fix -debug argument parsing 2016-08-31 21:44:58 -04:00
Mike Ryan
36a4a6fdfa dd: identify IPL and add support for all known dumped IPLs
This also fixes a regression introduced in 3900be4 that prevented the DD
IPL from booting.
2016-08-31 18:33:15 -07:00
Tyler J. Stachecki
156d592abb rsp: Bugfix for SSE2 RSP.
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).
2016-08-06 20:53:04 -04:00
Tyler J. Stachecki
3900be4776 bus: Perform open bus reads for unmapped addresses.
Fixes F-Zero X (cartridge version).
2016-07-17 20:47:07 -04:00
Tyler J. Stachecki
d8f264eb09 vi: Make VI emulation less bad.
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).
2016-07-17 20:14:01 -04:00
Tyler J. Stachecki
304d711414 ai: Fix regression in previous commit. 2016-07-10 15:39:42 -04:00
Tyler J. Stachecki
5f5a0005a6 ai: Revamp the audio system.
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.
2016-07-10 14:23:20 -04:00
Tyler Stachecki
b808fe50e0 rsp: Qualify shuffle arrays as static. 2016-07-09 20:00:33 -04:00
Tyler Stachecki
1e86268eee rsp: Fix SQV and SRV (more endianness issues). 2016-07-09 19:38:26 -04:00
Tyler Stachecki
ab2c932aaf rsp: Fix SP->RDRAM stride bug.
krom spotted this one using his upcoming GB emulator.
2016-07-09 19:01:45 -04:00
Tyler Stachecki
55e64a6c27 rsp: Fix LRV bug (data shifting problem).
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.
2016-07-09 17:49:03 -04:00
Tyler Stachecki
1e47020ccc rsp: Fix LQV bug (related to endianness). 2016-07-09 16:24:40 -04:00
Tyler Stachecki
1e20e171a8 rsp: Fix LPV bug (more endianness issues). 2016-07-09 16:17:36 -04:00
Tyler Stachecki
cae6b6de78 rsp: Fix LBV bug (related to endianness). 2016-07-09 16:14:27 -04:00
Tyler Stachecki
6d3cd1e0d0 rsp: Fix link PC result (12th bit should not get set). 2016-07-09 13:30:05 -04:00
Tyler J. Stachecki
5a21c4c7d5 vr4300: Fix a major TLB bug.
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.
2016-07-09 14:49:59 -04:00
Tyler J. Stachecki
a12c5a3e04 vr4300: Fix a bug in (D) Index Load Tag.
The VALID and DIRTY bits were not being shifted into the
proper positions after reading them from the line states.
2016-07-09 12:39:45 -04:00
Tyler J. Stachecki
9886ec2587 vr4300: Fix a (fairly serious) cache bug.
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.
2016-07-09 12:12:15 -04:00
Tyler J. Stachecki
c85def363c Fix a bug in the recent CTC2 impl. 2016-06-30 10:05:11 -04:00
Tyler Stachecki
91b18f2644 rsp: Implement CTC2. 2016-06-29 21:38:25 -04:00
Tyler J. Stachecki
91926630e8 Fix non-Windows builds. 2016-06-29 20:21:31 -04:00
Tyler J. Stachecki
c1d381e729 Last MSVC build fix.
With this, MSVC builds should now work.
2016-06-26 17:38:52 -04:00
Tyler J. Stachecki
9492bba954 Another MSVC build fix. 2016-06-26 17:23:48 -04:00
Tyler J. Stachecki
ec475c6874 openal: Kill audio if ai_init fails. 2016-06-26 17:20:32 -04:00
Tyler J. Stachecki
ed08c028e5 sha1: MSVC is braindead, so help it out a little. 2016-06-26 17:20:25 -04:00
Tyler J. Stachecki
322ac0c934 Another fix for MSVC builds. 2016-06-26 17:20:20 -04:00
Tyler J. Stachecki
3288229a50 Start fixing MSVC builds.
Conflicts:
	rdp/n64video.c
2016-06-26 17:19:17 -04:00
Tyler J. Stachecki
8415caf9ad RDP fixes. Wonder how long these have been there? 2016-06-26 12:20:29 -04:00
Tyler J. Stachecki
51b83257f7 Remove unused cen64_context_* calls.
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
2016-06-22 09:15:10 -04:00
Mike Ryan
406b080fd1 multithread: stop all threads from running when window is closed
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
2016-06-19 09:56:24 -07:00
Mike Ryan
0d087a054e cmake: remove build system dependency on GNU as 2016-06-19 08:55:53 -07:00
Tyler J. Stachecki
61afc41641 Ignore DP freeze setting.
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.
2016-06-19 10:24:42 -04:00
Mike Ryan
7068720b25 si: return PIF error when controller not present
Closes #38
2016-06-17 17:07:11 -07:00
Tyler Stachecki
9f5f3c2e75 Compile n64video.c with -fno-strict-aliasing.
Lots of violations to the strict aliasing rule throughout.
2016-06-17 05:43:41 -04:00
Tyler Stachecki
0c41dc33dc Upgrade to angrylion r98.
r97 was VI filter related and r98 just adds MSVC solution files,
so this commit is really just for posterity more than anything.
2016-06-17 05:31:19 -04:00
Tyler J. Stachecki
cc07dad626 angrylion-rdp: Upgrade from r83 to r96.
Patch courtesy of Snowstorm64; thank you.

Conflicts:
	rdp/n64video.c
2016-06-17 05:11:27 -04:00
Tyler Stachecki
8ce013b165 Fix RDP RDRAM access range on Linux. 2016-06-17 05:07:25 -04:00
Tyler Stachecki
154343bdea Commit latest fork of angrylion/MAME RDP.
Conflicts:
	device/device.c
2016-06-17 05:06:34 -04:00
Mike Ryan
73f4420a4c fix all build warnings, does not affect functionality 2016-06-16 20:40:51 -07:00
Mike Ryan
1d41bb8808 membus: remove duplicated instance of si
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.
2016-06-14 21:39:28 -07:00
Simon Eriksson
802556002e Added region field in cart DB.
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.
2016-04-03 11:12:31 -04:00
Tyler J. Stachecki
bb41f7208e Implement mapped SRAM accesses. 2016-03-20 15:18:17 -04:00
Tyler Stachecki
f7df75babc Merge pull request #40 from exhalatio/cart_db
Add Save list entry in the cart DB.
2016-03-19 16:03:12 -04:00
Tyler J. Stachecki
d905183b11 izy removed the LUT from bitwise operations.
In addition to removal of all memory accesses from the
functions, these functions also result in fewer executed
instructions in some cases.
2016-03-16 22:59:22 -04:00
exhalatio
852f6cea24 Add Save list entry in the cart DB. 2016-03-16 12:04:32 +09:00
Simon Eriksson
8d17792969 Minor fix to description in cart DB.
Majora's Mask has the same ID in all regions.
2016-03-12 16:20:56 -05:00
Simon Eriksson
1b33cffa9c Add description field in the cart DB.
This description is printed along with the ID when a cart is detected.
Also includes a fix to a bug in the cart DB verification function.
2016-03-06 13:56:19 -05:00