Note: The solution below ultimately failed to work for the asker as-is. I presume this is because my printable auxcopy
binary was not written well enough to operate correctly on bare hardware (it was only tested in a VM); perhaps this flaw can be easily corrected, but I am not yet able to see how. Nevertheless, as it seems to have served as a major inspiration for the asker’s own solution, I am leaving it here for posterity.
Based on the question body and subsequent clarifications in the chat, the asker’s situation is a quite tricky one. The floppy drive is currently non-functional and is yet to be configured by a separate executable, which is not available at the moment. There is apparently a copy of MS-DOS 6 stored on a DoubleSpace-compressed disk, but it cannot be booted either. The only operating system that the asker can boot is a copy of PC DOS 4.0 stored in the machine’s ROM.
But that should be enough.
The PS/1 contains one other piece of hardware that you can use to transfer data between it and the outside world: the serial port. Using a null-modem cable, you can connect two PCs directly and send data from one to the other. To have data transferred via the serial line properly delimited into files, you will need a file transfer program. For example, a program whose binary code is as follows−1:
PYX5!!,TP-N!5~LP-b!-~rP5!uP-!G-&~P59!-~&P-~D,DP5!!5;.P-{$%-JP5bxP=
@@@P5r7P5!B,9P-~D,rP5P!-x"P-Q!5&]PHP-y!%wBP5K=P5N9P5^6P5X<P5HrP=
-J!-~pP-5!%<*P-!+5o/P-5!%<-P-!.5o+P-u4%<`P-~',JP-~7,rP-9!-~}P=
5y"P5y"P-O!5~LP-!!-BrP-!!5]|P5!&,6P-~E,FP5!!-Z4P-~v,.P-K0P-~G,JP=
5!!-b2P-~v,.P-K0P-~G,VP5"2,;P-~,,dP5#<,_P-"%%DHP5!!-#>P5'_,!P=
-~>,5P5!!5p&P5!Y,9P-~A,bP-!!56)PPPPPP-!"58~P-!#-|~P5!!5~?P-5"%u$P=
5!!5&IP54lP5&!-~8P-!)5#nPP-!!5#`P4!HP-tHP-!)5P+P5!!5\'P5!%,9P=
-!!-?pP5!@-5/P-~V,pP-!!5f6P5!!-"UP-!!572P-9!-~yPT]-R!%8CP[5[sP=
_-5a-~~PPXX)?BF
You can enter this program into the machine from the keyboard, using the command copy con auxcopy.com
; when done, press Ctrl+Z (or F6) to return to the DOS prompt. This program has been carefully constructed to ensure this is possible to do by maintaining the following properties:
- All the bytes other than line breaks are printable ASCII characters, readily possible to enter from a US-layout keyboard.
- No line is longer than 80 lines; this is to accommodate the line buffer size of 128 bytes.
Other than line breaks, there are no whitespace characters in the binary. The line breaks are supposed to be encoded as CR+LF (as they usually are under DOS). Pay attention to confusable pairs (like O
vs 0
, 5
vs S
, '
vs `
, etc.) when typing the file in.
I expect the compressed hard drive to contain just enough free space to let this small executable and a little more data fit in the uncompressed area; DoubleSpace by default leaves some amount of free space available there.
What this program does0 is read a slightly modified form of base641 from the serial port and writes decoded data to standard output. This modified base64 can be generated from a given file by the following Unix command:
base64 -w0 < "${file}" | ( tr 'A-Za-z0-9+/=' '0-o~'; printf \~ )
After creating the executable on the DOS machine, launch it as follows:
C:\>AUXCOPY > file
Then, on the other end of the null-modem cable, send the encoded file over the serial port. The AUXCOPY
program will exit when the transfer finishes (as long as the final ~
character is present). The serial port may need to be configured beforehand; on the PS/1 side that should be possible to accomplish by using the MODE.COM
executable stored with the ROM DOS.
With this transfer program, you now have a good chance of bootstraping yourself out of this situation. You can use it to transfer any of the following:
- The
CONFIGUR.EXE
program that will allow you to enable the floppy drive.
- System files from the MS-DOS 6 distribution, such as
SYS.COM
, IO.SYS
, MSDOS.SYS
, FDISK.EXE
, DEBUG.COM
and COMMAND.COM
, to attempt to repair hard disk boot (or set it up in the first place)
- A more sophisticated serial file transfer program (supporting things like error correction), allowing you to extract files from the PS/1 over the serial port.
−1 I wrote — well, constructed, the process was partially automated — this one myself, actually. I might post source code somewhere someday; I think the way I managed to create this program is quite interesting on its own. For now, I’ll leave it here as a puzzle for reverse engineering junkies.
0 I tested it with a pair of QEMU instances whose serial ports were connected to each other via a FIFO.
12 The modification to base64 makes it simpler to decode, so that the decoding program is shorter.
2 This superscript is both an exponent and a footnote.