Vera and petscii

All aspects of programming on the Commander X16.
Post Reply
unartic
Posts: 145
Joined: Sat Oct 28, 2023 3:26 pm

Vera and petscii

Post by unartic »

Hi!

If I store $41 to address $1B000 via the DATA_O ($9F23) port on the vera, I expect to see an A on the screen. I do however get the a spades-character (from playing cards).


Does anyone know why and how to fix this?
User avatar
JimmyDansbo
Posts: 476
Joined: Sun Apr 26, 2020 8:10 pm
Location: Denmark
Contact:

Re: Vera and petscii

Post by JimmyDansbo »

PETSCII codes are not the same as VERA screen codes.

You can see a chart of the PETSCII codes here: https://www1.cx16.dk/cx16-petscii/ and a chart of the VERA screen codes here: https://www1.cx16.dk/veratext/

If you want to write directly to VRAM, you could consider making use VTUI Library which is found here: https://github.com/jimmydansbo/vtuilib
Among other things, it has functions that convert between PETSCII and screen codes.
https://github.com/jimmydansbo/vtuilib# ... me-pet2scr
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
unartic
Posts: 145
Joined: Sat Oct 28, 2023 3:26 pm

Re: Vera and petscii

Post by unartic »

Thanx. That was the information I was looking for. Converting myself will not be a problem :-)

Maybe a follow up question: I want to write directly to vram because in the emulator it is much faster than chrout. I’m developing a text based program with lots of rewrites to the screen.

Can I assume the performance difference will be the same on the real hardware?
User avatar
JimmyDansbo
Posts: 476
Joined: Sun Apr 26, 2020 8:10 pm
Location: Denmark
Contact:

Re: Vera and petscii

Post by JimmyDansbo »

Yes, the emulator performs very similar to hardware.
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
Post Reply