mirror of
https://github.com/stuff-by-3-random-dudes/UWUVCI-AIO-WPF
synced 2024-11-10 13:44:13 +00:00
NES & SNES now works :)
todo: images custom bases config feature AutoUpdater
This commit is contained in:
parent
e2e755bc65
commit
edd7737bc4
8 changed files with 95 additions and 4 deletions
|
@ -99,12 +99,15 @@ namespace UWUVCI_AIO_WPF
|
|||
GBA(RomPath);
|
||||
break;
|
||||
|
||||
/*case GameConsoles.NES:
|
||||
case GameConsoles.NES:
|
||||
NESSNES(RomPath);
|
||||
break;
|
||||
case GameConsoles.SNES:
|
||||
NESSNES(RemoveHeader(RomPath));
|
||||
break;*/
|
||||
break;
|
||||
case GameConsoles.TG16:
|
||||
TG16(RomPath);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -278,6 +281,25 @@ namespace UWUVCI_AIO_WPF
|
|||
}
|
||||
}
|
||||
|
||||
private static void TG16(string injectRomPath)
|
||||
{
|
||||
|
||||
//creating pkg file including the TG16 rom
|
||||
using (Process TurboInject = new Process())
|
||||
{
|
||||
TurboInject.StartInfo.UseShellExecute = false;
|
||||
TurboInject.StartInfo.CreateNoWindow = true;
|
||||
TurboInject.StartInfo.FileName = Path.Combine(toolsPath, "BuildPcePkg.exe");
|
||||
TurboInject.StartInfo.Arguments = $"\"{injectRomPath}\"";
|
||||
TurboInject.Start();
|
||||
TurboInject.WaitForExit();
|
||||
}
|
||||
//replacing tg16 rom
|
||||
File.Delete(Path.Combine(baseRomPath, "content", "pceemu", "pce.pkg"));
|
||||
File.Copy("pce.pkg", Path.Combine(baseRomPath, "content", "pceemu", "pce.pkg"));
|
||||
File.Delete("pce.pkg");
|
||||
}
|
||||
|
||||
private static void NESSNES(string injectRomPath)
|
||||
{
|
||||
string rpxFile = Directory.GetFiles(Path.Combine(baseRomPath, "code"), "*.rpx")[0]; //To get the RPX path where the NES/SNES rom needs to be Injected in
|
||||
|
|
|
@ -167,6 +167,16 @@ namespace UWUVCI_AIO_WPF
|
|||
set { lSNES = value; OnPropertyChanged(); }
|
||||
}
|
||||
|
||||
private List<GameBases> lTG16 = new List<GameBases>();
|
||||
|
||||
|
||||
|
||||
public List<GameBases> LTG16
|
||||
{
|
||||
get { return lTG16; }
|
||||
set { lTG16 = value; OnPropertyChanged(); }
|
||||
}
|
||||
|
||||
private List<GameBases> ltemp = new List<GameBases>();
|
||||
|
||||
public List<GameBases> Ltemp
|
||||
|
@ -317,6 +327,9 @@ namespace UWUVCI_AIO_WPF
|
|||
case GameConsoles.SNES:
|
||||
dialog.Filter = "Super Nintendo Entertainment System ROM (*.sfc; *.smc) | *.sfc;*.smc";
|
||||
break;
|
||||
case GameConsoles.TG16:
|
||||
dialog.Filter = "TurboGrafX-16 ROM (*.pce) | *.pce";
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if(!INI)
|
||||
|
@ -369,6 +382,10 @@ namespace UWUVCI_AIO_WPF
|
|||
{
|
||||
ret.Add(path + "gba");
|
||||
}
|
||||
if (!File.Exists(path + "tg16"))
|
||||
{
|
||||
ret.Add(path + "tg16");
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
public static void DownloadBase(string name)
|
||||
|
@ -548,6 +565,13 @@ namespace UWUVCI_AIO_WPF
|
|||
return b;
|
||||
}
|
||||
}
|
||||
foreach (GameBases b in LTG16)
|
||||
{
|
||||
if (b.Name == NameWORegion && b.Region.ToString() == Region)
|
||||
{
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -558,16 +582,19 @@ namespace UWUVCI_AIO_WPF
|
|||
LNES.Clear();
|
||||
LSNES.Clear();
|
||||
LGBA.Clear();
|
||||
LTG16.Clear();
|
||||
lNDS = VCBTool.ReadBasesFromVCB($@"bases/bases.vcbnds");
|
||||
lNES = VCBTool.ReadBasesFromVCB($@"bases/bases.vcbnes");
|
||||
lSNES = VCBTool.ReadBasesFromVCB($@"bases/bases.vcbsnes");
|
||||
lN64 = VCBTool.ReadBasesFromVCB($@"bases/bases.vcbn64");
|
||||
lGBA = VCBTool.ReadBasesFromVCB($@"bases/bases.vcbgba");
|
||||
lTG16 = VCBTool.ReadBasesFromVCB($@"bases/bases.vcbtg16");
|
||||
CreateSettingIfNotExist(lNDS, GameConsoles.NDS);
|
||||
CreateSettingIfNotExist(lNES, GameConsoles.NES);
|
||||
CreateSettingIfNotExist(lSNES, GameConsoles.SNES);
|
||||
CreateSettingIfNotExist(lGBA, GameConsoles.GBA);
|
||||
CreateSettingIfNotExist(lN64, GameConsoles.N64);
|
||||
CreateSettingIfNotExist(lTG16, GameConsoles.TG16);
|
||||
}
|
||||
private void CreateSettingIfNotExist(List<GameBases> l, GameConsoles console)
|
||||
{
|
||||
|
@ -604,6 +631,9 @@ namespace UWUVCI_AIO_WPF
|
|||
case GameConsoles.SNES:
|
||||
Ltemp = LSNES;
|
||||
break;
|
||||
case GameConsoles.TG16:
|
||||
Ltemp = LTG16;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -750,6 +780,17 @@ namespace UWUVCI_AIO_WPF
|
|||
}
|
||||
}
|
||||
}
|
||||
if (!cont)
|
||||
{
|
||||
foreach (GameBases b in lTG16)
|
||||
{
|
||||
if (b.Name == gb.Name && b.Region == gb.Region)
|
||||
{
|
||||
ret = GameConsoles.TG16;
|
||||
cont = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
public List<bool> getInfoOfBase(GameBases gb)
|
||||
|
|
BIN
UWUVCI AIO WPF/UI/Images/TG16.png
Normal file
BIN
UWUVCI AIO WPF/UI/Images/TG16.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 924 B |
|
@ -71,7 +71,7 @@
|
|||
</Grid>
|
||||
<ListView Foreground="White" ScrollViewer.HorizontalScrollBarVisibility="Disabled" PreviewMouseLeftButtonUp="ListView_Click">
|
||||
<!--NDS-->
|
||||
<ListViewItem Height="60" x:Name="NDS" IsEnabled="True" Cursor="Hand">
|
||||
<ListViewItem Height="60" x:Name="NDS" IsEnabled="{Binding PathsSet}" Cursor="Hand">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image Source="/UWUVCI AIO WPF;component/UI/Images/nds64v64.png"></Image>
|
||||
<TextBlock Text="NDS VC Inject" VerticalAlignment="Center" Margin="20 10"/>
|
||||
|
@ -105,6 +105,13 @@
|
|||
<TextBlock Text="SNES VC Inject" VerticalAlignment="Center" Margin="20 10"/>
|
||||
</StackPanel>
|
||||
</ListViewItem>
|
||||
<!--TG16-->
|
||||
<ListViewItem Height="60" x:Name="TG16" IsEnabled="{Binding PathsSet}" Cursor="Hand">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image Source="/UWUVCI AIO WPF;component/UI/Images/tg16.png"></Image>
|
||||
<TextBlock Text="TG16 VC Inject" VerticalAlignment="Center" Margin="20 10"/>
|
||||
</StackPanel>
|
||||
</ListViewItem>
|
||||
<!--Settings-->
|
||||
<ListViewItem Height="60" x:Name="Settings" Cursor="Hand">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
|
|
|
@ -98,6 +98,11 @@ namespace UWUVCI_AIO_WPF
|
|||
load_frame.Content = new INJECTFRAME(GameConsoles.SNES);
|
||||
break;
|
||||
case 5:
|
||||
DestroyFrame();
|
||||
tbTitleBar.Text = "UWUVCI AIO - TurboGrafX-16 VC INJECT";
|
||||
load_frame.Content = new INJECTFRAME(GameConsoles.TG16);
|
||||
break;
|
||||
case 6:
|
||||
DestroyFrame();
|
||||
tbTitleBar.Text = "UWUVCI AIO - SETTINGS";
|
||||
load_frame.Content = new SettingsFrame(this);
|
||||
|
|
|
@ -106,6 +106,13 @@
|
|||
<TextBlock Text="SNES VC Inject" VerticalAlignment="Center" Margin="20 10"/>
|
||||
</StackPanel>
|
||||
</ListViewItem>
|
||||
<!--TG16-->
|
||||
<ListViewItem Height="60" x:Name="TG16" Cursor="Hand">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image Source="/UWUVCI AIO WPF;component/UI/Images/tg16.png"></Image>
|
||||
<TextBlock Text="TG16 VC Inject" VerticalAlignment="Center" Margin="20 10"/>
|
||||
</StackPanel>
|
||||
</ListViewItem>
|
||||
</ListView>
|
||||
|
||||
</StackPanel>
|
||||
|
|
|
@ -86,6 +86,11 @@ namespace UWUVCI_AIO_WPF.UI.Windows
|
|||
tbTitleBar.Text = "UWUVCI AIO - TKeys";
|
||||
load_frame.Content = new TKFrame(GameConsoles.SNES);
|
||||
break;
|
||||
case 5:
|
||||
DestroyFrame();
|
||||
tbTitleBar.Text = "UWUVCI AIO - TKeys";
|
||||
load_frame.Content = new TKFrame(GameConsoles.TG16);
|
||||
break;
|
||||
}
|
||||
}
|
||||
private void Window_Close(object sender, RoutedEventArgs e)
|
||||
|
|
|
@ -55,7 +55,8 @@
|
|||
<SignManifests>false</SignManifests>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="GameBaseClassLibrary">
|
||||
<Reference Include="GameBaseClassLibrary, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\GameBaseClassLibrary\GameBaseClassLibrary\bin\Debug\GameBaseClassLibrary.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MaterialDesignColors, Version=1.2.2.920, Culture=neutral, processorArchitecture=MSIL">
|
||||
|
@ -258,6 +259,9 @@
|
|||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="UI\Images\TG16.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="..\packages\MaterialDesignThemes.3.0.1\build\MaterialDesignThemes.targets" Condition="Exists('..\packages\MaterialDesignThemes.3.0.1\build\MaterialDesignThemes.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
|
|
Loading…
Reference in a new issue