English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language

 
 
Thread Tools
Old 24 July 2012, 11:31   #1
BippyM
Registered User

BippyM's Avatar
 
Join Date: Nov 2001
Location: Nottingham, UK
Age: 43
Posts: 8,713
Blitz2: Hires laced

Guys,

how do I create a 640x512 hires laced display in Blitzmode?

ta
BippyM is online now  
Old 24 July 2012, 23:48   #2
AlfaRomeo
A1200 040 SAM440EP 667
AlfaRomeo's Avatar
 
Join Date: Jan 2008
Location: Lisbon / Portugal
Posts: 793
I think your best shot it´s with slice function or may AmiBlitz have a new function tha supports Hi-Res screens in blitz mode..
Why you don´t post this question in www.AmiForce.de forum? There it´s the best place to inform you
AlfaRomeo is offline  
Old 24 July 2012, 23:51   #3
BippyM
Registered User

BippyM's Avatar
 
Join Date: Nov 2001
Location: Nottingham, UK
Age: 43
Posts: 8,713
I'm using the display lib which supports aga. Slice commands I'm not sure about.

Thanks
BippyM is online now  
Old 27 July 2012, 14:24   #4
AlfaRomeo
A1200 040 SAM440EP 667
AlfaRomeo's Avatar
 
Join Date: Jan 2008
Location: Lisbon / Portugal
Posts: 793
http://www.amiforce.de/thread.php?bo...h68632a4v3qi4s

Maybe this topic could help you with some tips..
AlfaRomeo is offline  
Old 27 July 2012, 15:08   #5
BippyM
Registered User

BippyM's Avatar
 
Join Date: Nov 2001
Location: Nottingham, UK
Age: 43
Posts: 8,713
Hi Mate,

I have almost figured it out.. below is my code.. Some tweaking required as it looks like every other line is missing!!

Code:
; Setup the screen for a hires laced display. This is used for the credits screens

#BPLCON0=$100                     ; Bitplane control register
#BPLMOD1=$108                     ; Bitplane modulo
#BPLMOD2=$10A                     ; Bitplane modulo

#bitmapsize=768
#Modulo=(((#bitmapsize-320)/8)-2)*2

BitMap 0,320,256,5                ; Game screen. Lowres 32 colour
BitMap 1,320,256,5                ; Intro screens
BitMap 2,640,256,4                ; Title Screen
BitMap 3,#bitmapsize,512,3        ; Custom copper controlled hires-laced display for credits

; Lets build our own copperlist

cop$=Mki$(#BPLMOD1)+Mki$(#Modulo)
cop$+Mki$(#BPLMOD2)+Mki$(#Modulo)
cop$+Mki$(#BPLCON0)+Mki$($b004)   ; BPLCON0 : Bit number:
                                  ;           15 - Hires
                                  ;           14, $13, $12 bitplanes set (011 here for 3 bitplanes)
                                  ;           11 - Ham mode Off
                                  ;           10 - Dual playfield Off
                                  ;           09 - Composite colour mode off
                                  ;           08 - Genlock Audio Enable off
                                  ;           07 to bit 4 - Unused, set to 0
                                  ;           03 - Lightpen off
                                  ;           02 - Interlace ON
                                  ;           01 - External Synchronization Enable off
                                  ;           00 - Unused

                                  ; Buffer for animation

InitCopList 3,41,256,$513,8,8,-3  ; $11903 ; 8 colour hires laced display
DisplayUser 3,0,cop$              ; Set our copperlist
DisplayAdjust 3,768,-8,-8,-32,32  ; and adjust the display accordingly

CreateDisplay 3
Use BitMap 3
DisplayPalette 3,1

SetInt 5
  If Peek($df004) <0
    DisplayBitMap 3,3,3,0
  Else
    DisplayBitMap 3,3,3,1
  EndIf
End SetInt


Blit 1,0,20
DisplayBitMap 3,3

End
BippyM is online now  
Old 27 July 2012, 16:34   #6
pmc
rebooting...
pmc's Avatar
 
Join Date: Apr 2007
Location: Elsewhere
Posts: 1,595
First a disclaimer: I know *nothing* about Blitz basic and although I know a little bit about asm, I've never created myself an interlaced display using that either.

But... having said the above, when you said this:

Quote:
Originally Posted by bippym
Some tweaking required as it looks like every other line is missing!!
Something rang a bell in my mind from reading about interlaced displays in the HRM. First, the bitplane pointers need to be set correctly for the odd / even lines of an interlaced display. Second, two copperlists are required, again, one for the odd and one for the even lines.

Have you catered for those two things? You only seem to have one custom copper list in your code, unless I'm reading it totally wrong? As I say - I know nothing about Blitz. It might be worth you checking the relevant section in the HRM if you haven't already.
pmc is offline  
Old 27 July 2012, 16:35   #7
StingRay
move.l #$c0ff33,throat

StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,156
You need 2 copperlists, one for odd, one for even lines.

Edit: pmc was faster.
StingRay is offline  
Old 27 July 2012, 16:38   #8
AlfaRomeo
A1200 040 SAM440EP 667
AlfaRomeo's Avatar
 
Join Date: Jan 2008
Location: Lisbon / Portugal
Posts: 793
I think you will need a function like 'LoadPalette 1, ".../palette"' otherwise 'DisplayPalette 3,1' will give error
AlfaRomeo is offline  
Old 27 July 2012, 16:38   #9
pmc
rebooting...
pmc's Avatar
 
Join Date: Apr 2007
Location: Elsewhere
Posts: 1,595
I stung the Sting! \o/
pmc is offline  
Old 27 July 2012, 16:39   #10
BippyM
Registered User

BippyM's Avatar
 
Join Date: Nov 2001
Location: Nottingham, UK
Age: 43
Posts: 8,713
I'm not sure blitz can do that. I would basically have to display the odd frames and then the even I guess each vertical blank??
BippyM is online now  
Old 27 July 2012, 16:39   #11
StingRay
move.l #$c0ff33,throat

StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,156
Quote:
Originally Posted by pmc View Post
I stung the Sting! \o/
Haha, yes.

Quote:
Originally Posted by bippym View Post
I'm not sure blitz can do that. I would basically have to display the odd frames and then the even I guess each vertical blank??
Just build 2 copperlists and set the modulo to skip every other line. You also need to set the bplpointers to point to odd/even lines. Then just swap the copperlists each frame and you'll have your interlaced display.
StingRay is offline  
Old 27 July 2012, 16:40   #12
BippyM
Registered User

BippyM's Avatar
 
Join Date: Nov 2001
Location: Nottingham, UK
Age: 43
Posts: 8,713
AlfaRomeo this is cut down source with most of the other stuff removed
BippyM is online now  
Old 27 July 2012, 17:24   #13
BippyM
Registered User

BippyM's Avatar
 
Join Date: Nov 2001
Location: Nottingham, UK
Age: 43
Posts: 8,713
Sting. It's one thing saying it, it's another doing it in bb2.

Would the second coplist be the same as the first?
BippyM is online now  
Old 27 July 2012, 17:38   #14
StingRay
move.l #$c0ff33,throat

StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,156
Yes, except that the bitplane pointers point to the 2nd line of your picture (1st copperlist: 1st line of the picture).
StingRay is offline  
Old 27 July 2012, 17:41   #15
BippyM
Registered User

BippyM's Avatar
 
Join Date: Nov 2001
Location: Nottingham, UK
Age: 43
Posts: 8,713
Would that be the modulo+40
BippyM is online now  
Old 27 July 2012, 18:20   #16
StingRay
move.l #$c0ff33,throat

StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,156
Yes, the modulo is 40 (so every other line will be skipped) and your bitplane pointers in the first copperlist point to your picture/screen+0 and in your 2nd copperlist to picture/screen+40. That way every other line is skipped and because the copperlists are swapped each frame you'll have a correct interlaced display.
StingRay is offline  
Old 27 July 2012, 21:27   #17
BippyM
Registered User

BippyM's Avatar
 
Join Date: Nov 2001
Location: Nottingham, UK
Age: 43
Posts: 8,713
okay I believe I have the address of the bitmap in memory, so next is to rewrite the copperlists to take that into account. I feel some inline assembler is going to happen here!
BippyM is online now  
Old 27 July 2012, 22:59   #18
pmc
rebooting...
pmc's Avatar
 
Join Date: Apr 2007
Location: Elsewhere
Posts: 1,595
As a test I just knocked together some asm to display a hires laced screen - all very straighforward.

One thing to remember: as you wanted a hires laced screen you'll need to regard 80 bytes, not 40, as your line width!
pmc is offline  
Old 28 July 2012, 08:34   #19
BippyM
Registered User

BippyM's Avatar
 
Join Date: Nov 2001
Location: Nottingham, UK
Age: 43
Posts: 8,713
pmc not so straightfo ward in a programme that doesn't support it properly
BippyM is online now  
Old 28 July 2012, 22:04   #20
pmc
rebooting...
pmc's Avatar
 
Join Date: Apr 2007
Location: Elsewhere
Posts: 1,595
I had a quick scan through a Blitz2 Manual. It looks to support inline assembly language and also custom copper lists / instructions.

Supporting both of those would mean it also supports creating a hires interlaced display I would think, although obviously I don't know enough about Blitz2 to say for certain.

A couple of custom copper lists, one with bitplane pointers set to point at the start of your bitplane and another with bitplane pointers set to point at the start of your bitplane+80 and then some code to swap which one of these copper lists is active at each vertical blank and job done.

And of course set the required display regs (bplcon0 / ddfstsrt / ddfstop / bpl1mod / bpl2mod) as per the requirements for hires interlaced.
pmc 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
Blitz2 Newcommandset BippyM Coders. Language 0 22 July 2012 00:59
Laced mode problem Hobbe support.WinUAE 7 23 June 2009 05:27
Blitz2 Manual AlfaRomeo Amiga scene 18 01 May 2009 11:53
Games in laced mode? killergorilla Amiga scene 38 19 October 2007 16:24
That laced mode prob VermillioN support.WinUAE 3 16 November 2002 16:22

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


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