Ok, voici l'usine à gaz:
;----------------------------------------------------------------------------
; Sega Dreamcast
; Makaron T12-5, NullDC v1.0.4 r135, Demul v0.5.6
; by djvj/brolly
; 1.6
;
; Notes:
; ** Makaron **
; Extract all your DC bios bins into the ROM subdir of your emu
; Open the Makaron.ini and set your resolution and remove the # in front of the lines you want enabled, including fullscreen.
; This script supports the following DC images: GDI, CDI
; vJoy is required for joystick input for Makaron DC games:
http://headsoft.com.au/index.php?category=vjoy
;
; ** Demul **
; This script supports the following DC images: GDI, CDI, CHD, MDS, CCD, NRG, CUE
; Place your dc.zip bios in the roms subdir of your emu
; Run demul manually and goto Config-Plugins-GD-ROM Plugin and set it to gdrImage
; Set your Video Plugin to gpuOglv3
; On first run of a game, demul will ask you to setup all your plugin choices if you haven't already.
;
; ** nullDC **
; If you want to use specific configs per game, create a folder called Cfg inside nullDC folder and copy your nullDC.cfg
; config files into it naming them to match the database names. Make sure you keep a copy of nullDC.cfg on the Cfg folder as well.
;
; If you want to convert your roms from gdi to chd, see here:
http://www.emutalk.net/showthread.php?t=51502
; FileDelete(s) are in the script because sometimes demul will corrupt the ini and make it crash. The script recreates a clean ini for you.
;
; Setup the user settings below to your liking
;
; For additional setup steps prior to running, see this link:
http://www.hyperspin-fe.com/forum/showp ... tcount=138
;----------------------------------------------------------------------------
settingsFile := checkFile(A_WorkingDir . "\Modules\" . systemName . "\Settings.ini")
IniRead, pathToNullDC, %settingsFile%, Settings, PathToNullDC
IniRead, pathToMakaron, %settingsFile%, Settings, PathToMakaron
IniRead, pathToDemul, %settingsFile%, Settings, PathToDemul
IniRead, nullDCExe, %settingsFile%, Settings, nullDCExe
IniRead, makaronExe, %settingsFile%, Settings, makaronExe
IniRead, demulExe, %settingsFile%, Settings, demulExe
IniRead, fullscreen, %settingsFile%, Settings, Fullscreen
IniRead, useVJoy, %settingsFile%, Makaron, useVJoy ; makaron only
IniRead, emulator, %settingsFile%, %romName%, Emulator, NullDC
IniRead, winCE, %settingsFile%, %romName%, WinCE, false ; makaron only
IniRead, cable, %settingsFile%, %romName%, Cable, 0 ; makaron only
IniRead, keyboard, %settingsFile%, %romName%, Keyboard, false ; makaron only
IniRead, disableplayertwo, %settingsFile%, %romName%, DisablePlayerTwo, false ; makaron only
If ( emulator = "Demul" ) {
IniRead, useGlobalShaderEffects, %settingsFile%, Demul, useGlobalShaderEffects
} Else If ( emulator = "Makaron" useVJoy = "true" ) {
IniRead, vJoyPath, %settingsFile%, Makaron, vJoyPath
IniRead, vJoyExe, %settingsFile%, Makaron, vJoyExe
IniRead, vJoyIni, %settingsFile%, Makaron, vJoyIni
CheckFile(vJoyIni)
} Else If emulator not in Demul,Makaron
{
IniRead, dualMonitors, %settingsFile%, nulldc, DualMonitors
IniRead, autoStart, %settingsFile%, nulldc, autoStart
IniRead, autoHideMenu, %settingsFile%, nulldc, autoHideMenu
IniRead, alwaysOnTop, %settingsFile%, nulldc, alwaysOnTop
IniRead, showVMU, %settingsFile%, nulldc, showVMU
IniRead, loadDefaultImage, %settingsFile%, nulldc, loadDefaultImage
IniRead, patchRegion, %settingsFile%, nulldc, patchRegion
}
If ( WinCE = "true" emulator != "Makaron" )
ScriptError("You have WinCE set but Makaron is not your emulator. WinCE games only work on Makaron")
GUI_ID := FadeInStart()
7z1 := 7z(romPath, romName, romExtension, 7zExtractDir)
If ( emulator = "Makaron" ) {
If (romExtension = ".gdi")
CheckForSpaces(romName)
makIni := checkFile(pathToMakaron . "Makaron.ini")
mapleFile := checkFile(pathToMakaron . "Maple.ini")
IniRead, MMU, %makIni%, SH4, MMU
IniRead, makFS, %makIni%, Settings, fullscreen
IniRead, currentCable, %makIni%, Settings, cable
; Running VJoy checking to make sure it actually ran
If ( useVJoy = "true" ) {
Run, %vJoyExe% -file "%vJoyIni%", %vJoyPath%
CheckForVJoy(ByRef vJoyExe)
}
; Turning MMU on/off because WinCE games require this
If ( MMU != 1 winCE = "true" )
IniWrite, 1, %makIni%, SH4, MMU
Else If ( MMU != 0 winCE = "false" )
IniWrite, 0, %makIni%, SH4, MMU
; Changing cable if it doesn't match current setting
If ( currentCable != cable )
IniWrite, %cable%, %makIni%, Settings, cable
; Setting fullscreen on or off
If ( makFS != 1 Fullscreen = "true" )
IniWrite, 1, %makIni%, Settings, fullscreen
Else If ( makFS = 1 Fullscreen != "true" )
IniWrite, 0, %makIni%, Settings, fullscreen
;Read Maple.ini into memory and plug/unplug the keyboard as necessary
FileRead, mapleCFG, %mapleFile%
currentKeyboard := (InStr(mapleCFG, "#Adres0x20 = MakaronKEY.dll") ? ("true") : ("false"))
If ( keyboard = "true" And currentKeyboard = "true" ) {
StringReplace, mapleCFG, mapleCFG, #Adres0x20 = MakaronKEY.dll, Adres0x20 = MakaronKEY.dll
Save = 1
} Else If ( keyboard = "false" And currentKeyboard = "false" ) {
StringReplace, mapleCFG, mapleCFG, Adres0x20 = MakaronKEY.dll, #Adres0x20 = MakaronKEY.dll
Save = 1
}
If Save
SaveFile(mapleCFG,mapleFile)
;Unplug controller from port 2 if needed
padFile := checkFile(pathToMakaron . "MakaronPAD.ini")
IniRead, isPortBDisabled, %padFile%, Urzadzenia, PortB, %A_Space%
isPortBDisabled := isPortBDisabled ? "false" : "true"
If (isPortBDisabled = "true" disableplayertwo = "false") {
IfExist, %pathToMakaron%MakaronPAD_2P.ini
FileCopy, %pathToMakaron%MakaronPAD_2P.ini, %pathToMakaron%MakaronPAD.ini, 1
} Else If (isPortBDisabled = "false" disableplayertwo = "true") {
IfExist, %pathToMakaron%MakaronPAD_1P.ini
FileCopy, %pathToMakaron%MakaronPAD_1P.ini, %pathToMakaron%MakaronPAD.ini, 1
}
Run, %makaronExe% "%romPath%%romName%%romExtension%", %pathToMakaron%
Sleep, 4000 ; adjust to your liking for how long you want to see the black screen
GUI_ID2 := FadeInExit()
Process, WaitClose, %makaronExe%
} Else If ( emulator = "Demul" ) {
If ( romExtension = ".cdi" || romExtension = ".mds" || romExtension = ".ccd" || romExtension = ".nrg" || romExtension = ".gdi" || romExtension = ".cue" ) {
FileDelete, %pathToDemul%gdrImage.ini
Sleep, 500
IniWrite, gdrImage.dll, %pathToDemul%Demul.ini, plugins, gdr
IniWrite, false, %pathToDemul%gdrImage.ini, Main, openDialog
IniWrite, %romPath%%romName%%romExtension%, %pathToDemul%gdrImage.ini, Main, imagefilename
} Else If ( romExtension = ".chd" ) {
FileDelete, %pathToDemul%gdrCHD.ini
Sleep, 500
IniWrite, false, %pathToDemul%gdrCHD.ini, Main, openDialog
IniWrite, gdrCHD.dll, %pathToDemul%Demul.ini, plugins, gdr
IniWrite, %romPath%%romName%%romExtension%, %pathToDemul%gdrCHD.ini, Main, imagefilename
}
IniWrite, 1, %pathToDemul%Demul.ini, main, region ; Set BIOS to Auto Region
; Shader Effects
IniRead, currentShaderValue, %pathToDemul%gpuOglv3.ini, shader, effects
If ( useGlobalShaderEffects = "true" ) {
If ( currentShaderValue = "false" )
IniWrite, true, %pathToDemul%gpuOglv3.ini, shader, effects
IniWrite, %shaderMode%, %pathToDemul%gpuOglv3.ini, shader, mode
IniWrite, %shaderPath%, %pathToDemul%gpuOglv3.ini, shader, path
IniWrite, %shaderName%, %pathToDemul%gpuOglv3.ini, shader, name
}
Else If ( useGlobalShaderEffects = "false" and currentShaderValue = "true" )
IniWrite, false, %pathToDemul%gpuOglv3.ini, shader, effects
Sleep, 250
Run, %demulExe% -run=dc, %pathToDemul%
Sleep, 4000 ; adjust to your liking for how long you want to see the black screen
If ( Fullscreen = "true" )
Send !{Enter} ; fullscreen
GUI_ID2 := FadeInExit()
Process, WaitClose, %demulExe%
} Else { ; This will run NullDC and is the default for any game not defined in Settings.ini
specialCfg = %pathToNullDC%cfg\%romName%.cfg
defaultCfg = %pathToNullDC%cfg\nullDC.cfg
If ( FileExist(specialCfg) FileExist(defaultCfg))
FileCopy, %specialCfg%, %pathToNullDC%nullDC.cfg, 1
Else If (FileExist(defaultCfg))
FileCopy, %defaultCfg%, %pathToNullDC%nullDC.cfg, 1
nullDCcfg := checkFile(pathToNullDC . "nullDC.cfg")
;Detect game region based on rom name
region = 1
IfInString, romName, (Europe)
region = 2
IfInString, romName, (Japan)
region = 0
IfInString, romName, (World)
region = 2
;Write Settings
If (Fullscreen = "true" )
IniWrite, 1, %nullDCcfg%, nullDC_GUI, Fullscreen
Else
IniWrite, 0, %nullDCcfg%, nullDC_GUI, Fullscreen
IniWrite, %autoStart%, %nullDCcfg%, nullDC, Emulator.AutoStart
IniWrite, %noConsole%, %nullDCcfg%, nullDC, Emulator.NoConsole
IniWrite, %autoHideMenu%, %nullDCcfg%, nullDC_GUI, AutoHideMenu
IniWrite, %alwaysOnTop%, %nullDCcfg%, nullDC_GUI, AlwaysOnTop
IniWrite, %showVMU%, %nullDCcfg%, drkMaple, VMU.Show
IniWrite, %loadDefaultImage%, %nullDCcfg%, ImageReader, LoadDefaultImage
IniWrite, %patchRegion%, %nullDCcfg%, ImageReader, PatchRegion
IniWrite, %region%, %nullDCcfg%, nullDC, Dreamcast.Region
IniWrite, %romPath%%romname%%RomExtension%, %nullDCcfg%, ImageReader, DefaultImage
;Fixes hanging previous nullDC on bad exits or loads
Process, Exist, %nullDCExe%
If !ErrorLevel = 0
Process, Close, %nullDCExe%
; This hides nullDC's menu when running dual screens
If ( dualMonitors = "true" ) {
MouseGetPos X, Y
SetDefaultMouseSpeed, 0
MouseMove %A_ScreenWidth%,%A_ScreenHeight%
}
Run, %nullDCExe%, %pathToNullDC%, Hide
Sleep, 2000 ; Enough to hide the startup logo
WinWait, nullDC ahk_class ndc_main_window
WinWaitActive, nullDC ahk_class ndc_main_window
DllCall("SetMenu", uint, WinActive( "A" ), uint, 0) ; Removes the MenuBar
;Let's completely hide the menu by slighly moving the window off screen
;nullDC will self adjust once the menu autohides
If ( fullScreen = "true" ) {
yOffset = -20
winHeight := A_ScreenHeight - yOffset
WinMove, nullDC,, 0, %yOffset%, %A_ScreenWidth%, %winHeight%
}
WinShow, nullDC ; without these, nullDC may stay hidden behind HS
WinActivate, nullDC
GUI_ID2 := FadeInExit()
Process, WaitClose, %nullDCExe%
}
; Closing VJoy
If ( emulator = "Makaron" useVJoy = "true" )
Run, %vJoyExe% -exit, %vJoyPath%
7z2 := 7zCleanUp()
GUI_ID4 := FadeOutExit()
WinActivate, Hyperspin
ExitApp
;(¯`·._.·´¯`·._.·´¯`·._.·´¯`·._.·´¯`·._.·´¯`·._.·´¯`·._.·´¯)
; Functions - DO NOT EDIT
;(_.·´¯`·._.·´¯`·._.·´¯`·._.·´¯`·._.·´¯`·._.·´¯`·._.·´¯`·._)
CheckForVJoy(ByRef exe) {
Process, Wait, %exe%, 5
NewPID = %ErrorLevel%
If NewPID = 0
{
ScriptError("VJoy did not start. Check your VJoy path and Exe")
ExitApp
}
}
CheckForSpaces(name) {
IfInString, name, %A_Space%
{
ScriptError("Rom name contains a space.`nMakaron will not run games with spaces in their names")
ExitApp
}
}
SaveFile(text,file) {
FileDelete, %file%
FileAppend, %text%, %file%
}
CloseProcess:
GUI_ID3 := FadeOutStart()
If ( emulator = "NullDC" )
WinClose, nullDC ahk_class ndc_main_window
Else If ( emulator = "Demul" )
Process, Close, %demulExe% ; we have to close this way otherwise demul crashes with WinClose
Else If ( emulator = "Makaron" ) {
Send, {F8}
Sleep, 1000
Send, !{F4}
Sleep, 500
Process, Close, %makaronExe% ; Makaron doesn't end the exe sometimes, we must manually do it
}
Return
et le fichier settings:
[Settings]
PathToNullDC =G:\Games\Sega\Dreamcast\Emulator\nullDC\
PathToMakaron = G:\Games\Sega\Dreamcast\Emulator\Makaron\
PathToDemul =G:\Games\Sega\Dreamcast\Emulator\demul\
NullDCExe =nullDC.exe
MakaronExe =Makaron.exe
DemulExe =demul.exe
Fullscreen = true
vJoyPath = G:\Hyperspin\VJoy\
vJoyExe = VJoy.exe
vJoyIni = G:\Hyperspin\VJoy\VJoy.ini
[NullDC]
DualMonitors = false
autoStart = 1
noConsole = 1
autoHideMenu = 1
alwaysOnTop = 1
showVMU = 0
loadDefaultImage = 1
patchRegion = 1
[Demul]
useGlobalShaderEffects =true
[Makaron]
useVJoy = true
vJoyPath = G:\Hyperspin\VJoy\
vJoyExe = VJoy.exe
vJoyIni = G:\Hyperspin\VJoy\VJoy.ini
# Unsure what to do with this yet, from demul DC script
[HyperLaunch]
useLoadingBlinds =Rom Name
useGlobalShaderEffects =true
# Rom Settings:
# Emulator can be nulldc, makaron or demul
# WinCE can be true or false. Only set to true if the game is a WinCE game. These games only work in Makaron.
# Cable can be 0 (VGA), 1 (RGB EURO/SCART), or 2 (Composite). Some games will only work with certain cable types (Applicable to Makaron only)
# Keyboard can be true or false. It tells the emu to attach the keyboard or not, some games will not run with it connected (Applicable to Makaron only)
# DisablePlayerTwo can be true or false. It tells the emu to attach a controller on port 2 or not, some games will not run with it connected (Applicable to Makaron only)
[4 Wheel Thunder (Europe)........]
Emulator = Makaron
WinCE = true
Cable = 0
Keyboard = false
DisablePlayerTwo = false
[Hello Kitty - Lovely Fruit Park (Japan)]
Emulator = Makaron
WinCE = true
Cable = 0
Keyboard = false
DisablePlayerTwo = false
[South_Park_-_Chef's_Luv_Shack_(USA)]
Emulator = Makaron
WinCE = true
Cable = 1
Keyboard = false
DisablePlayerTwo = false
[Worms_Armageddon_(USA)]
Emulator = Makaron
WinCE = true
Cable = 0
Keyboard = false
DisablePlayerTwo = false
Si ça peux aider qq, tant mieux. Moi, j'ai rien compris. Mais quand on veut utiliser un autre emulateur que nulldc, on met le jeu dans settings.ini avec l'emulateur desiré (demul ou Makaron) et ça marche. Peux être que ce script récupère aussi les données de votre carte bancaire et les envoie sur un site russe... à vos risques et périls...