Commit graph

226 commits

Author SHA1 Message Date
JetSetIlly
8bb94f9654 nil protection on disassembly definition 2024-01-16 10:54:54 +00:00
JetSetIlly
9f6cbdad58 added CYCLE quantum
updated QUANTUM and STEP commands to accoodate new quantum

control window changed to support the three quantum options

improved/corrected the conditions under which the ONSTEP command is run

disassembly.ExecutedEntry() updates existing entry
2023-11-27 07:47:30 +00:00
JetSetIlly
85adbca367 improved gopher2600.go structure
removed modalflags package. modalflags was added very early in the
project. it's neater and simpler to implement command-line modes with
the standard flag package directly

improved log message for unsupported terminal type

remove rand.Seed(time) on startup. rand.Seed() is a deprecated function
2023-11-19 20:16:17 +00:00
JetSetIlly
bb556d805f more careful updating of partial disassembly
disassembly.ExecutedEntry() only adds next address to disassembly if the
CPU result is at an instruction boundary (the Final field in the result
type)
2023-11-06 17:53:27 +00:00
JetSetIlly
e8191267a4 improved updating of disassembly when no disassembly exists
there is an entry for an undecoded instruction. ie when the PC is
pointing to an area of memory never seen before
2023-10-27 19:14:50 +01:00
JetSetIlly
732c433cd2 tidied and simplified test package 2023-07-06 13:49:18 +01:00
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