English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. Blitz Basic

 
 
Thread Tools
Old 03 March 2021, 21:35   #1
Cobe
Registered User
 
Join Date: Jan 2014
Location: Belgrade / Serbia
Age: 41
Posts: 999
Int 5 (& "longer" code)

I havent tried this yet, but am thinking theoreticaly for now.

What happens if code that we set in int 5 takes more than one vertical blank to be finished?
Cobe is offline  
Old 03 March 2021, 21:52   #2
grond
Registered User
 
Join Date: Jun 2015
Location: Germany
Posts: 1,918
It will be executed again upon exiting the irq service routine.
grond is offline  
Old 04 March 2021, 17:56   #3
Cobe
Registered User
 
Join Date: Jan 2014
Location: Belgrade / Serbia
Age: 41
Posts: 999
Meaning what? At second vbl it wont be called again cause its already being executed?
Cobe is offline  
Old 04 March 2021, 18:40   #4
grond
Registered User
 
Join Date: Jun 2015
Location: Germany
Posts: 1,918
Quote:
Originally Posted by Cobe View Post
Meaning what? At second vbl it wont be called again cause its already being executed?
An IRQ of the same priority cannot interrupt a running IRQ, hence, the VBL can't interrupt the VBL still being executed. Since the interrupt source is cleared at the beginning of the interrupt handler and the new VBL sets it again, in the moment the interrupt routine quits (and the IRQ status flag is cleared), the next VBL will be triggered. This would also happen if the raster beam is now already drawing a new frame onto the monitor such that the VBL would be delayed. If the VBL routine runs for two frames or more, one VBL will be dropped.

Old games often had almost all game code in the VBL routine so that it was synced from the VBL. This is not advisable and a rather ugly hack. Of course, this must not be done at all if you have the OS running.
grond is offline  
Old 05 March 2021, 17:33   #5
Cobe
Registered User
 
Join Date: Jan 2014
Location: Belgrade / Serbia
Age: 41
Posts: 999
Aha, ok. Thanks for explanation.
Cobe is offline  
Old 05 March 2021, 18:09   #6
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
Quote:
Originally Posted by grond View Post
Old games often had almost all game code in the VBL routine so that it was synced from the VBL. This is not advisable and a rather ugly hack.
For what reason is that an ugly hack?
It may be not advisable if you don't manage to run your engine in 50fps. But that's all.
phx is offline  
Old 05 March 2021, 18:52   #7
grond
Registered User
 
Join Date: Jun 2015
Location: Germany
Posts: 1,918
Quote:
Originally Posted by phx View Post
For what reason is that an ugly hack?
It may be not advisable if you don't manage to run your engine in 50fps. But that's all.
Yes, you are right. If you are alone in the system, it is ok. I guess the fact that you are blocking interrupts of lower priority if you do calculations that need not be carried out with priority (which should be much of the game logic) doesn't really play a role in an Amiga game running as the only program.
grond is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
"Diabolik" & "Dylan Dog" & "Tex" & "Time Runners" series DamienD request.Old Rare Games 20 21 July 2022 16:58
"Screech!! v2.41" & "Screech!! [AGA] v2.51" - "HD install" --> "ADFs" DamienD request.Old Rare Games 45 15 June 2020 12:42
Defender of the Crown [CDTV] - ".ISO & .WAV & .CUE" vs ".BIN & .CUE" DamienD support.WinUAE 18 17 June 2019 01:52
[Found: "Nippon Safes Inc." & "Nightbreed"] Bank Robbery point and click? soulless Looking for a game name ? 6 15 April 2017 23:21

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 17:58.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.16329 seconds with 15 queries