English Amiga Board


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

 
 
Thread Tools
Old 13 November 2019, 14:49   #1
Nightshft
Registered User

Nightshft's Avatar
 
Join Date: Mar 2018
Location: Austria
Age: 44
Posts: 230
AGA Mode 640x200 (or also 640x256)

Hey guys,
just a little problem showing a picture in Blitz mode (coplist display).

I just want to show an image which is 640x200x256.
So the display mode should be AGA, hires, no interlace.
and it nearly works, but I can't get the colors right - the Palette is messed up.

Code:
WBStartup

;create bitmap 0
BitMap      0,640,256,8

filen$="dh1:assets/bhc/bhc2b-aga.iff"
;normal 640x200x256 aga picture
;looks fine in dopus and dpaint

LoadBitMap  0,filen$,0
;load file to bitmap 0 and palette 0

BLITZ

;define display
flgs.w = $10000+ $1000+$100+8;
;in my understanding:
;$10000 aga colors
;$1000 fetch mode 1, needed because of hires
;$100 hires (640 wide)
;8 bitplanes

InitCopList     0, 44,256,flgs, 8,  256, 0
;               cl y  h   type  spr cols cust

;DisplayControls 0, 4,$0c00, $00  ;experimental, didnt help

DisplayBitMap   0,0
DisplayPalette  0,0  ;use palette 0 at coplist 0

CreateDisplay   0    ;show it

MouseWait

End
The picture is displayed, but the palette colors are messed up.
It's like half of the colors are ok and the other half is completely wrong.
Do I need DisplayControls to make changes to the palette - or where's the bug here?


Thanks!


PS: i've already read the thread AGA Mode 640 x 400.
Nightshft is offline  
Old 13 November 2019, 15:19   #2
clenched
Registered User

 
Join Date: Sep 2008
Location: Gainesville U.S.A.
Posts: 700
I think flgs needs to be long since it exceeds 16 bits.
clenched is offline  
Old 13 November 2019, 15:33   #3
Nightshft
Registered User

Nightshft's Avatar
 
Join Date: Mar 2018
Location: Austria
Age: 44
Posts: 230
Hah! That was it! Thanks a lot!!
Picture shows up perfectly now.

What a stupid mistake - such a classical "bug". If you assume the problem to be in a or b you won't even take a look at c.
And I went as far as playing around with "DisplayControls"
Nightshft 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
Vertically stretched icons in 640x256 R-Typer support.Apps 4 30 December 2018 21:07
AGA Mode 640 x 400 rcman Coders. Blitz Basic 16 24 December 2018 03:13
640x256 HAM8 mode init milikabdp Coders. Asm / Hardware 2 25 October 2017 22:21
Promoting 640x200 with P96 MagerValp support.Apps 1 06 September 2009 10:26
What's the best screen mode for an AGA shoot-um-up NovaCoder Coders. General 5 09 January 2009 14: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:07.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Page generated in 0.06890 seconds with 15 queries