that god damned STOS Timer... is there a better vers?

STOS-related stuff in here please

Moderators: exxos, simonsunnyboy, Mug UK, Zorro 2, Moderator Team

EstTeeEfEm
Captain Atari
Captain Atari
Posts: 299
Joined: Mon May 04, 2015 9:02 pm

that god damned STOS Timer... is there a better vers?

Postby EstTeeEfEm » Wed Oct 07, 2015 12:55 pm

Is there a better, and more functional version of timer that reads a var from the system, this TIMER=0 business is rubbish.. i cant quite say for sure, but im sure its not working properly...?

User avatar
exxos
Hardware Guru
Hardware Guru
Posts: 4933
Joined: Fri Mar 28, 2003 8:36 pm
Location: England
Contact:

Re: that god damned STOS Timer... is there a better vers?

Postby exxos » Wed Oct 07, 2015 3:21 pm

Maybe if you can explain why its rubbish and what you are trying to do it might help..
4MB STFM 1.44 FD- VELOCE+ 020 STE - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - various clutter

http://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
http://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.
http://ataristeven.exxoshost.co.uk/Steem.htm Latest Steem Emulator

EstTeeEfEm
Captain Atari
Captain Atari
Posts: 299
Joined: Mon May 04, 2015 9:02 pm

Re: that god damned STOS Timer... is there a better vers?

Postby EstTeeEfEm » Wed Oct 07, 2015 10:47 pm

Sorry, i started venting instead of actually writing the problem out coherently!

There is supposed to be a variable that STOS uses and you call it like this:

Code: Select all

Timer=0


According to the manual its supposed to update every 50th of a second but it just isn't...even when compiled?

My program is running at a decent rate but I dont think the timer variable that STOS has set up is based on any actual system timers and if it is, its poorly implemented, did anyone know of a more direct way of reading any of the system timers? My program uses the timers as a count system for a CD based player and with a faulty timer, the CD player section doesnt play in seconds lol, more like updating every 4 seconds.

This is my new site:
http://scottsataripages.altervista.org/
and has the program on, although only as an .ST file. (Its a REALLY new site)

Check it out and let me know what you think? Its going to include all my STOS stuff as a sort of online backup system too..

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2978
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: that god damned STOS Timer... is there a better vers?

Postby AtariZoll » Thu Oct 08, 2015 8:33 am

This seems as problem caused by not using regular V-blank service routine, but own one in SW. Usual solution is that at the end of own V-blank code you not use rte, but jump to old V-blank routine - which updates timer counter in every 1/50 sec.
Famous Schrodinger's cat hypothetical experiment says that cat is dead or alive until we open box and see condition of poor animal, which deserved better logic. Cat is always in some certain state - regardless from is observer able or not to see what the state is.

User avatar
exxos
Hardware Guru
Hardware Guru
Posts: 4933
Joined: Fri Mar 28, 2003 8:36 pm
Location: England
Contact:

Re: that god damned STOS Timer... is there a better vers?

Postby exxos » Thu Oct 08, 2015 8:43 am

20151008094226.jpg


Seems ok to me.

Though its possible it does not work correctly only when the mod is playing ?
You do not have the required permissions to view the files attached to this post.
4MB STFM 1.44 FD- VELOCE+ 020 STE - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - various clutter

http://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
http://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.
http://ataristeven.exxoshost.co.uk/Steem.htm Latest Steem Emulator

EstTeeEfEm
Captain Atari
Captain Atari
Posts: 299
Joined: Mon May 04, 2015 9:02 pm

Re: that god damned STOS Timer... is there a better vers?

Postby EstTeeEfEm » Sat Oct 10, 2015 5:09 am

Well, I actually solved this by reading the 200hz timer rather than the 50...

I totally gave up using timer=0, because what was happening was the timer would count say 8 seconds then skip one second... basically the timer was running slightly slower than the VBL .. odd but with a lot of stuff running its more noticeable..

Code: Select all

610 TMR=leek(1210) : if TMR>200 then loke 1210,-20


Its -20 because when it reached the new instruction it was VERY close to 0


worked better for me and gave a more consistent timer. I'd check this timer was over 200 then reset it (logically using another variable) its more accurate than reading... IF timer>50 .. I've found anyway... might just have been a coincidence that the whole thing stated working properly, STOS can sometimes be funny anyways when trying to get some serious accuracy.

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2978
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: that god damned STOS Timer... is there a better vers?

Postby AtariZoll » Sat Oct 10, 2015 6:53 am

I would not blame STOS for your issues. Most likely Vertical blank routine is disabled sometimes because other interrupts take too long time.
I find whole idea to make audio player in STOS as not really good one.
Famous Schrodinger's cat hypothetical experiment says that cat is dead or alive until we open box and see condition of poor animal, which deserved better logic. Cat is always in some certain state - regardless from is observer able or not to see what the state is.

User avatar
exxos
Hardware Guru
Hardware Guru
Posts: 4933
Joined: Fri Mar 28, 2003 8:36 pm
Location: England
Contact:

Re: that god damned STOS Timer... is there a better vers?

Postby exxos » Sat Oct 10, 2015 9:24 am

Playing MOD takes up a lot of CPU time, so everything else runs slow or turned off, like the mouse for example. Welcome to the limits of a 8mhz machine ;)
4MB STFM 1.44 FD- VELOCE+ 020 STE - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - various clutter

http://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
http://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.
http://ataristeven.exxoshost.co.uk/Steem.htm Latest Steem Emulator

User avatar
exxos
Hardware Guru
Hardware Guru
Posts: 4933
Joined: Fri Mar 28, 2003 8:36 pm
Location: England
Contact:

Re: that god damned STOS Timer... is there a better vers?

Postby exxos » Sat Oct 10, 2015 10:37 am

EstTeeEfEm wrote:Well, I actually solved this by reading the 200hz timer rather than the 50...

I totally gave up using timer=0, because what was happening was the timer would count say 8 seconds then skip one second... basically the timer was running slightly slower than the VBL .. odd but with a lot of stuff running its more noticeable..

Code: Select all

610 TMR=leek(1210) : if TMR>200 then loke 1210,-20


Its -20 because when it reached the new instruction it was VERY close to 0


worked better for me and gave a more consistent timer. I'd check this timer was over 200 then reset it (logically using another variable) its more accurate than reading... IF timer>50 .. I've found anyway... might just have been a coincidence that the whole thing stated working properly, STOS can sometimes be funny anyways when trying to get some serious accuracy.



I wonder if you could use "test a bit" and check for >200 as a binary number, might only be able to test >128 or >256 but you could then use ON N GOSUB to do your time stuff rather than using IF TMR>200.
4MB STFM 1.44 FD- VELOCE+ 020 STE - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - various clutter

http://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
http://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.
http://ataristeven.exxoshost.co.uk/Steem.htm Latest Steem Emulator


Social Media

     

Return to “STOS”

Who is online

Users browsing this forum: No registered users and 1 guest