English Amiga Board


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

 
 
Thread Tools
Old 02 November 2016, 13:25   #1
Anakirob
Unregistered User
 
Anakirob's Avatar
 
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.
Anakirob is offline  
Old 02 November 2016, 14:40   #2
Coagulus
Gets there in the end...
 
Coagulus's Avatar
 
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...
Coagulus is offline  
Old 03 November 2016, 10:38   #3
Daedalus
Registered User
 
Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,381
I've never tried it myself, but it probably needs to be done by setting up BPLCON0 manually. According to the docs, bit 2 needs to be set to enable an interlaced display.
Daedalus is offline  
Old 27 December 2016, 10:56   #4
earok
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?
earok is offline  
Old 27 December 2016, 23:40   #5
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 4,357
This sounds like a job for CustomString.
idrougge is offline  
Old 28 December 2016, 01:07   #6
earok
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
earok is offline  
Old 25 June 2017, 13:49   #7
earok
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
earok is offline  
Old 25 June 2017, 15:15   #8
idrougge
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.
idrougge is offline  
Old 25 June 2017, 21:16   #9
Cylon
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?
Cylon is offline  
Old 25 June 2017, 23:48   #10
earok
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.
earok 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
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

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 13:19.

Top

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