Page 28 of 57

Posted: Wed May 23, 2012 9:48 am
by bioloid
Thanks :)
Yes I started with basic 2D sinus effects then I saw your cube rolling at decent fps which gived hopes !
Thanks for this fantastic SDK !!!

Posted: Wed May 23, 2012 3:33 pm
by Stef
Thanks :p
If i find sometime, i would like to complete the BMP_FF_xx stuff to make a starfox like demo (3D flat) on stock megadrive. I think that if we could not get exactly starfox, we can have something not that far... and without extra hardware ;)

Posted: Wed May 23, 2012 3:38 pm
by Shiru
This has already been done long ago.

Posted: Wed May 23, 2012 4:37 pm
by Stef
Shiru wrote:This has already been done long ago.
Yeah i know about this (unreleased) game =) this is the bonus part if i remember correctly... It is really impressive so far and i would like to do something similar... in better (if that's possible) :p

Posted: Wed May 23, 2012 5:37 pm
by TmEE co.(TM)
Starfox on SNES is mostly 10fps or so on real hardware, it is really choppy. I don't think you don't need to try too hard to create a game that is comparable and perhaps even exceed Starfox on MD. The more you try the better though :P

Posted: Wed May 23, 2012 7:14 pm
by Stef
yeah i know that starfox on the real hardware is choppy and barely at 10/12 FPS (emulator generally gives better frame rate). Anyway even 10 FPS, with the number of triangles and the rendering, this is a big challenge for the megadrive ;)

Posted: Wed May 23, 2012 7:30 pm
by Shiru
With low framerate it is still possible to make a 3D adventure like Total Eclipse.

Posted: Wed May 23, 2012 7:35 pm
by Stef
Hehe it looks a bit choppy and window size is really small, but at least, that is full 3D (starfox is more limited as world is only translated).

Posted: Thu May 24, 2012 12:03 am
by Moon-Watcher
Me again :P I'm having some issues using timer functions. Seems waitMs() and waitTick() completly hangs execution in SGDK 0.91

Posted: Thu May 24, 2012 8:51 am
by Stef
Moon-Watcher wrote:Me again :P I'm having some issues using timer functions. Seems waitMs() and waitTick() completly hangs execution in SGDK 0.91
Ah yeah i forgot to fix that problem... for the moment you can't call these methods from your V interrupt callback else you lock the program :-/

Posted: Thu May 24, 2012 6:52 pm
by Chilly Willy
Stef wrote:
Moon-Watcher wrote:Me again :P I'm having some issues using timer functions. Seems waitMs() and waitTick() completly hangs execution in SGDK 0.91
Ah yeah i forgot to fix that problem... for the moment you can't call these methods from your V interrupt callback else you lock the program :-/
Interrupt driven callbacks should NEVER use delays (other than small CPU loops for something like reading controllers) as you want to handle the event and exit using as little time as possible.

For things that NEED some kind of long delay, you probably want a deferred task - as an int is exited, it checks for a deferred task, and runs it at normal level like the code that was running before the int occurred.

Posted: Fri May 25, 2012 10:02 am
by Stef
Indeed you should avoid that but i think i will add something to at least avoid the dead lock ;)

Posted: Fri May 25, 2012 5:08 pm
by Chilly Willy
Stef wrote:Indeed you should avoid that but i think i will add something to at least avoid the dead lock ;)
Check the current int level in sr and exit immediately instead of waiting. 8)

Posted: Fri May 25, 2012 5:38 pm
by Stef
Chilly Willy wrote:
Stef wrote:Indeed you should avoid that but i think i will add something to at least avoid the dead lock ;)
Check the current int level in sr and exit immediately instead of waiting. 8)
I was thinking about a "in_vintcallback" flag, the SR test is a good idea too but not 100% reliable as now user can set it manually (for instance if you want to do direct VDP command from main loop, you want to avoid V Interrupt callback which generally modify vdp state).

Posted: Fri May 25, 2012 8:15 pm
by Chilly Willy
Stef wrote:
Chilly Willy wrote:
Stef wrote:Indeed you should avoid that but i think i will add something to at least avoid the dead lock ;)
Check the current int level in sr and exit immediately instead of waiting. 8)
I was thinking about a "in_vintcallback" flag, the SR test is a good idea too but not 100% reliable as now user can set it manually (for instance if you want to do direct VDP command from main loop, you want to avoid V Interrupt callback which generally modify vdp state).
Okay, how about this -

waitTick:
if (intlevel > 3) wait using VDP status in busy loop
else wait using vints

waitMs:
wait using CPU busy loop (use table lookup for loop count for small ms, use calculation for count for large ms)