Commit graph

168 commits

Author SHA1 Message Date
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
393904abcb simplification of the memory sub-system
- preparation for adding 7800 emulation

cpu (6507) package uncoupled from upstream dependencies

- cpu no longer logs execution of KIL instruction
- randomisation of registers on startup can be handled by the called of
  the cpu's Reset() function
- address errors are filtered by an optional IsAddressError() function
  in the Memory interface implementation
- Error field removed from execution.Result type

all references to interface{} replaced with any
2024-11-23 14:56:37 +00:00
JetSetIlly
a196b21a93 logging functions called with real env instances from the hardware package
logger package will no longer create new log entires for environments
other than the main emulation (or the logging.Always shim)
2024-04-30 17:48:46 +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
3a6b1f3a3e changed EventDataPaddle to use integer based (int16) values
EventDataPaddle can now specify whether the values are relative or
absolute values. previously all values were absolute

hardware mice use relative values whereas devices like the stelladaptor
use absolute values

removed gamepad trigger operation of paddles. it was a poor solution to
the problem
2024-01-10 17:42:11 +00:00
JetSetIlly
1ad07dc020 environment correctly propogated after Plumb() event
AudioTick() function in tracker interface accepts TrackerEnvironment
instance. tracker implementation differentiates emulation instances and
records AudioTick() information accordingly
2023-04-17 17:07:03 +01:00
JetSetIlly
6c3035e143 renamed hardware/instance package to environment 2023-04-16 21:24:09 +01: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
178f05f17b updated go minimum version to 1.20
applied gofmt to source tree to update the documentation comments
2023-02-12 13:09:07 +00:00
JetSetIlly
c440d7b0de corrected mapping of timer read addresses
removed symbol check from riot/tia read() functions
2023-02-09 19:51:48 +00:00
JetSetIlly
e293e8abf5 save timeline to CSV in menu popup
panel reports activity on select and reset being pressed/held

moved save to CSV option to context menu for source and globals window
2023-01-06 22:57:43 +00:00
JetSetIlly
1973945af0 PA7 bit immediately on read of TIMINT
previously the PA7 bit would remain set until the timer expired
2022-09-25 10:04:53 +01:00
JetSetIlly
18eb9f3699 stick and gamepad controllers correctly reset after gameplay rewind
previously the controller state could be left in a latched state despite
the physical controller being in the resting state. this was
disconcerting to the player

the problem was known about and a fix previously attempted so this is
actually a bugfix
2022-08-20 21:00:20 +01:00
JetSetIlly
6b089f5f57 ChipHasChanged() used to decide whether to call Step() or QuickStep()
small speed increase because we can use QuickStep() more often than
Step() when processing the TIA and RIOT
2022-05-27 21:27:11 +01:00
JetSetIlly
7e0e2a4714 altered how ineffective TIA/RIOT writes are handled
removed frequent and relatively expensive map lookups resulting in a
small performance increase
2022-05-23 18:02:40 +01:00
JetSetIlly
6422c08ddf QuickStep() added to complement Step() for TIA and RIOT
QuickStep() removes all checking for changed memory state. moreover, if
the CPU RDY flag is false, we can say that QuickStep() is always
prefered to Step() because by definition the state of memory cannot have
changed

a small but significant performance improvement. a side effect of this
improvement is that execution speed will increase depending on the
number and length of WSYNCs
2022-05-23 18:02:40 +01:00
JetSetIlly
ee07cd0a54 muting of peripherls must now go through the central ports.MutePeripherals() function
this allows the ports type to apply the mute state on newly inserted
peripherals

this prevents the situation on startup in which the mute is applied
before the peripheral is inserted
2022-05-15 21:29:31 +01:00
JetSetIlly
deb0887165 atarivox implementation will not produce sound if audio is muted
audioEnabled preference values renamed to audioMute

this is to facilitate the differentiation of muting and disabling
AtariVox output. muting of AtariVox is a subset of audio mute.
2022-05-13 11:30:55 +01:00
JetSetIlly
897db2e0ea added SWCHB truth table to comment for deriveSWCHB() 2022-04-12 09:46:17 +01:00
JetSetIlly
2c5a543489 fixed logic behind SWCHA. it is not the same as SWCHB
SWCHB was working fine. logic for SWCHB was mistakenly applied to SWCHA
2022-04-11 23:04:45 +01:00
JetSetIlly
8633e2e2e6 gamepad correctly raises the high bit of INPT0 (and INPT2 for right player)
Unplug() function correctly implemented for gampad, stick, paddle and keypad
2022-04-09 15:24:16 +01:00
JetSetIlly
4829333015 atarivox and savekey are disabled during rewinding 2022-03-27 10:13:14 +01:00
JetSetIlly
f1664a38ab AtariVox.Reset() no longer restarts the festival engine
restarting the festival engine causes havoc when rewinding, causing the
festival engine to be quit and restarted over-and-over very quickly.

RestartPeripheral interface implemented by AtariVox and called
indirectly when changing AtariVox preferences
2022-03-20 10:33:16 +00:00
JetSetIlly
b8d8ef0fe7 atarivox preferences moved to hardware/preferences package
peripherals are now required to accepe *instance.Instance argument when
initialised
2022-03-16 16:06:47 +00:00
JetSetIlly
ae08fdfa10 atarivox/festival command exits properly
ends immediately on emulation quit and doesn't leave zombie process if
controller is changed mid-emulation
2022-03-07 19:27:10 +00:00
JetSetIlly
cd03e092b1 atarivox notification icon. updated PERIPHERAL command
atarivox and savekey will now refuse to be initialised for any port
other than the right player port
2022-03-07 19:27:10 +00:00
JetSetIlly
d9c21ec53c atarivox separated from savekey package
atarivox will embed savekey type and forward data as appropriate

added atarivox preferences in order to specify festival binary
2022-03-07 19:27:07 +00:00
JetSetIlly
f2379ae0bb first attempt at AtariVox support. festival used for synthesis
added Unplug() function to Peripheral interface. existing peripherals
updated to satisfy interface

volume mix increased. better balance with festival default volume

path to festival is currently hardcoded to be /usr/bin/festival
2022-03-07 09:18:52 +00:00
JetSetIlly
ab92d01f73 fingerprinting of controllers
moved controllers and savekeys package to new peripherals package

removed auto controller

changed lazy.Controllers to lazy.Peripherals and Controllers window to
Peripherals window

changed CONTROLLER command to PERIPHERAL command. removed AUTO option

added savekey as an option to PERIPHERAL command and Peripheral window
2022-01-29 08:58:05 +00:00
JetSetIlly
a14b25fdfd VBLANK latch bit now applies only to INPT4 and INPT5 2022-01-27 22:24:19 +00:00
JetSetIlly
962d199330 second stick button works with keyboard. right-player also added 2022-01-23 10:08:51 +00:00
JetSetIlly
be9011493d quick addition of two button joystick support
regular joystick replaced with "gamepad" option. more sophisticated
selection process and new icon will be added at a later time
2022-01-22 22:49:48 +00:00
JetSetIlly
6311063b89 random package can produce numbers faster for the running emulation 2022-01-19 22:31:50 +00:00
JetSetIlly
1b673f8411 added FieldBus interface and commentary for PeekField() and PokeField()
we don't use the interface but it's useful to document their existance
and when they should be used in preference to the DebugBus.
2021-12-28 10:37:41 +00:00
JetSetIlly
f01634ec68 improved RIOT timer window. fixed Ticks Remaining and added TIMINT
changed SetField() and GetField() to PeekField() and PokeField() in
ports package. added PeekField() and PokeField() to Timer package.
2021-12-28 09:49:38 +00:00
JetSetIlly
f2fb0091e7 simplified/clarified memory interface
addresses and bus interface removed and split into cpubus and chipbus
packages.

ReadZeroPage() no longer has any distinction from normal Read()
function.
2021-12-26 19:00:11 +00:00
JetSetIlly
1a0edad162 added Ports window. feedback is now correct
INPTx input is masked correctly

RIOT.Ports no longer keep private copies of SWCHA, SWACNT, SWCHB or
SWBCNT. added ChipRefer() to ChipBus interface. this makes the interface
with memory more natural. for example, a POKE command will now correctly
be referred to by the Ports implementation in all instances.
2021-12-23 11:28:51 +00:00
JetSetIlly
2516e567ce RIOT SWCHB port is writable 2021-12-21 19:00:59 +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
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
e0d4c7cb7b added random package. random numbers "accessed" via instance package 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
464a62c9db userinput package can now forward events to many implementations of HandleInput
preperation for allowing parallel emulations with the same userinput
2021-12-05 20:17:42 +00:00
JetSetIlly
eecd5aa8c1 fixed controller snapshotting and dumping of emulation links 2021-11-18 21:51:44 +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
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