Jump to content
  • Advertisement
Sign in to follow this  
Lode

Mode 13h

This topic is 4814 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is it possible to access mode 13h in linux console? e.g. would it be possible to make one of those neat 256b demos that go to mode 13h in linux.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Lode
Is it possible to access mode 13h in linux console?

e.g. would it be possible to make one of those neat 256b demos that go to mode 13h in linux.
With root priviligies, possibly..
A better bet is to check out svgalib or fbdev and let them handle a few of the compability issues for you.
After initializing svgalib you've pretty much got full access to the VGA registers and video memory, so there's no need to import further symbols just to set the palette for example.

Still, you'll have to waste a significant part of those 256 bytes on elf headers in your executable. LinuxAssembly.org has a tutorial on it.

Linking in SDL dynamically shouldn't be *that* bad either, it should be suitable for 4 kB demos at least.

Share this post


Link to post
Share on other sites
Linux restricts access to supervisor mode, preventing your code from calling the VGA BIOS directly. You could, however, create a bare executable that can be run by any bootloader that can run without restrictions. Anyone with QEMU or Bochs could run the program without restarting.

Alternatively, you could settle for a semi-small executable (<100KB) and do some neat stuff with DirectFB, SDL, and/or GLX.

Share this post


Link to post
Share on other sites
Try looking at sys_vm86. This will launch a 16-bit task where you can access all the ports and BIOS functions (IIRC, I've never tried this function). Perhaps you might also have to call sys_iopl.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!