Commit graph

2672 commits

Author SHA1 Message Date
Bobby Smiles
84075792b1 Extract get_dma_duration. 2015-02-08 15:11:34 +01:00
Bobby Smiles
41203bd93e Extract get_remaining_dma_length function. 2015-02-08 15:11:34 +01:00
Bobby Smiles
3acd299642 Move RDRAM size detection hack in a separate module. 2015-02-08 15:04:56 +01:00
Bobby Smiles
f8c0466512 Avoid usage of ConfigGetParamInt in pi_controller. 2015-02-08 15:04:56 +01:00
Nebuleon Fumika
fe6283f849 recomp.c: Delete prefetch_opcode, formerly used by the Pure Interpreter 2015-02-08 07:44:41 +00:00
Nebuleon Fumika
cd682e9e36 reset.c: Delete a comment suggesting a risky micro-optimisation
reset_hard is not called that often, so it is not that important to
save cycles with an optimisation that could, as the comment seemed to
imply, cause a memory leak.
2015-02-08 06:57:32 +00:00
Nebuleon Fumika
a22c424723 recomp.c: Remove Pure Interpreter checks
This commit cleans up checks like the following in recomp.c:

  if (r4300emu != CORE_PURE_INTERPRETER && ...)

which became unreachable after the Pure Interpreter got its own opcode
dispatcher instead of forwarding everything to the Cached Interpreter.
2015-02-08 06:40:45 +00:00
Nebuleon Fumika
851c130832 Decouple the Pure Interpreter from the Cached Interpreter
This commit gives the Pure Interpreter its own opcode dispatcher. It
uses a switch statement to parse major and minor opcodes, then uses an
opcode's fields to kill writes to integer register 0, and gives whole
opcodes to interpreter functions for them to figure out what to do.

MFC0, MTC0, J, JAL, JALR, and the integer memory access instructions,
L* and S*, still used members of the Cached Interpreter's pre-parsed
instruction structure via 'PC->...'. They have been replaced with the
macros in macros.h (irt, rrd...), which the Pure Interpreter now uses
to parse opcode fields.

The new dispatcher decodes one opcode ahead only if the active opcode
is a jump with a delay slot. It also correctly handles killing jumps
that target themselves with a NOP (binary all-zeroes) in their delay
slots.
2015-02-08 03:44:23 +00:00
Richard Goedeken
f0118aa8ad Merge pull request #68 from bsmiles32/interrupt_refactorings
Interrupt refactorings
2015-02-07 18:49:55 -08:00
Bobby Smiles
dc620df2b4 Some minor additional cleaning.
- Just moving stuff
- Removing unused headers
2015-02-07 22:28:50 +01:00
Bobby Smiles
0a52fa7607 Extract rdp_interrupt_event and move it into rdp_core module. 2015-02-07 22:28:50 +01:00
Bobby Smiles
d6de9f5886 Extract rsp_interrupt_event and move it into rsp_core module. 2015-02-07 22:28:50 +01:00
Bobby Smiles
f9308adc19 Extract vi_vertical_interrupt_event and move it into vi_controller module.
- move related variables into vi_controller structure
- move gameshark vi_counter to main module.
2015-02-07 22:28:50 +01:00
Bobby Smiles
fef83c2399 Extract ai_end_of_dma_event and move it into ai_controller module. 2015-02-07 22:28:50 +01:00
Bobby Smiles
ac32b9a50c Extract pi_end_of_dma_event and move it into pi module. 2015-02-07 22:28:50 +01:00
Bobby Smiles
935900a73a Extract si_end_of_dma and move it in si_controller module. 2015-02-07 22:28:50 +01:00
Bobby Smiles
c1ad0d14a9 Avoid usage of get_event for ai_int_handler. 2015-02-07 22:28:50 +01:00
Bobby Smiles
812206fb07 Move special case outside of remove_interupt function. 2015-02-07 22:28:50 +01:00
Bobby Smiles
df6a0b3967 Extract main_check_inputs. 2015-02-07 22:28:50 +01:00
Bobby Smiles
dfa8d099d0 Extract raise_*_interrupt functions. 2015-02-07 22:28:50 +01:00
Bobby Smiles
fce823dd0e Extract *_int_handlers. 2015-02-07 22:28:50 +01:00
Bobby Smiles
0dbbabd382 Extract wrapped_exception_general. 2015-02-07 22:28:50 +01:00
Bobby Smiles
6be21caebc Introduce {signal,clear}_rcp_interrupt functions. 2015-02-07 22:28:50 +01:00
Richard Goedeken
7117fe1081 Merge pull request #67 from gizmo98/testing2
Raspberry Pi fix and ARM NEON/VFP_HARD cleanup
2015-02-07 10:27:12 -08:00
Richard Goedeken
87087083b5 Merge pull request #65 from bsmiles32/si_refactorings
Si refactorings
2015-02-07 09:54:12 -08:00
Richard Goedeken
0e0a397268 fix build errors for OSX build with NEW_DYNAREC=1 2015-02-07 08:43:28 -08:00
Bobby Smiles
561f8e2e0e Rename confusing method name (touch -> save). 2015-02-07 09:21:55 +01:00
Bobby Smiles
c3eda20427 Flush save chip content immediately instead of at file closing.
Due to concerns about possible data loss, saved data should be flushed
as soon as reasonably possible.
2015-02-07 09:21:55 +01:00
Bobby Smiles
07379d8bac Refactor eeprom module to avoid dependency on ROM_SETTINGS. 2015-02-07 09:21:55 +01:00
Bobby Smiles
e5760d85bc Refactor mempak and rumble pak read write functions. 2015-02-07 09:21:55 +01:00
Bobby Smiles
769465443f Move FLA file handling out of PI subsystem.
File accesses are now made only at the beginning/end of emulation.
2015-02-07 09:21:55 +01:00
Bobby Smiles
9f08b7b02b Move SRA file handling out of PI subsystem.
File accesses are now made only at the beginning/end of emulation.
2015-02-07 09:21:55 +01:00
Bobby Smiles
6ac24239a2 Move EEP file handling out of SI subsystem.
File accesses are now made only at the beginning/end of emulation.
2015-02-07 09:21:55 +01:00
Bobby Smiles
55166ef274 Isolate game_controller and rumblepak emulation from input plugin.
This should allow for some flexibility in the choice of the controller
input and rumble output.
For now, we keep the old behavior and use the input plugin, but other
input source and rumble sink could be considered.
We hardcode te connection in the core, but ultimately,
the choice of an external controller/rumble should be the responsibilty
of the frontend.
2015-02-07 09:21:55 +01:00
Bobby Smiles
7a0f0081cc Move MPK file handling out of SI subsystem.
File accesses are now made only at the beginning/end of emulation.
2015-02-07 09:21:55 +01:00
Bobby Smiles
8f7ee083ac Move AF_RTC time source out of SI subsystem.
This should allow for some flexibility in the choice of a time source.
For now, we keep the old behavior and use the C localtime, but other
time source could be considered.
Furthermore, we hardcode the connection in the core, but ultimately,
the choice of an external time source should be the responsibility of
the frontend.
2015-02-07 09:21:55 +01:00
Richard Goedeken
44f1424898 Merge pull request #62 from bsmiles32/cenification_part1
Cenification part1
2015-02-06 22:45:31 -08:00
gizmo98
ff7389864e Makefile: Use -DARMv5_ONLY if HOST_CPU is armv6 or armv5
This is necessary to compile for raspberry pi.
2015-02-05 21:05:26 +01:00
gizmo98
5bae269c7b Makefile: Remove unnecessary -DVFP_HARD and -DNEON 2015-02-05 21:02:43 +01:00
gizmo98
d38fc7344a linkage_arm.S: Use gcc macros instead of MAKEFILE defines 2015-02-05 21:00:46 +01:00
Dorian Fevrier
729b745c36 Merge pull request #66 from gizmo98/fix
Fix VFP_HARD=1 compilation error, add Raspberry PIs Videocore IV GPU as an option and fix non reachable HAVE_GLES/OSD path.
2015-02-03 22:53:22 -05:00
gizmo98
d1ddc9d111 Makefile: Fix not reachable options.
Line 283 is not reachable because OSD is disabled if USE_GLES is set.
2015-02-03 18:38:18 +01:00
gizmo98
15c2e2e951 Makefile: Add VC option
Add an option for Raspberry Pis Videocore IV GLES2 implementation.
2015-02-03 17:45:53 +01:00
gizmo98
cd2902cd60 Makefile: Add VFP_HARD define
So linkage_arm.S will work if VFP_HARD is set.
2015-02-03 17:38:25 +01:00
gizmo98
2c6b05c0f8 linkage_arm.S: Add VFP_HARD compatibility
Otherwise there will be a compiler error if VFP_HARD=1 is set.
2015-02-03 17:36:27 +01:00
Richard Goedeken
40d0399900 Merge pull request #64 from Nebuleon/build-changes
Add a MIPS support stanza for the Unix Makefile
2015-02-01 14:33:42 -08:00
Dorian Fevrier
c536bb053c Merge pull request #63 from littleguy77/master
Fix bug in framelimiter.
2015-01-28 10:22:31 -05:00
Dorian Fevrier
1679333e26 Merge pull request #61 from gizmo98/patch-1
Makefile: Add VFP hardfloat as an option
2015-01-26 14:14:07 -05:00
gizmo98
f314fc9049 Rename VFP -> VFP_HARD and add documentation. 2015-01-26 20:03:31 +01:00
Nebuleon Fumika
66651989d3 unix: Add a Makefile configuration for MIPS 2015-01-26 10:13:28 +00:00