-
Notifications
You must be signed in to change notification settings - Fork 108
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
Schneider Euro PC #1748
Comments
Hello @Vutshi,
No. When the console is in text mode, the CGA/EGA/VGA uses the video memory contents as byte indices into a character ROM contained on the video card. (Every other byte is actually a screen attribute, so the memory is displayed per memory word). There are two things going on here, which likely need to be separated in order to fully understand the problem. There is keyboard input, which produces a byte sequence, and then there is console output, which works as described above, essentially writing the received unconverted byte directly into video RAM and the hardware displaying the character glyph. The keyboard input works through IRQ 1, which the scancode keyboard driver then looks at with the combinations of shift/ctrl/alt to produce a keyboard input byte and shift status. Thus, the keyboard scancode is converted to an input byte code, which may or may not match the character ROM on the video card. In your use, I am assuming you have configured for German scancode keyboard (CONFIG_KEYBOARD_SCANCODE and CONFIG_KEYMAP_DE, pease check). Here are the German tables. These will need to be somewhat painfully checked in order to change the keyboard input (and yes, they're in octal, who knows why). The issue with the two shells displaying different characters is probably complicated, but I would guess When using the BIOS console rather than direct console, it is entirely possible that the BIOS is translating characters, so we should probably leave that out of the equation for the moment. I now ask: does ELKS configured for German work well on other PCs? It would be an interesting comparison. Thank you! |
The mapping of byte codes for the keyboard as well as the console to the displayed glyph is referred to in total as a code page. The code pages for most US systems is CP 437, while some Western European systems use CP 850. These references will come in helpful, even by creating a binary file with a few of the different codes in it, to give us an idea of what the Euro PC is using for its output code page. If documentation can be found regarding the code page, that would be great, otherwise the tables will be very handy to fill in many of the problems without having to test each one. |
Hi @ghaerr
In QEMU the German layout works very similar to the Euro PC: Here I typed in every number-letter key rows separated by a space |
I think I see what is going wrong. In the ELKS German table there are characters like |
It seems like |
Good catch, I hadn't noticed but now see an encoded ö in the file. That's certainly a problem.
Yes, that would be great to use hex rather than octal. As far as file encoding, straight ASCII or UTF-8. The tables themselves should only use hex, with UTF-8 encodings only used for comments within The use of hex within the mapping tables will greatly help comparing the tables with the modern code page tables. I would guess these tables have been around for 20+ years and were created before UTF-8 was standard. |
Another question about expected keyboard behavior. |
To be fair, I don't fully know what's best because I don't use DOS and have very infrequently use key combinations to come up with say, Western European character codes. As far as ELKS OS itself, the console was coded to use ALT-F1/2/3 to switch between console but I changed that to Alt-1/2/3, to keep function keys out of the equation.
The scancode driver is quite complicated, so beware when making changes to things other than table entries. I would say that the DOS behavior seems more reasonable, as it becomes quite clear which special key combinations do something, versus just operate the same as without the combo, and might be easier learned. Do you happen to know what Linux does in these cases (I'm on macOS)? You're welcome to submit a change to make operation more like DOS in this respect. It also seems the tables might be easier to maintain. |
Try running
0x15 is also a ^U which is in ASCII. I'm pretty sure
Good. |
This also could possibly be an internal sign-extension problem, using |
This is a very likely explanation. I made a binary file with all bytes starting from
Here is the bin file for discovering the code page |
what should I use? |
I see. I will make a new Unix friendly test file tomorrow. |
Here you go. Easily converted using Both edit and kilo now show the right edge correctly, but kilo's problems remain. |
I have identified the display problem in kilo.c:
The code later displays '?' for non printable characters. The problem is in the C library
The high bit is ignored and all characters less than 32 are "non-printable". It matches the ASCII control-characters. I'll look into changing just kilo for now as |
Thank you for fixing isprint, now everything works as expected (well, almost, but we will come back to it later). At the moment, I am implementing RTC M3002 support in Best |
Great! You're still going to submit a PR at some time for the keyboard changes, right?
That's because peekb isn't implemented for user programs, only the kernel. I recommend using a __far pointer, and setting the segment and offset using Use something like the following (modified for
There's another use example in elkscmd/basic/host.c. |
Hello @Vutshi, Would you like to post the source to your modified German keyboard file? I'd be happy to add it so that ELKS is up-to-date with your enhancement. Same thing for RTC M3002 support if you ever finished that. Thank you! |
Hi @ghaerr , Apologies for not responding earlier. I’ll definitely add support for the Schneider PC, but it’ll have to wait until summer. Right now, I’m busy working on the future of computing, so past has to wait;) The progress on ELKS is impressive, and I’m eager to try out the new improvements. Best |
@Vutshi Is the support for Euro PC fully integrated in ELKS? |
Haha! Yes, @Vutshi was going to send us a fix or two, I do remember something about a keyboard file fix... A diff file or just the source files themselves are fine, if you don't have much time. :) |
I am thinking of buying one :) |
No, not yet :). I am stuck with a prototype of RTC driver written in Basic. Also some keyboard improvements are necessary which are not in a good shape for PR. But overall it is a very high quality device. One of my favorite. |
Although ELKS works quite well on the Euro PC. I remember @ghaerr fixed wrong size cursor and maybe something else. |
Description
ELKS needs some adjustments to work better on this machine.
Configuration
The text was updated successfully, but these errors were encountered: