Hacking NEC PC Games/Moving assets to HDD
On DOS
editCopying a "PC booter" game to a hard drive can be done by a couple methods. Ideally, the game will implement its own DOS-like file system, in which case drive references can be removed from the paths inside the game. Generally speaking, an application can be installed to hard drive by copying the setup files to the drive in question all in the same folder. If there is filename overlap then depending on the situation it may be OK to just ignore the other disk's files as such. Alternatively the installation program (often a batch file) can be edited to copy different files, then you can rename the files on the disk to match.
Games hard-coded to look in "drive 1" for a system disk and "drive 2" for content disks will need to be hacked to read from IDE ports (though BIOS function substitutions might suffice). Use tracing to identify which calls are being made. Avoid assigning static drive letters such as "A" or "B" for use in paths, as this can lead to misplaced reads if the user has unusual drive labeling. Try to keep paths relative if possible.
Games which do not have an on-disk file system (instead reading data by the track/sector) are coped with most easily by reprogramming them to read only from a single set of files, one for each disk. Use BIOS calls to read the "sectors" in these file only (meaning chunks the same size as the sector size of the disk.) Check the beginning of the disk to identify its geometry. If there is none, it may mean the sector size is the floppy drive default of 1024 bytes. You can also use disk tracing to identify how much data is being read by the game in a single operation.
Getting the sector of a file on disk is a challenge. DOS does not offer it directly (although it can be stolen from it's memory once the file is opened). The file can be traced programmatically by using DOS interrupt 13h services to directly access the disk, trawling the directory structure from the root on down to the file, using the file's path as a guide. This can get complicated, so consider finding/using utilities that will find a file's sector for you.