Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Pixeling > charset to sprite
2011-08-14 12:40
Dr.j

Registered: Feb 2003
Posts: 276
charset to sprite

Hey there, looking for a nice tool to convert a string , for example: "hello" from a 1/1 or 1/2 charset to a Sprites. moreover , there is a tool to convert a logo (8 rows) to a sprites?
2011-08-14 13:11
Conjuror

Registered: Aug 2004
Posts: 168
Alex,

I know you use kick-assembler. Just write some script to do it and then you'll have something you can reuse.

2011-08-14 13:19
Dr.j

Registered: Feb 2003
Posts: 276
Hey Steven
Thats a nice idea :-) i felt some lazyness but i guess i can figure how to make it. LOL
2011-08-14 22:47
Moloch

Registered: Jan 2002
Posts: 2893
... and if you want to continue being lazy, there are a few such tools listed here on CSDb.
2011-08-14 23:23
algorithm

Registered: May 2002
Posts: 702
Do it within the c64 code and transfer the required characters to sprites when required. For basic alphabet and some additional characters this will only take up 256 bytes of char data
2011-08-15 07:20
TWW

Registered: Jul 2009
Posts: 541
Codewise if you wan't to do it natively:

lda #"A"
ldy #$00
sty $02
asl
rol $02
asl
rol $02
asl
rol $02
clc
adc #<CharSet
sta $fb
lda #>CharSet
clc
adc $02
sta $fc

ldx #$00
Loop:
lda ($fb),y
sta sprite,x
inx
inx
inx
iny
cpy #$08
bne Loop
rts

OR if you don't like the math or you are in need of cycles:

ldx #"A"
lda CharSetPointerLo,x
sta $fb
lda CharSetPointerHi,x
sta $fc

ldx #$00
ldy #$00
Loop:
lda ($fb),y
sta Sprite,x
inx
inx
inx
iny
cpy #$08
bne Loop
rts

You can modify this so that Y = 8 & X = 8X3 and DEX/DEY which saves 2 cycles on the CPY. (of the top of my head so there might be bugs).
2011-08-15 07:22
Conrad

Registered: Nov 2006
Posts: 833
Quote:
there is a tool to convert a logo (8 rows) to a sprites?

GFX Transformer 1.0 does a nice job converting most types of picture formats to sprites. It will do 8 row logos no problem, but if you're talking about logos done in Ultrafont then you'll only have 24 chars per row, rather than 32. ;)
2011-08-15 07:47
WVL

Registered: Mar 2002
Posts: 886
With my old gfx tool : Logo generator v1.31

you can write text in a charlogo (you can load a font) and then convert to sprites (it always converts to 8*3 sprites) and save.

(H = helpscreen)

1) clear a logo (clear home, select logo)
2) load a font (L (load), C (charset)), enter filename
3) write text (T, select logo, select position with joystick, write text, press fire when done)
4) save sprites (W, select logo, and select what part to convert)

done!

Then again, writing some code is almost as fast ;)
2011-08-16 06:11
Dr.j

Registered: Feb 2003
Posts: 276
Thanks guyz for your great help :-)
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
KAL_123
The MeatBall
Ervin/Abaddon
Guests online: 138
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 The Ghost  (9.6)
9 Wonderland XIV  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.8)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 Rainbow Connection  (9.5)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Onscreen 5k  (9.5)
8 Wafer Demo  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Fullscreen Graphicians
1 Carrion  (9.8)
2 Joe  (9.8)
3 Duce  (9.8)
4 Mirage  (9.7)
5 Facet  (9.7)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.051 sec.