5thWolf Posted 6 hours ago Posted 6 hours ago (edited) So I here is a guide to set up LaunchBox with Neko Project 21/W (most actively updated fork of Neko Project) to run ".hdi" files. This is the Neko Project 2 fork that I am using and have had no issues with it. ***NOTE*** - Set up the games in LB like you normally would pointing the the .hdi file -The .bat files are scripted to also look for floppy .fdi boot disks that may be included with the .hdi file. Make sure both files are named exactly the same! - The only thing you will have to change is the directory for your "GAME_DIR" in the .bat file since everyone may have put their game files in different directories Emulator setup (this is to allow fullscreen to work without dealing with Windows Compatibility) Set the renderer to "Direct3D" instead of "DirectDraw" Menu: Screen > Screen Options > Renderer Add the emulators to Launchbox (some games only work with 2.5MHz so there will be a set up for 2.5MHz and 5MHz) Create "Neko Project 2/W (2.5MHz)" emulator with no options changed Create "Neko Project 2/W (5MHz)" emulator with no options change Add the AutoHotKey for fullscreen both 2.5MHz & 5MHz emulators in LaunchBox (Skip if you don't want auto fullscreen) WinWaitActive, ahk_exe np21w.exe,, 5 Sleep, 300 WinMenuSelectItem, ahk_exe np21w.exe,, Screen, FullScreen Create 25mhz.bat & 5mhz.bat (Create these in the main folder. Not inside the "bin" folder) 2.5MHz script @echo off setlocal EnableDelayedExpansion :: 1. Point to the "bin" subfolder relative to this .bat file set "EMU_DIR=%~dp0bin\" set "INI_FILE=%EMU_DIR%np21w.ini" set "EMU_EXE=%EMU_DIR%np21w.exe" :: 2. Catch the .hdi file safely (outside parentheses blocks so filenames with () don't break batch) set "HDI_PATH=%~1" if "!HDI_PATH!"=="" set "HDI_PATH=%~dp0game.hdi" :: 3. Build matching .fdi path safely set "FDI_PATH=%~dpn1.fdi" if "%~1"=="" set "FDI_PATH=%~dp0game.fdi" if not exist "!FDI_PATH!" set "FDI_PATH=" :: 4. Set 2.5MHz (DIPswtch=3e f3 7b), Direct3D (DRAWTYPE=2), enable SVFDFILE=true, and mount HDD1FILE + FDD1FILE powershell -NoProfile -Command ^ "$path = '%INI_FILE%';" ^ "$text = [System.IO.File]::ReadAllText($path, [System.Text.Encoding]::Default);" ^ "$hdi = $env:HDI_PATH;" ^ "$fdi = $env:FDI_PATH;" ^ "if ($text -match '(?m)^DIPswtch=.*') { $text = $text -replace '(?m)^DIPswtch=.*', 'DIPswtch=3e f3 7b' };" ^ "if ($text -match '(?m)^DRAWTYPE=.*') { $text = $text -replace '(?m)^DRAWTYPE=.*', 'DRAWTYPE=2' };" ^ "if ($text -match '(?m)^SVFDFILE=.*') { $text = $text -replace '(?m)^SVFDFILE=.*', 'SVFDFILE=true' } else { $text = $text -replace '(\[NekoProject21\])', \"`$1`r`nSVFDFILE=true\" };" ^ "if ($text -match '(?m)^HDD1FILE=.*') { $text = $text -replace '(?m)^HDD1FILE=.*', ('HDD1FILE=' + $hdi) } else { $text = $text -replace '(\[NekoProject21\])', \"`$1`r`nHDD1FILE=$hdi\" };" ^ "if ($text -match '(?m)^FDD1FILE=.*') { $text = $text -replace '(?m)^FDD1FILE=.*', ('FDD1FILE=' + $fdi) } else { $text = $text -replace '(\[NekoProject21\])', \"`$1`r`nFDD1FILE=$fdi\" };" ^ "if ($text -match '(?m)^FD1NAME0=.*') { $text = $text -replace '(?m)^FD1NAME0=.*', ('FD1NAME0=' + $fdi) } else { $text = $text -replace '(\[NP2 tool\])', \"`$1`r`nFD1NAME0=$fdi\" };" ^ "[System.IO.File]::WriteAllText($path, $text, [System.Text.Encoding]::Default)" :: 5. Launch Neko Project 21/W and WAIT so LaunchBox keeps the Running Script active start "" /WAIT /D "%EMU_DIR%" "%EMU_EXE%" :: 6. Automatically restore 5MHz GDC Clock (DIPswtch=3e 73 7b) after closing powershell -NoProfile -Command ^ "$path = '%INI_FILE%';" ^ "$text = [System.IO.File]::ReadAllText($path, [System.Text.Encoding]::Default);" ^ "if ($text -match '(?m)^DIPswtch=.*') { $text = $text -replace '(?m)^DIPswtch=.*', 'DIPswtch=3e 73 7b' };" ^ "[System.IO.File]::WriteAllText($path, $text, [System.Text.Encoding]::Default)" 5MHz script @echo off setlocal EnableDelayedExpansion :: 1. Point to the "bin" subfolder relative to this .bat file set "EMU_DIR=%~dp0bin\" set "INI_FILE=%EMU_DIR%np21w.ini" set "EMU_EXE=%EMU_DIR%np21w.exe" :: 2. Catch the .hdi file safely (outside parentheses blocks so filenames with () don't break batch) set "HDI_PATH=%~1" if "!HDI_PATH!"=="" set "HDI_PATH=%~dp0game.hdi" :: 3. Build matching .fdi path safely set "FDI_PATH=%~dpn1.fdi" if "%~1"=="" set "FDI_PATH=%~dp0game.fdi" if not exist "!FDI_PATH!" set "FDI_PATH=" :: 4. Set 5MHz (DIPswtch=3e 73 7b), Direct3D (DRAWTYPE=2), enable SVFDFILE=true, and mount HDD1FILE + FDD1FILE powershell -NoProfile -Command ^ "$path = '%INI_FILE%';" ^ "$text = [System.IO.File]::ReadAllText($path, [System.Text.Encoding]::Default);" ^ "$hdi = $env:HDI_PATH;" ^ "$fdi = $env:FDI_PATH;" ^ "if ($text -match '(?m)^DIPswtch=.*') { $text = $text -replace '(?m)^DIPswtch=.*', 'DIPswtch=3e 73 7b' };" ^ "if ($text -match '(?m)^DRAWTYPE=.*') { $text = $text -replace '(?m)^DRAWTYPE=.*', 'DRAWTYPE=2' };" ^ "if ($text -match '(?m)^SVFDFILE=.*') { $text = $text -replace '(?m)^SVFDFILE=.*', 'SVFDFILE=true' } else { $text = $text -replace '(\[NekoProject21\])', \"`$1`r`nSVFDFILE=true\" };" ^ "if ($text -match '(?m)^HDD1FILE=.*') { $text = $text -replace '(?m)^HDD1FILE=.*', ('HDD1FILE=' + $hdi) } else { $text = $text -replace '(\[NekoProject21\])', \"`$1`r`nHDD1FILE=$hdi\" };" ^ "if ($text -match '(?m)^FDD1FILE=.*') { $text = $text -replace '(?m)^FDD1FILE=.*', ('FDD1FILE=' + $fdi) } else { $text = $text -replace '(\[NekoProject21\])', \"`$1`r`nFDD1FILE=$fdi\" };" ^ "if ($text -match '(?m)^FD1NAME0=.*') { $text = $text -replace '(?m)^FD1NAME0=.*', ('FD1NAME0=' + $fdi) } else { $text = $text -replace '(\[NP2 tool\])', \"`$1`r`nFD1NAME0=$fdi\" };" ^ "[System.IO.File]::WriteAllText($path, $text, [System.Text.Encoding]::Default)" :: 5. Launch Neko Project 21/W and WAIT so LaunchBox keeps the Running Script active start "" /WAIT /D "%EMU_DIR%" "%EMU_EXE%" ENJOY!!!! Edited 5 hours ago by 5thWolf Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.