Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Common host app model #109

Merged
merged 40 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
c1eba9a
WIP:
highbyte Jul 19, 2024
dc7ff72
Add missing method call.
highbyte Jul 19, 2024
c6d40a7
WIP (not working): WASM Host app refactor to use new HostApp base class.
highbyte Jul 20, 2024
45f1163
Refactored WASM host app to use new HostApp base class to reduce code…
highbyte Jul 21, 2024
76371ac
Rename interface
highbyte Jul 21, 2024
01ebcd8
Change to file-scoped namespaces.
highbyte Jul 21, 2024
107d6be
Add file_scoped namespaces to .editorconfig
highbyte Jul 21, 2024
133b9d1
Remove unnecessary interfaces.
highbyte Jul 22, 2024
35a80bf
Minor fixes
highbyte Jul 22, 2024
222f5a2
Refactor SadConsole host app to use new HostApp base class.
highbyte Jul 23, 2024
a685196
Add SadConsole font size UI config
highbyte Jul 24, 2024
8913fde
Add minimal SadConsole C64 config UI.
highbyte Jul 24, 2024
31bbf82
Add SadConsole monitor
highbyte Jul 25, 2024
505e056
Add SadConsole monitor CPU status display.
highbyte Jul 26, 2024
9b42024
Rebuild .asm example files
highbyte Jul 26, 2024
350d79a
Add SadConsole C64 File/Save .prg buttons
highbyte Jul 26, 2024
b8abcc7
Re-assemble .asm files
highbyte Jul 26, 2024
06dd560
Fix layout with font sizes less than 1
highbyte Jul 27, 2024
0cf1826
Add SadConsole Stats console
highbyte Jul 27, 2024
ebe57c8
Add combined tabbed SadConsole for stats and logs.
highbyte Jul 27, 2024
cc1f09a
Add highlight colors to SadConsole info and monitor consoles
highbyte Jul 28, 2024
356a7c6
Add SadConsole info panels with system-specifc information.
highbyte Jul 28, 2024
fd433c0
Try to fix SadConsole emulator console receiving Enter key from monot…
highbyte Jul 28, 2024
5d44b82
Enabled NAudio handler in SadConsole for C64, and UI to control it.
highbyte Jul 28, 2024
d620009
Remove WasmDedup workaround for WASM AOT no longer needed.
highbyte Aug 5, 2024
6b301b1
Minor fixes
highbyte Aug 7, 2024
37749a5
Add some tests
highbyte Aug 7, 2024
29fba48
Refactor project structure by moving out "system" code from core High…
highbyte Aug 7, 2024
5c0169b
Move Logging and Instrumentation code from Highbyte.DotNet6502 to Hig…
highbyte Aug 7, 2024
0a9d9cd
Moved ElapsedMillisecondsTimedStatSystem to correct namespace.
highbyte Aug 7, 2024
e8502cd
Refactor HostApp to use Instrumentations instance
highbyte Aug 7, 2024
03d035f
Exclude OS-specific path replacements from test coverage (tests only …
highbyte Aug 7, 2024
86cc41a
Move some general util-classes from root to Util namespace
highbyte Aug 7, 2024
e0a10d0
Fix caching of systems in SystemList.
highbyte Aug 8, 2024
ecf92da
Fix bugs in config handling in SilkNet native, WASM, and SadConsole h…
highbyte Aug 10, 2024
c3924f8
Refactor handling of IHostSystemConfig.
highbyte Aug 11, 2024
a257605
Add configuration variant support.
highbyte Aug 12, 2024
3909fc9
Refactor retrieving ConfigurationVariants in smarter way.
highbyte Aug 12, 2024
1c6c471
Add configuration variants for Generic computer.
highbyte Aug 12, 2024
d70abdf
Bump dependencies.
highbyte Aug 12, 2024
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
6 changes: 6 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,9 @@ csharp_preserve_single_line_blocks = true
# Code block
csharp_prefer_braces = when_multiline:warning

# File Scoped Namespaces
csharp_style_namespace_declarations = file_scoped


# -----------------------------------------------
# Misc Code Styles that should affect code analysis
Expand All @@ -233,6 +236,9 @@ dotnet_style_prefer_compound_assignment = false:suggestion
# IDE0055: Fix formatting. All formatting options have rule ID IDE0055 and title Fix formatting
dotnet_diagnostic.IDE0055.severity = warning

# IDE0161: Use file-scoped namespace
dotnet_diagnostic.IDE0161.severity = warning


# -----------------------------------------------
# Misc Code Rules that should be disabled in code analysis
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Engines;
using BenchmarkDotNet.Jobs;
using Highbyte.DotNet6502.Utils;

namespace Highbyte.DotNet6502.Benchmarks;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Engines;
using BenchmarkDotNet.Jobs;
using Highbyte.DotNet6502.Utils;

namespace Highbyte.DotNet6502.Benchmarks;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Highbyte.DotNet6502.Systems;
using Highbyte.DotNet6502.Systems.Commodore64;
using Highbyte.DotNet6502.Systems.Commodore64.Config;
using Highbyte.DotNet6502.Utils;
using Microsoft.Extensions.Logging.Abstractions;

namespace Highbyte.DotNet6502.Benchmarks.Commodore64;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Highbyte.DotNet6502.Systems;
using Highbyte.DotNet6502.Systems.Commodore64;
using Highbyte.DotNet6502.Systems.Commodore64.Config;
using Highbyte.DotNet6502.Utils;
using Microsoft.Extensions.Logging.Abstractions;

namespace Highbyte.DotNet6502.Benchmarks.Commodore64;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,58 +1,57 @@
using Highbyte.DotNet6502.Systems.Commodore64;
using Highbyte.DotNet6502.Systems.Commodore64.Video;

namespace Highbyte.DotNet6502.Benchmarks.Commodore64.Data
namespace Highbyte.DotNet6502.Benchmarks.Commodore64.Data;

public class C64CharGenerator
{
public class C64CharGenerator
{
private readonly C64 _c64;
private readonly Vic2 _vic2;
private readonly Memory _vic2Mem;
private readonly C64 _c64;
private readonly Vic2 _vic2;
private readonly Memory _vic2Mem;

public C64CharGenerator(C64 c64)
{
_c64 = c64;
_vic2 = c64.Vic2;
_vic2Mem = c64.Mem;
}
public C64CharGenerator(C64 c64)
{
_c64 = c64;
_vic2 = c64.Vic2;
_vic2Mem = c64.Mem;
}

public void WriteToScreen(byte characterCode, byte col, byte row)
{
var screenAddress = (ushort)(_vic2.VideoMatrixBaseAddress + (row * _vic2.Vic2Screen.TextCols) + col);
_vic2Mem[screenAddress] = characterCode;
}
public void CreateCharData()
public void WriteToScreen(byte characterCode, byte col, byte row)
{
var screenAddress = (ushort)(_vic2.VideoMatrixBaseAddress + (row * _vic2.Vic2Screen.TextCols) + col);
_vic2Mem[screenAddress] = characterCode;
}
public void CreateCharData()
{
foreach (var characterCode in s_chars.Keys)
{
foreach (var characterCode in s_chars.Keys)
var characterSetLineAddress = (ushort)(_vic2.CharsetManager.CharacterSetAddressInVIC2Bank
+ (characterCode * _vic2.Vic2Screen.CharacterHeight));
for (int i = 0; i < s_chars[characterCode].Length; i++)
{
var characterSetLineAddress = (ushort)(_vic2.CharsetManager.CharacterSetAddressInVIC2Bank
+ (characterCode * _vic2.Vic2Screen.CharacterHeight));
for (int i = 0; i < s_chars[characterCode].Length; i++)
{
_vic2Mem[(ushort)(characterSetLineAddress + i)] = s_chars[characterCode][i];
}
_vic2Mem[(ushort)(characterSetLineAddress + i)] = s_chars[characterCode][i];
}
}
}

private static Dictionary<int, byte[]> s_chars
private static Dictionary<int, byte[]> s_chars
{
get
{
get
return new Dictionary<int, byte[]>
{
return new Dictionary<int, byte[]>
{
// A
{1, new byte[] {
0b00011000,
0b01100110,
0b01111110,
0b01100110,
0b01100110,
0b01100110,
0b00000000
}
// A
{1, new byte[] {
0b00011000,
0b01100110,
0b01111110,
0b01100110,
0b01100110,
0b01100110,
0b00000000
}
};
}
}
};
}
}
}
Loading
Loading