HIP-FAQ v0.5

From: Michael Current (aa700@cleveland.Freenet.Edu)
Date: 02/08/97-06:18:43 PM Z


From: aa700@cleveland.Freenet.Edu (Michael Current)
Subject: HIP-FAQ v0.5
Date: Sat Feb  8 18:18:43 1997


Date: Thu, 05 Dec 1996 15:35:13 -0800
From: nadkar <nadkar@zeus.fh-pforzheim.de>


hi... there are many custom-graphic-modes on 8-bit... read
my hip-faq for the newest creation:

hi everybody... this is v0.5 of the HIP-FAQ for all coders...
 
##  ##  ######  ###### TM of HARD Software, Hungary
##  ##    ##    ##  ##
######    ##    ######
##  ##    ##    ##
##  ##  ######  ##
 
FAQ by
 
oO  Oo oOOOOo oOOOOo oO  Oo oOOOOo oOOOOo
OO  OO OO     OO  OO OO  OO OO     OO  OO
OOOOOO OOOOo  OOOOOO OO  OO OOOOo  OO  OO
OO  OO OO     OO  OO OO  OO OO     OO  OO
oO  Oo OOOOOo oO  Oo   OO   OOOOOo OO  OO  of Taquart
 
 
(.oO This is a preversion of the question-list Oo.)
 
Date: 29th, August 1996...Writer: HeAvEn of Taquart
 
1. What is HIP?
 
HIP is a new method to displaing pictures on small atari...
 
HIP stands for HARD-Interlacing-Picture and was found by
Members of HARD Software, Hungary in June, July 1996...
 
It enables to display 160 x 240 Pixels with 30 shades without
nearly all flickering (depends on the source-picture you use)...
HARD stands not for HARD or HEAVY Interlacing, just for the
inventors...
 
2. The History of HIP
 
Tamas Bene and I had a "EMail"-conversation the last few month and
we were talking about older demos and effects and suddenly we
have talked about the Visdowm II-Demo of JAC! where JAC had
managed to display 16 colors/shades in a resolution of Gr.15, which
means 160x200... We talked about the "unity"-demo where Our-5oft
switched 3 graficmodes in 1 scanline,
gr.8,gr.9 and somehthing similar to gr.15 by altering the prior-
register per DLI... what do you think happens when
writing #0 in that register at the beginning of a scanline, waiting
some time... switching to gr.9 by writing #$40 there and after
a little while in the last 1/3 of the scanline back to gr.0 by
writing again #0 into it... what does the GTIA produce?
not gr.0 (or gr.8...)as normaly... he displays something similar to 
gr.15!!!
 
He then told me some stories of the coding-sessions of "Joyride" last 
summer
and in the DIL-Plasma-Screen they discovered another "BUG"...but
Tamas had written down the FX and had forgot it... till we were
taking about GTIA-BUGs...
 
so we talked now about known GTIA-Bugs and the next day Tamas was
upset and told me he had discovered a new bug and he had reproduced the
DIL-"BUG"... he discovered that some scanlines were shifted by
a half (!) gr.9-pixel when the scroller starts and they didnt fixed
that BUG in the DIL-Screen...
But after reproducing this BUG he discovered that the reason wasnt the
scroller... it was the special display-list-routine...
 
3. Technical Infos conc. HIP
 
The basic idea is that all gr.10-lines were shifted by a half
color-clock (or pixel) by the GTIA and that always!!!! but noone
has ever tried to combine gr.9 and gr.10...
all have combined gr.9 (16 shades) and gr.11 (16 colors) to display
256 different colors (like in APACview)... but the resolution
was still 80x200...
 
So here is a ASCII-Description of the basic idea:
 
This is the combinations which are needed for the gr10-line and the
gr9-line to display the wanted HIP-color:
 
 
GR10 :000 000 000 222 222 222 222 444 444
GR09 :000 111 222 111 222 333 444 333 444
HIP  :0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0
 
GR10 :444 444 666 666 666 666 888 888 888
GR09 :555 666 555 666 777 888 777 888 999
HIP  :4.5 5.0 5.5 6.0 6.5 7.0 7.5 8.0 8.5
 
GR10 :888 aaa aaa aaa aaa ccc ccc ccc ccc
GR09 :aaa 999 aaa bbb ccc bbb ccc ddd eee
HIP  :9.0 9.5 a.0 a.5 b.0 b.5 c.0 c.5 d.0
 
GR10 :eee eee eee
GR09 :ddd eee fff
HIP  :d.5 e.0 e.5
 
and viola... here are 30 possibilites of shades...
Our eyes are averaging the two luminance-values by
interlacing the two lines each vbi.
---
but attention... in gr10 it is possible to select each
of the xl color registers (704-712), so in the display-
routine and the display-list-interrupt the color-registers
have to be set in a correct way!!!!
 
so if you look in the above table the values mean the xl-luminance!!!
example:
 
if we want to display HIP-color 6.5 then we have to set in the
gr.9-line the value 7 (in basic by color 7 plot x,y)
for the gr10-line there is the value 6 but... it would be
wrong to set the pixel by color 6... coz. we have just 8 color-registers
in gr10... so what about setting the color-registers
in the following way???
 
704 = 0
705 = 0
706 = 2
707 = 4
708 = 6
709 = 8
710 = 10
711 = 12
712 = 14
 
so... if we want luminance 6 then we have to set the pixel by
color 4:plot x,y !!!!!!! in gr.10 the pixel-value selects the
color-register!!! an empty/black pixel is not set by color 0 !!!
color 0 says to the gtia "put the pixel with the color which
is defined by color-register 704" !!! so if you have put 0 in 704
there will be a black-pixel visible...
 
But in gr.9 we can`t set 14 in 712 coz. in gr.9 register 712 defines
the basic-color... so if we want 30 grey-shades... we have to put
0 there... but in gr.10 there must be 14 there... hmmm... the solution
is a special DLI and Display-Lists...
 
1. vbi    2. vbi
 
DList1    DList2
 
gr9 (0)   gr10(0) dli-bit set
gr10(1)   gr9 (1)
gr9 (2)   gr10(2) dli-bit set
gr10(3)   gr9 (3)
gr9 (4)   gr10(4) dli-bit set
...       ...
 
(x) is the number of the scanline in each screen-ram...
 
so... if we loop this... we interlace between this two gr9 and gr10
screen-rams and we will have a hip-picture...but we have to set
the correct values in colbk $d01a (712, see above!!!)
 
1. vbi       2. vbi
 
DLI1         DLI2
 
pha          pha
lda #$40     lda #$80   ; switching to correct gr-mode (gr9, gr10)
sta wsync    sta wsync
sta gtiamode sta gtiamode
lda #0       lda #14    ;setting correct background-color
sta $d01a    sta $d01a
lda #$80     lda #$40   ;switching to next gr.mode (see displaylist)
sta wsync    sta wsync
sta gtiamode sta gtiamode
lda #14      lda #0     ;and dont forget the background color!
sta $d01a    sta $d01a
pla          pla
rti          rti
 
so... this is the technique but there is a "big" problem by
converting pictures...in gr9/10 each pixel is 4 "bits" large or
a nibble and in a hip-pixel 2 of them (the overlaping ones...)
 
here an example:
 
gr.10: ..00002222...
gr.9 : 000022224444...
HIP  : ..00112233..
 
remember: GTIA shifts the gr10-lines by a half gr.10 pixel!!!
 
so... we will always track one half of the pixel-value to the next
hip-pixel... and this is the difficulty... the hip-colors are
NOT able to be set free!!! there are restrictions like the main one:
 
two following hip-pixels should not have a difference of their luminace
greater than 2 !!!! coz. then we could not set the right values and
the hip-pixel will begin to flicker!!!
 
Best way is to use digitised source-pictures with smooth luminance
for converting to hip-format... or raytraced stuff...
 
so try do code such a linear optimasation-algorithmus...
 
4. Converters:
 
they are avaible for the following systems:
 
unix  coded by Tamas Bene from HARD
PC    coded by Tamas Bene from HARD
 
Amiga coded and adapted by HEAVEN of Taquart
XL    my algorithmus, written by HEAVEN of Taquart
 
For Converting you need:
 
-one of the above converters
-a paint-program which can produce pictures in REAL greyscale and 64
 colors in a size 320x200
 I think the new version of the bmp2hip-pc-converter can handle
 bigger sizes and more colors...
-the 320x200x64 picture must be saved in Windows-BMP format
-a transfer program to XL
-a HIP-display-routine on XL
 
 
 
 
 
I hope I could help someone to do HIPing...
 
Heaven/TQA, 30.08.96
 
 
 
CrEdItS:
 
-Text by Heaven
-Algorithmus by Sanyi and Tamas of HARD
-HIP-Display-Routine by Tamas of HARD
-JAC! for inspiration...
 
ps. we have tried to do color-hipping but there is a difficulty
with the luminance of the xl-colors... the luminance is different
of some colors while setting the luminance to 0... so it
is HARD to calculate correct colors...but it is not impossible
 
Future stuff:
 
-converters which can handle several formats and colored-picture formats
 by generating by themselves the greyscale values...
-color-HIP... a algorithmus to generate colored hips...
-maybe it is possible to interlace HIP and so we could increase
 the amount of colors up ???
 
Many Thanx for all:
 
-Tamas Bene of HARD ...
-Slaves and rest of Taquart
-Gumi of Tight
-Marek Tomczyk for Websupporting
 
try the following webpages:
 
http://www.uni-karlsruhe.de/~Marek.Tomczyk/
 
http://ajax.umcs.lublin.pl/~mfranczak (TIGHT) to get to TAQUART
 
Email: nadkar@fh-pforzheim.de
-- 
Michael Current, 8-Bit Atari FAQ & Vendor/Developer Lists maintainer
   User groups: CAIN, SPACE, NWPAC / mailto:mcurrent@carleton.edu


-----------------------------------------
Return to message index