11 December 2012, 01:06 | #1 |
titan sucks!
Join Date: Dec 2012
Location: munich/germany
Posts: 54
|
Force AmigaOS *not* to update COPxLCH
From the AHRM:
Code:
COP1LC is written at the end of vertical blanking . ------------------------------------------------------ The COP1LC register is written at the end of the vertical blanking period by a graphics interrupt handler which is in the vertical blank interrupt server chain. As long as this server is intact, COP1LC will be correctly strobed at the end of each vertical blank. Thanks for some help, neoman/titan |
11 December 2012, 08:20 | #2 |
titan sucks!
Join Date: Dec 2012
Location: munich/germany
Posts: 54
|
I think I found a way around it. But if someone knows it though, it would be pretty nice to know.
Thanks! |
11 December 2012, 08:36 | #3 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,518
|
I don't remember AmigaOS ever writing to COP1LC, many semi-system friendly games (and very old demos) writes to COP1LC taking over the display without disabling interrupts.
But usual LoadView(NULL) should do it. |
11 December 2012, 10:46 | #4 |
titan sucks!
Join Date: Dec 2012
Location: munich/germany
Posts: 54
|
Thanks so far, I will give it a try.
I add the interrupt using AddIntServer and AmigaOS's VBI also seems to be in that queue because it resets COP2LC after my interrupt has been done (I return from my interrupt with Z condition with intent of course!). It seems to restore them from LOFList/SHFList. But I just cannot set LOFList/SHFList to my COP2LC because I built a copper matrix which edits COP2LC all the time. |
11 December 2012, 10:50 | #5 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,518
|
Yeah, COP2LC is updated if system screen mode is interlaced.
LoadView(0); takes care of that too. |
11 December 2012, 11:58 | #6 |
titan sucks!
Join Date: Dec 2012
Location: munich/germany
Posts: 54
|
Code:
_InstallScreen movem.l d0-a6,-(sp) *** remove and store OS-view move.l _GfxBase,a6 move.l gb_ActiView(a6),_OSView sub.l a1,a1 jsr _LVOLoadView(a6) jsr _LVOWaitTOF(a6) jsr _LVOWaitTOF(a6) |
12 June 2017, 16:53 | #7 |
Registered User
Join Date: Jul 2006
Location: Lund / Sweden
Age: 45
Posts: 171
|
Reviving necro thread. Any solutions to this?
|
13 June 2017, 14:45 | #8 |
Registered User
Join Date: Jul 2006
Location: Lund / Sweden
Age: 45
Posts: 171
|
This is the solution:
After chatting with StingRay the solution is simple. Simply also tell graphics.library (offset $32 or gb_LOFlist) to use the COP2LC pointer: move.l gfxbase,a0 move.l my_copper,gb_LOFlist(a0) move.l my_copper,$dff084 So while COP2LC _will_ be overwritten in the OS VBlank routine, it will at least be overwritten with _YOUR_ value. |
13 June 2017, 19:05 | #9 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,500
|
You are talking about hitting the hardware while the OS is still alive? This is evil and disgusting!
Take over the system completely and do your stuff - no problems! Otherwise the solution would be to avoid the execution of the OS VERTB interrupt handler. Insert a handler with AddIntServer(), as neoman mentioned, many years ago, and return with Z-flag set. So lower priority handlers do not execute. Make sure your handler has the highest priority, of course. The GfxBase->vbsrv has priority 10. When that doesn't work (like neoman indicated - I didn't test it), you could also use SetIntVector() to replace the OS VERTB interrupt server routine with yours. (BTW, this thread never had anything to do with C/C++ ...) |
13 June 2017, 19:33 | #10 | |
Registered User
Join Date: Jul 2006
Location: Lund / Sweden
Age: 45
Posts: 171
|
Quote:
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Amikit AmigaOS ROM Update | Amigan | Amiga scene | 10 | 21 April 2008 22:30 |
AmigaOS 4.0 July 2007 Update Available | P-J | News | 0 | 19 July 2007 16:35 |
AmigaOS 4.0 The Final Update available | P-J | News | 43 | 22 January 2007 09:40 |
Poseidon V3.4 for AmigaOS UPDATE!!! | keropi | News | 5 | 03 November 2006 09:56 |
Unofficial AmigaOS homepage update | DJBase | News | 3 | 04 January 2006 14:55 |
|
|