English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 19 April 2010, 11:04   #1
pmc
gone
 
pmc's Avatar
 
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
Less than 50 fps...?

Good morning people.

If I have an effect that will run in 50fps (or 60fps - hi there NTSC guys ) then I can do what I do now and just have a copper triggered level 3 interrupt for it and everything's nicely synced with the display.

But, what happens when an effect won't run in 50fps and I need more time...?

What are the strategies for syncing with the display while running at a lower frame rate...?

As always, apologies if this is a really stupid question.
pmc is offline  
Old 19 April 2010, 11:10   #2
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Quote:
Originally Posted by pmc View Post
What are the strategies for syncing with the display while running at a lower frame rate...?
First of all, try to optimize your code so it may run in 50 FPS. If that isn't possible, then you can either cheat (that's what demo coding is all about anyway) or remove your routine from the interrupt and call it in a normal "Wait for vblank, do effect" loop, f.e.

Code:
LOOP    bsr WaitRaster
    bsr lame_and_slow_effect ; ;D
    btst #6,$bfe001
    bne.b LOOP
    rts

WaitRaster
.wait    move.l $dff004,d0
    and.l #$1ff00,d0
    cmp.l #303<<8,d0    ; 303 = line to wait for
    bne.b .wait
    rts
StingRay is offline  
Old 19 April 2010, 11:18   #3
pmc
gone
 
pmc's Avatar
 
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
Quote:
Originally Posted by StingRay
First of all, try to optimize your code so it may run in 50 FPS.
Quote:
Originally Posted by StingRay
Code:
    bsr lame_and_slow_effect ; ;D


I just read those and roared with laughter - thanks man.

Let me assure you that this is hypothetical slow effect! I was just interested in what to do in this situation.

While we're on the subject of waiting for vbl - I understand your wait for vbl code just fine (in fact, thanks to your generosity it's the identical routine that's now part of my standard code ) but where did you get line 303 from...?

Again this is probably a very stupid question and I just didn't read the HRM properly or something but where is it stated that line 303 == start of vbl...?
pmc is offline  
Old 19 April 2010, 11:20   #4
oRBIT
Zone Friend
 
Join Date: Apr 2006
Location: Gothenburg/Sweden
Age: 48
Posts: 339
Just curious, is that WaitVbl-code valid for both NTSC/PAL Amigas?
oRBIT is offline  
Old 19 April 2010, 11:59   #5
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Quote:
Originally Posted by pmc View Post
While we're on the subject of waiting for vbl - I understand your wait for vbl code just fine (in fact, thanks to your generosity it's the identical routine that's now part of my standard code ) but where did you get line 303 from...?
This is just shortly before the VBlank starts to give a bit more time for the code. Since line 303 is not visible anymore there are no problems. Only valid for a standard PAL display of course.


Quote:
Originally Posted by oRBIT View Post
Just curious, is that WaitVbl-code valid for both NTSC/PAL Amigas?
No, it's PAL only.
StingRay 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
The Best Amiga 3D FPS Steve Retrogaming General Discussion 112 22 November 2015 16:28
ADoom FPS W4r3DeV1L support.Games 5 09 December 2008 15:56
RTG FPS Question Ed Cruse support.WinUAE 5 28 October 2008 17:07
200 % fps turrican3 request.UAE Wishlist 13 30 July 2008 18:34
FPS Adjustment Crow777 support.WinUAE 1 07 July 2008 00:47

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 02:46.

Top

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