English Amiga Board


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

 
 
Thread Tools
Old 08 October 2022, 14:49   #1
carrion
Registered User
 
carrion's Avatar
 
Join Date: Dec 2016
Location: Warsaw area
Posts: 153
PalRGB not working on OCS/Kick1.3?

Hi Guys.
I've encountered interesting issues with PalRGB function.

As we know Palette object can have 256 colors (indexes). PalRGB, as we know is used to set RGB colors for each of them.
Palette IMO is independent of the Display so I can have a Palette with 256 colors on OCS for example to use for Rainbows. Right?

Now...
What I've found is that
On OCS PalRGB crashes when I try to set color for index 32 and above. Even so when Palette I'm doing it for is 256 colors big.
On AGA machines I can set the colors without problems.
But what's more interesting is that when on OCS machine with kick 3.0 I can setup colors for full 256 Palette.

For me it looks like a bug on 1.3 OCS machines, but maybe I'm doing something wrong? Or misunderstand the use of Palettes and PalRGB?
carrion is offline  
Old 09 October 2022, 16:33   #2
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 3,374
While I do not know Bliz, the v33 graphics library does not allow to set a color index beyond index 32, not matter which size the color map was allocated.

Note the OCS chipset only supports 32 color registers, and thus the Os truncates indices to 32. The Os, however, does not crash upon illegal entries, it just returns -1.
Thomas Richter is offline  
Old 11 October 2022, 09:04   #3
Honitos
Registered User
 
Honitos's Avatar
 
Join Date: Nov 2019
Location: Celle / Germany
Posts: 147
Lightbulb

I guess you are testing your code without the debugger, right?
As what I can see in the code of the palettelib, it checks the exec version to be at least 39. In this case it is assumed that aga chipset is available.
If exec version is less than 39, there will be done some boundary checks for example if colour registers are in the range 0-31.


As the system works with processor traps that are catched by the debugger, the program will crash if the debugger is switched off.
Honitos is offline  
Old 11 October 2022, 10:21   #4
Asman
68k
 
Asman's Avatar
 
Join Date: Sep 2005
Location: Somewhere
Posts: 829
I guess that assumption about chipset aga (exec version to be at least 39) is wrong, right ?
Asman is offline  
Old 11 October 2022, 10:39   #5
carrion
Registered User
 
carrion's Avatar
 
Join Date: Dec 2016
Location: Warsaw area
Posts: 153
Guys
What I understand so far is that PalRGB is using some kickstart function to build palette that on non AGA machines can be max of 32 colors.
If that's true then on OCS the DisplayRainbow is limited only to have 32 colors in the rainbow - Which IMO is very limiting.

Looks like on OCS the way to do rainbows is by using DisplayRGB. Correct?
carrion is offline  
Old 11 October 2022, 12:55   #6
Honitos
Registered User
 
Honitos's Avatar
 
Join Date: Nov 2019
Location: Celle / Germany
Posts: 147
I am not very familiar with graphics at all, so I cannot help choosing the propor commands here.

I could remove the checking that you could modify colours above 31 with PalRGB, but I don't know if this would result in any other side effects....
Honitos is offline  
Old 12 October 2022, 08:54   #7
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 3,374
Quote:
Originally Posted by carrion View Post
If that's true then on OCS the DisplayRainbow is limited only to have 32 colors in the rainbow - Which IMO is very limiting.

I'm not sure what you want to attempt, but the 32 colors is a limitation of the chipset as well, thus you need to use other techniques to get more colors on the screen. HAM or user copper lists are two prime techniques to get more colors than there are color registers, and both are supported by the Os.
Thomas Richter is offline  
Old 12 October 2022, 11:43   #8
carrion
Registered User
 
carrion's Avatar
 
Join Date: Dec 2016
Location: Warsaw area
Posts: 153
Well what I want to achieve is to use DisplayRainbow to do a nice copper rainbow. To define colors for the rainbow I am supposed to use PalRGB to define colors for the rainbow but on OCS kick 1.3 I can do it only for 32 colors.

Of course I can think of some workarounds (like mentioned DisplayRGB) but I was just wondering and wanted to confirm that PalRGB command is limited on kick 1.3 - and looks like it is limited to 32 colors in palette.
Thants it
carrion 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
Boot floppy to ACAtune load Kick1.3? n9yty New to Emulation or Amiga scene 2 12 July 2021 02:37
Kick1.3+A600+DF1:=Bug? ppill support.Hardware 13 11 September 2008 10:05
AMIAG 1200 & Kick1.3 Emulator... ST Dragon Retrogaming General Discussion 3 24 February 2005 09:13
Colorado.adf/.dms and kick1.2.rom to run it? Photon request.Old Rare Games 3 23 December 2004 14:57
Softkick using Kick1.3 ROM to Kick1.2 ? gary support.Hardware 5 28 March 2002 19:59

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 22:11.

Top

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