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 Coding > 4x4 char smooth Scroll
2006-07-16 18:26
Richard

Registered: Dec 2001
Posts: 621
4x4 char smooth Scroll

Please can anyone help?

I know how to do 1x1 scroll text, 1x2 scrolltext, but I don't have a clue how to code a 4x4 charset scroll and how a 4x4 char actually works.

I want to do a 4x4 scrolling routine, for a demo.

Thanx

RB!
2006-07-16 18:45
cadaver

Registered: Feb 2002
Posts: 1160
I would do it just like scrolling 4x4 blocks in a game, but since that's a bit complicated, here's a simpler way:

Have a counter counting from 0 to 3, that tells which column of the big letter to display next. When this counter wraps, time to move on to the next letter.

Then for each of the 4 columns, you need 4 tables (for 4 rows) that tell which char will be used in that position of the letter.

For example, code for column 0:

ldy #0
lda (textptr),y ;current letter of scrolltext
tax
lda col0row0tbl,x
sta $0400+21*40+39
lda col0row1tbl,x
sta $0400+22*40+39
lda col0row2tbl,x
sta $0400+23*40+39
lda col0row3tbl,x
sta $0400+24*40+39

How you edit the big charset and generate those tables, is another headache...
2006-07-16 19:50
Bud

Registered: Jan 2002
Posts: 14
If you draw a 4x4 charset using the 4x4 Char Maker found here on CSDb, you will end up with 4 character sets. Because of this, you need to change the font using $d018 after the first font has been displayed (every 8 pixels). Some info is given when in the editor about this.
In a scrolltext you can count from 1 to 4 when moving the characters to the left. when the counter is 1, display a new character, when the counter is 2-4, add #$40 to the last character column that was on the screen.

When you intend to use only 31 characters and space, you can fit the 4x4 font into 2 character sets and change the font only half way, after 16 pixels. Ofcourse you need to change the scroll routine depending on how the characters have been placed into memory.
2006-07-16 20:00
Scout

Registered: Dec 2002
Posts: 1570
@Bud: 4 charsets? $d018 manipulating ..Geez..that's a bit complex/memory consuming innit?

What we did back in the days was drawing a charset in an editor like Amica Paint and convert the koala/amica pic to a char set.
Then you make a lookuptable with pointers to the start positions of every font-character in the converted screenmap.
This way you can make also whatever x whatever scrollers with proportional characters like the I, M and W.


---
8Bit Mayhem - The Commodore 64 Scenemusic Podcast
http://8bitmayhem.blogspot.com/
2006-07-16 20:03
Hein

Registered: Apr 2004
Posts: 954
I used Crowthers editor, did 4x4, 8x8 fonts and such. Takes some time to define the needed characters, but if you like puzzles, it's big fun. :)
2006-07-16 20:04
tlr

Registered: Sep 2003
Posts: 1790
You could also use something like this: Backdrop Designer V1.2.
2006-07-16 20:27
Bud

Registered: Jan 2002
Posts: 14
@Scout: If your 4x4 font can fit in one character set then that's indeed the way to go. But when you want each character to look different it will be difficult...
2006-07-17 19:12
Richard

Registered: Dec 2001
Posts: 621
Quote: I would do it just like scrolling 4x4 blocks in a game, but since that's a bit complicated, here's a simpler way:

Have a counter counting from 0 to 3, that tells which column of the big letter to display next. When this counter wraps, time to move on to the next letter.

Then for each of the 4 columns, you need 4 tables (for 4 rows) that tell which char will be used in that position of the letter.

For example, code for column 0:

ldy #0
lda (textptr),y ;current letter of scrolltext
tax
lda col0row0tbl,x
sta $0400+21*40+39
lda col0row1tbl,x
sta $0400+22*40+39
lda col0row2tbl,x
sta $0400+23*40+39
lda col0row3tbl,x
sta $0400+24*40+39

How you edit the big charset and generate those tables, is another headache...


I was supplied a paint magic picture of a 4x4 charset and turned it into Koala paint format, then I turned this into font + screen format using Centauri Logo editor. The char displays something like this:

ABCDEFGHIJ
KLMNOPQRST
UVWXYZ 012
3456789!'?
().,:, etc

If this is the screen data (logo type of format), should I use the screen data that forms the letter as the table for mapping the text to screen?

For example:
4x4 Character letter 'A'

letter_a_row1 dc.b $01,$02,$03,$04
letter_a_row2 dc.b $09,$0A,$0B,$0C
letter_a_row3 dc.b $1D,$1E,$1F,$21
letter_a_row4 dc.b $35,$36,$37,$38



2006-07-17 19:25
Tch
Account closed

Registered: Sep 2004
Posts: 512
something like that,though:

K= #$0B
U= #$15
3= #$33

so you are fucking up somewhere...
2006-07-18 05:29
Style

Registered: Jun 2004
Posts: 498
I think i did a 4x4 for revenge (or maybe 3x3) in my early days.

From memory the font was drawn in 'centauri logo editor' taking care to construct each letter of the same char definitions. Using the block copy helps.

then you save as screen + charset and voila.

Cant remember how I setup the tables, possibly just pointers into the screen data........

2006-07-18 18:44
Honesty

Registered: Jan 2003
Posts: 121
Normally you had 4 maps for every x row an own.
Then asl asl to get the start of it.

Store value and use another counter to check if all 4 chars had been desplayed, when yes fetch the next char from scroll.
 
... 4 posts hidden. Click here to view all posts....
 
Previous - 1 | 2 - Next
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
Andy/AEG
Ninja/The Dreams
BYB/Hokuto Force
Soya/Fairlight
Peacemaker/CENSOR/Hi..
megasoftargentina
t0m3000/hf^boom!^ibx
Conjuror
kbs/Pht/Lxt
zscs
XmikeX
Guests online: 145
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 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (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 Original Suppliers
1 Derbyshire Ram  (9.7)
2 Fungus  (9.3)
3 Black Beard  (9.2)
4 Baracuda  (9.2)
5 hedning  (9.1)

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