PCem doesn't have TAS tools, but it works well in libTAS, so it's otherwise quite TASable at this point. In addition to running DOS, it can run Linux and early Windows, along with various environments like Flash or Java.
- To set up PCem for general use, see this guide.
- If you want to use PCem for DOS TASing, we have pre-made configurations available. Look here for information on setting up for DOS.
- If you want to use PCem for Windows TASing, you can run our Windows XP installation movie.
- Please read our submission rules regarding PCem in libTAS.
Table of contents
What you'll need
- libTAS 1.4.2 or newer.
- PCem 17+st-1 or newer. This fork has some modifications to make parts of PCem single-threaded. The normal build of PCem will have determinism issues.
- Remember that the run must sync on an official emulator version or it will not be accepted.
confirm_on_stop_emulation = 0.
- ROMs for PCem. These are for the different chipsets that PCem supports. We can't link them here, you'll have to get them yourself. You can find the ROM names for each piece of hardware in the PCem readme. Put the ROMs into
~/.pcem/roms/(this path can be changed by editing
- Note that the Linux port of PCem is case sensitive, pay attention to the exact ROM filenames in the readme.
- A bootable floppy disk image or bootable CD. If you're setting up for DOS or Windows, you can use this modified boot floppy from JPC-rr, it has CD support added and is fully redistributable. Get the disk here
- Have a game in mind when you start this guide. You can either have the game pre-installed in a folder and/or have the installation media for a game and/or OS (floppy images or ISOs are fine).
Installing your game
You may install your game either from original install disks or a folder containing the pre-installed game.
In the .cfg file for your setup, set
cdrom_drive = 200 and
cdrom_path = /full/path/to/name.iso.
- PCem handles paths with spaces fine, but they should not be put inside quotes.
Installing from original media
If you need to use multiple disks, see this section for how to change disks within a movie.
Try to use original unaltered versions of your disk images if possible. You can verify the authenticity of floppy images by checking the hashes on Good Old Days (incomplete, but has quite a lot) or if you're using CDs you can reference redump.
Using pre-installed version
Put all the files into one folder. Files not necessary to run the game, such as readmes and order forms, can be omitted if desired.
- Do not include custom files that we will not be able to reproduce, such as personal save files and high score tables.
Make an ISO of the game files by executing this bash script in a Linux terminal.
When the operating system boots, you should copy the game files to the
- In DOS, use this command in the DOS prompt:
copy d:\*.* c:or
xcopy d:\ c:\ /eif there are subdirectories (you can buffer these inputs while FreeDOS is loading).
- On Windows, just use the file explorer to copy the files to Desktop.
If the game comes with a setup utility, you may need to run it to set up proper graphics.
Using libTAS with PCem
Very important sync notes
Closely follow the guides in this section to prevent desyncs!
- Synchronization of your movie depends on the following file types:
- If Runtime -> Prevent writing to disk is unchecked in libTAS, PCem will change your files, which will cause desyncs.
- If you change those files yourself outside of libTAS and PCem, it will also cause desyncs.
- All modifications to the hard drive need to be done within a libTAS+PCem movie!!!
- Do not modify the hard drive image outside of PCem! Different methods of mounting the image and copying files onto it can result in different file structures which can result in desyncs.
- Do not make unnecessary writes to the hard drive image! Seemingly harmless operations like making an empty folder and deleting it will cause desyncs.
- Always start with the hard drive image from one of our official packages.
- Back up the Windows XP HDD so you don't have to run the installation movie every time.
- Use full paths everywhere.
- Since paths will be different for different users, we use a placeholder
/full/path/to/file.extpath in our guides. It is always meant to be substituted with whatever your actual full path to a given file is.
- Since paths will be different for different users, we use a placeholder
libTAS needs some very specific settings to work with PCem, so read this section carefully.
- Set the game executable to the full path to pcem, usually
- Set the command line option to
--config /full/path/to/config.cfg, substituting the path of your
.cfgfile appropriately. Use the full path, do not shorten it with
- Set the frames per second to 100/1 (PCem only runs at 100fps).
- Make sure Runtime -> Recycle threads is unchecked.
- Make sure Runtime -> Savestates -> Incremental savestates is unchecked or savestates may not work.
- Make sure Runtime -> Prevent writing to disk is checked.
- If your movie is going to contain a machine reboot using libTAS's Restart input, contents of PCem files in memory will still be written to those files on disk, even if you have Prevent writing to disk enabled.
The right-click menu in normal PCem bugs out in libTAS, presenting a problem when swapping disks is needed mid-TAS. Keylie has kindly coded in hotkeys to the TASVideos build of PCem to solve this.
To specify the list of disks you want to use, you need to manually put them into the .cfg file where the disk path would normally be. The list should be the paths of the disks delimited by semicolons.
For CDs, for example, you should specify
cdrom_path = path1;path2;path3;etc... Also set
cdrom_drive = 200, otherwise this will not work.
For floppy drives A: and B: respectively, specify
disc_a = path1;path2;path3;etc... and
disc_b = path1;path2;path3;etc...
The following hotkeys control disk swapping.
- Floppy drive A:
- Floppy drive B:
Left: Select previous disk in list
Right: Select next disk in list
Down: Load selected disk
- Loading is required after you've selected the disk you need.
Up: Eject current disk
The messages for disk selections and loading will be displayed in the console window.
- Make a quick test encode to make sure your sound is working. libTAS will make many video segments so make sure you open and listen to the correct one.
- Avoid loading a savestate made before a resolution change; this can cause desyncs, crashes, or just mess up the display.
- CD reading can break or desync if you load a savestate made before PCem has started reading from the CD.
- If you're using the mouse, don't make a right-click your first mouse input. This will make the right-click menu pop up, which will cause the display window to softlock. It's easy to avoid this by making an arbitrary left-click during boot, this will make PCem think the mouse is trapped and now you can right-click all you want.
- Even if the emulated machine doesn't support the middle mouse button, hitting it will make PCem release the mouse, so the right-click menu becomes a risk again.
- Always use software rendering. Using hardware rendering seems to be unstable, at a random point in time the emulator will crash with
XXX: resource creation failedspammed in the terminal.
We allow libTAS to run PCem as an IBM-PC emulator for DOS and Windows. Only TASVideos releases of PCem are allowed. Such releases are marked
st to indicate single-threading - modification required for determinism, not available in the original PCem.
Platform: DOS or
Platform: Windows (depending on which one you're running) at the very start of the .ltm movie annotations, that way the site will recognize your platform properly.
Use .ltm annotations or submission notes to document:
- Which machine ROM files your movie requires, along with their hashsums (PCem logs to the terminal which ROMs it's loading).
- Hashsums for your installation media, or for all the individual game files if you're using the pre-installed game method
Emulate compatible machine
PCem can emulate variety of machines, but we only accept systems representing an era of IBM-PC games based on release date and system requirements. We accept 4 machine configurations for DOS, and one for Windows.
If the game you're TASing doesn't work properly on either of these setups (or you want to add more RAM, or a joystick, or do another useful tweak), you can modify the setup that's closest to your desired specs, to make your game work well. Keep in mind though that PC game environment must be legitimate.
If your modifications are beyond tweaking the
.cfg files, you will need to record a libTAS movie of you setting up your config, similar to how our setups were recorded, including meticulous documentation of the process. Explain what and why you're changing too.
Game installation can be a part of your main movie, unless you're installing from a CD image or the installation process takes several minutes.
If game installation is a part of your main movie, it shouldn't waste time for no reason, but still configure your game to look and sound best. If game installation is done in a separate file, optimizing it is not required, just make sure to provide it as a verification movie.
- When making a verification movie, it's recommended you first record it with Runtime -> Prevent writing to disk checked, and then play it back with this setting unchecked to create the modified files you'll be using.
- Do not enter a CD key or serial in any of your movies! It is illegal to distribute these. Game activation needs to be done outside the libTAS movie! The game must be installed, activated, and only then put onto an ISO with all the required files.