gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Announcements And Comments > A Little Tutorial I Just Wrote...

#5539 - Krakken - Thu May 01, 2003 12:28 am

Hi,

I am Krakken. Some of you may already know me from the IRC channel as i'm there quite often now. I have been busy for the last few hours making a detailed tutorial for timers. It covers all the concepts of timers except overflow and interrupts (I may add those at a later date if requested).

Basically I found it hard to learn timers and wanted to make it easier for others. You may not think it much and it probably isn't but it's my little contribution to the development community. :)

I hope you enjoy reading it, I have tried to explain it as best I can.

http://www.sapian.co.uk/files/GBATimers.doc

- KrAkKeN -

#5588 - NeoGeo - Fri May 02, 2003 1:37 pm

Nice work Krakken!!

#5849 - consolecoder - Sat May 10, 2003 11:21 am

Thanks for your work

#5883 - Krakken - Mon May 12, 2003 9:10 am

Glad you enjoyed reading it. :)

#5893 - niltsair - Mon May 12, 2003 2:26 pm

I wish you had written this tutorial 8 months ago, when i was having my first babies steps at Gba programming :-)

One little thing you might want to had, emulators don't all have the same behavior in regard to Timer's Irq interupt. I discovered it the hard way :-P

There's one that produce an interrupt for every timer increase(i think it was boycott) and the other one that do it correctly(VisualBoy i think) by producing and interupt at every overflow.

I was using timers to time animations and it didn't work so good when i was trying to use my game in others emulators. You might want to add the implementation of what most people do, create timers out of VBlank.

I could send you my macros/code if you'd like. I made a 8 timers scheme that use global variables and defines to allow Start/Pause/Reset and check elapsed time.

#6246 - Krakken - Tue May 20, 2003 7:24 pm

Hi!

Thanks for your comments. I may well update it soon with what you have mentioned. Just need to finish some college work first hehe. The code may be really useful, my e-mail is ryall@sapian.co.uk.

Thanks again, Krakken.