02 November 2016, 13:25 | #1 |
Unregistered User
Join Date: Nov 2005
Location: Tasmania
Age: 42
Posts: 893
|
Interlaced display in BLITZ mode.
Does anyone know any way of getting the display library to create an interlaced screen?
I can't find any reference to it in the documentation, but surely it must be possible. |
02 November 2016, 14:40 | #2 |
Gets there in the end...
Join Date: Sep 2005
Location: Wales
Posts: 874
|
I've a vague memory of using setint (5?) to offset the y position of the screen with interlace flag set but I may have dreamed this!
Edit no it wasn't this I think... |
27 December 2016, 10:56 | #4 |
Registered User
Join Date: Dec 2013
Location: Auckland
Posts: 3,549
|
Did anyone have any luck with this?
With display library it appears that BPLCON0 is set in the copper list, so presumably if you can find the copper list in memory (the slice mode commands for this don't appear to work?) you can set bit 2 on the word that gets pushed into BPLCON0 by the copper? |
27 December 2016, 23:40 | #5 |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,357
|
This sounds like a job for CustomString.
|
28 December 2016, 01:07 | #6 |
Registered User
Join Date: Dec 2013
Location: Auckland
Posts: 3,549
|
Looking at it further, it seems like there's much more required than simply setting BPLCON0 bit 2, since interlace mode requires toggling between two copper lists every frame.. hmm, probably why Display Library doesn't support it to begin with.
I haven't yet attempted to implement this but my working theory on how to handle this is: - Create two separate Display Library copper lists - Use CustomString as suggested above to set the BPLCON0 bit (though the problem with this is of course you'd need to know what the original BPLCON0 value was. I guess you could just use WinUAE's debugger to see what the value was and hardcode it rather than programatically just try to find it in memory) - Use DisplayBitmap to point the two copper lists to two separate bitmaps, one with the odd lines and one with the even lines - Set a Vertical Blank interrupt, and do the appropriate CreateDisplay based on the result of testing bit 7 of $DFF004 |
25 June 2017, 13:49 | #7 |
Registered User
Join Date: Dec 2013
Location: Auckland
Posts: 3,549
|
SUPER NASTY but it seems to work. This assumes that copperlist 0 is set up with your even number lines and copperlist 1 is set up with your odd number lines (may be vice versa).
Code:
SetInt 5 VP = Peek.w($DFF004) X=1-X if X=0 CreateDisplay 0 VP = VP BITSET 15 else CreateDisplay 1 VP = VP BITCLR 15 endif Poke.w $DFF02A,VP End SetInt |
25 June 2017, 15:15 | #8 |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,357
|
I didn't know the 68000 bit operations were implemented as operators in Blitz.
|
25 June 2017, 21:16 | #9 |
Registered User
Join Date: Oct 2014
Location: Europe
Posts: 478
|
How would one do this in ASM? You could stick that ASM routine in the SetInt5 block in Blitz and you're done, aren't you?
|
25 June 2017, 23:48 | #10 |
Registered User
Join Date: Dec 2013
Location: Auckland
Posts: 3,549
|
@idrougee, me neither until yesterday. Up until I spotted those in the manual I was doing everything with bitwise operations.
@cyclon there's an ASM tutorial at https://github.com/alpine9000/amiga_...mode/README.md but I failed to adapt it. In essence you're supposed to set bit 2 of bplcon0 and check bit 15 of vposr to see which copper list to set. But bit 15 never seemed to get set so I forced it. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Add double and scanlines options for interlaced line mode | mark_k | request.UAE Wishlist | 10 | 03 March 2016 20:46 |
Interlaced vs Non-Interlaced display | whitebird | support.Hardware | 9 | 12 January 2015 10:20 |
Keep Active control panel "Line Mode" and "Interlaced Line Mode" | Zilog | request.UAE Wishlist | 4 | 02 August 2014 23:08 |
Using an interlaced mode? | ancalimon | support.WinUAE | 6 | 19 June 2014 08:44 |
Vigilante on FS-UAE / Interlaced mode [Solved] | Marskilla | support.FS-UAE | 14 | 23 September 2012 13:19 |
|
|