Skip to content
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

Add VgaFont device #653

Merged
merged 10 commits into from
Sep 13, 2024
Merged

Add VgaFont device #653

merged 10 commits into from
Sep 13, 2024

Conversation

vinc
Copy link
Owner

@vinc vinc commented Sep 12, 2024

A new device in /dev/vga/font will allow setting the VGA font from userspace. After that we can deprecate the whole vga command and remove it in the next version of MOROS.

@vinc
Copy link
Owner Author

vinc commented Sep 12, 2024

There's an issue when doing read /ini/fonts/zap-light-8x16.psf => /dev/vga/font because read try to convert the file to unicode before printing it to the screen:

vga-font-bug

And copy doesn't work for device files.

@vinc
Copy link
Owner Author

vinc commented Sep 12, 2024

This change will allow writing to devices.

We could also replace copy with a lisp script doing the following at its core:

(write-binary (second args) (read-binary (first args)))

@vinc
Copy link
Owner Author

vinc commented Sep 12, 2024

This change allow reading binary files, so we can now do:

> read /ini/fonts/zap-light-8x16.psf => /dev/vga/font

In addition to:

> copy /ini/fonts/zap-light-8x16.psf /dev/vga/font

I'm not sure that the latter is the right thing because we could also expect the source to replace the destination instead of writing to it when it's a device file.

@vinc vinc marked this pull request as ready for review September 13, 2024 13:35
@vinc vinc merged commit 6561184 into trunk Sep 13, 2024
1 check passed
@vinc vinc deleted the feature/vga-font-device branch September 13, 2024 14:54
@vinc vinc mentioned this pull request Oct 15, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant