Commit graph

380 commits

Author SHA1 Message Date
Logan McNaughton
d4799392bb Get rid of USE_SDL flag 2017-10-28 09:21:26 -06:00
Gillou68310
eb4cab169b new_dynarec: Fix https://github.com/mupen64plus/mupen64plus-core/issues/385 2017-10-21 09:19:08 +02:00
Bobby Smiles
273ae923d8 Move cart_rom, flashram and sram into cart module. 2017-10-19 14:26:50 +02:00
Bobby Smiles
6dc0c760c3 Fix msvc project file. 2017-10-14 03:20:41 +02:00
Bobby Smiles
8682a7ce8b Separate interfaces from mutable state in all backends.
Also
* Move backends implementations under backends directory.
* Rework file_storage to be a real implementation of storage_backend.
* Fixup PIF_PDT_EEPROM types
* Extract joybus stuff from pif module.
* Extract cart stuff from pif module.
* Extract controllers and paks from si module.
2017-10-14 03:20:41 +02:00
Conn O'Griofa
ba45a51fcb Raspberry Pi: use new vendor library names 2017-10-07 08:07:45 +01:00
Bobby Smiles
752a7354b2 Rewrite PIF emulation.
Main changes in this partial rewrite are:
- channel processing is done in 2 separate steps. First is the channel
setup done when 0x1 is written in the "pif status byte". The second step
is the effective channel processing which allow each channel device to
answer. This step is done just before DMA reads. This is in accordance
with Patent 6394905. (Fig5B - Pif Macro). This allowed to greatly
simplify pif channel processing (no more strange bytes to parse in pif
ram and no duplicated code for that).
- "pif status byte" is treated as a bitfield with each flag indicating
which action to take.
- command processing interface has been reworked to separate the
transmitted data (Tx,TxBuf) from the the received data (Rx, RxBuf).
- reworked the code to allow custom pif channel processing
callback. This should allow to implement "raw" processor to let an
external device (such as a Raphnet controller) do the channel
processing.
- Validate pif commands
- Fixed eeprom write command which missed the status byte.
- Updated the controller input backend to split pak detection from
controller connection test.
- Consolidated all input plugin compatibility code inside one module
(eg. controller_input, rumble and pif processings functions).
- Added PIF channel printing debug
2017-09-15 04:46:15 +02:00
Logan McNaughton
36fb170b09 Switch from adler32 to xxHash 2017-09-13 10:28:47 -06:00
comex
214a142fda Nevermind, that doesn't actually work. Use strings instead. 2017-06-26 16:38:43 +02:00
comex
986cf30c90 Fix asm_defines w/ mawk by setting LANG=C 2017-06-26 05:46:55 -04:00
Bobby Smiles
7f1c22a6cb Revert "Allow using compiler other than gcc"
This reverts commit c6506eccc4.
2017-06-24 13:34:06 -06:00
bsmiles32
949625d965 Merge branch 'master' into mac-fixes 2017-06-22 20:24:05 -06:00
Logan McNaughton
c6506eccc4 Allow using compiler other than gcc 2017-06-20 21:13:13 -06:00
bsmiles32
85fae8b1aa Merge branch 'master' into mac-fixes 2017-06-02 08:01:50 -06:00
Gillou68310
cc735030d2 new_dynarec: Rework x86 readstub and writestub functions 2017-05-30 04:41:53 +02:00
comex
8b82dc6a57 Makefile fixes:
- Explicitly name asm_defines_gas.h and asm_defines_nasm.h rather than
using a wildcard rule: otherwise make automatically deletes the latter
after the build is complete(!?) - see [1].

- Add missing dependency of the awk rule on ../../tools/gen_asm_defines.awk.

[1]
https://www.gnu.org/software/make/manual/html_node/Chained-Rules.html
2017-05-28 17:07:22 -04:00
comex
7b6ffc26a2 Change how asm_defines works to fix Mac build.
This didn't work correctly for two reasons:
- The symbols were being marked as undefined (imported) rather than
exported.  I could fix that by adding an initializer (= {0}), but then
the binary gets huge; not sure if there's a way around that.
- Mach-O binaries don't store symbol sizes.  You can get nm to try to
calculate them with --size-sort, but I'm not sure if this will always
output the correct result.

In lieu of more complicated platform-specific fixes, I switched to an
approach that renders the value as hex, allowing the object file to be
piped directly to awk on all platforms.
2017-05-28 17:02:05 -04:00
comex
3d36c05562 Minor Mac build fixes:
- Fix BITS=32 build (-Wl,-m,elf_i386 obviously doesn't work, and -m32
isn't needed since another part adds '-arch i686' to CFLAGS).

- Change -bundle to -dynamiclib.  (-bundle has been effectively
deprecated altogether since the early days of OS X, and was never the
right setting for .dylib files.)

- Only pass '-read_only_relocs suppress' on 32-bit.  On x86-64 this flag
just emits a warning saying that it has no effect, and evidently isn't
necessary.  (On 32-bit x86 it enables text relocations, which are used
by some of the asm stuff.)
2017-05-28 16:59:57 -04:00
Bobby Smiles
c2d7d36072 Merge dynarec instructions generations into a single file.
Also does proper formatting and adopt same function order than
mips_interpreter.def
2017-04-01 12:09:58 +02:00
Bobby Smiles
fa16256452 Merge def files into mips_instructions.def file.
Also reorder instructions to better regroup similar functions
and clean formattings.
2017-03-27 12:20:49 +02:00
Gillou68310
bc6cfdb259 new_dynarec: Fix crash during shutdown 2017-03-24 12:14:39 +01:00
Bobby Smiles
efdeaf32c7 Fix interrupt spelling.
s/interupt/interrupt/
2017-03-07 06:17:04 +01:00
Richard Goedeken
72f29082d9 fix up makefile 2017-02-17 22:25:56 -08:00
Richard Goedeken
29cd4baba9 fix build error 2017-02-17 22:03:46 -08:00
Richard Goedeken
ee6c28d40e Merge branch 'master' into dyna_start 2017-02-17 21:14:30 -08:00
Gillou68310
3e5bd0f848 Add PIC support for x86 dyna_start.asm 2017-02-16 10:39:54 +01:00
Bobby Smiles
3e39fed4c6 Add support for transferpak and gameboy cartridges
NoMBC, MBC1, MBC3 and MBC5 should be mostly supported.
2017-02-15 13:58:54 +01:00
Gillou68310
0d1db707a5 Moved main/asm_defines.c to asm_defines/asm_defines.c 2017-02-13 18:11:42 +01:00
Gillou68310
974ebd9cff Add awk script to generate asm defines 2017-02-11 19:25:10 +01:00
Gillou68310
e5f78849c8 Use dyna_start.asm for x86 2017-02-09 16:28:52 +01:00
Gillou68310
0884dfb750 Use dyna_start.asm for both x86_64 and win64 2017-02-09 15:27:28 +01:00
Gillou68310
49fbba8a45 Fix VS2013 project file 2017-02-05 19:21:50 +01:00
Bobby Smiles
00169f327b Remove r4300 files. Move functions to r4300_core. 2017-02-02 17:27:53 +01:00
Bobby Smiles
f0bce899f4 Remove reset file. Move its functions in device and interrupt files. 2017-02-02 17:27:53 +01:00
Bobby Smiles
72f2295bab Rename storage_file to file_storage.
It seems to better convey the idea of implementing the storage_backend,
without being too similar (one has _storage prefix, the other has t as suffix).
2017-02-02 17:27:53 +01:00
Bobby Smiles
bde29a8e1d Rework clock backend. 2017-02-02 17:26:00 +01:00
Bobby Smiles
0c7d919a63 Move all device related files inside device directory. 2017-02-02 16:58:05 +01:00
Bobby Smiles
567ef04b2a Extract pifbootrom hle procedure into its own module. 2017-02-02 16:58:05 +01:00
Bobby Smiles
a443a8605b Move all device related files inside device directory. 2017-02-02 16:58:05 +01:00
Gillou68310
6661d2c943 Update VS2013 project file to build asm_defines_nasm.h as a pre-build event 2017-01-02 20:27:03 +01:00
Bobby Smiles
85e0773ba6 Use ASFLAGS to simplify include dirs 2016-12-31 15:28:23 +01:00
Bobby Smiles
19cc50b6e7 Simplify awk patterns. 2016-12-28 14:43:11 +01:00
Bobby Smiles
e3d4f353b8 Try to avoid declaration of zero sized arrays...
...which are invalid in C. (but GCC allows them as an extension).
2016-12-28 14:38:00 +01:00
Bobby Smiles
96b51bb65a Don't hardcode objdump and awk in Makefile. 2016-12-28 14:14:37 +01:00
Bobby Smiles
c777d8713a Remove left-over from previous experiment. 2016-12-26 15:43:55 +01:00
Bobby Smiles
c2b1ea7910 WIP try to find a cross plateform way of generating asm defines.
I changed the way to export offsets values to make them portable to
msvc. In theory, it could work as it doesn't rely on inline assembly
anymore. The MSVC project file has been updated with something that
could more or less give the desired output, BUT I CANNOT TEST IT.
2016-12-26 15:30:00 +01:00
Bobby Smiles
efdbc0e4c6 Tentative modification of msvc file to build asm_defines_nasm.h 2016-12-18 12:44:54 +01:00
Bobby Smiles
c0c971275b Fix dependency specification of linkage_arm.S on asm_defines_gas.h 2016-12-09 08:42:48 +01:00
Bobby Smiles
ba554ea278 Generate asm_defines compatible with gas. Use it in linkage_arm.S 2016-12-09 07:54:13 +01:00
Bobby Smiles
a3f1f8f188 Move pure_interp variables inside r4300_core.
Split recomp header to allow compilation.
2016-12-07 14:49:08 +01:00