Jump to content
  • 0
Starsickle

PETSCII Keyboard/Driver Support for Development on Modern System

Question

Just a thought I've had: I'm currently developing on Windows 10, and if I were either a contributor to a github project or using modern tools, I'd benefit from access to the X16's PETSCII Keyboard plugged into the computer while coding or developing.

Would this be possible under the current design? Would it require special drivers or application?

I believe a lot of hardship can be eliminated by allowing the keyboard to work on modern systems in any case. And with less hardship, more software.

Example:

  1. Plug in the X16's Keyboard into my W10 System
  2. <Punch The Keys, For Gods' Sake!>
  3. Get PETSCII Characters just like I would natively.

Share this post


Link to post
Share on other sites

9 answers to this question

Recommended Posts

  • 0

This sounds more like a software problem than a hardware problem. If you just install a PETSCII font on your system, you should be able to get PESTCII characters (assuming that one exists, I haven't looked it up).  A special keyboard shouldn't even be necessary, besides the convenience of looking down and seeing what the key will type before typing it.

Share this post


Link to post
Share on other sites
  • 0
1 minute ago, Ender said:

This sounds more like a software problem than a hardware problem. If you just install a PETSCII font on your system, you should be able to get PESTCII characters (assuming that one exists, I haven't looked it up).  A special keyboard shouldn't even be necessary, besides the convenience of looking down and seeing what the key will type before typing it.

PETSCII is not compatible with Unicode, so a modern PC won't be able to use it directly, like in a PETSCII text BASIC program. The keyboard will work with the X16 emulator, so you'll get PETSCII within that, just like you would for VICE. For cross development from Windows/Mac/Linux you will need to write your source in Unicode, which means looking up the screen codes for PETSCII graphical characters and putting those in your source.

Share this post


Link to post
Share on other sites
  • 0
11 minutes ago, SlithyMatt said:

PETSCII is not compatible with Unicode

It's compatible starting from Unicode 12, but you'll still need to install a font and do some serious keyboard remapping. Some fonts also have a PETSCII mapping in the Private Use Area.

  • Like 1

Share this post


Link to post
Share on other sites
  • 0
2 hours ago, Perifractic said:

The current WASD Keyboard is fully compatible with VICE on Windows 10 to the best of our knowledge.

Yes, it works nicely.

 

  • Like 1

Share this post


Link to post
Share on other sites
  • 0
9 hours ago, Perifractic said:

The current WASD Keyboard is fully compatible with VICE on Windows 10 to the best of our knowledge.

It's not quite compatible with either of the default keymaps. The Pi key, [, ], and \ keys, RunStop , and Restore keys are all different. (I like that there's a separate ESC and Run/Stop key. I wish the emulator would be updated with these keys.)

Do you have a VICE keymap that works with these keys?

 

Share this post


Link to post
Share on other sites
  • 0
It's not quite compatible with either of the default keymaps. The Pi key, [, ], and \ keys, RunStop , and Restore keys are all different. (I like that there's a separate ESC and Run/Stop key. I wish the emulator would be updated with these keys.)
Do you have a VICE keymap that works with these keys?
 
Hmm that's different to my understanding. Let me check into that a little.

Share this post


Link to post
Share on other sites
  • 0
10 hours ago, Starsickle said:

Just a thought I've had: I'm currently developing on Windows 10, and if I were either a contributor to a github project or using modern tools, I'd benefit from access to the X16's PETSCII Keyboard plugged into the computer while coding or developing.

Would this be possible under the current design? Would it require special drivers or application?

I believe a lot of hardship can be eliminated by allowing the keyboard to work on modern systems in any case. And with less hardship, more software.

Example:

  1. Plug in the X16's Keyboard into my W10 System
  2. <Punch The Keys, For Gods' Sake!>
  3. Get PETSCII Characters just like I would natively.

I'm not sure what the issue is... are you trying to get PETSCII characters in a native Windows app, or in the emulator?

The keyboard is actually a standard Windows keyboard - so it needs no driver support. If you press the ~ key on your PC keyboard while running the emulator, you'll get the left arrow. Shift that and you get the Pi symbol.

Now if you want to get PETSCII in a Windows program, you need to do the PETSCII to ASCII translation in your program.

To get started, you should download the C64 font by Style, here: https://style64.org/petscii/

Then look at the PETSCII mapping and figure out how you want your program to store text. The most common way is to use a PETSCII byte stream, then translate the code in the display layer to look like PETSCII glyphs. The simple way to do this is to add $E0 to each character when you draw it on the screen.

You'll still need to do some translation and custom keyboard handling, though: the C= glyphs on the keyboard all need to be handled through a Win key chord, and those characters are not in the same order as the letters they live under. (C= A and C= E are actually next to each other in PETSCII, which makes no sense looking at the keyboard. But it does make sense looking at a PET keyboard...)

So you'll need to address this with a translation table in your editor. Which you'll have to build. Or  you can write a text editor for the CX16 and run it in the emulator. That's what I'm planning on doing.

 

Share this post


Link to post
Share on other sites
  • 0
14 minutes ago, Perifractic said:
16 minutes ago, TomXP411 said:
It's not quite compatible with either of the default keymaps. The Pi key, [, ], and \ keys, RunStop , and Restore keys are all different. (I like that there's a separate ESC and Run/Stop key. I wish the emulator would be updated with these keys.)
Do you have a VICE keymap that works with these keys?
 

Hmm that's different to my understanding. Let me check into that a little.

The letter keys work fine, but the graphic symbols don't map out correctly. This is partly a VICE limitation, since you simply can't represent certain combinations of characters when remapping keys. for example, the [ and ] keys cannot be made to work as [ and ] while also printing the graphic symbols, because [ and ] are already shifted characters. This is a limitation in VICE that I have not been able to work around. 

 

 

Share this post


Link to post
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.

Guest
Answer this question...

×   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