Skip to content

Commit

Permalink
inspector improvement and readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
AdinAck committed Apr 12, 2023
1 parent 4a7c788 commit b917b9d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
5 changes: 4 additions & 1 deletion LEGv8-Simulator/Views/Memory/InspectorView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ struct InspectorView: View {
if let history = interpreter.history.memory[memID]?.values.sorted(by: <) {
ForEach(history) { snapshot in
LineMark(x: .value("Program Counter", snapshot.id), y: .value("Memory Value", snapshot.value))
.interpolationMethod(.stepEnd)
.lineStyle(StrokeStyle(dash: [2, 4]))
.opacity(0.5)
PointMark(x: .value("Program Counter", snapshot.id), y: .value("Memory Value", snapshot.value))
.foregroundStyle(snapshot.type == .read ? .purple : .blue)
}
Expand All @@ -69,7 +72,7 @@ struct InspectorView: View {

if let selectedEntry {
PointMark(x: .value("Program Counter", selectedEntry.id), y: .value("Memory Value", selectedEntry.value))
.foregroundStyle(.clear)
.foregroundStyle(.white.blendMode(.overlay))
.annotation(position: hoverPosition, alignment: .center, spacing: 0) {
VStack(alignment: .leading) {
Text("PC: 0x\(String(format: "%llX", selectedEntry.id))")
Expand Down
2 changes: 1 addition & 1 deletion LEGv8-Simulator/Views/Settings/AboutView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import SwiftUI

struct AboutView: View {
let version: String = "1.0 (Release)"
let version: String = "1.1 (Release)"

var body: some View {
HStack {
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ In the **Registers** and **Memory** panes, blue dots indicate the value was chan

In the **Memory** pane, the green dot indicates the position of the stack pointer and the orange dot indicates the position of the frame pointer.

## Inspector

In the **Memory** pane, you can select memory addresses and open the inspector to view the values of the memory addresses and how they compare and change as the program executes.

![](inspector.png)

## Debugging

Just above the console, there are two buttons: *breakpoints* and *step over*.
Expand Down
Binary file added inspector.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b917b9d

Please sign in to comment.