Commit graph

593 commits

Author SHA1 Message Date
JetSetIlly
389e3e338b reworked keyboard handling in sdlimgui
removed some unused GUI requests. originaly added to support earlier and
simpler GUI implementations, that have since been removed

ESC key now toggles input capture in debug mode

` (backtick) key toggles run state in debug mode
2020-12-30 20:45:07 +00:00
JetSetIlly
d2ee20ed8c better CPU usage in debug mode when nothing (or very little) is happening
FPS measured even when fpscap is not active. measurement will be
done more reliably.

FPS indicator will always remain on top of playscreen

spelling mistake in Makefile .PHONY list
2020-12-30 20:45:07 +00:00
JetSetIlly
a90833c77c move dpc+ mapper to it's own package
tidied up and clarfied some concepts in the Cartridge interfaces
2020-12-30 20:45:07 +00:00
JetSetIlly
98bf114626 removed vestigial Println() calls 2020-12-30 20:45:07 +00:00
JetSetIlly
890eec5c72 altered how time.Ticker is reset in television limiter
correct gui state restored after rewind
2020-11-27 21:11:01 +00:00
JetSetIlly
0e4737b326 rework of sdlimgui package
removed options related to setting scale of debug/play window
    - can be done more effectively window controls

preference initialisation for debug and play modes is more clear
    - removed errant playmode setting (terminalOnError - not applicable)

simplified window management

nicer feedback on rewind slider
2020-11-27 18:31:23 +00:00
JetSetIlly
6f0f5dd4ed "improved" look of CRT preferences window
rewind to last entry wasn't drawing previous screen correctly

line terminal option for debugger works again
2020-11-22 13:46:06 +00:00
JetSetIlly
93dde40be4 removed some dangling lint errors (godot)
removed lint dependencies from Makefile targets
    - unreasonable to expect other people to have it installed
2020-11-19 15:11:30 +00:00
JetSetIlly
8777aa996a optimise rewind
only restarts inputloop on rewind if necessary

added SetFeatureNoError() as a speed optimisation
    - for situations where we know for certain we don't need to
	wait for the error to be resolved

reduced gui loop speed

RESET command resets last result information
2020-11-19 13:49:13 +00:00
JetSetIlly
9df7fe6c52 rewind controls work solidly again after inputloop changes 2020-11-18 22:39:36 +00:00
JetSetIlly
b712123653 clarified debugger input loop
removed some logical dead-ends

introduced the concept of restarting the input loop. this is important
when resetting the emulation for example. if the machine is reset during
a video cycle then the emulation will resume inside the video inputloop.
however the reset machine expects to be inside a cpu inputloop, causing
havoc. also used to ensure the rewind system works correctly.

restarting the input loop is tricky. it requires a RawEventReturn channel
that works like the RawEvent channel but returns control to the input
loop on completion.

added GetFeature() to gui interface to better support the rewind
subsystem. renamed ReqFeature() to SetFeature(). Added FeatureReqData
type for clarity.
2020-11-17 23:01:23 +00:00
JetSetIlly
ec67b78b5d rewind preferences
command line and GUI interfaces
2020-11-14 09:05:30 +00:00
JetSetIlly
f6d230e3e6 added SUMMARY option to REWIND command 2020-11-13 12:20:32 +00:00
JetSetIlly
a1959fd4fc rewrite of rewind system 2020-11-13 12:20:32 +00:00
JetSetIlly
10c16323af better interplay of GUI states and shader draw modes
better rendering during rewind.GotoCoords()
2020-11-11 22:36:55 +00:00
JetSetIlly
8f5f129f1f better feedback on rewind slider 2020-11-11 21:56:30 +00:00
JetSetIlly
c5ab1449d6 errors returned/logged from rewind package 2020-11-09 14:24:51 +00:00
JetSetIlly
cf7fb2f42d catchup loop updates lastResult 2020-11-09 06:00:56 +00:00
JetSetIlly
7e4539ba90 first attempt at rewinding to screen coords using mouse on debug screen 2020-11-08 20:44:00 +00:00
JetSetIlly
a412275d41 improved rewind performance and accuracy
binary searching of rewind entries
2020-11-08 19:48:44 +00:00
JetSetIlly
282d5e0d1c added DisableSaving flag to prefs package
debugger_test sets prefs.DisableSaving to true

removed testing tag from test Makefile target
2020-11-05 15:24:44 +00:00
JetSetIlly
b2746e6ae8 renamed TIMELINE command to REWIND
fixed rewind.GotoFrame() function

fixed history appendig for sdlimgui terminal
2020-11-02 18:46:55 +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
7d54336d7f rewind system works with video stepping
added MEMUSAGE command
2020-10-29 09:13:05 +00:00
JetSetIlly
b1203a94ef reworked frame limiter system
removed debugger specific system; added features to "main" television
limiter system.
2020-10-27 22:30:50 +00:00
JetSetIlly
bf4c132f37 sdldebug removed
line terminal debugging still works but without a GUI (for now). will
replace with an ASCII GUI and display in the future.

add gui.Stub to ease transition.
2020-10-27 17:53:45 +00:00
JetSetIlly
d5cecf2bde pixel render performance improvements
television signal history array is static

PixelRenderer.SetPixel() now expects an augment SignalAttributes
instance. Color is indexed by the PixelRenderer implementation. SDLImgui
implementation now stores copy of specification for speed.

PixelRefresher folded into PixelRenderer. SetPixel() should be called
between two calls UpdatingPixles(true) and UpdatingPixels(false) for all
PixelRenderer implementations - whether it does anything or not.
2020-10-27 15:48:21 +00:00
JetSetIlly
f97fced896 WIP extend reflection system to use rewind 2020-10-27 14:11:42 +00:00
JetSetIlly
e61cdae584 moved rewind system to rewind package
rewind system not used when in playmode (for now)
2020-10-26 20:02:09 +00:00
JetSetIlly
efab64d898 simplified GetState() signature 2020-10-25 18:36:05 +00:00
JetSetIlly
30ea65555c rewind maintains a comparison Snapshot
live values can be compared to this snapshot

removed SnapshotRAM field from RAM implementation
2020-10-25 18:15:29 +00:00
JetSetIlly
789512af4f Better handling of rewind slider when emulation is running
emulation is halted (temporarily) when slider is moved and will resume
again when slider is released, from the new rewind position.

stored state information is copied and assigned to the emulation, rather
than just pointing the emulation to the stored copies. the old way
worked but running the machine could then clobber what was stored in the
rewind structures.
2020-10-24 20:42:42 +01:00
JetSetIlly
2fccfe1909 only update rewind system when continuing/halting emulation in inputloop
GUI no longer "unpaused" if continuing to a step trap (eg. STEP SCANLINE)
2020-10-23 21:32:07 +01:00
JetSetIlly
63da4073d9 remove Television interface / renamed Reference to Television
the interface was becoming too large and was a remnant of a very early
development phase. the gui interface type has replaced that concept.
2020-10-23 15:35:39 +01:00
JetSetIlly
339dcc5c7c delay events can only carry one uint8 value
this simplifies the rewind system

corrected plumbing process for player sprite
2020-10-23 15:12:18 +01:00
JetSetIlly
664ea09f5c halting a non-frame boundary will add add a partial snapshot
continuing from a partial snapshot will cull that snapshot

rewinding state and then continuing from that point will crop the
state history
2020-10-22 21:40:57 +01:00
JetSetIlly
771d73c09d added FrameTrigger interface as a lightwight alternative to PixelRenderer 2020-10-22 16:17:35 +01:00
JetSetIlly
3902b13a55 television state is now rewindable
updates attached pixelrenderers. added Refresh() function and added
'refreshing' flag to SetPixel()

cpu and tia memory references updated on rewind

fixed rewind.Append()
2020-10-22 10:55:41 +01:00
JetSetIlly
e3eb439cf8 tidy up of television package 2020-10-21 16:19:57 +01:00
JetSetIlly
4253af599e moved televsion to hardware package 2020-10-21 11:14:20 +01:00
JetSetIlly
56b4733ddf simplified hardware package (preparation for rewind feature) 2020-10-20 14:52:44 +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
2875dd1b4a mnetwork hotspots were wrong (fixes Pitkat)
improved mnetwork fingerprinting (fixes Pitkat)

refined grep function
2020-10-18 13:50:22 +01:00
JetSetIlly
1cdb19562e error values checked (golangci-lint -E errcheck)
error checked on Close() of writable file

fixed disassembly sanity check
2020-10-18 10:59:19 +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
7b624b5506 removed some staticcheck errors (golangci-lint -E staticcheck)
supercharger tap window will now set tape counter (revealed by
staticcheck)
2020-10-16 14:50:23 +01:00
JetSetIlly
f30708d0d2 corrected style flaws (golangci-lint -E gocritic)
patch boundaries fixed in dpc mapper (as a result of lint)

added .golangci.yml configuration file

updated Makefile
2020-10-16 12:20:16 +01:00
JetSetIlly
22cd3251e9 removed unused function parameters/return values (golangci-lint -E unparam)
update Makefile lint target
2020-10-16 11:04:05 +01:00