Skip to content

fix: removed getenv for tex3ds and added early verification - #25

Open
gsalvador209 wants to merge 261 commits into
Project-Sunshine-Native:mainfrom
gsalvador209:main
Open

fix: removed getenv for tex3ds and added early verification#25
gsalvador209 wants to merge 261 commits into
Project-Sunshine-Native:mainfrom
gsalvador209:main

Conversation

@gsalvador209

Copy link
Copy Markdown

Fixed issue #23:
Root cause: The getenv() function retrieves a wrongly defined path in Windows as /opt/devkitpro/devkitARM by default, which is a wrong path for Windows.

The image at gfx\backgrounds\bg_00120.t3x is the first using tex3ds so when trying to execute the command using the wrong path was raising the error.

I also added an early veryfication for the existence of the tex3ds program using the standard path, given to the user the feedback to use the --tex3ds flag.

This was only tested on Windows.
Example of early feedback:
image

MrPowerGamerBR and others added 30 commits March 17, 2026 12:02
Undertale tries opening and closing INI files ON EVERY FRAME when the save dialog is open

While this does not matter in modern systems, it WILL cause slow downs on the PlayStation 2 target

So, to workaround this, we'll keep it in memory
We also copy a ICON.ICO file from the boot device folder, which is used for the PlayStation 2 save icon
Some objects, like obj_snowfloor, are VERY laggy
This way we can fit more things in the atlas
Useful to increase I/O speed, because Undertale's textures are mostly flat textures
Run
Once ./build-cmake-n3ds.sh
then
./build-n3ds.sh
to build
Add a TODO list for features.
- Removed OpenGL and GLFW dependencies, replacing them with Citro2D for rendering.
- Updated input handling to use Citro2D's input methods instead of GLFW.
- Commented out unused functions and code related to GLFW and OpenGL.
- Initialized graphics and input systems specific to the N3DS platform.
- Adjusted the main loop to accommodate N3DS-specific timing and frame management.
- Added TODOs for future implementation of rendering and input handling.

Tried to build, failed with linker errors.
Add stb_image and stb_ds implementations for image handling

- Updated CMake configuration to include stb_image and stb_ds headers.
- Added stb_impl.c to provide implementations for stb_image and stb_ds.
- Modified main.c to include stb_ds and stb_image_write headers.
- Adjusted build scripts to ensure stb_impl.o is compiled and linked.
- Incremented progress markers to reflect new build targets.
Add N3DS file system support and logging functionality

- Introduced N3DSFileSystem for handling file operations specific to the 3DS environment.
- Updated main application logic to utilize the new N3DSFileSystem for reading files.
- Implemented logging to SD card for tracking application events and errors.
- Modified build configuration to include new source files and update linking.
- Enhanced progress tracking in build system.
- Cleaned up command line argument parsing and removed unused code.
Honestly, there isn't a lot of things that we can do to improve the I/O latency when loading from a CDVD, so the last restort is moving things to EE RAM, which DOES improve hitches a lot
For some REASON these cause the game to stop crashing when the audio system is enabled, this makes no sense
… PS2 target

mallinfo was not considering things like the ELF size, so I was confused to why malloc was failing WAY eariler than it should've been
We MUST keep the free RAM above ~495616 to avoid the game freezing for no apparent reason
Used in the Asriel battle
Used in the Asriel battle
Runner_draw CAN execute GML code, so we need to make sure that it is ran when the GM:S games expect it
adlerriggstablet-glitch and others added 29 commits May 23, 2026 00:36
Revert fuckup
We do not use this yet, this was merged from the main repo and because of the specific changes that were made for cinnamon it was yelling about github actions failing
Added instructions for building and using the 3DS version of the project, including setup, commands, and output details.
… additional instructions, as well as updated 3DS source
…he specified path, and add the -O3 compiler flag for 3DS
…vent room, better atlas ram caching, and remove cwavtool dependancy entirely from preprocessor as that is no longer needed
Change preprocessor usage section to reference "Cinnamon" directly instead of "3DS port", as that can be confusing.
Added a check to prevent buffer overflow in appendDebugName function.
Fix buffer overflow in appendDebugName function
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.