16bit DOS 3D cube in VGA mode 13h

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
386 views
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Nov 14, 2011

Why? just for fun :)
I've installed MSDOS 6.22 and windows 3.1 to an old pentium 166 mmx. Then I've installed every compiler I've ever used: Turbo C, Turbo Pascal 7, Borland C++ 3.1, OpenWatcom, nasm, etc. So I decided I should write a bit of 16bit DOS graphics code for old time's sake in VGA mode 13h (320x200 8bpp).
For this trip to the past I hacked together a really quick and dirty (and incomplete: no clipping or lighting) software renderer with an OpenGL-like API.

Edit: here's a mercurial repository with the source: https://nuclear.mutantstargoat.com/hg/dos3d

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (nuclearthelab)

  • Well, what a coincidence... I've just posted my own rotating DOS cube demo (although I used unchained mode)... didn't expect a video like this to turn up in the 'Related videos' :)

    Nice work!

  • @Scalibq Nice, just saw it. My memory is fuzzy, is that unchained mode the same as mode-x? I've done some mode-x code a few years back on dosbox, and when I tried it on the real machine it blew up :) dosbox is a bit too lenient, always a good idea to try it out on the real thing as well at some point.

    Btw, I've just added a link to my mercurial repository with the source code for this cube in the video info box, just in case anyone's interested.

see all

All Comments (5)

Sign In or Sign Up now to post a comment!
  • @Scalibq Found the bug in my EGA routine btw... EGA compatibility is still very much alive on today's hardware, even the latest DX11 cards from nVidia and AMD.

    I found that nVidia's palette handling for EGA is not entirely correct, but it works well enough.

  • Very interesting, looking forward for more videos like this!

  • @nuclearthelab Depends on who you ask, I suppose. I know mode X as being 320x240 resolution in addition to being in unchained mode.

    Since I stuck to the regular 320x200 mode, and only used unchained addressing, I just call it unchained mode, rather than mode X.

    And I've tested my code in Windows XP from the command prompt as well. The CGA and VGA work there, but EGA doesn't. This may be either because of XP, or because there is no EGA compatibility anymore. Other EGA stuff didn't work either.

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more