English Amiga Board


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

 
 
Thread Tools
Old 03 March 2021, 20:20   #1
peceha
Registered User
 
peceha's Avatar
 
Join Date: Dec 2017
Location: Poland
Age: 47
Posts: 282
[blitz] - palette handling - need some help

Hi,
there is a short recording below but first read my explanation in order to understand the video.

The display is dualfield (AGA) so 2x16 colors

The palette object is 32 colors:
Code:
InitPalette 0,32
First 16 colors are for foreground bitmap - entities + boxes
Last 16 colors are for background bitmap - walls,floors and animated "windmill" stuff.

Each bitmap that I use has 4 bitplans

To load the tileset I do as follows:
Code:
LoadBitmap 3,"tiles.iff"

LoadPalette 0,"entities.iff",0   ;to set fore colors of my palette
LoadPalette 0,"tiles.iff",16      ;to set back colors of my palette

DisplayPalette 0,0
...
the above procedure is used everytime I load a new set of tiles.

To make sure that colors 0-15 are not changed by "LoadBitmap" I use "LoadPalette 0, "entities.iff,0" and just after this I assign colors from new tiles to second part of my palette object (offset 16 at the end of LoadPalette command) and then comes "DisplayPalette"

Now the movie:
1.the program starts with background tiles set to blue colors and foreground with normal colors
2. I load tiles no.7 (background) with correct colors -> walls, floors and animated objects changed the colors as expected - all fine at this point
3. I load back tiles no.2 (blue) ... and what I get??? -> only the "windmill" object changed the color but all the background should become blue....

WHAT AM I DOING WRONG???

At the very end I show used bitmaps in dPaint to make sure there is nothing wrong with them.

ps. video is rotaded 90 deg. but still you can see the problem with palette
[ Show youtube player ]

Last edited by peceha; 03 March 2021 at 20:26.
peceha is offline  
Old 17 March 2021, 14:06   #2
Nightshft
Registered User
 
Nightshft's Avatar
 
Join Date: Mar 2018
Location: Austria
Posts: 617
IIRC AGA Dualplayfield uses
pen 0 for background
pens 1..7 for playfield 1, normally foreground
pens 9..15 for playfield 2, normally background
to keep ocs compatibility.

However, looks like "displaycontrols" can be used to change the assignment.

see here
http://eab.abime.net/showpost.php?p=...&postcount=129

A while ago I tried it with AGA and 3+3 bitplanes and it went like this. Didn't try 4+4 bitplanes for now.

Let me know if it works out...
Nightshft is online now  
Old 18 March 2021, 18:49   #3
peceha
Registered User
 
peceha's Avatar
 
Join Date: Dec 2017
Location: Poland
Age: 47
Posts: 282
Hi,
actually I've been using DisplayControls since longtime and the arguments are exactly the same like the ones you pointed to.




I belive the problem is somewhere else - funny thing is sometimes all is workin fine and sometimes not.

Anyway I gave up on that issue for a while and will come back to this later on.

I just noticed missing video from my first post so here it goes again:
[ Show youtube player ]

ps. video is rotated.. again
peceha 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
[blitz] amiga/blitz Mode speed question peceha Coders. Blitz Basic 3 10 January 2021 18:52
[blitz] InitCopList, dual playfield, AGA - palette question peceha Coders. Blitz Basic 2 15 November 2020 10:33
Chip RAM handling AlexBruger support.Hardware 6 14 May 2020 07:32
Cookie handling alexh project.EAB 1 22 October 2007 21:52

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 01:20.

Top

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