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: 277
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: 277
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: 2932
... 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: 707
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: 545
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: 850
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: 906
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: 277
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
iceout/Avatar/HF
celticdesign/G★P/M..
Guests online: 597
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Coma Light 13  (9.6)
4 Mojo  (9.6)
5 Edge of Disgrace  (9.6)
6 Uncensored  (9.6)
7 Wonderland XIV  (9.6)
8 Comaland 100%  (9.6)
9 Unboxed  (9.5)
10 Memento Mori  (9.5)
Top onefile Demos
1 Party Elk 2  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.6)
5 Libertongo  (9.5)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Barry Boomer - Trapp..  (9.5)
Top Groups
1 Booze Design  (9.3)
2 Oxyron  (9.3)
3 Performers  (9.3)
4 Triad  (9.3)
5 Censor Design  (9.2)
Top Musicians
1 Mutetus  (9.7)
2 Jeroen Tel  (9.7)
3 Rob Hubbard  (9.6)
4 Linus  (9.6)
5 Stinsen  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2025
Page generated in: 0.061 sec.