![]() |
|
|||||||
| Register | >> Amiga FAQ/Wiki << | Rules & Help | Members List / Moderators List | Search | Today's Posts | Mark Forums Read |
![]() |
|
|
Thread Tools |
|
|
#1 |
|
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 37
Posts: 8,140
|
Blitz2: Hires laced
Guys,
how do I create a 640x512 hires laced display in Blitzmode? ta |
|
|
|
|
|
#2 |
|
A1200 040 SAM440EP 667
Join Date: Jan 2008
Location: Lisbon / Portugal
Posts: 716
|
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 ![]() |
|
|
|
|
|
#3 |
|
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 37
Posts: 8,140
|
I'm using the display lib which supports aga. Slice commands I'm not sure about.
Thanks |
|
|
|
|
|
#4 |
|
A1200 040 SAM440EP 667
Join Date: Jan 2008
Location: Lisbon / Portugal
Posts: 716
|
http://www.amiforce.de/thread.php?bo...h68632a4v3qi4s
Maybe this topic could help you with some tips.. |
|
|
|
|
|
#5 |
|
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 37
Posts: 8,140
|
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
|
|
|
|
|
|
#6 | |
|
is long gone
Join Date: Apr 2007
Location: London
Posts: 1,590
|
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. ![]() |
|
|
|
|
|
|
#7 |
|
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 4,547
|
You need 2 copperlists, one for odd, one for even lines.
Edit: pmc was faster. ![]()
__________________
Makes me sick when I hear all the shit that you say So much crap coming out, it must take you all day There's a space kept in hell with your name on the seat With a spike in the chair just to make it complete |
|
|
|
|
|
#8 |
|
A1200 040 SAM440EP 667
Join Date: Jan 2008
Location: Lisbon / Portugal
Posts: 716
|
I think you will need a function like 'LoadPalette 1, ".../palette"' otherwise 'DisplayPalette 3,1' will give error
|
|
|
|
|
|
#9 |
|
is long gone
Join Date: Apr 2007
Location: London
Posts: 1,590
|
I stung the Sting! \o/
![]() |
|
|
|
|
|
#10 |
|
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 37
Posts: 8,140
|
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??
|
|
|
|
|
|
#11 |
|
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 4,547
|
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.
__________________
Makes me sick when I hear all the shit that you say So much crap coming out, it must take you all day There's a space kept in hell with your name on the seat With a spike in the chair just to make it complete |
|
|
|
|
|
#12 |
|
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 37
Posts: 8,140
|
AlfaRomeo this is cut down source with most of the other stuff removed
|
|
|
|
|
|
#13 |
|
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 37
Posts: 8,140
|
Sting. It's one thing saying it, it's another doing it in bb2.
Would the second coplist be the same as the first? |
|
|
|
|
|
#14 |
|
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 4,547
|
Yes, except that the bitplane pointers point to the 2nd line of your picture (1st copperlist: 1st line of the picture).
__________________
Makes me sick when I hear all the shit that you say So much crap coming out, it must take you all day There's a space kept in hell with your name on the seat With a spike in the chair just to make it complete |
|
|
|
|
|
#15 |
|
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 37
Posts: 8,140
|
Would that be the modulo+40
|
|
|
|
|
|
#16 |
|
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 4,547
|
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.
__________________
Makes me sick when I hear all the shit that you say So much crap coming out, it must take you all day There's a space kept in hell with your name on the seat With a spike in the chair just to make it complete |
|
|
|
|
|
#17 |
|
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 37
Posts: 8,140
|
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!
|
|
|
|
|
|
#18 |
|
is long gone
Join Date: Apr 2007
Location: London
Posts: 1,590
|
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! |
|
|
|
|
|
#19 |
|
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 37
Posts: 8,140
|
pmc not so straightfo ward in a programme that doesn't support it properly
|
|
|
|
|
|
#20 |
|
is long gone
Join Date: Apr 2007
Location: London
Posts: 1,590
|
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. ![]() |
|
|
|
|
|
#21 |
|
Registered User
Join Date: Sep 2008
Location: Gainesville U.S.A.
Posts: 297
|
bippym - This works on A500 but not A1200 (both WinUAE). $DFF004 register is not behaving as expected with AGA. With ECS it rapidly switches between $A000 & $2000. AGA is stuck on $A300. Since your program is using that register*, that may be why the display isn't switching properly.
* assumed typo in listing Code:
BLITZ BitMap 0,640,512,3 SetBPLCON0 4 Slice 0,44,640,256,$fffb,3,8,8,1280,1280 RGB 0,5,5,5 RGB 1,15,15,15 SetInt 5 x=0 TST.w $dff004 BMI skip x=1 skip: Show 0,0,x End SetInt BitMapOutput 0 Locate 10,10 Print "As soon as their guard is down" MouseWait Last edited by clenched; 28 July 2012 at 22:41. |
|
|
|
|
|
#22 |
|
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 37
Posts: 8,140
|
I am using aga and the display libs. Ill figure it out next week. I move house Monday!!
|
|
|
|
|
|
#23 |
|
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 38
Posts: 11,945
|
Did you take over the system? ROM vblank routine, especially if KS3.1, will set LOF bit if it isn't already set and current system screen is not interlaced.
|
|
|
|
|
|
#24 |
|
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 37
Posts: 8,140
|
I use "blitz" mode which apparently takes over the system for you. My asm knowledge isn't enough to do this project in pure asm so am using blitz to kind of allow me to mess about and have instant results.
I feel it's one of those things they never assumed we would need! |
|
|
|
|
|
#25 |
|
Registered User
Join Date: Sep 2008
Location: Gainesville U.S.A.
Posts: 297
|
At least Toni's crystal ball still works. With the A3000 quickstart, the sample works with 2.04 ROM
and flounders with 3.1 ROM . A compiled sample is in the Zone. It shows what bippym is talking about. ![]() EDIT: Actually bippym's example works with A1200 & this ROM so the margin is even closer than before. KS ROM v3.0 (A1200) rev 39.106 (512k) [391523-01/391524-01] Last edited by clenched; 02 August 2012 at 23:25. |
|
|
|
![]() |
| 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 |