24 July 2012, 10:31 | #1 |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
Blitz2: Hires laced
Guys,
how do I create a 640x512 hires laced display in Blitzmode? ta |
24 July 2012, 22:48 | #2 |
A1200 040 SAM440EP 667
Join Date: Jan 2008
Location: Lisbon / Portugal
Posts: 873
|
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 |
24 July 2012, 22:51 | #3 |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
I'm using the display lib which supports aga. Slice commands I'm not sure about.
Thanks |
27 July 2012, 13:24 | #4 |
A1200 040 SAM440EP 667
Join Date: Jan 2008
Location: Lisbon / Portugal
Posts: 873
|
http://www.amiforce.de/thread.php?bo...h68632a4v3qi4s
Maybe this topic could help you with some tips.. |
27 July 2012, 14:08 | #5 |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
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 |
27 July 2012, 15:34 | #6 | |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
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:
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. |
|
27 July 2012, 15:35 | #7 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
You need 2 copperlists, one for odd, one for even lines.
Edit: pmc was faster. |
27 July 2012, 15:38 | #8 |
A1200 040 SAM440EP 667
Join Date: Jan 2008
Location: Lisbon / Portugal
Posts: 873
|
I think you will need a function like 'LoadPalette 1, ".../palette"' otherwise 'DisplayPalette 3,1' will give error
|
27 July 2012, 15:38 | #9 |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
I stung the Sting! \o/
|
27 July 2012, 15:39 | #10 |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
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??
|
27 July 2012, 15:39 | #11 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
Haha, yes.
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. |
27 July 2012, 15:40 | #12 |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
AlfaRomeo this is cut down source with most of the other stuff removed
|
27 July 2012, 16:24 | #13 |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
Sting. It's one thing saying it, it's another doing it in bb2.
Would the second coplist be the same as the first? |
27 July 2012, 16:38 | #14 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
Yes, except that the bitplane pointers point to the 2nd line of your picture (1st copperlist: 1st line of the picture).
|
27 July 2012, 16:41 | #15 |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
Would that be the modulo+40
|
27 July 2012, 17:20 | #16 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
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.
|
27 July 2012, 20:27 | #17 |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
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!
|
27 July 2012, 21:59 | #18 |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
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! |
28 July 2012, 07:34 | #19 |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
pmc not so straightfo ward in a programme that doesn't support it properly
|
28 July 2012, 21:04 | #20 |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
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. |
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 | 21 July 2012 23:59 |
Laced mode problem | Hobbe | support.WinUAE | 7 | 23 June 2009 04:27 |
Blitz2 Manual | AlfaRomeo | Amiga scene | 18 | 01 May 2009 10:53 |
Games in laced mode? | killergorilla | Amiga scene | 38 | 19 October 2007 15:24 |
That laced mode prob | VermillioN | support.WinUAE | 3 | 16 November 2002 15:22 |
|
|