From d3436499bd7dcd342a178fcc58b0c69913f6003e Mon Sep 17 00:00:00 2001 From: mr-sven Date: Thu, 23 Nov 2023 08:22:22 +0100 Subject: [PATCH] update readme --- README.md | 17 ++++++++++------- Sim80C51/Sim80C51.csproj | 2 +- Sim80C51/SimulatorWindowContext.cs | 9 ++++----- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 6b3fdbb..050fa95 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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 @@ -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. diff --git a/Sim80C51/Sim80C51.csproj b/Sim80C51/Sim80C51.csproj index f6200c8..5f41e37 100644 --- a/Sim80C51/Sim80C51.csproj +++ b/Sim80C51/Sim80C51.csproj @@ -10,7 +10,7 @@ - + diff --git a/Sim80C51/SimulatorWindowContext.cs b/Sim80C51/SimulatorWindowContext.cs index 58d7f33..3aaad10 100644 --- a/Sim80C51/SimulatorWindowContext.cs +++ b/Sim80C51/SimulatorWindowContext.cs @@ -24,7 +24,6 @@ public class SimulatorWindowContext : NotifyPropertyChanged private Controls.ListingEditorContext? listingCtx; private readonly SortedDictionary xmemCtx = new(); private readonly DispatcherTimer stepTimer = new(); - private int hiddenStepCounter = 0; #endregion #region Workspace commands @@ -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(); @@ -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) @@ -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)