ZEsarUX ZRCP Partial debug protocol implementation

This commit is contained in:
romych committed 2026-03-14 00:02:00 +03:00
1 parent b70b02a4be
commit b200f269a0
18 files changed
+992 -314

No files matched your search

+10 -1
View File
@@ -9,6 +9,7 @@ import (
const defaultMonitorFile = "rom/MON_v5.bin"
const defaultCPMFile = "rom/CPM_v5.bin"
const DefaultDebufPort = 10000
type OkEmuConfig struct {
LogFile string `yaml:"logFile"`
@@ -17,6 +18,8 @@ type OkEmuConfig struct {
CPMFile string `yaml:"cpmFile"`
FloppyB string `yaml:"floppyB"`
FloppyC string `yaml:"floppyC"`
Host string `yaml:"host"`
Port int `yaml:"port"`
}
var config *OkEmuConfig
@@ -59,7 +62,9 @@ func LoadConfig() {
}
func checkConfig(conf *OkEmuConfig) {
if conf.Host == "" {
conf.Host = "localhost"
}
}
func setDefaultConf(conf *OkEmuConfig) {
@@ -75,4 +80,8 @@ func setDefaultConf(conf *OkEmuConfig) {
if conf.CPMFile == "" {
conf.CPMFile = defaultCPMFile
}
if conf.Port < 80 || conf.Port > 65535 {
log.Infof("Port %d incorrect, using default: %d", conf.Port, DefaultDebufPort)
conf.Port = DefaultDebufPort
}
}