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


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

Registered: Feb 2003
Posts: 73
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 15:11
Conjuror

Registered: Aug 2004
Posts: 114
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 15:19
The Dr.j

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

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

Registered: May 2002
Posts: 486
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 09:20
TWW

Registered: Jul 2009
Posts: 283
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 09:22
Conrad
Account closed

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

GFX Transformer 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 09:47
WVL

Registered: Mar 2002
Posts: 780
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 08:11
The Dr.j

Registered: Feb 2003
Posts: 73
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
Guests online: 22
Top Demos
1 Edge of Disgrace  (9.7)
2 Coma Light 13  (9.7)
3 Daah, those acid pil..  (9.6)
4 Deus Ex Machina  (9.3)
5 Andropolis  (9.3)
6 Te-Te-Te-TechTech It..  (9.3)
7 +H2K  (9.2)
8 Artphosis  (9.2)
9 GOLC  (9.2)
10 2011 - A Press Space..  (9.2)
Top Groups
1 Booze Design  (9.4)
2 Crest  (9.4)
3 Oxyron  (9.4)
4 Maniacs of Noise  (9.2)
5 Eagle Soft Incorpora..  (9.2)
Top Original Suppliers
1 Derbyshire Ram  (9.6)
2 Jazzcat  (9.3)
3 hedning  (9.2)
4 Secret Man  (1.4)
5 Yoko Tv Inc.  (1.1)

Home - Disclaimer
Copyright © No Name 2001-2013
Page generated in: 0.191 sec.