News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Devilmarkus

Workshop: How to make a 3 coloured Font for BASIC?

Started by Devilmarkus, 16:30, 02 July 10

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Devilmarkus

Hi together,
I want to show a little workshop, how to create a coloured font for BASIC.
Restrictions:
- Font is unreadable in normal MODE 1, 2 or 0
- You need at least a CALL to set MODE 1 with aspect of 0 or my little RSX-Routine.

First, what you need, is a MODE 0-Screen containing your Font:


Then you need a Converter tool to convert this screen as 16k CPC screen.
(ConvImgCPC or JavaCPC Paint)
You need to create a locked palette:
PEN 1 = light red (6)
PEN 4 = orange (15)
PEN 5 = pastel yellow (25)
All other PEN's set to 0!!!

Alright, convert the screen now to CPC format with this palette.
Then, put your SCR file on a DSK.
When you load this SCR now under MODE 1 you will see it like:



RUN"FONTGEN" (my FontGen-Program) and set the parameters:
- Screenname: YOURFILE.SCR
- Savename: "MYFONT.BAS"
- Start offset: 32
- End offset: 122

You will see an unreadable result:



When the program has finished reading this "font" and stored your ASCII file:
Reset the CPC
LOAD"MYFONT.BAS"
10 MODE 1:CALL &BD1C
20 INK 0,0:INK 1,6:INK 4,15:INK 5,25 ' Set all other colours as you want
RUN

You see: a nice font in MODE 0 with 40 chars per line and 3 colours.

Alternative to MODE 1:CALL &BD1C is my little binary:
        nolist
        org #8000

        LD      HL,BufferRsx
        LD      BC,PtrRsx
        JP      #BCD1

PtrRsx:
        DW      RSX_TABLE
        JP      Mode

RSX_TABLE:
        DB      "MOD","E"+#80


Mode:
    LD A,1
    CALL &BC0E
    CALL &BD1C
    RET
       
BufferRsx:
        DS      4


New RSX-command:
|MODE
Sets the required screenmode.

Have fun!

Attachment: FontGen with all prepared files you need:
http://cpc-live.com/workshop/FontGen_1_0.dsk
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

Devilmarkus

For the BASIC-type-ins-freaks:

10 MODE 1:CALL &BD1C
20 INK 0,0:INK 1,6:INK 4,15:INK 5,25
7000 SYMBOL AFTER 32
7010 SYMBOL 32,0,0,0,0,0,0,0,0
7020 SYMBOL 33,10,10,2,2,8,0,8,0
7030 SYMBOL 34,170,34,0,0,0,0,0,0
7040 SYMBOL 35,0,0,0,0,0,0,0,0
7050 SYMBOL 36,64,234,224,64,74,234,64,0
7060 SYMBOL 37,170,10,80,16,16,32,136,0
7070 SYMBOL 38,170,170,80,34,34,136,64,0
7080 SYMBOL 39,10,2,0,0,0,0,0,0
7090 SYMBOL 40,10,80,80,16,16,64,8,0
7100 SYMBOL 41,80,10,10,2,2,8,64,0
7110 SYMBOL 42,0,170,16,16,136,0,0,0
7120 SYMBOL 43,0,80,80,50,16,64,0,0
7130 SYMBOL 44,0,0,0,0,80,80,32,0
7140 SYMBOL 45,0,0,0,50,0,0,0,0
7150 SYMBOL 46,0,0,0,0,0,80,16,0
7160 SYMBOL 47,10,10,80,16,16,32,128,0
7170 SYMBOL 48,178,34,136,136,136,136,200,0
7180 SYMBOL 49,80,48,64,64,64,64,64,0
7190 SYMBOL 50,178,34,8,64,128,128,200,0
7200 SYMBOL 51,178,2,8,72,8,8,200,0
7210 SYMBOL 52,162,34,136,200,8,8,8,0
7220 SYMBOL 53,178,32,128,200,8,8,200,0
7230 SYMBOL 54,178,32,128,200,136,136,200,0
7240 SYMBOL 55,178,2,8,8,8,8,8,0
7250 SYMBOL 56,178,34,136,200,136,136,200,0
7260 SYMBOL 57,178,34,136,200,8,8,8,0
7270 SYMBOL 58,0,80,16,0,0,80,16,0
7280 SYMBOL 59,0,0,80,0,80,16,128,0
7290 SYMBOL 60,10,80,32,32,64,8,0,0
7300 SYMBOL 61,0,0,50,0,200,0,0,0
7310 SYMBOL 62,160,80,2,2,64,128,0,0
7320 SYMBOL 63,80,170,10,2,16,0,64,0
7330 SYMBOL 64,80,170,170,162,50,32,24,0
7340 SYMBOL 65,80,162,162,178,34,40,136,0
7350 SYMBOL 66,240,162,162,176,34,40,96,0
7360 SYMBOL 67,80,162,160,32,32,40,64,0
7370 SYMBOL 68,240,162,162,34,34,40,96,0
7380 SYMBOL 69,242,160,160,48,32,32,200,0
7390 SYMBOL 70,242,160,32,48,32,32,128,0
7400 SYMBOL 71,80,162,160,34,34,40,64,0
7410 SYMBOL 72,162,162,162,50,34,40,40,0
7420 SYMBOL 73,242,80,16,16,16,64,200,0
7430 SYMBOL 74,242,80,16,16,16,64,128,0
7440 SYMBOL 75,162,162,176,48,34,40,136,0
7450 SYMBOL 76,160,160,160,32,32,32,104,0
7460 SYMBOL 77,162,178,178,34,34,40,136,0
7470 SYMBOL 78,162,162,178,34,34,40,136,0
7480 SYMBOL 79,80,162,162,34,34,136,64,0
7490 SYMBOL 80,240,162,34,48,32,32,128,0
7500 SYMBOL 81,80,162,162,34,34,96,72,0
7510 SYMBOL 82,240,162,34,48,34,40,136,0
7520 SYMBOL 83,80,162,160,16,2,136,64,0
7530 SYMBOL 84,242,80,80,16,16,64,64,0
7540 SYMBOL 85,162,162,162,34,34,136,64,0
7550 SYMBOL 86,162,162,162,34,40,64,64,0
7560 SYMBOL 87,162,162,162,34,34,104,136,0
7570 SYMBOL 88,162,162,162,16,34,40,136,0
7580 SYMBOL 89,162,162,162,50,16,64,64,0
7590 SYMBOL 90,242,2,80,32,32,32,200,0
7600 SYMBOL 91,162,0,16,162,50,40,136,0
7610 SYMBOL 92,162,0,16,162,34,136,64,0
7620 SYMBOL 93,162,0,162,34,34,136,64,0
7630 SYMBOL 94,80,90,242,16,16,64,64,0
7640 SYMBOL 95,0,0,0,0,0,0,0,204
7650 SYMBOL 96,80,16,8,0,0,0,0,0
7660 SYMBOL 97,0,0,240,2,50,136,200,0
7670 SYMBOL 98,160,160,240,162,34,136,200,0
7680 SYMBOL 99,0,0,80,162,32,136,72,0
7690 SYMBOL 100,90,10,250,162,34,136,200,0
7700 SYMBOL 101,0,0,80,162,50,128,72,0
7710 SYMBOL 102,90,80,80,178,16,64,192,0
7720 SYMBOL 103,0,0,90,162,34,72,8,200
7730 SYMBOL 104,160,160,160,50,34,136,136,0
7740 SYMBOL 105,80,0,80,16,16,64,72,0
7750 SYMBOL 106,10,0,10,2,2,136,136,72
7760 SYMBOL 107,160,160,162,34,48,136,136,0
7770 SYMBOL 108,80,80,80,16,16,64,72,0
7780 SYMBOL 109,0,0,170,242,50,200,136,0
7790 SYMBOL 110,0,0,250,162,34,136,136,0
7800 SYMBOL 111,0,0,80,162,34,136,64,0
7810 SYMBOL 112,0,0,240,162,34,200,128,192
7820 SYMBOL 113,0,0,240,162,34,200,8,8
7830 SYMBOL 114,0,0,162,242,32,128,192,0
7840 SYMBOL 115,0,0,90,160,18,8,192,0
7850 SYMBOL 116,80,80,178,16,16,64,8,0
7860 SYMBOL 117,0,0,162,34,34,136,72,0
7870 SYMBOL 118,0,0,162,34,34,64,64,0
7880 SYMBOL 119,0,0,162,50,50,200,136,0
7890 SYMBOL 120,0,0,162,34,16,136,136,0
7900 SYMBOL 121,0,0,162,34,34,72,8,200
7910 SYMBOL 122,0,0,242,2,16,64,200,0
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

mr_lou

Don't you ever sleep?
Seems you present something new almost every day.  :)

Devilmarkus

This prog. and font is old.
I once made it for "Elvira"
Now I share the code for you.
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

Gryzor

You know, I've seen multicolored fonts in games often, but it never occurred to me that there's some magic that needs to take place to enable these...

Powered by SMFPacks Menu Editor Mod