GP32 Mr.mirkos Sdk Replacement


loki666 posted on Feb 24 2004 at 08:31 AM said:
sure...i want some code :)
is there a way to use the RTC without modifying the gp32?
it's ok if the RTC is reseted to zero on power-on (or even on application init)
With mr.spiv help, there is now a working timer in the next release :)
 
Last edited by a moderator:
great :)
so whats the final granularity of the timer? (a rtc or a counttick)

i hope to compile a runable kvm wih ur sdk for the week-end... still issues with file i/o

by the way could u make ur file i/o functions to work like fopen(), fread and fwrite of std C lib? (a fgetc() and fputc() would be a great add too)
jar files cant be handled by ur actual functions (can keep track of current position in file, and lot of fseek() calls)

ok nothing else for now

good work
 
loki666 posted on Feb 24 2004 at 09:05 PM said:
great :)
so whats the final granularity of the timer? (a rtc or a counttick)

i hope to compile a runable kvm wih ur sdk for the week-end... still issues with file i/o

by the way could u make ur file i/o functions to work like fopen(), fread and fwrite of std C lib? (a fgetc() and fputc() would be a great add too)
jar files cant be handled by ur actual functions (can keep track of current position in file, and lot of fseek() calls)

ok nothing else for now

good work
It is a countTick, irq driven, using the RTC :)

> by the way could u make ur file i/o functions to work like fopen(), fread and fwrite of std C lib? (a fgetc() and fputc() would be a great add too)

if you are seeking in big files, and you are only reading bytes out of it, my lib is a little slow for this kind of file acting. I can try to add a better file io, lets see...

if you read files char by char, it would be best, reading it in blocks :)


What do you mean with jar files ? java files ?
whats so different with these files ?
 
Last edited by a moderator:
jar files a basically zip files (with java files in it)

i cant change the way the jarLoader handle the files, because it's Sun's jarLoader (and i dont have the skill (nor the time)) to reimplement thr whole jarLoader

i should take a closer look, maybe i could use a 'long pos' to keep the current pos in the file... but i think that some function in the jarLoader, start reading bytes where the previous function left the file... so not sure...

thanx
 
me downloaded it, but I can't open bz2 files, how 'bout some more common formats? (zip, rar, lzh, arj, what ever..)
 
Extract the file from the bz2 compressed archive (use winrar), then rename it .tar and you should be able to extract the rest from that.

Great work Mirko! Just looking at the IRQ source you used for the timer (courtesy of that nice chap Mr Spiv).

Any maths to go with rTICINT, can't easily see how 0x81 (129 dec) relates to the 1/128th second interrupt, unless it really is that simple and equals the number of interrupts per second. :eek:
 
great!!!
now i have to make it works with ads...

in gp_timer.c
i had to change the declaration of RTCInt()

extern void RTCInt(void); now its extern becaus i put the whole code in qp_irq.s (ads didnt like ur version)
here is my full arm translation
Code:
    EXTERN  	rGLOBALCOUNTER //to access the long defined in gp_timer.c
RTCInt
    stmdb    r13!,{r0-r12,lr}
    LDR   r0,rGLOBALCOUNTER
    add      r0,r0,#1
    STR   r0,rGLOBALCOUNTER
    ldmia    r13!,{r0-r12,lr}
    subs     pc,lr,#4
    END

do you see any error??? (its my first asm function ;))

well my linker see somes... tried your rtc test and here's the output

value out of range(0-0xfff) for relocation (wrt symbol rGLOBALCOUNTER) in gp_irq.o
 
RobertJ posted on Feb 25 2004 at 09:24 PM said:
Extract the file from the bz2 compressed archive (use winrar), then rename it .tar and you should be able to extract the rest from that.

Great work Mirko! Just looking at the IRQ source you used for the timer (courtesy of that nice chap Mr Spiv).

Any maths to go with rTICINT, can't easily see how 0x81 (129 dec) relates to the 1/128th second interrupt, unless it really is that simple and equals the number of interrupts per second. :eek:
the ticnt register 0x15700044 (32 bit) offers:

TICK ENABLE BIT 7: 0=disable 1=enable timer
rick time count bit 0-6: tick time count value 1-127

so

%10000001 result in 1/128 timer
%11111111 result in 1/1 timer
 
Last edited by a moderator:
Using this code under ADS 1.2, I just can't get any interrupts working properly. :/

Code:
	rCLKCON |= 0x800;
	(*(volatile unsigned char *)0x15700044) = 0x81;
	ARMDisableInterrupt();
	swi_install_irq(8, mp3HandleInterrupt);
	ARMEnableInterrupt();

The function I'm trying to call is declared as:

Code:
__irq void mp3HandleInterrupt(void)

All that happens when the function is called, is the machine resets. :/

Anybody got any advice?
 
RobertJ posted on Mar 1 2004 at 12:33 AM said:
Using this code under ADS 1.2, I just can't get any interrupts working properly. :/

Code:
	rCLKCON |= 0x800;
	(*(volatile unsigned char *)0x15700044) = 0x81;
	ARMDisableInterrupt();
	swi_install_irq(8, mp3HandleInterrupt);
	ARMEnableInterrupt();

The function I'm trying to call is declared as:

Code:
__irq void mp3HandleInterrupt(void)

All that happens when the function is called, is the machine resets. :/

Anybody got any advice?
you must rescue the registers in the IRQ function.

asm volatile ("stmdb r13!,{r0-r12,lr}");

// your IRQ stuff

asm volatile ("ldmia r13!,{r0-r12,lr} \n"
"subs pc,lr,#4" );


Also your function must be finished, before a nother irq occurs..

( dont do mp3 decoding in 1/128 irq ) :))


If its a ADS problem, i can not help you, couse i can not test it...
 
Last edited by a moderator:
Using a combination of an ASM function, and lots of commenting out this and that, I finally traced it down to the calling of GpKeyGetEx() in the official SDK (oh another bug in that thing?) which must have been corrupting registers not being saved.

Replaced it with yours, everything works now!

(And no I wasn't using it for decoding :) only input and updating the display)

People can now download a very early beta here:
GpMad32 v0.7
 
RobertJ posted on Mar 1 2004 at 11:41 PM said:
Using a combination of an ASM function, and lots of commenting out this and that, I finally traced it down to the calling of GpKeyGetEx() in the official SDK (oh another bug in that thing?) which must have been corrupting registers not being saved.

Replaced it with yours, everything works now!

(And no I wasn't using it for decoding :) only input and updating the display)

People can now download a very early beta here:
GpMad32 v0.7
Nice player, and nice web site :)

i really like your player, its small, nice, and no blooting menue. Please keep it so simple.
 
Last edited by a moderator:
gp32 SDK Replacement Version 0.6.2

- added 1,2,4,8 bit palette color modes
- added sprite blitting ( dma )
- added palette example
- some bug fixed...

get it here: http://mirkoroller.de/gp32

Now that all Basic functions a working really good, i ask, what needs to be improved ?
 
If I understood correctly then this will only work with Linux.
How hard is it to make it work with devkitadv for GP32 on Windows?
 
Arnout posted on Mar 2 2004 at 01:20 PM said:
If I understood correctly then this will only work with Linux.
How hard is it to make it work with devkitadv for GP32 on Windows?
I got it to work with the SDL update for minigp, but don't ask me how... I hope DJWillis finishs his tuto on creating a complete tool chain for windows, I am in the need of an up2date compiler and utils like bin2bmp ...

Now that all Basic functions a working really good, i ask, what needs to be improved ?

Well, I stilll think that the modplayer is not that comfortable to use like the modplaylib which is using GP32 Standards SDK ... any plans on news fuctions or features ?!

What about higher lever sprite handling like rotating, scaling, collision and stuff?
 
Last edited by a moderator:
It's not anything linux specific.. Just copy the libs & sources over to windose. You can always recompile..
 
Hi nanjungho,

I'm also using ADS1.2 for GP32 dev. :rolleyes:


I have some questions for ADS1.2 as below.

- Should I recompile all of the Mirko's library source code with ADS ?
If so,
I think we need to recompile and build the lib file, when new version is appeared.
Is there any merit/demerit of speed or size compare to the GCC version?

- Is it correct for compiler & linker option ? Any recommendation?
compile : -O2 -cpu ARM920T
linker : -info totals -ro-base 0xc000000 -first ads_crt0.o
fromELF : -c -output rtc.bin -bin


I can't run the RTC sample yet.
So, I need your help.

Thanks,
- omega5 -
 
omega, you should recompile all the lib with ADS (use a nanjungho project as template)
check ASM Compiler, C Compiler and Linker options

did you manage to run the smctest prog? i think my smfs lib is broken, but dont know why...?

if any of u use ADS and made wokring smfs lib please help

thanx

loki
 
Back
Top