Commit graph

220 commits

Author SHA1 Message Date
JetSetIlly
d50e9c5a8b GREP includes bank number if appropriate 2023-06-16 18:21:55 +01:00
JetSetIlly
3aa5885ebe removed curated pacakge. replaced with wrapped errors
curated package predated the standard errors package introduced in
go1.13

the standard package does a better job of what curated attempted to do

the change of package also gave me a opportunity to clean up the error
messages a little bit
2023-02-13 21:58:39 +00:00
JetSetIlly
178f05f17b updated go minimum version to 1.20
applied gofmt to source tree to update the documentation comments
2023-02-12 13:09:07 +00:00
JetSetIlly
2077fbc6de nil dereference when STEP OVER command is used during RAM execution 2023-01-20 18:54:19 +00:00
JetSetIlly
040695b4c7 added CappedWriter to test package
renamed test.Writer to test.CompareWriter
2022-11-01 13:01:35 +00:00
JetSetIlly
e2f6ebc15e DASM symbols corrected after disassembly
DASM sometimes misplaces labels by one address. we can correct those
errors by identifying AUTO labels and replacing accordingly
2022-10-20 13:54:50 +01:00
JetSetIlly
5dc9437801 results of SYMBOL command show mnemonic symbol if it exists
SearchBySymbol() does not normalise addresses for read/write symbol
tables

updated HELP text for POKE and PEEK. made clear that neither command
changed the address or data buses

change symbols/file.go to symbols/dasm.go
2022-10-20 13:54:50 +01:00
JetSetIlly
466b7fc133 finessed 6507 symbol handling
labels continue to be mapped but other symbols are not mapped unless
they are a "System" label

this fits better with how symbols are used in practice. however, mapping
labels means that errant labels will sometimes appear in multibank
cartridges

labels/symbols that have a numeric prefix have the number removed
2022-10-18 20:29:53 +01:00
JetSetIlly
e3e55cfeba result nil check in disassembly.setCartMirror()
most cartridge formats will always have non-nil results but formats
like ACE or ELF that feed the 6507 program on demand will result in the
disassembly to have gaps - and that's why we need the nil check
2022-10-18 07:04:13 +01:00
JetSetIlly
688ca31ea8 resetting of VCS is no longer automatic on cartridge insert
the reset can be done automatically but as an optional operation. it has
been discovered that in some situations more preparation is required
before the cartridge is reset. particularly, ACE/ELF type cartridges
where the ARM may executed before the coprocessor disasm/developer
packages are initialised and attached
2022-10-08 18:42:23 +01:00
JetSetIlly
b4c31b9fbb nil check in disassembly grep function
this check isn't required for standard ROMs but for the ACE format and
similar, where the disassembly can't happen to completion, the nil check
is required
2022-10-08 18:42:23 +01:00
JetSetIlly
d111f498cb corrected how terminal prompt is built, with regard to coprocessor execution
was able to simplify disassembly.GetEntryByAddress()
2022-06-27 22:32:05 +01:00
JetSetIlly
98e3f201f2 removed "undecoded cartridge location" log message from ExecutedEntry() function in disassembly package
no longer a useful message and caused too much log activity with ACE
cartridges
2022-06-15 21:36:31 +01:00
JetSetIlly
98a218f646 removed "late decoding" log message from disassembly package
it was useful when developing the disassembly package but causes excess
logging with the ACE format
2022-06-15 15:03:34 +01:00
JetSetIlly
1992bd833c disasm window now indicates if disassembly is not available
fixed display of instructions in disasm window when they are partially
executed (during video cycling). previously, the partially decoded
instruction was shown which was confusing

CPU shows partially decoded instructions correctly
2022-06-11 22:50:55 +01:00
JetSetIlly
8f8702e5ae error during disassembly will now result in log and not failure
this means that confusing cartridges can still be run through the
emulation
2022-06-11 19:10:53 +01:00
JetSetIlly
a5468fc215 simplified CPU cycleCallback function. removed nil check 2022-05-23 14:29:33 +01:00
JetSetIlly
618e239bf6 operator field in instructions.Definition is now numeric
this significantly increases the speed of lookup in the cpu
2022-05-22 20:52:54 +01:00
JetSetIlly
aaf96a4475 fixed crash in disassembly pacakge triggered when terminal opens immediately on start 2022-04-29 13:50:33 +01:00
JetSetIlly
f5ff6f4f26 implemented all remaining 6507 instructions 2022-03-30 08:30:51 +01:00
JetSetIlly
fb50253178 added mapper.CartLabelsBus interface. implemented for CDF mapper 2022-02-18 10:57:51 +00:00
JetSetIlly
76f0882ffb JSR uses symbols correctly in 6507 disassembly 2022-02-18 10:12:07 +00:00
JetSetIlly
43af2704e6 complete changes made in e01fd1ec
checking of operators for a match were trying to match uppercase
mnemonics and not the lower case we've changed to. visible in incomplete
disassemblies - not see "jmp" or "jsr" correctly
2022-02-18 10:12:07 +00:00
JetSetIlly
98e4b51931 DASM labels were being removed if entry was unblessed 2022-02-18 07:23:33 +00:00
JetSetIlly
180b1200dd fixed bug in disassembly.blessSequence() generation
slight change in how disasm window focuses on an address. the previous
belt-and-braces method would cause the scroller to "bounce" if the
scroller was at the bottom of its limit. removed the call to
SetScrollHereY() and will now rely on the calculated offset method
2022-01-24 10:35:48 +00:00
JetSetIlly
27ea04cf12 preferences are shared between emulation instances
this means that updating the preferences through the prefs window will
affect all emulation instances equally
2022-01-20 11:15:30 +00:00
JetSetIlly
7e7eaf4262 cosmetic changes to disasm window
"Follow CPU" will focus when option is set. disasm will not focus on PC
address on pause if "Follow CPU" is not set.

additional notification in disasm window to indicate when coprocessor is
active
2022-01-17 22:07:27 +00:00
JetSetIlly
01ef037e5c disasm entries updated with partial results when halted mid-instruction 2022-01-17 11:45:14 +00:00
JetSetIlly
905165ecfe removed ExecutionNotes field from disassembly.Entry
replaced with Notes() function. small cosmetic changes to LAST command
and disassembly window in line with changes to Notes and Cycles
2022-01-16 22:45:56 +00:00
JetSetIlly
e44107ce91 added Cycles type for hardware.CPU package
moved DefnCycles from disassembly.Entry to instructions.Cycles type.
and now created during generation of instructions table. it makes more
sense to have the formatted string nearer the source of definition and
simplifies the disassembly.Entry type.
2022-01-16 19:42:56 +00:00
JetSetIlly
a9793a4ece disassembly window checks for invalid disassembly 2022-01-14 21:00:54 +00:00
JetSetIlly
fe9fc8d4e2 cosmetic improvements to disasm window
simplified how the disasm window tracks the current execution. this
should improve the accuracy of when the focus is shifted, particularly
on startup

removed context menu and editing of address label. menu is not needed
now that clicking to toggle the breakpoint is more reliable (that was
fixed a long time ago but the menu remained). inline address label
editing will be replaced with a symbols menu
2022-01-14 13:52:21 +00:00
JetSetIlly
d55a14fded simplified disassembly iteration
implemented "borrow" mechanism instead of iteration mechanism which was
clumsy and confusing.

simplitied how breakpoints are queried by the lazy system, for the
benefit of the disassembly window

tweaked how emulation state is tracked by the disassembly window

removed linter package. unused and underdeveloped. will reimplement in
the future.
2022-01-10 09:50:48 +00:00
JetSetIlly
211e7e12de reorginised coprocessor package
source iteration replaced with "borrow" mechanism. fixes any potential
race conditions
2022-01-10 09:50:47 +00:00
JetSetIlly
1bfd0de557 added coprocessor package to hold all coprocessor helper code
moved disassembly.coprocessor package to coprocessor.disassembly.
main disassembly package no longer cares are about the coprocessor
disassembly.

fixed caused by crash when switching carts (from ARM to nonARM) when the
CoProc Disasm window is open (there's a brief moment when the cartridge
reports having a CoProcessor bus but there is no coproc disassembly in
the debugger. the difference is caused because the coproc disasm is not
part of the lazy system so we see the results first)
2022-01-10 09:50:47 +00:00
JetSetIlly
f2fb0091e7 simplified/clarified memory interface
addresses and bus interface removed and split into cpubus and chipbus
packages.

ReadZeroPage() no longer has any distinction from normal Read()
function.
2021-12-26 19:00:11 +00:00
JetSetIlly
2516e567ce RIOT SWCHB port is writable 2021-12-21 19:00:59 +00:00
JetSetIlly
89191d9a5a clarified some preferences concepts
set defaults for revisions, rewind and ARM tabs of the prefs window (in
addition to the CRT tab). set defaults button labelled appropriately

fixes some race conditions caused by pre/post hooks on prefs values -
prefs values are generally goroutine safe, except when pre/post hook is
defined
2021-12-05 20:17:43 +00:00
JetSetIlly
a7008d7452 missing mutex lock in Symbols.initialise
only noticeable when loading a new cartridge after a disassembly has
taken place
2021-11-16 21:55:41 +00:00
JetSetIlly
af940e9ecd better interaction of window geometry preference saving with fullscreen setting
*.windowSize and *.windowPos preference values replaced with single *.windowGeometry value

prefs package type now have a pre-hook (called before new value is set).
existing hook/callback clarified to be a post-hook (called after new
value is set).

prefs generic type now handles prefs.GenericGetValueUndefined to
indicate that the value cannot be ascertained at this time (the prefs
package should use the most recent previous value instead)
2021-11-05 17:58:35 +00:00
JetSetIlly
02f6e05f1e debug mode performance improvements (about 65%)
halting check performance efficiency

less string manipulation in disassembly package. disassembly entry.Label
performance efficiency

reflection gatherer performance efficiency

overlay plotting efficiency. small performance improvement in overlay
plotting. color lookup table is now a straight array not a map

SDL polling efficiency for debug mode
2021-11-01 20:06:47 +00:00
JetSetIlly
8120bcc7a5 coproc disasm checks whether disasm is enabled
it was possible for the disasm to save a disasm entry in lastExecution
array in the time it took for the critical section to be acquired
2021-10-31 16:58:41 +00:00
JetSetIlly
31138f16f3 removed InstructionBoundary() interface and television.ReqState()
Instruction boundaries can be inferred by the debugging input loop,
which is the only place it is requred. reworked GetAdjustedCoords() in
the televsion package (now called AdjCoords()) to cope with this.

ReqState() is totally replaced by GetCoords()
2021-10-23 10:50:19 +01:00
JetSetIlly
63b188b997 moved TelevisionCoords from signal package to new package coords
Equals() and GreaterThanOrEqual() are no pacakge level functions (in the
coords package)
2021-10-22 20:23:55 +01:00
JetSetIlly
19dc94c192 added TelevisionCoords to signals package
makes it more convenient/clearer when working with all three coordinate
values (frame, scanline and clock)

changed all packages to GetCoords() where appropriate
2021-10-22 20:02:02 +01:00
JetSetIlly
a5b2c0101c coprocessor disassembly is disabled by default
renamed "last execution" window to "coprocessor disassembly" where
the actual name of the coprocessor is used

coproc disassembly window now shows an enable and a disable button. if
the emulation is paused the previous two frames of the emulation will be
rerun in order to generate a disassembly

coprocessor disassembly and last execution are shown in tabs. if
disassembly is disabled then the last execution tab will show nothing
but the disassembly tab will show what we have, with a note that it is
not bing udpated
2021-10-22 18:43:16 +01:00
JetSetIlly
64ab9e0be5 trying to record rewind state would panic on legitimate CPU error
legitimate errors include reading cartridge address with no cartridge
inserted. rewind will now check for CPU/Result state before logging and
returning before any recording has taken place

BRK instruction consumes two bytes but records only one. when
video-stepping over a BRK instruction this caused an error because the
adjustment to the number of bytes read value was done too late
2021-10-20 14:57:13 +01:00
JetSetIlly
3f5923c358 implemented STEP OVER command
stepping by video does not now check for halting conditions. in some
cases halting on a target is confusing. for example break PC will break
too early if checked every video cycle. we could perhaps reintroduce it
but only when targets are aware of the current state of the machine
(ie. mid-CPU instruction or not)

similarly, halt on video-step will no longer decode the next instruction
at the current PC. the current PC will be in a misleading state between
CPU instruction boundaries

STEP OVER button. not finished yet just a placeholder really
2021-10-06 08:20:24 +01:00
JetSetIlly
e5bd938b41 renamed paths package to resources package
ResourcePath() is now called JoinPath()

UniqueFilename() moved to a new package named unique and renamed to
Filename()
2021-10-03 13:32:08 +01:00
JetSetIlly
0025d2ee3a refined how ResourcePath in paths package works
now works more like the standard filepath.Join() function
2021-10-03 13:32:08 +01:00