Skip to content

Commit

Permalink
DuckStation support + BIOS prompts
Browse files Browse the repository at this point in the history
Added DuckStation support.
There will be prompts for BIOS' in certain emulators, with a link to their wiki pages.
Fixed broken emulator downloads.
  • Loading branch information
ParthK117 committed Dec 24, 2020
1 parent 2d96227 commit 0cc5863
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 15 deletions.
Binary file modified .vs/Emuloader/v16/.suo
Binary file not shown.
Binary file modified W Emuloader/bin/Debug/Emuloader.pdb
Binary file not shown.
Binary file added W Emuloader/bin/Debug/resources/duckstation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion W Emuloader/bin/Debug/settings.dat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
load=1
dark=0
version=1.0.1
version=1.1.0
autoupdate=1
exitonx=0
fancydl=0
Expand Down
4 changes: 4 additions & 0 deletions W Emuloader/load_functions.vb
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,10 @@ Module load_functions
emutabs(index).Text = "yuzu"
emutabs(index).Visible = True
currentmetadata = File.ReadAllLines(".\" & eldr_entry & "\yuzu.eldr")
ElseIf eldr_entry.Contains("DUCKSTATION") Then
emutabs(index).Text = "DuckStation"
emutabs(index).Visible = True
currentmetadata = File.ReadAllLines(".\" & eldr_entry & "\duckstation.eldr")
End If
emu_tab_metadata_list.emutabs_metadata(index) = currentmetadata
index = index + 1
Expand Down
15 changes: 8 additions & 7 deletions W Emuloader/main.vb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Public Class main
Public Shared labelgrey As Color
Public Shared tab_index = 0
Public Shared dark = 0
Public Shared version_number = "1.0.1"
Public Shared version_number = "1.1.0"
Public Shared global_settings As New List(Of String)
Public Shared boxart_url As String
Dim emulator As Process
Expand Down Expand Up @@ -2155,9 +2155,6 @@ x.SubItems(4).Text, "Queued", timestamp}))
Case "NES"
platform_id = "NES"
emulator_exe.Arguments = ("Mesen " & """" & rom_path & """ " & params)
Case "PSX"
platform_id = "PSX"
emulator_exe.Arguments = ("-loadbin " & """" & rom_path & """ " & params)
Case "MGD"
platform_id = "MGD"
emulator_exe.Arguments = ("""" & rom_path & """ " & params)
Expand All @@ -2171,6 +2168,13 @@ x.SubItems(4).Text, "Queued", timestamp}))
platform_id = "SWH"
emulator_exe.Arguments = ("""" & rom_path & """ " & params)
End Select
If currenttab_metadata(1) = "PSX" And currenttab_metadata(0) = "ePSXe" Then
platform_id = "PSX"
emulator_exe.Arguments = ("-loadbin " & """" & rom_path & """ " & params)
ElseIf currenttab_metadata(1) = "PSX" And currenttab_metadata(0) = "DuckStation" Then
platform_id = "PSX"
emulator_exe.Arguments = ("""" & rom_path & """ " & params)
End If
If checkbox_fullscreen.Checked = True Then
emulator_exe.WindowStyle = ProcessWindowStyle.Maximized
Else
Expand Down Expand Up @@ -2419,7 +2423,4 @@ x.SubItems(4).Text, "Queued", timestamp}))
btn_help.BackgroundImage = System.Drawing.Image.FromFile(".\resources\helpwhite.png")
End Sub

Private Sub panel_rom_info_Paint(sender As Object, e As PaintEventArgs) Handles panel_rom_info.Paint

End Sub
End Class
9 changes: 9 additions & 0 deletions W Emuloader/module_emulatorupdater.vb
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,15 @@ Module module_emulatorupdater
Else
Call main.launch_emulator()
End If
Case "DuckStation"
Dim newversion As String() = uptodate_list(14).Split(",")
If Not main.currenttab_metadata(5) = newversion(4) Then
Dim arguments As String()
arguments = {newversion(0)}
main.thread_emulator_update.RunWorkerAsync(arguments)
Else
Call main.launch_emulator()
End If
End Select


Expand Down
35 changes: 28 additions & 7 deletions W Emuloader/newemulator.vb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Imports System.ComponentModel

Public Class newemulator
Dim arguments As String()
Dim list_of_emulators As String() = {"Visual Boy Advance-M (GBA)", "Citra (3DS)", "DeSmuME (NDS)", "Project64 (N64)", "PPSSPP (PSP)", "Dolphin (WII)", "Cemu (WIIU)", "Snes9x (SNES)", "Mesen (NES)", "ePSXe (PSX)", "Fusion (MGD)", "Redream (DC)", "PCSX2 (PS2)", "yuzu (SWH)"}
Dim list_of_emulators As String() = {"Visual Boy Advance-M (GBA)", "Citra (3DS)", "DeSmuME (NDS)", "Project64 (N64)", "PPSSPP (PSP)", "Dolphin (WII)", "Cemu (WIIU)", "Snes9x (SNES)", "Mesen (NES)", "ePSXe (PSX)", "Fusion (MGD)", "Redream (DC)", "PCSX2 (PS2)", "yuzu (SWH)", "DuckStation (PSX)"}
Dim uptodate_list As String()
Dim vnumber As String

Expand Down Expand Up @@ -116,6 +116,7 @@ Public Class newemulator
My.Computer.FileSystem.WriteAllText(".\" & arguments(0) & "-" & timestamp & "\" & arguments(6), metadata, True)
System.IO.File.Create(".\" & arguments(0) & "-" & timestamp & "\cmdlineargs.ini").Dispose()
Directory.CreateDirectory(".\roms\" & arguments(3))
System.IO.File.Create(".\" & arguments(0) & "-" & timestamp & "\portable.txt").Dispose()
End Sub

Private Sub emulator_downloader_RunWorkerCompleted(sender As Object, e As RunWorkerCompletedEventArgs) Handles emulator_downloader.RunWorkerCompleted
Expand Down Expand Up @@ -168,15 +169,15 @@ Public Class newemulator
Dim desmume As String() = uptodate_list(2).Split(",")
lbl_emulator_name.Text = "DeSmuME"
lbl_platform.Text = "Platform: Nintendo DS"
lbl_source.Text = "Source: Google Drive (Emuloader Repack)"
lbl_source.Text = "Source: GitHub (Emuloader Repack)"
lbl_version_number.Text = desmume(4)
vnumber = desmume(4)
picturebox_emulogo.BackgroundImage = New System.Drawing.Bitmap(".\resources\desmume.png")
Case "Project64 (N64)"
Dim project64 As String() = uptodate_list(3).Split(",")
lbl_emulator_name.Text = "Project64"
lbl_platform.Text = "Platform: Nintendo 64"
lbl_source.Text = "Source: Google Drive (Emuloader Repack)"
lbl_source.Text = "Source: GitHub (Emuloader Repack)"
lbl_version_number.Text = project64(4)
vnumber = project64(4)
picturebox_emulogo.BackgroundImage = New System.Drawing.Bitmap(".\resources\project64.png")
Expand All @@ -192,7 +193,7 @@ Public Class newemulator
Dim dolphin As String() = uptodate_list(5).Split(",")
lbl_emulator_name.Text = "Dolphin"
lbl_platform.Text = "Platform: Nintendo Wii (+Gamecube)"
lbl_source.Text = "Source: Google Drive (Emuloader Repack)"
lbl_source.Text = "Source: GitHub (Emuloader Repack)"
lbl_version_number.Text = dolphin(4)
vnumber = dolphin(4)
picturebox_emulogo.BackgroundImage = New System.Drawing.Bitmap(".\resources\dolphin.png")
Expand Down Expand Up @@ -248,7 +249,7 @@ Public Class newemulator
Dim emulator_meta As String() = uptodate_list(12).Split(",")
lbl_emulator_name.Text = "PCSX2"
lbl_platform.Text = "Platform: Playstation 2"
lbl_source.Text = "Source: Google Drive (Emuloader Repack)"
lbl_source.Text = "Source: GitHub (Emuloader Repack)"
lbl_version_number.Text = emulator_meta(4)
vnumber = emulator_meta(4)
picturebox_emulogo.BackgroundImage = New System.Drawing.Bitmap(".\resources\pcsx2.png")
Expand All @@ -260,7 +261,14 @@ Public Class newemulator
lbl_version_number.Text = emulator_meta(4)
vnumber = emulator_meta(4)
picturebox_emulogo.BackgroundImage = New System.Drawing.Bitmap(".\resources\yuzu.png")

Case "DuckStation (PSX)"
Dim emulator_meta As String() = uptodate_list(14).Split(",")
lbl_emulator_name.Text = "DuckStation"
lbl_platform.Text = "Platform: Sony Playstation"
lbl_source.Text = "Source: Github"
lbl_version_number.Text = emulator_meta(4)
vnumber = emulator_meta(4)
picturebox_emulogo.BackgroundImage = New System.Drawing.Bitmap(".\resources\duckstation.png")
End Select
End If
End Sub
Expand Down Expand Up @@ -355,13 +363,26 @@ Public Class newemulator
emulator_downloader.RunWorkerAsync(arguments)
main.lbl_status.Text = "Installing PCSX2 (PS2)"
Call center_status_lbl()
MessageBox.Show("PCSX2 requires a PS2 Bios to function.")
Dim result = MessageBox.Show("PCSX2 requires a PS2 Bios to function. Would you like to find out more, or where to get one?", "BIOS Required", MessageBoxButtons.YesNo)
If result = DialogResult.Yes Then
Process.Start("https://tungstencore.com/docs/pcsx2-bios/")
End If
Case "yuzu (SWH)"
Dim emulator_meta As String() = uptodate_list(13).Split(",")
arguments = {"YUZU", emulator_meta(0), emulator_meta(1), "SWH", emulator_meta(2), "yuzu", "yuzu.eldr", emulator_meta(3), vnumber}
emulator_downloader.RunWorkerAsync(arguments)
main.lbl_status.Text = "Installing yuzu (SWH)"
Call center_status_lbl()
Case "DuckStation (PSX)"
Dim emulator_meta As String() = uptodate_list(14).Split(",")
arguments = {"DUCKSTATION", emulator_meta(0), emulator_meta(1), "PSX", emulator_meta(2), "DuckStation", "duckstation.eldr", emulator_meta(3), vnumber}
emulator_downloader.RunWorkerAsync(arguments)
main.lbl_status.Text = "Installing DuckStation (PSX)"
Call center_status_lbl()
Dim result = MessageBox.Show("DuckStation requires a PS1 Bios to function. Would you like to find out more, or where to get one?", "BIOS Required", MessageBoxButtons.YesNo)
If result = DialogResult.Yes Then
Process.Start("https://tungstencore.com/docs/duckstation-bios/")
End If
End Select
main.picturebox_loading.Visible = True
MessageBox.Show(arguments(5) & " will be installed")
Expand Down
Binary file modified W Emuloader/obj/Debug/Emuloader.pdb
Binary file not shown.
Binary file modified W Emuloader/obj/Debug/Emuloader.vbprojAssemblyReference.cache
Binary file not shown.

0 comments on commit 0cc5863

Please sign in to comment.