Suggestions how to convert Commodore charset to Oric

Questions, bug reports, features requests, ... about the Oric Software Development Kit. Please indicate clearly in the title the related element (OSDK for generic questions, PictConv, FilePack, XA, Euphoric, etc...) to make it easy to locate messages.

Post Reply
xahmol
Officer Cadet
Posts: 60
Joined: Sun Jun 28, 2020 7:32 pm
Location: Utrecht, The Netherlands
Contact:

Suggestions how to convert Commodore charset to Oric

Post by xahmol »

After doing no programming at all for decades I have recently reinstalled my old Commodore 128D and re-acquired an Oric Atmos as I also used that machine a lot in the past.

Just for fun started out to port one of my old C128 basic programs to the Oric. My old Commodore BASIC program used a redefined charset for most of its graphics, so first thing I wanted to do is to convert this to an Oric charset.

However, I quickly rediscovered that where the Commodore uses 8x8 bit characters, the Oric uses 6x8.

Any clever ideas what is the most efficient methods to convert the 8x8 original to a 6x8 without redoing everything dot by dot?
I have exported the original Commodore charset to a PNG, can also export it to hex codes or decimal codes. Any tools recommended to efficienctly edit that to create 6x8 chars?

(BTW: did already found this: https://osdk.org/index.php?page=articles&ref=ART8
Also read the Charset articles on this forum. But did not found a clue how to start with a PNG that has 8x8 as basis)

User avatar
Dbug
Site Admin
Posts: 3400
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: Suggestions how to convert Commodore charset to Oric

Post by Dbug »

Well, 8x8 to 6x8 is always going to result in issues, so it's kind of hard to automate.

I suppose it's the full character set with the PETSCII characters, like on this picture?

Image

xahmol
Officer Cadet
Posts: 60
Joined: Sun Jun 28, 2020 7:32 pm
Location: Utrecht, The Netherlands
Contact:

Re: Suggestions how to convert Commodore charset to Oric

Post by xahmol »

Yup.
Understand that it can never be fully automated.
Just was wondering if there are tools out there that can use 8x8 bit as input to be tweeked manually to 6x8 without starting from scratch.
Even if the import just drops the highest two bits it would already be helpful as starter.

xahmol
Officer Cadet
Posts: 60
Joined: Sun Jun 28, 2020 7:32 pm
Location: Utrecht, The Netherlands
Contact:

Re: Suggestions how to convert Commodore charset to Oric

Post by xahmol »

I assume that if I use the Picconv tool in OSDK on the PNG it shifts all over the place as it takes 6 bits per chat instead of 8?

Of course apart from not mapping to the right character as PETSCII order differs?

Was thinking in converting the raw hex file to a file with a TAP header and than use that as input for the Char Editor in another topic here. Did not have time to try yet.

User avatar
Dbug
Site Admin
Posts: 3400
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: Suggestions how to convert Commodore charset to Oric

Post by Dbug »

Actually, there are other things to consider, like for example the fact that the Oric displayable charset only has 96 characters for the STD charset (Standard) and 64 for the ALT (Alternate) if you are not cheating.

Pictconv assume that the source picture is in Oric format, so it will take data 6 by 6 pixels.

I guess technically what you could do is to "pixel resize" your source image from "Width" to "Width*6/8" in a painting program, then using a 6x8 grid in your painting program look at the characters one by one and fix them manually.

Alternatively, you could implement your own text drawing routines in HIRES mode, giving you a 30x25 resolution with 8x8 characters, but obviously that would quite slow because of the masking on byte boundaries, but that would allow to use all of your 256 characters.

Another approach, is to still use HIRES, but use 6x6 characters, it's faster to draw, you would get a virtual resolution of 40x33 characters, the big advantage being that you have square characters so things like diagonals would be recognisable.

xahmol
Officer Cadet
Posts: 60
Joined: Sun Jun 28, 2020 7:32 pm
Location: Utrecht, The Netherlands
Contact:

Re: Suggestions how to convert Commodore charset to Oric

Post by xahmol »

Well, was trying to avoid HIRES, as that would really need completely rewriting the Commodore BASIC source....
Was trying to start with something simple 😉 converting from Commodore 128 BASIC to Oric BASiC seems doable.

Have learning C for OSDK and 8bit-unity on my to do list, but that is a long term plan.... Have coded in Borland C++ in my university years, but that is 25 years ago....

So wanted to start simple in BASIC again with some of my BASIC sources from the past. But used adapted charsets heavily at the time.

Can live with a more limited number of chars to be used.

Almost thinking now to write a simple PC program to give per char the option which two vertical bit lines to drop as basis to edit further. Must be doable (if I find time somewhere).

But thanks for the pointers so far. Trying to shrink in a paint program to 6/8 and see what happens might be useful as well.

Post Reply