devkitPro / libnds

C library for Nintendo DS
http://devkitpro.org/viewforum.php?f=38
Other
331 stars 46 forks source link

Release 2.0.0 broke display on both emulators (DeSmuME, melonDS, no$GBA) and real hardware (DS Lite) #62

Closed Chi-Iroh closed 1 hour ago

Chi-Iroh commented 2 hours ago

Bug Report

What's the issue you encountered?

I updated libnds to the 2.0.0-6 version using pacman, and noticed it broke the display.
I compiled a game I made earlier again after the update, and launched it with DeSmuME (0.19.3-1), melonDS (0.9.5-6) and no$GBA (with wine 9.20-1) on my x86_64 ArchLinux, and they all only displayed two white screens.

Then I tried launching the game on real hardware (DS Lite), and only backgrounds are displayed, not sprites.

How can the issue be reproduced?

This libnds commit was fine, my game worked well with it. You can compile my game using the above link (make command is enough), and run it. I also found that debugging with iprintf seems to work correctly, you can try with this assembly file :

    .section .text
    .global main

main:
    push {lr}
    bl consoleDemoInit
    ldr r0, =msg
    mov r1, #42
    mov r2, #24
    bl iprintf

loop_forever:
    b loop_forever
    pop {pc}

    .section .rodata
msg:
    .asciz "Hello World! Values: %d and %d\n"

It displays white screens on the aforementioned emulators, but works as expected on my DS Lite.

Environment?

As said before, I use Arch Linux x86_64, my uname -a : Linux hostname 6.11.7-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 08 Nov 2024 17:57:56 +0000 x86_64 GNU/Linux.
Here are my devkitpro environment variables :

DEVKITARM=/opt/devkitpro/devkitARM
DEVKITPPC=/opt/devkitpro/devkitPPC
DEVKITPRO=/opt/devkitpro

I only use official binaries from pacman, and I didn't modify my devkitpro installation.

Also, I tried to downgrade libnds with downgrade libnds, but the command could only find 2.0.0-6 version.

If some relevant information is missing, please tell me and I'll update my issue. Anyway, thanks for all your amazing work !

fincs commented 2 hours ago

libnds v2 and calico have been tested on real hardware, no$gba and melonDS (with appropriate patching). Can you try compiling a normal example from nds-examples?

Chi-Iroh commented 2 hours ago

I compiled it (using the very same Makefile from the link you provided), and I got 2 white screens on DesMuME and melonDS, but works as expected on my DS Lite.

Chi-Iroh commented 2 hours ago

The 'appropriate patching' works as expected, I just compiled melonDS with your changes and it runs well.

fincs commented 1 hour ago

You may also want to review the summary of major changes in libnds v2 for things that require attention ("Quick porting checklist"). Something not mentioned in the list is that you now need to explicitly configure all VRAM banks (i.e. there is no default VRAM configuration anymore). If you have any further support questions, don't hesitate to ask in the devkitPro forums.