Commit Graph

1740 Commits

Author SHA1 Message Date
RSDuck f060162dac attempt at fixing #1037 2021-03-17 16:44:54 +01:00
RSDuck fbe691a673 fix read from unassigned variable for large BGs 2021-03-16 20:57:30 +01:00
Arisotura 7f8a58b8fe Set up CI with Azure Pipelines
blarg [skip ci]
2021-03-15 19:28:56 +01:00
RSDuck 436b3c4c1d update copyright year and add missing GPL headers 2021-03-12 20:07:40 +01:00
WaluigiWare64 a08f70e3a5
Set macOS Deployment Target to 10.14 2021-03-12 17:53:50 +00:00
RSDuck bc63531e00 avoid leaking threads in NDSCart_SRAMManager
also atomics
2021-03-11 16:54:43 +01:00
WaluigiWare64 ae7761c33e
Remove temporary macOS CI workarounds 2021-03-08 12:50:09 +00:00
WaluigiWare64 0ea85fdd2b
Use setup-msys2 GitHub Action (#1029)
* Use setup-msys2 GitHub Action

This makes the Windows CI a few minutes faster
2021-03-06 19:37:51 +00:00
RSDuck 6a3aa551da remove direct reference to Switch frontend header 2021-03-03 00:43:56 +01:00
WaluigiWare64 cb34032ac8
Set macOS Deployment Target to 10.13
It's the minimum that the latest Qt 5 supports
2021-03-01 13:12:02 +00:00
RSDuck 41dd448e28 call Renderer2D::VBlankEnd at vblank end
instead of vblank start
2021-03-01 04:06:11 +01:00
RSDuck a046eb5038 separate GPU2D registers and renderer 2021-02-27 22:25:42 +01:00
nia f8692f85a4
Only use special ar and ranlib command when ENABLE_LTO is ON. (#1018)
This allows melonDS to be built with the standard system toolchain
on NetBSD, see discussion in #1016
2021-02-26 16:54:36 +00:00
WaluigiWare64 89051f63d4
Define CONTEXT_PC and use instead for much cleaner code (#1017)
* Define CONTEXT_PC and use instead for much cleaner code

Also include ways to get the Program Counter on ARM64 FreeBSD and NetBSD
2021-02-25 21:17:11 +00:00
WaluigiWare64 81980d2836
Request microphone permissions on macOS 2021-02-25 09:12:22 +00:00
WaluigiWare64 68da2ace58 Include winsock2.h before windows.h 2021-02-23 18:15:02 +00:00
SuuperW 94dcc9523e
SRAM things (#970)
* Allow SRAMManager to save to/load from a buffer.

* Don't delete what doesn't exist. Don't create a thread that will do absolutely nothing.

* Update SRAMManager's SecondaryBuffer when loading a savestate.
2021-02-23 02:46:02 +01:00
RSDuck 58dd1ec580 directly set VRAMDirty for VRAM BG/OAM writes 2021-02-23 02:09:18 +01:00
Nadia Holmquist Pedersen 97643586fa
Fix OpenGL display scaling on high DPI (#1011)
* Fix OpenGL display scaling on high DPI

* Scale the OSD too

* Fix indent
2021-02-22 18:17:48 +01:00
WaluigiWare64 532dc57025
Fix the JIT Code Memory on ARM64 Macs (#916) 2021-02-22 15:13:39 +00:00
RSDuck 0aa0ae6c69 fix #1010 2021-02-22 02:38:21 +01:00
wheremyfoodat 03b465c5e2
Fix edge case in the division engine, fix edge case in the CPU (#1003)
* Fixed division edge case: Div64/32 and Div64/64 set the remainder to 0 if dividend == INT64_MIN && divisor == -1

* Fixed CPU edge case where ARM9 ALU ops would switch to Thumb even when they shouldn't

* Only clear the lowest bit of the jump address in ALU ops with rd==15 (on recommendation of RSDuck)
2021-02-19 23:58:41 +01:00
WaluigiWare64 a8b2c22306
Various Readme fixes 2021-02-17 21:45:17 +00:00
WaluigiWare64 712919ec41
Remove unneeded OpenGL loading function code (#1006) 2021-02-17 20:53:07 +00:00
RSDuck 64c6654d94 use syncs instead of glFinish 2021-02-16 15:00:23 +01:00
RSDuck 295d60e4cb try to fix build when the compiler is stricter 2021-02-11 19:11:18 +01:00
RSDuck f1e0816c1a detach and delete shaders directly after linking 2021-02-11 18:38:52 +01:00
RSDuck f05bc50d40 use std::function in Thread_Create so we can revert back to using it 2021-02-11 16:00:36 +01:00
gal20 d63f7977f8
Remove code duplication in `onChangeScreenSize` (#968) 2021-02-09 23:42:31 +01:00
Wunk a7029aebae
Allow for a more modular renderer backends (#990)
* Draft GPU3D renderer modularization

* Update sources C++ standard to C++17

The top-level `CMakeLists.txt` is already using the C++17 standard.

* Move GLCompositor into class type

Some other misc fixes to push towards better modularity

* Make renderer-implementation types move-only

These types are going to be holding onto handles
of GPU-side resources and shouldn't ever be copied around.

* Fix OSX: Remove 'register' storage class specifier

`register` has been removed in C++17...
But this keyword hasn't done anything in years anyways.

OSX builds consider this "warning" an error and it
stops the whole build.

* Add RestartFrame to Renderer3D interface

* Move Accelerated property to Renderer3D interface

There are points in the code base where we do:
`renderer != 0` to know if we are feeding
an openGL renderer. Rather than that we can instead just have this be
a property of the renderer itself.
With this pattern a renderer can just say how it wants its data to come
in rather than have everyone know that they're talking to an OpenGL
renderer.

* Remove Accelerated flag from GPU

* Move 2D_Soft interface in separate header

Also make the current 2D engine an "owned" unique_ptr.

* Update alignment attribute to standard alignas

Uses standardized `alignas` rather than compiler-specific
attributes.

https://en.cppreference.com/w/cpp/language/alignas

* Fix Clang: alignas specifier

Alignment must be specified before the array to align the entire array.

https://en.cppreference.com/w/cpp/language/alignas

* Converted Renderer3D Accelerated to variable

This flag is checked a lot during scanline rasterization. So rather
than having an expensive vtable-lookup call during mainline rendering
code, it is now a public constant bool type that is written to only once
during Renderer3D initialization.
2021-02-09 23:38:51 +01:00
RSDuck 891427c75c fix #994 2021-02-09 23:36:46 +01:00
RSDuck e7ee3b7bc8 wild shot into the dark 2021-02-09 22:19:44 +01:00
RSDuck 6256a42e00 improve and fix NonStupidBitfield also get rid of some UB
fixes optimised lto clang build
2021-02-09 19:24:57 +01:00
WaluigiWare64 1112162e99
Add build status badges 2021-02-04 10:10:49 +00:00
WaluigiWare64 2502c8d212
Add NetBSD support (#985)
Note - This will require PaX MPROTECT to be disabled for melonDS by running:
paxctl +m melonDS
2021-02-03 16:14:53 +00:00
RSDuck 7b9b8418cb fix #978 2021-02-02 20:37:28 +01:00
RSDuck 2e999ae1b8 attempt at fixing #972 2021-02-02 16:29:23 +01:00
RSDuck 40aae154cf prevent race condition around framebuffers 2021-02-02 15:33:45 +01:00
WaluigiWare64 b5e601bb88
Try to fix Ubuntu AArch64 CI (#979)
Also remove previous fixes, they were fixed upstream
2021-02-02 13:29:51 +00:00
WaluigiWare64 0d301c2434 Remove flatpak from main repo
melonDS is on flathub and the flatpak package is maintained on a seperate repository.
2021-02-01 17:49:37 +00:00
WaluigiWare64 f9e701a719
Initialise cursor hiding timer before potential deletion of ScreenPanelGL 2021-01-29 16:05:51 +00:00
RSDuck a3f4aaf503 call glFlush only once
that seems to atleast get rid of the flicker
the weird issue that clears don't work is still there
2021-01-29 12:38:31 +01:00
Nadia Holmquist Pedersen b75b3f69b7
Don't save the window size to the config if in full screen (#933) 2021-01-27 00:14:24 +01:00
RSDuck 4a28068295 the rasteriser doesn't have to be done on line 144
thanks to the VRAM cache
2021-01-26 19:05:21 +01:00
RSDuck aceabe92e6 fix recent regression in screen layout calculation 2021-01-26 18:19:25 +01:00
RSDuck b78bc4cb66 fixes to the threadedness of the sw rasteriser
also fix #639 and fix #880
2021-01-26 16:42:27 +01:00
WaluigiWare64 ab222ab135
Use libepoxy to load in OpenGL functions (#960)
* Use libepoxy to load in OpenGL functions

Prevents having to load them in manually

* Install libepoxy in the CI

* Do not link OpenGL libraries, libepoxy opens them itself

* Add libepoxy to build instructions
2021-01-26 13:19:32 +00:00
gal20 54b1a752d4
Add hybrid layout (#772) 2021-01-25 19:47:54 +01:00
WaluigiWare64 43348210f9 Fix some compiler warnings 2021-01-25 14:12:13 +00:00
RSDuck b9a56bc4e4 more screen modes
- add support for different aspect ratios
- add support for displaying only one screen at once
2021-01-24 22:32:13 +01:00