Commit Graph

96 Commits

Author SHA1 Message Date
Ikalpo da9e9323ce fixed 'Load into Gecko Register' codetype 2019-05-13 21:48:40 -07:00
spycrab a9d9ba0b1b docs: Add ResourcePacks.md 2019-02-11 11:11:50 +01:00
TryTwo 701b5c4b03 Fix Gecko codehandler lag. 2018-10-28 13:45:10 -07:00
BhaaL 1f524b9929 docs/DSP: update version and history 2018-06-21 11:34:20 +02:00
BhaaL 1419e7e5b2 docs/DSP: fix opcode operations
some did not reflect the correct PC increments, other had their registers
mixed up.
LSNM was misspelled as LSMN.
2018-06-21 11:34:20 +02:00
BhaaL facd1dca12 docs/DSP: update register tables
Dolphin source had a lot more info than the tables, so it makes sense to
include them in the manual
2018-06-21 11:34:20 +02:00
Lioncash db2c6df675
docs: Add a LaTeX equivalent of the GameCube DSP User's Manual
The existing manual is nice to read and get up to speed on things,
however it has one major problem. It's actually a pain to extend or
modify, despite being released under the GNU documentation license: It's
in PDF format.

I've taken the time to reproduce what the document more-or-less looks
like in order to allow extending the document using open-source tools
while also using a more general solution like LaTeX, which can generate
the document into multiple formats if desirable.

This should make extending the document much easier (and not lock the
information into one concrete format).
2018-04-13 19:03:08 -04:00
booto 8d1d8afd32 Clean up codehandler formatting 2018-02-03 13:09:31 +08:00
booto aae8634a58 Clean up codehandler a little; stash msr on stack to preserve 2018-02-03 13:07:25 +08:00
booto 83d18fc2fa Restore original MSR when returning from codehandler 2018-01-14 04:51:48 +08:00
Leo Lam 01cea374a6 Merge pull request #5907 from gamemasterplc/master
Fix 8 and 16 bit writes in codehandler
2017-08-17 03:33:23 +08:00
Michael M fcb1eb9d3b dsp_rom: skip bootucode_ax when running from entrypoint
This could cause the first branch of the bootucode procedure, which
takes its parameters from the AX registers, to run during the ROM init
sequence. Since the ROM doesn't set any of the AX registers, the values
aren't meaningful, and can cause bad DMA transfers and crashes.
2017-08-10 10:53:12 -07:00
gamemasterplc e2d126144e Fix 8 and 16 bit writes in codehandler (Source) 2017-08-10 07:05:05 -05:00
gamemasterplc 99ad304791 Add codehandler source code.
This file is MIT licensed due to Gecko OS being MIT licensed.

Add authors of original codehandler

Add MIT notice to codehandler

Update copyright year for codehandler

Add where original source came from

Codehandler Source Code Added.
2017-06-25 08:48:25 -05:00
Michael Maltese e3531d17d7 Update free DSP ROM and coefficients to support GBA ucode
- coef: Explicitly set 23 different values that are used by GBA UCode,
  and tweaked overall parameters to more closely match those 23 values.
- irom: Moved a few functions to their proper places, updated BootUCode
  to configure DMA transfers using AX registers as well as IX registers
  (the GBA UCode uses this to do two sequential transfers in one call),
  and added partial functions used by GBA UCode.

All functions were reverse-engineered solely based off of observed
effects on the virtual machine: register states before-and-after, dmem
interactions, and DMA transfers. The specific coefficients were observed
being read from dmem, and must be exactly those values to function
properly. I have no knowledge of how the official ROM implements these
functions, or how it is implemented overall.

Tested with The Legend of Zelda: Four Swords Adventures, Final Fantasy
Crystal Chronicles, and Billy Hatcher and the Giant Egg (to download
ChuChu Rocket!).
2017-06-03 15:16:39 -07:00
Michael Maltese 3872437eac Add sample logs for GBA ucode register state/HW interactions 2017-06-03 15:16:39 -07:00
Michael Maltese 7e869070e3 generate_coefs: separate type conversion and packing
This makes it easier to apply patches to the resulting binary before
writing it to a file.
2017-06-03 15:16:38 -07:00
Michael Maltese a182c7f2a5 dsp_rom.ds: use org directive to pad out to correct size 2017-05-19 19:53:38 -07:00
Michael Maltese 8905b363cf dsp_rom.ds: use org directive instead of nops 2017-05-19 19:53:38 -07:00
Michael Maltese d9bffee73d dsp_rom.ds: fix trailing whitespace and line endings 2017-05-19 19:53:38 -07:00
JosJuice 0f1ce0e1f4 Remove incorrect usage of "ASCII" and "ANSI"
Windows-1252 was sometimes being referred to as ASCII or ANSI
in Dolphin, which is incorrect. ASCII is only a subset of
Windows-1252, and ANSI is (rather improperly) used in Windows
to refer to the current code page (which often is 1252 on
Western systems, but can also be something entirely different).

The commit also replaces "SJIS" with "Shift JIS". "SJIS"
isn't misleading, but "Shift JIS" is more commonly used.
2016-12-26 15:49:39 +01:00
Shane Nelson 388ab13db1 Audio: new dsp_coef.bin with windowed sinc filter coefficients 2015-06-29 22:24:24 -04:00
Benjamin Przybocki 4f324ad742 Clean Up 2015-01-24 17:10:21 -06:00
James Cowgill f3aea4b5bc Replace gamecube fonts with free alternatives
Previously the gamecube fonts were based on Arial and Lucida which are not
freely distributable. The new fonts are generated using fonts under free
licenses with the "gc-font-tool" program I wrote.
2015-01-14 21:41:25 +00:00
Paul Olszewski 5d793881b0 Fix the capitalization of "GameCube" throughout the project. 2014-06-08 11:24:49 +09:00
Tillmann Karras d802d39281 clang-modernize -use-nullptr
and s/\bNULL\b/nullptr/g for *.cpp/h/mm files not compiled on my machine
2014-03-09 21:14:26 +01:00
Jasper St. Pierre 43e618682e Convert all vcxproj files to UNIX line endings 2013-12-31 14:03:18 -05:00
Pierre Bourdon 5f0c892ed0 Remove outdated documentation files 2013-08-22 01:05:29 +02:00
Pierre Bourdon e81dd53b7e Remove an obsolete documentation file 2013-03-17 18:56:01 +01:00
Pierre Bourdon 9a404ca6d4 Ship by default a free DSP ROM that can handle most games with LLE
At the end of July 2011, LM published a free DSP ROM that works with games
using the Zelda UCode. His ROM only has the code to handle UCode loading and a
few utility functions, the rest is missing. This includes the four large sound
mixing functions used by the AX UCode and the DROM containing coefficients used
for polyphase resampling in AX.

This is an improved, updated version of this ROM, which changes the following:

- We now have a free DROM that works for polyphase resampling by "emulating"
  linear interpolation. The coefficients contained in the DROM are normally a
  list of { c1, c2, c3, c4 } which are used to interpolate a sample value from
  four previous samples:
    out_sample = prev1 * c1 + prev2 * c2 + prev3 * c3 + prev4 * c4

  The coefficients are chosen depending on the fractional part of the current
  position (basically, our position between the previous and the next sample).
  We can use this fact to generate (c1, c2, c3, c4) for each possible
  fractional part so that:
    out_sample = prev3 * curr_pos + prev4 * (1 - curr_pos)

  Which is the formula for linear interpolation between prev3 and prev4. Linear
  interpolation is not as good as polyphase resampling but it still works very
  well and I couldn't really hear any difference between the two. If someone
  wants to generate real polyphase filter coefficients, they are welcome to
  submit a patch.

- The IROM now contains the 4 mixing functions used by the AX UCode: mix_add,
  mix_add_two, mix_add_ramp, mix_add_ramp_two. They are large, inlined
  functions (probably for performance reasons) in the official DSP IROM, our
  version prefers to use a loop. This *should* be more performant with our DSP
  JIT implementation, but I did not benchmark that.

Because the new DSP ROM is working just as well as the official ROM in 95% of
cases, it is now shipped by default with Dolphin and will be used with DSPLLE
if you don't have an official DSP ROM in User/GC. It will still display a panic
alert at every boot to notice you that you are using a non official DSP ROM
made by us, which is not perfect.

Games using the CARD, IPL or GBA UCodes are still broken. I don't know what
games this actually impacts, but this is a very small proportion compared to
what works.
2013-03-16 23:54:55 +01:00
Marko Pusljar bcd019889c legal minimal dsp irom replacement, good enough for zelda ucode games only (useful for gc/wii owners, who are unable to dump their irom and would like to use dolphin DSPLLE)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7689 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-07-31 18:34:02 +00:00
Shawn Hoffman e480ab2b10 drop vs2008 projects in favor of vs2010
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7129 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-02-11 15:43:05 +00:00
Marko Pusljar 8dc01b685f dsp stuff - the same ucode hash under lle and hle now (had to rename couple of dissasms), ucode dumping under hle (debug only), small dsp:read32 change (needed for some homebrew)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6059 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-08-05 17:00:32 +00:00
Shawn Hoffman 0a3c150f69 allow "swapping" of hle'd ucodes
hle the gba ucode

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6046 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-08-04 11:44:06 +00:00
Shawn Hoffman 4a0c8fc0c9 Hg:
enable newline normalization
get revision number via `hg svn info` for svnrev.h
ignore incremental/generated binary files (windows/VS at least)
leave a comment if some files need native eol set in svnprops

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5637 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-09 01:37:08 +00:00
Soren Jorvang 664cea45c7 Meta:
Using Unix tools to operate on a tree containing filename with spaces in them
is really annoying, so rename the handful of instances where there were spaces.

Host.cpp has never been used.

Games tend to lookup the following directories that we don't yet have anything
to put in, so prepopulate them in Data/User/Wii:

title/00010001
title/00010002
title/00010003
title/00010004
title/00010005
title/00010006
title/00010007
meta
shared2/title
 
Set eol-style native on a number of text files which didn't already have it.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5572 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-02 18:00:22 +00:00
Shawn Hoffman 80d303222b code cleanup, focusing on dsp hle
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5143 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-28 18:21:22 +00:00
Shawn Hoffman 63827c71c6 Move MemCheck functionality into the virtual DebugInterface class from the more general MemView class.
Give DSP LLE Debugger a wxAUI facelift and add memory view to dsp debugger.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5080 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-18 12:06:13 +00:00
Shawn Hoffman b6aa5d91c0 add another dsp ucode to RE...woo!
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5055 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-14 05:40:04 +00:00
Marko Pusljar fbdf721e0e ROM dissasm "refresh" + RE + small fixes
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4938 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-24 00:31:20 +00:00
Shawn Hoffman d558c534d2 Merge SrcSelect.c, AX.c, Crazy Taxi.txt, and DSP_UC_AX1.txt into new and improved disasm -> DSP/DSP_UC_6A696CE7.txt
Goal is complete/near complete RE of DSP_UC_6A696CE7 (GC AX), and hopefully ROM.
From there, seeing the additional changes in other GC AX versions (there are only 4 others, with minor differences), should be "simple".

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4818 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-13 04:43:18 +00:00
luigi2us f9106f4e6f Some more AXWii RE.
Long time I didn't commit to Dolphin, by the way.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4793 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-08 18:26:22 +00:00
Marko Pusljar 4d3620ace3 DSPHLE AXwii work
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4559 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-11-13 20:27:38 +00:00
XTra.KrazzY 4fbf138ed2 The beginning of another approach on Zelda HLE UCode: PB debugging and comparison
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4481 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-10-30 07:10:46 +00:00
Marko Pusljar 1285ba4401 Zelda RE + fixes
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4350 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-30 13:49:05 +00:00
XTra.KrazzY 48ed2ae852 Best of both worlds (or hacks...). Music continues to play, no sound breakage in Pikmin2/ZTP. Wind Waker still echoes weirdly in ZWW though.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4344 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-29 19:15:34 +00:00
luigi2us cad887c51d AXWii: more disasm; and send correct mail at end of AXList (DCD10002 instead of DCD10001), which makes the game send a CDD10003 as expected.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4336 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-27 15:18:20 +00:00
luigi2us 0423406a67 AXWii ucode: more comments.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4335 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-27 14:22:40 +00:00
nakeee b9422c7ed9 Some axwii disasm
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4328 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-27 08:25:08 +00:00
luigi2us d56e05a9ca Add a disassembly of AXWii ucode (taken from MKWii)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4324 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-26 21:25:07 +00:00