Dingoo Help Me Program For The A320


Atomic Man

Still Fresh
Joined
Oct 10, 2008
Messages
29
ok, so I got my A320 over a month ago now but I haven't programmed anything for it...

If I dont get started soon then I probably wont ever do anything.

(Im an amateur programmer, biggest thing I ever completed was a Tetris clone, but I am hoping to change that :D )

Does anyone know how to use the SDK? Specifically under Linux (I dual boot XP but I only use Windows for things I cant do in Linux, like mounting my A320 D: ).

For me, the hardest part of programming is the compiler, so any guides to setting it up would be really helpful.

Also, should I keep posting Dingoo related things here, or use a different forum? Theres 3 Dingoo specific forums I know of already, but almost noone there :p
 
Last edited by a moderator:
I did manage to build seagal's Centipede emulator under Linux a few weeks ago.

I used the mipsel-linux version of the GNU compiler + tools from Ingenic's ftp site. I used Dingoo's SDK pretty much as-is, and tweaked the makefiles and some of the source files in seagal's Centipede source tree. The only "cheat" I used was to run the little Dingoo program that converts the output file from the build into a .app file under WINE.

You might possibly want to start out by using the official SDK under Windows if you're a bit new to compiler wrangling, though.
 
Last edited by a moderator:
uuuurghghg

ok after several hours of smashing my head against my keyboard I just can't take it anymore.

Im still trying to compile under linux (because Im a tard) and heres where Im at:

I fixed all the incorrect capitalizations, carriage returns after a backslash, and some other thing I cant remember.

Everything compiles into obect files but the linking fails.

CODE
mipsel-linux-ld pokey.o interface.o GameEngine.o Loader.o init.o ./../s2dsdk/lib/entry.a ./../s2dsdk/lib/s2d.a -Bstatic -g -T link.xn -o downenv.elf -Map downenv.map -Ttext 0x80a00000 -L./../s2dsdk/lib -L./../mipseltools/lib -lm -lstdc++ -lc -lgcc -lmem
GameEngine.o: In function `GameEngine::Init(void)':
/home/ubuntu/c/ccpmp/./../source/src/GameEngine.cpp:1623: undefined reference to `s2d::Engine::SetFPS(int)'
... and so on ...



The paths are correct, Ive got everything in the same root directory :D

I cant figure out why its not linking D:

Im using the following packages:

binutils-mipsel-linux-2.13.1-1.i386
egcs-mipsel-linux-1.1.2-4.i386
egcs-c++-mipsel-linux-1.1.2-4.i386
egcs-libstdc++-mipsel-linux-2.9.0-4.i386

HELP ME FIREFOX! :O

EDIT

It was also giving me undefined references to "__builtin_new" so Im guessing the compiler version Im using isnt compatible....

Anyway Im using windows right now and it compiled just fine and I only spent like 2 minutes setting it up D:

So I guess I will be using windows for now...
 
Last edited by a moderator:
I made a little demo to see what I could do :)

nuqlear.com/crap/demo.app

kind of bland but I didnt want to waste anymore time on it. the space ship is mine, the music is not mine, just something I had laying around.

getting the sound working was a headache... I dont know how to access the sound device directly so Im using the SDK of course, which as far as know will only take 16bit 16khz raw PCM files :/

For the graphics I ended up just writing a dumb sprite drawing routine and "borrowed" putpixel code from Seagal's centipede port instead of using the SDK's functions. So thats something else I need to learn how to do...
 
Last edited by a moderator:
Ahh you got it to compile then. Quick question how did you generate the .app file from Linux...did you use Wine as Firefox suggested or did you have another solution?
 
I wish I was using Linux. Im going to be using Windows to compile until someone writes a tutorial on setting it up in Linux. (I probably just have the wrong mipsel-linux versions...)

I believe the only way to convert to .APP is with dlmake.exe, but it looks like someone that knows what theyre doing could make their own converter (not me :)
 
Last edited by a moderator:
Blimey, egcs is ancient! I'm just using the GNU tools off Ingenic's ftp site, which are:

mipsel-linux-gcc (GCC) 4.1.2
mipsel-linux-g++ (GCC) 4.1.2
GNU ld (GNU Binutils) 2.18
GNU objcopy (GNU Binutils) 2.18

You don't have to install them as such, just plonk 'em in a directory somewhere and add them to the path of your build shell.

dlmake.exe adds about two and a half kB to the output binary, so I'm guessing it globs some kind of loader or shell onto the front of the binary, not just a start offset. I haven't had chance to look at it yet, but it'd be nice to know what it's doing.

So far I'm pretty much ignoring the s2d framework and just call m_pDraw2D->GetVRAMPtr() to find the start of the framebuffer, which is 240x320x16bit 5-6-5 RGB with each scanline contiguous in memory (no funny pitch or anything). I'm not sure if it's possible to reconfigure it to be a different format, but that's fine for me as it is.
 
Last edited by a moderator:
huh I didnt know there was a toolchain in there. I had just googled it and used the first thing I saw :blink:

I got it to compile in linux, but first the linker gave me an error:
CODE
mipsel-linux-ld: error: no memory region specified for loadable section `.rel.dyn'


so I added *(.rel.dyn*) to the linker script, did you have to do this too?

I used WINE to run dlmake on it, and it shrunk the file by about 40kb... so maybe its not so simple...

somewhat related:

I cant mount the A320 in linux, my dmesg shows a bunch of:

CODE
[ 1412.046878] sd 2:0:0:0: [sdb] Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK,SUGGEST_RETRY
[ 1412.046889] end_request: I/O error, dev sdb, sector 0



has anyone managed to mount it or are you using memory cards?
 
Last edited by a moderator:
'Atomic Man' said:
so I added *(.rel.dyn*) to the linker script, did you have to do this too?
No, I'm just using the standard link.xn out of the SDK... I don't think I've ever come across that section type before, in fact.

'Atomic Man' said:
I used WINE to run dlmake on it, and it shrunk the file by about 40kb... so maybe its not so simple...
That's very interesting. Perhaps .app files are crunched?

So did your output .app run in the end, then?
 
Last edited by a moderator:
'Firefox' said:
No, I'm just using the standard link.xn out of the SDK... I don't think I've ever come across that section type before, in fact.
Google says it has something to do with MIPS and dynamic relocations, Im not sure why I got it but you didnt though.

Heres the entire rel.dyn section of my app:

CODE
*(.rel.dyn*)
.rel.dyn 0x0000000000000000 0x0 GameEngine.o
0x0000000000000000 . = ALIGN (0x8)
0x0000000000000000 _etext = <code 342> (.)


'Firefox' said:
That's very interesting. Perhaps .app files are crunched?

So did your output .app run in the end, then?
Nevermind, I was looking at the wrong file (downenv.elf instead of downenv.bin). It looks like dlmake combines downenv.bin with any resource files and adds a 2kb header as you said. The .app did run.

Also, I just did a clean install of Ubuntu 9.04 and my A320 mounts :D
 
Last edited by a moderator:
Atomic Man said:
Google says it has something to do with MIPS and dynamic relocations, Im not sure why I got it but you didnt though.

Heres the entire rel.dyn section of my app:

CODE
*(.rel.dyn*)
.rel.dyn 0x0000000000000000 0x0 GameEngine.o
0x0000000000000000 . = ALIGN (0x8)
0x0000000000000000 _etext = <code 342> (.)
I'll have to have a dig into this some time.

One of the reasons for me getting a Dingoo (apart from it being an excellent handheld in its own right) was to brush up on my MIPS skills, so it'd be interesting to know about this.

Atomic Man said:
The .app did run.

Also, I just did a clean install of Ubuntu 9.04 and my A320 mounts :D

Good stuff! :D
 
Last edited by a moderator:
QUOTE
I cant mount the A320 in linux, my dmesg shows a bunch of:

CODE
[ 1412.046878] sd 2:0:0:0: [sdb] Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK,SUGGEST_RETRY
[ 1412.046889] end_request: I/O error, dev sdb, sector 0


has anyone managed to mount it or are you using memory cards?

I had that problem, i formatted the players memory under windows then linux mounted it no probem. If you don't want to do that then you can mount it manually as root
 
Back
Top