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

flatmush (OP)

  • *
  • Posts: 286
Platform Independant Dingoo SDK
« on: March 10, 2010, 11:14:26 am »
I've combined approaches from multiple sources to create a platform independent Native Dingoo SDK.
It contains the source for all the tools used to create it and contains sample applications, libc source code and makefiles to show users how to simply and cleanly make applications for the Dingoo A320.

It also contains clear instructions on how to install and setup Cygwin and scripts/programs to perform most of the installation hassle free.

It contains a program to fix the no CD inserted into drive error with Cygwin to allow the toolchain to work on laptops/computers that don't have a Drive labeled D in windows.

Included samples which can be compiled with a single make command on either windows or Linux include:
  • AstroLander
  • Minesweeper
  • 3D Cube Demo
  • 3D Sphere Demo
  • 3D MD2 Model Demo
  • Overclocker
  • TGA Viewer SIM
  • Zaxxons Hello World

Any thoughts or improvements are appreciated as I want to make this everyone's SDK.

The SDK can be downloaded from here.

The Google Code Project page can be found here, looking for contributors.

Edit: Damn I spelled independent wrong :(
« Last Edit: February 16, 2011, 10:46:46 pm by flatmush »

SiENcE

  • **
  • Posts: 653
    • Crank Gaming (Dingux Apps)
Re: Platform Independant Dingoo SDK
« Reply #1 on: March 10, 2010, 03:42:08 pm »
Great work.

Does this Dingoo Nativ SDK includes all nativ sdk enhancements from all different sdk's out there? I mean, does tvout is working, does SIM building work...aso.?

flatmush (OP)

  • *
  • Posts: 286
Re: Platform Independant Dingoo SDK
« Reply #2 on: March 10, 2010, 03:43:28 pm »
No, it contains some enhancements but you'd have to look, I messaged most of the developers of other sdks and invited them to join the googlecode project, you're welcome to join aswell if you want (and have a googlemail account).

Harteex

  • * Administrator
  • Posts: 709
    • Harteex Productions
Re: Platform Independant Dingoo SDK
« Reply #3 on: March 11, 2010, 12:46:42 am »
It installed ok, but I can't compile AstroLander with it.
I've tried both a standard command prompt and through cygwin (I would really prefer to be able to use a standard command prompt like used to do).

Error when running it through cygwin:
mipsel-linux-ld: cannot find c:/dingoo_sdk/lib/dingoo.o

That's not the right location.
My path in cygwin.bat is specified to /dingoo_sdk which should mean c:\cygwin\dingoo_sdk.....


And btw, the link in your post to the download is broken (dingoo_sdk.zip should be dingoo_sdk_100.zip).

flatmush (OP)

  • *
  • Posts: 286
Re: Platform Independant Dingoo SDK
« Reply #4 on: March 11, 2010, 11:38:42 am »
Good find, I need to change the installer script to modify dingoo.xn, if you want it to work right now then you just need to modify
$DINGOO_SDK/lib/dingoo.xn
Change the path from c:\dingoo_sdk\lib\dingoo.o to your actual path, I'll try to fix the installer script now.

flatmush (OP)

  • *
  • Posts: 286
Re: Platform Independant Dingoo SDK
« Reply #5 on: March 11, 2010, 12:08:42 pm »
I fixed the linker script problem and I've released revision 6 which contains some minor changes and the MineSweeper sample.
You can download it from the updated link at the top.
« Last Edit: March 16, 2010, 02:39:11 pm by flatmush »

Harteex

  • * Administrator
  • Posts: 709
    • Harteex Productions
Re: Platform Independant Dingoo SDK
« Reply #6 on: March 11, 2010, 05:37:59 pm »
Alright, seems to work now.

Regarding files in Astrolander/lib and MineSweeper/lib etc. Aren't these global enough to be put somewhere more central? Instead of copy/paste them for every project/sample.

I've done a few changes to them for my projects.. although on the other hand, at least one of the changes changed the behaviour a bit, and I shouldn't add those changes.

What do you think about this?

flatmush (OP)

  • *
  • Posts: 286
Re: Platform Independant Dingoo SDK
« Reply #7 on: March 11, 2010, 09:36:06 pm »
You are right, I thought about this and we should make it a lib, but there are two things:
1. I wanted there to be an example of how to compile sources with multiple folders, since that's important for people to know for larger projects.
2. I'm not sure what the lib should be called or contain.

If you wanna take on the responsibility of putting that lib together then that'd help a lot, and I can just give you my latest modifications to it. At the minute I'm wondering whether to depreciate the graphics section of the lib since FGL does the job, but FGL doesn't have fast functions for sprites, rectangles or lines yet and may not be as fast for certain things (faster for triangles though).

Harteex

  • * Administrator
  • Posts: 709
    • Harteex Productions
Re: Platform Independant Dingoo SDK
« Reply #8 on: March 12, 2010, 12:33:51 am »
I'm not sure if I have time to take responsibility for that now. But let's start by discussing things anyway.

I think all of control, display, fixmath, graphics, and timer should be in it. I also would like to add audio. I might also want to add the mixer I wrote.

About graphics. I would personally like to see a version of the font functions and the tex_draw which takes magenta as a transparent color. That's quite common. But I assume the reason you made the font drawing functions that way was because of speed.
And also, I think one reason to keep this graphics.c is that the source to it is open.

Maybe the files could be put directly in lib, or in any folder there.

Edit:
btw, I commited fsys_find* and a sample to use them.
« Last Edit: March 12, 2010, 12:38:21 am by Harteex »

flatmush (OP)

  • *
  • Posts: 286
Re: Platform Independant Dingoo SDK
« Reply #9 on: March 12, 2010, 08:34:50 am »
You're right about the graphics thing, thing is I'm tempted to just open source FGL but I don't want it being stolen and used without credit due to the effort I put in.

I already made colorkey transparent sprites (not just magenta trasparent, whatever color you choose) with RLE, which I can add, and I think I could improve some of the functions. I was thinking of making dynarec fonts to make them much faster which would add that functionality but I'd need to find time for it.

Thanks for commiting the fsys_ commits btw they look very useful.

Harteex

  • * Administrator
  • Posts: 709
    • Harteex Productions
Re: Platform Independant Dingoo SDK
« Reply #10 on: March 14, 2010, 09:41:20 pm »
What do you think of adding these things to the lib directory? Or any subfolder in it?

flatmush (OP)

  • *
  • Posts: 286
Re: Platform Independant Dingoo SDK
« Reply #11 on: March 14, 2010, 11:35:40 pm »
What do you think of adding these things to the lib directory? Or any subfolder in it?

Done, I called the library SML (Simple Media Library) for the minute till anyone can think of a better name. I modified a few things and made all the samples work (and made the installer script make it). I also added rle encoded colorkey transparent sprites to the library and made an accompanying sample to show them working.

I welcome any upgrades you may have made to the library.

Also I made macros for control_just_pressed, control_just_released, control_still_pressed and control_still_released.
control_just_pressed is a direct replacement for the function you added called control_pressed_once.

Also I updated the link above which now links to version 1.1.1, the version numbering is basically the SVN revision + 1.0.0 till I can think of a better way.
« Last Edit: March 14, 2010, 11:43:10 pm by flatmush »

Harteex

  • * Administrator
  • Posts: 709
    • Harteex Productions
Re: Platform Independant Dingoo SDK
« Reply #12 on: March 16, 2010, 01:36:47 am »
I've commited updates to the tga loading. I'll commit more of my changes another day.


Why is this line:
if((inTexture->width & 0xF) != 0)
needed in gfx_render_target_set?

I removed it in my local version, since I wanted to create 24x24 images and draw on them.

flatmush (OP)

  • *
  • Posts: 286
Re: Platform Independant Dingoo SDK
« Reply #13 on: March 16, 2010, 10:26:33 am »
Why is this line:
if((inTexture->width & 0xF) != 0)
needed in gfx_render_target_set?

I removed it in my local version, since I wanted to create 24x24 images and draw on them.

The reason is that the display_flip function assumes that the display width is a multiple of 16, so a render target that's 24x24 couldn't be rendered to the screen, it'd just be a bit more work to add code to allow all sizes to be rendered to the screen, alternatively there could be a flag that says a render target can't/won't be flipped with the display buffer.

Harteex

  • * Administrator
  • Posts: 709
    • Harteex Productions
Re: Platform Independant Dingoo SDK
« Reply #14 on: March 16, 2010, 01:45:37 pm »
I see.
I think a flag would enough.

flatmush (OP)

  • *
  • Posts: 286
Re: Platform Independant Dingoo SDK
« Reply #15 on: March 16, 2010, 02:44:59 pm »
Version 114 is released, everybody using the SDK should update to this version since it uses patched code to allow it to run on HK dingoos too, it also decreases the loading time of APPs on normal dingoos.

The download link at the top now points to the updated download.

kswildside

  • Guest
Re: Platform Independant Dingoo SDK
« Reply #16 on: March 18, 2010, 02:07:14 pm »
Hey Flat & Hart you guys are my hero's for implementing this patch into the SDK this will make programming on the native completely compatible currently with all Dingoo A320's this totally rocks and thank both of you for your hard and tireless work to make the native development a reality...

retro486

  • Guest
Re: Platform Independant Dingoo SDK
« Reply #17 on: March 26, 2010, 07:23:10 pm »
First off: I'm using the v1.2.5 copy of your SDK from Google Code (the latest on your website is only 119).

Thanks for the awesome toolkit patch and game lib! I'm Debian 5 (Lenny) and I'm having a few issues with libsml and the examples:

In src/sml/wav.c there are several instances where sound_t->sample_data is incorrectly referenced as sound_t->data.

The sml_sound_example also had one of these typos and also had sound_t incorrectly named wav_buffer (if I remember correctly). I can't get this one to link due to the linker complaining about libgcc.a not being a non-PIC file. I'm not sure how to handle this one as I didn't see the code for it included in the src folder. Can you provide a link to the source so I can rebuild it and try again?

Thanks for the great work thus far!

EDIT: Here's the actual error I'm getting, in case I didn't interpret it correctly. I get this error for pretty much all the examples, except for MineSweeper:
Code: [Select]
mipsel-linux-ld: /opt/dingoo_sdk//lib/libgcc.a(_divdi3.o): warning: linking PIC files with non-PIC files
make: *** [sml_audio_demo.elf] Segmentation fault
make: *** Deleting file `sml_audio_demo.elf'
« Last Edit: March 26, 2010, 07:26:20 pm by retro486 »

flatmush (OP)

  • *
  • Posts: 286
Re: Platform Independant Dingoo SDK
« Reply #18 on: March 30, 2010, 09:28:27 pm »
I fixed the wav thing that was a stupid error on my part, check the issue on googlecode for my thoughts on it, but I think you may have the wrong version of libgcc.a.

Shin-NiL

  • *
  • Posts: 375
    • Shin-NiL's Personal Web Page (Brazilian Portuguese)
Re: Platform Independant Dingoo SDK
« Reply #19 on: April 07, 2010, 02:46:54 pm »
Hello guys!

Is there any mirror to Ingenic toolchain for linux? Seems that the Ingenic's ftp is not working.

Thanks.
« Last Edit: April 07, 2010, 02:49:35 pm by Shin-NiL »

 

Post a new topic