PLUS4-CUSTOM-MultiColor-CHARSET -------------------------------------------------------------------------------------------------- TOOL: MERLIN 7501 ASSEMBLER {Commodore PLUS4} Language: Assembler Extra: none Author: Misel Zivanovic Note: (C) 29th JULY 2026 - www.lived.ch, mzretro.ch --------------------------------------------------------------------------------------------------- MULTICOLOR CHARACTERS WITH COMMODORE PLUS4 ------------------------------------------ MultiColorCharacters were always handled with much less love than anything else in the Commodore World! Not even the latest BASIC 7.0 in Commodore C128 has one single MultiColor command! Microsoft didn't manage to add any from BASIC 2.0 until BASIC 7.0 and later they had no more chances to do it as we all know! You have to PEEK and POKE everything. It's like programming in assembly language and that's what we will do, not in BASIC, in ASSEMBLER! Old code will be reused, since it is working so well and it's usable for many things as we can see! STEPS: First step is to start MERLIN 7501 ASSEMBLER Second is to execute this line in DIRECT MODE, no lines, to move the start of the source code {of our program} to $6000! poke 43,1:poke44,96: poke 24576,0:new {and hit ENTER! Do i really need to write that!? Haha} I assume you are working with VICE, Commodore Plus4 emulation! Now copy/paste the code below into the window of your Plus4 emulation and wait until all is copied! Compile/Assembly it with the ASM command as next step and start with SYS 8448 What can I say and what you can see {from the screen shot!}, this is working! It's adapted to new character set, however, the only way i could bring it to life, were this little silly commands {which is equal to print chr$(153) lda #153 jsr $ffd2 Before that, it just didn't work! What also is annoying, when making a typo! like pokee 65301,5 {hell, this isn't a typo, hahaha... but it is not doing anything except giving a READY. as output} Also no typo??? pokeed324dkdjdu756 65301,5 ready. Okay, got one pringt "hello" ?syntax error ready. So, when you have multicolor character mode on and make a typo, then MC Mode will disappear incl. everything on the screen! Multicolor characters were made with SPRDEF {Sprite Definition Tool} on C128 and this looks quite compatible. 26 characters were created within 10 minutes. 6 characters/Sprite are possible. I also made numbers, but they aren't used here {the definitions are included} now. Will add them later... What can be said? - The missing cursor really is annoying. - Losing the screen content when you make a little mistake, will not kill you, but you won't be happy either! --------------------------------------------------------------------------------------------------- WARNING: before you copy/paste this source code into the emulation, start these commands first! {you can also copy/paste it and hit enter} poke 43,1:poke44,96: poke 24576,0:new Now you can start typing, copy/paste or load this code from the floppy disk! 10 com $2100 11 list 12 lda .stat 13 cmp #55 14 beq .nomore 15 bne .runit 16 .nomore 17 rts 18 .runit 19 lda #55 20 sta .stat 100 ;assembler merlin 7501 103 ;c= plus 4 - mzretro-ch 104 ;custom characters 106 ;start with sys 8448 100 ; 110 lda #$00 111 sta $03 112 sta $05 113 lda #$38 114 sta $04 115 lda #$d0 116 sta $06 117 ldy #$00 118 .loop1 119 lda ($05),y 120 sta ($03),y 122 iny 123 bne .loop1 124 inc $04 125 inc $06 126 lda #$d8 127 cmp $06 128 bne .loop1 129 lda $ff12 ;read status 130 and #251 ;switch 131 sta $ff12 ;ram characters 132 lda $ff13 ;set 133 and #3 134 ora #56 ;location 135 sta $ff13 ;$3800 136 ; 137 ldx #$00 ;custom chars 138 .more 139 lda .mcchars,x 140 sta $3808,x ;no @ 141 inx 142 cpx #208 ;26 characters 143 bne .more ;no numbers for now 144 lda #$93 ;screen clr 145 jsr $ffd2 146 ldx #$00 ;add some chars 147 .cloop 148 lda #3 ;and colors 149 sta $0800,x 152 inx 153 cpx #$80 154 bne .cloop 155 lda #17 ;color 00, screen color 156 sta $ff15 157 lda #17 ;border color 158 sta $ff19 159 lda #153 160 jsr $ffd2 161 sei 162 lda #$81 ;when code is added 163 sta $0314 ;check the low and 164 lda #$21 ;high byte address! 165 sta $0315 ;for the irq start 166 ldy #$00 ; 167 sty $0be8 ;main delay 168 cli 169 rts 170 ; 175 lda #100 ;color 01 multicolor 1 176 sta $ff16 177 lda #93 ;color 11 multicolor 2 178 sta $ff17 179 lda $ff07 ;multicolor on 180 ora #16 181 sta $ff07 182 ldy $0be8 ;< irq start address 183 iny ; low high byte 184 sty $0be8 185 ldy $0be8 186 cpy #$10 ;keep y > 1! 187 beq .mychars 188 ;---------- 189 lda $0c00 ;press shift+q 190 cmp #81 ;to exit the 191 beq .out ;interrupt mode! 192 .exit ;where: 193 jmp $ce0e ;left upper corner! 200 ; ;in capitol char mode 250 .out ;exit to basic, no irq 251 lda $ff12 ;read status 252 ora #4 ;set characters 253 sta $ff12 ;back to 254 lda $ff13 ;original 255 and #3 ;rom 256 ora #$d0 ;source 257 sta $ff13 ;$d000-53248 258 lda #$00 259 sta .stat 260 lda $ff07 ;no multicolor 261 and #239 262 sta $ff07 263 sei ;safe exit 264 lda #14 ;no reset needed! 265 sta $0314 266 lda #206 267 sta $0315 268 cli 269 pla 270 tay 271 pla 272 tax 273 pla 274 rti 275 rts 280 ; 400 .mychars 401 ldy #$00 ;reset main delay 402 sty $0be8 ; 403 jmp .exit ;!mandatory! 404 ; 405 ;2nd run yes/no 406 .stat 407 *da $00 408 ; 450 .mcchars 451 ;@ unused 452 ;mc character definitions 453 ; a,b,c,d,e,f 454 *da $a0,$88,$cc,$fc,$44,$44,$44,$00 455 *da $a0,$88,$cc,$f0,$44,$44,$54,$00 456 *da $a8,$88,$c0,$c0,$40,$44,$54,$00 457 *da $a0,$88,$cc,$cc,$44,$44,$54,$00 458 *da $a8,$88,$c0,$f0,$40,$44,$54,$00 459 *da $a8,$88,$c0,$f0,$40,$40,$40,$00 470 ; g,h,i,j,k,l 471 *da $a0,$88,$c0,$cc,$44,$44,$54,$00 472 *da $88,$88,$cc,$fc,$44,$44,$44,$00 473 *da $20,$20,$30,$30,$10,$10,$10,$00 474 *da $08,$08,$0c,$0c,$04,$44,$54,$00 475 *da $88,$88,$cc,$f0,$44,$44,$44,$00 476 *da $80,$80,$c0,$c0,$40,$44,$54,$00 480 ; m,n,o,p,q,r 481 *da $88,$88,$ec,$fc,$44,$44,$44,$00 482 *da $88,$88,$cc,$ec,$48,$44,$44,$00 483 *da $a8,$88,$cc,$cc,$44,$44,$54,$00 484 *da $a0,$88,$cc,$fc,$40,$40,$40,$00 485 *da $a0,$88,$cc,$cc,$44,$64,$58,$00 486 *da $a0,$88,$cc,$fc,$50,$44,$44,$00 490 ; s,t,u,v,w,x,y,z 491 *da $a8,$88,$c0,$fc,$04,$44,$54,$00 492 *da $a8,$a8,$30,$30,$10,$10,$10,$00 493 *da $88,$88,$cc,$cc,$44,$44,$54,$00 494 *da $88,$88,$cc,$cc,$44,$50,$40,$00 495 *da $88,$88,$cc,$cc,$44,$54,$44,$00 496 *da $88,$88,$cc,$30,$54,$44,$44,$00 497 *da $88,$88,$cc,$fc,$10,$10,$10,$00 498 *da $a8,$08,$30,$30,$40,$40,$54,$00 499 end -------------------------------------------- NOT PART OF THE CODE YET! DO NOT COPY/PASTE! -------------------------------------------- 600 ; numbers 601 ; 0,1,2,3,4,5,6,7,8,9 602 *da $28,$88,$cc,$cc,$44,$44,$50,$00 603 *da $08,$28,$0c,$0c,$04,$04,$04,$00 604 *da $a8,$88,$0c,$30,$40,$44,$54,$00 605 *da $a0,$88,$0c,$30,$04,$44,$50,$00 606 *da $80,$88,$cc,$fc,$04,$04,$04,$00 607 *da $a8,$80,$c0,$fc,$04,$44,$50,$00 608 *da $28,$88,$c0,$fc,$44,$44,$50,$00 609 *da $a8,$88,$0c,$30,$10,$10,$10,$00 610 *da $28,$88,$cc,$30,$44,$44,$50,$00 611 *da $28,$88,$cc,$fc,$04,$44,$50,$00 612 ; done! -------------------------------------------- FOR COMMODORE C128 {to create multicolor characters which can be used also with on C64 and Plus4!} --------------------------------------------------------------------------------------------------- This is my routine to export 6 characters from sprite 1 {SPRDEF Tool} Characters must be arrange as following: ABC DEF Of course, you can use it also for not multicolor characters! And to creat graphic elements. e.g. 2x2 characters 1x2 etc. As always, your imagination is your limit! --------------------------------------------------------------------------------------------------- MULTICOLOR FONT EXPORT VERSION 1.0 {for C128} Check the 2nd screenshot to see how it is done! You basically need to start SPRDEF, create characters {sprite 1}, save it, exit and run this BASIC program below! --------------------------------------------------------------------------------------------------- 10 sprcolor 5,6: color 0,1 11 l1$="*da ":l2$="*da ":scnclr 13 char0,0,0:fora=0to2:char0,0,0+a,l1$ 16 l1$="*da " 19 forb=3584+ato3605+astep3:dd=peek(b) 22 gosub 46 25 printright$(hex$(dd),2);:next:next 28 for a=0to2:char0,0,4+a,l2$ 31 l2$="*da " 34 forb=3608+ato3629+astep3:ee=peek(b) 37 gosub 58 40 printright$(hex$(ee),2);:next:next 43 char 0,0,16:end 46 p$=",$":ifb=3584thenp$="$" 49 ifb=3585thenp$="$" 52 ifb=3586thenp$="$" 55 print p$;:return 58 p$=",$":ifb=3608thenp$="$" 61 ifb=3609thenp$="$" 64 ifb=3610thenp$="$" 67 print p$;:return ---------------------------------------------------------------------------------------------------