Commit graph

70 commits

Author SHA1 Message Date
JetSetIlly 6c96b2f065 comment changes/clarifications 2024-05-05 17:00:38 +01:00
JetSetIlly cd2a00d4ba logger.Log() and logger.Logf() now require a logger.Permission instance
the logger.Permission interface indicates whether the environment making
the logging request is allowed to create new log entries. the
environment.Environment type satisifies the Permission interface

logger.Allow is provided as a convienient way of indicating the the log
entry should always be created
2024-04-30 11:23:40 +01:00
JetSetIlly b7bcf5e090 corrected reflection of HMOVE signal
a new HMOVE would be noted in the reflection array but it would never be cleared
2024-03-19 21:07:48 +00:00
JetSetIlly 2d02764e60 moved coprocessor interface/types from mapper to coprocessor package
there could be more work to do here to make this more readable
2023-08-09 15:26:05 +01:00
JetSetIlly c6d7147048 added SetEmulationState() to developer package
this called in the same way as the corresponding functions in the
television and reflection packages

list of locals is updated when emulation is paused. this allows the list
of locals to be visible immediately on program start and when execution
is halted in the VCS part of the execution (as opposed to yielding in
the ARM part of the execution due to a breakpoint)

fixed race condition caused by local variable window
2023-08-01 18:02:13 +01:00
JetSetIlly 81f4a83490 more flexible yield information 2023-07-17 15:50:07 +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 7656bea678 added audio reflection layer
fixed imgui.EndChild() error for tracker window
2023-02-01 16:47:11 +00:00
JetSetIlly 28ffedbf11 removed emulation package. moved types to debugger/govern package
the emulation package has been unecessary since the amalgamation of the
debugger and play modes. in order to allow switching between the two
modes it was necessary to remove the playmode package and to move all
playmode loops and other considerations into the debugger package. as a
result the abstraction offered by the emulation package is uncessary
2022-08-31 14:37:00 +01:00
JetSetIlly 92376586ca CoProcIsActive() replaced with CoProcState()
returns a CoProcState value rather than a boolean value

updated prompt building and debugger reflection overlays to work with
new type and values

commentary introduces the idea that coprocessor state is about VCS
synchronisation

ELF will call ExecutionStart() and ExecutionEnd() as appropriate for the
change of state. this needs work because the meaning of "Execution" in
context of StrongARM type synchronisation is unclear
2022-08-20 21:00:20 +01:00
JetSetIlly e13fd12c21 simplified reflection package and how the reflector works and interacts with other goroutines 2022-06-28 08:03:37 +01:00
JetSetIlly a8c66f7160 corrected accumulation of cycles in callfn package in event of breakpoint
the callfn package previously assumed that all ARM cycles would have
been accounted for (on the VCS side of the ledger) before Start() was
called agin

renamed CartBreakpoints interface to CartCoProcExecution

reflection now used CartCoProcExecution.CoProcIsActive() to determine
when coprocessor is active, rather than the clumsy BankInfo mechanism
2022-06-28 07:26:24 +01:00
JetSetIlly bad56b9580 reflector clears pixels correctly on NewFrame()
remnant pixels are not left behind on screen resize
2022-03-23 16:54:20 +00:00
JetSetIlly e2a6de1366 reflector checks signal validity before index reflection history
the TV has an invalid signal on reset and a input loop that has not yet
unwound will call Reflector.Step() and try to use the invalid signal
leading to a bounds error
2021-11-16 21:55:41 +00:00
JetSetIlly f44707057b counting for the timeline removed from reflection package
new counter package added (sub-package of reflection)

this new counting method is fast enough to be run while in playmode,
which means that historical timeline information is immediately
available in the debugger
2021-11-13 10:21:45 +00:00
JetSetIlly 32499606a3 WSYNC/Coproc aren't counted in playmode so timeline now shows dotted lines
dotted lines indicate that those counts haven't been made during the
period shown
2021-11-10 14:29:53 +00:00
JetSetIlly 13aa07b0cc performance improvements to reflection package introduced a race error
previous improvements made in 02f6e05f1e

fixed by maintaining two copies of reflection history which are
alternated between, ensuring that the entires are never used by the GUI
and emulation threads at the same time

bounds checking fix in 8387dc7a73 was not
advancing the offset correctly
2021-11-03 12:47:31 +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 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 0570ab4116 TimelineCounter interface. implemented by reflection.Gatherer
provides count information about the VCS system that would otherwise be
awkward to gather otherwise
2021-10-18 23:00:19 +01:00
JetSetIlly 5c75a68114 added timeline to rewind package and added rewind window 2021-10-16 18:35:20 +01:00
JetSetIlly db2342193e simplified how signals are processed by PixelRenderers
entire signal history is sent to SetPixels(). this makes it easier to
handle and to synchronise with the reflection package.
2021-09-27 22:07:43 +01:00
JetSetIlly 8746afa177 television and gatherer now reaction to SetEmulationState()
this supercedes Pause() and DisableRendering() and pause-triggers concept
2021-09-23 18:44:41 +01:00
JetSetIlly deec72081e corrected how reflection gatherer called Renderer when paused
this caused the reflection overlay not to update during rewinding
2021-09-23 18:44:41 +01:00
JetSetIlly 6f19d6fe99 reflection is stepped at end of CPU instruction
reflection was only being stepped on the VCS videostep callback which
caused some final CPU conditions to be missed

Step() function is now called OnVideoCycle() and an additional
OnInstructionEnd() has been added
2021-09-21 07:59:01 +01:00
JetSetIlly 4eb873e675 simplified reflection package and clarified some concepts 2021-09-15 16:06:13 +01:00
JetSetIlly c3b8d8318c clarified some concepts relating to the television and PixelRenderer 2021-09-15 07:20:35 +01:00
JetSetIlly d228eac632 (re)added missing elements to reflection package
debugger now correctly shows reflected information again
2021-09-10 21:12:58 +01:00
JetSetIlly 5eed167aa6 tidy up of reflection package 2021-08-17 19:30:13 +01:00
JetSetIlly 4bdba33551 television package keeps better track of current frame information
this simplifies the sdlimgui/screen type in addition to the NewFrame()
and Resize() functions in the PixelRenderer interface

will allow better overview and summarising of television performance

playscreen F7 window shows "total scanlines" rather than "visible
scanlines"
2021-08-12 11:28:59 +01:00
JetSetIlly b0e973a0fd first attempt at screen roll 2021-06-15 06:55:13 +01:00
JetSetIlly b6dd737163 RSYNC reflection layer 2021-03-03 10:28:45 +00:00
JetSetIlly e1ed563ea9 overlay selection is now in a popup
added colour key. potential for much more information.
2021-02-26 14:22:19 +00:00
JetSetIlly d6463e0dae lint errors 2021-02-24 06:59:30 +00:00
JetSetIlly 8789a6772c streamlined reflection system
simply interfaces between television and reflection packages
2021-02-24 06:59:30 +00:00
JetSetIlly e74decdc42 Refinement of player reset under HMOVE/HBLANK
These conditions only seem to apply to some machine types. Prompting
a reason to introduce options to allow the user to select the precise
2600 model.

Hmove has been packaged up for easier working. We could probably improve
HMOVE instrumention because of this.
2021-02-08 19:22:21 +00:00
JetSetIlly 9277b88936 coprocessor layer is named based on coprocessor ID
removed optimistion reflection overlay

it didn't show all optimisations that are now done in the TIA emulation
and it was difficult to present the information meaningfully. plus, it's
information about the emulation itself and not about the emulated machine.

cleaned up lint errors
2021-01-31 14:52:55 +00:00
JetSetIlly 0c70d65acb reflection layer for coprocessor activity 2021-01-28 17:36:37 +00:00
JetSetIlly e39021eabb improved Collisions layer
tidied up collision detection routines

clarified some concepts in the reflection system

rationalised some concepts in the sdlimgui interface
    - handling of PackedColors is clearer
    - easier handling of color key entries (colored rectangle and label)
2021-01-13 22:32:30 +00:00
JetSetIlly d4ab437506 Optimisations
Collision tests run less frequently

Pixels are reused more often

Streamlined Playfied.pixel() and Player.pixel() functions

Tiny improvment to ARM MapAddress() imlplementations (CDF and DPC+)

Small improvement to performance of ARM read 16/32 bit memory functions

Unchanged overlay renamed to "Unoptimised"; now highlights pixels that
were generated without any optimisation at all
2020-12-30 20:45:07 +00:00
JetSetIlly 078d60377a optimised collisions tick
collision combinations now stored by bit pattern and not string. the
string is useful for the debugger but has performance implications on
the playmode. new method is probably marginally more efficient for the
debugger too.
2020-11-21 22:50:09 +00:00
JetSetIlly 7e74bcac25 reflection works with rewind system
rather than taking a snapshot of the reflection system, rewind replays
the emulation from the previous frame. this is a considerable saving
in memory. it also allows us to remove the signal history from the
television state information saved by the rewind system. this is also a
significant memory saving.

more efficient memory use possible I think by saving every other frame
or every third frame and allowing the emulation to run to fill in the
interim frames. this would require folding the input recording system
into the rewind system.

TIMELINE <n> function doesn't work as required just yet

screen refresh could be better on rewind plumbing

occasional deadlock when moving rewind slider
2020-11-01 21:21:32 +00:00
JetSetIlly bce3ccf488 reflection system synchronised with the rewind system
(this version is exceedingly memory heavy. including tv signal and
reflection history in the rewind system is a mistake. work will now
concentrate on the rewind system storing VCS state only and recreating
the tv/reflection signal when a state is restored.)
2020-10-31 22:01:12 +00:00
JetSetIlly 0fb6b780cc abstracted VCS facing parts of the television implementation into the signal package
NTSC and PAL information, including colours, moved into specification package
2020-10-31 22:01:12 +00:00
JetSetIlly f97fced896 WIP extend reflection system to use rewind 2020-10-27 14:11:42 +00:00
JetSetIlly 4253af599e moved televsion to hardware package 2020-10-21 11:14:20 +01:00
JetSetIlly b787a45632 hardware package manages it's own preferences
memory randomised on startup (except cartridge memory) when randomstate
preference is true
2020-10-19 14:30:02 +01:00
JetSetIlly 9e159b97d8 added more linters to golangci-lint config
godot --fix has been run to make sure all comments end in a full-stop

specified nolint directive to apply to specific linter
2020-10-16 16:31:07 +01:00
JetSetIlly b7db6b9b44 ran "gofmt -s" to simplify code (golangci-lint -E gofmt) 2020-10-16 16:01:27 +01:00
JetSetIlly fca3c2120a fixed golint/stylecheck errors (golangci-lint -E golint -E stylecheck) 2020-10-16 15:48:52 +01:00