Jump to content

How to use lowercase PET font?


Recommended Posts

I'm doing something wrong.

I've got a PET font, and a VIC-20 font, both 2K and apparently representing similar PETSCII sets.

I can load either one into the X16, like this:

cbm_k_load(2, 0x0f800);

So far, so good.

Now when I load them, lowercase is uppercase, and uppercase are those graphic chars.  

I solve that by printing the control code to switch cases:

cbm_k_bsout(14); // to upper+lower case

HOWEVER, what that does is switch the X16 back to its built-in Commodore 64 PETSCII font.  It does not get me the PET PETSCII (or the VIC-20 PETSCII if I use that binary instead).

I'm obviously doing something wrong in a simple way.  Can someone tell me what that is?


Edited by rje
Link to comment
Share on other sites

There are a couple of different fonts in ROM bank 6.  Scrolling through it now, I see lower case a starting at C408 for one character set, and lower case a starting at CB08 for a subtly different set. That second one includes a few serifs and features curly braces at CBD8 and CBE8, in the place where square brackets normally go.

So, if you want upper and lower case and curly braces, and a whole bunch of international characters instead of petscii graphics, then copy from C800-CFFF in ROM  bank 6 to 0F800-0FFFF in VRAM. Or just copy the part you probably want most, from CB08-CBF7 to either 0F808-0F8F7 (unshifted characters) or 0FC08-0FCF7 (shifted characters). Those VRAM locations are assuming you're using the default location for the tile data.

Edited by Ed Minchau
  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

Please review our Terms of Use