Hello John
On 19-Dec-99, you quoted and wrote:
>> Just to break up the party, but things won't work like that 'blurb'
>> states. I have programmed HAM modes myself, and it's a real pain. (Poking
>> binary values in to raw memory locations!)
>>
>> To say the least, the application must be able to handle HAM mode in the
>> first place, otherwise only the base 16 (HAM6)/64 (HAM8) colour palette
>> will be used.
>
> That is what appears to be happening, also you can't go into prefs and
> select the ham workbench and I think a lot of software as you say checks
> the prefs.
Well, it's not really a matter of the prefs, because a HAM-6 screen is as it
says, a 6 plane screen, or 2^6. This gives a maximum possibility of 64
colours, but HAM-6 only uses the first four planes of that BitMap, giving
2^4 or 16 colours. The other two planes (5 and 6) are used to state wether
the colour is HAM one or a colour from the base 16 colours. This is the
ingenuity of it (all hail Jay!):
Planes 0-3, 4bits numbers between 0-15
Planes 4-5, 2bits, max. number is 3
This where it's really clever. The Planes 4 and 5 can hold four possible
numbers 0, (%00), 1 (%01), 2 (%10) and 3 (%11). If planes four and five are
%00, then the first four planes refer to a colour or pen number, so say for
example a pixel on a BitMap's planes has:
%000101
That means that pen number 5 will be the colour of the pixel. However, the
different combinations of planes 4 and 5 mean that the first four BITs can
also describe an RGB component. Older Amigas (ECS/OCS) used the numbers
9-15 to describe the intensity of the component so for Red, 0 meant no read
and 15 - lots of red, now AGA/VGA/SVGA etc. use 0-255, for more colours.
As you may notice, 4 BITs can hold a number from 0-15, enough to describe
the old OCS/ECS intensities. With BITs 4 and 5, we can actually make that
number from referring to pen number to make it refer to the intensity of a
R, G or B component. E.g. At position 0,0 on a BitMap, a pixel is black:
%000000
We want to make a white pixel. We can only change one colour component at a
time, so it's going to take us 3 pixels to get to white, so:
Pixel X Pos Pixel Y Pos Binary Value thro' planes
0 0 %000000
1 0 %111111
2 0 %101111
3 0 %011111
Therefore at 3,0, the pixel is white...
The mastery of HAM ladies and gentleman! :) See the DPaint IV manual for
more fun and games... ;-)
>> The fact is that workbench and most other apps remap to
>> 'proper' non-pseudo colours, so only the first 16/64 colours are actually
>> real.
>
> This is what seems to be happening.
Yes, I thought as much. Workbench only remaps to pen colours, and doesn't
even recognise HAM even if it's running on a HAM screen.
>> HAM colours merely modify a R, G or B component from the pixel to
>> the left of it.
>>
>> In theory it's great, besides you can already get HAM workbenches. Just
>> HexEdit the screenmode.prefs file... :)
>>
>> I might be wrong (if this is a wonder program), but the reason why HAM is
>> mostly ignored by most Amiga apps is because it's extremely difficult to
>> program... :(
>
> Why not have a look at the program, hamwb, maybe you'll have a mental leap
> and make it "go"
>
> possibly making a temporary phantom screemode.pref
If I was to do that, I would have to re-write all of Workbench's remapping!
If you are really interested, I maybe able to knock up a HAM picture viewer
that runs on a HAM Workbench, maybe even a HAM-WBPattern clone... :)
If there's interest, I may consider...
>> Sorry to disappoint you! :(
>
> OS3.5 was supposed to have RTG retargetable graphics to let us do things
> like this!
Sort of! :( If you want Voyager3 etc.. to understand HAM, then you'll have to
speak to Olli, I'm not that good!
Hope this was interesting.... ;-)
All The Best
Nick.
<sb>
You cannot kill time without injuring eternity.
-- Thoreau
+-------------------------------------+
| Omega Research UK - Amiga� Software |
+-------------------------------------+
| email: [EMAIL PROTECTED] |
|www: http://www.oruk-amigan.free4all.co.uk |
+-------------------------------------+
_____________________________________________________________
NetConnect mailing list. To unsubscribe, send an 'unsubcribe'
message to <[EMAIL PROTECTED]>