-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vamos does not interpret AmigaOS escape sequences #166
Comments
Whats happening here is that vamos sends the raw output of the program to stdout and then to your terminal emulator. There the interpretation happens: in a modern UTF-8 terminal the byte sequences are assigned differently that in latin-1 the Amiga uses. So a workaround here is to change the charset in your terminal to latin-1. Another more convenient solution is to perform a conversion in vamos of the 8-bit ANSI control chars to their 7-bit ESC notation that is understood by modern UTF8 terminals as well. However this needs some infrastructure in vamos namely a distinct console handler like output because the conversion should only applied on this path (and not e.g. for file output). |
Some time ago I tried to find a terminal emulation which understands the Amiga escape sequences, but didn't succeed. A solution for this problem would be welcome. |
I can confirm that this is not a latin-1 issue. Well, I should say, switching both LANG and the GNOME terminal's encoding to iso8859-1 did not make a difference for these control characters. I had tried something like this, but it didn't make a difference either:
|
The above approach wouldn't work since sys.stdout is the text stream with encoding (that defaults to utf-8). You have to adapt the underlying raw stream. But to validate the initial assumption, lets try this: Create a short sample text with both normal esc and cs0 codes:
Passing these through vamos creates unaltered results (as expected):
Now what happens when these codes are printed to a terminal... And voila: looks good to me: |
Bizarre. I do the same thing on Ubuntu 21.10 and color1.txt works fine while color2.txt does not. BTW, the behavior is the same here regardless of the encoding.
I tried xterm which behaves like you suggest, and konsole, which also behaves that way after switching to ISO8859-1. So I assume I have to go debug my gnome-terminal instead of filing bugs here. Sorry for the noise ;) |
Back in the time a created some termcap/terminfo entries for the Amiga to have better remote shell support. I guess that would be the right approach. I have to check it out for myself, but if someone wants to try it out for himself, I will attach the terminfo variant |
With this one, and after adding the following like, I am getting no more weird characters in my output: |
Escape sequences like 9B 4B or 9B 4A are entirely ignored in output, leaving to interesting artifacts:
vamos -c /home/reinauer/project/vamosrc -- hx68 -A magic.asm -oobj/magic.o -iinclude:
�F�KAssembled magic.asm to obj/magic.o.
The text was updated successfully, but these errors were encountered: