Commit graph

103 commits

Author SHA1 Message Date
JetSetIlly
9a99ff7a3e fixed searching for PAL60 in filename and PAL60 sizing
added PAL60 specification. even though it isn't a real specification it
is more convenient and provides better user feedback

moved FrameInfo into frameinfo package, now called Current as in
frameinfo.Current

clarified storage of requested specification by the television:

how the television is probed for the specification has changed, in
particular the current spec is retreived via the GetFrameInfo()
function. in fact, this was how most other packages did it but there
also existed a GetSpecID() which was uncessary

GetReqSpecID() and GetCreationSpecID() removed, replaced with
GetResetSpecID() and IsAutoSpec()

simplified SetSpec(). removed the force argument

removed reset option for vcs.AttachCartridge()
2025-02-23 17:39:08 +00:00
JetSetIlly
ecb8f15455 simplified prefs.Disk.Load() function
removed the saveOnFirstUse argument. this means the EnableSaving()
function added in the previous commit can be removed

the reason for adding the EnableSaving() was so that we could intialise
the ColourGen type without writing to a preferences file. this was a
problem for testing because it meant that the global ColourGen
initialisation created a preference file for each test, which is
definitely something we don't want

there is still the global DisableSaving flag that would ideally be
removed in the future. it's currently only needed by the
debugger_test.go test which initialises a Debugger instance and
indirectly causes the preferences file to be saved on exit
2024-12-20 14:05:32 +00:00
JetSetIlly
b8eea8a976 user input recorded for rewind system
input is re-inserted as appropriate on playback
2024-12-14 09:09:58 +00:00
JetSetIlly
77ad2da0f9 ELF package, commentary and clarification
reverted dee9c15352. all extant ELF ROMs
work in streaming and non-streaming mode

simplified elfMemory.Snapshot()

simplified snoopDataBus() (strongarm function)

pull() and peek() functions explicitely handle instances when stream is
not draining

rewind package commentary. protection when adjusting frame during
findFrameIndex()
2024-09-14 12:30:20 +01:00
JetSetIlly
de803e6f1c added VSYNC trace to timeline window
television would not desynchronise if scanlines was less than user
preference

desync is now less aggressive. for example, the transition between the
map screen and main screen in Lord of the Rings would trigger a full
screen roll but now it's less noticeable
2024-07-06 21:52:28 +01:00
JetSetIlly
3fb88160cf added Hz counter to reflection/timeline 2024-05-30 23:12:50 +01:00
JetSetIlly
5bd9cd1f5a changing TV SPEC while paused will update the spec as expected
the rewind system is used to rerun the previous 10 frames thereby creating
an image that immediately reflects the selected specification
2024-05-21 19:18:12 +01:00
JetSetIlly
4813dae6c4 ELF system argument uses the television requested spec ID
tracker package uses television spec ID correctly

movie cart tested for PAL60. it should be PAL-M

rewind search functions uses the TV spec of the main emulation

command line "performance" and "regress add" -spec option renamed to -tv

template for TV terminal command uses specification.ReqSpecList
2024-05-21 18:09:50 +01:00
JetSetIlly
fa2866c45d sdlimgui preferences correctly initialised on first use
this fix is very important because without it, the frame queue is set to
zero. this means that the display is likely to be very choppy creating
a bad impression of the emulator for first time users
2024-05-05 17:00:38 +01:00
JetSetIlly
96ad0797b4 NewVCS() expects environment.Label on instantiation
this helps force the environment.Label to be set to something meaningful
2024-04-30 18:34:35 +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
24f3f32342 simplified notifications package
notifications interface instance moved to environment from
cartridgeloader. the cartridgeloader package predates the environment
package and had started to be used inappropriately

simplified how notifications.Notify() is called. in particular the
supercharger fastload starter no longer bundles a function hook. nor is
the cartridge instance sent with the notification
2024-04-06 10:12:55 +01:00
JetSetIlly
58315e5182 added VCS.Snapshot() function. simplifies the rewind package
also allows easy access to the VCS snapshot process when there is no
need to use the rewind package
2024-02-05 11:41:17 +00:00
JetSetIlly
97b08fa389 recording of rewind state was sometimes missed in playmode
a great way of seeing this bug was with Berzerk Voice Enhanced edition.
the voice after leaving a level caused the rewind.Record() function to
be skipped. this meant that there was a gap in the rewind record
2024-01-09 21:51:02 +00:00
JetSetIlly
7f4126d226 added COMPARISON command
timeline window uses new command to make changes

comparison point can be locked
2023-06-18 21:25:07 +01:00
JetSetIlly
bde74a49b2 more timeline improvements/fixes
orange TV icon used to show current rewind position

fixed frame guide labelling

comparison point can be set from the popup menu
2023-06-18 21:25:07 +01:00
JetSetIlly
80518367b2 corrected rewind behaviour at beginning of ROM
added rewind.Peephole() function to better illustrate the current state
of the rewind history
2023-06-05 11:30:19 +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
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
5885c9e776 fixed race condition in instance caused by timeline
thumbnailer was running in a different goroutine to that which the state
being used to generate the thumbnail was create in. there's no way of
making that safe except through mutexes or similar. that's too much
overhead for something as inconsequential as a timeline thumbnailer

timeline thumbnailer now runs in the same goroutine as the main
emulation, bypassing these problems. scheduling of when thumbnailer runs
is now done manually

"Live" TIA Revision values replaced with atomics. small performance
improvement
2022-04-04 21:27:56 +01: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
3c288adf79 clarified some memory bus concepts
corrected/simplified how supercharger is accessed
2022-01-18 20:33:58 +00:00
JetSetIlly
20244b6085 6507 pinout window. shows values currently on the bus 2021-12-20 15:13:33 +00:00
JetSetIlly
58848acdf9 input system and ports system separated
playback/recorder and driven input systems moved out of the the ports
package and into a new input package. how the input systems interact has
been clarified and improved - for example, it is now posssible for a
playback file to be used to drive two emulations for comparison purposes

the debugger startup procedure has been clarified with two distinct
startup functions for playmode and debugger - each of which take
different arguments. the clarity has allowed the reintroduction of
recording and playback to the main play mode
2021-12-11 08:19:46 +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
dddb166a72 timeline ratios are now reset on cartridge change 2021-11-20 23:20:28 +00:00
JetSetIlly
08a3adb69a the 'ejected' cartridge retuns NOP rather an error
fixed corner case caused by RSYNC being triggered on the first scanline

fixed some presentational issues (Nan and Inf floats) caused by running
an ejected ROM

possible to switch from playmode to debugger when ROM selector is active
in all situations.
2021-11-20 14:37:09 +00:00
JetSetIlly
68da3c95ea prefs window fully working in playmode
removed PREFS command. rewind preferences in their own tab. increased
default rewind to 250 and extended range of rewind prefs slider
2021-11-19 19:22:20 +00:00
JetSetIlly
249e3c4b60 timeline window now runs the rewind.GetState()/thumbnailer in the main emulation goroutine
the thumbnailer does the actual emulation in a new goroutine so there's
no lag here but it's necessary to PushRawEvent() so that
rewind.GetState() doesn't race
2021-11-18 21:51:44 +00:00
JetSetIlly
8a8a306670 corrected rewind splicing point
rewind.String() now produces correct summary in all instances

rewind reset on frequency change (in addition to the existing rule about
number of states). timeline no longer reset on this type of rewind
reset.

adjust coordinates function uses the correct zero value for color
clocks. the error could be seen on STEP BACK FRAME when the execution
would stop near clock 0 rathre than clock -68

execution states are recorded and appended to the history every frame
regardless of the snapshot frequency schedule. they continue to be
trimmed in the usual way. on emulation halt meanwhile, the current
coordinates are recorded which is more flexible and allows for video
cycle granularity.
2021-11-18 10:29:33 +00:00
JetSetIlly
4f4bee0b36 thumbnail preview on timeline hover
introduced PlumbFromDifferentEmulation interface. the ARM emulation
doesn't like being moved between emulation instances so the ARM is
recreated when plumbing a state that originated in a different
emulation. not all mappers need to implement this interface.
2021-11-17 17:30:46 +00:00
JetSetIlly
b9720f9a41 rewind history was incomplete when switch from playmode to debugger
the splice point was being set wrong by RerunLastNFrames()
2021-11-16 23:04:15 +00:00
JetSetIlly
8df37d8b1e timeline reset at same time as rewind reset 2021-11-16 10:03:33 +00:00
JetSetIlly
3f6bd5fccb preview thumbnails in ROM selector
added thumbnailer package to support thumbnailing
2021-11-15 13:37:50 +00:00
JetSetIlly
a0a1f10289 fixed binary search bug in rewind package when snapshot frequency > 1
two issues here: (1) bug in deciding which half of the circular array to
search; (2) how we counted the period between snapshots was wrong. it is
now just a straight "current frame number % snapshot frequency"

rewind.SetComparison() makes a new snapshot, rather than using the
current splice point. the old method worked okay for a snapshot
frequency of one but not so well for anything larger
2021-11-14 17:47:44 +00:00
JetSetIlly
50434ae36b added Mode() to emulation interface 2021-11-14 09:16:56 +00:00
JetSetIlly
8a46ac5482 tidy up of rewind package. clarified some concepts and consolidated/removed dead functions
reoved GotoCoords() tempFrame in anticipation of a more flexible system.
GotoCoords() when snapshot frequency greater than one will be noticeably
slower in the meantime
2021-11-14 09:16:56 +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
33cb5543aa controller input reset after rewind state plumbed in
this fixes the issue caused by rewinding and continuing from a state in
which a controller was active
2021-11-06 15:25:02 +00:00
JetSetIlly
5ae0f61b79 timeline info detailed in a tooltip (hover on timeline window) 2021-11-06 11:11:18 +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
92d96cc4e9 major refactor. amalgamated debugger/playmode emulations
switch between debugger and playmode with F6 or backtick key

pakage debugger remains for now but it will be renamed to emulator or
something like that. playmode package removed.

commandline options for both debugger and playmode are the same
currently, with some playmode features being lost (temporarily)
2021-11-04 09:38:35 +00:00
JetSetIlly
eb45d26471 fixed index OOB if GotoCoords() was called immediately after STEP FRAME 2021-11-03 12:48:27 +00:00
JetSetIlly
89fd7d009d corrected a false negative in the rewind.timeline integrity check 2021-10-30 09:02:31 +01:00
JetSetIlly
2834308791 tidy playmode/rewind packages 2021-10-28 12:24:54 +01:00
JetSetIlly
7629caf89d corrected how rewind package detects frames that don't exist yet
clarfied that the use of the Emulation type is for passive monitoring of
the underlying emulation. rewind package now monitors the emulation
passively.
2021-10-26 09:01:42 +01: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