Commit Graph

10 Commits

Author SHA1 Message Date
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
6fde18d712 library: examples: Use stdint.h types 2023-11-17 01:00:40 +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
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
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
bb04ea86a5 examples: docs: Add example of NFlib and NE integration
https://github.com/knightfox75/nds_nflib
2022-11-09 01:56:22 +00:00