| |
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? |
|
| |
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.
|
| |
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 |
| |
Moloch
Registered: Jan 2002 Posts: 2932 |
... and if you want to continue being lazy, there are a few such tools listed here on CSDb.
|
| |
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 |
| |
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). |
| |
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. ;) |
| |
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 ;) |
| |
Dr.j
Registered: Feb 2003 Posts: 277 |
Thanks guyz for your great help :-)
|