Author Topic: Just a few coding questions...  (Read 2210 times)

davidcm

  • Guest
Just a few coding questions...
« on: January 20, 2010, 02:40:21 pm »
I've just started yesterday to code something for the Dingoo for its NativeOS. I had a lot of problems using the official toolchain; I'm in Ubuntu and do not seem to work as well as expected. Finally, I've set up a compiler using ct-ng, and written a HelloWorld app using an unoficial SDK found I don't remember where that allows to write apps without the official SDK (the one that includes elf2app.py, dingoo.h & libdingoo.a).

The problems I have:

1 - I'd like to use the official libraries but the toolchain documentation I've found is composed of a set of PDFs written in chinese. Is there any other API reference in English?

2 - I don't know how to embed resources in an easy way in Linux. Is there any way to do it? If there is no one... any program (or set of programs) to uncompress images from JPEG, GIF, etc., and convert it to a 16-bit RGBA, or to a C/C++ array that can be used by my program?

3 - Any idea of how timers work?

4 - Any idea of how sound works? I've read that only PCM sound data is allowed. For me it's a complete disaster because I need to play more than 5 minutes of music. I've though about porting some kind of MOD player or mini-sequencer to play music because I don't know if streaming MP3 is allowed.

5 - When a native APP is running... the full APP file is loaded onto memory or only a part (page or set of pages)? In case it's just a set of pages... how can I load different pages on (to embed data in my file and use it under demand)?

Thank you very much for your time. Greets.

darfgarf

  • Guest
Re: Just a few coding questions...
« Reply #1 on: January 21, 2010, 10:11:35 am »
not really help, but were you avoiding dingux for some reason, as it's much easier to get started

davidcm

  • Guest
Re: Just a few coding questions...
« Reply #2 on: January 21, 2010, 08:17:43 pm »
Yes, in fact I am intentionally avoiding Dingux :) I'm not interested in GNU/Linux coding, I do already code GNU/Linux for a few machines and I just want to start with something different :D

Harteex

  • * Administrator
  • Posts: 709
    • Harteex Productions
Re: Just a few coding questions...
« Reply #3 on: January 24, 2010, 11:54:37 pm »
2. For Windows in first hand, but you shouldn't have any problems adapting it for linux. http://boards.dingoonity.org/dingoo-development/how-to-embed-resources-into-you-app/
There is another way to do this, with Dingoo-specific functions from entry.a, but I don't know how to use them.

3. Check out the libraries by flatmush. Either get his AstroLander, or get my SameGoo (because of point 4 below, SameGoo is built upon flatmush stuff, but also extended)

4. I wrote a mixer, to mix music and sound. It then uses a sound thread the play it (thanks to alekmaul's sample). Go get the source code for SameGoo, and you'll see how to play OGG music and play raw audio data at the same time.