From 9e81d7052c82099d74f7124bfd9f0d11fd810e8d Mon Sep 17 00:00:00 2001 From: sh95014 <95387068+sh95014@users.noreply.github.com> Date: Mon, 12 Jun 2023 12:18:44 -0700 Subject: [PATCH] display correct starting offset for "Cx ROM" pane --- .gitmodules | 1 + source/frontends/mariani/HexFiend | 2 +- .../mariani/memory viewer/MemoryViewerWindowController.mn | 7 ++++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 489170b58..6e18787c5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,3 +13,4 @@ [submodule "source/frontends/mariani/HexFiend"] path = source/frontends/mariani/HexFiend url = https://github.com/sh95014/HexFiend.git + branch = mariani diff --git a/source/frontends/mariani/HexFiend b/source/frontends/mariani/HexFiend index b721e947a..8970c5d0d 160000 --- a/source/frontends/mariani/HexFiend +++ b/source/frontends/mariani/HexFiend @@ -1 +1 @@ -Subproject commit b721e947a325b3e6193a3b05f7ab8ca66fb6b835 +Subproject commit 8970c5d0d634a2c8db9a384392fe328e9e03eec4 diff --git a/source/frontends/mariani/memory viewer/MemoryViewerWindowController.mn b/source/frontends/mariani/memory viewer/MemoryViewerWindowController.mn index ea688d35a..9ab4809f2 100644 --- a/source/frontends/mariani/memory viewer/MemoryViewerWindowController.mn +++ b/source/frontends/mariani/memory viewer/MemoryViewerWindowController.mn @@ -8,6 +8,7 @@ #import "MemoryViewerWindowController.h" #import "EmulatorViewController.h" #import +#import #import "StdAfx.h" #import "Debug.h" @@ -33,6 +34,7 @@ @property (weak) IBOutlet NSView *hexViewContainerView; @property (strong) HFController *hfController; +@property (weak) HFLineCountingView *lineCountingView; @property (assign) BOOL inDebugMode; @property (strong) NSMutableArray *memoryTabConfigurations; @@ -121,6 +123,7 @@ HFLayoutRepresenter *layoutRep = [[HFLayoutRepresenter alloc] init]; HFLineCountingRepresenter *lcRep = [[HFLineCountingRepresenter alloc] init]; lcRep.lineNumberFormat = HFLineNumberFormatHexadecimal; + self.lineCountingView = (HFLineCountingView *)lcRep.view; HFHexTextRepresenter *hexRep = [[HFHexTextRepresenter alloc] init]; HFStringEncodingTextRepresenter *asciiRep = [[HFStringEncodingTextRepresenter alloc] init]; HFVerticalScrollerRepresenter *scrollRep = [[HFVerticalScrollerRepresenter alloc] init]; @@ -132,7 +135,7 @@ [self.hfController addRepresenter:asciiRep]; [self.hfController addRepresenter:scrollRep]; [self.hfController addRepresenter:statusRep]; - + [layoutRep addRepresenter:lcRep]; [layoutRep addRepresenter:hexRep]; [layoutRep addRepresenter:asciiRep]; @@ -158,6 +161,8 @@ HFFullMemoryByteArray *byteArray = [[HFFullMemoryByteArray alloc] initWithByteSlice:byteSlice]; [self.hfController setByteArray:byteArray]; + self.lineCountingView.startOffset = config.baseAddress; + if (!self.inDebugMode) { [self performSelector:@selector(refresh) withObject:nil afterDelay:REFRESH_DELAY]; }