| |
PopMilo
Registered: Mar 2004 Posts: 146 |
Multicolor, multi pattern 4x4 mode, How?
How are those 4x4 pixel, multicolor, multi pattern modes made?
Example, Bumpmania from Arise:
Bumpmania
Is it with char mode and FLI at middle of each char row ?
|
|
... 10 posts hidden. Click here to view all posts.... |
| |
WVL
Registered: Mar 2002 Posts: 902 |
Quote: And to optimize that using twice texture memory u can do:
lda left_A
ldx right_C
sax
lda left_E
sax
ldx right_G
sax
lda left_H
sax
== automatic 4x4 interpolation in 8x8 mode (at least horizontally)
left_X looks like: XXXX1111
right_X looks like: 1111XXXX
This doesnt work ofcourse..
if your original data is like
A_C_E_G_
you'd want the screen to look like
ABCDEFGH
But with this routine it will end up looking like
ABEDEFIH
because lda left_a + ldx right_c gives AB
so ldx right_c + lda left_e gives ED
|
| |
Ninja
Registered: Jan 2002 Posts: |
Oswald: I told you about the SAX method at least twice, but you always replied something like "Naaah, don't want to redo the tables, not worth the effort" ;)
The bit-shifting-thingie is also used in loaders (when accessing the tables for GCR-conversion).
|
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
Quote: This doesnt work ofcourse..
if your original data is like
A_C_E_G_
you'd want the screen to look like
ABCDEFGH
But with this routine it will end up looking like
ABEDEFIH
because lda left_a + ldx right_c gives AB
so ldx right_c + lda left_e gives ED
ninja, sorries :)
|
| |
WVL
Registered: Mar 2002 Posts: 902 |
Well, you can still save a cycle by using TXA and TAX
lda zp1
ldx zp2
sax screen
txa
ldx zp3
sax screen
txa
ldx zp4
sax screen
etc
|
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: Well, you can still save a cycle by using TXA and TAX
lda zp1
ldx zp2
sax screen
txa
ldx zp3
sax screen
txa
ldx zp4
sax screen
etc
Indeed. Sax is more useful when doing tunnels f.e. Where f.e. u want to load the left texel and reuse it on as many screen positions as possible but with another right texel. |
| |
PopMilo
Registered: Mar 2004 Posts: 146 |
Quote: yes, and special charset with 16 individual shades for the left/right part. so fex. lowmost 4 bits of the charnr sets brightness of the right part of the char and highest 4 bits the left part. usually one has twice the texture to lda ora the left/right part, but here's a trick to use only one texture: mix the bit's of the left/right part like this:
76543210
lrlrlrlr
l=left
r=right
then with one bit rotate instruction you can push the bits into their correct position, so lda texture asl (=left side) ora texture.
Thanks Oswald!
That is one cool trick :)
Reminds me of chunky mode bit shifting tricks on Amiga.
|
Previous - 1 | 2 - Next |