Commit graph

47 commits

Author SHA1 Message Date
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 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 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 1b7e88aaa7 errors from ELF AttachCartridge() path corrected
ELF tried to dereference nil memory on error handling

debugger did not log error message before continuing with the ejected
"cartridge"

setup package prefixed error with "setup" indicator for no good reason
and just creating noise in the error message
2022-09-11 09:34:24 +01:00
JetSetIlly 3972842419 added left and right arguments for debugger and playmode
PERIPHERAL command now accepts AUTO parameter. this will (re)fingerprint
the cartridge and insert the "detected" peripheral

implementation temporary in lieu of an improved setup package
2022-04-09 15:24:16 +01: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 4df1eb071e added the ports.InputEvent type
this is now used when passing events and event data around. it also
records the port and time (in TV coordinates) which are required by
driver/passenger synchronisation and playback recording

removed television interfaces from signal package and moved the
interfaces to where they are needed
2021-12-05 20:17:43 +00:00
JetSetIlly c2d6e4d214 userinput package returns whether a userinput was handled by the emulation
this allows more elegant handling of unpause on controller input - no
unpause unless the controller is plugged in. ie. paddle input won't
cause the game to unpause unless the paddle controller is "plugged in"

added gamepad bumper (rewind in playmode) and guide button
(debugger/playmode switcher)
2021-11-07 09:52:26 +00: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 0025d2ee3a refined how ResourcePath in paths package works
now works more like the standard filepath.Join() function
2021-10-03 13:32:08 +01:00
JetSetIlly cc22223313 refactor of ports package
added PeripheralID type to complement PortsID type. renamed keyboard
peripheral to keypad, which is more accurate and removes any potential
confusion with the physical keyboard the user might be using
2021-08-24 16:02:12 +01:00
JetSetIlly c6b53916ff lint auto fixes 2021-05-18 18:28:50 +01:00
JetSetIlly 0d88a7035f added PAL60 TV specification
cartridge filename will set TV Spec if mathing string is present

added HASH option to CARTRIDGE command
2021-05-02 10:42:50 +01:00
JetSetIlly 2062ff6edb port monitor 2021-03-14 18:03:49 +00:00
JetSetIlly d6463e0dae lint errors 2021-02-24 06:59:30 +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 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 b41c6d0301 removed unnecessary whitespace (golangci-lint -E whitespace --fix)
update Makefile lint target
2020-10-16 10:29:09 +01:00
JetSetIlly 9f74bffba0 fixed mutex error in pref package String() functions
imports sorted with goimport (after a global search and replace sometime
in the past)

various commentary improvements
2020-10-15 16:38:41 +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 deac32ae50 reworked controllers package
multi-controllers is now split into three different types

auto type elegantly handles switching of the controllers

better/cleaner memory access for peripherals and event handling

updated console commands and controller debug window

controller debug window has to use a slightly different lazyvalue
implementation. this is because atomics cannot store a different type to
the one that was originally stored; this is a problem when storing
interfaces (eg. ports.Peripheral)
2020-09-02 20:49:03 +01:00
JetSetIlly a4ed7f0fcd reworked RIOT/Input system. moved to Ports package
Controller package added. currently only contains the multi
handcontroller implementation from the old Input package.
2020-08-31 13:42:34 +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
steve 72b2acecbc update setup package docs 2020-02-01 10:20:14 +00:00
steve 5432d0250d implemented paddle controller
reworked input event system to better support paddle input

updated recording/playback fileformat to support new input event system

updated setup package to support new input event system

updated debugger commands to support new input event system

added mouse capture request to GUI interface - in SDL GUI
implementations, paddle input only works once mouse has been captured

changed gui/requests to match coding style used in input/events
2020-01-27 23:11:15 +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 d0b023bea2 documentation updates 2020-01-06 10:11:21 +00:00
steve 16b15fad95 o added licence headers to all files 2020-01-05 18:58:43 +00:00
steve 206cca0bef o setup
- added television entry type
2020-01-05 18:58:43 +00:00
steve 0f5a258482 o patch
- implemented patching

o setup
    - added patch entry type

o gopher2600
    - added patch flag to RUN mode
2020-01-05 18:58:42 +00:00
steve a7d5da43cd o riot/input
- added panic error in case of unsatisfied interface

o setup
    - documenation & commentary changes
2020-01-05 18:58:42 +00:00
steve a3cbbcaf54 o riot
- moved timer to new sub-package
    - moved peripherals to new input sub-package
2020-01-05 18:58:42 +00:00
steve aba69ec69a o added overview documentation for every package
o recorder
    - fixed recorder after recent changes made to digest/video
    - fdf3f2765c59de4097a01b7fdf736ae38e4398b4
2020-01-05 18:58:41 +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 17b5c599f2 o paths
- implemented paths package
    - handles building of paths using the most appropriate config path -
	the local directory or the user's home directory
2020-01-05 18:58:39 +00:00
steve 28d7352b52 o cartridgeloader
- moved from memory package
2020-01-05 18:58:39 +00:00
steve 56fa421b6c o regression
- fixed deletion of script files

o database
    - CleanUp() now expects an error to be returned
2020-01-05 18:58:38 +00:00
steve a1bd179139 o cartridge
- Attaching of cartridges now uses CartridgeLoader type
    - CartridgeLoader type allows the caller to specify the cartridge
	path and the format of the cartridge, if fingerprinting needs to
	be overridden
    - An expected hash value for the loaded cartridge can also be
	supplied

o regression / playback
    - regression database and playback scripts now include entries
	specifying the cartridge format
2020-01-05 18:58:38 +00:00
steve 90c5ec0900 o errors
- implemented Has() function
    - Error() now de-duplicates error string parts
    * for example, instead of:

	    error: foo: foo: bar

	Error() will now return:

	    error: foo: bar
2020-01-05 18:58:38 +00:00
steve b0cb31bcd7 o database
- simplified internal structure
    - simplified Entry interface

o regression
    - tidied up error messages
2020-01-05 18:58:38 +00:00
steve 50e8ab205d o setup
- setup package now uses database package and matches entries to the
	specified cartridge and applies the changes listed
    - only panel entries supported so far
    - database file must be hand written
2020-01-05 18:58:38 +00:00
steve acc10f8d97 o errors
- renamed FormattedError to AtariError
    - renamed NewFormattedError to New
    - implemented Is() and IsAny() for more convenient testing
    + changed all error testing to use Is() and IsAny()
    - renamed FatalError to PanicError to better indicate the intent
2020-01-05 18:58:38 +00:00
steve fb037ddb70 o setup
- added setup package
    - rerouted all vcs.AttachCartridge() calls through new package

o regression/database
    - split database package from regression package
2020-01-05 18:58:37 +00:00