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

2D display buffer abstraction #1

Open
nicholatian opened this issue Mar 3, 2021 · 0 comments
Open

2D display buffer abstraction #1

nicholatian opened this issue Mar 3, 2021 · 0 comments

Comments

@nicholatian
Copy link
Member

Aquefir’s OAMAS project will require a 2D canvas. Such a feature is general enough IMO to warrant inclusion into Neopolitan, especially considering how strange supporting this with an APE will be.

Generally, this is the outline of how it will work:

  • On *DOS, this will abstract (S)VGA, possibly with “Mode X” support;
  • On Linux without X11, this will abstract the framebuffer itself (/dev/fb*);
  • On Linux with X11, this will talk to X11 over-the-wire;
  • On *BSD and other Unices with X11, this will talk to X11 over-the-wire
  • On macOS, this will talk to X11 over-the-wire via XQuartz; and
  • On Windows, this will use the Windows API canvas.

*BSD and other Unices may have second-class framebuffer support where feasible if X11 is unavailable. This must be explored and decided on a per-kernel basis.

From here, I will be researching the X11 wire protocol and writing a driver for it for the display buffer to use. It will provide a 2D canvas of arbitrary size with up to 24-bit RGB colour support. Colours may be less, but Mode X ensures it is possible to have 24-bit RGB even on *DOS. Mode X support will be opportunistic and with regard to the (S)VGA standards, whether de jure or de facto.

macOS is the thorniest of the systems to support, but the good news is Apple forked off X11 support some time ago and graciously handed it to the open source community, meaning it is an easy package-install away for most users. No verdict from us on Apple M1 support for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant