Commit Graph

32 Commits

Author SHA1 Message Date
Antonio Niño Díaz
5a10679dfb build: docs: Remove outdated devkitARM makefiles
Nitro Engine doesn't work with the current libraries of devkitARM. It's
better to remove the makefiles and to stop pretending that devkitARM is
supported. Updating the makefiles wouldn't be enough, though, it's likely
that the library will require code changes, as well as the examples.
2025-03-24 21:03:01 +00:00
Antonio Niño Díaz
39117696aa build: Uniformize all devkitARM makefiles
Add DATA and GRAPHICS directories to all of them so that it's easier to
maintain the files.
2024-12-31 16:20:02 +01:00
Antonio Niño Díaz
88d1b489f6 examples: Update BlocksDS Makefiles
They were missing several updates made over the last few months.
2024-08-14 00:43:55 +01:00
Antonio Niño Díaz
3ba35ba48e docs: build: library: examples: Set BlocksDS as main toolchain
Until now the main makefiles of Nitro Engine have been the ones of
devkitPro, forcing users to go through extra steps to build everything
under BlocksDS.

Now, the easy makefiles are the BlocksDS ones, and additional notes have
been added to warn about the limitations of devkitPro:

- No GRF support in libnds.
- NitroFS doesn't work in melonDS.
2024-06-02 17:38:52 +01:00
Antonio Niño Díaz
d7ecc5cc4d templates: examples: Fix linker invocation for C++
Using g++ to link object files automatically links the STD of C++. It looks
like this library is linked outside of the start/end-group commands with
the other libraries, which causes undefined reference errors when linking
C++ projects that use standard library functions that interface with the
OS, like `fopen()`.

Thanks to @lifehackerhansol for the report and testing the fix.
2024-03-26 18:54:35 +00:00
Antonio Niño Díaz
82171bbf69 chore: Simplify copyright years in notices
Instead of listing every individual year, keep only the first and last
years.
2024-03-09 01:42:29 +00:00
Antonio Niño Díaz
47c8061168 examples: test: Refactor to avoid global variables
Using global variables is generally discouraged. Now that NE_ProcessArg()
and NE_ProcessDualArg() exist, it's better to show how to use them instead
of NE_Process() and NE_ProcessDual() while using global variables.

Also, switch from "int main(void)" to "int main(int argc, char *argv[])".
2024-03-08 18:44:02 +00:00
Antonio Niño Díaz
441997c50c examples: Remove unused files in NFlib template 2024-01-27 19:47:12 +00:00
Antonio Niño Díaz
6fde18d712 library: examples: Use stdint.h types 2023-11-17 01:00:40 +01:00
Antonio Niño Díaz
a4c1b40c7a build: Update makefiles of BlocksDS 2023-11-11 18:00:41 +00:00
Antonio Niño Díaz
0d5bd874e8 examples: library: Simplify dual 3D mode selection
Instead of having a different set of functions for each dual 3D mode,
have one set of functions that is clever enough to select the right code
to run based on the initialization function.
2023-10-09 22:58:10 +01:00
Antonio Niño Díaz
302c22241e examples: Always enable debug console in the templates 2023-10-09 01:32:06 +01:00
Antonio Niño Díaz
b66bf16f6f examples: Update dual 3D template to use safe dual 3D 2023-10-09 01:32:06 +01:00
Antonio Niño Díaz
3fbdc28df0 examples: Fix build of NFlib template in devkitPro
filesystem.h doesn't include stdbool.h in devkitPro, but it does in
BlocksDS.
2023-10-09 00:53:05 +01:00
Antonio Niño Díaz
93817c200e examples: Remove outdated warning about NFlib integration 2023-05-09 03:17:29 +02:00
Antonio Niño Díaz
4f03b1be5e examples: Fix NFLib template
After a recent change [1] it is required to start the filesystem
manually before initializing NFLib.

[1] ef23e0418a
2023-04-16 12:51:40 +01:00
Antonio Niño Díaz
d659bc8915 build: docs: Support BlocksDS 2023-04-01 15:15:02 +01:00
Antonio Niño Díaz
070c9ec083 templates: Remove copy of NFlib
Use the version installed in the system instead.
2023-04-01 14:45:03 +01:00
Antonio Niño Díaz
43a882e98f examples: Start adapting examples for BlocksDS
iprintf() is only present in newlib, not picolibc. It is a non-standard
function, so avoid using it.
2023-04-01 14:39:58 +01:00
Antonio Niño Díaz
8c42302c23 build: Small changes to assets.sh scripts and ROM titles 2023-04-01 14:35:09 +01:00
Antonio Niño Díaz
1acfca1a24 examples: Wait for VBL in the right place
This change is a bit pedantic, but it makes the ROMs run better in
DeSmuMe.

Some examples (particularly the dual 3D examples) used to flicker during
one or two seconds right after starting. In dual 3D examples the top and
bottom screen would start swapped, and they would eventually swap and
stop flickering. This would never happen in melonDS or real hardware.

I suspect this is because of the interaction between GFX_FLUSH and
swiWaitForVBlank(), where there would be some timing difference to reach
the first swiWaitForVBlank() or GFX_FLUSH, and that caused the desync.

This commit moves swiWaitForVBlank() to the beginning of the game loop.
This means that, even in the first iteration of the game loop, all
emulators and hardware will be synchronized. This doesn't actually
matter in any other situation, it just makes the first iteration
consistent.
2023-01-21 19:32:02 +00:00
Antonio Niño Díaz
2e9ff26e6d examples: Add note to NFlib example 2022-11-10 01:30:01 +00:00
Antonio Niño Díaz
20682a18e0 examples: Add precompiled NFlib archive
Yes, this is a bad idea, but there is no other way to easily build all
examples in one go. I will eventually improve the organization of this
example so that this step is done automatically during the build.
2022-11-09 23:01:07 +00:00
Antonio Niño Díaz
bb04ea86a5 examples: docs: Add example of NFlib and NE integration
https://github.com/knightfox75/nds_nflib
2022-11-09 01:56:22 +00:00
Antonio Niño Díaz
da2be26de1 examples: Change license to CC0-1.0 2022-10-16 22:55:06 +01:00
Antonio Niño Díaz
db8add4d7e example: Cleanup source files 2022-10-16 22:03:41 +01:00
Antonio Niño Díaz
e98698febf Update Makefiles to the ones used by devkitARM now
Fetched from:

    6afa09b205

Reported by lifehackerhansol:

    https://github.com/DS-Homebrew/TWiLightMenu/issues/1753
2022-01-18 18:23:23 +00:00
Antonio Niño Díaz
930916fa35 Minor fixes to examples 2019-06-09 01:58:58 +01:00
Antonio Niño Díaz
7d31063039 Convert all example files to UNIX line endings 2019-06-04 17:56:18 +01:00
Antonio Niño Díaz
2a9a2ce0cc Change expected install path of Nitro Engine
Now it should be $(DEVKITPRO)/nitro-engine
2019-06-04 16:40:00 +01:00
Antonio Niño Díaz
c2c9b41c9a Fix style of Makefiles
Also, convert line endings to UNIX-style endings.
2019-06-04 16:36:20 +01:00
Antonio Niño Díaz
4640f17c4a Rename all folders to lowercase 2019-06-04 15:57:30 +01:00