mirror of
https://github.com/freewilll/apple2-go.git
synced 2024-09-27 01:55:21 +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 (
|
||||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/hajimehoshi/ebiten"
|
||||
|
||||
@ -63,14 +64,27 @@ func update(screen *ebiten.Image) error {
|
||||
}
|
||||
|
||||
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")
|
||||
disableFirmwareWait = flag.Bool("disable-wait", false, "Ignore JSRs to firmware wait at $FCA8")
|
||||
breakAddressString := flag.String("break", "", "Break on address")
|
||||
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")
|
||||
flag.Parse()
|
||||
|
||||
diskImages := flag.Args()
|
||||
var diskImage string
|
||||
if len(diskImages) > 0 {
|
||||
diskImage = diskImages[0]
|
||||
}
|
||||
|
||||
breakAddress = utils.DecodeCmdLineAddress(breakAddressString)
|
||||
|
||||
ebiten.SetRunnableInBackground(true)
|
||||
@ -80,8 +94,8 @@ func main() {
|
||||
mmu.InitApple2eROM()
|
||||
mmu.InitIO()
|
||||
|
||||
if *diskImage != "" {
|
||||
mmu.ReadDiskImage(*diskImage)
|
||||
if diskImage != "" {
|
||||
mmu.ReadDiskImage(diskImage)
|
||||
}
|
||||
|
||||
cpu.Init()
|
||||
|
Loading…
Reference in New Issue
Block a user