Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-sven committed Nov 23, 2023
1 parent 4c1d379 commit d343649
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Current implemented Processors:

The current workspace state, including memories and CPU state can be saved and loaded for continuing work or debugging later.

You can add multiple external RAM spaces direct empty or load a binary to a definded XRAM address.
You can add multiple external RAM spaces direct empty or load a binary to a definded XRAM address.

You can also enable M48T Timekeeper function on every RAM block, it uses a `DispatcherTimer` to update the time in the M48T time registers. It supports stop functionalities via the control registers. Write is not supported it will always update the time from current system clock.

Expand All @@ -26,11 +26,14 @@ The editor can load listings and import ROM dumps from binary or Intel HEX files

The editor supports the following key commands at the moment:

* B - add breakpoint
* C - generate code from `DB` statement, possible switch case jumps `JMP @A+DPTR`
* L - generate or update label
* J - follow jump label
* L - generate or update label
* K - update comment
* B - add breakpoint
* S - create string
* U - undefine listing entry
* X - show XRefs

## Listing Format

Expand All @@ -49,11 +52,11 @@ The listings are stored and loaded in the following format:

Example:
```
0000 02 01 00 RESET: LJMP INIT
0000 02 01 00 RESET: LJMP INIT
0003 FF FF FF FF FF FF FF FF DB ffh, ffh, ffh, ffh, ffh, ffh, ffh, ffh ; ........
000B C0 D0 T0: PUSH PSW
000D C0 E0 PUSH ACC
000F C0 F0 PUSH B
000B C0 D0 T0: PUSH PSW
000D C0 E0 PUSH ACC
000F C0 F0 PUSH B
```

Every unidentified code, empty memory or other data is grouped in `DB` instructions by the length of 8 bytes.
Expand Down
2 changes: 1 addition & 1 deletion Sim80C51/Sim80C51.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="YamlDotNet" Version="11.2.1" />
<PackageReference Include="YamlDotNet" Version="13.7.1" />
</ItemGroup>

<ItemGroup>
Expand Down
9 changes: 4 additions & 5 deletions Sim80C51/SimulatorWindowContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ public class SimulatorWindowContext : NotifyPropertyChanged
private Controls.ListingEditorContext? listingCtx;
private readonly SortedDictionary<ushort, Controls.MemoryContext> xmemCtx = new();
private readonly DispatcherTimer stepTimer = new();
private int hiddenStepCounter = 0;
#endregion

#region Workspace commands
Expand Down Expand Up @@ -373,7 +372,7 @@ public class SimulatorWindowContext : NotifyPropertyChanged

public ICommand PlayHiddenCommand => new RelayCommand((o) =>
{
//CPU!.UiUpdates = false;
CPU!.UiUpdates = false;
stepTimer.Start();
(PlayCommand as RelayCommand)?.OnCanExecuteChanged();
(PlayHiddenCommand as RelayCommand)?.OnCanExecuteChanged();
Expand Down Expand Up @@ -541,7 +540,7 @@ private void StopStepTimer()

private void StepTimer_Tick(object? sender, EventArgs e)
{
hiddenStepCounter = 0;
int loopStepCounter = 0;
do
{
if (listingCtx?.GetFromAddress(CPU!.PC) is not ListingEntry entry || entry.Instruction == Processors.InstructionType.DB)
Expand All @@ -558,8 +557,8 @@ private void StepTimer_Tick(object? sender, EventArgs e)
StopStepTimer();
return;
}
hiddenStepCounter++;
} while (CPU!.UiUpdates == false && stepTimer.IsEnabled && hiddenStepCounter < 20);
loopStepCounter++;
} while (stepTimer.IsEnabled && loopStepCounter < 20);
}

private void AddBreakPoint(ushort address)
Expand Down

0 comments on commit d343649

Please sign in to comment.