Ultimate Amiga

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Timer  (Read 2264 times)

0 Members and 1 Guest are viewing this topic.

BooBoo

  • Amiga Guru
  • A600
  • ****
  • Karma: 3
  • Offline Offline
  • Posts: 168
Timer
« on: December 29, 2011, 07:34:18 PM »

Any ideas how I could have an accurate timer not affected by my loop, AMCAF has time commands indluding seconds but realy id like milliseconds

On a thread on EAB Samurai_Crow mentions using the timer.device with Dev commands

Any ideas?
Logged

Hungry Horace

  • Amorphous Blue-Blob Man
  • Site Admin
  • A4000T
  • ******
  • Karma: 307
  • Offline Offline
  • Gender: Male
  • Posts: 3,364
  • Don't forget... Ameboid's need love too!
    • AUW
Re: Timer
« Reply #1 on: January 04, 2012, 06:55:31 PM »

the Timer command of AMOS counts 1/50th of second, and you can reset it to zero at any point with TIMER=0 .... is that any good?

This shouldnt be affected by the loop and i use it myself to ensure that each game loop takes at least 1/50th of a second to occur. (i.e. therefore remaining unaffected by JIT settings etc)
Logged
Quote from: KillerGorilla
because winuae is made of code and your amiga is made of stuff

BooBoo

  • Amiga Guru
  • A600
  • ****
  • Karma: 3
  • Offline Offline
  • Posts: 168
Re: Timer
« Reply #2 on: January 04, 2012, 09:00:55 PM »

Thanks for you reply I had a bit on an idea dividing a second by 60
Logged

Lonewolf10

  • AMOS Extensions Developer
  • AMOS Dev
  • A2000
  • *****
  • Karma: 3
  • Offline Offline
  • Gender: Male
  • Posts: 618
    • http://www.aliensrcooluk.com
Re: Timer
« Reply #3 on: February 14, 2012, 08:53:54 PM »


Don't forget to check whether the system it's being run on is PAL or NTSC - unless you just plan to use it on an NTSC system. For PAL systems a second is 50 VBLs.


Regards,
Lonewolf10
Logged
Pages: [1]   Go Up
 

TinyPortal 2.2.2 © 2005-2022