Skip to content

Commit

Permalink
Merge pull request #171 from skx/drop-console
Browse files Browse the repository at this point in the history
drop the -console arg and embedded A:!CONSOLE
  • Loading branch information
skx authored Jan 5, 2025
2 parents 60bb7d9 + 333c255 commit 84690ce
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 117 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ Run `A:!INPUT stty` to use the non-portable Unix-centric approach which provides

### Console Output

We default to pretending our output device is an ADM-3A terminal, this can be changed via the `-output` command-line flag (previously `-console`) at startup. Additionally it can be changed at runtime via `A:!OUTPUT.COM`.
We default to pretending our output device is an ADM-3A terminal, this can be changed via the `-output` command-line flag at startup. Additionally it can be changed at runtime via `A:!OUTPUT.COM`.

Run `A:!OUTPUT ansi` to disable the output emulation, or `A:!OUTPUT adm-3a` to restore it.

Expand Down
2 changes: 1 addition & 1 deletion cpm/cpm_bdos_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ func TestFind(t *testing.T) {

}

if found != 7 {
if found != 6 {
t.Fatalf("found wrong number of embedded files, got %d", found)
}

Expand Down
10 changes: 1 addition & 9 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ func main() {
//
ccp := flag.String("ccp", "ccpz", "The name of the CCP that we should run (ccp vs. ccpz).")
cd := flag.String("cd", "", "Change to this directory before launching")
console := flag.String("console", "", "The name of the console output driver to use (-list-output-drivers will show valid choices).")
createDirectories := flag.Bool("create", false, "Create subdirectories on the host computer for each CP/M drive.")
input := flag.String("input", cpm.DefaultInputDriver, "The name of the console input driver to use (-list-input-drivers will show valid choices).")
output := flag.String("output", cpm.DefaultOutputDriver, "The name of the console output driver to use (-list-output-drivers will show valid choices).")
Expand Down Expand Up @@ -224,16 +223,9 @@ func main() {
// Set the logger now we've updated as appropriate.
slog.SetDefault(log)

// We used to use "-console", but now we prefer "-output" to match with "-input".
out := *output
if *console != "" {
out = *console
fmt.Printf("WARNING: -console is a deprecated flag, prefer to use -output.\r\n")
}

// Create a new emulator.
obj, err := cpm.New(cpm.WithPrinterPath(*prnPath),
cpm.WithOutputDriver(out),
cpm.WithOutputDriver(*output),
cpm.WithInputDriver(*input),
cpm.WithCCP(*ccp))
if err != nil {
Expand Down
Binary file removed static/A/!CONSOLE.COM
Binary file not shown.
5 changes: 1 addition & 4 deletions static/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# The files we wish to generate.
#
all: A/\#.COM A/!CCP.COM A/!CONSOLE.COM A/!CTRLC.COM A/!DEBUG.COM A/!INPUT.COM A/!OUTPUT.COM A/!VERSION.COM
all: A/\#.COM A/!CCP.COM A/!CTRLC.COM A/!DEBUG.COM A/!INPUT.COM A/!OUTPUT.COM A/!VERSION.COM

# cleanup
clean:
Expand All @@ -17,9 +17,6 @@ A/\#.COM: comment.z80
A/!CCP.COM: ccp.z80
pasmo ccp.z80 A/!CCP.COM

A/!CONSOLE.COM: console.z80
pasmo console.z80 A/!CONSOLE.COM

A/!CTRLC.COM: ctrlc.z80
pasmo ctrlc.z80 A/!CTRLC.COM

Expand Down
102 changes: 0 additions & 102 deletions static/console.z80

This file was deleted.

0 comments on commit 84690ce

Please sign in to comment.