Mount more than one disk and block devices easily

This commit is contained in:
Iván Izaguirre
2025-02-17 21:05:33 +01:00
parent 48eee330b7
commit 8ff9ceb8e9
2 changed files with 11 additions and 5 deletions

View File

@@ -278,11 +278,17 @@ func CreateConfiguredApple() (*Apple2, error) {
return nil, fmt.Errorf("up to 8 block devices can be loaded, %v found", len(blockDevices))
}
if len(blockDevices) > 0 {
smartportConfig := "smartport"
for i, filename := range blockDevices {
smartportConfig += fmt.Sprintf(",image%v=\"%s\"", i+1, filename)
configuration.set(confS7, fmt.Sprintf("smartport,image1=\"%s\"", blockDevices[0]))
if len(blockDevices) > 1 {
smartportConfig := "smartport"
for i, filename := range blockDevices {
if i == 0 {
continue
}
smartportConfig += fmt.Sprintf(",image%v=\"%s\"", i+1, filename)
}
configuration.set(confS5, smartportConfig)
}
configuration.set(confS5, smartportConfig)
}
}

View File

@@ -17,7 +17,7 @@ type traceMonitor struct {
}
const (
wozmonPrompt uint16 = 0x0033
//wozmonPrompt uint16 = 0x0033
wozmonGETLNZ uint16 = 0xfd67
woamonGETLN uint16 = 0xfd6a