mirror of
https://github.com/freewilll/apple2-go.git
synced 2024-06-17 04:29:47 +00:00
Removed -image flag, the disk image is a non-positional param now
This commit is contained in:
parent
3233cfc244
commit
543bb6925c
20
appleiie.go
20
appleiie.go
|
@ -3,6 +3,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"os"
|
||||||
|
|
||||||
"github.com/hajimehoshi/ebiten"
|
"github.com/hajimehoshi/ebiten"
|
||||||
|
|
||||||
|
@ -63,14 +64,27 @@ func update(screen *ebiten.Image) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
var Usage = func() {
|
||||||
|
fmt.Fprintf(flag.CommandLine.Output(), "Usage of %s:\n\n", os.Args[0])
|
||||||
|
fmt.Fprintf(flag.CommandLine.Output(), "Synopsis: %s [disk image file]\n\n", os.Args[0])
|
||||||
|
fmt.Fprintf(flag.CommandLine.Output(), "Options\n")
|
||||||
|
flag.PrintDefaults()
|
||||||
|
}
|
||||||
|
flag.Usage = Usage
|
||||||
|
|
||||||
showInstructions = flag.Bool("show-instructions", false, "Show instructions code while running")
|
showInstructions = flag.Bool("show-instructions", false, "Show instructions code while running")
|
||||||
disableFirmwareWait = flag.Bool("disable-wait", false, "Ignore JSRs to firmware wait at $FCA8")
|
disableFirmwareWait = flag.Bool("disable-wait", false, "Ignore JSRs to firmware wait at $FCA8")
|
||||||
breakAddressString := flag.String("break", "", "Break on address")
|
breakAddressString := flag.String("break", "", "Break on address")
|
||||||
mute := flag.Bool("mute", false, "Mute sound")
|
mute := flag.Bool("mute", false, "Mute sound")
|
||||||
diskImage := flag.String("image", "", "Disk Image")
|
|
||||||
clickWhenDriveHeadMoves := flag.Bool("drive-head-click", false, "Click speaker when drive head moves")
|
clickWhenDriveHeadMoves := flag.Bool("drive-head-click", false, "Click speaker when drive head moves")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
|
diskImages := flag.Args()
|
||||||
|
var diskImage string
|
||||||
|
if len(diskImages) > 0 {
|
||||||
|
diskImage = diskImages[0]
|
||||||
|
}
|
||||||
|
|
||||||
breakAddress = utils.DecodeCmdLineAddress(breakAddressString)
|
breakAddress = utils.DecodeCmdLineAddress(breakAddressString)
|
||||||
|
|
||||||
ebiten.SetRunnableInBackground(true)
|
ebiten.SetRunnableInBackground(true)
|
||||||
|
@ -80,8 +94,8 @@ func main() {
|
||||||
mmu.InitApple2eROM()
|
mmu.InitApple2eROM()
|
||||||
mmu.InitIO()
|
mmu.InitIO()
|
||||||
|
|
||||||
if *diskImage != "" {
|
if diskImage != "" {
|
||||||
mmu.ReadDiskImage(*diskImage)
|
mmu.ReadDiskImage(diskImage)
|
||||||
}
|
}
|
||||||
|
|
||||||
cpu.Init()
|
cpu.Init()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user