Commit graph

337 commits

Author SHA1 Message Date
Bobby Smiles
d7cd56382d Move MP3 declaration to ucode3. 2014-01-17 22:09:03 +01:00
Bobby Smiles
788f21043a Move each alist_process_* to their respective file. 2014-01-17 22:04:33 +01:00
Bobby Smiles
e54e1cbeaa Pack each ucode state into a local structure. 2014-01-17 21:47:35 +01:00
Bobby Smiles
51d2dd95e6 hleMixerWorkArea doesn't need to be global. 2014-01-17 21:14:24 +01:00
Bobby Smiles
2f7e184038 Move BufferSpace to alist.c and alist_internal.h 2014-01-17 21:08:47 +01:00
Bobby Smiles
c02c0b7af5 Improve audio ucode identification.
Previously, alist based ucodes were classified as either ABI1, ABI2 or ABI3.
This classification is too simple to take into account all versions/revisions
that really exist in the wild. Furthermore, it prevents from implementing some
version/revision specific behaviors.

There are indeed 3 big "families" of alist based ucodes:
-ABI1 (or audio) which seems to be the very first version developed.
It was distributed to 3rd party devs and is the most common.
2 minor revisions were made by Rare for GoldenEye, BlastCorp and DiddyKongRacing.

-ABI3 (or naudio) which is the later revision.
It was as distributed to 3rd party devs as well and is the second most common.
4 revisions were made by Rare for BanjoKazooie, DonkeyKong, BanjoTooie, JetForceGemini,
MickeySpeedway, PerfectDark and ConkerBadFurDay.

-ABI2 (or what I'd call NEAD) which was Nintendo Entertainment Analysis & Development exclusive.
There are many versions/revisions in this category (almost one for each game they developed).

This commit try to better identify audio ucodes.
2014-01-17 19:51:53 +01:00
Bobby Smiles
f910e3b4ee Fix regression introduced by commit 488e73c 2014-01-17 19:18:55 +01:00
Richard Goedeken
4a00ea8fb2 Merge pull request #5 from bsmiles32/master
Consolidate memory accesses
2014-01-16 16:52:35 -08:00
Bobby Smiles
99c46ef83f Prefer memory access primitives over struct OSTask_t.
Structure fields alignment is compiler dependent and therefore can be fragile.
We replace all occurences of OSTask_t structure by memory access primitives.
2014-01-14 23:19:47 +01:00
Bobby Smiles
abad8fca0c Use dram access primitives in alist.c 2014-01-14 23:19:47 +01:00
Bobby Smiles
488e73cf0b Use dram access primitives for remaining cases in main.c 2014-01-14 23:19:47 +01:00
Bobby Smiles
bdb4733f33 Rewrite audio ucode identification using the new RDRAM access primitives. 2014-01-14 23:19:47 +01:00
Bobby Smiles
757a12729f Remove duplication of memory access functions between jpeg and musyx modules. 2014-01-14 23:19:47 +01:00
Richard Goedeken
109ce2817f Merge pull request #4 from ecsv/musyx
Implement SFX stage for musyx ucode (on nocpp branch)
2014-01-05 16:38:48 -08:00
Richard Goedeken
7c28bc8467 Merge pull request #3 from ecsv/nocpp
Add additional cleanup changes
2014-01-05 16:38:06 -08:00
Bobby Smiles
c7bec87096 Implement SFX stage for musyx ucode.
With this patch, delay-based effects should work.
Basically, the SFX stage mixes up to 8 delayed subframes together and add the
resulting subframe to left and right subframes. Furthermore, a filtered version
of this subframe is used to update the sample history.

Games that use the SFX stage include:
The World is not Enough, Tarzan, Resident Evil 2, Polaris SnowCross

Musyx ucode implementation should now be complete !
2014-01-05 23:37:23 +01:00
Sven Eckelmann
8b50f92016 Use clamp_s16 to clamp values to int16_t range 2014-01-05 10:16:35 +01:00
Sven Eckelmann
026a2089c0 Cleanup oneline if statements 2013-12-30 23:13:15 +01:00
Sven Eckelmann
1646550dba Move longer comments to separate line before the code 2013-12-30 22:10:52 +01:00
Sven Eckelmann
53c9d39c7d Fix wrong code alignment on linestart 2013-12-30 21:52:34 +01:00
Sven Eckelmann
c43d08aed9 Replace C++ comments with C comments 2013-12-30 21:52:34 +01:00
Sven Eckelmann
c1519b84d9 Remove code which only exist as comment 2013-12-30 21:52:33 +01:00
Sven Eckelmann
27e1db3691 Remove unused extern declarations 2013-12-30 21:38:20 +01:00
Sven Eckelmann
2eb0061541 Remove dead assignments 2013-12-30 20:31:46 +01:00
Sven Eckelmann
8c7c556248 Only include what each source file needs 2013-12-30 20:31:45 +01:00
Sven Eckelmann
d7cf796208 Always use standard ISO C99 datatypes for sized variables 2013-12-30 20:31:45 +01:00
Sven Eckelmann
ce771d1026 Move shared MP3 symbol definition to header 2013-12-30 20:31:45 +01:00
Sven Eckelmann
1d4cd7db1d Move all extern definitions to the header files 2013-12-30 20:31:45 +01:00
Sven Eckelmann
0437601e5f Mark only locally used symbols as static 2013-12-30 20:31:45 +01:00
Sven Eckelmann
a9cdda0ae3 Add missing includes for global declaration 2013-12-30 20:31:45 +01:00
Sven Eckelmann
3930a84625 Fix function declaration for functions without parameter 2013-12-30 20:31:45 +01:00
Sven Eckelmann
6e12c395f3 Don't mix declaration and code
C90 only supports variable declaration at the beginning of a scope. Not doing
so will break builds in MSVC.
2013-12-30 18:12:28 +01:00
Sven Eckelmann
646ec921ec Compile ucode*.cpp as C source code
The ucodes are basically only C code and don't use C++ features. It is
therefore not necessary to build it with a C++ compiler.
2013-12-30 17:33:34 +01:00
Richard Goedeken
0434aeb741 Merge pull request #1 from ecsv/musyx
Add initial support for MusyX
2013-12-30 06:52:59 -08:00
Bobby Smiles
d31b8ea3ff Add initial support for MusyX 2013-12-30 14:43:47 +01:00
Sven Eckelmann
a2a06db57b Remove executable bit from C source files 2013-12-30 14:40:04 +01:00
Sven Eckelmann
2af0917440 Try to unify formatting of the source code 2013-12-30 14:40:04 +01:00
Sven Eckelmann
2032870995 Force line ending type for specific files
Different operation systems (Unix vs. Windows) use different line ending types.
It can easily happen that users from different systems edit files and replace
all line endings of a file with the system specific version. This screws up
diffs and makes merges harder.

Git can normalize line endings for specific files and avoid this problem.
Binary files should be marked to avoid accidentally normalization.
2013-12-19 14:19:07 +01:00
Sven Eckelmann
44170e4fdb Convert .hgignore to .gitignore 2013-12-19 14:13:38 +01:00
Bobby Smiles
6e2d80e413 Fix: Bottom of the 9th jpeg task dispatching. 2013-12-01 16:30:28 +01:00
Bobby Smiles
8979df7774 Refactor standard macroblock decoder. 2013-12-01 16:26:38 +01:00
Bobby Smiles
7f34cc8101 Avoid dynamic memory allocation for macroblocks. 2013-12-01 16:02:28 +01:00
Bobby Smiles
60ecc0ddfc Fix: macroblock memory allocation was bigger than needed. 2013-12-01 15:58:25 +01:00
Sven Eckelmann
ff2ab7f9ea Don't fail rebuild when header is removed
The *.d depends files for make just list the files used when building an
object file. Removing a file listed in such a dependency file causes make to
search for a way to recreate it. This usually cannot work because these files
aren't autogenerated.

The gcc option -MP can be used to generate empty rule for these files. Removing
a file in a dependency list will then execute this empty rule and continue with
the execution of the creation of the object file. This compilation process will
then automatically correct the dependency file.
2013-09-20 10:31:44 +02:00
richard42
a1edae31a9 simplify OSX platform detection in makefile using xcode-select. based on patch from John Pender 2013-07-08 07:35:00 -07:00
Richard Goedeken
7f24c1a989 Added tag 2.0 for changeset 14d7e6313077 2013-07-04 15:48:00 -07:00
Richard Goedeken
33f761c039 update version number to 2.0 2013-07-03 07:07:45 -07:00
Richard Goedeken
e8145aa598 update LICENSES 2013-06-27 22:46:26 -07:00
Richard Goedeken
18594a3253 update text files for upcoming 2.0 release 2013-06-26 22:47:36 -07:00
Richard Goedeken
630dfad2af tagged v2.0-rc2 2013-06-01 18:00:33 -07:00