Closed irmen closed 1 year ago
I don't know why x16emu goes through the trouble of converting a character before actually printing it? (print_iso8859_15_char) Just putchar'ing it to the console works fine?
This converts the byte (X16's ISO format) to UTF-8 for display on the console, assuming the console's encoding is expecting UTF-8.
ok I don't know how to do that in box16, I couldn't find a routine like this in the source code and was reluctant to just copy the whole .c file
In x16-emu, this routine is also used to convert filenames for hostfs, as well as for -echo in iso mode. Box16 appears to have the function available in the iso mode of -echo, see hypercalls.cpp
Yes, I suppose it would make sense to pull the implementation out of there (see lines 331-355) and put it in its own function, perhaps as "print_petscii" in unicode.cpp/.h or something, so it can be called from either the hypercall hook or the memory register.
There was actually already an existing print_iso8859_15_char function in unicode.cpp already. Don't know why my initial search didn't find it.
Mimics recent additions to x16emu.
2 notes: