Getting started and out of date info

All aspects of programming on the Commander X16.
Post Reply
qbox85
Posts: 2
Joined: Fri Mar 10, 2023 12:27 pm

Getting started and out of date info

Post by qbox85 »

Hi guys,

just starting out and trying work it all out using what i can find online. I keep finding examples and how-tos that are out of date.

I am trying to follow "The Retro Desk" video on the Vera but he goes from zero to flat out in the one video.

Hopefully someone can help here.

I am trying to print a string to the screen but change the colour.

Code: Select all

Start

    ldx #$00
Loops
    lda message, x
    jsr $FFD2
    inx
    cpx #$0B
    bne Loops
    rts

message .text "HELLO WORLD"
User avatar
JimmyDansbo
Posts: 476
Joined: Sun Apr 26, 2020 8:10 pm
Location: Denmark
Contact:

Re: Getting started and out of date info

Post by JimmyDansbo »

Since you are using the KERNAL call to print text, you can use the same kernal call to change color.

See https://cx16.dk/cx16-petscii/ for PETSCII color codes.
Notice that if you want to change background color, you can do it by using code $01 (swap fg/bg color).

Code: Select all

	lda #$1C	; Load RED color
	jsr $FFD2
	lda #$01	; Move Swap fg/bg color
	jsr $FFD2
	lda #$90	; Load BLACK color
	jsr $FFD2
If you put your text-output-loop after above code, you should get black text on red background.
Visit my Github repo
or my personal site with CX16/C64/6502 related information.
Feel free to contact me regarding any of my projects or even about meeting up somewhere near Denmark
grml
Posts: 60
Joined: Sat Aug 13, 2022 8:31 pm

Re: Getting started and out of date info

Post by grml »

colorchars.png
colorchars.png (33.16 KiB) Viewed 3023 times
qbox85
Posts: 2
Joined: Fri Mar 10, 2023 12:27 pm

Re: Getting started and out of date info

Post by qbox85 »

Thanks.

I will play around with the KERNAL.

The next step would to use the VERA 265 colour text mode.

Thanks
SlithyMatt
Posts: 913
Joined: Tue Apr 28, 2020 2:45 am

Re: Getting started and out of date info

Post by SlithyMatt »

I am trying to follow "The Retro Desk" video on the Vera but he goes from zero to flat out in the one video.
I would definitely not start with that video! My original "Hello, cc65!" video is a better place to start to just print a string, or starting my tutorial series from the first episode (like I say in the beginning of each subsequent episode, like in the VERA one).





They are a little out of date, but it should still give you a solid foundation. I am going to be remaking these videos in the near future as full production gets closer.
Post Reply