Commit graph

1101 commits

Author SHA1 Message Date
Zapeth
4acc1f83e9 Fix compile errors when using the upstream scripts
Not really a fix, just additional ifdefs to use the correct pointer
names for each case.
A proper fix would be to change the names in mupen64 api to fit the
upstream names or vice versa (considering the names I'd suggest the
former)
2018-08-19 14:45:54 +02:00
Zapeth
47e93c42c6 Fix 'sizeof incomplete type' compile error
Not really a fix, but its done the same way in upstream for analog
uses.
Alternatively one could specify the size in the forward declaration of
the config object (in su.h)
2018-08-19 14:31:54 +02:00
Zapeth
5b17225175 Merge branch 'master' of https://github.com/cxd4/rsp 2018-08-19 14:20:38 +02:00
Richard Goedeken
6fa063ce77
Merge pull request #41 from loganmc10/patch-7
Indi and Naboo now have an HLE implementation
2018-05-26 08:30:35 -07:00
Logan
f2f84aa03a
Indi and Naboo now have an HLE implementation 2018-05-26 07:47:12 -06:00
Joseph Mattiello
54214ced69 Remove system() call for iOS and tvOS 2018-04-16 23:11:08 +02:00
Iconoclast
f74f987b55 carried over missing DMA max address estimation to the fix-up loop
This fixes reserved RDP and CPU op-codes in Zelda MM due to wrong RDRAM address limitation calculations from the RSP.  _WIN32 builds were not affected by this issue (due to the preprocessor disabling the analysis) and thus remain unaffected by this commit.
2018-03-22 03:16:17 -04:00
Iconoclast
11176630e1 Don't diagnose tasks sent from CIC boot code by type. 2018-03-21 17:48:02 -04:00
Iconoclast
d0454d86c6 Disable signal-catching on _WIN32 since Project64's SEH clashes with it. 2018-03-19 00:33:50 -04:00
Iconoclast
a234e98013 fixed WIN32 compile error with empty default: switch label 2018-03-18 23:28:31 -04:00
Iconoclast
cecd9976e8 optimized _mm_cmplt_epu16() composite
method A:  #define _mm_cmplt_epu16(m, n) _mm_cmpgt_epu16(n, m)
define  _mm_cmpgt_epu16(m, n) _mm_andnot_si128(\
    _mm_cmpeq_epi16(m, n), _mm_cmple_epu16(n, m)\
)
define  _mm_cmple_epu16(m, n) _mm_cmpeq_epi16(\
    _mm_subs_epu16(m, n), _mm_setzero_si128()
)
multiply.o:  3,524 bytes; multiply.s:  9,883 bytes

method B:  #define _mm_cmplt_epu16(m, n) _mm_cmplt_epi16(\
    _mm_xor_si128(m, _mm_setmin_epi16()), _mm_xor_si128(n, _mm_setmin_epi16())\
)
define  _mm_setmin_epi16() _mm_slli_epi16(_mm_allones_si128(), 15)
multiply.o:  3,504 bytes; multiply.s:  9,732 bytes
2018-03-18 20:57:51 -04:00
Iconoclast
ec3b55b48b syntactical nits 2018-03-18 18:47:07 -04:00
Iconoclast
8857d37876 Count loop iterations with unsigned int, not int.
Although functionally there is no difference (when just looping vector elements from 0 to 7) between using a signed int or an unsigned int, repeatedly seeing an inconsistent mix in usage between the two across different vector functions has been an ongoing distraction for years.  It should be the same everywhere, and between signed int and unsigned int, unsigned int is the type which always fits within size_t from stddef.h, the safe type for memory pointers and dereference indices.
2018-03-18 18:19:02 -04:00
Iconoclast
b2fd3d356a Compile with -Wstrict-overflow=1, not =5.
When disabling ARCH_MIN_SSE2, the ANSI code path triggers several untraceable warnings that are nonsense (like integer union members giving warnings about pointer overflow).  GCC purportedly has raised false positives with the overflow detection setting this high.  Since it cannot give reliable reports in the ANSI code path for this RSP plugin (which does very little with what are actually pointers anyway in the vector unit), the level has been lowered down to 1.
2018-03-18 17:57:26 -04:00
Iconoclast
0e27d9fd78 Stop passing --statistics to GAS. 2018-03-18 17:40:31 -04:00
Iconoclast
af06eddbdd fixed paste fail 2018-03-18 17:39:35 -04:00
Iconoclast
226e7ef26e fixed [LS]WC2 sign mismatch warning #ifndef ARCH_MIN_SSE2 2018-03-18 17:37:37 -04:00
Iconoclast
81c6bd1652 optimized MAC overflow carry when subtracting by -1 2018-03-18 17:15:29 -04:00
Iconoclast
b9e6b43ce5 vectorized VMACU
vmacu_old.asm function has 99 instructions.

vmacu_new.asm function has 50 instructions.
2018-03-18 10:28:13 -04:00
Iconoclast
cc4a5bb619 vectorized VMACF
New VMACF with manually written SSE2 is 45 instructions.

Old VMACF with auto-vectorized C code was 91 instructions.
2018-03-17 21:56:20 -04:00
Iconoclast
c49c767b2c We don't care about the details of reserved ops.
Tracing the operands of an invalid LWC2 or SWC2 operation was just done to solve unused parameter warnings, which can be dodged without having to hack out a custom sprintf() replacement in the process.
2018-03-17 16:21:49 -04:00
Iconoclast
e1735b7131 Segregate bit-wise SP_STATUS_REG sets after clears.
This obfuscates the readable documentation of the SP_STATUS_REG bit resolutions in exchange for making it obvious how the bit patterns could be optimized (i.e., do all clears in one static operation and all sets in the next).  As said optimization would result in further obfuscation in exchange for micro-optimizing an infrequent scalar unit system control command, said optimization will not be done in this file.
2018-03-17 14:25:50 -04:00
Iconoclast
2c9f98a8d4 Allocate register files with enumerations, not macros. 2018-03-17 13:56:18 -04:00
Iconoclast
7da2a30f47 cleaned up DllMain() 2018-03-17 13:21:15 -04:00
Iconoclast
d4027c2866 Diagnose unrecognized task types. 2018-03-17 12:56:52 -04:00
Iconoclast
a9670d1e0e Infer available RDRAM allocated by emulator. 2018-03-17 12:28:31 -04:00
Iconoclast
57b19c61f8 added option for convenient LTO substitution 2018-03-16 23:56:06 -04:00
Iconoclast
fc808c42ea Control optimization level on a per-translation-unit basis. 2018-03-16 23:25:19 -04:00
Iconoclast
ddf06ef22b -lc
Explicitly linking in a dependency to libc allows us to analyze the dependency chain of rsp.so with `ldd ./rsp.so`.  Without the C library linked in, the shared object will be reported falsely as "statically linked".
2018-03-16 23:05:51 -04:00
Iconoclast
01b4e603ae That made no sense. 2018-03-16 23:04:53 -04:00
Iconoclast
2b0585acfc Turn ECHO on for translation unit compiles only. 2018-03-16 22:07:40 -04:00
Iconoclast
7bb9ed7ea6 Use C standard calls even for the Windows build.
The original decision to use custom-tailored versions of the C standard
library functions for the Windows build came from a number of
issues--most of which turn out to be not applicable to a Windows DLL
module extension (in which no executable entry point is required).

Since most non-Visual-Studio build suites for Windows will use the
standard, universally available MSVCRT.DLL for linkage, no compatibility
issues can arise from switching the code back to use standard C calls
for _WIN32 builds (provided the calls and usages conform to ANSI C89 and
do not involve forwards-compatibility with other newer extensions to the
C language added in MSVCR80.DLL, MSVCR90.DLL and so forth).

Visual Studio itself, however, chooses to disallow targeting use of
MSVCRT.DLL because Microsoft changes the C language implementation
details of that file while promising the availability of certain
extensions and non-ANSI features available with fixed-version CRTS.
Therefore, if building with Visual Studio, this commit will cause a
dependency on some numbered version of Microsoft's CRT instead of the
standard MSVCRT.DLL.

Note that this issue is negligible due to the fact that MSVC cannot be
recommended for compiling an optimized interpreter code base (not
limited to the example of this plugin).

To test with MSVC anyway, either a) have the CRT framework package
installed to system upgrades (knowing end users the plugin is shared
with may not have this), b) use an older version of Visual Studio to
build, c) statically link the CRT dependency with /MT, d) use the
portable DDK suite containing MSVC outside of Visual Studio to continue
using MSVCRT.DLL, e) temporarily revert this commit to increase DLL file
size by using static linkage of the custom CRT functions removed by this
commit.

Another problem was the fact that MinGW GCC always links in CRT startup
code, even to DLLs for which no entry point needs to exist, and this
startup code depends on -lmingwex which adds a bit of custom message
crap to the binaries.  The obvious workaround for this (as obvious as
knowing to do it for DLLs) in the case of an EXE was obfuscated by the
fact that MinGW maintains an arbitrary design choice that calls __main
from inside main instead of in the startup code.  This side effect is
fixed by using preprocessor checks to wrap around a dummy __main symbol
in the entry point translation unit's source file.
2018-03-16 20:35:12 -04:00
Iconoclast
5db7b38052 fixed CHDIR failures when GCC is on another drive
If MinGW is installed to:
E:\MinGW\

...and the current directory is:
C:\Users\me\rsp\

Then `cd E:\MinGW\bin` is a null operation when the -D argument isn't
passed.
2018-03-16 15:51:33 -04:00
Iconoclast
81ac552540 Distinguish between Unix paths /lib/ and /lib64/. 2018-03-16 15:38:12 -04:00
Iconoclast
b29a6ae7dd cleaned up Windows command shell build scripts 2018-03-16 00:04:51 -04:00
Iconoclast
ddb779ce75 Avoid the %version% headache by targeting MSYS2. 2018-03-15 23:03:09 -04:00
Iconoclast
3ddfcf7eda -lkernel32 2018-03-15 22:19:05 -04:00
Richard Goedeken
fa9e4808e7
Merge pull request #38 from loganmc10/patch-6
Remove WDC and Stunt Racer from LLE list
2018-02-12 08:15:10 -08:00
Logan
72d5a04bbe
Remove WDC and Stunt Racer from LLE list 2018-02-12 06:11:02 -07:00
Anthony J. Bentley
ce18935a77 Update homepage. 2018-01-01 17:47:14 +01:00
Anthony J. Bentley
325b7adea8 Update link to bug tracker. 2018-01-01 17:47:14 +01:00
Richard Goedeken
066ca8fb5c
Merge pull request #35 from loganmc10/patch-5
Don't set MI_INTR_SP if task is not finished yet
2017-12-15 18:14:32 -08:00
Logan
d72401322f
Don't set MI_INTR_SP if task is not finished yet 2017-12-14 12:38:43 -07:00
Richard Goedeken
69837952f9
Merge pull request #34 from loganmc10/patch-4
If DEBUG not set, set NDEBUG
2017-11-30 19:36:47 -08:00
Logan
3a1e693979
If DEBUG not set, set NDEBUG 2017-11-30 10:58:54 -07:00
Richard Goedeken
818a0633b7
Merge pull request #32 from StenApp/patch-1
Update Makefile
2017-11-27 18:02:21 -08:00
Sten
a1976dc474
Update Makefile 2017-11-20 20:59:19 +01:00
Richard Goedeken
c2e23a1f32
Merge pull request #31 from charlemagnelasse/travis-mxe
Build MXE targets as additional tests in travis build matrix
2017-11-08 20:06:37 -08:00
Charlemagne Lasse
05412026e7 Build MXE targets as additional tests in travis build matrix 2017-11-05 15:35:03 +01:00
Richard Goedeken
052129f454 Merge pull request #30 from loganmc10/patch-3
Gauntlet Legends works in HLE
2017-10-24 16:34:35 -07:00