118 lines
7.0 KiB
PowerShell
118 lines
7.0 KiB
PowerShell
Function fSCDisplayResolutionSelection() {
|
|
Write-Host "---Configure Display---"
|
|
Write-Host "Please select a display configuration from the following list:"
|
|
Write-Host "[1] 640 x 480 - For 31kHz and trisync 4:3 CRTs like Wells-Gardner D9200, Kortek 2914F, Neotec NT-2702, Sanwa PFX, Nanao MS-29XX series or others"
|
|
Write-Host "[2] 800 x 600 - For 35-37kHz capable 4:3 CRTs like Kortek 3414DF or others (Uncommon)"
|
|
Write-Host "[3] 1360 x 768 - For stock Vewlix L, D, F, and C LCD screens, and older Namco Noir LCDs"
|
|
Write-Host "[4] 1920 x 1080 - For stock Vewlix DB, Namco Grigio, Sega All-net PRAS 3, newer Namco Noirs or most other modern LCD cabinets/displays"
|
|
Write-Host "[0] Other - I'll configure a custom resolution myself in Custom Resolution Utility"
|
|
$vSCDisplayResolutionSelectionResponse = Read-Host "Select a number from the list above:"
|
|
if ($vSCDisplayResolutionSelectionResponse -neq [0...4])
|
|
{
|
|
Write-Host "SC-DSP-ERR001: INVALID SELECTION"
|
|
Write-Host "The number you have entered is invalid. Please enter a number from the list and try again"
|
|
fSCDisplayResolutionSelection
|
|
}
|
|
elseif ($vSCDisplayResolutionSelectionResponse -eq 1)
|
|
{
|
|
..\..\conf\cru\binaries\640-480.exe /i
|
|
$vSCDisplayResolutionSelectionExitCode = $?
|
|
if ($vSCDisplayResolutionSelectionExitCode -neq $true)
|
|
{
|
|
Write-Host "SC-DSP-ERR002: CUSTOM RESOLUTION APPLICATION FAILED"
|
|
Write-Host "For some reason, the custom resolution failed to apply - Please open a issue on the git repository at https://git.sdf.org/camoy/Sweetcade"
|
|
Write-Host "You can also try applying the custom resolution manually using Custom Resolution Utility installed at:"
|
|
Write-Host "C:\sc\tools\cru\CRU.EXE"
|
|
Write-Host "Ignoring this issue for now and moving on in 60 seconds"
|
|
Start-Sleep -Seconds 60
|
|
Exit 1
|
|
}
|
|
else
|
|
{
|
|
Write-Host "Custom resolution has been applied, moving on to the next step in 15 seconds"
|
|
Start-Sleep -Seconds 15
|
|
Exit 0
|
|
}
|
|
}
|
|
elseif ($vSCDisplayResolutionSelectionResponse -eq 2)
|
|
{
|
|
..\..\conf\cru\binaries\800-600.exe /i
|
|
$vSCDisplayResolutionSelectionExitCode = $?
|
|
if ($vSCDisplayResolutionSelectionExitCode -neq $true)
|
|
{
|
|
Write-Host "SC-DSP-ERR003: CUSTOM RESOLUTION APPLICATION FAILED"
|
|
Write-Host "For some reason, the custom resolution failed to apply - Please open a issue on the git repository at https://git.sdf.org/camoy/Sweetcade"
|
|
Write-Host "You can also try applying the custom resolution manually using Custom Resolution Utility installed at:"
|
|
Write-Host "C:\sc\tools\cru\CRU.EXE"
|
|
Write-Host "Ignoring this issue for now and moving on in 60 seconds"
|
|
Start-Sleep -Seconds 60
|
|
Exit 1
|
|
}
|
|
else
|
|
{
|
|
Write-Host "Custom resolution has been applied, moving on to the next step in 15 seconds"
|
|
Start-Sleep -Seconds 15
|
|
Exit 0
|
|
}
|
|
}
|
|
elseif ($vSCDisplayResolutionSelectionResponse -eq 3)
|
|
{
|
|
..\..\conf\cru\binaries\1360-768.exe /i
|
|
$vSCDisplayResolutionSelectionExitCode = $?
|
|
if ($vSCDisplayResolutionSelectionExitCode -neq $true)
|
|
{
|
|
Write-Host "SC-DSP-ERR004: CUSTOM RESOLUTION APPLICATION FAILED"
|
|
Write-Host "For some reason, the custom resolution failed to apply - Please open a issue on the git repository at https://git.sdf.org/camoy/Sweetcade"
|
|
Write-Host "You can also try applying the custom resolution manually using Custom Resolution Utility installed at:"
|
|
Write-Host "C:\sc\tools\cru\CRU.EXE"
|
|
Write-Host "Ignoring this issue for now and moving on in 60 seconds"
|
|
Start-Sleep -Seconds 60
|
|
Exit 1
|
|
}
|
|
else
|
|
{
|
|
Write-Host "Custom resolution has been applied, moving on to the next step in 15 seconds"
|
|
Start-Sleep -Seconds 15
|
|
Exit 0
|
|
}
|
|
}
|
|
elseif ($vSCDisplayResolutionSelectionResponse -eq 4)
|
|
{
|
|
..\..\conf\cru\binaries\1920-1080.exe /i
|
|
$vSCDisplayResolutionSelectionExitCode = $?
|
|
if ($vSCDisplayResolutionSelectionExitCode -neq $true)
|
|
{
|
|
Write-Host "SC-DSP-ERR005: CUSTOM RESOLUTION APPLICATION EXITED WITH NON ZERO EXIT CODE"
|
|
Write-Host "For some reason, the custom resolution failed to apply or exited with a non-zero exit code"
|
|
Write-Host "Please open a issue on the git repository at https://git.sdf.org/camoy/Sweetcade"
|
|
Write-Host "You can also try applying the custom resolution manually using Custom Resolution Utility installed at:"
|
|
Write-Host "C:\sc\tools\cru\CRU.EXE"
|
|
Write-Host "Ignoring this issue for now and moving on in 60 seconds"
|
|
Start-Sleep -Seconds 60
|
|
Exit 1
|
|
}
|
|
else
|
|
{
|
|
Write-Host "Custom resolution has been applied, moving on to the next step in 15 seconds"
|
|
Start-Sleep -Seconds 15
|
|
Exit 0
|
|
}
|
|
}
|
|
elseif ($vSCDisplayResolutionSelectionResponse -eq 0)
|
|
{
|
|
Write-Host "You have chosen to configure a custom resolution yourself"
|
|
Write-Host "Opening Custom Resolution Utility now for you"
|
|
C:\sc\tools\cru\CRU.EXE
|
|
Write-Host "Now apply your resolution through the appropriate executable. Press the C key to [C]ontinue when you are finished"
|
|
Read-Host "C"
|
|
Write-Host "Moving on to the next step in 15 seconds"
|
|
Start-Sleep -Seconds 15
|
|
Exit 0
|
|
}
|
|
else {
|
|
Write-Host "SC-DSP-ERR006: INVALID SELECTION"
|
|
Write-Host "The number you have entered is invalid. Please enter a number from the list and try again"
|
|
}
|
|
}
|
|
|
|
fSCDisplayResolutionSelection |