Import/Export (logger port) of BASIC code with special characters (different encodings)

By Fabrizio Caruso

Supporter (1)

Fabrizio Caruso's picture

04-02-2020, 11:47

Hi
It seems that it is not possible to import BASIC listings containing special characters even if they are created through the logger port for the printer.
This would be easily possible if the logger and input text used the same encoding.
The idea is to be able to do something like:
1. you just use the native editor to enter special characters
2. you export the listing through LLIST to a file (logger port)
3. you edit the rest of the list on the PC
4. you import it with "input text"
Emulators such as Altirra (Atari) and the newest JavaCPC (CPC) do this by having compatible encodings.

This is very useful if using special characters to encode data in strings.
For example this feature is necessary for BASIC 10-liners. Unfortunately the MSX coders do not have this posibility.

Login or register to post comments

By Manuel

Ascended (16037)

Manuel's picture

05-02-2020, 00:03

See https://www.msx.org/forum/msx-talk/openmsx/printer-logger-as...

Not sure what you mean with 'having compatible encodings'... the MSX characters set is machine dependent, the way you type the characters too. And not all MSX characters have a symbol in Unicode (but people are working on that in a future Unicode version).

By pgimeno

Resident (62)

pgimeno's picture

05-02-2020, 00:22

Maybe you can use https://notabug.org/pgimeno/vdptest/src/test-vram/asc2cas.py to convert the raw BASIC file to .CAS and feed it to the emulator.

By Manuel

Ascended (16037)

Manuel's picture

05-02-2020, 00:25

Such a file can also be directly loaded into the MSX, e.g. using dir-as-disk.

By thegeps

Champion (356)

thegeps's picture

05-02-2020, 00:57

Hi, Fabrizio have same request as mine. We discuss this problem today and both write here for a solution (we are about to race in a 10liner contest). But as I told you two sec ago answering in my thread we can achieve the result by using dir as disk and saving/loading from emulator, editing ASC chars to fit our needs. They will appear weird on notepad, opened from pc, but will be fine when reloaded in openmsx (so we can show the code in a file that can be loaded and executed by the emulator)