blob: 552f2ed303a2e5402fb86778145b660ff040055f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
{-# Language ApplicativeDo #-}
module Main where
import Fig.Prelude
import Options.Applicative
import qualified Data.ByteString as BS
import Fig.Emulator.GB
newtype Options = Options
{ romPath :: FilePath
} deriving Show
parseOptions :: Parser Options
parseOptions = do
romPath <- argument str (metavar "PATH")
pure Options{..}
main :: IO ()
main = do
opts <- execParser $ info (parseOptions <**> helper)
( fullDesc
<> header "fig-emulator-gb - Game Boy emulator"
)
rom <- BS.readFile $ romPath opts
testRun rom
|