You are not logged in -
nap
CSDb User Forums
Forums
>
C64 Coding
>
convert between MC sprite data and MC Font data?
2006-08-05
14:51
Trifox
Account closed
Registered: Mar 2006
Posts: 108
convert between MC sprite data and MC Font data?
hi2all, unfortunately i crossed a problem, when doing sprite multicolor graphics and font multicolor graphics, the problem is, i cant use the same sprite data in my MC Font data, the problem is:
color index in MC Text mode is determined by
"00": Background color 0 ($d021)
"01": Background color 1 ($d022)
"10": Background color 2 ($d023)
"11": Color from bits 8-10 of c-data
the dynamic color code is "11" and for sprite data it is
"00": Transparent
"01": Sprite multicolor 0 ($d025)
"10": Sprite color ($d027 - $d02e)
"11": Sprite multicolor 1 ($d026)
the dynamic color code is here "10", what a pitty, now i need a fast method of converting all "10"'s to "11"'s and vice versa, do i need to shift around and create the other bitcombination, or is there a faster method?
2006-08-05
15:20
tlr
Registered: Sep 2003
Posts: 1790
A 256 byte lookup table would be fast, i.e similar to:
ldx fontbyte lda lut,x sta spritebyte
Even faster would be store another copy of the charset, preconverted. ;)
What is it supposed to be used for?
2006-08-05
15:41
Trifox
Account closed
Registered: Mar 2006
Posts: 108
oh, its just for my little game i am actually on, i am first experimenting with font multicolor mode, but ran into this problem, i think i will build a complete lookuptable, its fast and easy .. ;) ii have written a routine for doing that with register a ... so, building a table can be quite easy
2006-08-05
16:34
Hein
Registered: Apr 2004
Posts: 954
or use
lda fontbyte
eor #%01010101
sta spritebyte
but you'd have to make $d022 your background colour and $d021 becomes object colour 1 (for instance a happy mushroom).
Refresh
Subscribe to this thread:
You need to be logged in to post in the forum.
Search the forum:
Search
All forums
C64 Coding
C64 Composing
C64 Pixeling
C64 Productions
CSDb Bug Reports
CSDb Development
CSDb Discussions
CSDb Entries
CSDb Feedback
CSDb Info
CSDb moderators
CSDb Questions
Messages to moderators
Requests
for
in
Writer & text
Text
Writer
All times are CET.
Search CSDb
All
Releases
Groups
Sceners
Events
BBS
SIDs
-------
Forum
Comments
Advanced
Users Online
Thierry
Urban Space Cowboy
Meikel aka ZUX/Sparks
E$G/HF ⭐ 7
Guests online: 135
Top Demos
1
Next Level
(9.7)
2
13:37
(9.7)
3
Mojo
(9.7)
4
Coma Light 13
(9.6)
5
Edge of Disgrace
(9.6)
6
What Is The Matrix 2
(9.6)
7
The Demo Coder
(9.6)
8
Uncensored
(9.6)
9
Comaland 100%
(9.6)
10
Wonderland XIV
(9.6)
Top onefile Demos
1
No Listen
(9.6)
2
Layers
(9.6)
3
Cubic Dream
(9.6)
4
Party Elk 2
(9.6)
5
Copper Booze
(9.6)
6
X-Mas Demo 2024
(9.5)
7
Dawnfall V1.1
(9.5)
8
Rainbow Connection
(9.5)
9
Onscreen 5k
(9.5)
10
Morph
(9.5)
Top Groups
1
Performers
(9.3)
2
Booze Design
(9.3)
3
Oxyron
(9.3)
4
Censor Design
(9.3)
5
Triad
(9.3)
Top Coders
1
Axis
(9.8)
2
Graham
(9.8)
3
Lft
(9.8)
4
Crossbow
(9.8)
5
HCL
(9.8)
Home
-
Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.044 sec.