From ca906d8606fde7b5bd3d45cb99f600b5417d99c1 Mon Sep 17 00:00:00 2001 From: minjaesong Date: Fri, 30 Oct 2020 23:38:37 +0900 Subject: [PATCH] forgot to reset the drive :p --- assets/!BOOTSEC | 2 +- assets/bootsec_source.js | 1 + src/net/torvald/tsvm/peripheral/TestDiskDrive.kt | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/assets/!BOOTSEC b/assets/!BOOTSEC index d014ab6..ae46bb5 100644 --- a/assets/!BOOTSEC +++ b/assets/!BOOTSEC @@ -1 +1 @@ -let p=_BIOS.FIRST_BOOTABLE_PORT;com.sendMessage(p[0],'OPENR"tvdos/TVDOS.SYS",'+p[1]);let r=com.getStatusCode(p[0]);if(0==r)if(com.sendMessage(p[0],"READ"),r=com.getStatusCode([0]),0==r){let g=com.pullMessage(p[0]);eval(g)}else println("I/O Error");else println("TVDOS.SYS not found"); \ No newline at end of file +let p=_BIOS.FIRST_BOOTABLE_PORT;com.sendMessage(p[0], "DEVRST\x17");com.sendMessage(p[0],'OPENR"tvdos/TVDOS.SYS",'+p[1]);let r=com.getStatusCode(p[0]);if(0==r)if(com.sendMessage(p[0],"READ"),r=com.getStatusCode([0]),0==r){let g=com.pullMessage(p[0]);eval(g)}else println("I/O Error");else println("TVDOS.SYS not found"); \ No newline at end of file diff --git a/assets/bootsec_source.js b/assets/bootsec_source.js index 05ffb6a..834a51c 100644 --- a/assets/bootsec_source.js +++ b/assets/bootsec_source.js @@ -1,5 +1,6 @@ // load TVDOS.SYS let p = _BIOS.FIRST_BOOTABLE_PORT; +com.sendMessage(p[0], "DEVRST\x17"); com.sendMessage(p[0], 'OPENR"tvdos/TVDOS.SYS",'+p[1]); let r = com.getStatusCode(p[0]); if (r == 0){ diff --git a/src/net/torvald/tsvm/peripheral/TestDiskDrive.kt b/src/net/torvald/tsvm/peripheral/TestDiskDrive.kt index 2ce1c48..8e416c1 100644 --- a/src/net/torvald/tsvm/peripheral/TestDiskDrive.kt +++ b/src/net/torvald/tsvm/peripheral/TestDiskDrive.kt @@ -125,6 +125,7 @@ class TestDiskDrive(private val driveNum: Int, theRootPath: File? = null) : Bloc val inputString = trimNull(inputData).toString(VM.CHARSET) if (inputString.startsWith("DEVRST\u0017")) { + println("[TestDiskDrive] Device Reset") //readModeLength = -1 fileOpen = false fileOpenMode = -1