Commit graph

572 commits

Author SHA1 Message Date
Sean Maas
c7a1736fa9 Reduce frame stutters
There are almost no stutters on the Switch now, but desktop doesn't
seem to have changed much.
2020-06-04 18:47:11 -04:00
Sean Maas
986e74f375 Various cleanups, fixes, and adjustments 2020-06-03 23:13:34 -04:00
Sean Maas
33598c213c Add option for GBA crop and share layout code between platforms 2020-06-01 16:37:41 -04:00
Sean Maas
eb252da72d Get back some of the performance that GBA support took
There's a lot of stuff I want to clean up (honestly the whole
codebase feels like a major OCD attack) but GBA support is working
pretty well and I want to get it merged into master. Hopefully I
can find the motivation to do some cleanup afterwards (I'm always
putting it off, bleh).
2020-06-01 00:14:32 -04:00
Sean Maas
d7df7aef03 Implement the GBA PSG sound channels
Not gonna lie, this was way less fun than the DS sound chip
2020-05-30 23:43:39 -04:00
Sean Maas
0579da13d8 Implement GBA saves 2020-05-29 19:08:31 -04:00
Sean Maas
2dfd5daebb Implement the GBA DMA sound channels 2020-05-29 02:36:14 -04:00
Sean Maas
6e32136ed6 Fix GBA H-blank DMA transfers 2020-05-28 16:56:01 -04:00
Sean Maas
e3cbbb763a Fix GBA cart access on ARM7 DMA channels 2020-05-28 16:07:43 -04:00
Sean Maas
2c6bcc4c9a Draw GBA screen border and stub audio to allow FPS limiting
Yes I know this is a mess
I will clean it before I merge it into master
2020-05-28 14:46:51 -04:00
Sean Maas
eba3e5b97c Add affine backgrounds to GBA mode 2020-05-28 06:00:06 -04:00
Sean Maas
80038a4eb4 Fix GBA object tile mapping
Also fixed a crash when the DS firmware isn't loaded
2020-05-28 05:10:57 -04:00
Sean Maas
a9a26c03b1 Map the GBA ROM better 2020-05-28 04:47:04 -04:00
Sean Maas
184613af50 Add text layers for GBA mode + slight cleanup 2020-05-28 03:27:36 -04:00
Sean Maas
a776d15048 Preliminary, messy GBA support 2020-05-28 00:49:23 -04:00
Sean Maas
da29a39614 Fix a bug in the POP PC instruction on ARM7 2020-05-27 19:33:01 -04:00
Sean Maas
a043d257b1 Minor timer fixes
Fixes audio issues in some games
2020-05-21 05:45:07 -04:00
Sean Maas
624a57f60a Minor desktop layout fixes 2020-05-16 07:57:43 -04:00
Sean Maas
b8773491d0 Fix yet another potential threaded 3D crash 2020-05-16 05:47:55 -04:00
Sean Maas
f5cc2e52f4 Properly handle unaligned memory accesses
Fixes #6
2020-05-16 05:31:07 -04:00
Sean Maas
4ebd2ca5dd Upgrade MSYS2 wxWidgets, downgrade devkitA64
The wxWidgets linking issue seems to be fixed. Unfortunately, now
the latest devkitA64 package is causing trouble for the Switch
build, causing insanely long startup times and performance loss.
2020-05-16 00:15:26 -04:00
Sean Maas
45fd5b2f1c Allow choosing light or accurate FPS limiting on desktop 2020-05-15 23:03:19 -04:00
Sean Maas
b53b083dbb Fix an accidental depth buffer regression 2020-05-11 01:33:49 -04:00
Sean Maas
0e260a151d Allow configuring thread count for threaded 3D 2020-05-11 00:59:55 -04:00
Sean Maas
f70fc2afc5 Bring back condition variables on the Switch
I hate platform-specific code but I hate losing performance even more
2020-05-10 04:52:58 -04:00
Sean Maas
dfc906a88d Improve FPS limit reliability by not relying on condition variables 2020-05-10 03:49:19 -04:00
Sean Maas
47cf95825c Fix cases of overlapping shadows 2020-05-09 15:16:59 -04:00
Sean Maas
b36570d6b1 Properly implement shadow polygons 2020-05-09 06:28:25 -04:00
Sean Maas
92cf64244e Fix the GL canvas blocking program closure
Also set texture clamping to make filtering look better
2020-05-07 06:20:20 -04:00
Sean Maas
9238db3936 Manually install an old, working MSYS2 wxWidgets package
The latest package doesn't seem to link properly. Hopefully it gets
fixed soon and this can be reverted.
2020-05-06 19:12:17 -04:00
Sean Maas
b5b9a99d74 Add screen layouts 2020-05-06 06:33:42 -04:00
Sean Maas
0c7a3ba600 Fix an object blending bug caused by the previous fix 2020-04-29 22:39:42 -04:00
Sean Maas
827b8255b4 Fix blending layers with the same priority 2020-04-29 01:32:13 -04:00
Sean Maas
075b093683 Implement noise channels 2020-04-29 00:17:35 -04:00
Sean Maas
65a3362bf9 Add WiFi RAM and a temporary hack for gen 4 Pokemon games 2020-04-27 01:39:58 -04:00
Sean Maas
13e99f494f Reduce memory usage by only saving one scanline per layer
As opposed to saving an entire framebuffer. This saves about 1.5MB
of memory, and somehow seems to give a significant performance boost
on the Switch? Well, I won't complain :)
2020-04-25 23:59:27 -04:00
Sean Maas
0c8cc71ce0 Fix missing break statements
I'm a dummy
2020-04-25 04:17:30 -04:00
Sean Maas
4653919660 Improve 3D interpolation to fix artifacts 2020-04-25 00:05:37 -04:00
Sean Maas
9b18c3f556 Compile separate object files 2020-04-23 02:28:53 -04:00
Sean Maas
e7a2c83741 Implement the viewport command and make threads safer
The formula for scaling 3D X and Y coordinates is now more accurate,
which fixes issues most noticeable in some 2D graphics such as the
player sprite in Pokemon Black and White.
2020-04-21 01:40:30 -04:00
Sean Maas
744ac4c9a8 Update for libnx v3.1.0 2020-04-07 19:59:04 -04:00
Sean Maas
74465dc835 Allow passing a filename through the command line 2020-04-07 19:46:32 -04:00
Sean Maas
fe9d264dbc Improve threaded 3D a bit 2020-04-03 00:32:45 -04:00
Sean Maas
73851fc8a3 Draw the framebuffer with OpenGL + Add filter and int scale settings
wxPanel was causing an absurd amount of slowdown when enlarging the
window. Drawing with OpenGL mitigates the problem, but having a hard
dependancy on OpenGL isn't ideal. If this causes issues for anyone,
the old code can be brought back, or added as an option.
2020-03-24 19:48:08 -04:00
Sean Maas
63cd90a95d Use enums like a sane person 2020-03-24 03:03:14 -04:00
Sean Maas
d315ceddaa Add a pause menu to the Switch UI
Plus other minor adjustments to make everything just right :)
2020-03-23 21:55:25 -04:00
Sean Maas
e45216199f Rewrite 2D blending to be faster and more accurate 2020-03-23 08:25:44 -04:00
Sean Maas
c323271422 Implement the BOX_TEST command
Fixes missing geometry in the Pokemon games
2020-03-22 00:41:37 -04:00
Sean Maas
ee67792c75 Stub an IR-related command
Fixes exp. gain in Pokemon Black and White
2020-03-21 18:34:56 -04:00
Sean Maas
23d4c24d77 Give the Switch build a proper UI
This is essentially the UI that I wrote for my port of melonDS to
the Switch, but I rewrote it to be cleaner and easier to use. It's
still missing a pause menu, because there are some compilcations
that need to be worked out. Still, this is much better than having
no UI!
2020-03-21 07:38:05 -04:00