Hi,
I have coded some C++/SDL ports of some games (either from me or from other 3rd party developpers), however I found out that the games are darn slow. And I'm wondering if it is not linked to the update from libnds 1.4.1 to libnds 1.4.2
Also what's the fastest mode on the DS? Is that 8-bit? I'm always using 8-bit because I found this a lot faster than the other modes.
Does the screen hardware rescale eats CPU power or is this transparent?
On my PC, one of my games uses 4% of CPU (CoreDuo) but it crawls on my DS and it is the same C++ code & both using SDL (I know SDL is not very optimal for the DS, but come on!!!).
help, I don't seem to be able to finish anything. I have tested jEnesis and have the proof that the DS is very capable to run CPU-intensive and 2D GFX intensive stuff. Very frustrating!!
Sorry for the basic and vague questions...
bye
my SDL ports are darn slow
-
- Site Admin
- Posts: 2003
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: my SDL ports are darn slow
The fastest graphics modes on the DS are tile based, it's not really designed for pixel pushing and SDL is something that will never run well on the DS.
Your core duo is probably running at around 1.8GHz or more, the DS ARM9 runs at 66MHz so, in theory at least, something that requires 4% CPU usage on the former will need approximately 110% CPU on the latter. Obviously things aren't quite that simple but it does illustrate a point.
Your core duo is probably running at around 1.8GHz or more, the DS ARM9 runs at 66MHz so, in theory at least, something that requires 4% CPU usage on the former will need approximately 110% CPU on the latter. Obviously things aren't quite that simple but it does illustrate a point.
Re: my SDL ports are darn slow
Thanks for this reply. I wonder how jEnesis does to be so fast, whilist emulating a 68000 & sound!
Or the MarcaDS emulator.
Ok they don't use SDL but SDL DS actually performs blits using devkitpro, and emulators are pixel-pushing programs too (even if blits can be sometimes emulated with blits but that's not easy if the pixel format is not native!)
Or the MarcaDS emulator.
Ok they don't use SDL but SDL DS actually performs blits using devkitpro, and emulators are pixel-pushing programs too (even if blits can be sometimes emulated with blits but that's not easy if the pixel format is not native!)
Re: my SDL ports are darn slow
As far as I know, BLITs with SDL on the DS are all done via software-rasterizing and framebuffers, and on a 66Mhz CPU, you can't expect to do much else.jotd wrote:Thanks for this reply. I wonder how jEnesis does to be so fast, whilist emulating a 68000 & sound!
Or the MarcaDS emulator.
Ok they don't use SDL but SDL DS actually performs blits using devkitpro, and emulators are pixel-pushing programs too (even if blits can be sometimes emulated with blits but that's not easy if the pixel format is not native!)
The Genesis uses 2D hardware to render visuals in much the same way as the SNES, GBA, and DS handle it, so it's only logical that if the hardware is available (as is the case for jEnesis and the DS), using the 2D hardware acceleration with just a little bit of translation is a far better solution than to create your own rasterizer on a limited CPU. That is one reason why on devices like the DS, using SDL is not an option for me. You may gain flexibility, but the losses far outweigh the gains of what the program is capable of if the hardware is not used.
Re: my SDL ports are darn slow
I've ported a handful of applications to the DS using SDL. It's not a good fit.
Audio, input, networking, and timers will most likely have to be redone anyway, so those parts of SDL aren't doing you any favors. Which basically just leaves you the video stuff.
Using SDL for video on the DS does work reasonably well as far as bitmap graphics go, but like WinterMute said, the DS is really designed for tiles or 3D instead.
SDL is valid for helping you get a port up and running quickly (as in development speed, not necessarily execution speed), but unless it's a simple app you're probably better off writing DS-specific rendering code.
Audio, input, networking, and timers will most likely have to be redone anyway, so those parts of SDL aren't doing you any favors. Which basically just leaves you the video stuff.
Using SDL for video on the DS does work reasonably well as far as bitmap graphics go, but like WinterMute said, the DS is really designed for tiles or 3D instead.
SDL is valid for helping you get a port up and running quickly (as in development speed, not necessarily execution speed), but unless it's a simple app you're probably better off writing DS-specific rendering code.
#include <sig.h>
Who is online
Users browsing this forum: Ahrefs [Bot] and 2 guests