Commit graph

35386 commits

Author SHA1 Message Date
Lioncash
6268ee44a1 NWC24Config: Provide name for unk_04 config member
According to WiiBrew this is a version number (thanks to Awesomebing1
for documenting this!)
2021-08-24 12:04:04 -04:00
Lioncash
a60af199d8 NWC24Config: Move array length constants into the private part of the class
These are only used internally and not intended to be used outside of
the class itself.
2021-08-24 12:04:04 -04:00
Lioncash
bc939df69c NWC24Config: Make creation stage an enum class
Makes the enum strongly typed instead of interacting with a raw u32
value. While we're at it, we can add helpers to the NWC24Config to make
using code poke at the internals of the class a little bit less and also
make the querying a little nicer to read.
2021-08-24 12:04:04 -04:00
Lioncash
82371b89fc NetKDRequest: Remove unused include 2021-08-24 12:04:04 -04:00
Lioncash
e65363f05f NetKDRequest: Make use of constexpr arrays containing pairs instead of maps
Currently we were using heap allocating maps that last for the entire
duration of the emulator running.

Given the size N of both of these maps are very small (< 20 elements),
we can just make use of an array of pairs and perform linear scans. This
is also fine, given this code isn't particularly "hot" either, so this
won't be run often.
2021-08-24 12:04:01 -04:00
Lioncash
b49bd76d91 NetKDRequest: Fix typo in IOCtl enum names (schedular -> scheduler) 2021-08-24 08:28:14 -04:00
Lioncash
3a38e99001 NetKDRequest: Make hardware model enum strongly typed
Makes it a distinct type instead of decaying to an ambiguous u8.
2021-08-24 07:46:53 -04:00
Lioncash
1e27880014 NetKDRequest: Make private member functions completely internal
These functions don't touch any class state, so they can be turned into
internal helper functions.

While we're at it, we can move the enumerations as well.
2021-08-24 07:45:56 -04:00
Lioncash
ff3947a1b9 NetKDRequest: Minor adjustments to NWC24MakeUserID
- Make use of std::array
- Move helper functions inside it as lambdas
- Eliminate sign-conversions that were occurring (promotion of u8 to int)
2021-08-24 07:13:08 -04:00
Tilka
e7a30dd468
Merge pull request #10048 from Pokechu22/dsp-manual
Improvements to DSP manual
2021-08-22 04:06:49 +01:00
Pokechu22
88d2a7260d DSPLLE: Improve various instruction comments
* DSP*Arithmetic: Fix grammar for ANDCF and ANDF
* DSP*Arithmetic: Fix registers used by MOVAX and MOV
* DSP*Branch: Fix documentation for JMPR
* DSP*Branch: Fix HALT encoding ("I think I saw a two")
* DSP*ExtOps: Fix 'LN encoding (The listed encoding was for 'L)
* DSP*ExtOps: Improve documentation for 'LD and 'LDAX
* DSPJitExtOps: Correct typo
* DSP*LoadStore: Remove obsolete comment about pc in SRS (This was fixed in 1419e7e5b2)
* DSP*LoadStore: Fix comments for LRR/SRR
* DSP*Misc: Improve documentation for SBCLR and SBSET
* DSP*Multiplier: Fix MULXAC encoding (The previous encoding was for MULXMVZ)
* DSP*Multiplier: Fix tabs in MULCAC and MULCMVZ (There are some other tabs in comments in the JIT, but these are the only ones that are in instruction comments instead of indicating the corresponding interpreter code.  Those other comments can be corrected in a different PR, as they're not documentation related.)
* DSPJitMultiplier: Fix MULXMVZ typo
2021-08-21 17:07:14 -07:00
Pokechu22
ddc2dd91d2 DSPSpy: Create README.md 2021-08-21 17:07:14 -07:00
Pokechu22
1ad8dd7634 DSPSpy: Remove build.sh and sbuild.sh
This also removes the emu folder from the Makefile, and the Config.h file.  I'm not entirely sure what build.sh was for, but my best guess is that it was some kind of tool to run emulated DSP code at the same time as the actual DSP code and compare the results.  I don't know if it ever worked, but it certainly doesn't work now.
2021-08-21 17:07:14 -07:00
Pokechu22
3eaf06d2e0 DSPSpy: Create .gitignore 2021-08-21 17:07:14 -07:00
Pokechu22
4fa9517ba3 docs/DSP: Update version and history
The GFDL requires the history section to be updated.
2021-08-21 17:07:14 -07:00
Pokechu22
9ef388f1c3 docs/DSP: NEG can set overflow and carry 2021-08-21 17:07:14 -07:00
Pokechu22
602163b623 docs/DSP: Fix typo with MULCMVZ and MULCMV 2021-08-21 17:07:14 -07:00
Pokechu22
c51c339424 docs/DSP: Document initialization process 2021-08-21 17:07:14 -07:00
Pokechu22
5bf59f3ce4 docs/DSP: A failed RETcc only inceases PC by 1, not 2
This is because RETcc is a single-word instruction.
2021-08-21 17:07:14 -07:00
Pokechu22
1b84721b7f docs/DSP: Add RTIcc 2021-08-21 17:07:14 -07:00
Pokechu22
5611bd8f23 docs/DSP: Change conditional names to match Dolphin 2021-08-21 17:07:14 -07:00
Pokechu22
af10eab938 docs/DSP: Split SRSH from SRS 2021-08-21 17:07:14 -07:00
Pokechu22
408623b6e9 docs/DSP: Document behavior of LRS/SRS/SI with CR 2021-08-21 17:07:14 -07:00
Pokechu22
8fa649e1d6 docs/DSP: Document masking/sign extension behavior of registers 2021-08-21 17:07:14 -07:00
Pokechu22
7c645e1865 docs/DSP: Fix registers used by MOVAX and MOV 2021-08-21 17:07:14 -07:00
Pokechu22
be753e5a45 docs/DSP: MADDC operates on acS.m, not acS.l
This matches the prose and Dolphin's implementation.
2021-08-21 17:07:13 -07:00
Pokechu22
0796fada17 docs/DSP: Add information about flags for every instruction 2021-08-21 17:07:13 -07:00
Pokechu22
9249454f33 docs/DSP: Document overflow and carry behavior 2021-08-21 17:07:13 -07:00
Pokechu22
a8ec0ad27f docs/DSP: Fix MULXAC bytes
The previous encoding was for MULXMVZ.
2021-08-21 16:05:06 -07:00
Pokechu22
2db2683ea9 docs/DSP: Fix 'S format 2021-08-21 16:05:06 -07:00
Pokechu22
139e05800f docs/DSP: Fix 'LS encoding
The old encoding was a copy of 'LN.
2021-08-21 16:05:06 -07:00
Pokechu22
8767df40e5 docs/DSP: Fix acD/acR conflation in shift instructions 2021-08-21 16:05:06 -07:00
Pokechu22
332bb6fd55 docs/DSP: Fix operation for LSR/ASR 2021-08-21 16:05:06 -07:00
Pokechu22
2eb791d5e1 docs/DSP: Note that ADDAXL is unsigned 2021-08-21 16:05:06 -07:00
Pokechu22
953670b057 docs/DSP: Fix operation of ADDR and SUBR 2021-08-21 16:05:06 -07:00
Pokechu22
8881ecef19 docs/DSP: Adjust operation for CMPI and CMPIS
This more clearly indicates what it is supposed to do.
2021-08-21 16:05:06 -07:00
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