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

Refactor vga driver #688

Merged
merged 33 commits into from
Oct 16, 2024
Merged

Refactor vga driver #688

merged 33 commits into from
Oct 16, 2024

Conversation

vinc
Copy link
Owner

@vinc vinc commented Oct 14, 2024

  • Remove vga command
  • Add blank command to blank screen
  • Add /dev/vga/buffer to write the VGA buffer
  • Add /dev/vga/mode device file to change mode
  • Add /dev/vga/palette device file to read or write the color palette

The vga command was obsolete and is now removed. The blank command was added as a basic screensaver and to have two different commands using the VGA driver in 320x200 mode to see how to organize the driver.

@vinc
Copy link
Owner Author

vinc commented Oct 14, 2024

Setting a custom font in text mode will copy the font to a static variable in the VGA driver to be able to restore it when going back from graphics to text mode later instead of having to set it again manually.

@vinc
Copy link
Owner Author

vinc commented Oct 15, 2024

We can now read and write the VGA mode from userspace:

vga-refactor-1 png

Everything that's needed from screen clearing to backup and restoring of font and palette when switching mode is being taken care of by the driver.

@vinc
Copy link
Owner Author

vinc commented Oct 15, 2024

We can now write to the VGA buffer at /dev/vga/buffer from userspace!

The last commit is breaking the device number given to the VGA font device from #653 necessitating to run delete /dev/vga/* and install -y to recreate the device.

@vinc vinc marked this pull request as ready for review October 16, 2024 13:04
@vinc vinc merged commit bac1e92 into trunk Oct 16, 2024
1 check passed
@vinc vinc deleted the feature/vga-driver branch October 16, 2024 13:05
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