Author Topic: Native now has SDL  (Read 20710 times)

Harteex (OP)

  • * Administrator
  • Posts: 709
    • Harteex Productions
Re: Native now has SDL
« Reply #30 on: August 25, 2010, 04:53:25 pm »
Very nice, thanks a lot for your ideas :)
I will definitely look into this.

SDL_DOUBLEBUF is not valid together with SDL_SWSURFACE so I think I will keep the current way (but fix the rects updating) for this type.

For SDL_HWSURFACE, I will try drawing to lcd_get_frame() directly and for DOUBLEBUF the SendLCDFrame function approach.

Harteex (OP)

  • * Administrator
  • Posts: 709
    • Harteex Productions
Re: Native now has SDL
« Reply #31 on: August 28, 2010, 04:52:46 pm »
If you grab the latest SDL code from SVN, it now updates the rects as it should and not just the whole screen.

I also filed a google code issue on the HWSURFACE ideas: http://code.google.com/p/dingoo-sdk/issues/detail?id=51

alekmaul

  • *
  • Posts: 330
    • Portabledev
Re: Native now has SDL
« Reply #32 on: September 05, 2010, 07:01:31 am »
Just one question Harteex, i testeed a port of a game and i think SDL for dingoo does not support timer callback, do you confirm this fact ?

Harteex (OP)

  • * Administrator
  • Posts: 709
    • Harteex Productions
Re: Native now has SDL
« Reply #33 on: September 05, 2010, 01:52:31 pm »
Yea, they don't work currently. I'll see if I can fix that, and post back if I do.

alekmaul

  • *
  • Posts: 330
    • Portabledev
Re: Native now has SDL
« Reply #34 on: September 05, 2010, 06:00:44 pm »
ok, so it's not a pb from my port ^^
thanks for your fast reply ^^

Yongary

  • Guest
Re: Native now has SDL
« Reply #35 on: September 09, 2010, 01:59:48 am »
Does this mean that we can finally get a Dingoo version of Cave Story?

Cave Story SDL link: http://sourceforge.net/projects/cavestory/

zear

  • * Moderator
  • Posts: 2378
Re: Native now has SDL
« Reply #36 on: September 09, 2010, 10:48:23 am »
Does this mean that we can finally get a Dingoo version of Cave Story?

Cave Story SDL link: http://sourceforge.net/projects/cavestory/

Cave Story is not open source. This thing is a try to rewrite the engine, but AFAIK it's not working and is long abandoned ;)

Edit: I found a fresh and very complete engine reimplementation for Cave Story. It's called NXEngine. I gave it a try on Dingux and that's the result: http://www.youtube.com/watch?v=dUFO48HiXhg
« Last Edit: September 09, 2010, 02:12:17 pm by zear »

Harteex (OP)

  • * Administrator
  • Posts: 709
    • Harteex Productions
Re: Native now has SDL
« Reply #37 on: September 09, 2010, 02:52:27 pm »
ok, so it's not a pb from my port ^^
thanks for your fast reply ^^

I think I will have very limited time for dingoo coding for a while, so this might take some time.
You could replace the timers with the standard SDL_GetTicks if it's easy to do in the port, or wait with it to a later time.

nzeemin

  • Guest
Re: Native now has SDL
« Reply #38 on: September 17, 2010, 08:49:29 am »
Harteex, looks like SDL has the bug with X button: if the button pressed for long time (about 3 sec) the program quits.
That's standard "feature" of sys_judge_event -- Tim0xA was first who found it: http://boards.dingoonity.org/dingoo-development/platform-independant-dingoo-sdk/msg17853/#msg17853
So now all SDL-based games build with dingoo-sdk have the same "feature".

Harteex (OP)

  • * Administrator
  • Posts: 709
    • Harteex Productions
Re: Native now has SDL
« Reply #39 on: September 17, 2010, 10:56:10 am »
It's not really bug, but a feature in the OS. There are two ways you can use to fix it:

Either, before SDL init, do SDL_putenv("DINGOO_IGNORE_OS_EVENTS=1");
This is a dingoo specific flag to ignore the system events.

Otherwise you may also simply look for this code: if (event.type == SDL_QUIT)
and comment out the code so that you don't do anything on a quit event.

nzeemin

  • Guest
Re: Native now has SDL
« Reply #40 on: September 24, 2010, 11:41:28 am »
Harteex, can you address this issue? or maybe advice me some workaround?

http://code.google.com/p/dingoo-sdk/issues/detail?id=54

SDL_OpenAudio function hangs for samples = 441. If you change samples to 512 then it works fine.

Harteex (OP)

  • * Administrator
  • Posts: 709
    • Harteex Productions
Re: Native now has SDL
« Reply #41 on: September 24, 2010, 04:49:24 pm »
Yea I saw the issue, but haven't had time to look at it yet. I'm very busy at the moment.
My guess is that the waveout function expects a buffer with a size with the power of two, but I haven't looked into it yet. I should be able to work around that, if that is the case though.

Harteex (OP)

  • * Administrator
  • Posts: 709
    • Harteex Productions
Re: Native now has SDL
« Reply #42 on: September 24, 2010, 08:41:49 pm »
I've updated your issue. Basically, 8bit sound is not supported.
As for a workaround, convert your audio to 16bit instead and use double the buffer size.

djdron

Re: Native now has SDL
« Reply #43 on: September 25, 2010, 03:36:04 pm »
Hello, Hartex!
Looks like SDL depends from sml. Can we remove this dependence?

Harteex (OP)

  • * Administrator
  • Posts: 709
    • Harteex Productions
Re: Native now has SDL
« Reply #44 on: September 26, 2010, 03:07:14 pm »
Sure, it's only the controls which depends on SML right now if I remember correctly. But what would it accomplish?

I don't have time to do that right now though. You're welcome to fix it yourself if you feel like it.