Commit Graph

2271 Commits

Author SHA1 Message Date
bf26b6817d partially rendering 2023-12-23 21:26:49 -05:00
78da2846e6 wip - rewrite 3 - scheduler edition 2023-12-23 00:38:39 -05:00
a338ef1c8a Merge remote-tracking branch 'upstream/master' into RDLines 2023-12-21 18:14:39 -05:00
084747abc5 Reset DS object directly after creation 2023-12-21 22:15:12 +01:00
ed650f2b46 call Reset on 3D renderer object 2023-12-21 21:43:57 +01:00
6cee0a7ad7 no idea how that one slipped in 2023-12-20 23:15:07 -05:00
8cc42490de fix build but also sw renderer crashes now 2023-12-20 21:54:03 -05:00
4c2e03af53 Merge branch 'master' of https://github.com/melonDS-emu/melonDS into RDLines 2023-12-20 20:55:35 -05:00
fd3c349735 Check Q_OS_UNIX define instead 2023-12-20 21:38:55 +01:00
6c6318b63b Fix generic icon when using Wayland 2023-12-20 21:38:55 +01:00
01f8ad009e Wrap the EnableJIT initialization in an #ifdef (#1922) 2023-12-20 14:25:49 +01:00
1054011c90 wip 2023-12-19 22:52:54 -05:00
4b4239de62 Set NDS::EnableJIT in the constructor (#1921) 2023-12-19 15:15:35 +01:00
1bec2a9293 Fix an incorrect use of std::move (#1919)
- When I adapted `GBACart::ParseROM` to use `unique_ptr` instead of a plain pointer, I forgot to remove the code that copied the SRAM data
- That code was made unnecessary because of the move
2023-12-16 00:05:43 +01:00
eedb0ba478 Add a call to std::move that I missed (#1917) 2023-12-15 20:52:35 +01:00
e1821d0023 Simplify the SRAM's representation in NDSCartArgs (#1914)
* Simplify the SRAM's representation in  `NDSCartArgs`

- I overthought this one.
- I could've just checked `args && args->SRAM`, but then some other poor bastard might make this mistake.
- Don't mix `pair`, `optional`, and `unique_ptr` all at once, kids.

* Fix a `nullptr` read
2023-12-15 14:56:10 +01:00
24c402af51 Fix detection of native NDS ARM BIOS images (#1910)
* Fix detection of native NDS ARM BIOS images

- Instead of checking for built-in BIOS images, now the altered methods check for native ones
- The CRC32 must match exactly; patched BIOS images will result in `false`

* Encapsulate `NDS::ARM9BIOS` and `ARM7BIOS`

- Also compute the checksum only when setting the BIOS
2023-12-15 14:54:41 +01:00
c867a7f1c0 Make the initial 3D renderer configurable via NDSArgs (#1913)
* Allow 3D renderers to be created without passing `GPU` to the constructor

* Make the initial 3D renderer configurable via `NDSArgs`

* Fix a compiler error
2023-12-15 14:53:31 +01:00
6f47c9ed4c Support emulating R4 Revolution/M3DS Simply cartridges. (#1854)
* Support emulating R4 Revolution/M3DS Simply cartridges.

* NDSCartR4: Write state information to savestate file.

* NDSCart: Use strncmp instead of strcmp for R4 detection.

* NDSCartR4: stylistic improvements

* NDSCartR4: rudimentary Ace3DS support

* NDSCartR4: fix boot when firmware enabled

* NDSCartR4: Fix for namespace changes

---------

Co-authored-by: RSDuck <RSDuck@users.noreply.github.com>
2023-12-15 08:19:53 +01:00
2217a34d39 misc improvements 2023-12-14 23:00:12 -05:00
a46316d71f improved timings for the first 50 scanlines 2023-12-14 15:18:39 -05:00
9bfc9c08ff Sprinkle const around where appropriate (#1909)
* Sprinkle `const` around where appropriate

- This will make it easier to use `NDS` objects in `const` contexts (e.g. `const` parameters or methods)

* Remove the `const` qualifier on `DSi_DSP::DSPRead16`

- MMIO reads can be non-pure, so this may not be `const` in the future
2023-12-12 11:07:22 +01:00
24eecec50f implement first draft of improved timing structure 2023-12-12 00:01:26 -05:00
2cba2e783a fix default emu settings tab (#1912) 2023-12-12 00:04:04 +01:00
81219a9f5d Fix some conflicts with windows.h in some configurations
Fixes build in the MSYS2 Clang/ClangARM64 environments.
2023-12-11 10:59:05 +01:00
0d6a8e0fb9 ok this one actually works 2023-12-10 19:22:30 -05:00
2bf033e0bc optimize per pixel timing counting 2023-12-10 18:51:00 -05:00
785fab024f dont use templates
bigger code <<< slower code
2023-12-10 13:03:54 -05:00
63a39b130e refactor framebuffers to be more similar to hw
allows for emulation of niche scanline glitches
2023-12-10 12:18:46 -05:00
c45d3320d0 tentative timings for "empty" polys scanlines, fix swapped polys breaking 2023-12-09 15:56:36 -05:00
92ca04e479 i forgot i changed those-- oops
no wonder edge marking was broken
how did this even still work
2023-12-09 10:58:23 -05:00
447cd50422 holds true when slopes are vertical and y > 50 2023-12-09 08:54:13 -05:00
8e2c9cbff6 wip initial draft 2023-12-09 08:54:13 -05:00
082310d5d5 hopefully reset all GPU3D attributes properly 2023-12-08 23:42:08 +01:00
6949100446 Fix GBA<->DS comm not working when using FreeBIOS
Thanks CasualPokePlayer for pointing this out
2023-12-08 18:34:38 +01:00
5ef35a4ccf Don't try to poke at the header on deinit if MPQueue is nullptr 2023-12-08 17:39:56 +01:00
890a66c0eb I'm sick of this interfering with debugging 2023-12-08 17:27:06 +01:00
5dac65f52e Fix some minor instances of undefined behavior 2023-12-08 17:19:00 +01:00
bbecab6cb0 Correctly use the refactored JitEnableWrite 2023-12-08 17:19:00 +01:00
72d4eba477 Rearrange some #includes 2023-12-08 17:19:00 +01:00
7cef13031f Add some headers that were transitively included by the JIT 2023-12-08 17:19:00 +01:00
399a6af91c Move some constants to MemConstants.h 2023-12-08 17:19:00 +01:00
53e5aa6298 Exclude JIT-related declarations more aggressively 2023-12-08 17:19:00 +01:00
733769303c Add override to the ARM64 JIT's destructor 2023-12-08 17:19:00 +01:00
582a421447 Don't set the JIT args if the JIT is off 2023-12-08 17:19:00 +01:00
644d190e98 Add stubs for NDS::IsJITEnabled and SetJITArgs for when the JIT is excluded 2023-12-08 17:19:00 +01:00
f4377e4f0f Remove a loose qualifier 2023-12-08 17:19:00 +01:00
2a35af5bb9 Soften restrictions around ARMJIT_Memory::RemapNWRAM
- If in NDS mode, return instead of `assert`ing
- Use `static_cast` and `ConsoleType` instead of `dynamic_cast`
2023-12-08 17:19:00 +01:00
1b7b5106e2 FreeBIOS: Ensure upper 16 bits are cleared in the initial crc16 value.
Fixes Castlevania: Dawn of Sorrow's checksumming which uses crc16 swi and has garbage in the upper 16 bits of r0.
The official BIOS would seem to implicitly clear these upper 16 bits.
2023-12-06 16:51:22 +01:00
090627b3c1 Remove the last ConfigEntry state (#1902)
* Get rid of `ConfigEntry::ExternalBIOSEnable`

- Now the BIOS files themselves are checked
- The frontend's `Config::ExternalBIOSEnable` is not affected

* Add `JITArgs`

* Pass the JIT status to the `ARM` constructors

* Encapsulate `NDS::EnableJIT`

* Pass `JITArgs` to `ARMJIT`'s constructor

* Remove the `JIT_*` `ConfigEntry`s in favor of members

- Allow all the JIT args to be set with `NDS::SetJITArgs`
- Encapsulate the JIT-related parameters in `ARMJIT` so they can reset the block cache if changed
- Update the active (or newly-created) console in the frontend with adjusted JIT args

* Make audio bit depth and interpolation configurable in `NDSArgs`

- Define enums for both
- Give those settings default values in `NDSArgs`
- Remove `ConfigEntry::AudioBitDepth`
- Initialize these settings in the relevant SPU constructors

* Move the last DSi-specific logic in `Reset` to its own subclass

* Remove `ConfigEntry::DSi_FullBIOSBoot`

- Add members to `DSi` instead for getting and setting this
- Update the frontend to accommodate these changes

* Oops, missed a spot

* Remove `ConfigEntry::Firm_MAC` and `Platform::GetConfigArray`

- Also move the MAC parsing code to `ROMManager`

* Remove the last `ConfigEntry` state

- Make GDB support configurable via members

* Add some `#ifdef`s that I'd almost forgotten
2023-12-05 16:47:16 +01:00