Commit graph

2685 commits

Author SHA1 Message Date
Clownacy
f652fb7016 Update readme with 3DS build instructions 2020-10-14 20:21:18 +01:00
Clownacy
094990b6ad 3DS - Remove warnings about a crash
This crash on longer occurs
2020-10-14 20:05:33 +01:00
Clownacy
785781c133 3DS - Deobfuscate some raw values 2020-10-14 20:05:12 +01:00
Clownacy
c396dede92 3DS - Take advantage of C++ default parameters 2020-10-14 20:03:01 +01:00
Clownacy
ccf1a6cd23 3DS - No more 'depth = 0.5'
We're not doing 3D
2020-10-14 20:02:03 +01:00
Clownacy
7987243427 3DS - Initialise screen render-target ourselves
Citro2D allocates a depth buffer for some reason, but CSE2 works fine
without one, even on real hardware
2020-10-14 19:59:00 +01:00
Clownacy
790a25ba6b 3DS - Move common code to functions 2020-10-14 19:51:19 +01:00
Clownacy
56da7dfe99 3DS - Slight optimisation 2020-10-14 19:47:10 +01:00
Clownacy
aafb8dd302 3DS - Make glyph system independent of surfaces 2020-10-14 19:40:37 +01:00
Clownacy
5756612212 3DS - Cleanup 2020-10-14 19:33:35 +01:00
Clownacy
196ff6ac2f 3DS - Only call C2D_SceneBegin when we have to
Looking at Citro2D's source, it has a bunch of overhead
2020-10-14 19:32:21 +01:00
Clownacy
8f87aa108e 3DS - Add glyph rendering 2020-10-14 19:27:18 +01:00
Clownacy
658c38b350 Remove unnecessary function calls
These are called internally by libctru
2020-10-14 18:41:12 +01:00
Clownacy
e732534e91 3DS - Fix hang on shutdown 2020-10-14 18:40:37 +01:00
Clownacy
c50155b1b0 Better way to handle EnableAlpha mid-frame
This should have much lower overhead
2020-10-14 16:17:02 +01:00
Clownacy
d006b6c439 Update readme to not FREETYPE_FONTS option 2020-10-14 16:03:21 +01:00
Clownacy
fcba88f2e1 3DS - Delete old files 2020-10-14 16:01:44 +01:00
Clownacy
54817eda51 3DS - Fix EnableAlpha 2020-10-14 15:50:50 +01:00
Clownacy
3f6ac2ee5f Correct indentation 2020-10-14 15:50:22 +01:00
Clownacy
4c034571c8 3DS - Note a crash 2020-10-13 22:27:15 +01:00
Clownacy
007b455426 3DS - Correct an error message 2020-10-13 21:36:08 +01:00
Clownacy
36f9fb6fec 3DS - Avoid redundant code
I love C's syntax so much
2020-10-13 21:35:36 +01:00
Clownacy
2601a2c4e7 3DS - Fix garbage data showing on Loading screen 2020-10-13 21:34:25 +01:00
Clownacy
9c24ab9338 3DS - Remove attributes
Leftover from the software renderer
2020-10-13 21:30:53 +01:00
Clownacy
87652c50f5 Remove unnecessary #include 2020-10-13 21:30:31 +01:00
Clownacy
e45ee3c189 3DS - Fix corrupted graphics on real hardware 2020-10-13 21:12:46 +01:00
Clownacy
a82189b0c9 3DS - Fix more corruption
I swear I'm normally a good programmer ;_;
2020-10-13 20:59:20 +01:00
Clownacy
b6ff494f54 3DS - Fix alpha and corruption 2020-10-13 20:57:20 +01:00
Clownacy
0f6768e6e6 Misc 3DS cleanup and tweaks 2020-10-13 20:00:30 +01:00
Clownacy
65aac0bb21 Convert the 3DS renderer to Citro2D
Not finished yet - there's no glyph support, and for some reason the
level tileset isn't reloading properly
2020-10-13 18:56:07 +01:00
Clownacy
82630cedb7 Added unfinished 3DS hardware renderer
I'm commiting what I have now because I'm thinking of switching to
Citro2D instead of Citro3D.
2020-10-13 13:22:02 +01:00
Clownacy
ffcd989cea Remove unnecessary whitespace 2020-10-13 13:21:30 +01:00
Clownacy
b6fe4f175c Make SDL2 controller backend safer
There were some edgecases that would causes crashes
2020-10-12 21:46:47 +01:00
Clownacy
a77cc0a559 Optimise the 3DS port (now runs okay on Old3DSs)
This commit customises the software renderer specifically for the
3DS, taking into account its rotated framebuffer and BGR format.

With this, the game appears to run full-speed on Old3DSs. Of course,
the level transition effect still makes the console chug, but that
thing was always a bit of a bottleneck.
2020-10-12 17:32:31 +01:00
Clownacy
8513a1d7d8
Correct 3DS Backend_PrintInfo writing to stderr 2020-10-12 10:37:19 +01:00
Clownacy
b5292f0ce7 Update remaining platform backends 2020-10-11 21:28:04 +01:00
Clownacy
f9993b264c Fix dumb typo 2020-10-11 21:18:52 +01:00
Clownacy
5b4778fb06 Fix the 3DS crash when closing
For whatever reason, the 3DS *really* doesn't like it when I do all
the audio mixing in the callback function. Instead, it seems I have
to use a dedicated thread.
2020-10-11 21:16:47 +01:00
Clownacy
6df224400c Okay never mind this doesn't avoid it at all
Seriously wtf why is it crashing
2020-10-11 16:01:27 +01:00
Clownacy
0a99762fec Force 3DS to 320x240 by default
I kind of want to avoid hacks like this, but I suppose I can find a
proper way to do this in the future.
2020-10-11 15:59:40 +01:00
Clownacy
8d296f0385 Allow backend to specify data folder
On the 3DS, I want the data files to go in the read-only ROMFS, while
save data goes on the SD card. This is impossible with the current
system, so I'm changing it.

The other backends will need updating to support this.
2020-10-11 15:58:48 +01:00
Clownacy
f3ff030869 Avoid 3DS crash when closing the game 2020-10-11 15:58:27 +01:00
Clownacy
2a73c12a5f 3DS cleanup 2020-10-11 15:17:00 +01:00
Clownacy
c398ec7c25 Cleanup and enable New3DS speedup 2020-10-11 14:42:27 +01:00
Clownacy
80725016f7 Add mutexes to 3DS audio backend
Doesn't seem to fix the annoying crashes though...
2020-10-11 14:42:04 +01:00
Clownacy
75a31005d1 Add basic 3DS audio support
It's using the software mixer for now. I might be able to make it
hardware-accelerated in the future.
2020-10-11 14:27:39 +01:00
Clownacy
7013c28e26 Remove an unnecessary newline 2020-10-11 14:27:10 +01:00
Clownacy
5597245865 Optimise 3DS rendering a little
Double-buffering is enabled by default, and I don't need to flush
every single buffer.
2020-10-11 14:26:15 +01:00
Clownacy
10c4831160 Better 3DS debug logging and fix console output
Was using the wrong screen
2020-10-11 14:25:48 +01:00
Clownacy
f5b3b2e0d0 Add a basic 3DS port
Was a lot easier than I expected. The software renderer is such a
godsend for quick-and-dirty ports.

Oddly enough, even on an old3DS, this actually almost runs at full
speed (hits around 40FPS in Mimiga Village).

There's a lot of work left to do before this is actually useable:
* There's no audio
* You can't save
* A proper hardware-accelerated renderer is needed
2020-10-11 00:09:22 +01:00