Commit Graph

28 Commits

Author SHA1 Message Date
929222ffbd HW/DSP: Refactor to class. 2023-03-09 22:35:29 +01:00
95cace837a HW: Move DSP variables to Core::System. 2022-10-02 05:13:55 +02:00
e149ad4f0a treewide: convert GPLv2+ license info to SPDX tags
SPDX standardizes how source code conveys its copyright and licensing
information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX
tags are adopted in many large projects, including things like the Linux
kernel.
2021-07-05 04:35:56 +02:00
ce8004c9c1 Lint: End of namespace 2021-06-07 12:55:52 +04:00
c144cde825 Revert "DSP: ARAM cleanup experiments" 2019-09-02 01:47:50 -04:00
c1baffa776 ARAM: further cleanup, use AddressSpace accessors 2019-05-30 21:46:18 -04:00
43c09c63d8 AX-HLE: delay sending interrupt when done processing command list
Fixes https://bugs.dolphin-emu.org/issues/10265 (Star Wars: The Clone
Wars hangs on loading screen with DSP-HLE and JIT Recompiler).

The Clone Wars hangs upon initial boot if this interrupt happens too
quickly after submitting a command list. When played in DSP-LLE, the
interrupt lags by about 160,000 cycles, though any value greater than or
equal to 814 will work. In other games, the lag can be as small as 50,000
cycles (in Metroid Prime) and as large as 718,092 cycles (in Tales of
Symphonia!).

All credit to @hthh, who put in a heroic(!) amount of detective work and
discovered that The Clone Wars tracks a "AXCommandListCycles" variable
which matches the aforementioned 160,000 cycles. It's initialized to ~2500
cycles for a minimal, empty command list, so that should be a safe number
for pretty much anything a game does (*crosses fingers*).
2017-05-19 19:04:06 -07:00
f183d6759a HW/DSP: Remove prefixed underscores from parameter names
Avoids stepping on potentially reserved names and is more consistent
with the rest of the surrounding code.
2017-03-13 12:27:38 -04:00
fdfe57a49b IOS: Implement MIOS functionality
This implements MIOS's PPC bootstrapping functionality, which enables
users to start a GameCube game from the Wii System Menu.

Because we aren't doing Starlet LLE (and don't have a boot1), we can
just jump to MIOS when the emulated software does an ES_LAUNCH or uses
ioctlv 0x25 to launch BC.

Note that the process is more complex on a real Wii and goes through
several more steps before getting to MIOS:

* The System Menu detects a GameCube disc and launches BC (1-100)
  instead of the game. [Dolphin does this too.]

* BC, which is reportedly very similar to boot1, lowers the Hollywood
  clock speed to the Flipper's and then launches boot2.

* boot2 sees the lowered clock speed and launches MIOS (1-101) instead
  of the System Menu.

MIOS runs instead of IOS in GC mode and has an embedded GC IPL (which
is the code actually responsible for loading the disc game) and a PPC
bootstrap code. To get things working properly, we simply need to load
both to memory, then jump to the bootstrap code at 0x3400.

Obviously, because of the way this works, a real MIOS is required.
2017-02-08 15:07:34 +01:00
8cc4815fe2 HW/DSP: Hide the DSP state global 2017-01-16 14:14:03 -05:00
23d99f2f2c specify custom brace style to fix unions
BreakBeforeBraces: Allman apparently includes all styles,
except for AfterUnion (which is false) when using clang-format -dump-config
2017-01-05 12:55:13 +01:00
c354dfcd2f Remove instant ARAM DMA mode.
Now that our timings are much more accurate it doesn't look like we
need it anymore. And the instant ARAM DMA mode + scheduling fixes
ctually breaks ATV: Quad Power Racing 2 (causing all sorts of werid
bugs).
2016-09-07 12:53:14 +12:00
9e6bb68a64 DSP: Make DSP_CONTROL_MASK a concrete constant 2016-07-30 18:55:45 -04:00
3570c7f03a Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
6f34b27323 Jit64: implement dcbf + dcbi 2015-08-24 18:33:19 +02:00
30ebb2459e Set copyright year to when a file was created 2015-05-25 13:22:31 +02:00
cefcb0ace9 Update license headers to GPLv2+ 2015-05-25 13:22:31 +02:00
6da394a4d0 More formatting and consistency fixes 2014-11-24 17:16:59 -05:00
86b6dfe4b3 Added a instant ARAM DMA mode which is enabled automatically when required.
Detects a situation where the game is writing to the dcache at the address being DMA'd. As we do not have dcache emulation, invalid data is being DMA'd causing audio glitches. The following code detects this and enables the DMA to complete instantly before the invalid data is written.
Added accurate ARAM DMA transfer timing.
Removed the addition of DSP exception checking.
2014-09-27 20:47:29 +10:00
fbc64984ca Include CommonTypes.h instead of Common.h. 2014-09-08 15:39:58 -04:00
34bf0a4ab7 DSP: General cleanup. No behaviour change. 2014-08-14 09:45:05 +08:00
aac4206664 Move UDSPControl structure into DSP.h . 2014-03-29 11:19:19 -07:00
2afe215271 Convert all includes to relative paths. 2014-02-18 02:19:10 -05:00
92f8d93e96 Remove the old MMIO access "interface". 2014-02-16 19:22:40 +01:00
63990787fd MMIO: Port the DSP/ARAM/AI MMIOs to the new interface. 2014-02-16 19:22:40 +01:00
d2038049f5 Replace all include guard ifdefs with "#pragma once" 2014-02-10 18:07:16 -05:00
40182a48a5 Cleanup enum indentations. 2014-02-09 16:16:10 -05:00
34692ab826 Remove unnecessary Src/ folders 2013-12-31 14:03:19 -05:00