#39324 - Wriggler - Thu Apr 07, 2005 2:25 pm
For those in the know: I've noticed some differences coding for emulators and the DS hardware itself. The most obvious of which is the referencing of the screens. For some reason, my sprites and backgrounds and everything are swapped over when running on hardware. E.g. when I put something on the sub_screen it appears on top in Dualis, and on the bottom on hardware.
Does anybody else find this? It might be stating the obvious, but it seems very strange. Am I doing something wrong?
Ben
#39342 - PhoenixRising - Thu Apr 07, 2005 7:37 pm
Wriggler wrote: |
For those in the know: I've noticed some differences coding for emulators and the DS hardware itself. |
There are several differences. I continue to be plagued with things that work on the emulator but that do not work on the real hardware. Particularly things where the emulator doesn't require you to enable things that the hardware does. Also, I am working on a demo now that looks nice in dualis, but my backgrounds are missing on hardware.
Wriggler wrote: |
The most obvious of which is the referencing of the screens. For some reason, my sprites and backgrounds and everything are swapped over when running on hardware. E.g. when I put something on the sub_screen it appears on top in Dualis, and on the bottom on hardware. |
This on the other hand is something I have not seen at all. I use Dualis R2, R5 and R7 in my testing.
Wriggler wrote: |
Am I doing something wrong? |
It would appear so. The sub_screen IS the top screen, and the main screen IS the bottom screen, both in Dualis and in the hardware... That may be it... Though I don't know why it would look right on the hardware if you've coded it backwards.
It's been tested that even if you go into the options screen (wrench) on the NDS and configure gba mode to use the bottom screen, it won't matter when you're running through a PassMe.
#39353 - dovoto - Thu Apr 07, 2005 10:17 pm
what causes the LCD to 2D core mapping is somewhat missunderstood at the moment. By default (POWER_CR set to all on) the main is assigned to the bottom and sub to the top. Bit 15 of power control will cause them to swap...but other bits of power control also seem to cause this swapping as well as certain combinations of screenmodes. More specific details should surface in next few days. For now just check your power control setting and if it is correct:
#ifdef EMULATOR
lcdSwap();
#endif
ugly but works.
_________________
www.drunkencoders.com
#39397 - Wriggler - Fri Apr 08, 2005 11:08 am
That's crazy! Thanks Dovoto, makes a little bit more sense now...
Ta,
Ben
#40494 - maniacdevnull - Tue Apr 19, 2005 2:58 pm
dovoto wrote: |
... More specific details should surface in next few days. |
Any new word on this issue? I have the same problem, my code is written to the sub screen, and it appears on the top in Dualis, on the bottom on hardware, and on the bottom on Ideas. Go figure.
As a sidebar, it makes it hard to debug the code on emulators. The code uses the touchscreen for input. So, in Dualis I have to guess where to click on the bottom to line it up on the top and Ideas does not seem to support touchscreen input yet.
#40507 - chrissieboy - Tue Apr 19, 2005 5:00 pm
same problem here try to use the 2 screens as big screen but doesn't get it to work...
#91096 - naleksiev - Tue Jul 04, 2006 4:05 pm
I'm fighting with the switching on the screen for 2 days. I found how to switch the screens in dualis (this not appear only in dualis). If I use powerON(POWER_ALL_2D); MAIN screen is the upper display and SUB the bottom. If I use powerSET(POWER_ALL_2D); MAIN screen is the bottom and SUB is the upper.
Btw the same switch occure when I update my devkitPro. I had some pretty old version. When I update the only change I made was to change the compiler from elf to eabi and the screens was switched.
Now I have no idea which screen is SUB and which screen is MAIN :(
#91108 - naleksiev - Tue Jul 04, 2006 5:05 pm
OK I didn't know that there is a POWER_SWAP_LCDS. That's great. I will use it a lot in my project. Once I turn this off I'll know where is SUB and MAIN :)
#91127 - MrD - Tue Jul 04, 2006 6:59 pm
Some emulators have very strange ideas about blending. (Getting the backgrounds to blend all mixed up...)
_________________
Not active on this forum. For Lemmings DS help see its website.