Thursday, 23 April 2026

Personal Nightmare's CGA Mode

Recently I discovered that Personal Nightmare for DOS shipped with a CGA mode in glorious bubblegum tones.

Aside from a mention on the original box and in the manual, there’s basically no trace of it online. The GOG version doesn’t expose it at all, and without the original installer there’s no obvious way to enable it.

I've got the original US Box Office release, and after digging into the executables it turns out this mode is still fully functional in the GOG version, it just needs a bit of manual setup

Enabling CGA Mode

If you have an original copy of the game, you can enable CGA with a few steps:

  1. Edit PN.CFG so it contains:
0001 0000 0000 0000 0000
  1. Run UNPACK.EXE and let it finish

NOTE: The unpack step is destructive, so don’t run it from floppy disk or on your only copy.

  1. Launch TEST.EXE

At this point, the game will run in CGA mode.

How the Game Switches Modes

TEST.EXE checks a value loaded from PN.CFG and branches depending on whether CGA is enabled:

cmp [70DC], 0

[70DC] == 0 → EGA mode
[70DC] != 0 → CGA mode

What UNPACK.EXE Does

Despite the name, UNPACK.EXE isn’t just decompressing files, it performs a graphics conversion pass.

The original game assets are designed for EGA, while CGA only supports 4 colors. To make this work, the game processes the graphics and rewrites them into a CGA compatible format.

After this step, the files are permanently changed, which is why the you shouldn't run it on your only copy and certainly don't run UNPACK.EXE directly from the floppy disk(Don't say I didn't warn you!)

ScummVM

My goal is to add proper CGA support for this game to ScummVM without requiring users to run UNPACK.EXE or modify their data files.

Instead, the conversion will happen at runtime, preserving the original data.

NOTE: If running in DOSBOX or on original hardware, you may need to patch 72.OUT prior to running UNPACK.EXE manually to fix a corruption bug in the Vicarage data. The GOG version already ships with this fix and ScummVM patches on the fly. Documented here: https://sanguinehearts.blogspot.com/2009/05/personal-nightmare-72out-ips-patchfor.html

TLDR: Change the byte at position 53714(D1D2)in 72.OUT from 0x20 to 0x40, if that is already the case then you have a working copy.

Technical Note

As with Elvira I and Elvira II, the game executables are packed using EXEPACK.

Monday, 13 April 2026

AGOS

Recently I've submitted PR's for Personal Nightmare Amiga and Elvira II for the Atari ST. Personal Nightmare was being rendered identically to the Atari ST version, but the original was taller and used the Amigas Topaz 9 font at double height. ScummVM now better matches the original, though it's still not 100% identical.
Original game in an emulator:

Before:

After:

I noticed that Elvira II for Atari ST was displaying with the wrong colours in ScummVM. This mainly affected the top UI areas but there were also some slight differences in the room art.
Emulator screenshot:
Before:
After:


I received a bug report related to the Atari ST music for Elvira I, initially my implementation was based upon the US English release where the PRG was named: ELVIRA.PRG, however the European releases understandably have different PRG files that I had not accounted for. It appears as though some of them were packed with Pack Ice compression. I've managed to implement depacking for this and the music plays in all releases that I've been able to verify.

I've also made some decent progress with my attempts to support Elvira I and II DOS EGA mode. For a long time I was hung up on the full screen image for the game title screen, but this now renders correctly too, it seems the EGA releases actually load a different title screen, despite the fact that the rest of the game uses the same graphics data as the VGA version. Interestingly, the game launched in Europe with EGA support but the US English version does not have the EGA ICONS.EGA or the SETUP.EXE that allows you to choose between VGA/EGA/Tandy.

I've also started looking in to the missing palette fade functionality that Personal Nightmare has for the day/night cycle on Amiga and Atari ST, I'm hopeful that I can re-implement this without too much issue.