tevd: bootloader is now entry id 1

This commit is contained in:
minjaesong
2022-12-23 05:23:54 +09:00
parent 1ecb85354b
commit 59399d84f9
6 changed files with 93 additions and 15 deletions

View File

@@ -23,7 +23,17 @@ function copyFiles(destDrive) {
})
// bare files in the root dir
;["!BOOTSEC", "AUTOEXEC.BAT"].forEach((name)=>{
;["AUTOEXEC.BAT"].forEach((name)=>{
dos.cp(`A:\\tvdos\\installer\\${name}`, `${destDrive}:\\${name}`)
})
// install bootloader
val bootloader = files.open("A:\\tvdos\\installer\\!BOOTSEC").sread()
let [port, poru] = _TVDOS.DRV.FS.SERIAL._toPorts(destDrive)[0]
com.sendMessage(port, "FLUSH");com.sendMessage(port, "CLOSE")
com.sendMessage(port, `NEWTEVDBOOT,${poru}`) // read-only check will be performed by the other writes
com.sendMessage(port, bootloader)
com.sendMessage(port, "FLUSH");com.sendMessage(port, "CLOSE")
}