Commit graph

179 commits

Author SHA1 Message Date
JetSetIlly
1d53447317 removed lint errors 2021-04-16 07:57:44 +01:00
JetSetIlly
aa86b2e42d cartridgeloader streaming 2021-04-02 20:41:45 +01: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
ec71e46ec5 added --log option to performance mode 2021-02-22 17:53:40 +00:00
JetSetIlly
83bf90c826 disasm window uses table API
improved/simplified text disasm output

entry is always correctly updated on execution
2021-02-19 19:24:49 +00:00
JetSetIlly
616dc894cf TIA revisions window accessible in playmode
window positions in playmode are not saved. saved window positions from
debug mode does not affect playmode

updated play and performance mode instantiation so that TIA revisions
window in playmode works correctly
2021-02-16 15:49:48 +00:00
JetSetIlly
2b7b8d1eca reworked linter package
added IterateBlessed() function for Disassembly type. more convenient
method of outputting disassembly to a string.

instruction defintion notes whether opcode is undocumented

linter flags use of undocumented opcodes

renamed DISASSEMBLY command to DISASM

added single address disassembly to DISASM command
2021-02-08 19:16:51 +00:00
JetSetIlly
19e2c7dbc0 changed/streamlined how playmode/debugmode is initiated and handled 2021-01-31 21:08:59 +00:00
JetSetIlly
ab6c4aaeeb streamlined window/menu creation in sdlimgui
removed gui.ReqSavePrefs. prefs should only be saved under explicit
instruction from the user

added gui.StateEnding to be used with gui.ReqState when debugger and
playmode (and maybe other modes) are finishing. sdlimgui uses this to
save window information.
2021-01-04 10:57:37 +00:00
JetSetIlly
d5fa669b1b fullscreen command line option
can start playmode in fullscreen mode
2021-01-01 16:50:53 +00:00
JetSetIlly
c22caf852b CRT blur (very basic chromatic aberration)
blur options added to CRT prefs window

CRT prefs now accessible from playmode (F10)
2021-01-01 14:29:46 +00:00
JetSetIlly
17eb04b931 added trace profile type to performance package
expanded --profile option for DEBUG and PERFORMANCE so that different
profile options can be selected/combined

added --profile option to PLAY mode.

many lint errors removed (re-added "make lint" to git pre-commit hook)
2020-12-30 20:45:07 +00:00
JetSetIlly
0e4737b326 rework of sdlimgui package
removed options related to setting scale of debug/play window
    - can be done more effectively window controls

preference initialisation for debug and play modes is more clear
    - removed errant playmode setting (terminalOnError - not applicable)

simplified window management

nicer feedback on rewind slider
2020-11-27 18:31:23 +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
7e18cbbfb8 improved video performance
screen will buffer a small number of frames it can use to smooth out
variations in the speed at which frames come from the emulation

results in better synchronisation for flicker kernels
2020-11-24 23:29:51 +00:00
JetSetIlly
b6a890a9d1 renamed statsserver package to statsview
optional build with +statsview constraint
2020-11-22 12:04:28 +00:00
JetSetIlly
3880066322 added stats server option to debug and play mode
package from https://github.com/go-echarts/statsview
2020-11-21 18:47:33 +00:00
JetSetIlly
d110a08a64 logging of rewind boundary events
result of changing rewind maxentries value displayed correctly in win_control

timer randomised on startup (if preference selected)

changing symbols preference updates disasm window vertical alignment

file selector:
    - scrolls to top on directory change
    - centres on current ROM when first opened

help note for the -state flags (REGRESS ADD)

changed default window position for timer window
2020-11-19 08:21:28 +00:00
JetSetIlly
b712123653 clarified debugger input loop
removed some logical dead-ends

introduced the concept of restarting the input loop. this is important
when resetting the emulation for example. if the machine is reset during
a video cycle then the emulation will resume inside the video inputloop.
however the reset machine expects to be inside a cpu inputloop, causing
havoc. also used to ensure the rewind system works correctly.

restarting the input loop is tricky. it requires a RawEventReturn channel
that works like the RawEvent channel but returns control to the input
loop on completion.

added GetFeature() to gui interface to better support the rewind
subsystem. renamed ReqFeature() to SetFeature(). Added FeatureReqData
type for clarity.
2020-11-17 23:01:23 +00:00
JetSetIlly
bf4c132f37 sdldebug removed
line terminal debugging still works but without a GUI (for now). will
replace with an ASCII GUI and display in the future.

add gui.Stub to ease transition.
2020-10-27 17:53:45 +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
e5e1cd7b0a removed use of os.Exit() and log.Fatalf after registering a deferred function
gocritic linter exitAfterDefer check
2020-10-16 18:52:41 +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
e6e3a63be8 spelling errors in comments (golangci-lint -E misspell --fix)
update Makefile lint target
2020-10-15 22:02:51 +01:00
JetSetIlly
8b705dcff3 reworked how disassembly entries handle symbols
added CartHotspots debugging bus. used by symbols package to get
cartridge symbols information. should be useful for disassembly too

renamed hotspot() functions (in cartridge mapper implementations) to
bankswitch() for clarity

sdlimgui disassembly window shows address labels. disassembly iteration
updated to better support that.

SYMBOL command prints all mirrors for cartridge addresses
2020-10-07 06:58:40 +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
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
c773f4f5d2 added new log test to the regression package
log test records hash of log output

renamed digest test to video test. removed audio testing

added -log output to "regress add" mode. note that this has nothing to
do with the log test. it simply echos new log entries as the appear to
the console, supressing regression progress meters
2020-09-22 19:21:36 +01:00
JetSetIlly
2e0874b4f8 RNG seeder had been commented out for some reason
noticeable in the result of plusrom ID generation

plusrom first initialisation window. no longer need to press return
in nick textinput, clicking the "I'm happy..." button will register
the entered name.
2020-09-21 14:13:59 +01:00
JetSetIlly
18c3aa1c26 more plusrom. better networking
correctly sends PlusStore-ID header with gopher2600 as a fixed nick

fingerprinting of PlusROM

removed -plusrom commandline argument
2020-09-17 21:09:29 +01:00
JetSetIlly
96b023d381 logging package functions now safe to call from different goroutines 2020-09-17 21:08:45 +01:00
JetSetIlly
96e765525c sketched in PlusROM support
very rough currently. race conditions in network access, requires
restructuring.

no logging from network access. again, requires some engineering in the
log package to avoid race errors
2020-09-16 18:28:49 +01:00
JetSetIlly
b76abf69f6 sketched in savekey support
-savekey argument added to play and debug mode

savekey window available in debug menu
2020-09-13 22:31:20 +01:00
JetSetIlly
7e615f40a6 extended state recording concept for regression database
this was a quick addition. it works well but the regression package
could do with an overhaul I think
2020-09-08 18:46:01 +01:00
JetSetIlly
305112ea5b option to echo new log entries to stdout 2020-08-13 16:33:04 +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
4cfd4e3428 reworked cartridgeloader package
clarified error messages from cartridge mapper implementations,
particularly in regard to wrong file sizes
2020-07-22 18:50:37 +01:00
JetSetIlly
dfe89f8634 tv screen never resizes if tv specification has been forced on the command line
crt effects are now optional for playmode with "crt=false"
2020-06-13 12:48:29 +01:00
JetSetIlly
e5b949561b renamed gui.SetFeature() to gui.ReqFeature()
better name to indicate what it is used for
2020-05-26 08:28:15 +01:00
JetSetIlly
4a2e87e416 preference saving of sdlimgui preferences is now performed on command
rather than being part of the Destroy() procedure

sdlimgui.Destroy() was run even in case of panics which would very
likely mean the save preferences procedure failed, leaving a broken
preferences file
2020-05-25 20:51:52 +01:00
JetSetIlly
baa5ed7ae0 performance mode will no longer affect playmode preferences 2020-05-24 21:37:55 +01:00
JetSetIlly
b92a8202ce deprecated old gui interfaces
playmode now uses the sdlimgui playmode, rather than a separate pacakge.
this removes a lot of duplicate code but it should also make it easier
to add support to flip between debugger and playmode on the fly.

bumped imgui-go version to 2.40
2020-05-24 16:33:06 +01:00
JetSetIlly
0b3f7541b8 cleanup and restructure of gui package
moved sdldebug and sdlplay to deprecated package. partly for neatness
but partly with the intention of removing in a future version

refactor and re-comment of sdlimgui package

sdlimgui tv screen window now properly resizeable
2020-05-18 19:47:53 +01:00
JetSetIlly
0c06344116 fixed error handling for GuiCreator interface 2020-05-14 16:06:04 +01:00
JetSetIlly
520c4f3013 added StaticArea interface to cartridges
static data window in debugger

reworked menu system to allow cartridge specific window menus

cleaned up how cartridge RAM information is specified and retrieved

renamed cartridge.Format() to ID() and reference to "cartridge format"
to "cartridge mapping". format is an overloaded word already and it was
confusing.
2020-05-09 09:27:56 +01:00
JetSetIlly
eef022e532 highscore server idea
REST server not finished or published yet so this won't do anything
but it serves as a sketch for future development
2020-05-09 09:27:56 +01:00
JetSetIlly
48dd2f02fd changed "pixelperfect" flag to "crt" 2020-04-21 20:29:27 +01:00
JetSetIlly
aa87e6601f added -pixelperfect option to performance mode 2020-04-11 08:10:13 +01:00