Skip to content
This repository has been archived by the owner on Dec 24, 2020. It is now read-only.

Aspect Ratios and Font Scaling

Compare
Choose a tag to compare
@jeffpar jeffpar released this 02 Apr 21:34
· 3211 commits to master since this release

This release provides more consistent aspect ratios for all the display configurations used by all PCjs predefined machines. The MDA and CGA configurations now use a 1.6 aspect ratio, EGA configs use 1.83, and VGA configs use 1.33. These values are not based on extensive scientific research of early PC monitor and video card characteristics -- I leave that exercise for another day and/or another developer more motivated than me -- but rather on a combination of each card's maximum resolution and what "looks good."

Aspect ratio is display width divided by display height, but the choice of aspect ratio is complicated by the fact that none of the early IBM video card/monitor combinations (with the exception of the VGA) displayed square pixels, and (with the exception of the MDA) they could display text and graphics at a variety of resolutions. Moreover, it's difficult if not impossible for a web app to determine your current monitor's aspect ratio.

So, for those users who either 1) don't like the aspect ratios that PCjs has chosen, or 2) just want to squeeze or stretch a machine's screen a bit more, there is now an experimental aspect parameter you can append to the URL of any page containing one or more PCjs machines.

For example:

http://www.pcjs.org/disks/pc/dos/ibm/1.00/?aspect=2.0

will modify the height of the machine's screen to conform to the requested aspect ratio of 2.0. The screen should still be responsive to any browser resizing while still retaining that aspect ratio.

In addition, CGA 40-column video modes are now scaled to fill the screen, provided scale="true" is set in the machine's <video> configuration element.

Finally, I also made some tweaks to the website, as GitHub Pages renders it. Pages now display breadcrumbs, in the form of a DOS directory string, to give you a better sense of where you are within the site. Unfortunately, not all folders contain a README (yet), so some intermediate folders may take you to the generic "Page Not Found" page, but I'll get everything tidied up someday.

I've also replaced the google-analytics.html file in the master branch with an empty file, so that if other folks clone the repository and fire up a local copy of the Jekyll web server, their requests won't be pinging Google.

There are probably other files like that (i.e., files, or contents of files, that should only exist in the gh-pages branch), and I've tried to start addressing this by creating a .gitattributes file:

_includes/google-analytics.html merge=ours

and updating my git config:

git config --global merge.ours.driver true

but it remains to be seen if future merges of master into gh-pages will actually preserve files like google-analytics.html. It certainly didn't on my first attempt, but there's some speculation that "fast-forward" merges don't go through the merge driver process. Obviously, this is something I'll have to keep an eye on.


Oh, one more thing: I added a "Save HD" button to selected machines, as an experimental means of saving a machine's hard disk, presumably after you've made changes that you want to keep. There's currently no way for you to upload an entire hard disk image to a machine, so the main use for this feature is to mount the hard disk image (.IMG file) on your local operating system.

I've tested the "Save HD" feature in Firefox, and it works well. Chrome, not so well (the download fails with a less-than-useful "Network Error" message). However, I'm using Chrome Canary, so perhaps older, more stable releases work better.