Commit graph

111 commits

Author SHA1 Message Date
Pokechu22
79664d419c docs/DSP: Document rounding behavior of CLRL 2021-08-21 16:05:06 -07:00
Pokechu22
1bcea561e9 docs/DSP: Add 'NOP 2021-08-21 16:05:05 -07:00
Pokechu22
29b61d463e docs/DSP: Document 'LD and 'LDAX 2021-08-21 16:05:05 -07:00
Pokechu22
031621bf51 docs/DSP: Document behavior and instructions when the first nybble is 3 2021-08-21 16:05:05 -07:00
Pokechu22
211c2b5d99 docs/DSP: Add most missing instructions
These instructions were already implememented by Dolphin, but never added to the manual.  Extension instructions will be handled in a later commit, as wlil instructions that were not previously implememented by Dolphin.
2021-08-21 16:05:05 -07:00
Pokechu22
446b1d2f13 docs/DSP: Adjust bit names in opcode table
The old names did not match the ones used by the instructions themselves, and were generally fairly inconsistent.
2021-08-21 16:05:05 -07:00
Pokechu22
16da6e214d docs/DSP: Hyperlink opcode names 2021-08-21 16:05:03 -07:00
Pokechu22
ccc5085988 docs/DSP: Rename 'SLMN to 'SLNM
This is for consistency with Dolphin, the opcode table, and 'LSNM.
2021-08-21 16:03:50 -07:00
Pokechu22
2a9e1a3b5d docs/DSP: Document accelerator hardware registers 2021-08-21 16:03:50 -07:00
Pokechu22
c9ed9dd0a7 docs/DSP: Adjust formatting of RegisterBitOverview 2021-08-21 16:03:50 -07:00
Pokechu22
9a269929ec docs/DSP: Improve DMA hardware register information 2021-08-21 16:03:50 -07:00
Pokechu22
b99fbf7e9c docs/DSP: Sort hardware registers by address
The actual documentation for registers is not changed in this commit; nor are any new registers added.  This is purely to make later diffs more readable.
2021-08-21 16:03:50 -07:00
Pokechu22
6df892dca7 docs/DSP: Expand DSP Memory Map section 2021-08-21 16:03:50 -07:00
Pokechu22
cfc6de8545 docs/DSP: Fix LOOPI, BLOOP, Jcc, and CALLcc opcode table operands 2021-08-21 16:03:50 -07:00
Pokechu22
5a0155a1cb docs/DSP: Fix ANDCF and ANDF being swapped
This was implemented in Dolphin in 7c4e654253.  That change also noted that JZR/JNZ were swapped; this was already fixed in facd1dca12.
2021-08-21 16:03:50 -07:00
Pokechu22
000f7b102a docs/DSP: Fix SBCLR and SBSET being backwards
Dolphin has them with SBCLR as 1200 and SBSET as 1300 since the inital megacommit: 775dc8a9c0/Source/Plugins/Plugin_DSP_LLE/Src/opcodes.cpp (L67-L68)
2021-08-21 16:03:49 -07:00
Pokechu22
13051ee291 docs/DSP: Elaborate on SBSET and SBCLR 2021-08-21 16:03:49 -07:00
Pokechu22
bb1ecd2a81 docs/DSP: Add RTI to opcode list 2021-08-21 16:03:41 -07:00
Pokechu22
2c73de7ada docs/DSP: Add missing already-documented instructions to opcode table 2021-08-21 11:40:54 -07:00
Pokechu22
d9f8df3cbe docs/DSP: Fix typo in HALT encoding
"I think I saw a two"
2021-08-21 11:40:54 -07:00
Pokechu22
35720284f3 docs/DSP: Fix various spelling/grammar/punctuation issues 2021-08-21 11:40:54 -07:00
Pokechu22
2df33ddbbc docs/DSP: Create .gitignore
This is from https://github.com/github/gitignore/blob/master/TeX.gitignore (CC0)
2021-08-21 11:40:54 -07:00
Pokechu22
c1242fbd6c docs/DSP: Update version and history
The GFDL requires the history section to be updated.  Although there was no actual release, this makes it attribution clearer and separates it from my changes.
2021-08-21 11:40:22 -07:00
Tillmann Karras
48f96491e8 docs/DSP: fix typos in 'S and 'SN and improve readability 2020-06-08 03:41:45 +01:00
Tillmann Karras
d5c3411a80 docs/DSP: fix AX register numbers
Dolphin already had this fixed in the initial megacommit.
2020-05-17 10:47:15 +01:00
Tillmann Karras
d259fc4038 docs/DSP: add wrapping registers
as decreed in 0d57b7f01a
2020-05-17 10:42:58 +01:00
Tillmann Karras
90b060f284 docs/DSP: fix typos 2020-05-17 10:42:58 +01:00
Tillmann Karras
7546bd6476 docs/DSP: fix $prod references
Apart from improving readability, this also fixes a hex-vs-decimal mismatch.
2020-05-09 13:44:39 +01: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
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
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
Shane Nelson
388ab13db1 Audio: new dsp_coef.bin with windowed sinc filter coefficients 2015-06-29 22:24:24 -04: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