Commit graph

68 commits

Author SHA1 Message Date
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 68cf99620e setup entries output log message on successful application
clarified some database concepts - updated regression and setup packages
accordingly
2023-02-14 10:08:33 +00: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 2d0431bc83 regression tests check for CPU KIL state 2023-02-05 14:04:42 +00: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 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 154c13b7b4 integrity check of ROM binary on recording playback is now optional
this facilitates A/B testing of two binaries. normally you would want to
prevent a playback with a ROM binary different to one used in the
original recording, but in some instances it is useful
2022-08-02 10:12:32 +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 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 7af5af322c performance brake for hardware.Run() moved outside of Run() function
extensive commentary on how best to use hardware.Run()
2021-11-11 06:56:50 +00:00
JetSetIlly 180f2b5003 added rewind system to playmode
update userinput.EventKeyboard to support Repeat keypresses

in playmode rewind forward/backward occurs on shift-left or shit-right
cursor keys (with repeat)

removed the pause feature (sdlimgui) that caused two-frame kernels to
appear "complete" when paused.
    a) it wasn't consistent
    b) it can cause single-frame kernels to shimmer
    c) it doesn't really work with the rewind system
it'll be addressed in a future commit
2021-10-26 18:48:35 +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
JetSetIlly e5bd938b41 renamed paths package to resources package
ResourcePath() is now called JoinPath()

UniqueFilename() moved to a new package named unique and renamed to
Filename()
2021-10-03 13:32:08 +01:00
JetSetIlly f1cd9bd040 removed special CTRL-C handling for regression RUN
it never really worked and was just annoying. default interrupt handling
is sufficient.
2021-09-24 20:24:31 +01:00
JetSetIlly c816cf5d5a renamed emulation.Halt to emulation.Ending to avoid concept conflict
Halt is a synonym for Pause and a note has been made next to the
variable declaration
2021-09-24 07:26:52 +01:00
JetSetIlly c2616c2573 added emulation package / gui.EmulationState (re)moved 2021-07-25 18:44:12 +01:00
JetSetIlly 89b7596837 implemented pausing in playmode
this has revealed the way forward for an effective convergence of
playmode and debugging mode. for this commit a Playmode interface has
been added but this will abstracted into an Emulation interface in the
future
2021-07-24 08:07:23 +01:00
JetSetIlly cee40a6fad replace all path function calls with filepath function calls
again, not one that is noticeable on Unix but can upset Windows because
of the different directory separator.
2021-06-05 14:38:14 +01:00
JetSetIlly 46dd44c218 vcs.Run() continue check not only returns error and not (bool, error)
this is marginally quicker but I feel it's neater. to solve the problem
of distunguishing between returns values (true, nil) and (false, nil)
the latter can implemented with a sentinal error.
2021-01-20 23:51:08 +00:00
JetSetIlly 91c88d555b renamed all instances of HorizPos to Clock
it's less clumsy when used as a label and it's accurate with regards to
how the VCS is documented. not sure why I thought HorizPos was a better
label. maybe it helped my thinking in the earlier phases of development.
2021-01-19 17:34:43 +00:00
JetSetIlly 713a3229e6 added REDUX option to regression
reruns compatible entries in regression database

fps cap off for regression operations
2020-11-25 21:32:26 +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 efab64d898 simplified GetState() signature 2020-10-25 18:36:05 +00: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 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 05a2837853 disable random elements of the VCS for regression and playback recordings 2020-10-19 18:32:57 +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 504ad464a1 corrected regression output format
added ability to skip tests during a regression run by issuing an
interrupt signal (ctrl-c). two such signals within 250ms will stop the
run completely

corrected log regression. now makes sure log is clear before beginning
collation
2020-10-02 22:25:03 +01:00
JetSetIlly 7fc48dcd65 renamed errors package to 'curated'
to differentiate with the now existing errors package in the standard
library.
2020-09-28 22:16:59 +01:00
JetSetIlly 2d5cae17f5 reworking of errors package
removed all messages from errors package. the strings are now hard coded
in place. the original reason for extracting the error strings like that
was (a) for redundancy and (b) for localisation possibilities. However,
in reality there is not much redundancy and since the project started
the scope of localisation is much larger (particularly due to the
addition of a GUI)

this is the first step. the next step is to remove the errors package
altogether. recent additions to Go mean that the functionality of the
errors package is no longer required. moreover, the original idea for
the errors package functions turns out not to have been as useful as
first appeared (the Error() functionality which makes sure no repeating
sub-strings occur is probably better achieved with static tooling).

one idea that comes from this which is quite interesting is the idea of
a curated error. that is, any error that has been "wrapped" as some
'generic' type. the IsAny() function in the errors package effectively
serves this purpose. we use that in one place in the input loop of the
debugger. not strictly necessary but nice to have so it would ideal
if we could remove the errors package but keep that idea.
2020-09-28 22:16:59 +01:00
JetSetIlly dda8fe3165 more efficient (ie. faster) playback of recordings
previous recordings /may/ not work correctly
2020-09-03 12:18:27 +01:00
JetSetIlly 298a5d343f updated copyright notice in all files
the note about historical versions also being covered wasn't strictly
needed and was ugly. the LICENCE being in the root file from the very
first commit is sufficient.
2020-07-26 20:18:56 +01:00
Robin Eklind 24cb28843f gopher2600: use fully qualified import path as module path
Fixes #4.
2020-03-21 23:39:56 +01:00
JetSetIlly 2fc4053511 corrected race condition for frame limiter
message limiters for regression tests no longer use FPSLimiter

the tick pattern is so simple it's been copied into the relevant
functions
2020-03-10 22:41:56 +00:00
steve 6b01edbf43 improved imgui integration 2020-02-09 20:35:59 +00:00
steve 75f79abd98 improved playback error messaging
clarified when and how playback is allowed when TV types differ

currently there is only one television implementation but we may
need to expand on this in the future
2020-01-20 06:35:38 +00:00
steve 1add64b3bd rewrite sdlplay and sdldebug
better and safer thread interaction
2020-01-13 19:04:59 +00:00
steve 4534da0db6 reworked paths package
the location of the configuration directory now depends on how the
binary is built. release versions of the binary will look for the
gopher2600 directory in the user's os configuration directory.
non-release versions will look for the .gopher2600 directory in the CWD.

paths.ResourcePath() will create the paths that don't exist

paths.ResourcePath() now clearly differentiates paths and files

added build target to the Makefile; disabled release target for now
2020-01-07 19:14:51 +00:00
steve 16b15fad95 o added licence headers to all files 2020-01-05 18:58:43 +00:00
steve d7cdfcfe61 o errors
- removed ErrorID, using the error message as the ID
    - works just as well and simplifies maintenance
    - the messages should be moved to the relevant packages OR to a
      locale package. not sure which yet.
2020-01-05 18:58:42 +00:00
steve 7de8c5ba14 o database
- improved documentation
    - some tidying up

o regression
    - improved documentation

o digest
    - Digest interface now requires Hash() rather than String()
    - warning: use of String() may now break things
2020-01-05 18:58:41 +00:00
steve 5698309e68 o database
- improved error messaging
    - sketched in support for audio and 'video & audio' digests in
	digest regression
2020-01-05 18:58:41 +00:00
steve da4ce0b9eb o digest
- renamed screendigest package to digest and SHA1 type to
	ScreenDigest
    - added AudioDigest type
    - added Digest interface
2020-01-05 18:58:41 +00:00
steve 9f50f3c77e o audio
- implemented audio
    - using Ron Fries' method as the basis
    - removed sample playback - performance of Fries' method is good
	enough that we'll never need it again
    - sdl audio routines using QueueAudio() - maybe better if we use
	callbacks?
    - sketched wavwriter AudioMixer - not usable yet
2020-01-05 18:58:40 +00:00
steve 8ad481e132 o debugger / playmode
- removed references to SdlPlay and SdlDebug
    - constructors for debugger and playmode now expect instances of GUI
    and Television, rather than creating them
    - this should help future porting efforts

o peripherals
    - renamed Events to Actions
    - to avoid confusion with Events in the GUI package

o television
    - renamed StellaTelevision to television; a better name because
    it serves as a reference implementation and is the only television
    implementation currently needed.
    - originally, PixelRenderers were implemented as Television that
    embedded StellaTelevision; it made sense to use a more unique name
    - note that we're still keeping and using the Television interface
    - reworked specifications file
2020-01-05 18:58:39 +00:00
steve cc8c14f0ae o regression
- saving scripts (playback and state scripts) are now prepended with
	info about what type of script it is. in practice it has proved
	useful to know this from a glance, rather than opening up the file.

o gopher2600
    - playing back recordings is now more intuitive
    - removed option to specify the filename that a new recording will
	save to but I think that's acceptable.
2020-01-05 18:58:39 +00:00
steve 11d9676ba9 o screendigest
- moved digesttv to screendigest package

o television
    - removed imagetv and renderers package
2020-01-05 18:58:39 +00:00
steve 3ecbd6b527 o regression
- playback regression entries will now end with an error if
	emulation has not terminated at 100%
    - shouldn't ever happen except during development of the emulation
	core. none-the-less it is useful for regressions to end in all
	instances.
2020-01-05 18:58:39 +00:00