Diskette image creation batch files (Emulation)
Here's two variants of a batch file to do most of what you did. I didn't have the ROM-DOS files around so I made them with a few test files. Adjusting these scripts to install an actual DOS is left as an exercise to the reader. Likewise, using dd and bash for is easy to do based on this.
These scripts both assume that the source files are found in subdirectories of the DOS working directory. (All source files from my hg repos.) NASM and X need to be in the PATH. The directory testdir contains files that are all meant to be copied to the image. The ::empty keyword is a placeholder here, and could be replaced by actual files (found in the root directory not testdir).
Both scripts create almost the same output; the "large total sectors" field ends up initialised unnecessarily when using instsect. Still missing: File datetimes, file attributes.
=== makdx.bat
@echo %DEBUG%off
nasm -I lmacros/ ldosboot/boot.asm -D_COMPAT_LDOS -D_LOAD_NAME="'LDEBUG'" -o boot12.bin
x boot12.bin bootjump.bin 0 11
x boot12.bin bootcode.bin $3E
echo ; Auto-generated file, do not edit. > list.mac
echo %%define _BOOTJUMPFILE "bootjump.bin" >> list.mac
echo %%define _BOOTCODEFILE "bootcode.bin" >> list.mac
:: echo %%xdefine _PAYLOADFILE _PAYLOADFILE,::chdir,testdir >> list.mac
for %%i in (testdir\*.*) do echo %%xdefine _PAYLOADFILE _PAYLOADFILE,"%%i" >> list.mac
nasm -I lmacros/ bootimg/bootimg.asm -D_PAYLOADFILE=::empty -P list.mac -o diskette.img
=== makdinst.bat
@echo %DEBUG%off
nasm -I lmacros/ ldosboot/boot.asm -D_COMPAT_LDOS -D_LOAD_NAME="'LDEBUG'" -o boot12.bin
nasm -I lmacros/ instsect/instsect.asm -D_FAT16=0 -D_FAT32=0 -o inst12.com
echo ; Auto-generated file, do not edit. > list.mac
:: echo %%xdefine _PAYLOADFILE _PAYLOADFILE,::chdir,testdir >> list.mac
for %%i in (testdir\*.*) do echo %%xdefine _PAYLOADFILE _PAYLOADFILE,"%%i" >> list.mac
nasm -I lmacros/ bootimg/bootimg.asm -D_PAYLOADFILE=::empty -P list.mac -o diskette.img
inst12.com /M=diskette.img /S=boot12.bin
:: /SN
:: /F=ldebug.com
---
l
Complete thread:
- Datalight ROM-DOS floppy image creation - rr, 02.02.2020, 16:44 (Emulation)
- Datalight ROM-DOS floppy image creation - Rugxulo, 04.02.2020, 05:07
- Datalight ROM-DOS floppy image creation - rr, 05.02.2020, 15:59
- FAT image creation - Rugxulo, 08.02.2020, 11:21
- FAT image creation - marcov, 08.02.2020, 14:54
- FAT image creation - Rugxulo, 16.02.2020, 18:36
- FAT image creation - marcov, 17.02.2020, 10:21
- FAT image creation - Rugxulo, 18.02.2020, 03:39
- FAT image creation - Rugxulo, 18.02.2020, 21:13
- VBox vs. QEMU without VT-X - Rugxulo, 19.02.2020, 10:56
- cross-compilation versus emulated (native) compilation - Rugxulo, 04.03.2020, 03:07
- cross-compilation versus emulated (native) compilation - Rugxulo, 04.03.2020, 23:11
- cross-compilation versus emulated (native) compilation - Rugxulo, 04.03.2020, 03:07
- VBox vs. QEMU without VT-X - Rugxulo, 19.02.2020, 10:56
- FAT image creation - marcov, 19.02.2020, 10:37
- FAT image creation - Rugxulo, 18.02.2020, 21:13
- FAT image creation - Rugxulo, 18.02.2020, 03:39
- FAT image creation - marcov, 17.02.2020, 10:21
- FAT image creation - Rugxulo, 16.02.2020, 18:36
- FAT image creation - marcov, 08.02.2020, 14:54
- FAT image creation - Rugxulo, 08.02.2020, 11:21
- Datalight ROM-DOS floppy image creation - rr, 05.02.2020, 15:59
- Datalight ROM-DOS floppy image creation - rr, 07.12.2020, 23:01
- Datalight ROM-DOS floppy image creation - ecm, 08.12.2020, 14:06
- Datalight ROM-DOS floppy image creation - ecm, 08.12.2020, 16:29
- Datalight ROM-DOS floppy image creation - rr, 08.12.2020, 22:20
- Datalight ROM-DOS floppy image creation - ecm, 09.12.2020, 10:49
- Datalight ROM-DOS floppy image creation - rr, 08.12.2020, 22:20
- Diskette image creation batch files - ecm, 15.12.2020, 22:38
- Diskette image creation batch files - ecm, 15.12.2020, 22:58
- Diskette image creation batch files - ecm, 19.12.2020, 18:21
- Diskette image creation batch files - ecm, 15.12.2020, 22:58
- Datalight ROM-DOS floppy image creation - Rugxulo, 04.02.2020, 05:07