Commit graph

75 commits

Author SHA1 Message Date
JetSetIlly d431974c76 playback files no longer created cartridge loader directly
the information used to create the loader is storied in
the playback type rather than a created loader itself

this is more flexible and gives us better control of when
the loader is disposed of

checking of cartridge hash must now be performed explicitely
when the cartridge loader is created from the playback information
2024-04-17 09:54:09 +01:00
JetSetIlly 7ed001c4c1 changed when cartridgeloader is created for log/video regression
creating the cartridgeloader later in the regression process gives a
clearer indication of when and if the cartridgeloader is closed properly
2024-04-16 22:42:28 +01:00
JetSetIlly 1f23e7217f simplified cartridge loader package
loader is opened at creation time which allows us to remove the
needlessly complicated pointer-to-pointer mechanism
2024-04-16 10:18:13 +01:00
JetSetIlly 18aa6db347 reworked cartridge loader package 2024-04-16 10:18:13 +01:00
JetSetIlly 6c3035e143 renamed hardware/instance package to environment 2023-04-16 21:24:09 +01:00
JetSetIlly 22ad697d24 definable frame queue length
fast sync. preempt pixel queue on user input
2023-03-05 17:24:03 +00:00
JetSetIlly 11fb367ff5 periperhal event PaddleSet now takes a pair of float32 values
float32 pair defined as ports.EventDataPaddle

added functions to convert the float32 to and from a playback entry.
conversion from the playback entry tolerates a single float32 value
meaning that old recording files will work

rename plugging.PortLeftPlayer and plugging.PortRightPlayer to just
plugging.PortLeft and plugging.PortRight
2023-02-27 21:27:21 +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 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 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 2942d35320 added ports.TimedInputEvent to accompany ports.InputEvent
the Time field was in ports.InputEvent but it didn't make sense to
specify a time value in all contexts
2021-12-05 22:05:35 +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 e6fc6f005d moved TIA Revisions preferences into hardware.preferences package
clarified how the emulated machine is normalised for regression testing
2021-12-05 20:17:43 +00:00
JetSetIlly 085adf5159 added hardware/instance package 2021-12-05 20:17:43 +00:00
JetSetIlly 0e3ec6a5d5 add visual comparison tool. command line option and gui
userinput for two emulations synced by RIOT ports. RIOT port
driver/passenger synchronisation ensures user input is seen by the
emulations at the same time (relative to the emulation's television)

does not yet handle RNGs (randomise on startup or the RNG in the DPC or
DPC+ formats yet). we need to add a context type first
2021-12-05 20:17:42 +00: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
JetSetIlly 8bf405ee80 added NewLoaderFromEmbed()
suitable for loading data from a go:embed directive
2021-09-05 10:11:02 +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 3bf84757fe playback files were not using cartridgeloader package correctly
see previous commit for related issue and explanation of why this was a
problem
2021-08-19 08:29:55 +01:00
JetSetIlly 40e10de6a3 Go: replaced iotuil functions with io equivalents 2021-06-25 10:10:56 +01:00
JetSetIlly 778ea9af92 reworked controller autodetection
less false positives, particularly of mouse triggering paddle control

keyboard detection now treated as absolute
2021-05-18 12:38:28 +01:00
JetSetIlly 2062ff6edb port monitor 2021-03-14 18:03:49 +00:00
JetSetIlly 156534a3fd added userinput package
debugger and playmode refer to userinput package rather than the common
code being in the playmode package

GUI events are now userinput events

more versatile handling of EventData in controller package. parsing of
EventData is handled by the controller types as required. added
EventDataPlayback type to ports package to help distinguish source of
data.

EventDataStick used to specify stick data value. used to help
distinguish between setting a stick direction and toggle a stick
direction. the latter case is useful for (physical) gamepad input and
the former for input from a keyboard.

Gamepad analogue stick can be used for paddle input. PaddleFire removed
and Fire used instead.

version number of playback file increased to 1.1. version detection of
recorder.IsPlaybackFile() improved.
2021-03-09 22:37:08 +00:00
JetSetIlly d6463e0dae lint errors 2021-02-24 06:59:30 +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 510c155989 clarified (and corrected) reset procedures 2021-01-14 12:37:38 +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 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 b41c6d0301 removed unnecessary whitespace (golangci-lint -E whitespace --fix)
update Makefile lint target
2020-10-16 10:29:09 +01:00
JetSetIlly e6e3a63be8 spelling errors in comments (golangci-lint -E misspell --fix)
update Makefile lint target
2020-10-15 22:02:51 +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 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 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
JetSetIlly 3410f6565b tidy of riot/input package
renamed EventValue to EventData

renamed playback.go file to playback_recording.go - for clarity
2020-03-31 13:07:48 +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 52744c8dfc playback now correctly handle keypad events
panel fixed so that it sends the correct EventValues to the attached
recorder
2020-02-01 00:39:13 +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 706e7afa0e refactored (rewrite) of riot.input package
improved type names to better reflect the Stella Programmer's
Guide

for instance Player type has been renamed to HandController. this
also removes conflict (in the developer's mind, rather than the
language) with the playerSprite type.
2020-01-23 23:56:47 +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