Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MEmu = FS-UAE
- MEmuV = v2.2.3
- MURL = http://fs-uae.net/
- MAuthor = djvj/faahrev
- MVersion = 2.0.2 BETA
- MCRC =
- iCRC =
- MID =
- MSystem = "Commodore Amiga","Commodore Amiga CD32","Commodore CDTV"
- ;----------------------------------------------------------------------------
- ; Notes:
- ; Command Line Options - http://fs-uae.net/options
- ;
- ; Fade-, Bezel- and MultiGame supported.
- ; Be sure to set the paths to the BIOS roms in the Global Module Settings in HLHQ.
- ;
- ; Extensions for Amiga are .adf, .hdf or .zip
- ; Extension for AmigaCD32 and CDTV is cue
- ;
- ; .hdf and .zip are not MultiGame compatible
- ;
- ; If a rom consists of multiple discs,
- ; the discs will be automatically added to the swap list in FS-UAE (ingame F12)
- ; plus:
- ; If the media is floppies (adf) up to 4 discs will be inserted in the drives.
- ; Don't forget to set MultiGame to true in HLHQ for each system you wish to use it.
- ;
- ; By pressing F12 in the game any disc can be inserted in any drive
- ; and savestates can be saved and loaded.
- ; These are saved in emu\config\save states.
- ;
- ; Be sure to use the correct format for naming the discs
- ;
- ; By default the EmuDir\config.fs-uae file will be used for setting options
- ; If it doesn't exist, it will be created.
- ;
- ; Note: please be patient when loading floppy games.
- ; Floppies are loaded in real-time for best results.
- ;----------------------------------------------------------------------------
- StartModule()
- BezelGUI()
- FadeInStart()
- ; This object controls how the module reacts to different systems. FS-UAE can play a lot of systems, but needs to know what system you want to run, so this module has to adapt.
- mType := Object("Commodore Amiga","A1200","Commodore Amiga CD32","CD32/FMV","Commodore CDTV","CDTV")
- ident := mType[systemName] ; search object for the systemName identifier FS-UAE uses
- If !ident
- ScriptError("Your systemName is: " . systemName . "`nIt is not one of the known supported systems for this " . MEmu . " module: " . moduleName)
- settingsFile := modulePath . "\" . moduleName . ".ini"
- configFile := emuPath . "\config.fs-uae"
- baseDir := emuPath . "\conf"
- fullscreen := IniReadCheck(settingsFile, "Settings", "Fullscreen","true",,1)
- fullscreenRes := IniReadCheck(settingsFile, "Settings", "FullscreenResolution",,,1)
- windowedRes := IniReadCheck(settingsFile, "Settings", "WindowedResolution",,,1)
- a1200Rom := IniReadCheck(settingsFile, "Settings", "A1200_Rom",,,1)
- cd32Rom := IniReadCheck(settingsFile, "Settings", "CD32_Rom",,,1)
- cd32ExtRom := IniReadCheck(settingsFile, "Settings", "CD32_Ext_Rom",,,1)
- cdTVRom := IniReadCheck(settingsFile, "Settings", "CDTV_Rom",,,1)
- cdTVExtRom := IniReadCheck(settingsFile, "Settings", "CDTV_Ext_Rom",,,1)
- whdBootPath := IniReadCheck(settingsFile, "Settings", "WHDBootPath", emuPath . "\Hard Disks\WHDLoad\Boot",,1)
- whdBootPath := AbsoluteFromRelative(emuPath, whdBootPath)
- ; amigaModel := IniReadCheck(settingsFile, "Settings", "AmigaModel","A1200",,1) ; possible choices are A500+,A600,A1000,A1200,A1200/020,A3000,A4000/040,CD32,CDTV
- ; autoResume := IniReadCheck(settingsFile, "Settings", "autoResume","true",,1) ; if true, will automatically save your game's state on exit and reload it on the next launch of the same game.
- ;clearing earlier settings in config
- IniWrite, Empty, %configFile%, fs-uae, floppy_drive_0
- IniWrite, Empty, %configFile%, fs-uae, hard_drive_0
- IniWrite, Empty, %configFile%, fs-uae, cdrom_drive_0
- ;ejecting all CDROMS
- IndexMinusOne := -1
- Loop, 9
- { IndexMinusOne++
- IniWrite, Empty, %configFile%, fs-uae, cdrom_image_%IndexMinusOne%
- }
- BezelStart()
- If ident = A1200
- { a1200Rom := CheckFile(GetFullName(a1200Rom), "Could not find your A1200_Rom. " . systemName . " first requires the ""A1200_Rom"" to be set in HLHQ's module settings for " . MEmu . ".")
- kickstartBios := "" . a1200Rom . ""
- ; fastmem := " --fast_memory=8192"
- IniWrite, 8192, %configFile%, fs-uae, fastmem ; write fastmem size
- }Else if ident = CD32/FMV
- { cd32Rom := CheckFile(GetFullName(cd32Rom), "Could not find your CD32_Rom. " . systemName . " first requires the ""CD32_Rom"" to be set in HLHQ's module settings for " . MEmu . ".")
- cd32ExtRom := CheckFile(GetFullName(cd32ExtRom), "Could not find your CD32_Ext_Rom. " . systemName . " first requires the ""CD32_Ext_Rom"" to be set in HLHQ's module settings for " . MEmu . ".")
- kickstartBios := "" . cd32Rom . ""
- kickstartExtBios := "" . cd32ExtRom . ""
- }Else if Ident = CDTV
- { cdTVRom := CheckFile(GetFullName(cdTVRom), "Could not find your CDTV_Rom. " . systemName . " first requires the ""CDTV_Rom"" to be set in HLHQ's module settings for " . MEmu . ".")
- cdTVExtRom := CheckFile(GetFullName(cdTVExtRom), "Could not find your CDTV_Ext_Rom. " . systemName . " first requires the ""CDTV_Ext_Rom"" to be set in HLHQ's module settings for " . MEmu . ".")
- kickstartBios := "" . cdTVRom . ""
- kickstartExtBios := "" . cdTVExtRom . ""
- }
- ;amigaModel := " --amiga_model=" . ident
- ;fullscreen := " --fullscreen=" . (If Fullscreen = "true" ? 1 : 0)
- ;fullscreenMode := " --fullscreen_mode=fullscreen-window" ; sets fullscreen windowed rather than true fullscreen
- fullscreen := (If Fullscreen = "true" ? 1 : 0)
- IniWrite, %fullscreen%, %configFile%, fs-uae, fullscreen
- IniWrite, fullscreen-window, %configFile%, fs-uae, fullscreen_mode ; sets fullscreen windowed rather than true fullscreen
- If (fullscreen = "true" && fullscreenRes != "") {
- Loop, Parse, fullscreenRes, x
- If A_index = 1
- fsuaeW := A_LoopField
- Else
- fsuaeH := A_LoopField
- IniWrite, %fsuaeW%, %configFile%, fs-uae, fullscreen_width
- IniWrite, %fsuaeH%, %configFile%, fs-uae, fullscreen_height
- } Else If (fullscreen != "true" && windowedRes != "") {
- Loop, Parse, windowedRes, x
- If A_index = 1
- fsuaeW := A_LoopField
- Else
- fsuaeH := A_LoopField
- IniWrite, %fsuaeW%, %configFile%, fs-uae, window_width
- IniWrite, %fsuaeH%, %configFile%, fs-uae, window_height
- }
- 7z(romPath, romName, romExtension, 7zExtractPath)
- ; stateName := emuPath . "\states\" . romName . ".uss"
- If romExtension in .adf,.zip
- gamePathMethod := "floppy_drive_0"
- Else If romExtension = .hdf
- gamePathMethod := "hard_drive_0"
- Else If romExtension = .whd
- gamePathMethod := "hard_drive_0=""" . WHDBootPath . """ --hard_drive_1"
- Else if romExtension = .cue
- gamePathMethod := "cdrom_drive_0"
- Else
- ScriptError("Unsupported extension supplied: """ . romExtension . """.") ; iso is not supported or mounting will not work
- ;gamePath := " --" . gamePathMethod . "=""" . romPath . "\" . romName . romExtension . """"
- ;injecting other variables in config file
- IniWrite, %baseDir%, %configFile%, fs-uae, base_dir
- IniWrite, %ident%, %configFile%, fs-uae, amiga_model ; write model to fs-uae
- IniWrite, %kickstartBios%, %configFile%, fs-uae, kickstart_file ; write rom to fs-uae
- IniWrite, %kickstartExtBios%, %configFile%, fs-uae, kickstart_ext_file ; write extended rom to fs-uae
- IniWrite, %kickstartExtBios%, %configFile%, fs-uae, kickstart_ext_file ; write extended rom to fs-uae
- If romName contains Disk,Disc
- { StringTrimRight, romNameNoDisc, romName, 9 ; gets gamename
- IndexMinusOne := -1
- Loop, %romPath%\%romNameNoDisc%*.cue
- { EnvAdd, IndexMinusOne, 1
- IniWrite, %romPath%\%romNameNoDisc% (Disk %A_index%)%romExtension%, %configFile%, fs-uae, cdrom_image_%IndexMinusOne% ; mounting discs
- }
- }
- Run(executable . " " . configFile, emuPath)
- /*
- If (FileExist(stateName) and autoResume="true") {
- clipboard = %stateName%
- WinWait("ahk_class AmigaPowah")
- Send {F7} ; open load state window
- WinWait("Restore a WinUAE snapshot file")
- Send ^v
- Send {Enter}
- }
- */
- WinWait("FS-UAE ahk_class SDL_app")
- WinWaitActive("FS-UAE ahk_class SDL_app")
- BezelDraw()
- FadeInExit()
- Process("WaitClose", executable)
- 7zCleanUp()
- BezelExit()
- FadeOutExit()
- /*
- GroupAdd,DIE,DIEmWin
- GroupClose, DIE, A
- */
- ExitModule()
- CloseProcess:
- ; If (FileExist(stateName) and autoResume="true")
- ; Send {F5} ; open save state window
- FadeOutStart()
- ; If (FileExist(stateName) and autoResume="true") {
- ; clipboard = %stateName% ; just in case something happened to clipboard in between start of module to now
- ; WinWait("Save a WinUAE snapshot file")
- ; Send ^v
- ; Send {Enter}
- ; Sleep, 50 ; always give time for a file operation to occur before closing an app
- ; }
- WinClose("FS-UAE ahk_class SDL_app")
- Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement