Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nintendo 3DS port #408

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Nintendo 3DS port #408

wants to merge 3 commits into from

Conversation

MrHuu
Copy link

@MrHuu MrHuu commented Aug 11, 2024

This is a very basic initial port to the 3DS platform.

  • BRender software rendering
  • no miniaudio implementation
  • runs relatively slow on New3DS

It builds using the 3DS.cmake toolchainfile provided by devkitpro:
cmake .. -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/3DS.cmake

@tpimh
Copy link

tpimh commented Oct 7, 2024

Great work! I believe PSP port would take a bit more effort, but it's definitely possible.

@Rinnegatamante
Copy link

@MrHuu You don't have Issues enabled on your fork so leaving it here: https://github.com/Rinnegatamante/dethrace/blob/main/src/harness/audio/miniaudio.c

Here I've implemented both a native SceAudio and an SDL2 audio backend. The SDL2 one should be usable for your 3DS port.

@MrHuu
Copy link
Author

MrHuu commented Dec 31, 2024

Thank you very much @Rinnegatamante ! I was able to create a quick build using your SDL2 implementation and it's working quite nice. There is some stuttering during the intro videos, but in the menu's and in-game it seems to work perfectly. I'll update the 3DS port to reflect these changes.

Nice work on your Vita port, i very much appreciate your work towards both SDL2 and Vita implementations. Thanks again for pointing this out!

MrHuu added 2 commits January 5, 2025 18:24
 - remove SDL2 dependencies from 3DS platform
 - citro3d renderer
 - threaded ndsp audio
 - .cia build
@MrHuu
Copy link
Author

MrHuu commented Jan 5, 2025

I ended up in recreating a native ndsp audio backend, based on the SceAudio implementation. Increased the sample amount to fix the stuttering during the videos. And while at it, also re-implemented some of the other fixes from the Vita port.

Overall i was able to gain a few fps, and the working audio and music really makes the difference.

Thank you very much @Rinnegatamante !

@Rinnegatamante
Copy link

You're welcome. The thread stack increase by the way, don't know if it's necessary. I just keep it for good norm on my ports toa void any silly edge case stack overflow.

@MrHuu
Copy link
Author

MrHuu commented Jan 5, 2025

Yeah, i havn't checked some of the memory allocations properly yet. It probably has to be finetuned a bit, as i already noticed the audio from the smacker videos consume a lot of heap. They currently run out of memory about half way causing the audio to stop during playback. Reducing the stacksize and libctru allocated linear heap seems to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants