Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions GeneratedCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@
DefineGeneratedCodeOverrides();
SetProvidedInterruptHandlersAsOverridden();
}

public Dictionary<SegmentedAddress, FunctionInformation> FunctionInformations => _functionInformations;


public void DefineGeneratedCodeOverrides()
{
DefineFunction(EntrySegmentAddress, 0x0, EntryPoint_OpenLogoHnmFileAndRun_1000_0000_10000, false);
Expand All @@ -50,7 +48,7 @@
Memory.SetZeroTerminatedString(MemoryUtils.ToPhysicalAddress(DS,DI), ".HNM", 5);
}
// Open file handle (LOGO.HNM)
Machine.Dos.DosInt21Handler.OpenFile(false);
Machine.Dos.DosInt21Handler.OpenFileorDevice(false);

Check failure on line 51 in GeneratedCode.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

'DosInt21Handler' does not contain a definition for 'OpenFileorDevice' and no accessible extension method 'OpenFileorDevice' accepting a first argument of type 'DosInt21Handler' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 51 in GeneratedCode.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

'DosInt21Handler' does not contain a definition for 'OpenFileorDevice' and no accessible extension method 'OpenFileorDevice' accepting a first argument of type 'DosInt21Handler' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 51 in GeneratedCode.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest)

'DosInt21Handler' does not contain a definition for 'OpenFileorDevice' and no accessible extension method 'OpenFileorDevice' accepting a first argument of type 'DosInt21Handler' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 51 in GeneratedCode.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest)

'DosInt21Handler' does not contain a definition for 'OpenFileorDevice' and no accessible extension method 'OpenFileorDevice' accepting a first argument of type 'DosInt21Handler' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 51 in GeneratedCode.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest)

'DosInt21Handler' does not contain a definition for 'OpenFileorDevice' and no accessible extension method 'OpenFileorDevice' accepting a first argument of type 'DosInt21Handler' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 51 in GeneratedCode.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest)

'DosInt21Handler' does not contain a definition for 'OpenFileorDevice' and no accessible extension method 'OpenFileorDevice' accepting a first argument of type 'DosInt21Handler' could be found (are you missing a using directive or an assembly reference?)
DX = 0x2E;
if (!CarryFlag)
{
Expand Down Expand Up @@ -559,7 +557,7 @@
public void UpdatePaletteDataAddress_1000_0E86_10E86()
{
SegmentedAddress pointer = PaletteDataAddress;
ushort newSegmentOffset = (ushort)(UInt16[pointer.ToPhysical()] + pointer.Offset);
ushort newSegmentOffset = (ushort)(UInt16[pointer] + pointer.Offset);
ushort newSegment = (ushort)((newSegmentOffset >> 4) + pointer.Segment);
ushort newOffset = (ushort)(newSegmentOffset & 0xF);
WritePaletteDataAddress(newSegment, newOffset);
Expand Down
19 changes: 0 additions & 19 deletions GeneratedCode_DecompiledAsm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,9 @@
cs2 = (ushort)(entrySegment + 0xE000);

DefineGeneratedCodeOverrides();
DetectCodeRewrites();
SetProvidedInterruptHandlersAsOverridden();
}

public Dictionary<SegmentedAddress, FunctionInformation> FunctionInformations => _functionInformations;

public void DefineGeneratedCodeOverrides()
{
// 0x1000
Expand Down Expand Up @@ -74,22 +71,6 @@
DefineFunction(cs1, 0x11BD, Nop_1000_11BD_111BD, false);
}

public void DetectCodeRewrites()
{
DefineExecutableArea(0x10000, 0x10090);
DefineExecutableArea(0x10970, 0x10CAF);
DefineExecutableArea(0x10CF4, 0x10ED4);
DefineExecutableArea(0x10EFE, 0x10F07);
DefineExecutableArea(0x10F30, 0x1103A);
DefineExecutableArea(0x1105F, 0x1106E);
DefineExecutableArea(0x11085, 0x11091);
DefineExecutableArea(0x1109A, 0x110C1);
DefineExecutableArea(0x110F4, 0x111C7);
DefineExecutableArea(0xF0008, 0xF000B);
DefineExecutableArea(0xF0014, 0xF0017);
DefineExecutableArea(0xF0020, 0xF0023);
}

/// <summary>
/// First pass rewrite done by the .NET Roslyn compiler (ReadyToRun pre-compilation)
/// </summary>
Expand Down Expand Up @@ -1354,9 +1335,9 @@
UInt16[DS, 0x58] = ES;
if (JumpDispatcher?.Jump(split_1000_0EB2_10EB2, 0) is true)
{
return JumpDispatcher?.JumpAsmReturn;

Check warning on line 1338 in GeneratedCode_DecompiledAsm.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Possible null reference return.

Check warning on line 1338 in GeneratedCode_DecompiledAsm.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Possible null reference return.

Check warning on line 1338 in GeneratedCode_DecompiledAsm.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest)

Possible null reference return.

Check warning on line 1338 in GeneratedCode_DecompiledAsm.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest)

Possible null reference return.

Check warning on line 1338 in GeneratedCode_DecompiledAsm.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest)

Possible null reference return.

Check warning on line 1338 in GeneratedCode_DecompiledAsm.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest)

Possible null reference return.
}
return JumpDispatcher?.JumpAsmReturn;

Check warning on line 1340 in GeneratedCode_DecompiledAsm.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Possible null reference return.

Check warning on line 1340 in GeneratedCode_DecompiledAsm.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Possible null reference return.

Check warning on line 1340 in GeneratedCode_DecompiledAsm.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest)

Possible null reference return.

Check warning on line 1340 in GeneratedCode_DecompiledAsm.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest)

Possible null reference return.

Check warning on line 1340 in GeneratedCode_DecompiledAsm.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest)

Possible null reference return.

Check warning on line 1340 in GeneratedCode_DecompiledAsm.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest)

Possible null reference return.
}

public virtual Action CommonUnknown_1000_0EAD_10EAD(int loadOffset)
Expand Down Expand Up @@ -1431,9 +1412,9 @@
BP = 0;
if (JumpDispatcher?.Jump(CommonUnknownSplit_1000_0F30_10F30, 0) is true)
{
return JumpDispatcher?.JumpAsmReturn;

Check warning on line 1415 in GeneratedCode_DecompiledAsm.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Possible null reference return.

Check warning on line 1415 in GeneratedCode_DecompiledAsm.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Possible null reference return.

Check warning on line 1415 in GeneratedCode_DecompiledAsm.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest)

Possible null reference return.

Check warning on line 1415 in GeneratedCode_DecompiledAsm.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest)

Possible null reference return.

Check warning on line 1415 in GeneratedCode_DecompiledAsm.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest)

Possible null reference return.

Check warning on line 1415 in GeneratedCode_DecompiledAsm.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest)

Possible null reference return.
}
return JumpDispatcher?.JumpAsmReturn;

Check warning on line 1417 in GeneratedCode_DecompiledAsm.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Possible null reference return.

Check warning on line 1417 in GeneratedCode_DecompiledAsm.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Possible null reference return.

Check warning on line 1417 in GeneratedCode_DecompiledAsm.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest)

Possible null reference return.

Check warning on line 1417 in GeneratedCode_DecompiledAsm.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest)

Possible null reference return.

Check warning on line 1417 in GeneratedCode_DecompiledAsm.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest)

Possible null reference return.

Check warning on line 1417 in GeneratedCode_DecompiledAsm.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest)

Possible null reference return.
//throw FailAsUntested("External goto not supported for this function.");
}

Expand Down
21 changes: 1 addition & 20 deletions GeneratedCode_OriginalAsm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,9 @@ public GeneratedOverrides_OriginalAsm(Dictionary<SegmentedAddress, FunctionInfor
this.cs2 = (ushort)(entrySegment + 0xE000);

DefineGeneratedCodeOverrides();
DetectCodeRewrites();
SetProvidedInterruptHandlersAsOverridden();
}

public Dictionary<SegmentedAddress, FunctionInformation> FunctionInformations => _functionInformations;


public void DefineGeneratedCodeOverrides()
{
// 0x1000
Expand Down Expand Up @@ -76,22 +73,6 @@ public void DefineGeneratedCodeOverrides()
DefineFunction(cs1, 0x11BD, Nop_1000_11BD_111BD, false);
}

public void DetectCodeRewrites()
{
DefineExecutableArea(0x10000, 0x10090);
DefineExecutableArea(0x10970, 0x10CAF);
DefineExecutableArea(0x10CF4, 0x10ED4);
DefineExecutableArea(0x10EFE, 0x10F07);
DefineExecutableArea(0x10F30, 0x1103A);
DefineExecutableArea(0x1105F, 0x1106E);
DefineExecutableArea(0x11085, 0x11091);
DefineExecutableArea(0x1109A, 0x110C1);
DefineExecutableArea(0x110F4, 0x111C7);
DefineExecutableArea(0xF0008, 0xF000B);
DefineExecutableArea(0xF0014, 0xF0017);
DefineExecutableArea(0xF0020, 0xF0023);
}

public virtual Action EntryPoint_OpenLogoHnmFileAndRun_1000_0000_10000(int loadOffset)
{
// MOV AX,0x111c (1000_0000 / 0x10000)
Expand Down
2 changes: 1 addition & 1 deletion PaletteData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{
public SegmentedAddress _address;

public PaletteData(IByteReaderWriter byteReaderWriter, SegmentedAddress baseAddress): base(byteReaderWriter, baseAddress.ToPhysical())
public PaletteData(IByteReaderWriter byteReaderWriter, SegmentedAddress baseAddress): base(byteReaderWriter, baseAddress.Linear)

Check failure on line 14 in PaletteData.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

'SegmentedAddress' does not contain a definition for 'Linear' and no accessible extension method 'Linear' accepting a first argument of type 'SegmentedAddress' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 14 in PaletteData.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

'SegmentedAddress' does not contain a definition for 'Linear' and no accessible extension method 'Linear' accepting a first argument of type 'SegmentedAddress' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 14 in PaletteData.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest)

'SegmentedAddress' does not contain a definition for 'Linear' and no accessible extension method 'Linear' accepting a first argument of type 'SegmentedAddress' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 14 in PaletteData.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest)

'SegmentedAddress' does not contain a definition for 'Linear' and no accessible extension method 'Linear' accepting a first argument of type 'SegmentedAddress' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 14 in PaletteData.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest)

'SegmentedAddress' does not contain a definition for 'Linear' and no accessible extension method 'Linear' accepting a first argument of type 'SegmentedAddress' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 14 in PaletteData.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest)

'SegmentedAddress' does not contain a definition for 'Linear' and no accessible extension method 'Linear' accepting a first argument of type 'SegmentedAddress' could be found (are you missing a using directive or an assembly reference?)
{
_address = baseAddress;
}
Expand Down
8 changes: 7 additions & 1 deletion logo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
<Using Include="Spice86.Core.Emulator.Function" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Spice86" Version="6.4.2" />
<PackageReference Include="Spice86" Version="6.4.2" />
<!--ProjectReference Include="../Spice86/src/Spice86.Shared/Spice86.Shared.csproj" />
<ProjectReference Include="../Spice86/src/Spice86.Logging/Spice86.Logging.csproj" />
<ProjectReference Include="../Spice86/src/Bufdio.Spice86/Bufdio.Spice86.csproj" />
<ProjectReference Include="../Spice86/src/Spice86/Spice86.csproj" />
<ProjectReference Include="../Spice86/src/Spice86.Core/Spice86.Core.csproj" />
<ProjectReference Include="../Spice86/src/Spice86.MicroBenchmarkTemplate/Spice86.MicroBenchmarkTemplate.csproj" /-->
</ItemGroup>
</Project>
Loading