About This File
MEmu := "Xenia"
MEmuV := "v1.0.0"
MURL := ["http://xenia.jp/"]
MAuthor := ["drik333","Dime333"]
MVersion := "1.0.4"
MCRC := ""
iCRC := ""
MID := ""
MSystem := ["Microsoft Xbox 360","Microsoft Xbox Live Arcade"]
;----------------------------------------------------------------------------
; Notes:
; Set Skip Checks to Rom Extension.
; You need to use the emulator in portable mode. You can do this by creating a file called "portable.txt" and placing it in the emu folder.
; The module is able to launch iso files and extracted games.
; For extracted games, you have to name the folders of the games like your database. To see these games in RLUI, create blank txt files named like
; your database and edit iso|txt|xex as Rom Extensions in RLUI. Or you can make zip files of each game and set the compression to "uncompressed" for
; fast load times.
;----------------------------------------------------------------------------
StartModule()
BezelGUI()
FadeInStart()
primaryExe := new Emulator(emuPath . "\" . executable) ; instantiate emulator executable object
emuPrimaryWindow := new Window(new WindowTitle("Xenia","XeniaWindowClass")) ; instantiate primary emulator window object
Fullscreen := moduleIni.Read(romName . "|Settings", "Fullscreen","true",,1)
gpu := moduleIni.Read(romName . "|Settings", "GPU","D3D12",,,1)
draw_resolution_scale := moduleIni.Read(romName . "|Settings", "Draw_resolution_scale","1280x720",,,1)
d3d12_readback_resolve := moduleIni.Read(romName . "|Settings", "D3D12_readback_resolve","false",,1)
auto_clear_runtime_caches := moduleIni.Read(romName . "|Settings", "Auto_clear_runtime_caches","true",,1)
max_queued_frames := moduleIni.Read(romName . "|Settings", "Max_queued_frames","4",,,1)
break_on_unimplemented_instructions := moduleIni.Read(romName . "|Settings", "Break_on_unimplemented_instr.","true",,1)
protect_zero := moduleIni.Read(romName . "|Settings", "Protect_zero","true",,1)
scribble_heap := moduleIni.Read(romName . "|Settings", "Scribble_heap","false",,1)
If StringUtils.InStr(executable,"canary")
{
config := new IniFile(emuPath . "\xenia-canary.config.toml")
}
Else
{
config := new IniFile(emuPath . "\xenia.config.toml")
}
hideEmuObj := Object(emuPrimaryWindow,1)
7z(romPath, romName, romExtension, sevenZExtractPath)
BezelStart()
HideAppStart(hideEmuObj,hideEmu)
ExtractedGamePath := "\" . romName . "\default.xex"
ExtractedGameFile := new File(romPath . ExtractedGamePath)
If (gpu = "D3D12")
{
config.Write(" ""d3d12""", "GPU", "gpu ")
}
Else
{
config.Write(" ""vulkan""", "GPU", "gpu ")
}
If (draw_resolution_scale = "1280x720")
{
config.Write(" 1", "GPU", "draw_resolution_scale_x ")
config.Write(" 1", "GPU", "draw_resolution_scale_y ")
}
If (draw_resolution_scale = "2560x1440")
{
config.Write(" 2", "GPU", "draw_resolution_scale_x ")
config.Write(" 2", "GPU", "draw_resolution_scale_y ")
}
If (draw_resolution_scale = "3840x2160")
{
config.Write(" 3", "GPU", "draw_resolution_scale_x ")
config.Write(" 3", "GPU", "draw_resolution_scale_y ")
}
If (d3d12_readback_resolve = "false")
{
config.Write(" false", "D3D12", "d3d12_readback_resolve ")
}
Else
{
config.Write(" true", "D3D12", "d3d12_readback_resolve ")
}
If (max_queued_frames = "1")
{
config.Write(" 1", "APU", "max_queued_frames ")
}
If (max_queued_frames = "4")
{
config.Write(" 4", "APU", "max_queued_frames ")
}
If (max_queued_frames = "8")
{
config.Write(" 8", "APU", "max_queued_frames ")
}
If (max_queued_frames = "16")
{
config.Write(" 16", "APU", "max_queued_frames ")
}
If (max_queued_frames = "32")
{
config.Write(" 32", "APU", "max_queued_frames ")
}
If (max_queued_frames = "64")
{
config.Write(" 64", "APU", "max_queued_frames ")
}
If (break_on_unimplemented_instructions = "true")
{
config.Write(" true", "CPU", "break_on_unimplemented_instructions ")
}
Else
{
config.Write(" false", "CPU", "break_on_unimplemented_instructions ")
}
If (protect_zero = "true")
{
config.Write(" true", "Memory", "protect_zero ")
}
Else
{
config.Write(" false", "Memory", "protect_zero ")
}
If (scribble_heap = "false")
{
config.Write(" false", "Memory", "scribble_heap ")
}
Else
{
config.Write(" true", "Memory", "scribble_heap ")
}
If (Fullscreen = "true")
{
If (ExtractedGameFile.Exist()) {
primaryExe.Run(" --fullscreen """ . romPath . "\" . romName . "\default.xex" """")
} Else If (ExtractedGameFile !="") {
primaryExe.Run(" --fullscreen """ . romPath . "\" . romName . romExtension . """")
}
}
Else
{
If (ExtractedGameFile.Exist()) {
primaryExe.Run("""" . romPath . "\" . romName . "\default.xex" """")
} Else If (ExtractedGameFile !="") {
primaryExe.Run("""" . romPath . "\" . romName . romExtension . """")
}
}
emuPrimaryWindow.Wait()
emuPrimaryWindow.WaitActive()
BezelDraw()
HideAppEnd(hideEmuObj,hideEmu)
FadeInExit()
If (auto_clear_runtime_caches = "true")
{
Loop
{
Sleep 1000
Send {f5}
Process, Exist, xenia.exe
IF !errorlevel=1
Process, Exist, xenia_canary.exe
IF !errorlevel=1
Goto, Continue
else
Sleep 1
}
}
else
Sleep 1
Continue:
primaryExe.Process("WaitClose")
7zCleanUp()
BezelExit()
FadeOutExit()
ExitModule()
CloseProcess:
FadeOutStart()
emuPrimaryWindow.Close()
Return
