main thread now installs a default ctrl-c handler. can be reset if the
run mode provides a better/context specific handler instead.
for example, debugger and playmode already provide handlers. we don't
want the default handler to conflict with it in any way.
the last commit didn't fail as expected (!) so the code has been
polished a little. error return channel from main thread to sub-thread
commentary improvement
makefile: for some reason I had added the -+ flag to the "go build"
-gcflags. I must have misunderstood what it was for
last commit still did not work in MacOS. this is a second attempt.
it will still probably fail but in a different way. it should let us
know if we're on the right track though.
sdl gui events are now serviced in the main thread. previously, the sdl
event had its own goroutine loop. this worked on Linux systems but
didn't seem to work on MacOS
A new interface called gui.EventsLoop has been created. When a gui that
implements this interface has been created (such as sdlplay and
sdldebug), the interface is passed back to the main thread. the
ServiceEvents() function then becomes part of the main loop.
simplified PAL detection. removed remainder of cruft from earlier TV/GUI
implementation. the method was too complex.
Tapper now auto-detects PAL correctly. Chiphead demo likewise
removed gui.ReqSetOverscan. it was ugly and not needed
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
removed fixes previously added to account for Pitfall silences. caused
problems with other ROMs, particularly chiphead demo
added option to PLAY mode that presets window to use overscan area.
prevents excessive window resizing when overscan use is detected.
commentary fixes
- result sub-package renamed to execution
- renamed Instruction type therein to Instruction
o disassembly
- reworked structure of pacakge
- better grep. scope of grep can now be specified
- display sub-package added
- disassemblies now store instance of display.DisasmInstruction instead of a formatted string
o debugger
- ammende GREP to support new disassembly features
- FromMemory() now creates disassembly instance rather than being a
function attached to the type
- comments and documentation
o debugger
- fixed usage of disassembly.FromMemory()
- the reason we went with the old method for FromMemory() was to aid
in how symbol tables were created and pointed to from debug-memory.
however it was dumb and confusing. problem is now solved correctly
- 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
- 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
- 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.
- 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
- 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
- reworked index bug handling in CPU
- fixed slo opcode defintion (wrong addressing mode specified)
o debugger
- added BUG option to CPU command
- debugger now optionally prints CPU BUG messages on the step it
occurs
- implemented ball sprite
- implemented missile sprite
- altered compareHMOVE
o debugger
- TIA DELAY and TIA DELAYS now differ in a meaningul way
- DELAYS shows all queued delays; DELAY just the most recent
- extended metavideo to include ball and missile sprites
o playfield / VBLANK
- write delay increased to two
- VBLANK given a delay of
- both fix homebrew donkey kong
- better HMOVE clock stuffing
- correctly ticking every four clocks
- there is still an issue when hsync counter is at 14 (phase 0)
o vcs
- added commentary to explain how CPU and TIA interact in the
emulation
o player sprite
- delay of one cycle on VDEL
o regression
- fixed adding of playback scripts
- added state option to frame regression
- records CPU-step granularity recording of the TV state
- intended to test for integrity of TV state recording
- feedback from regression entries now crop filenames to just the
last part of the path
- moved database code into its own package
- correctly filters PlaybackHashErrors - results in "failure" rather
than "error"
o gopher2600 / regression
- added VERBOSE argument to REGRESS RUN mode - prints error messages
- added FAIL argument to REGRESS RUN mode - regression test that end
in an error normally cause the sesssion to end. this option forces
it to continue
o RIOT
- removed randomised start value for INTIM
- makes regression tests more reliable
o television
- renamed BasicTelevision to StellaTelevision
- the source file had been renamed already
- fixed command line parsing bug
- default run mode was broken such that flags were not recognised
- bug introduced in bf03447dc79fde2b21d0e9f0c62211ba5f77f601
- seeding of random number generator
* some areas of the emulated hardware start in a randomised
state (not committed yet)
- better argument parsing. better help messages for sub-modes
- reworked basic television
- added AUTO tv type to the command line - switches tv specification
to PAL automatically when visible screen exceeds NTSC limits
- updated all renderer implementation (sdl, digesttv, imagetv) to
handle specification switches
- added progress meter for playback regression types
o errors
- added FatalError type. intended to be used instead of panic()
o limiter
- created limiter package
- moved sdl fpsLimiter to new package
- added HasWaited() function in additio to Wait() function
- fixed bug caused by interaction between basictv and digesttv
- some roms (games_that_do_bad_things_to_hmove) failed playback when
the screen limits changed
- the best solution I could find was to prevent basictv calling
registered renderers once the last possible scanline was reached
- in previous versions, the last scanline was redrawn over and over
until a new frame was ready
- this however, caused a hashing issue in digesttv when playing back
recording input. it is unclear to me why this hashing issue arose.
however, the solution is a more natural response to end of frame
conditions as well as a being a fix for this bug
o regression
- regression top level functions now output to an io.Writer passed
as an argument, rather than to Stdout directly
- playback will now save an image of the current frame (via imagetv)
in the event of playback failure
o television
- NewFrame() and NewScanline() implementations both require a
frameNum and scanlineNum argument
- added performance package
- moved fps() function from gopher.go to new package
- added percentage of full-speed indicator to fps
o gopher2600
- changed FPS mode to PERFORMANCE
o polycounter
- squeezed a little more time out of polycounter by changing the
receivers of some frequently called functions to pointer receivers.
o television / colors
- changed how colors are transalted from signals
- the color specifications are pre-processed in an init() function
- renamed Recorder to Scribe
- any references to script "recording" has been altered
o errors
- some effort expended tidying up error messages display and
construction
- commandline package now uses errors package
o removed panics that would be better served with errors
o removed extraneous calls to fmt.Println and fmt.Printf
- added regression entry listing operation
- added playback regression type
- playback regression makes a local copy of playback script. delete
operation deletes it
- better database key handling
- running of regression tests can now be limited to a list of
specific keys
- commands can now be deemed unsafe
- script recording can handle embedded scripts
- script playback/recording moved to their own package
- videocycle prompt changed
o gopher2600
- improved default command line parsing
o general tidying up
o sdl/imagetv
- wrong error reporting