English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 07 October 2017, 15:12   #1
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,349
Fake 60Hz with ECS Agnus?

A few games use a CIA interrupt to write to VPOSW to achieve a "fake 60Hz" display. That works even with OCS Agnus. [The resulting refresh rate can be quite far from 60Hz depending on how many scanlines the programmer chose to skip.]

With the ECS Agnus it would be possible to have the copper write to VPOSW instead. Just wondering, did any games or demos do that? Adjusting the refresh rate would just require changing a wait line in the copper list.
mark_k is offline  
Old 07 October 2017, 16:11   #2
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,491
Quote:
Originally Posted by mark_k View Post
A few games use a CIA interrupt to write to VPOSW to achieve a "fake 60Hz" display. That works even with OCS Agnus. [The resulting refresh rate can be quite far from 60Hz depending on how many scanlines the programmer chose to skip.]

With the ECS Agnus it would be possible to have the copper write to VPOSW instead. Just wondering, did any games or demos do that? Adjusting the refresh rate would just require changing a wait line in the copper list.
Hi mark_k, some misconception here.
You can fake 60Hz display in OCS with the method you prefer (CPU, Copper) writing to VPOSW.

In ECS Agnus you can directly setup a 60Hz display writing to BEAMCON0 (a real fixed 60Hz mode).

Remember: in PAL machine this is PAL60 and not really NTSC.
Vice-versa for NTSC if you force PAL: is really a NTSC50 mode.

This is due to different main base frequency.

Last edited by ross; 14 November 2017 at 22:44.
ross is online now  
Old 07 October 2017, 16:39   #3
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,573
IMHO it is perfectly valid question: is there (stupid) programs that don't bother with BEAMCON0 but want to use VPOSW using method that is not OCS compatible

You can't write to VPOSW with OCS Copper. On OCS all addresses below $dff040 count as CDANG being always set.
Toni Wilen is online now  
Old 07 October 2017, 16:43   #4
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,491
Quote:
Originally Posted by Toni Wilen View Post
You can't write to VPOSW with OCS Copper. On OCS all addresses below $dff040 count as CDANG being always set.
Forgot it
ross is online now  
Old 07 October 2017, 16:53   #5
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,491
However I would never use a CIA IRQ to set VPOSW, too much time drift!

Is not better a copper IRQ?
ross is online now  
Old 07 October 2017, 17:11   #6
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,349
CIA interrupt is level 6 whereas copper is level 3 (along with vblank and blitter done). Audio and disk sync interrupts are higher priority than copper, maybe that explains why programmers used CIA??
mark_k is offline  
Old 07 October 2017, 17:18   #7
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,573
Does it really use cia interrupts or just trigger level 6 by copper move to INTREQ?
Toni Wilen is online now  
Old 07 October 2017, 17:27   #8
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,491
During game, if you do not use CIA IRQ6 for music routine or DSKSYN or AUD# or BLIT, Copper IRQ can be alone during last video lines.
CIA IRQ6 drift during music replay (so is not perfect 50Hz/60Hz but not really a problem, the time is constant)..

I've not checked this CIA VPOSW routine, i'm now curious

Last edited by ross; 14 November 2017 at 22:35.
ross is online now  
Old 07 October 2017, 17:32   #9
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,491
Quote:
Originally Posted by Toni Wilen View Post
or just trigger level 6 by copper move to INTREQ?
Yes, this definitely better
ross is online now  
Old 07 October 2017, 18:30   #10
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,573
CIA-B TOD should also work, it counts hsyncs.
Toni Wilen is online now  
Old 07 October 2017, 19:13   #11
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,349
At least 60HzEmulator on Aminet uses a vertical blanking interrupt routine to set the CIA timer, then the CIA interrupt routine writes to VPOSW.
mark_k is offline  
Old 08 October 2017, 10:41   #12
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,491
Quote:
Originally Posted by mark_k View Post
At least 60HzEmulator on Aminet uses a vertical blanking interrupt routine to set the CIA timer, then the CIA interrupt routine writes to VPOSW.
This make sense. Every VBL CIA timer is reset so refresh time is constant and don't drift.
Just a bit over complicated.

Quote:
Originally Posted by Toni Wilen View Post
CIA-B TOD should also work, it counts hsyncs.
Another forgotten property! (is this unexplored for variable refresh rate?)
And can work without VBL IRQ assistance.

ross is online now  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
This fake demo is not possible on ECS... But AGA? arpz Amiga scene 86 12 June 2024 14:42
Telling OCS/ECS Agnus apart appiah4 support.Hardware 15 15 May 2015 20:11
How to add ECS Agnus to a Amiga 2000? Tempest 2084 support.Hardware 31 04 September 2012 21:15
Chipset type: OCS / ECS Agnus Njinsa support.WinUAE 4 19 December 2005 00:29
ECS Agnus / Full ECS ChipSets.... Chapas support.WinUAE 7 17 June 2005 05:27

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:15.

Top

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