alinebee / Boxer

The DOS game emulator that's fit for your Mac.
http://boxerapp.com/
769 stars 138 forks source link

PC booter games saving #95

Open mikesk8 opened 5 years ago

mikesk8 commented 5 years ago

I have managed to import manually King's Quest 1 (PCJR 1st version) in Boxer; it is a PC booter disk image game (.img). All works great!

However, I am facing a challenge in saving the game. Basically, Save / Restore work ok while you are in the game, but if you quit Boxer/game it modifies the .img file rendering the game unusable, i.e. when you try to open the game next time it gets stuck on booting screen with text "booting from disk a".

Any tips? thanks a lot!

john-at-charpa commented 5 years ago

So I've figured out how to do this, but I had to cheat a bit. Perhaps either the author or someone with more clue than I can assist.

First off, I read the manual for Kings Quest as I've never played the PCJR version (Amiga kid; sorry)

http://www.sierrahelp.com/Documents/Manuals/Kings_Quest_1_IBM_-_Manual.pdf

It's clearly designed to run on a system with a single floppy that is swapped. So I grabbed a DOS formatted 360k FDD image from the FreeDOS project:

http://www.fdos.org/bootdisks/autogen/FDOEM.360.gz

I ungzipped it and tossed it in KQ1/ named KQ1SAVE.IMG with KQ1PCJR.IMG (the actual game).

I made a simple PCJR DOSBox config file in KQ1/ called dosbox.conf with this in it:

[cpu] cycles=max core=normal machine=pcjr cycles=350

[dos] xms=false ems=false umb=false

Then I used the official DOSBox macOS X release binary (copied into /usr/local/bin/dosbox) like this:

cd KQ1 dosbox -conf dosbox.conf

Once it started up I ran the game like this (by default it looks in . for files):

boot KQ1PCJR.IMG KQ1SAVE.IMG

The load time output can be seen in the terminal:

DOSBox version 0.74-2 Copyright 2002-2018 DOSBox Team, published under GNU GPL.

CONFIG:Loading primary settings from config file dosbox.conf MIDI:Opened device:coreaudio Loaded disk 0 from swaplist position 0 - "KQ1PCJR.IMG" Loaded disk 1 from swaplist position 1 - "KQ1SAVE.IMG"

When it came time to save using '3', I used the hot-key to swap the floppies (based on the boot command list). When it says: "Please insert your save disk in drive A and press Enter." I hit ctrl-fn-F4 (mac keyboard) and I can see in the Terminal that it swapped the disks:

Diskcaching reset for normal mounted drives. Loaded disk 0 from swaplist position 1 - "KQ1SAVE.IMG" Loaded disk 1 from swaplist position 0 - "KQ1PCJR.IMG"

Then I hit Enter in the game and everything went fine. I simply hit ctlr-fn-f4 again when it asked for the Master disk back. I've tested saving, quitting, then loading (restore via '5') and it seems to work just fine. So, the key to this appears to be saving to a separate save disk; not the original game disk.

The only part of this I've not been able to figure out is how to send boxer ctrl-fn-f4. The Boxer.app UI won't recognize the KQ1PCJR.IMG file so I'm not sure how to build a swap list. In theory if you could do this via the UI you could get it to work with just Boxer (even add the boot command line as the autoexec).

mikesk8 commented 5 years ago

Thanks a lot! I actually did similar checks yesterday directly in Boxer. My boxer dosbox.conf is as your including boot "game.image" "save.image"

I tried both: 1) FDD image 2) copy of the game image as save disk. I have read on some forum that "copy disk" in the game just creates the exact copy of the game image to be used as save disk. This new save disk (exact copy of master one) is getting updated on "save" and becomes not bootable; thats why you need still master disk.

In the Boxer UI I can see 2 drives in the Drives menu (game image) and (save img). However, the button next/previous disk are not active and I do not know how to swap those drives (as you mentioned before). Will try again maybe there is some simple solution :)

mikesk8 commented 5 years ago

I have set the same in DOSBox (official release) and works great, as you described. For save disk I used the copy of the game disk image (therefore no need to have a blank FDD).

I was trying to do the same in Boxer but with no success. I can play and save the game, but I am not able to swap the disks as in DOSBox.

john-at-charpa commented 5 years ago

I actually forgot to mention in my first comment that I also see that something happens to the save disk after the first initial save (it's modified). Before I saved for the first time I could mount the FDOEM.360 using using imgmount. However, post saving it is unable to mount it. Save/Restore still works just fine but it has changed in a manner that DOSBox cannot handle when it tries to mount it.

I think even if you could swap disks in Boxer using the UI the changes to the save floppy would render it unusable from the second time around. Possibly the only way around this is either to figure out how to get the hot-key for swapping to work in Boxer or find out why the save disk is broken (to DosBox) so that the UI will recognize it the second time (possibly a bug).

olivergrosche commented 1 year ago

cool, its working. saving also works with just a copy of the gamedisk, so you only have to swap disks once in the beginning...