Commit graph

1240 commits

Author SHA1 Message Date
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
0931b37244 missing preferences file is no longer a sentinal error
failed load just returns nil
2020-11-03 18:36:22 +00:00
JetSetIlly
b5481efbf0 mouse capture now requires a double click
mouse can be released with Escape key (in addition to RMB)

Escape key will run/halt emulation (when mouse is not captured)
2020-11-03 17:47:11 +00:00
JetSetIlly
943a80d2fd fixed deadlock on rewind slider
side channel buffer not big enough for the RUN/HALT commands sent by the
rewind slider

screen will not draw partial screens and pixel cursor when rewind slider
is being used
2020-11-02 21:51:19 +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
1329d437ca rewind uses a circular static array
appending and slicing is too memory expensive
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
cd3728ed3c fixed unused area detection for addSuperchip implementation
fixes Fatal Run ROM
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
f4e9abfe14 performance improvements
saving of signal history more efficient
2020-10-26 18:41:39 +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
3b86234d0f cartridgeloader no longer fails if files on local system do not parse with url.Parse()
boundary checks for fingerprinting of very small files

normalised error generation in cartridge mapper implementations
2020-10-25 13:28:29 +00:00
JetSetIlly
a66c3c5087 more cartridge state Snapshot()/Plumb() implementations
- 3e
- 3e+
- cbs
- df
- dpc
- dpc+
- mnetwork
- parker bros.
- supercharger
- tigervision

reworked atari cartridge implementations

plusrom passed through all Snapshot() and Plumb() calls to the child
mapper as normal. it adds nothing additional to the saved state.
2020-10-25 11:13:35 +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
85b7b015cc snapshot cartridge state for rewind system
implemented for:
    - atari
2020-10-23 21:32:07 +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
cac80ab720 rewind system is reset when machine is reset 2020-10-23 20:08:43 +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
6ad6d31a6c added rewind controls to control window
removed rewind window
2020-10-23 15:13: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
3c1fc53093 state of VCS CPU/TIA/RIOT/Memory can be saved and restored on demand
televsion state not stored and there is some state information in the
debugger that is not updated on state restore

sketched in gui state rewinder
2020-10-21 10:48:49 +01:00
JetSetIlly
56b4733ddf simplified hardware package (preparation for rewind feature) 2020-10-20 14:52:44 +01:00
JetSetIlly
75af8d738d randomisation in the hardware package through a local RNG
this will facilitate recording/playback/regression of non-default
machine states (sometime in the future)
2020-10-19 18:32:57 +01:00
JetSetIlly
05a2837853 disable random elements of the VCS for regression and playback recordings 2020-10-19 18:32:57 +01:00
JetSetIlly
83ee7e99ab cartridge ram/registers are randomised on reset
replaced Initialise() with Reset()
2020-10-19 14:30:43 +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
5ff1632a74 prefs will not remove defunct preference values from disk 2020-10-19 12:10:31 +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
6cc939dd38 added proper checks for golangci-lint and upx to Makefile
shader generator creates correctly formatted go code
2020-10-18 10:59:19 +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
e5e1cd7b0a removed use of os.Exit() and log.Fatalf after registering a deferred function
gocritic linter exitAfterDefer check
2020-10-16 18:52:41 +01:00
JetSetIlly
31374965e9 enable all govet linting checks (except composite and shadow) 2020-10-16 16:55:07 +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
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
7c1409d474 updated for UK spelling (golangci-lint -E misspell)
exception for color, colors, and coloring in golangcg-lint config file
2020-10-16 13:00:33 +01:00