Author Topic: Platform Independant Dingoo SDK  (Read 61108 times)

yefeng

  • Posts: 33
Re: Platform Independant Dingoo SDK
« Reply #40 on: April 23, 2010, 10:36:22 am »

Here is the screenshot!


Compiled app file with source code download:
http://www.file-pasta.com/file/0/ColorFont.zip

Two sml LIB source file have a small changed:
1.graphics.h
http://www.file-pasta.com/file/0/graphics.h
2.graphics.c
http://www.file-pasta.com/file/0/graphics.c


Harteex

  • * Administrator
  • Posts: 713
    • Harteex Productions
Re: Platform Independant Dingoo SDK
« Reply #41 on: April 23, 2010, 09:36:55 pm »
To explain the problem, some fonts already contain colors in the actual tga's. Those fonts won't really work that well with this code.

So I guess our options are:

1. Make a new set of functions which accepts colors, for example gfx_font_print_color()
or
2. Add a function gfx_font_set_color() / gfx_font_clear_color() which controls the color with the normal font functions

comatsu

  • Guest
Re: Platform Independant Dingoo SDK
« Reply #42 on: May 18, 2010, 01:24:51 pm »
So I've installed Cygwin and the SDK following the instructions in the txt.
However when I try to built the samples included with the SDK I get an error: "cannot find -lsml"

If I try to build the program in the 'test' folder I get another error: "unrecognized option '-Wextra'"

Could anyone tell me what im doing wrong please?
« Last Edit: May 18, 2010, 01:27:08 pm by comatsu »

Harteex

  • * Administrator
  • Posts: 713
    • Harteex Productions
Re: Platform Independant Dingoo SDK
« Reply #43 on: May 18, 2010, 01:52:50 pm »
If it can't find sml it sounds like the installation didn't work out properly.. maybe you could post your install log.
./install &> log.txt

comatsu

  • Guest
Re: Platform Independant Dingoo SDK
« Reply #44 on: May 18, 2010, 01:57:57 pm »
Install log (bit long).  If i should post the txt file instead let me know and i'll remove this.
[log removed]

Problem solved. Thanks Harteex.
For anyone having the same problem make sure you are don't have an older version of the mipsel compilers installed.
« Last Edit: May 18, 2010, 02:32:29 pm by comatsu »

Harteex

  • * Administrator
  • Posts: 713
    • Harteex Productions
Re: Platform Independant Dingoo SDK
« Reply #45 on: May 18, 2010, 11:30:14 pm »
Just a note, a new version was posted today in the downloads section at google code. It's recommended to update to this version.

Harteex

  • * Administrator
  • Posts: 713
    • Harteex Productions
Re: Platform Independant Dingoo SDK
« Reply #46 on: May 21, 2010, 11:37:59 pm »
Yefeng's color fonts have been implemented but in a slightly different way, see http://code.google.com/p/dingoo-sdk/source/detail?r=192 for details...

nzeemin

  • Guest
Re: Platform Independant Dingoo SDK
« Reply #47 on: June 14, 2010, 06:25:27 pm »
I think it will be great to add some mini unit test framework for the libraries included in the SDK.
It can be simple application plus a set of include files, every file is one test suite.
If you put new test suite file, it will be automatically included with the next build.
You can run the application on a real Dingoo and have a list of successed/failed cases.

Harteex

  • * Administrator
  • Posts: 713
    • Harteex Productions
Re: Platform Independant Dingoo SDK
« Reply #48 on: June 14, 2010, 07:37:20 pm »
I think it will be great to add some mini unit test framework for the libraries included in the SDK.
It can be simple application plus a set of include files, every file is one test suite.
If you put new test suite file, it will be automatically included with the next build.
You can run the application on a real Dingoo and have a list of successed/failed cases.

If I understand you correctly then there is already one. Have a look at the test directory.
Well, except that test cases aren't their own files (yet?).
It only covers a few things so far though.

Tim0xA

  • Posts: 8
Re: Platform Independant Dingoo SDK
« Reply #49 on: June 22, 2010, 09:23:10 pm »
If I keep the button X for some seconds, the application (compiled with Native Dingoo SDK) automatically closed. Why it occurs?

alekmaul

  • Posts: 330
    • Portabledev
Re: Platform Independant Dingoo SDK
« Reply #50 on: June 23, 2010, 07:38:45 am »
If I keep the button X for some seconds, the application (compiled with Native Dingoo SDK) automatically closed. Why it occurs?

Because of this thing in the main loop (or where is your main game loop) :
Quote
     sysref = _sys_judge_event(NULL);
    if (sysref < 0) {
       break; 
    }

Tim0xA

  • Posts: 8
Re: Platform Independant Dingoo SDK
« Reply #51 on: June 23, 2010, 08:39:45 am »
Because of this thing in the main loop (or where is your main game loop) :
Quote
    sysref = _sys_judge_event(NULL);
    if (sysref < 0) {
       break;  
    }
But "Minesweeper", "Astrolander" and others samples from SDK has this problem too. Why?
(Firmware 1.2, ILI9325)
« Last Edit: June 23, 2010, 09:05:25 am by Tim0xA »

alekmaul

  • Posts: 330
    • Portabledev
Re: Platform Independant Dingoo SDK
« Reply #52 on: June 23, 2010, 11:29:02 am »
Because they HAVE such code  ;D !!!

Tim0xA

  • Posts: 8
Re: Platform Independant Dingoo SDK
« Reply #53 on: June 23, 2010, 12:15:05 pm »
Because they HAVE such code  ;D !!!
I understood.
Key "X" (and combination Start+L and others OS keycodes) work if application have such code.
Thanx!

nzeemin

  • Guest
Re: Platform Independant Dingoo SDK
« Reply #54 on: July 14, 2010, 11:16:20 am »
Hello, Dingoo SDK developers!

I trying to port one open-source game project for Dingoo native with the Dingoo SDK.
But there is two non-implemented functions used in the code:
  • fflush() in stdio.h
  • localtime() and tm structure in time.h
Can you implement the functions in the next build?

P.S. Of course, it's not urgent. I use stubs for now.
« Last Edit: July 14, 2010, 11:40:31 am by nzeemin »

flatmush (OP)

  • Posts: 288
Re: Platform Independant Dingoo SDK
« Reply #55 on: July 14, 2010, 11:22:14 am »
If I get time I may do but add an ISSUE on the googlecode site to ensure we remember, basically the Dingoo RTC can't be used in native so even if we implemented the tm structure then it would return all zeros, so you may aswell just remove the code that uses it.
For fflush the only functions which buffer are the ones that write to actual files, in this case you can use the native function fsys_flush() to do the same thing, however we're not certain of the prototype for that function (i.e. whether it takes any arguments). You could guarantee a flush by closing the file and reopening it then seeking to the correct point again.

Harteex

  • * Administrator
  • Posts: 713
    • Harteex Productions
Re: Platform Independant Dingoo SDK
« Reply #56 on: August 20, 2010, 02:13:10 am »
New version posted at the google code page: http://code.google.com/p/dingoo-sdk/downloads/detail?name=dingoo_sdk_r251.zip
The Google Code server seems a bit instable right now, so if you're having problems with the download, try this mirror.

This is a quite huge release :)

Here's a rough list of additions and fixes:
* SDL is now added and working
* Basic C++ support
* libm ported
* More libc functions supported
* Crashes in exit() fixed
* Various other additions and fixes

Also, thanks and welcome to djdron who is the person behind the C++ support and libm port among other things.

alekmaul

  • Posts: 330
    • Portabledev
Re: Platform Independant Dingoo SDK
« Reply #57 on: August 22, 2010, 07:25:14 am »
Hi all,
Just a question about c++ support.
I tried to compile a cpp emu (a2600) and i have a lot of error like that
Quote
mipsel-linux-g++ -G0 -O3 -I/cygdrive/c/cygwin/dingoo_sdk/include -I../lib -I/cyg
drive/c/cygwin/mipsel-gcc4.1-nopic/mipsel-linux/include -I -mips32 -mno-abicalls
 -fno-pic -Wall -Wextra -finline-functions -fomit-frame-pointer -msoft-float -fn
o-builtin -fno-exceptions -D_DEBUG -DMPU_JZ4740 -c -o src/emu/Booster.o src/emu/
Booster.cpp
/cygdrive/c/cygwin/mipsel-gcc4.1-nopic/bin/../lib/gcc/mipsel-linux/4.1.2/../../.
./../include/c++/4.1.2/cstring:87: error: '::strcmp' has not been declared
/cygdrive/c/cygwin/mipsel-gcc4.1-nopic/bin/../lib/gcc/mipsel-linux/4.1.2/../../.
./../include/c++/4.1.2/cstring:88: error: '::strcoll' has not been declared

Is it because C++ support is only at the beginning ?

joyrider

  • Posts: 220
    • Willems Soft
Re: Platform Independant Dingoo SDK
« Reply #58 on: August 22, 2010, 09:54:39 am »
alekmaul, i had the same problem(s) as you described this is how i solved it :

- in the makefile i removed the include dir of the mipsel-linux include dir (-I$(MIPSTOOLS)/mipsel-linux/include )
- in the source files you probably have this : #include <string.h> change it to #include "string.h" etc

this will solve the error you mentioned above, i did had another error with c++ that i could fix, the error(s) where these :
./sokoban.o:(.rodata._ZTI7CPlayer[_ZTI7CPlayer]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
./sokoban.o:(.rodata._ZTI5CSpot[_ZTI5CSpot]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
./sokoban.o:(.rodata._ZTI4CBox[_ZTI4CBox]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
./sokoban.o:(.rodata._ZTI10CWorldPart[_ZTI10CWorldPart]+0x0): undefined reference to `vtable for __cxxabiv1::__class_type_info'
./sokoban.o:(.rodata._ZTI5CWall[_ZTI5CWall]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
./sokoban.o:(.rodata._ZTI6CFloor[_ZTI6CFloor]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
./sokoban.o:(.rodata._ZTI6CEmpty[_ZTI6CEmpty]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'

these errros came due to the use of a base class with virtual functions... and it was always the same error, you can solve that one by adding "-fno-rtti" the the CFLAGS and do a complete rebuild (prefereably a clean first)

it could also be that certain function(s) are not availible yet, you can just search for another impelemention on google then ...

« Last Edit: August 22, 2010, 10:05:08 am by joyrider »

alekmaul

  • Posts: 330
    • Portabledev
Re: Platform Independant Dingoo SDK
« Reply #59 on: August 22, 2010, 04:11:09 pm »
thanks for the tips joyrider, i will try to modify as you said.

 

Post a new topic