pcjs/tests/pc/vga
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2015-06-10 16:32:49 -07:00
..
L23-1.ASM Added VGA tests directory 2015-06-10 16:32:49 -07:00
README.md Added VGA tests directory 2015-06-10 16:30:09 -07:00

VGA Tests

To aid in the development of PCjs VGA support, I've started adding some VGA tests to the project. For now, the only "tests" are samples taken directly from Michael Abrash's Graphics Programming Black Book.

Abrash's book is available on many sites, but I'm partial to the Markdown version that James Gregory has made available on GitHub, because (a) it's a brilliant way to share the text, and (b) it apparently has Abrash's blessing, so I feel more comfortable forking it, using it, and resharing it.

The main reasons for my fork: to make the book's images display properly on GitHub, and to extract and add assorted source code listings as I need them. Since that project's /src folder contains just the book's text, I've added a /code folder for the source code listings. The name of each source code file matches the name displayed in the text (eg, L23-1.ASM is Listing 23.1 from Chapter 23).

I assume something similar was done on the CD-ROM that accompanied the Black Book, but since I don't have the original book or its CD-ROM, I'm extracting the source code directly from the Markdown text, and then "tabifying" it with 8-column tab stops.

Development of PCjs VGA support has just begun (June 2015), so don't expect anything here to to run properly yet.


List of VGA Samples from Michael Abrash's Graphics Programming Black Book:


Also, I've updated the PCjs Library disk collection to include the following disk image:

<disk path="/tests/pc/vga/">VGA Tests (Black Book)</disk>

But wait, you say, that path refers to a directory, not a disk image. And that's true; normally the path for a disk entry will refer to either an IMG file or a JSON-encoded IMG file. However, if the path ends with a slash, then it's assumed to be a directory, and so PCjs will ask the server to enumerate the contents of that directory and send back a JSON-encoded disk image containing all the files in that directory (including any subdirectories).

Since the contents of this directory will probably be in flux for a while, I've opted for this approach. Once things settle down, I'll generate a JSON-encoded disk image containing a snapshot of this directory.

I've updated a Compaq DeskPro 386 Machine to use the Library disk collection and automatically load the above disk:

<fdc ref="/disks/pc/library.xml"
     width="340px"
     automount='{A: {name: "PC-DOS 3.00 (Disk 1)",
                     path: "/disks/pc/dos/ibm/3.00/PCDOS300-DISK1.json"},
                 B: {name: "VGA Tests (Black Book)",
                     path: "/tests/pc/vga/"}
     }' />