GP32 Mr.mirkos Sdk Replacement


It takes this long with write caching enabled or disabled. I've used just about every combination of setting in the cnf header file, all result in the same problem. :)

I suspect the issue is to do with the macros that check SMC state to see if it has finished writing.

Got a nasty feeling that this isn't working, and it has to wait for the timeout to expire (that MIPS setting in the cnf file) before it completes each write.
 
Squidge posted on Apr 18 2004 at 08:17 PM said:
read-only in user mode, and so can only be changed in priviledged mode (Eg. during an exception handler)

Actually, I'll just check that :)

"IRQ's may be disabled at any time by setting the I bit in the CPSR, though this can only be done from a privileged (non-User) mode."
GP32 boots intro supervisor mode.. and afair does not even work out of box in user mode (e.g. BIOS does not even setup usermode stack etc)..
 
Last edited by a moderator:
Ah right. Thanks for that Spiv.

Actually, that gives me a nice idea for speeding up my emu by using the CPSR reg.... Hmm, I wonder...
 
Huhhh,

SDK071 hit the road...

- sound update, now working 44100/22050khz in 8 and 16 Bit modes. ( only Stereo )
- c++ example shows you how easy it is, writing your Software in c++
- fileio small update ( fwrite )
- chatboard driver cleaned up

have fun....


SDK071
 
Me thinks I really should start using this rather than just downloading each new version as and when it comes out :)
 
Squidge posted on May 3 2004 at 07:55 PM said:
Me thinks I really should start using this rather than just downloading each new version as and when it comes out :)
it is worth a try!
 
Last edited by a moderator:
Just porting it to ADS now. Grrr, Mirko doesn't bother prototyping his functions half the time by the looks of it ! Ah well, still better than writing my own SDK from scratch :)
 
Well, it compiles the sdk. Didn't bother with chatboard, timers, sprites or sound, as I don't have a use for the first one (although I do have some chatboards), and I prefer to do the last 3 myself.

Now to just get it running without crashing...

If Mirko allows it, I will post a modified SDK071 for ADS users. Mirko?
 
Squidge posted on May 4 2004 at 07:05 AM said:
Well, it compiles the sdk. Didn't bother with chatboard, timers, sprites or sound, as I don't have a use for the first one (although I do have some chatboards), and I prefer to do the last 3 myself.

Now to just get it running without crashing...

If Mirko allows it, I will post a modified SDK071 for ADS users. Mirko?
I really cant beleive, that someone is developing under Windows, and using this expensive ADS stuff :p , but if you want you can of couse post your ADS port.
 
Last edited by a moderator:
Well, I didn't really pay for my ADS. I've got two licenses for ADS at work, one for the PC at work, and one for use on a laptop. Since I hardly use the laptop, I've just installed it on my home PC instead :)
 
Hi!

There I had finally a look on the latest SDK (boy I am lazy!). IMHO you should rename some functions using some kind of scheme. Here is a little suggestions I have:

current -> improved -> my suggestion

1. name the function like this Verb+Obj+Mode every one starts with a cap (even Objs like Smc, Rtc or Zda) use 'set' and 'get' for the common functions and 'read' and 'write' and draw
gp_ScreenClear16(u16* framebuffer, u16 color) ->
gp_ClearScreen16(u16* framebuffer, u16 color) ->
gpClearScreen16(u16 color, u16* framebuffer)

gp_playbuffer() -> gp_PlayBuffer() -> gpPlayBuffer()
gp_Uncompress() -> gp_UnCompressZda() -> gpUncompressZda
gp_ChatBoardInit() -> gp_InitChatBoard() -> gpInitChatboard
gp_ButtonResult() -> gp_GetButtonResult() -> gpGetButton()
gp_SetFont16() -> gp_SetString16() -> gpDrawString16()
smc_dir() -> gp_GetSmcDir() -> gpGetSmcDir()

2. keep one order of parameters like data+size+pos+target, if similar functions share nearly the same parameters first the one they have in common then the special ones
gp_SpriteBlit(sprite, x_size, y_size, put_x, put_y, framebuffer) ->
gp_BlitSprite(sprite, size_x, size_y, put_x, put_y, framebuffer) ->
gpBlitSprite(sprite, size_x, size_y, put_x, put_y, framebuffer)

gp_SpriteBlitT(sprite, trans, x_size, y_size, put_x, put_y, framebuffer) ->
gp_BlitSprite(sprite, size_x, size_y, put_x, put_y, framebuffer, trans) ->
gpBlitSprite(sprite, size_x, size_y, put_x, put_y, framebuffer, trans)

3. begin every function with gp, even the SMC and reserve the '_' only for vars smc_write() -> gp_WriteSmc() -> gpWriteSmc()
gp_GetRTC() -> gp_GetRtc() -> gpGetRtc()
gp_init_sound() -> gp_InitSound() -> gpInitSound()

This is only a suggestion feel free to use your own scheme as long it is consistent and it aplys on EVERYTHING. The SDK needs to be well structured so it is easier to learn and use. Now it is the right time to change it because it isn't complete yet and not so many people are using it. When all the noobies come with the euro launch a well formed SDk is the key
 
sounds very good, i was also not very happy with the different names...

some kind of improved and suggestion sounds good,

Verb+Obj+Mode
How about gp_[verb+Obj+Mode] ???
verbs = get, set, init, draw.
[get] if we want an integer/paramater back, always returns something
[set] if we want to change something, could return a parameter
[init] to init a subsystem, could return something
[draw] for grafixs ( sprites, points ) returns nothing

Mode = 8,16. depends on Screen setting, if none, works on both

Obj : if its a Normal name/device, like Sound, Framebuffer,
OBJ : if its a Integer/variable, like RTC, PCLK

The gp_ makes it clear that the user is using this SDK, and not
the official SDK, where all begins with gpName, so everyone can see
on the rush, for what SDK a programm is written.


gp_ChatBoardInit() -> gp_initChatboard()
gp_ScreenClear16(...) -> gp_clearFramebuffer16(...)
gp_SetFont8() -> gp_drawString() [8 is not needed, works in all modes]
gp_GetRTC() -> gp_getRTC()
gp_return_pclk() -> gp_getPCLK
and so on...


gp_SpriteBlit(sprite, x_size, y_size, put_x, put_y, framebuffer) ->
gpBlitSprite(sprite, size_x, size_y, put_x, put_y, framebuffer)

gp_SpriteBlitT(sprite, trans, x_size, y_size, put_x, put_y, framebuffer) ->
gpBlitSprite(sprite, size_x, size_y, put_x, put_y, framebuffer, trans)

i think overloading is a c++ feature... :)


> When all the noobies come with the euro launch a well formed SDk is the key
hehe :p


Give me some days to change it, iam also finished the 32MB detecting, and rewrote gp_cpuspeed.c for the correct timings.

I think now all is working, ( still working on perfect sound ), so i can set the Version number to : SDK1.0pre1

I dont want to add more high level stuff ( sprite rotating, scalable fonts ) this will only blow up this project, i want a 100% working low level system.
 
yeah, great! that's the way to go! so take your time, no need to hurry...

low level huh? well, that won't prevent US from writing those routines :)

SDK1.0pre1 :eek: :eek: :eek: :eek: :eek: :eek: :blink:
 
synkro posted on May 6 2004 at 01:32 PM said:
yeah, great! that's the way to go! so take your time, no need to hurry...

low level huh? well, that won't prevent US from writing those routines :)

SDK1.0pre1 :eek: :eek: :eek: :eek: :eek: :eek: :blink:
Iam too optimistic about 1.0pre1 ? Okay lets see ... :ph34r:

so lets start ..... -> party time. ...
 
Last edited by a moderator:
Back
Top