PLUS4-ANIMATION2-EXTENDED-IRQ --------------------------------------------------------------------------------------------------- TOOL: MERLIN 7501 ASSEMBLER {Commodore Plus4} Language: Assembly Extra: none Author: Misel Zivanovic Note: (C) 16th AUGUST 2026 - www.lived.ch, mzretro.ch --------------------------------------------------------------------------------------------------- The idea behind this is to make a graphic custom characters/elements}, which can or could or is it should, be used in and for games! Basically, I did my part, now you do the rest! Hehe... --------------------------------------------------------------------------------------------------- Effected are only: SHIFT + A until Z CTRL + A until Z Regular character set {alphabet} is still intact. Sure, you can change it if you want! The graphic elements are divided in three 4 groups: FUNCTION = SHIFT + {A until Z} MOVING UP - A, B, C, D MOVING DOWN - E, F, G, H STATIC - I, J, K, L, M, N, O, P, Q, R, S, T, U, V, Q, X, Y, Z = CONTROL {CTRL} + BLINKING - A, B ,C - short { can be individually changes } = D, E, F - medium { can be individually changes } = G, H, I - long { can be individually changed } NOTE: J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z is still open or better said, it has default Commodore Plus4 values! Which you can normally use or change if you want! The needed addresses are listed at the bottom of this document to do so! --------------------------------------------------------------------------------------------------- MERLIN 7501 ASSEMBLER Source Code! Can just be copy/pasted in case you use VICE Commodore Plus4 Emulator BUT BEFORE YOU DO THAT!!! ...it's MANADATORY to move the START address of your source code in MERLIN to $5000 as an example {See MERLIN 7501 Manual for more options} It's easy! Start MERLIN 7501 Assembler and just copy/paste this line {and hit ENTER} - CHECK SCREENSHOT 1 That will move the code below to $5000 and up and the code can be then assembled to $2100 {line 10, the start address of this program below, $2100, dec SYS 8448} poke 43,1:poke44,80: poke 20480,0:new 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 ;irq chars anim 105 ;rom to ram 106 ;sys 20480 107 ;credits: 108 ;8-bit basic & milasoft 109 ; 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 .chars,x 140 sta $3a08,x 141 inx 142 cpx #208 ;22 chars 143 bne .more ; 150 sei 151 lda #$7c ;when code is added 152 sta $0314 ;check the low and 153 lda #$21 ;high byte address! 154 sta $0315 ;for the irq start 161 ldy #$00 ; 162 sty $0be8 ;main delay 163 sty $0bf0 ;blink0a delay 164 sty $0bf1 ;blink0b delay 165 sty $0bf2 ;blink0c delay 166 sty $0bf3 ;blink1a delay 167 sty $0bf4 ;blink1b delay 168 sty $0bf5 ;blink1c delay 169 sty $0bf6 ;blink2a delay 170 sty $0bf7 ;blink2b delay 171 sty $0bf8 ;blink2c delay 172 cli 173 rts 174 ; 175 ldy $0be8 ;< irq start address 176 iny ; low high byte 177 sty $0be8 178 ldy $0be8 179 cpy #$10 ;keep y > 1! 180 beq .anim ;anim speed 181 ;---------- 182 lda $0c00 ;press shift+q 183 cmp #81 ;to exit the 184 beq .out ;interrupt mode! 185 .exit ;where: 186 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 sei ;safe exit 261 lda #14 ;no reset needed! 262 sta $0314 263 lda #206 264 sta $0315 265 cli 266 pla 267 tay 268 pla 269 tax 270 pla 271 rti 272 rts 273 ; 280 .anim 290 ; shift + char 300 lda $3a08 ;a 301 sta $0fe9 ;a 302 lda $3a10 ;b 303 sta $0fea ;b 304 lda $3a18 ;c 305 sta $0feb ;c 306 lda $3a20 ;d 307 sta $0fec ;d 308 ;next... 309 ldx #$00 310 .loop2 311 lda $3a09,x ;a 312 sta $3a08,x ;a 313 lda $3a11,x ;b 314 sta $3a10,x ;b 315 lda $3a19,x ;c 316 sta $3a18,x ;c 317 lda $3a21,x ;d 318 sta $3a20,x ;d 319 ;next... 320 inx 321 cpx #$07 322 bne .loop2 323 lda $0fe9 ;a 324 sta $3a08,x ;a 325 lda $0fea ;b 326 sta $3a10,x ;b 327 lda $0feb ;c 328 sta $3a18,x ;c 329 lda $0fec ;d 330 sta $3a20,x ;d 331 ;next... 400 ;- 401 ;down--------- 402 ;- 403 ldx #$07 403 lda $3a28,x ;e 404 sta $0fe9 ;e 405 lda $3a30,x ;f 406 sta $0fea ;f 407 lda $3a38,x ;g 408 sta $0feb ;g 409 lda $3a40,x ;h 410 sta $0fec ;h 411 ;next... 412 dex 413 ; 414 .loop3 415 lda $3a28,x ;e 416 sta $3a29,x ;e 417 lda $3a30,x ;f 418 sta $3a31,x ;f 419 lda $3a38,x ;g 420 sta $3a39,x ;g 421 lda $3a40,x ;h 422 sta $3a41,x ;h 423 ;next... 424 dex 425 bpl .loop3 426 lda $0fe9 ;e` 427 sta $3a28 ;e 428 lda $0fea ;f 429 sta $3a30 ;f 430 lda $0feb ;g 431 sta $3a38 ;g 432 lda $0fec ;h 433 sta $3a40 ;h 434 ;next... 435 ; 440 ;---------------------------------- 500 ;blink department 0 504 .blink0 506 ldy $0bf0 508 iny 510 sty $0bf0 512 ldy $0bf0 514 cpy #5 518 bcs .noshow 528 ldx #$00 530 .kop0 531 lda .achar,x 532 sta $3b80,x 533 lda .bchar,x 534 sta $3bf8,x 535 lda .cchar,x 536 sta $3be0,x 538 inx 540 cpx #$08 543 bne .kop0 545 jmp .blink1 547 .noshow 550 ldx #$00 552 .null0 553 lda #$00 554 sta $3b80,x ;ctrl + a 556 sta $3bf8,x ;ctrl + b 558 sta $3be0,x ;ctrl + c 560 inx 562 cpx #$08 574 bne .null0 580 ldy $0bf0 582 cpy #10 584 beq .resbl00 586 jmp .blink1 588 .resbl00 590 ldy #$00 592 sta $0bf0 595 ; 600 ;---------------------------------- 602 ;blink department 1 604 .blink1 606 ldy $0bf1 608 iny 610 sty $0bf1 612 ldy $0bf1 614 cpy #10 616 bcs .zeshow 618 ldx #$00 620 .bop0 622 lda .dchar,x 624 sta $3b60,x 626 lda .echar,x 628 sta $3b88,x 630 lda .fchar,x 632 sta $3bd8,x 634 inx 636 cpx #$08 638 bne .bop0 640 jmp .blink2 642 .zeshow 646 ldx #$00 648 .kull0 650 lda #$00 652 sta $3b60,x ;ctrl + d 654 sta $3b88,x ;ctrl + e 656 sta $3bd8,x ;ctrl + f 658 inx 660 cpx #$08 662 bne .kull0 664 ldy $0bf1 666 cpy #15 668 beq .besbl00 670 jmp .blink2 672 .besbl00 674 ldy #$00 676 sta $0bf1 680 ; 700 ;---------------------------------- 702 ;blink department 2 704 .blink2 706 ldy $0bf2 708 iny 710 sty $0bf2 712 ldy $0bf2 714 cpy #15 716 bcs .beshow 718 ldx #$00 720 .rop0 722 lda .gchar,x 724 sta $3b28,x 726 lda .hchar,x 728 sta $3ba0,x 730 lda .ichar,x 732 sta $3b10,x 734 inx 736 cpx #$08 738 bne .rop0 740 jmp .jump 742 .beshow 746 ldx #$00 748 .wull0 750 lda #$00 752 sta $3b28,x ;ctrl + g 754 sta $3ba0,x ;ctrl + h 756 sta $3b10,x ;ctrl + i 758 inx 760 cpx #$08 762 bne .wull0 764 ldy $0bf2 766 cpy #25 768 beq .tesbl00 770 jmp .jump 772 .tesbl00 774 ldy #$00 776 sta $0bf2 778 ; 900 ;---------------------------------- 901 ;---------------------------------- 930 .jump 931 ldy #$00 ;reset main delay 932 sty $0be8 ; 933 jmp .exit ;!mandatory! 934 ; 935 ;2nd run yes/no 936 .stat 937 *da $00 938 ; 950 .chars 951 ;move up - shift+a,b,c,d 952 *da $66,$bd,$db,$da,$da,$db,$a5,$7e 953 *da $e7,$db,$bd,$7e,$e7,$db,$bd,$7e 954 *da $99,$42,$24,$18,$18,$3c,$7e,$ff 955 *da $99,$5a,$bd,$7e,$66,$a5,$42,$81 956 ;move down - shift+e,f,g,h 957 *da $7e,$a5,$db,$5b,$5b,$db,$bd,$66 958 *da $7e,$bd,$db,$e7,$7e,$bd,$db,$e7 959 *da $ff,$7e,$3c,$18,$18,$24,$42,$99 960 *da $81,$42,$a5,$66,$7e,$bd,$5a,$99 961 ;still - shift+i,j,k,l,m 962 *da $3c,$7e,$e3,$cf,$df,$df,$7e,$3c 963 *da $6e,$d5,$89,$23,$88,$b3,$45,$95 964 *da $7f,$ff,$ff,$fb,$b7,$ff,$dd,$aa 965 *da $a5,$3c,$db,$76,$6e,$db,$3c,$a5 966 *da $24,$3c,$db,$6e,$76,$db,$3c,$24 967 ;no blink0 - shift+n,o,p 968 *da $99,$5a,$bd,$67,$e6,$bd,$5a,$99 969 *da $e7,$5a,$a5,$3c,$3c,$a5,$5a,$e7 970 *da $c3,$bd,$42,$56,$6a,$42,$bd,$c3 971 ;no blink1 - shift+q,r,s 972 *da $c7,$e3,$71,$38,$1c,$8e,$c7,$e3 973 *da $3c,$5a,$7e,$55,$aa,$7e,$5a,$3c 974 *da $6e,$b5,$db,$ad,$b5,$db,$ad,$76 975 ;no blink2 - shift+t,u,v 976 *da $8e,$db,$f1,$63,$c6,$8f,$db,$71 977 *da $db,$3c,$5a,$bd,$7e,$bd,$5a,$bd 978 *da $71,$db,$8f,$c6,$63,$f1,$db,$8e 980 ;corners shift+w,x,y,z 982 ;$3ab8, 15032 {shift + w} then xyz 984 *da $ff,$7f,$1f,$0f,$07,$03,$03,$01 986 *da $80,$c0,$c0,$e0,$f0,$f8,$fe,$ff 988 *da $ff,$fe,$f8,$f0,$e0,$c0,$c0,$80 990 *da $01,$03,$03,$07,$0f,$1f,$7f,$ff 992 ; 1001 ;---------------------------------- 1002 ;control + 1003 ;a, b, c, d, e, f, g, h, i 1004 ;blink department mode 1005 ;nop - short 1006 ;qrs - medium 1007 ;tuv - long 1008 ;---------------------------------- 1015 .achar 1020 *da $99,$5a,$bd,$67,$e6,$bd,$5a,$99 1025 .bchar 1030 *da $e7,$5a,$a5,$3c,$3c,$a5,$5a,$e7 1035 .cchar 1040 *da $c3,$bd,$42,$56,$6a,$42,$bd,$c3 1045 .dchar 1060 *da $c7,$e3,$71,$38,$1c,$8e,$c7,$e3 1065 .echar 1070 *da $3c,$5a,$7e,$55,$aa,$7e,$5a,$3c 1075 .fchar 1080 *da $6e,$b5,$db,$ad,$b5,$db,$ad,$76 1095 .gchar 1100 *da $8e,$db,$f1,$63,$c6,$8f,$db,$71 1105 .hchar 1110 *da $db,$3c,$5a,$bd,$7e,$bd,$5a,$bd 1115 .ichar 1120 *da $71,$db,$8f,$c6,$63,$f1,$db,$8e 2000 end <<<<<----- END OF THE CODE! --------------------------------------------------------------------------------------------------- SOME IDEA BACKUPS! ------------------------------------------------------------- 905 *da $95,$3b,$f1,$20,$04,$8f,$dc,$a9 910 *da $ee,$f5,$fb,$ff,$ff,$df,$af,$77 ------------------------------------------------------------- GET THE NEW CHAR MAP RE-ACTIVATED! ************************************************************* { because when you make a typo, it will disappear! } { just copy/paste this line and hit ENTER to get it back! } poke 65299,(peek(65299)and3)or56:poke 65298,peek(65298)and251 ************************************************************* PROGRESS STATUS {WIP} ************************************************************* 14:55 16.08.2026 ************************************************************* ACCES: ADDRESS {8 Bytes} - STATUS ************************************************************* CONTROL + A = $3b80, dec 15232 - done CONTROL + B = $3bf8, dec 15352 - done CONTROL + C = $3be0, dec 15328 - done CONTROL + D = $3b60, dec 15200 - done CONTROL + E = $3b88, dec 15240 - done CONTROL + F = $3bd8, dec 15320 - done CONTROL + G = $3b28, dec 15144 - done CONTROL + H = $3ba0, dec 15264 - done CONTROL + I = $3b10, dec 15120 - done CONTROL + J = $3ba8, dec 15272 - CONTROL + K = $3b08, dec 15112 - CONTROL + L = $3bb0, dec 15280 - CONTROL + M = $3b38, dec 15160 - CONTROL + N = $3b50, dec 15184 - CONTROL + O = $3bc8, dec 15304 - CONTROL + P = $3b78, dec 15224 - CONTROL + Q = $3b58, dec 15192 - CONTROL + R = $3b90, dec 15248 - CONTROL + S = $3b70, dec 15216 - CONTROL + T = $3b18, dec 15128 - CONTROL + U = $3bc0, dec 15296 - CONTROL + V = $3bf0, dec 15344 - CONTROL + X = $3be8, dec 15336 - CONTROL + Y = $3bb8, dec 15288 - CONTROL + Z = $3b68, dec 15208 - ************************************************************* >>> >>>>> >>> *************************************************************************************************** THE HEX and DEC addresses of CONTROL + {A until Z} TO KNOW WHERE TO PEEK AND POKE! NOTE: CUSTOM CHARACTERS ARE ASSUMED FROM $3800, dec 14336 {@} *************************************************************************************************** CONTROL + A = $3b80, dec 15232 CONTROL + B = $3bf8, dec 15352 CONTROL + C = $3be0, dec 15328 CONTROL + D = $3b60, dec 15200 CONTROL + E = $3b88, dec 15240 CONTROL + F = $3bd8, dec 15320 CONTROL + G = $3b28, dec 15144 CONTROL + H = $3ba0, dec 15264 CONTROL + I = $3b10, dec 15120 CONTROL + J = $3ba8, dec 15272 CONTROL + K = $3b08, dec 15112 CONTROL + L = $3bb0, dec 15280 CONTROL + M = $3b38, dec 15160 CONTROL + N = $3b50, dec 15184 CONTROL + O = $3bc8, dec 15304 CONTROL + P = $3b78, dec 15224 CONTROL + Q = $3b58, dec 15192 CONTROL + R = $3b90, dec 15248 CONTROL + S = $3b70, dec 15216 CONTROL + T = $3b18, dec 15128 CONTROL + U = $3bc0, dec 15296 CONTROL + V = $3bf0, dec 15344 CONTROL + X = $3be8, dec 15336 CONTROL + Y = $3bb8, dec 15288 CONTROL + Z = $3b68, dec 15208 *************************************************************