Skip to content

Commit

Permalink
Release 0.6.0.21
Browse files Browse the repository at this point in the history
----------------
Fix resolution menu and GPU such that it adheres to the machines MCR and the machine type. PR #50 and #53.
Fixed double menu-items checked for the resolution detection.
When switching resolution with the menu, also set the MCR bit to match.
Fixed buffer size bug in uploader when in F256 mode. PR #54.
Fixed crash when the user removes a sdcard directory or file... PR #52.
Update the F256's kernel with new firmware.
  • Loading branch information
Daniel Tremblay committed Dec 17, 2023
1 parent 26fc367 commit 3d3921b
Show file tree
Hide file tree
Showing 27 changed files with 3,452 additions and 1,517 deletions.
93 changes: 84 additions & 9 deletions Main/FoenixIDE.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -278,10 +278,16 @@
<Compile Include="UI\WatchForm.Designer.cs">
<DependentUpon>WatchForm.cs</DependentUpon>
</Compile>
<Content Include="roms\kernel_B.lst" />
<Content Include="roms\kernel_B.lst">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="roms\kernel_F256jr.lst" />
<Content Include="roms\kernel_FMX.lst" />
<Content Include="roms\kernel_U.lst" />
<Content Include="roms\kernel_FMX.lst">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="roms\kernel_U.lst">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<EmbeddedResource Include="Display\Gpu.resx">
<DependentUpon>Gpu.cs</DependentUpon>
</EmbeddedResource>
Expand Down Expand Up @@ -395,12 +401,81 @@
</None>
<None Include="Resources\GENMIDI.op2" />
<None Include="Resources\zero.bmp" />
<None Include="roms\kernel_B.hex" />
<None Include="roms\kernel_F256jr.hex" />
<None Include="roms\kernel_FMX.hex" />
<None Include="roms\kernel_U.hex" />
<None Include="roms\kernel_U_Plus.hex" />
<Content Include="roms\kernel_U_Plus.lst" />
<None Include="roms\F256\3b.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="roms\F256\3c.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="roms\F256\3d.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="roms\F256\3e.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="roms\F256\3f.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="roms\F256\bulk.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="roms\F256\docs_superbasic1.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="roms\F256\docs_superbasic2.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="roms\F256\docs_superbasic3.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="roms\F256\docs_superbasic4.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="roms\F256\dos.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="roms\F256\help.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="roms\F256\lockout.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="roms\F256\pexec.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="roms\F256\sb01.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="roms\F256\sb02.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="roms\F256\sb03.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="roms\F256\sb04.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="roms\F256\xdev.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="roms\kernel_B.hex">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="roms\kernel_F256jr.hex">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="roms\kernel_FMX.hex">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="roms\kernel_U.hex">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="roms\kernel_U_Plus.hex">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<Content Include="roms\kernel_U_Plus.lst">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<None Include="Resources\save_btn.bmp" />
<None Include="UI\Images\memory-btn.png" />
<None Include="UI\Images\delete-btn.png" />
Expand Down
4 changes: 2 additions & 2 deletions Main/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.6.0.20")]
[assembly: AssemblyFileVersion("0.6.0.20")]
[assembly: AssemblyVersion("0.6.0.21")]
[assembly: AssemblyFileVersion("0.6.0.21")]
2 changes: 1 addition & 1 deletion Main/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

68 changes: 52 additions & 16 deletions Main/UI/MainWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -284,13 +284,6 @@ private void BasicWindow_Load(object sender, EventArgs e)
{
this.Top = 0;
this.Left = 0;

//this.Width = debugWindow.Left;
if (this.Width > 1200)
{
this.Width = 1200;
}
this.Height = Convert.ToInt32(this.Width * 0.75);
}

SetDipSwitchMemory();
Expand Down Expand Up @@ -325,36 +318,72 @@ private void BasicWindow_Load(object sender, EventArgs e)

int height = Simulator.Properties.Settings.Default.ViewHeight;
gpu.SetViewSize(Simulator.Properties.Settings.Default.ViewWidth, height);

//
// Check the menu item that corresponds to the size
switch (height)
{
case 400:
scale1_0X_H400ToolStripMenuItem.Checked = true;
CurrentCheckedMenuItem = scale1_0X_H400ToolStripMenuItem;
CurrentCheckedMenuItem.Checked = true;
SetF256_400LinesMode(true);
break;
case 800:
scale2_0X_H400ToolStripMenuItem.Checked = true;
CurrentCheckedMenuItem = scale2_0X_H400ToolStripMenuItem;
CurrentCheckedMenuItem.Checked = true;
SetF256_400LinesMode(true);
break;
case 1200:
scale3_0X_H400ToolStripMenuItem.Checked = true;
CurrentCheckedMenuItem = scale3_0X_H400ToolStripMenuItem;
CurrentCheckedMenuItem.Checked = true;
SetF256_400LinesMode(true);
break;
case 1600:
scale4_0X_H400ToolStripMenuItem.Checked = true;
CurrentCheckedMenuItem= scale4_0X_H400ToolStripMenuItem;
CurrentCheckedMenuItem.Checked = true;
SetF256_400LinesMode(true);
break;
case 480:
scale1_0X_H480ToolStripMenuItem.Checked = true;
CurrentCheckedMenuItem = scale1_0X_H480ToolStripMenuItem;
CurrentCheckedMenuItem.Checked = true;
SetF256_400LinesMode(false);
break;
case 960:
scale2_0X_H480ToolStripMenuItem.Checked = true;
CurrentCheckedMenuItem = scale2_0X_H480ToolStripMenuItem;
CurrentCheckedMenuItem.Checked = true;
SetF256_400LinesMode(false);
break;
case 1440:
scale3_0X_H480ToolStripMenuItem.Checked = true;
CurrentCheckedMenuItem = scale3_0X_H480ToolStripMenuItem;
CurrentCheckedMenuItem.Checked = true;
SetF256_400LinesMode(false);
break;
case 1920:
scale4_0X_H480ToolStripMenuItem.Checked = true;
CurrentCheckedMenuItem = scale4_0X_H480ToolStripMenuItem;
CurrentCheckedMenuItem.Checked = true;
SetF256_400LinesMode(false);
break;
}
}

// Modify MCR Hi, bit0 to toggle the resolution of the F256
private void SetF256_400LinesMode(bool value)
{
ushort bytes = ReadMCRBytesFromVicky();
byte hi = (byte)(bytes >> 8);
byte lo = (byte)(bytes & 0xFF);
if (value)
{
hi = (byte)(hi | 1);
}
else
{
hi = (byte)(hi & 0xFE);
}
WriteMCRBytesToVicky(lo, hi);
}


private void CenterForm(Form form)
{
int left = this.Left + (this.Width - form.Width) / 2;
Expand Down Expand Up @@ -1941,49 +1970,56 @@ private void scale1_0X_H480ToolStripMenuItem_Click(object sender, EventArgs e)
{
CommonScaleMenuItemClick(sender);
gpu.SetViewScaling(1.0f, 640, 480);
this.Size = new Size(664, 582);
SetF256_400LinesMode(false);
}

private void scale2_0X_H480ToolStripMenuItem_Click(object sender, EventArgs e)
{
CommonScaleMenuItemClick(sender);
gpu.SetViewScaling(2.0f, 640, 480);
SetF256_400LinesMode(false);
}


private void scale3_0X_H480ToolStripMenuItem_Click(object sender, EventArgs e)
{
CommonScaleMenuItemClick(sender);
gpu.SetViewScaling(3.0f, 640, 480);
SetF256_400LinesMode(false);
}

private void scale4_0X_H480ToolStripMenuItem_Click(object sender, EventArgs e)
{
CommonScaleMenuItemClick(sender);
gpu.SetViewScaling(4.0f, 640, 480);
SetF256_400LinesMode(false);
}

private void scale1_0X_H400ToolStripMenuItem_Click(object sender, EventArgs e)
{
CommonScaleMenuItemClick(sender);
gpu.SetViewScaling(1.0f, 640, 400);
SetF256_400LinesMode(true);
}

private void scale2_0X_H400ToolStripMenuItem_Click(object sender, EventArgs e)
{
CommonScaleMenuItemClick(sender);
gpu.SetViewScaling(2.0f, 640, 400);
SetF256_400LinesMode(true);
}

private void scale3_0X_H400ToolStripMenuItem_Click(object sender, EventArgs e)
{
CommonScaleMenuItemClick(sender);
gpu.SetViewScaling(3.0f, 640, 400);
SetF256_400LinesMode(true);
}
private void scale4_0X_H400ToolStripMenuItem_Click(object sender, EventArgs e)
{
CommonScaleMenuItemClick(sender);
gpu.SetViewScaling(4.0f, 640, 400);
SetF256_400LinesMode(true);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Main/UI/MainWindow.resx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
<value>253, 18</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>36</value>
<value>25</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
Expand Down
11 changes: 7 additions & 4 deletions Main/UI/UploaderWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -788,15 +788,18 @@ public void ExitFnxDebugMode()
*/
public void PreparePacket2Write(byte[] buffer, int FNXMemPointer, int FilePointer, int Size)
{
// Maximum transmission size is 8192
if (Size > 8192)
// Maximum transmission size is 8192 for FMX, U/U+ but 2048 for F256
if (!BoardVersionHelpers.IsF256(boardVersion))
{
if (!BoardVersionHelpers.IsF256(boardVersion))
if (Size > 8192)
{
Size = 8192;
Console.WriteLine("PreparePacket2Write: output truncated to 8K bytes.");
}
else
}
else
{
if (Size > 2048)
{
Size = 2048;
Console.WriteLine("PreparePacket2Write: output truncated to 2K bytes.");
Expand Down
Binary file added Main/roms/F256/3b.bin
Binary file not shown.
Binary file added Main/roms/F256/3c.bin
Binary file not shown.
Binary file added Main/roms/F256/3d.bin
Binary file not shown.
Binary file added Main/roms/F256/3e.bin
Binary file not shown.
Binary file added Main/roms/F256/3f.bin
Binary file not shown.
18 changes: 18 additions & 0 deletions Main/roms/F256/bulk.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
3f,lockout.bin
01,xdev.bin
02,sb01.bin
03,sb02.bin
04,sb03.bin
05,sb04.bin
06,dos.bin
07,pexec.bin
10,help.bin
11,docs_superbasic1.bin
12,docs_superbasic2.bin
13,docs_superbasic3.bin
14,docs_superbasic4.bin
3b,3b.bin
3c,3c.bin
3d,3d.bin
3e,3e.bin
3f,3f.bin
Binary file added Main/roms/F256/docs_superbasic1.bin
Binary file not shown.
Binary file added Main/roms/F256/docs_superbasic2.bin
Binary file not shown.
Binary file added Main/roms/F256/docs_superbasic3.bin
Binary file not shown.
Binary file added Main/roms/F256/docs_superbasic4.bin
Binary file not shown.
Binary file added Main/roms/F256/dos.bin
Binary file not shown.
Binary file added Main/roms/F256/help.bin
Binary file not shown.
Binary file added Main/roms/F256/lockout.bin
Binary file not shown.
Binary file added Main/roms/F256/pexec.bin
Binary file not shown.
Binary file added Main/roms/F256/sb01.bin
Binary file not shown.
Binary file added Main/roms/F256/sb02.bin
Binary file not shown.
Binary file added Main/roms/F256/sb03.bin
Binary file not shown.
Binary file added Main/roms/F256/sb04.bin
Binary file not shown.
Binary file added Main/roms/F256/xdev.bin
Binary file not shown.
Loading

0 comments on commit 3d3921b

Please sign in to comment.