Commit graph

337 commits

Author SHA1 Message Date
Bobby Smiles
b5472454b0 Fix top comment 2014-03-19 09:35:06 +01:00
Bobby Smiles
b82e298dbf Remove unneeded state variables. 2014-03-19 09:31:39 +01:00
Bobby Smiles
594fce4722 Use clamp_s16 where appropriate. 2014-03-19 09:16:29 +01:00
Richard Goedeken
2d28605585 Merge pull request #18 from bsmiles32/pedantic
Fix most warnings when compiling in pedantic mode.
2014-03-16 21:26:08 -07:00
Bobby Smiles
d751f58b3d Fix most warnings when compiling in pedantic mode. 2014-03-14 17:22:02 +01:00
Richard Goedeken
1dc87131f2 Merge pull request #17 from bsmiles32/wextra_fixes
Wextra fixes
2014-03-11 17:52:49 -07:00
Bobby Smiles
7d0ba23f11 Fix unused parameter warning. 2014-03-10 21:55:54 +01:00
Bobby Smiles
c2c5080c7c Fix: signed/unsigned comparison. 2014-03-10 21:21:56 +01:00
Bobby Smiles
4e82ac6f28 Fix: ignored qualifier warning from memory.h 2014-03-10 21:19:16 +01:00
Richard Goedeken
775522093f Merge pull request #16 from bsmiles32/avoid_global_state
Avoid global state
2014-03-08 22:04:33 -08:00
Bobby Smiles
0be1e551c3 Rename main to hle. 2014-03-06 21:49:30 +01:00
Bobby Smiles
d6718933db Rename plugin.h to hle_external.h 2014-03-06 21:36:51 +01:00
Bobby Smiles
4a3943a9fd Move hle_t definition inside a private header. 2014-03-06 20:41:43 +01:00
Bobby Smiles
be21b61d9a Allow to pass a user-defined object to "external" functions. 2014-03-06 10:19:01 +01:00
Bobby Smiles
9e482edcc9 Use {Verbose,Warn,Error}Message instead of DebugMessage.
By doing so, we can remove the dependency on m64p_type.h because of M64MSG_*.
Now the HLE core should be almost independant with respect to m64p plugin.
2014-03-06 10:19:01 +01:00
Bobby Smiles
0772f2cf42 Move emulator specific functions outside of hle_t. 2014-03-06 10:19:01 +01:00
Bobby Smiles
62e0ef5cfc Remove RSPINFO requirement in hle core. 2014-03-06 10:19:01 +01:00
Bobby Smiles
4a8aad9f74 Remove global mutable variables from hle core.
All global mutable variables of the HLE core were regrouped into struct hle_t.
This allow third party to reuse the HLE core, without limiting them to a single process.
All they have to do is to declare another struct hle_t and pass it to hle_execute.
For mupen64plus plugin, a global hle_t is declared and passed to hle_execute.

I would have expected a small performance hit, because of the added level of indirection,
but it doesn't seem to be really noticeable for me.
2014-03-06 10:19:00 +01:00
Richard Goedeken
92caacffe8 Merge pull request #15 from bsmiles32/ucode1_and_other_refactoring
ucode1 work and other refactorings
2014-02-27 21:34:13 -08:00
Bobby Smiles
49ef4ad7fb Rename NEAD alist based ucodes. 2014-02-23 20:59:38 +01:00
Bobby Smiles
019edad852 Regroup sfx_stage_v{1,2} 2014-02-23 20:32:24 +01:00
Bobby Smiles
e790ed7b4e Regroup update_base_vol_v{1,2} 2014-02-23 19:37:21 +01:00
Bobby Smiles
deadc2507d Fix copyright headers. 2014-02-23 19:29:23 +01:00
Bobby Smiles
4bce49daf9 Remove superfluous masking 2014-02-23 16:53:16 +01:00
Bobby Smiles
58aaf24d1d POLEF count should be aligned to 16 bytes. 2014-02-23 16:53:16 +01:00
Bobby Smiles
f53324ef29 MIXER count should be aligned to 32 bytes. 2014-02-23 16:53:16 +01:00
Bobby Smiles
ae5e259559 INTERLEAVE count should be aligned to 16 bytes. 2014-02-23 16:53:15 +01:00
Bobby Smiles
4699b37e1e LOADADPCM count should be aligned to 8 bytes. 2014-02-23 16:53:15 +01:00
Bobby Smiles
f3b477a6a3 DMEMMOVE process chunks of 16 bytes. 2014-02-23 16:53:15 +01:00
Bobby Smiles
021ccb552a Rework LOADBUFF/SAVEBUFF. 2014-02-23 16:53:15 +01:00
Bobby Smiles
6cb68d6bd7 ADPCM: prefer align function over manual solution. 2014-02-23 16:53:15 +01:00
Bobby Smiles
5ed5042565 Rework RESAMPLE.
Modifications:
-there is an additional flag which can affect processing (not implemented)
-RESAMPLE outputs chunks of 16 bytes.
2014-02-23 16:53:15 +01:00
Bobby Smiles
6d44f153a1 Rework CLEARBUFF / alist_clear.
Three modifications:
-CLEARBUFF check for null sized buffer and exit early in that case
-CLEARBUFF process chunks of 16 bytes
-There should be no constrains on dmem alignment, therefore alist_clear should handle unaligned
accesses.
2014-02-23 16:52:53 +01:00
Bobby Smiles
45af55c656 Implement SEGMENT audio command. 2014-02-23 16:52:44 +01:00
Bobby Smiles
ac6c14f501 Use real dmem address ucode1. 2014-02-23 16:18:39 +01:00
Richard Goedeken
d55c2d91fa Merge pull request #14 from bsmiles32/plugin_refac
Plugin refac
2014-02-19 21:29:52 -08:00
Bobby Smiles
54f817a86d Put hle_execute proto into a proper header file. 2014-02-19 09:04:51 +01:00
Bobby Smiles
0a9e243204 Make unknown task dumping optional at compile time.
This functionality is not needed by the normal user and can introduce unwanted dependencies on
files. It can be enabled at compile time using -DENABLE_TASK_DUMP or Makefile var DUMP=1.
2014-02-19 05:32:33 +01:00
Bobby Smiles
806b0c07ce Use bool where appropriate. 2014-02-17 09:01:20 +01:00
Bobby Smiles
286614a3c1 Rename rsp status flags defines. 2014-02-17 08:53:16 +01:00
Bobby Smiles
ed81030162 Rename ucode*.c files 2014-02-17 08:44:47 +01:00
Bobby Smiles
24de686fb1 Move clamp_s16 to arithmetics.h 2014-02-17 02:27:50 +01:00
Bobby Smiles
94d8f03c85 Remove superfluous headers 2014-02-17 02:19:28 +01:00
Bobby Smiles
0923af8d68 Isolate memory access code. 2014-02-17 02:06:49 +01:00
Bobby Smiles
b680a18fda Rename rsp to g_RspInfo 2014-02-17 01:21:09 +01:00
Bobby Smiles
df010f161b Isolate plugin specific code. 2014-02-17 01:14:31 +01:00
Richard Goedeken
edc7dd7d81 Merge pull request #13 from bsmiles32/musyx_v2
Implement parts of MusyX ucode (v2).
2014-02-09 21:38:45 -08:00
Bobby Smiles
5586e9ca58 Implement parts of MusyX ucode (v2).
The second version of MusyX ucode is only found in IndianaJones and BattleForNaboo.
NOTE: the proposed implementation is not complete but seems enough to improve user experience.
2014-02-09 03:40:21 +01:00
Richard Goedeken
abe172dcf2 Merge pull request #12 from bsmiles32/musyx_temporary_fix
Temporary fix for IndianaJones and BattleForNaboo.
2014-02-06 21:55:42 -08:00
Bobby Smiles
8c022c1bd4 Temporary fix for IndianaJones and BattleForNaboo.
IndianaJones and BattleForNaboo use a different version of musyx ucode.
In this later version, some data structures have changed, which makes it incompatible with the
previous version (and cause the emulator to crash...).
This patch avoid the emulator crash by not handling the task.
Proper fix requires more reverse engineering effort.
2014-02-06 19:40:49 +01:00