PETSCII Keyboard/Driver Support for Development on Modern System

If you have feature requests, this is the place to post them. Please note your idea may already be something we have already discussed and decided against, or something we are working on privately, and we cannot be held responsible for any similarities in such instance. Whilst we cannot respond to every suggestion, your idea will be read and responded to where possible. Thank you for your input!
Post Reply
Starsickle
Posts: 81
Joined: Mon Aug 31, 2020 12:00 am

PETSCII Keyboard/Driver Support for Development on Modern System

Post by Starsickle »


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.


Perifractic
Posts: 511
Joined: Sat Apr 25, 2020 4:53 pm

PETSCII Keyboard/Driver Support for Development on Modern System

Post by Perifractic »

The current WASD Keyboard is fully compatible with VICE on Windows 10 to the best of our knowledge.
Ender
Posts: 220
Joined: Sat May 09, 2020 9:32 pm

PETSCII Keyboard/Driver Support for Development on Modern System

Post by Ender »


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.

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

PETSCII Keyboard/Driver Support for Development on Modern System

Post by SlithyMatt »



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.

Yuki
Posts: 126
Joined: Mon Apr 27, 2020 1:50 am

PETSCII Keyboard/Driver Support for Development on Modern System

Post by Yuki »



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.

rje
Posts: 1263
Joined: Mon Apr 27, 2020 10:00 pm
Location: Dallas Area

PETSCII Keyboard/Driver Support for Development on Modern System

Post by rje »



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.

 

TomXP411
Posts: 1781
Joined: Tue May 19, 2020 8:49 pm

PETSCII Keyboard/Driver Support for Development on Modern System

Post by TomXP411 »



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?

 

Perifractic
Posts: 511
Joined: Sat Apr 25, 2020 4:53 pm

PETSCII Keyboard/Driver Support for Development on Modern System

Post by Perifractic »

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.
TomXP411
Posts: 1781
Joined: Tue May 19, 2020 8:49 pm

PETSCII Keyboard/Driver Support for Development on Modern System

Post by TomXP411 »



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.

 

TomXP411
Posts: 1781
Joined: Tue May 19, 2020 8:49 pm

PETSCII Keyboard/Driver Support for Development on Modern System

Post by TomXP411 »



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. 

 

 

Post Reply