Skip to content

Commit

Permalink
Release 0.7.0.7
Browse files Browse the repository at this point in the history
---------------
Fixed typo in CPU Window - Address was mis-spelled.
Fixed Gamma Offset for F256K.
  • Loading branch information
Daniel Tremblay committed Aug 16, 2024
1 parent f0dc3e5 commit 65f9441
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 18 deletions.
16 changes: 8 additions & 8 deletions Main/Display/GPU_Common.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ private void GetTextLUT(byte fg, byte bg, bool gamma, out int value0, out int va
if (gamma)
{
fgValueBlue = VICKY.ReadByte(GammaBaseAddress + fgValueBlue); //gammaCorrection[fgValueBlue];
fgValueGreen = VICKY.ReadByte(GammaBaseAddress + 0x100 + fgValueGreen);//gammaCorrection[0x100 + fgValueGreen];
fgValueRed = VICKY.ReadByte(GammaBaseAddress + 0x200 + fgValueRed);//gammaCorrection[0x200 + fgValueRed];
fgValueGreen = VICKY.ReadByte(GammaBaseAddress + GammaOffset + fgValueGreen);//gammaCorrection[0x100 + fgValueGreen];
fgValueRed = VICKY.ReadByte(GammaBaseAddress + GammaOffset * 2 + fgValueRed);//gammaCorrection[0x200 + fgValueRed];
}

value0 = (int)((fgValueBlue << 16) + (fgValueGreen << 8) + fgValueRed + 0xFF000000);
Expand All @@ -196,8 +196,8 @@ private void GetTextLUT(byte fg, byte bg, bool gamma, out int value0, out int va
if (gamma)
{
bgValueBlue = VICKY.ReadByte(GammaBaseAddress + bgValueBlue); //gammaCorrection[bgValueBlue];
bgValueGreen = VICKY.ReadByte(GammaBaseAddress + 0x100 + bgValueGreen); //gammaCorrection[0x100 + bgValueGreen];
bgValueRed = VICKY.ReadByte(GammaBaseAddress + 0x200 + bgValueRed); //gammaCorrection[0x200 + bgValueRed];
bgValueGreen = VICKY.ReadByte(GammaBaseAddress + GammaOffset + bgValueGreen); //gammaCorrection[0x100 + bgValueGreen];
bgValueRed = VICKY.ReadByte(GammaBaseAddress + GammaOffset * 2 + bgValueRed); //gammaCorrection[0x200 + bgValueRed];
}

value1 = (int)((bgValueBlue << 16) + (bgValueGreen << 8) + bgValueRed + 0xFF000000);
Expand Down Expand Up @@ -225,8 +225,8 @@ public int GetLUTValue(in byte lutIndex, in byte color, in bool gamma)
if (gamma)
{
blue = VICKY.ReadByte(GammaBaseAddress + blue); // gammaCorrection[fgValueBlue];
green = VICKY.ReadByte(GammaBaseAddress + 0x100 + green); // gammaCorrection[0x100 + fgValueGreen];
red = VICKY.ReadByte(GammaBaseAddress + 0x200 + red); // gammaCorrection[0x200 + fgValueRed];
green = VICKY.ReadByte(GammaBaseAddress + GammaOffset + green); // gammaCorrection[0x100 + fgValueGreen];
red = VICKY.ReadByte(GammaBaseAddress + GammaOffset * 2 + red); // gammaCorrection[0x200 + fgValueRed];
}
value = (int)((blue << 16) + (green << 8) + red + 0xFF000000);
lc[lutIndex * 256 + color] = value;
Expand Down Expand Up @@ -716,8 +716,8 @@ private unsafe void DrawMouse(int* p, bool gammaCorrection, int line, int width,
if (gammaCorrection)
{
pixelIndexB = VICKY.ReadByte(GammaBaseAddress + pixelIndexR); // gammaCorrection[pixelIndexR];
pixelIndexG = VICKY.ReadByte(GammaBaseAddress + 0x100 + pixelIndexR); //gammaCorrection[0x100 + pixelIndexR];
pixelIndexR = VICKY.ReadByte(GammaBaseAddress + 0x200 + pixelIndexR); //gammaCorrection[0x200 + pixelIndexR];
pixelIndexG = VICKY.ReadByte(GammaBaseAddress + GammaOffset + pixelIndexR); //gammaCorrection[0x100 + pixelIndexR];
pixelIndexR = VICKY.ReadByte(GammaBaseAddress + GammaOffset * 2 + pixelIndexR); //gammaCorrection[0x200 + pixelIndexR];
}
int value = (int)((pixelIndexB << 16) + (pixelIndexG << 8) + pixelIndexR + 0xFF000000);
ptr[col + PosX] = value;
Expand Down
10 changes: 6 additions & 4 deletions Main/Display/Gpu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,11 @@ public void ResetGPU(bool started)
}

private int mode = 0; // Mode 0 is FAT Vicky, 1 is Tiny Vicky.
private int GammaOffset = 0x100; // Gamma Offset is 0x400 for F256K
public void SetMode(int mode)
{
this.mode = mode;
GammaOffset = mode == 0 ? 0x100 : 0x400;
}

const int STRIDE = 800;
Expand Down Expand Up @@ -342,8 +344,8 @@ unsafe void Gpu_Paint(object sender, PaintEventArgs e)
byte borderBlue = VICKY.ReadByte(MCRAddress + 7);
if (gammaCorrection)
{
borderRed = VICKY.ReadByte(GammaBaseAddress + 0x200 + borderRed); //gammaCorrection[0x200 + borderGreen];
borderGreen = VICKY.ReadByte(GammaBaseAddress + 0x100 + borderGreen); //gammaCorrection[0x100 + borderGreen];
borderRed = VICKY.ReadByte(GammaBaseAddress + GammaOffset * 2 + borderRed); //gammaCorrection[0x200 + borderGreen];
borderGreen = VICKY.ReadByte(GammaBaseAddress + GammaOffset + borderGreen); //gammaCorrection[0x100 + borderGreen];
borderBlue = VICKY.ReadByte(GammaBaseAddress + borderBlue); // gammaCorrection[borderBlue];
}
int borderColor = (int)(0xFF000000 + (borderBlue << 16) + (borderGreen << 8) + borderRed);
Expand Down Expand Up @@ -373,8 +375,8 @@ unsafe void Gpu_Paint(object sender, PaintEventArgs e)
byte backBlue = VICKY.ReadByte(MCRAddress + 0x0F);
if (gammaCorrection)
{
backRed = VICKY.ReadByte(GammaBaseAddress + 0x200 + backRed); // gammaCorrection[0x200 + backRed];
backGreen = VICKY.ReadByte(GammaBaseAddress + 0x100 + backGreen); //gammaCorrection[0x100 + backGreen];
backRed = VICKY.ReadByte(GammaBaseAddress + GammaOffset * 2 + backRed); // gammaCorrection[0x200 + backRed];
backGreen = VICKY.ReadByte(GammaBaseAddress + GammaOffset + backGreen); //gammaCorrection[0x100 + backGreen];
backBlue = VICKY.ReadByte(GammaBaseAddress + backBlue); //gammaCorrection[backBlue];
}
backgroundColor = (int)(0xFF000000 + (backBlue << 16) + (backGreen << 8) + backRed);
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.7.0.6")]
[assembly: AssemblyFileVersion("0.7.0.6")]
[assembly: AssemblyVersion("0.7.0.7")]
[assembly: AssemblyFileVersion("0.7.0.7")]
2 changes: 1 addition & 1 deletion Main/UI/MemoryWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ private void MemoryText_MouseMove(object sender, MouseEventArgs e)
String val = mem.Y.ToString("X2");

String address = mem.X.ToString("X6");
PositionLabel.Text = "Adress: $" + address.Substring(0, 2) + ":" + address.Substring(2) + ", Value: " + val; // + ", X: " + e.X + ", Y: " + e.Y + ", Col: " + col + ", Line: " + line;
PositionLabel.Text = "Address: $" + address.Substring(0, 2) + ":" + address.Substring(2) + ", Value: " + val; // + ", X: " + e.X + ", Y: " + e.Y + ", Col: " + col + ", Line: " + line;
}
else
{
Expand Down
10 changes: 7 additions & 3 deletions Release Notes.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Release 0.7.0.6
Release 0.7.0.7
---------------
Added missing F256 kernel files: wget.bin and fm0*.bin

Fixed typo in CPU Window - Address was mis-spelled.
Fixed Gamma Offset for F256K.
** TODO: Users can now modify the CPU registers when in debug mode. The registers have a white background when editable.
** TODO: Implemented the various cursor modes and rates.
** TODO: Implement an IEC interface to connect via USB to XUM1541 (try using the SerialPort class?).
Expand All @@ -14,6 +14,10 @@ Added missing F256 kernel files: wget.bin and fm0*.bin
** TODO: Saving basic files to emulated SD card often doesn't work or crashes the emulator.
** TODO: Support two joysticks and allow for multiple joystick buttons

Release 0.7.0.6
---------------
Added missing F256 kernel files: wget.bin and fm0*.bin

Release 0.7.0.5
---------------
Updated the readme file to include the F256Ks.
Expand Down

0 comments on commit 65f9441

Please sign in to comment.