DOS: Graphics Editor Completed, and VESA

Posted by Mega on April 28, 2018, 7:31 a.m.

I 'finished' my graphics editor yesterday. Got saving and loading working, and can now produce usable art for the game.

There are still a few comfort features to add, such as flood-fill, copy/paste, undo, etc, but for the moment I have something to work with and get get to work on the other things I have to work on.

Here's a couple of test images I threw together in the editor over the past couple of days:

Still using the default palette. I intend to implement a simple HSL slider palette editor next week, so I can choose my colors instead of trying to work with the default VGA palette.

Multi-frame saving/loading also works as intended, so the editor is "feature complete" so far as core functionality goes.

But now, I promised VESA shenanigans earlier this week…

VESA shenanigans

Now this was a can of worms to open.

So VESA. Holy crap is it hard to do anything with VESA in Real Mode.

The extent of what I was able to do was get into 1024x768x32 mode so far, and get a pattern on-screen:

This came at a great cost though: Clobbering DOS' memory pages. I have to restart the VM every time I test this.

You'll notice some strange lines on the left hand side of the screen if you look closely. That's DOS, trying to write into the same heap I allocated.

The biggest issue here is that the mode I chose, 1024x768x32, is not well suited for 16-bit programming. It takes 3.1MB of RAM to create a backbuffer, which I need because trying to blit directly to the VGA controller is slow.

Next week I intend to test out the lower bit modes (8bpp and 16bpp) as well as 800x600 mode, see which is the most workable in Real Mode DOS, then start working on a simple graphics library for that. Nothing fancy, I just want to render small bitmaps really (Bitmap fonts).

Might also look into VESA text modes, see how readable they are. But given the nature of the default VGA fonts, I'm not expecting much.

Otherwise, not much done this week besides the push to complete the graphics editor, besides my day job(s).

If I can sort out the VESA nonsense by the end of next week, I'll write a more in-depth wall of text detailing how it works, how to use it, etc.

If I still absolutely can't do it with Real Mode, I'll install a DPMI system and use that.

Until next week!

Comments

NeutralReiddHotel 5 years, 11 months ago

that image is breaking my eyes, as neat as it looks.

Good job on that image editor