Skip to content

Commit

Permalink
Fix MSX & add Flash (beta)
Browse files Browse the repository at this point in the history
  • Loading branch information
CatmanFan committed Mar 12, 2024
1 parent 10ce197 commit 365fd1c
Show file tree
Hide file tree
Showing 17 changed files with 514 additions and 764 deletions.
7 changes: 0 additions & 7 deletions FriishProduce/Database.xml
Original file line number Diff line number Diff line change
Expand Up @@ -508,13 +508,6 @@
<emuVersion>0</emuVersion>
</Entry>

<Entry>
<tid>XAFJ</tid>
<name>Metal Gear</name>
<displayName>メタルギア</displayName>
<emuVersion>1</emuVersion>
</Entry>

<Entry>
<tid>XAPJ</tid>
<name>Metal Gear 2 - Solid Snake</name>
Expand Down
2 changes: 2 additions & 0 deletions FriishProduce/FriishProduce.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@
<Compile Include="MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon>
</Compile>
<Compile Include="_classes\Injectors\Flash.cs" />
<Compile Include="_classes\Injectors\Forwarder.cs" />
<Compile Include="_classes\ROM\Flash.cs" />
<Compile Include="_classes\Injectors\WiiVC\MSX.cs" />
<Compile Include="_classes\Language.cs" />
<Compile Include="_classes\ROM\MSX.cs" />
Expand Down
18 changes: 15 additions & 3 deletions FriishProduce/InjectorForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ private void Form_Shown(object sender, EventArgs e)
default:
case Console.Flash:
TIDCode = null;
ROM = new SWF();
ImportPatch.Enabled = false;
break;
}

Expand Down Expand Up @@ -253,7 +255,7 @@ protected virtual void CheckExport()

public bool[] CheckToolStripButtons() => new bool[]
{
Console != Console.NeoGeo && Console != Console.Flash && ROM?.Bytes != null, // LibRetro
Console != Console.Flash && (ROM?.Bytes != null || !string.IsNullOrWhiteSpace(ROM?.Path)), // LibRetro
Console != Console.Flash, // Browse manual
};

Expand Down Expand Up @@ -486,6 +488,8 @@ public void LoadImage(string path)

public bool LoadImage(Bitmap src)
{
if (src == null) return false;

try
{
Bitmap img = (Bitmap)src.Clone();
Expand Down Expand Up @@ -679,8 +683,11 @@ public bool CreateInject()
ForwarderCreator();
break;

default:
case Console.Flash:
FlashInject();
break;

default:
throw new NotImplementedException();
}

Expand Down Expand Up @@ -719,7 +726,7 @@ public bool CreateInject()
finally
{
Creator.Out = null;
if (OutWAD != null) OutWAD.Dispose();
OutWAD = null;
Parent.CleanTemp();
if (VC != null) VC.Dispose();
}
Expand All @@ -742,6 +749,11 @@ public void ForwarderCreator()
OutWAD = f.CreateWAD(OutWAD, Forwarder_Mode.SelectedItem.ToString().ToLower() == "vwii");
}

public void FlashInject()
{
OutWAD = Injectors.Flash.Inject(OutWAD, ROM.Path);
}

public void WiiVCInject()
{
// Create Wii VC injector to use
Expand Down
Loading

0 comments on commit 365fd1c

Please sign in to comment.