diff options
author | Aleksey Veresov <aleksey@veresov.pro> | 2021-02-11 00:55:44 +0300 |
---|---|---|
committer | Aleksey Veresov <aleksey@veresov.pro> | 2021-02-11 00:55:44 +0300 |
commit | 4b87e6879228a3491609254949c41a2405c29ad5 (patch) | |
tree | 81c13f2942bcfe2ef62aa3959f1d7fbf7ce626d1 /Main.hs | |
parent | dff4a3167f4b7cd13ee1d34b04a63f1f45a573ad (diff) | |
download | suem-4b87e6879228a3491609254949c41a2405c29ad5.tar suem-4b87e6879228a3491609254949c41a2405c29ad5.tar.xz suem-4b87e6879228a3491609254949c41a2405c29ad5.zip |
Library test.
Diffstat (limited to 'Main.hs')
-rw-r--r-- | Main.hs | 32 |
1 files changed, 31 insertions, 1 deletions
@@ -1,6 +1,36 @@ module Main where +import Options.Applicative import Suem +config :: Parser Config +config = Config + <$> option auto + ( long "frequency" + <> short 'f' + <> metavar "HERTZ" + <> showDefault + <> value 8000000 + <> help "Machine frequency in Hz" ) + <*> option auto + ( long "ram" + <> short 'm' + <> metavar "RAM_SIZE" + <> showDefault + <> value (8 * 1024 * 1024) + <> help "Available RAM in bytes" ) + <*> option auto + ( long "rom" + <> short 'r' + <> metavar "ROM_PATH" + <> showDefault + <> value "rom.bin" + <> help "Path to file to load into ROM" ) + main :: IO () -main = printROM +main = suem =<< execParser opts + where + opts = info (config <**> helper) + ( fullDesc + <> progDesc "Emulator of Suen, machine on M68000" + <> header "suem - Suen emulator" ) |