Jump to content

Emulators

189 files

  1. MEmu := "Final Burn Alpha"
    MEmuV := "v0.2.97.42"
    MURL := ["http://www.barryharris.me.uk/"]
    MAuthor := ["djvj"]
    MVersion := "2.0.4"
    MCRC := ""
    iCRC := ""
    MID := ""
    MSystem := ["Capcom Play System","Capcom Play System II","Capcom Play System III","Cave","Data East","Psikyo","Technos Arcade","Toaplan","Irem M62","Kaneko","NMK16","Konami","PolyGame Master IGS","SNK Neo Geo MVS"]
    ;----------------------------------------------------------------------------
    StartModule()
    FadeInStart()
    primaryExe := new Process(emuPath . "\" . executable)                    ; instantiate emulator executable object
    emuPrimaryWindow := new Window(new WindowTitle(,"FB Alpha"))    ; instantiate primary emulator window object
    emuLoadingWindow := new Window(new WindowTitle(,"32770"))
    If StringUtils.Contains(systemname,"NEC TurboGrafx-16|NEC PC Engine|NEC SuperGrafx|Sega Mega Drive")
    {    ; The object controls how the module reacts to different systems. FBA can play a lot of systems, but the romName changes slightly so this module has to adapt 
        mType := Object("NEC TurboGrafx-16","tg_","NEC PC Engine","pce_","NEC SuperGrafx","sgx_","Sega Mega Drive","md_")
        ident := mType[systemName]    ; search 1st array for the systemName identifier mednafen uses
        If !ident
            ScriptError("Your systemName is: " . systemName . "`nIt is not one of the known supported systems for this FBA module: " . moduleName)
    }
    fbaRomName := (If ident ? ident : "") . romName    ; FBA requires an identifier prefix attached to the romName which tells FBA what system to run
    hideEmuObj := Object(emuLoadingWindow,0,emuPrimaryWindow,1)
    HideAppStart(hideEmuObj,hideEmu)
    primaryExe.Run(" """ . fbaRomName . """")
    emuPrimaryWindow.Wait()
    emuPrimaryWindow.WaitActive()
    ; This loops detects the rom loading window and breaks when it's done. Only here to avoid using too many WinWait commands from all the odd flashing the emu does.
    Loop {
        If emuLoadingWindow.Active()
            Break
        TimerUtils.Sleep(50,0)
    }
    ; This loop detects when the emu window is done flashing back and forth between your FE and the emu window and is actually in the game.
    Loop {
        If (x = 10)
            Break
        If emuPrimaryWindow.Active()
            x++
        emuPrimaryWindow.Activate()
        TimerUtils.Sleep(50,0)
    }
    HideAppEnd(hideEmuObj,hideEmu)
    FadeInExit()
    emuPrimaryWindow.Activate()
    CloseProcess:
    FadeOutStart()
    emuPrimaryWindow.Close()
    TimerUtils.Sleep(50,0)
    Run, wmic process where name='RocketLauncher.exe' delete
    ExitModule()
        
    ~Escape::
    Process, Close, fba64.exe
    ExitAPP
    return
    Final Burn Alpha "config keys"        
      1) Pour définir une configuration par défaut, nous allons prendre un jeu « modèle ». Nous allons définir les touches pour ce jeu et les recopier pour tout notre set. Dans mon cas, j'ai choisi Street Fighter 2, car ce jeu utilise 6 boutons, soit le grand maximum dans 99 % des jeux d'arcades. Mais si vous prévoyez de ne jouer qu'à des jeux utilisant trois boutons, vous pouvez choisir un jeu n'utilisant que trois boutons.

    Ouvrez la rom de Street Fighter 2, allez dans game>map game input et définissez les contrôles comme suit :

    P1 up: Joystick haut
    P1 down: Joystick bas
    P1 left: Joystick gauche
    P1 droite: Joystick droit
    P1 weak punch : bouton 1
    P1 medium punch : bouton 2
    P1 strong punch : bouton 3
    P1 weak kick : bouton 4
    P1 medium kick : bouton 5
    P1 strong kick : bouton 6
    Coin1 bouton 7
    P1 start bouton 8

    Notez bien que les �bouton 1�, �bouton 2�, etc.� seront les futurs paramètres par défaut de votre émulateur !

    Ne TOUCHEZ SURTOUT PAS aux trois menus du bas (laissez les en « blanc ») et cliquez sur ok

    Testez le jeu pour voir si votre configuration a bien été prise en compte et fermez la rom et l'émulateur.

    2) Rendez vous dans le dossier config>games et trouvez le fichier correspondant à Street Fighter 2 (normalement c'est sf2). Copiez ce fichier dans le dossier preset et renommez le en « défaut » par exemple.

    Ouvrez ensuite ce fichier et modifiez le comme suit :

    Remplacez tous les noms propres au jeu comme bouton 1 pour « weak punch », bouton 4 pour « medium kick » par « fire 1 », « fire 4 » etc� « fire » étant une dénomination générique reconnue par tous les jeux et tous les systèmes. Ne touchez SURTOUT PAS aux valeurs hexadécimales (les « switch »), sinon c'est comme si vous n'aviez rien fait� Vous devriez avoir à la fin un fichier qui se présente comme ceci :

    input "P1 Coin" switch 0x4085
    input "P1 Start" switch 0x4084
    input "P1 Up" switch 0x4012
    input "P1 Down" switch 0x4013
    input "P1 Left" switch 0x4010
    input "P1 Right" switch 0x4011
    input "P1 fire 1" switch 0x4080
    input "P1 fire 2" switch 0x4083
    input "P1 fire 3" switch 0x4089
    input "P1 fire 4" switch 0x4081
    input "P1 fire 5" switch 0x4082
    input "P1 fire 6" switch 0x4088

    Sauvegardez votre fichier et retournez dans l'émulateur, chargez un jeu au hasard.

    3) Dans « map game inputs », dans les boites du bas choisissez « player 1 » dans la seconde boite il devrait apparaître dans le menu déroulant le fichier « défaut » que vous avez crée juste avant dans les presets. Sélectionnez le. Dans la fenêtre de droite, si on vous le propose, choisissez une option. Perso, je prends toujours « auto-center » ça marche très bien.. Cliquez sur « make default » et les valeurs que vous avez définies sont attribuées. Vérifiez si les contrôles sont conformes à vos souhaits en testant le jeu ; si vous avez bien tout suivis jusque la et que vous étiez sûr de votre config ça devrait être bon. Sinon le cas échéant rééditez « map game input » avec un jeu qui vous convient mieux que Street Fighter 2 et recommencez la procédure depuis l'étape 1�

    4) Ensuite rechargez un autre jeu et vérifiez dans « map game input ». Théoriquement, les contrôles devraient être ceux que vous avez définis par défaut et vous ne devriez rien avoir à toucher : les contrôles par défaut sont configurés !

    Même si ces réglages conviennent à la plupart des jeux se jouant au joystick, certains jeux particuliers n'en tiendront pas compte. Les jeux neo-geo par exemple. Mais il suffit simplement pour ceux-ci de répeter l'étape 3 une seule fois. Pour les jeux de course et utilisant « volant » et/ou « pédales » c'est un peu plus compliqué ; et je ne peux que vous conseiller dans ces cas la d'utiliser les « preset » proposés par défaut par l'émulateur ou d'éditer les jeux un par un�Mais les plus courageux peuvent faire un nouvel ini spécial « jeux de courses» en suivant la procédure. 
      Capcom CPS1 (1988–1995): https://youtu.be/3Dhev0IFop8 Capcom CPS2 (1993–2003): https://youtu.be/1cpznsRrkz4 Capcom CPS3 (1996–1999): https://youtu.be/uUDSLZfYoM4 Cave (First generation: 1994–2001): https://youtu.be/QZYq0GfT5IA Data East DEC-0 (1980–1985), DEC-8 (1986-1988) and DECO IC16 (1987-1990): https://youtu.be/Rk4_GJ0VXr4 Galaxian based hardware (1979-1982) Irem M62 (1984-1986), M63 (1984-1985), M72 (1987-1990), M90 (1991), M92 (1991-1994) and M107 hardware (1993-1995) Kaneko 16 (Kaneko AX System. 1991-1995.) 
    Neo Geo (MVS hardware: 1990–2004): https://youtu.be/Tii7q0XIxrw
    NMK16 (Nihon Maicom Kaihatsu. 1989-2001): https://youtu.be/byi-48cFb24 Pacman based hardware (1980-1983) PGM (PolyGame Master. 1997–2005): https://youtu.be/22scpU-20wg Psikyo 68EC020 (1st Generation: https://youtu.be/etUWGa48oa0 1993–1996) and SH-2 (1997–2002) based hardware Sega System 1 (1983–1987), System 16 (And similar. 1985–1994), System 18 (1989–1992), X-Board (1987–1990), Y-Board (1988–1991) Super Kaneko Nova System (1996–2002): https://youtu.be/Xm90a1R5xaY Toaplan (Company: 1984-1994. V1 hardware: 1988-1991; V2: 1991-1999.): https://youtu.be/GJamPY-DPR8
    38 0
  2. MEmu := "Cxbx-Reloaded"
    MEmuV := "nightly"
    MURL := ["https://github.com/Cxbx-Reloaded/Cxbx-Reloaded"]
    MAuthor := ["teeedubb"]
    MVersion := "1.0"
    MSystem := ["Xbox"]
    ;----------------------------------------------------------------------------
    ; Notes: 
    ;Based on djvj's cxbx module
    ;
    ;----------------------------------------------------------------------------
    StartModule()
    FadeInStart()
    settingsFile := modulePath . "\" . moduleName . ".ini"
    Fullscreen := IniReadCheck(settingsFile, "settings", "Fullscreen","true",,1)
    7z(romPath, romName, romExtension, 7zExtractPath)
    ; Setting Fullscreen setting in registry if it doesn't match what user wants above
    currentFullScreen := ReadReg("Fullscreen")
    If ( Fullscreen != "true" And currentFullScreen = 1 )
        WriteReg("Fullscreen", 0)
    Else If ( Fullscreen = "true" And currentFullScreen = 0 )
        WriteReg("Fullscreen", 1)
        Run(executable . " """ . romPath . "\default.xbe""", emuPath)
    WinWait("Cxbx-Reloaded ahk_class WndMain")
    WinWaitActive("Cxbx-Reloaded ahk_class WndMain")
    FadeInExit()
    Process("WaitClose", executable)
    7zCleanUp()
    FadeOutExit()
    ExitModule()

    ReadReg(var1) {
        RegRead, regValue, HKEY_CURRENT_USER, Software\Cxbx-Reloaded\XBVideo, %var1%
        Return %regValue%
    }
    WriteReg(var1, var2) {
        RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Cxbx-Reloaded\XBVideo, %var1%, %var2%
    }
    CloseProcess:
        FadeOutStart()
        WinClose("Cxbx-Reloaded ahk_class WndMain")
    Return
    55 0
  3. Makaron est un émulateur Dreamcast/Naomi bien connu. Son émulation de la Naomi a été décliné sous deux version, la version T12.5 et la version T12.7. Puis, une version MakaronEX est apparu. Elle apportait d'avantage d'options et une interface graphique améliorée. Makaron EXcipit est une adaptation de la version 4.1 de MakaronEX pour Front-End. L'excellente émulation, avec un rendu graphique à l'échelle très proche de l'original, même sur un LCD, m'a incité à me pencher d'avantage sur cet émulateur que j'avais pourtant longtemps délaissé au profit de NullDC. Le but de Makaron EXcipit n'est pas d'améliorer l'émulation de Makaron, mais seulement de pouvoir plus facilement l'intégrer dans une borne. Améliorations apportées par rapport à MakaronEX 4.1 : Possibilité de lancer une émulation Dreamcast ou Naomi par ligne de commande. En effet, avec MakaronEX, il n'était possible de lancer l'émulation qu'à travers l'interface graphique ce qui retirait la possibilité de l'intégrer dans un Front-End. Possibilité de quitter l'émulation avec la touche Echap. En appuyant sur la touche Echap, il est possible de fermer l'émulateur proprement. Configuration des touches du 2ème Joueur pour l'émulation de la Naomi. En mode Naomi, il n'était pas possible de configurer les touches du clavier pour le 2ème joueur. Ce n'est malheureusement toujours pas possible via l'interface graphique, mais c'est en revanche possible via un fichier de paramètre. Installation : Dézipper l'archive dans le répertoire de votre choix. Exemple : C:\Makaron\ Copier les roms dans le dossier "Roms" Exemple : C:\Makaron\Roms\ Pour convertir vos Roms Naomi à partir du format MAME, au format Makaron/NullDC, vous pouvez utiliser Naomi Converter. Rappel : Pour transformer un rom Naomi NullDC (*.dat) au format Naomi Makaron (*.bin), il suffit de renommer l'extension. Exemple : C:\Makaron\Roms\ikaruga.dat :5n: C:\Makaron\Roms\ikaruga.bin Utilisation : Lancer l'interface graphique habituelle de MakaronEX Il est toujours possible de lancer l'interface graphique originale de MakaronEX en exécutant MakaronEX.exe à la racine de l'installation. Exemple : C:\Makaron\MakaronEX.exe Lancer l'émulation par ligne de commande C'est là donc la grande nouveauté. Pour lancer un rom Dreamcast, exécuté la commande suivante : [Répertoire d'installation]\Tools\Dreamcast.bat [Fichier rom] Exemple : C:\Makaron\Tools\Dreamcast.bat ikaruga.gdi Pour lancer un rom Naomi, exécuté la commande suivante : [Répertoire d'installation]\Tools\Naomi.bat [Fichier rom] Exemple : C:\Makaron\Tools\Naomi.bat karous.bin Par défaut, l'émulateur démarrera en version T12.5, si vous souhaitez préciser la version : [Répertoire d'installation]\Tools\Naomi.bat [Fichier rom] [Version de l'émulateur] Exemple : C:\Makaron\Tools\Naomi.bat trizeal.bin T12.7 Configuration des touches pour le 2ème joueur en mode Naomi Modifier simplement le fichier JVS.ini situé dans le dossier "Tools" Exemple : C:\Makaron\Tools\JVS.ini Makaron EXcipit effectuera automatiquement une sauvegarde de votre fichier original à chaque lancement, au cas où l'interface graphique écraserait votre configuration. Exemple : C:\Makaron\Naomi\JVS.bak Si vous souhaitez configurer rapidement les touches du 2ème joueur en passant par l'interface graphique de MakaronEX, il vous suffit de configurer les touches pour le Joueur 1, de fermer MakaronEX, et de récupérer les paramètres enregistré dans le fichier JVS.ini Exemple : C:\Makaron\Naomi\JVS.ini Puis de refaire la même manipulation avec le Joueur 2, de récupérer à nouveau le contenu du Joueur 1, mais cette fois ci, l'attribuer au Joueur 2 en remplaçant P1 par P2 et COIN1, par COIN2. Et d'enregistrer tout ça dans le fichier JVS.ini, mais dans "Tools" cette fois-ci. Exemple : C:\Makaron\Tools\JVS.ini Important : Tous les paramètres contenus dans le fichier JVS.ini situé dans le dossier "Naomi" seront systématiquement remplacés par ceux contenus dans le JVS.ini situé dans le dossier "Tools" Exemple du contenu de JVS.ini : CODE : TOUT SÉLECTIONNER [Keyboard] KEY_0x70 = FB_TEST KEY_0x71 = FB_SERVICE KEY_0x31 = P1_START KEY_0x35 = COIN1 KEY_0x26 = P1_UP KEY_0x28 = P1_DOWN KEY_0x25 = P1_LEFT KEY_0x27 = P1_RIGHT KEY_0xDC = P1_BUTTON1 KEY_0x4E = P1_BUTTON2 KEY_0x20 = P1_BUTTON3 KEY_0x10 = P1_BUTTON4 KEY_0x57 = P1_BUTTON5 KEY_0x58 = P1_BUTTON6 KEY_0x32 = P2_START KEY_0x36 = COIN2 KEY_0x52 = P2_UP KEY_0x46 = P2_DOWN KEY_0x44 = P2_LEFT KEY_0x47 = P2_RIGHT KEY_0x51 = P2_BUTTON1 KEY_0x53 = P2_BUTTON2 KEY_0x41 = P2_BUTTON3 KEY_0x5A = P2_BUTTON4 KEY_0x49 = P2_BUTTON5 KEY_0x4B = P2_BUTTON6 Et pour quitter, appuyer sur la touche Echap. A la place de faire successivement F8, pour arrêter l'émulation, et ALT+F4, pour fermer l'émulateur.
    MEmu := "MakaronEX"
    MEmuV := "v4.1"
    MURL := ["http://www.emu-land.net/consoles/dreamcast/emuls/windows"]
    MAuthor := ["djvj"]
    MVersion := "2.0.3"
    MCRC := ""
    iCRC := ""
    MID := ""
    MSystem := ["Sega Dreamcast","Sega Naomi"]
    ;----------------------------------------------------------------------------
    ; Notes:
    ; Set fullscreen via the variable below
    ;----------------------------------------------------------------------------
    StartModule()
    FadeInStart()
    primaryExe := new Emulator(emuPath . "\" . executable)                ; instantiate emulator executable object
    emuPrimaryWindow := new Window(new WindowTitle("MakaronEX","TForm1"))        ; instantiate primary emulator window object
    emuOpenWindow := new Window(new WindowTitle(dialogOpen . " ahk_class #32770","#32770"))
    fullscreen := moduleIni.Read("Settings", "Fullscreen","true",,1)
    enable2Players := moduleIni.Read("Settings", "Enable2Players","true",,1)
    hideEmuObj := Object(emuOpenWindow,0,emuPrimaryWindow,1)
    If StringUtils.Contains(systemName,"naomi")
        makINI := new IniFile(emuPath . "\Naomi\Naomi.ini")
    Else If StringUtils.Contains(systemName,"dreamcast|dc")
        makINI := new IniFile(emuPath . "\Dreamcast\Makaron.ini")
    Else
        ScriptError(systemName . " is not a recognized (aka supported) System Name for this module")
    makINI.CheckFile()
    currentFullScreen := makINI.Read("Settings","fullscreen")
    ; Setting Fullscreen setting in ini if it doesn't match what user wants above
    If (fullscreen != "true" && currentFullScreen = 1)
        makINI.Write(0,"Settings","fullscreen")
    Else If (fullscreen = "true" && currentFullScreen = 0)
        makINI.Write(1,"Settings","fullscreen")
    HideAppStart(hideEmuObj,hideEmu)
    primaryExe.Run("",(If InStr(systemName,"naomi") ? "hide":""))
    emuPrimaryWindow.Wait()
    emuPrimaryWindow.WaitActive()
    If StringUtils.Contains(systemName,"naomi")
    {    ; emuPrimaryWindow.GetControl("TToolBar1").ControlClick(,"L",1,"x240 y5")    ; Click Naomi on Toolbar
        emuPrimaryWindow.CreateControl("TToolBar1")        ; instantiate new control for TToolBar1
        emuPrimaryWindow.GetControl("TToolBar1").Control("Check")    ; Check control TToolBar1, Somehow this selects Naomi on Toolbar... mmkay
        emuPrimaryWindow.MenuSelectItem("File","Open Rom","Open 12.5") ; Open Naomi T12.7 roms
        emuPVRWindow := new Window(new WindowTitle("NAOMI - PVR","PVR2"))
    } Else If StringUtils.Contains(systemName,"dreamcast|dc")
    {    emuPrimaryWindow.MenuSelectItem("File","Open Image") ; Open Image for dreamcast
        emuPVRWindow := new Window(new WindowTitle("Makaron - PVR","PVR2"))
    }
    emuPVRWindow.CreateControl("TopMost")    ; instantiate new TopMost control for PVRWindow
    emuOpenWindow.Wait()
    emuOpenWindow.WaitActive()
    emuOpenWindow.OpenROM(romPath . "\" . romName . romExtension)
    emuPVRWindow.Wait()
    emuPVRWindow.WaitActive()
    If (enable2Players = "true")
        emuPVRWindow.PostMessage("0x111","40115")    ; Enable 2 players
    HideAppEnd(hideEmuObj,hideEmu)
    FadeInExit()
    primaryExe.Process("WaitClose")
    FadeOutExit()
    ExitModule()

    HaltEmu:
        If (fullscreen = "true")
            disableActivateBlackScreen := "true"
    Return
    CloseProcess:
        FadeOutStart()
        If emuPrimaryWindow.Active()
            emuPrimaryWindow.Close()
        Else {
            emuPVRWindow.GetControl("TopMost").Send("{F8}")    ; Send F8 to TopMost control
            TimerUtils.Sleep(1000)    ; required to help prevent an Invalid Filename error from showing. It can still show if user exits emu too fast after loading though. Nothing can be done about this.
            emuPrimaryWindow.Wait()
            emuPrimaryWindow.Activate()
            emuPrimaryWindow.Close()
        }
    Return
     
    28 0
  4. MEmu := "Demul"
    MEmuV := "v0.7a 221215"
    MURL := ["http://demul.emulation64.com/"]
    MAuthor := ["djvj","bleasby"]
    MVersion := "2.1.10"
    MCRC := 
    iCRC := 
    MID := "636025126320548084"
    MSystem := ["Cave 3rd","Gaelco","Gaelco 3D","Sammy Atomiswave","Sega System SP","Sega Dreamcast","Sega Hikaru","Sega Naomi","Sega Naomi 2"]
    ;----------------------------------------------------------------------------
    ; Notes:
    ; Required - control and nvram files setup for each game/control type
    ; Required - moduleName ini example can be found on GIT in the Demul module folder
    ; moduleName ini must be placed in same folder as this module if you use the provided example, just be sure to rename it to just Demul.ini first so it matches the module's name
    ; GDI images must match mame zip names and be extracted and have a .dat extension
    ; Rom_Extension should include 7z|zip|gdi|cue|cdi|chd|mds|ccd|nrg
    ; Module will automatically set your rom path for you on first launch
    ;
    ; Make sure the awbios, dc, hikaru, naomi, naomi2, saturn.zip bios archives are in any of your rom paths as they are needed to play all the games.
    ; Set your Video Plugin to gpuDX11 and set your desired resolution there
    ; In case your control codes do not match mine, set your desired control type in demul, then open the demul.ini and find section PORTB and look for the device key. Use this number instead of the one I provided
    ; gpuDX10 and gpuDX11 are the only supported plugins. You can define what plugin you want to use for each game in the module settings in RocketLauncherUI
    ; Read the tooltip for the Fullscreen module setting in RocketLauncherUI on how to control windowed fullscreen, true fullscreen, or windowed mode
    ; Windowed fullscreen will take effect the 2nd time you run the emu. It has to calculate your resolution on first run.
    ;
    ; Controls:
    ; Start a game of each control type (look in the RocketLauncherUI's module settings for these types, they all have their own tabs) and configure your controls to play the game. After configuring your controls manually in Demul, open padDemul.ini and Copy/paste the JAMMA0_0 and JAMMA0_1 (for naomi) or the ATOMISWAVE0_0 and ATOMISWAVE0_1 (for atomiswave) into RocketLauncherUI's module settings for each controls tab (standard, sfstyle, etc).
    ; Each pair of control tabs designates another real arcade control schema for a grouping of games. Demul does not handle this like MAME, so the module does instead.
    ;
    ; Gaelco:
    ; There is no known way to launch the desired Gaelco rom from CLI. You will always be presented with the rom selection window on launch.
    ; GPUDX11 does not yet support Gaelco in true fullscreen mode. Either use DX10 which does support fullscreen for Gaelco
    ; or if using DX11, choose fullscreen in the video options and then match the windows resolution to your desktop. This will give a pseudo fullscreen mode.
    ;
    ; Sega Hikaru:
    ; Windowed Fullscreen doesn't seem to work as demul does not allow stretching of its window
    ;
    ; Troubleshooting:
    ; For some reason demul's ini files can get corrupted and ahk can't read/write to them correctly.
    ; If your ini keys are not being read or not writing to their existing keys in the demul inis, create a new file and copy/paste everything from the old ini into the new one and save.
    ; If you use Fade_Out, the module will disable it. Demul crashes when Fade tries to draw on top of it in windowed and fullscreen modes.
    ;
    ;Bezel:
    ;If the game has the wrong aspect ratio, go to demul module settings, rom settings, and set the aspect ratio option to stretch. The game will follow the aspect ratio defined by the bezel.
    ;----------------------------------------------------------------------------
    StartModule()
    BezelGUI()
    ExtraFixedResBezelGUI()
    FadeInStart()
    primaryExe := new Emulator(emuPath . "\" . executable)            ; instantiate emulator executable object
    emuPrimaryWindow := new Window(new WindowTitle("","window"))    ; instantiate primary emulator window object
    emuLCD0Window := new Window(new WindowTitle("LCD 0","LCD 0"))
    -run=%2% -rom=%1%
    sleep 4000
    MouseMove, 1920,1080
    ; This object controls how the module reacts to different systems. Demul can play a few systems, but needs to know what system you want to run, so this module has to adapt.
    mType := Object("Cave 3rd","cave3rd","Gaelco","gaelco","Gaelco 3D","gaelco","Sammy Atomiswave","awave","Sega System SP","naomi","Sega Dreamcast","dc","Sega Hikaru","hikaru","Sega Naomi","naomi","Sega Naomi 2","naomi2","Demul Gun Games","awave")
    ident := mType[systemName]    ; search object for the systemName identifier Demul uses
    If !ident
        ScriptError("Your systemName is: " . systemName . "`nIt is not one of the known supported systems for this Demul module: " . moduleName)
    DemuleIni := new IniFile(emuPath . "\Demul.ini")

    demuleIniEncoding := RLObject.getFileEncoding(DemuleIni.FileFullPath)
    If demuleIniEncoding {
        If (demuleIniEncoding = "ERROR")
            RLLog.Warning("Module - Demul.ini set to Read-only and BOM cannot be changed. Check the DLL log for further details: " . DemuleIni.FileFullPath)
        Else {
            RLLog.Info("Module - Recreating " . DemuleIni.FileFullPath . " as ANSI because UTF-8 format cannot be read")
            If RLObject.removeBOM(DemuleIni.FileFullPath)
                RLLog.Info("Module - Successfully converted " . DemuleIni.FileFullPath . " to ANSI")
            Else
                RLLog.Error("Module - Failed to convert " . DemuleIni.FileFullPath . " to ANSI")
        }
    }
    maxHideTaskbar := moduleIni.Read("Settings", "MaxHideTaskbar", "true",,1)
    controllerCode := moduleIni.Read("Settings", "ControllerCode", "16777216",,1)
    mouseCode := moduleIni.Read("Settings", "MouseCode", "131072",,1)
    keyboardCode := moduleIni.Read("Settings", "KeyboardCode", "1073741824",,1)
    lightgunCode := moduleIni.Read("Settings", "LightgunCode", "-2147483648",,1)
    hideDemulGUI := moduleIni.Read("Settings", "HideDemulGUI", "true",,1)
    PerGameMemoryCards := moduleIni.Read("Settings", "PerGameMemoryCards", "true",,1)
    memCardPath := moduleIni.Read("Settings", "MemCardPath", emuPath . "\memsaves",,1)
    memCardPath := AbsoluteFromRelative(emuPath, memCardPath)
    fullscreen := moduleIni.Read(romName . "|Settings", "Fullscreen", "windowedfullscreen",,1)
    plugin := moduleIni.Read(romName . "|Settings", "Plugin", "gpuDX11",,1)
    shaderUsePass1 := moduleIni.Read(romName . "|Settings", "ShaderUsePass1", "false",,1)
    shaderUsePass2 := moduleIni.Read(romName . "|Settings", "ShaderUsePass2", "false",,1)
    shaderNamePass1 := moduleIni.Read(romName . "|Settings", "ShaderNamePass1",,,1)
    shaderNamePass2 := moduleIni.Read(romName . "|Settings", "ShaderNamePass2",,,1)
    listSorting := moduleIni.Read(romName . "|Settings", "ListSorting", "true",,1)
    OpaqueMod := moduleIni.Read(romName . "|Settings", "OModifier", "true",,1)
    TransMod := moduleIni.Read(romName . "|Settings", "TModifier", "true",,1)
    internalResolutionScale := moduleIni.Read(romName . "|Settings", "InternalResolutionScale", "1",,1)
    videomode := moduleIni.Read(romName . "|Settings", "VideoMode", "0",,1)
    aspectRatio := moduleIni.Read(romName . "|Settings", "AspectRatio", "1",,1)
    MaxLayers := moduleIni.Read(romName . "|Settings", "MaxLayers", "32",,1)
    demulShooterEnabled := moduleIni.Read(romName . "|Settings", "DemulShooterEnabled", "false",,1)
    showVMU := moduleIni.Read("Settings", "showVMU", "true",,1)
    VMU1Pos := moduleIni.Read("Settings", "VMU1Pos", "topLeft",,1) ; topRight, topCenter, topLeft, leftCenter, bottomLeft, bottomCenter, bottomRight, rightCenter 
    VMU2Pos := moduleIni.Read("Settings", "VMU2Pos", "topRight",,1) ; topRight, topCenter, topLeft, leftCenter, bottomLeft, bottomCenter, bottomRight, rightCenter 
    VMU3Pos := moduleIni.Read("Settings", "VMU3Pos", "bottomLeft",,1) ; topRight, topCenter, topLeft, leftCenter, bottomLeft, bottomCenter, bottomRight, rightCenter 
    VMU4Pos := moduleIni.Read("Settings", "VMU4Pos", "bottomRight",,1) ; topRight, topCenter, topLeft, leftCenter, bottomLeft, bottomCenter, bottomRight, rightCenter 
    VMUHideKey := moduleIni.Read("Settings", "VMUHideKey","F10",,1)
    Bios := moduleIni.Read(romName, "Bios",,,1)
    LoadDecrypted := moduleIni.Read(romName, "LoadDecrypted",,,1)    ; not currently supported
    ; Read all the control values
    controls := moduleIni.Read(romname, "Controls", "standard",,1)    ; have to read this first so the below ini reads work
    push1_0 := moduleIni.Read(controls . "_JAMMA0_0", "push1",,,1)
    push2_0 := moduleIni.Read(controls . "_JAMMA0_0", "push2",,,1)
    push3_0 := moduleIni.Read(controls . "_JAMMA0_0", "push3",,,1)
    push4_0 := moduleIni.Read(controls . "_JAMMA0_0", "push4",,,1)
    push5_0 := moduleIni.Read(controls . "_JAMMA0_0", "push5",,,1)
    push6_0 := moduleIni.Read(controls . "_JAMMA0_0", "push6",,,1)
    push7_0 := moduleIni.Read(controls . "_JAMMA0_0", "push7",,,1)
    push8_0 := moduleIni.Read(controls . "_JAMMA0_0", "push8",,,1)
    service_0 := moduleIni.Read(controls . "_JAMMA0_0", "SERVICE",,,1)
    start_0 := moduleIni.Read(controls . "_JAMMA0_0", "START",,,1)
    coin_0 := moduleIni.Read(controls . "_JAMMA0_0", "COIN",,,1)
    digitalup_0 := moduleIni.Read(controls . "_JAMMA0_0", "DIGITALUP",,,1)
    digitaldown_0 := moduleIni.Read(controls . "_JAMMA0_0", "DIGITALDOWN",,,1)
    digitalleft_0 := moduleIni.Read(controls . "_JAMMA0_0", "DIGITALLEFT",,,1)
    digitalright_0 := moduleIni.Read(controls . "_JAMMA0_0", "DIGITALRIGHT",,,1)
    analogup_0 := moduleIni.Read(controls . "_JAMMA0_0", "ANALOGUP",,,1)
    analogdown_0 := moduleIni.Read(controls . "_JAMMA0_0", "ANALOGDOWN",,,1)
    analogleft_0 := moduleIni.Read(controls . "_JAMMA0_0", "ANALOGLEFT",,,1)
    analogright_0 := moduleIni.Read(controls . "_JAMMA0_0", "ANALOGRIGHT",,,1)
    analogup2_0 := moduleIni.Read(controls . "_JAMMA0_0", "ANALOGUP2",,,1)
    analogdown2_0 := moduleIni.Read(controls . "_JAMMA0_0", "ANALOGDOWN2",,,1)
    analogleft2_0 := moduleIni.Read(controls . "_JAMMA0_0", "ANALOGLEFT2",,,1)
    analogright2_0 := moduleIni.Read(controls . "_JAMMA0_0", "ANALOGRIGHT2",,,1)
    push1_1 := moduleIni.Read(controls . "_JAMMA0_1", "push1",,,1)
    push2_1 := moduleIni.Read(controls . "_JAMMA0_1", "push2",,,1)
    push3_1 := moduleIni.Read(controls . "_JAMMA0_1", "push3",,,1)
    push4_1 := moduleIni.Read(controls . "_JAMMA0_1", "push4",,,1)
    push5_1 := moduleIni.Read(controls . "_JAMMA0_1", "push5",,,1)
    push6_1 := moduleIni.Read(controls . "_JAMMA0_1", "push6",,,1)
    push7_1 := moduleIni.Read(controls . "_JAMMA0_1", "push7",,,1)
    push8_1 := moduleIni.Read(controls . "_JAMMA0_1", "push8",,,1)
    service_1 := moduleIni.Read(controls . "_JAMMA0_1", "SERVICE",,,1)
    start_1 := moduleIni.Read(controls . "_JAMMA0_1", "START",,,1)
    coin_1 := moduleIni.Read(controls . "_JAMMA0_1", "COIN",,,1)
    digitalup_1 := moduleIni.Read(controls . "_JAMMA0_1", "DIGITALUP",,,1)
    digitaldown_1 := moduleIni.Read(controls . "_JAMMA0_1", "DIGITALDOWN",,,1)
    digitalleft_1 := moduleIni.Read(controls . "_JAMMA0_1", "DIGITALLEFT",,,1)
    digitalright_1 := moduleIni.Read(controls . "_JAMMA0_1", "DIGITALRIGHT",,,1)
    analogup_1 := moduleIni.Read(controls . "_JAMMA0_1", "ANALOGUP",,,1)
    analogdown_1 := moduleIni.Read(controls . "_JAMMA0_1", "ANALOGDOWN",,,1)
    analogleft_1 := moduleIni.Read(controls . "_JAMMA0_1", "ANALOGLEFT",,,1)
    analogright_1 := moduleIni.Read(controls . "_JAMMA0_1", "ANALOGRIGHT",,,1)
    analogup2_1 := moduleIni.Read(controls . "_JAMMA0_1", "ANALOGUP2",,,1)
    analogdown2_1 := moduleIni.Read(controls . "_JAMMA0_1", "ANALOGDOWN2",,,1)
    analogleft2_1 := moduleIni.Read(controls . "_JAMMA0_1", "ANALOGLEFT2",,,1)
    analogright2_1 := moduleIni.Read(controls . "_JAMMA0_1", "ANALOGRIGHT2",,,1)
    ;Bezel settings
    bezelTopOffset := moduleIni.Read(romName . "|Settings", "Bezel_Top_Offset","0",,1)
    bezelBottomOffset := moduleIni.Read(romName . "|Settings", "Bezel_Bottom_Offset","0",,1)
    bezelRightOffset := moduleIni.Read(romName . "|Settings", "Bezel_Right_Offset", "0",,1)
    bezelLeftOffset := moduleIni.Read(romName . "|Settings", "Bezel_Left_Offset", "0",,1)
    If (plugin = "gpuDX11ng")    ; this is for legacy support. Original demul 0.7 used gpuDX11ng
        plugin := "gpuDX11old"
    If (InStr(systemName, "Hikaru") && plugin != "gpuDX11")
        plugin := "gpuDX11"        ; Hikaru does not work with gpuDX10 gpu plugin, setting it dumps an error
    ; Verify user set desired gpu plugin name correctly
    If (plugin != "gpuDX11old" && plugin != "gpuDX11" && plugin != "gpuDX10" && plugin != "")
        ScriptError(plugin . " is not a supported gpu plugin.`nLeave the plugin blank to use the default ""gpuDX11"".`nValid options are gpuDX11old, gpuDX11 or gpuDX10.")
    ; Read and write videomode value for cable type
    rvideomode := DemuleIni.Read("main", "videomode")
    RLLog.Info("Module - Demul is reading the config with videomode = " . rvideomode)
    DemuleIni.Write(videomode, "main", "videomode")
    RLLog.Info("Module - Demul is updating the config with videomode = " . videomode)
    ; Handle Demul's rom paths so the user doesn't have to
    romPathCount := DemuleIni.Read("files", "romsPathsCount")
    RLLog.Info("Module - Demul is configured with " . romPathCount . " rom path(s). Scanning these for a romPath to this rom.")
    Loop % romPathCount
    {    demulRomPath := A_Index - 1    ; rompaths in demul start with 0
        path%A_Index% := DemuleIni.Read("files", "roms" . demulRomPath)
        RLLog.Info("Module - Path" . demulRomPath . ": " . path%A_Index%)
        ; msgbox % path%A_Index%
        If (path%A_Index% = romPath . "\")    ; demul tacks on the backslash at the end
        {    romPathFound := 1    ; flag that demul has this romPath in its config and no need to add it
            RLLog.Info("Module - Stopping search because Demul is already configured with the correct romPath to this rom: " . path%A_Index%)
            Break    ; stop looking for a correct romPath
        }
    }
    If !romPathFound    ; if demul doesn't have the romPath in its ini, add it
    {    RLLog.Warning("Module - Demul does not have this romPath in Demul.ini, adding it for you.")
        nextPath := romPathCount + 1    ; add 1 to the romPathCount and write that to the ini
        DemuleIni.Write(nextPath, "files", "romsPathsCount")
        DemuleIni.Write(romPath . "\", "files", "roms" . romPathCount)    ; write the rompath to the ini
    }
    ; Force Fade_Out to disabled as it causes demul to not close properly
    ; fadeOut = false
    ; RLLog.Warning("Module - Turning off Fade_Out because it doesn't let Demul exit properly.")
    GpuIni := new IniFile(emuPath . "\" . plugin . ".ini")
    GpuIni.CheckFile("Please run Demul manually first and select the " . plugin . " gpu plugin so it creates this file for you: " . GpuIni.FileFullPath)
    demulFileEncoding := RLObject.getFileEncoding(GpuIni.FileFullPath)
    If demulFileEncoding {
        If (demulFileEncoding = "ERROR")
            RLLog.Warning("Module - GPU ini set to Read-only and BOM cannot be changed. Check the DLL log for further details: " . GpuIni.FileFullPath)
        Else {
            RLLog.Info("Module - Recreating " . GpuIni.FileFullPath . " as ANSI because UTF-8 format cannot be read")
            If RLObject.removeBOM(GpuIni.FileFullPath)
                RLLog.Info("Module - Successfully converted " . GpuIni.FileFullPath . " to ANSI")
            Else
                RLLog.Error("Module - Failed to convert " . GpuIni.FileFullPath . " to ANSI")
        }
    }
    BezelStart()
    ; Setting emu resolution if bezel is enabled 
    If (BezelPath)
    {    If (plugin = "gpuDX11" || plugin = "gpuDX11old") {
            GpuIni.Write(bezelScreenWidth, "resolution", "Width")
            GpuIni.Write(bezelScreenHeight, "resolution", "Height")
        } Else {
            GpuIni.Write(bezelScreenWidth, "resolution", "wWidth")
            GpuIni.Write(bezelScreenHeight, "resolution", "wHeight")
        }
    }
    ; This updates the DX11gpu ini file to turn List Sorting on or off. Depending on the games, turning this on for some games may remedy missing graphics, having it off on other games may fix corrupted graphics. Untill they improve the DX11gpu, this is the best it's gonna get.
    If (ListSorting = "true")
        GpuIni.Write(0, "main", "AutoSort")
    Else
        GpuIni.Write(1, "main", "AutoSort")
        
    ; This will set the Opaque or Trans modifier for each game
    If (OpaqueMod = "true")
        GpuIni.Write(0, "main", "OModifier")
    Else
        GpuIni.Write(1, "main", "OModifier")
    If (TransMod = "true")
        GpuIni.Write(0, "main", "TModifier")
    Else
        GpuIni.Write(1, "main", "TModifier")
    ; This updates the DX10gpu or DX11gpu ini file to the ratio and scale you want to use for this game
    GpuIni.Write(aspectRatio, "main", "aspect")
    GpuIni.Write(InternalResolutionScale, "main", "scaling")
    If (plugin = "gpuDX11" || plugin = "gpuDX11old") {
        GpuIni.Write(MaxLayers, "main", "MaxLayers")
    }
    ; This updates the demul.ini with your gpu plugin choice for the selected rom
    DemuleIni.Write(plugin . ".dll", "plugins", "gpu")
    ; This updates the demul.ini with your VMU display choice
    VMUscreendisable := If (showVMU = "true") ? "false" : "true"
    DemuleIni.Write(VMUscreendisable, "main", "VMUscreendisable")
     
     ; Shader Effects
    Loop, 2 {
        shaderUsePass%A_Index% := If (ShaderUsePass%A_Index% != "" and ShaderUsePass%A_Index% != "ERROR" ? (ShaderUsePass%A_Index%) : (GlobalShaderUsePass%A_Index%))    ; determine what shaderUsePass to use
        currentusePass%A_Index% := GpuIni.Read("shaders", "usePass" . A_Index)
        If (shaderUsePass%A_Index% = "true")
        {
            shaderNamePass%A_Index% := If (ShaderNamePass%A_Index% != "" and ShaderNamePass%A_Index% != "ERROR" ? (ShaderNamePass%A_Index%) : (GlobalShaderNamePass%A_Index%))    ; determine what shaderNamePass to use
            If !StringUtils.Contains(shaderNamePass%A_Index%,"FXAA|HDR-TV|SCANLINES|CARTOON|RGB DOT\(MICRO\)|RGB DOT\(TINY\)|BLUR")
                ScriptError(shaderNamePass%A_Index% . " is not a valid choice for a shader. Your options are FXAA, HDR-TV, SCANLINES, CARTOON, RGB DOT(MICRO), RGB DOT(TINY), or BLUR.")
            If (currentusePass%A_Index% = 0)
                GpuIni.Write(1, "shaders", "usePass" . A_Index)    ; turn shader on in gpuDX11 ini
            GpuIni.Write(shaderNamePass%A_Index%, "shaders", "shaderPass" . A_Index)    ; update gpuDX11 ini with the shader name to use
        }Else If (shaderUsePass%A_Index% != "true" and currentusePass%A_Index% = 1)
            GpuIni.Write(0, "shaders", "usePass" . A_Index)    ; turn shader off in gpuDX11 ini
    }
    If (ident = "dc")
    {
        7z(romPath, romName, romExtension, sevenZExtractPath)
        defaultIni := "[main]`r`nimageFileName = `r`nopenDialog = false"
        If (romExtension = ".cdi" || romExtension = ".mds" || romExtension = ".ccd" || romExtension = ".nrg" || romExtension = ".gdi" || romExtension = ".cue") {
            GdrImageIni := new IniFile(emuPath . "\gdrImage.ini")
            If !GdrImageIni.Exist() {
                GdrImageIni.Append(defaultIni)        ; Create a default gdrImage.ini in your emu folder if one does not exist already.
                ; GdrImageIni.Delete(gdrImageFile)    ; don't know why this was in the old module, no point in deleting the file I just made
            }
            TimerUtils.Sleep(500)
            DemuleIni.Write("gdrImage.dll", "plugins", "gdr")
            GdrImageIni.Write("false", "Main", "openDialog")
            GdrImageIni.Write(romPath . "\" . romName . romExtension, "Main", "imagefilename")
        } Else If (romExtension = ".chd")
        {
            GdrCHDIni := new IniFile(emuPath . "\gdrCHD.ini")
            If !GdrCHDIni.Exist() {
                GdrCHDIni.Append(defaultIni)        ; Create a default gdrCHD.ini in your emu folder if one does not exist already.
                ; GdrCHDIni.Delete(gdrCHDFile)    ; don't know why this was in the old module, no point in deleting the file I just made
            }
            TimerUtils.Sleep(500)
            GdrCHDIni.Write("false", "Main", "openDialog")
            DemuleIni.Write("gdrCHD.dll", "plugins", "gdr")
            GdrCHDIni.Write(romPath . "\" . romName . romExtension, "Main", "imagefilename")
        } Else
            ScriptError(romExtension . " is not a supported file type for this " . moduleName . " module.")
        DemuleIni.Write(1, "main", "region")    ; Set BIOS to Auto Region
    } Else {    ; all other systems, Naomi and Atomiswave
        ; This updates the demul.ini with your Bios choice for the selected rom
        If (Bios != "" && Bios != "ERROR") {
            Bios := StringUtils.RegExReplace(Bios,"\s.*")    ; Cleans off the added text from the key's value so only the number is left
            DemuleIni.Write("false", "main", "naomiBiosAuto")    ; turning auto bios off so we can use a specific one instead
            DemuleIni.Write(Bios, "main", "naomiBios")        ; setting specific bios user has set from the moduleName ini
        } Else
            DemuleIni.Write("true", "main", "naomiBiosAuto")    ; turning auto bios on if user did not specify a specific one
    }
    ; This section writes your custom keys to the padDemul.ini. Naomi games had many control panel layouts. The only way we can accomodate these differing controls, is to keep track of them all and write them to the ini at the launch of each game.
    ; First we check if the last controls used are the same as the game we want to play, so we don't waste time updating the ini if it is not necessary. For example playing 2 sfstyle type games in a row, we wouldn't need to write to the ini.
    ; This section tells demul what arcade control type should be connected to the game. Options are standard (aka controller), mouse, lightgun, or keyboard
    If (controls = "lightgun" || controls = "mouse") {
        RLLog.Info("Module - This game uses a Mouse or Lightgun control type.")
        DemuleIni.Write(MouseCode, "PORTB", "device")
    } Else If (controls = "keyboard") {
        RLLog.Info("Module - This game uses a Keyboard control type.")
        DemuleIni.Write(KeyboardCode, "PORTB", "device")
    } Else { ; accounts for all other control types
        RLLog.Info("Module - This game uses a standard (controller) control type.")
        DemuleIni.Write(ControllerCode, "PORTB", "device")
    }
    WriteControls(0,push1_0,push2_0,push3_0,push4_0,push5_0,push6_0,push7_0,push8_0,SERVICE_0,START_0,COIN_0,DIGITALUP_0,DIGITALDOWN_0,DIGITALLEFT_0,DIGITALRIGHT_0,ANALOGUP_0,ANALOGDOWN_0,ANALOGLEFT_0,ANALOGRIGHT_0,ANALOGUP2_0,ANALOGDOWN2_0,ANALOGLEFT2_0,ANALOGRIGHT2_0)
    WriteControls(1,push1_1,push2_1,push3_1,push4_1,push5_1,push6_1,push7_1,push8_1,SERVICE_1,START_1,COIN_1,DIGITALUP_1,DIGITALDOWN_1,DIGITALLEFT_1,DIGITALRIGHT_1,ANALOGUP_1,ANALOGDOWN_1,ANALOGLEFT_1,ANALOGRIGHT_1,ANALOGUP2_1,ANALOGDOWN2_1,ANALOGLEFT2_1,ANALOGRIGHT2_1)
    RLLog.Info("Module - Wrote " . controls . " controls to padDemul.ini.")
    ; This will check the save game files and create per game ones if enabled.
    If (PerGameMemoryCards = "true")
    {
        MemCardFolder := new Folder(memCardPath)
        DefaultMemCard := new File(memCardPath . "\default_vms.bin")    ; defining default blank VMU file
        If !DefaultMemCard.Exist("Folder")
            DefaultMemCard.CreateDir()    ; create memcard folder if it doesn't exist
        If defaultMemCard.Exist()
        {
            RLLog.Info("VMU - Default VMU file location - " . defaultMemCard.FileFullPath)
            Loop, 4
            {
                outerLoop := A_Index
                If (A_Index = 1)
                    contrPort := "A"
                Else If (A_Index = 2)
                    contrPort := "B"
                Else If (A_Index = 3)
                    contrPort := "C"
                Else If (A_Index = 4)
                    contrPort := "D"
                controllerPort%contrPort% := DemuleIni.Read("PORT" . contrPort, "device")
                RLLog.Info("VMU - Config for controller PORT" . contrPort . " = " . controllerPort%contrPort%)
                If (controllerPort%contrPort% = -1)
                    Continue
                Loop, 2
                {
                    SubCount := A_Index - 1
                    VMUPort%SubCount% := DemuleIni.Read("PORT" . contrPort, "port" . SubCount)
                    RLLog.Info("VMU - Config Plugin VMUPort" . contrPort . SubCount . " for controller PORT" . contrPort . " = " . VMUPort%SubCount%)
                    If (VMUPort%SubCount% <> -1)
                    {
                        VMUPortFile%SubCount% := DemuleIni.Read("VMS", "VMS" . contrPort . SubCount)
                        RLLog.Info("VMU - VMUPortFile" . contrPort . SubCount . " controllerVMU" . contrPort .    SubCount . " " . "VMS" . contrPort . SubCount . " = " . VMUPortFile%SubCount%)
                        memCardName := If romTable[1,5] ? romTable[1,4] : romName    ; defining rom name for multi disc rom
                        PerGameVMUBin%A_Index% := new File(memCardPath . "\" . memCardName . "_vms_" . contrPort . SubCount . ".bin")
                        RLLog.Info("VMU - PerGameVMUBin = " . PerGameVMUBin%A_Index%.FileFullPath)
                        If PerGameVMUBin%A_Index%.Exist()
                        {
                            RLLog.Info("VMU - PerGameVMU file exists at " . PerGameVMUBin%A_Index%.FileFullPath)
                        } Else {
                            RLLog.Info("VMU - PerGameVMU file does not exist. So we will create one at " . PerGameVMUBin%A_Index%.FileFullPath)
                            DefaultMemCard.Copy(PerGameVMUBin%A_Index%.FileFullPath)
                        }
                        DemuleIni.Write(PerGameVMUBin%A_Index%.FileFullPath, "VMS", "VMS" . contrPort . SubCount)
                        RLLog.Info("VMU - PerGameVMU file written to " . DemuleIni.FileFullPath . " at section VMS to variable VMS" . contrPort . SubCount . " as " . PerGameVMUBin%A_Index%.FileFullPath)
                    } Else {
                        RLLog.Info("VMU - No VMU Plugged In.")
                    }
                }
            }
        } Else {
            RLLog.Info("VMU - No default VMU file at " . DefaultMemCard.FileFullPath)
        }
    }
    ; Setting demul to use true fullscreen if defined in settings.ini, otherwise sets demul to run windowed. This is for gpuDX11 plugin only
    If (plugin = "gpuDX11" || plugin = "gpuDX11old")
        If (fullscreen = "truefullscreen")
            GpuIni.Write(1, "main", "UseFullscreen")
        Else
            GpuIni.Write(0, "main", "UseFullscreen")
    If (fullscreen = "windowedfullscreen")
    {
        If (plugin = "gpuDX11" || plugin = "gpuDX11old") {
            GpuIni.Write(appWidthNew, "resolution", "Width")
            GpuIni.Write(appHeightNew, "resolution", "Height")
        } Else {
            GpuIni.Write(appWidthNew, "resolution", "wWidth")
            GpuIni.Write(appHeightNew, "resolution", "wHeight")
        }
        If (maxHideTaskbar = "true") {
            RLLog.Info("Module - Hiding Taskbar and Start Button.")
            MiscUtils.TaskBar("off")
        }
        ; Create black background to give the emu the fullscreen look
        RLLog.Info("Module - Creating black background to simulate a fullscreen look.")
        Gui demulGUI: -Caption +ToolWindow +0x08000000
        Gui demulGUI: Color, Black
        Gui demulGUI: Show, x0 y0 h%A_ScreenHeight% w%A_ScreenWidth%
    }
    If (ident != "dc" && demulShooterEnabled = "true") {    ; If demulshooter is enabled for this game, launch it with relevant options
        DemulShooterExe := New DemulShooter()
        DemulShooterExe.Launch("demul07a",romName,"-noresize")
    }
    TimerUtils.Sleep(250)
    ;  Construct the CLI for demul and send romName if naomi or atomiswave. Dreamcast needs a full path and romName.
    If (LoadDecrypted = "true")        ; decrypted naomi rom
        romCLI := "-customrom=" . """" . romPath . "\" . romName . ".bin"""
    Else If (ident = "dc")    ; dreamcast game
        romCLI := " -image=" . """" . romPath . "\" . romName . romExtension . """"
    Else    ; standard naomi rom
        romCLI := "-rom=" . romName
    hideEmuObj := Object(emuLCD0Window,0,emuPrimaryWindow,1)
    HideAppStart(hideEmuObj,hideEmu)
    primaryExe.Run(" -run=" . ident . " " . romCLI, (If hideDemulGUI = "true" ? "min" : ""))    ; launching minimized, then restoring later hides the launch completely
    TimerUtils.Sleep(1000) ; Need a second for demul to launch, increase if yours takes longer and the emu is NOT appearing and staying minimized. This is required otherwise bezel backgrounds do not appear
    DetectHiddenWindows, On
    If (hideDemulGUI = "true")
    {    
        emuPrimaryWindow.Restore()
        emuPrimaryWindow.Activate()
    }
    RLLog.Info("Module - Waiting for Demul to finish loading game.")
    winTextSplit := []
    Loop {    ; looping until demul is done loading rom and gpu starts showing frames
        TimerUtils.Sleep(200,0)
        winTitle := emuPrimaryWindow.GetTitle(0)    ; do not update the wintitle otherwise emu won't close on exit
        winTextSplit := StringUtils.Split(winTitle, A_Space)
        If (winTextSplit[5] = "gpu:" And winTextSplit[6] != "0" And winTextSplit[6] != "1")
            Break
    }
    RLLog.Info("Module - Demul finished loading game.")
    If (StringUtils.Contains(systemName, "Gaelco|Hikaru") && fullscreen = "truefullscreen")
        KeyUtils.Send("!{Enter}")    ; Automatic fullscreen seems to be broken in the Gaelco driver, must alt+Enter to get fullscreen
    ; This is where we calculate and maximize demul's window using our pseudo fullscreen code
    If (fullscreen = "windowedfullscreen")
    {
        emuPrimaryWindow.Maximize() ; this will take effect after you run demul once because we cannot stretch demul's screen while it is running.
    }
    BezelDraw()
    If (showVMU = "true"){
        ExtraFixedResBezel := new Window(new WindowTitle("ahk_ID " . extraFixedRes_Bezel_hwnd))
        SetTimer, CheckforVMU, 5000
    }
    HideAppEnd(hideEmuObj,hideEmu)
    FadeInExit()
    primaryExe.Process("WaitClose")
    If (fullscreen = "windowedfullscreen")
    {    Gui demulGUI: Destroy
        RLLog.Info("Module - Destroyed black gui background.")
    }
    If (ident = "dc")
        7zCleanUp()
    BezelExit()
    ExtraFixedResBezelExit()
    FadeOutExit()
    If (fullscreen = "windowedfullscreen" && maxHideTaskbar = "true") {
        RLLog.Info("Module - Showing Taskbar and Start Button.")
        MiscUtils.TaskBar("on")
    }
    ExitModule()
     ; Write new controls to padDemul.ini
    WriteControls(player,push1,push2,push3,push4,push5,push6,push7,push8,service,start,coin,digitalup,digitaldown,digitalleft,digitalright,analogup,analogdown,analogleft,analogright,analogup2,analogdown2,analogleft2,analogright2) {
        Global PadIni
        PadIni.Write(push1, "JAMMA0_" . player, "PUSH1")
        PadIni.Write(push2, "JAMMA0_" . player, "PUSH2")
        PadIni.Write(push3, "JAMMA0_" . player, "PUSH3")
        PadIni.Write(push4, "JAMMA0_" . player, "PUSH4")
        PadIni.Write(push5, "JAMMA0_" . player, "PUSH5")
        PadIni.Write(push6, "JAMMA0_" . player, "PUSH6")
        PadIni.Write(push7, "JAMMA0_" . player, "PUSH7")
        PadIni.Write(push8, "JAMMA0_" . player, "PUSH8")
        PadIni.Write(service, "JAMMA0_" . player, "SERVICE")
        PadIni.Write(start, "JAMMA0_" . player, "START")
        PadIni.Write(coin, "JAMMA0_" . player, "COIN")
        PadIni.Write(digitalup, "JAMMA0_" . player, "DIGITALUP")
        PadIni.Write(digitaldown, "JAMMA0_" . player, "DIGITALDOWN")
        PadIni.Write(digitalleft, "JAMMA0_" . player, "DIGITALLEFT")
        PadIni.Write(digitalright, "JAMMA0_" . player, "DIGITALRIGHT")
        PadIni.Write(analogup, "JAMMA0_" . player, "ANALOGUP")
        PadIni.Write(analogdown, "JAMMA0_" . player, "ANALOGDOWN")
        PadIni.Write(analogleft, "JAMMA0_" . player, "ANALOGLEFT")
        PadIni.Write(analogright, "JAMMA0_" . player, "ANALOGRIGHT")
        PadIni.Write(analogup2, "JAMMA0_" . player, "ANALOGUP2")
        PadIni.Write(analogdown2, "JAMMA0_" . player, "ANALOGDOWN2")
        PadIni.Write(analogleft2, "JAMMA0_" . player, "ANALOGLEFT2")
        PadIni.Write(analogright2, "JAMMA0_" . player, "ANALOGRIGHT2")
    }
    HaltEmu:
        If (fullscreen = "truefullscreen")
            KeyUtils.Send("!{Enter}")
        If VMUHideKey
            XHotKeywrapper(VMUHideKey,"VMUHide","OFF")
    Return
    RestoreEmu:
        If (fullscreen = "truefullscreen")
            KeyUtils.Send("!{Enter}")
        If (showVMU = "true") {
            Loop, 4
            {    VMUWindow%A_Index%.Set("Transparent", 0)
                VMUWindow%A_Index%.Activate()
                VMUWindow%A_Index%.Set("AlwaysOnTop", "On")
                ExtraFixedResBezel.Set("AlwaysOnTop", "On")
                If !(VMUHidden)
                    VMUWindow%A_Index%.Set("Transparent", "off")
            }
            emuPrimaryWindow.Activate()
        }
        If VMUHideKey
            XHotKeywrapper(VMUHideKey,"VMUHide","ON")
    Return
    HideGUIWindow:
        emuPrimaryWindow.Set("Transparent", "On")
        emuPrimaryWindow.Activate()        ; once activated, demul starts loading the rom
    Return
    CheckforVMU:
        Loop, 4
        {     Transform, letter, Chr, % A_Index + asc("A") - 1  ; transform number to letter
            If ((!(VMUWindow%A_Index%)) and (VMUScreenID%A_Index%:=WinExist("PORT " . letter . " VMU 0 ahk_class PORT " . letter . " VMU 0")))
            {    VMUWindow%A_Index% := new Window(new WindowTitle("ahk_ID " . VMUScreenID%A_Index%))    
                VMUWindow%A_Index%.Set("Transparent", 0)
                ExtraFixedResBezelDraw(VMUScreenID%A_Index%, "VMU",VMU%A_Index%Pos, 144, 96, 8, 8, 28, 😎
                VMUWindow%A_Index%.Activate()
                VMUWindow%A_Index%.Set("AlwaysOnTop", "On")
                ExtraFixedResBezel.Set("AlwaysOnTop", "On")
                VMU%A_Index%Draw := true
                If !(VMUHidden)
                    VMUWindow%A_Index%.Set("Transparent", "off")
                If !(VMULoaded){
                    VMUHideKey := xHotKeyVarEdit(VMUHideKey,"VMUHideKey","~","Add")
                    xHotKeywrapper(VMUHideKey,"VMUHide")
                    VMULoaded := true
                }
                emuPrimaryWindow.Activate()
            }
        }
        If ((VMU1Draw) and (VMU2Draw) and (VMU3Draw) and (VMU4Draw))
            SetTimer, CheckforVMU, off
    Return    
    VMUHide:
        If VMUHidden {
            Loop, 4
                VMUWindow%a_index%.Set("Transparent", "off")
            UpdateLayeredWindow(extraFixedRes_Bezel_hwnd, extraFixedRes_Bezel_hdc,0,0, A_ScreenWidth, A_ScreenHeight,255)
            VMUHidden := false
        } Else {
            Loop, 4
                VMUWindow%a_index%.Set("Transparent", 0)
            UpdateLayeredWindow(extraFixedRes_Bezel_hwnd, extraFixedRes_Bezel_hdc,0,0, A_ScreenWidth, A_ScreenHeight,0)
            VMUHidden := true
        }
    Return
    CloseProcess:
        FadeOutStart()
        If (demulShooterEnabled = "true") {
            DemulShooterExe.Close()
        }
        emuPrimaryWindow.PostMessage("0x111", "40085")    ; Stop emulation first for a clean exit
        TimerUtils.Sleep(5)    ; just like to give a little time before closing
        emuPrimaryWindow.PostMessage("0x111", "40080")    ; Exit

    ~Escape::
    Process, Close, demul.exe
    ExitAPP
    return
     
    27 0
  5. Reste également la possibilité avec un autre émulateur nullDC_Naomi-r150 à condition de posséder les fichiers lst nécessaires au démarrage des ROMs bin ou dat
    exemple LST:
    Nom du jeu
    "bin-file-name", 0x0000000, <longueur du bin-file-name>
    Regardez la taille du fichier
    (Propriétés du clic droit)
    copiez le nombre en octets
    puis dans la calculatrice windows
    dans la vue menu sélectionnez scientifique
    collez le nombre
    et cliquez dans HEX
    puis changez 0x0000000 en l'
    exemple de valeur HEX souhaité :
    Game123456 "Game123456", 0x0000000, 0x0 "0000000" (Insérez la valeur HEX souhaitée dans le devis)
    exemple:
    Game123456
    "Game123456.bin or dat", 0x0000000, 0x0123456
    8 0
  6. Multiple Arcade Machine Emulator
     
    44 0
  7. RA
     
    156 0
  8. Multi Emulator Super System
     
    35 0
  9. Good morning, Here is Arcade64 v0.255 
    enjoy
    98 0
  10. Good morning all, here is another Arcade v0.257 no nag Enjoy
    102 0
  11. Good morning all, here is an updated no nag Arcade64 v0.256 Enjoy 
    102 0
  12. good morning all, here is another Arcade64 no_nag v0.254 
    enjoy
    70 0
  13. Good evening all, sorry for the delay here is arcade64 v0.253 thank you and enjoy
    48 0
  14. *This removes the nag screen that informs you if a rom doesn't work correctly, or if at all, if you use this no nag, then please do NOT go to the mame support site with issues with games, please only use if you understand that there will be no help from anyone at mamedev as you are using a modified version of mame.
    mame.exe - Normal Mame with Nags removed. For Version 0.253 (Note mame no longer carries the 64 in its exe name changed by Devs in 0.229)
    It's advisable to download the full 0.253 official pack and install it, then just overwrite the exe with the replacement, this covers any changes the mame devs may have made to the support files.
    After you have done this, make sure you copy the folders artwork, ctrlr, cheat, hlsl, ini, folders and the ini files from the root of your original mame folder, and move/copy them to the new install.  
    make sure in the mame.ini file you have  the following set.
    Skip_gameinfo  1
    Note: Akai Katana and DoDonPachi Saidaioujou are working with this version of mame. This will only be done if the code remains in the files, once removed i will not re-add them.
    213 0
  15. *This removes the nag screen that informs you if a rom doesn't work correctly, or if at all, if you use this no nag, then please do NOT go to the mame support site with issues with games, please only use if you understand that there will be no help from anyone at mamedev as you are using a modified version of mame.
    mame.exe - Normal Mame with Nags removed. For Version 0.252 (Note mame no longer carries the 64 in its exe name changed by Devs in 0.229)
    It's advisable to download the full 0.252 official pack and install it, then just overwrite the exe with the replacement, this covers any changes the mame devs may have made to the support files.
    After you have done this, make sure you copy the folders artwork, ctrlr, cheat, hlsl, ini, folders and the ini files from the root of your original mame folder, and move/copy them to the new install.  
    make sure in the mame.ini file you have  the following set.
    Skip_gameinfo  1
    Note: Akai Katana and DoDonPachi Saidaioujou are working with this version of mame. This will only be done if the code remains in the files, once removed i will not re-add them.
    208 0
  16. good morning all, sorry for the delay, here is arcade64 v0.251 no nag screen
    Enjoy  
    120 0
  17. *This removes the nag screen that informs you if a rom doesn't work correctly, or if at all, if you use this no nag, then please do NOT go to the mame support site with issues with games, please only use if you understand that there will be no help from anyone at mamedev as you are using a modified version of mame.
    mame.exe - Normal Mame with Nags removed. For Version 0.250 (Note mame no longer carries the 64 in its exe name changed by Devs in 0.229)
    It's advisable to download the full 0.250 official pack and install it, then just overwrite the exe with the replacement, this covers any changes the mame devs may have made to the support files.
    After you have done this, make sure you copy the folders artwork, ctrlr, cheat, hlsl, ini, folders and the ini files from the root of your original mame folder, and move/copy them to the new install.  
    make sure in the mame.ini file you have  the following set.
    Skip_gameinfo  1
    Note: Akai Katana and DoDonPachi Saidaioujou are working with this version of mame. This will only be done if the code remains in the files, once removed i will not re-add them.
    157 0
  18. *This removes the nag screen that informs you if a rom doesn't work correctly, or if at all, if you use this no nag, then please do NOT go to the mame support site with issues with games, please only use if you understand that there will be no help from anyone at mamedev as you are using a modified version of mame.
    mame.exe - Normal Mame with Nags removed. For Version 0.251 (Note mame no longer carries the 64 in its exe name changed by Devs in 0.229)
    It's advisable to download the full 0.251 official pack and install it, then just overwrite the exe with the replacement, this covers any changes the mame devs may have made to the support files.
    After you have done this, make sure you copy the folders artwork, ctrlr, cheat, hlsl, ini, folders and the ini files from the root of your original mame folder, and move/copy them to the new install.  
    make sure in the mame.ini file you have  the following set.
    Skip_gameinfo  1
    Note: Akai Katana and DoDonPachi Saidaioujou are working with this version of mame. This will only be done if the code remains in the files, once removed i will not re-add them.
    172 0
  19. sorry for the delay, I had some trouble trying to compiling this one, here is arcade64 no nag version .250
    Thank you for your patience.  Enjoy  
    ok, sorry i just found out that there was no sound in this build im working on it  i'm not sure if I can fix. amy ways i will post it later if I can resolve this issue. 
    sorry false alarm it was something wrong with my pc i have got it fixed. 
    98 0
  20. Good morning all, here is arcade64 v0.249 no nag screen thank you to Agard for helping me with this.
    50 0
  21. *This removes the nag screen that informs you if a rom doesn't work correctly, or if at all, if you use this no nag, then please do NOT go to the mame support site with issues with games, please only use if you understand that there will be no help from anyone at mamedev as you are using a modified version of mame.
    mame.exe - Normal Mame with Nags removed. For Version 0.249 (Note mame no longer carries the 64 in its exe name changed by Devs in 0.229)
    It's advisable to download the full 0.249 official pack and install it, then just overwrite the exe with the replacement, this covers any changes the mame devs may have made to the support files.
    After you have done this, make sure you copy the folders artwork, ctrlr, cheat, hlsl, ini, folders and the ini files from the root of your original mame folder, and move/copy them to the new install.  
    make sure in the mame.ini file you have  the following set.
    Skip_gameinfo  1
    Note: Akai Katana and DoDonPachi Saidaioujou are working with this version of mame. This will only be done if the code remains in the files, once removed i will not re-add them.
    118 0
  22. This is the Arcade64 0.248 No-Nag. 
    I would normally not upload this, but nate67000 is taking a well earned break for a few months, and asked me to fill in. 
    Any issue please PM me, i will try and help.
    67 0
  23. **This removes the nag screen that informs you if a rom doesn't work correctly, or if at all, if you use this no nag, then please do NOT go to the mame support site with issues with games, please only use if you understand that there will be no help from anyone at mamedev as you are using a modified version of mame.
    mame.exe - Normal Mame with Nags removed. For Version 0.248 (Note mame no longer carries the 64 in its exe name changed by Devs in 0.229)
    It's advisable to download the full 0.248 official pack and install it, then just overwrite the exe with the replacement, this covers any changes the mame devs may have made to the support files.
    After you have done this, make sure you copy the folders artwork, ctrlr, cheat, hlsl, ini, folders and the ini files from the root of your original mame folder, and move/copy them to the new install.  
    make sure in the mame.ini file you have  the following set.
    Skip_gameinfo  1
    Note: Akai Katana and DoDonPachi Saidaioujou are working with this version of mame. This will only be done if the code remains in the files, once removed i will not re-add them.
    113 0
  24. This is the Arcade64 0.247 No-Nag. 
    I would normally not upload this, but nate67000 is taking a well earned break for a few months, and asked me to fill in. 
    Any issue please PM me, i will try and help.
    50 0
  25. **This removes the nag screen that informs you if a rom doesn't work correctly, or if at all, if you use this no nag, then please do NOT go to the mame support site with issues with games, please only use if you understand that there will be no help from anyone at mamedev as you are using a modified version of mame.
    mame.exe - Normal Mame with Nags removed. For Version 0.247 (Note mame no longer carries the 64 in its exe name changed by Devs in 0.229)
    It's advisable to download the full 0.247 official pack and install it, then just overwrite the exe with the replacement, this covers any changes the mame devs may have made to the support files.
    After you have done this, make sure you copy the folders artwork, ctrlr, cheat, hlsl, ini, folders and the ini files from the root of your original mame folder, and move/copy them to the new install.  
    make sure in the mame.ini file you have  the following set.
    Skip_gameinfo  1
    Note: Akai Katana and DoDonPachi Saidaioujou are working with this version of mame. This will only be done if the code remains in the files, once removed i will not re-add them.
    100 0

  • Please Read

    Downloads in this section are for HyperSpin 1.x only which has been discontinued. Traffic to this section has had to be throttled to maintain proper website operations. While we are not investing new resources into HS1 we do intend to preserve the media that made it famous.

×
×
  • Create New...