gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Game running in Emu but not hardware

#139241 - doudou - Mon Sep 03, 2007 9:58 pm

Hello,

I ported my GBA game to DS and it's running well on DeSmuME but on my DS I only see a black screen. I know the game is not freeze and progress correctly except for graphics since I'm able to log in the 2nd screen.

Does someone has clues about differences between hardware and emu that could cause this.

Also, should I use another emulator?

Thanks!

#139244 - DiscoStew - Mon Sep 03, 2007 10:34 pm

Don't know what to tell ya except that emulators aren't perfect enough to really mimic hardware, plus we have no idea what you are doing without showing some code.

I use No$GBA for my DS projects, as I think it's the closest to accuracy in hardware operations, even if it is slow.
_________________
DS - It's all about DiscoStew

#139247 - wintermute - Mon Sep 03, 2007 11:06 pm

Usually missing graphics on hardware but not the emulator are problems with the VRAM setup.

Personally I prefer no$gba - http://nocash.emubase.de/gba.htm - it's the fastest and most accurate emulator around.
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog

#144067 - doudou - Sun Oct 28, 2007 10:48 pm

Thanks, using no$gba helped me to reach a great first step: my game backgrounds are displayed perfectly.

I'm now only missing the sprites. Do you know a difference between EmuDS and No$Gba that would explain the different behavior I have for sprites.

#144094 - doudou - Mon Oct 29, 2007 1:03 am

Ok, all is fine finally.

videoSetMode(MODE_0_2D | BG0_ENABLE | BG1_ENABLE | BG2_ENABLE | BG3_ENABLE | DISPLAY_SPR_1D | DISPLAY_SPR_ACTIVE);

I was missing the DISPLAY_SPR_ACTIVE flag. I don't know how DSEmu works to be ok without this.

#144161 - Quirky - Mon Oct 29, 2007 8:31 pm

I've just tested nds-examples-20071023/Graphics/2D/Sprite_Bitmap and it seems to work OK. Commenting out the DISPLAY_SPR_ACTIVE...
Code:

 //set the video mode
 videoSetMode(  MODE_0_2D |
//              DISPLAY_SPR_ACTIVE |    //turn on sprites
                DISPLAY_BG0_ACTIVE |    //turn on background 0
                DISPLAY_SPR_1D |        //this is used when in tile mode
                DISPLAY_SPR_1D_BMP      //and this in bitmap mode
                 );

...correctly doesn't display the sprites in desmume-cli 0.7.3.

#144199 - M3d10n - Tue Oct 30, 2007 3:17 am

doudou wrote:
I was missing the DISPLAY_SPR_ACTIVE flag. I don't know how DSEmu works to be ok without this.


It's very common for emus to fail to mimic exactly the initial state of the hardware (aka: what is enabled/disabled when the system boots). Even No$gba has a slightly different "default" state when compared to actual DS units, specially when it comes to 3D.