Commit graph

197 commits

Author SHA1 Message Date
steve
b51cfbb057 o debugger
- a recent refactor caused the vcs to initialise with the basic
    television rather than the sdl gui/tv
    - this meant that the sdl implementation of MetaSignal was not being
    called

o basic television
    - scanline extension corrected

o errors
    - messages corrected
2020-01-05 18:58:33 +00:00
steve
e18f17ca37 o regression
- 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
2020-01-05 18:58:33 +00:00
steve
c36459e1d2 o recorder/playback
- 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
2020-01-05 18:58:33 +00:00
steve
05080b510b o regression
- fixed regress bug caused by key dereferencing
2020-01-05 18:58:33 +00:00
steve
1073c53724 o performance
- 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
2020-01-05 18:58:33 +00:00
steve
6272b90892 o debugger/script
- 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
2020-01-05 18:58:33 +00:00
steve
61c39d5a93 o regression
- 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
2020-01-05 18:58:33 +00:00
steve
609ab331a2 o regression
- tidied up regression database operation
    - removed UPDATE option (for now). it's probably never needed but we
    can add it again if it's ever needed
2020-01-05 18:58:33 +00:00
steve
218c3d7823 o recorder
- digest tv support added to recorder/playback module
2020-01-05 18:58:33 +00:00
steve
99d04c747b o debugger
- 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
2020-01-05 18:58:33 +00:00
steve
3d4dd9aec8 o commandline
- fixed bug caused by singular optional arguments
2020-01-05 18:58:33 +00:00
steve
599d9a5b0a o panel
- implemented recording and playback of panel events (from all
	sources)

o keyboard events
    - keyboard can now act as a controller (for player 0)
2020-01-05 18:58:33 +00:00
steve
468d34fdc5 o television
- renamed HeadlessTV to BasicTelevision
    - imagetv and digesttv moved to a single package (called renderers)
    - for example, an SDL GUI and a digestTV instance can now use the
	same BasicTelevision instance
    - hooks now implemented as a Renderer interface
    - simplified GetState() interface

o debugger
    - debugger now initialises an instance of digestTV, using the same
	underlying BasicTelevision as the SDL GUI
    - added DIGEST command
2020-01-05 18:58:33 +00:00
steve
102f9813d7 o debugger
- commands
    - removed RECORD command. the functionality is now part of the
    SCRIPT command

o commandline
    - bugfixes
2020-01-05 18:58:33 +00:00
steve
47b59fedad o renamed scribe package to recorder
- fits in better with what it's being asked to do
2020-01-05 18:58:33 +00:00
steve
d18caa86da o Ports/Controllers
- updating SWCHA does not now clobber the entire register, only the
        nibble for the controller being strobed

o playmode
    - default recording name now includes seconds
    - recording doesn't start until cartridge has been inserted (so if
	the cartridge fails to load there is no useless recording file left
	over)

o memory / periphbus
    - PeriphWrite simply writes straight to memory, rather than through
	a channel
    - work on how controllers are implemented means this is no longer
	necessary.
2020-01-05 18:58:33 +00:00
steve
fe98896706 o gopher2600
- asking for help without a mode now shows available modes
2020-01-05 18:58:32 +00:00
steve
d04462a0fc o scribe
- added recording and playback of controller input

o cpu
    - cpu now correctly propagates errors from video cycle callback
2020-01-05 18:58:32 +00:00
steve
953b709fd9 o controllers
- alternative imlpementation of yesterdays changes
    - this is cleaner and makes more sense
    - removed race error in splace controller
2020-01-05 18:58:32 +00:00
steve
c5edff64e7 o contollers
- generalised controller support
    - opened the way for different stick implementations, including
    scripted playback
2020-01-05 18:58:32 +00:00
steve
b03b64e527 o metavideo
- reimplemented system monitor as metavideo
    - system monitor was trying to be too general to the point where it
    was confusing
    - refactored sdl implementation accordingly

o debugging / script
    - "script capture" reclassified/renamed as "script recording"
    - i want to use capture to refer to the capturing of control input
    (joystick, etc.)

o assert
    - moved assert package to be a sub-package of hardware/cpu/register
    - not required anywhere other than the test packages for cpu and
    register
2020-01-05 18:58:32 +00:00
steve
e58e6b15eb o disassembly
- stores string representation of disassembly rather than instances
of result.Instruction
    - it was felt that the context of result.Instruction maybe
misleading if probed after the disassembly process (it may not be
obvious to a user of the disassembly package what the limitations are)

o commandline
    - in all instances, error messages containing placeholders now
contain descriptive messages rather than the placeholder itself

o debugger
    - added analysis option to CARTRIDGE command
    - lots more work required on this
2020-01-05 18:58:32 +00:00
steve
d06d49eae0 o disassembly
- added a "linear" disassembly that deciphers every address in the
cart as though it were a valid instruction. this solves the problem with
the original disassembly algorithm (now called flow) caused when the
debugger reaches an area of the code that cannot be found with the flow
mechanism.
2020-01-05 18:58:32 +00:00
steve
cf90552b0a o breaks/traps
- added witchspace as a target - purely to help me debug the
disassembly process but at the same time, it has improved how targets
are defined.
2020-01-05 18:58:32 +00:00
steve
699e4ae180 o debugger / commandline
- added debugger commands index
    - help command now shows usage for individual entries
2020-01-05 18:58:32 +00:00
steve
46b8173b7b o replaced debugger/input package with debugger/commandline
- improved how command template are compiled
    - verification and tab completion is now more robust
    - missing repeat groups

o debugger
    - extended PLAYER and MISSILE commands
    - combined STICK1 and STICK2 into one STICK command
2020-01-05 18:58:32 +00:00
steve
a9b313bbcc o reworked how GUI events are sent, received and handled 2020-01-05 18:58:32 +00:00
steve
387253b547 o SDL TV
- tv now responds to function key presses for reset, B&W, etc.
    - this applies to play/run mode as well as debug mode
2020-01-05 18:58:32 +00:00
steve
50e452b4cf o debugger
- parse input routines improved
    - empty input will repeat the last step command (eg. STEP FRAME)
    - added CAPTURE command
    - user input is copied to a script file. suitable for future
	playback with the SCRIPT command
2020-01-05 18:58:32 +00:00
steve
3205951fe1 o cpu
- added XAA command

o debugger
    - renamed ui package to console package
    - GUI instance now passed to NewDebugger, rather than created
    internally

o regression
    - begun refactor
2020-01-05 18:58:32 +00:00
steve
8ddaec1233 o debugger
- scripts now pass through input loop, allowing commands that
    control the emulation (like RUN or STEP) to be effective
    - reworked ONSTEP and ONHALT commands
    - added STICK0 and STICK1 commands

o memory / pia
    - improved RAM debugging output
2020-01-05 18:58:32 +00:00
steve
7da83ecade o debugger / breakpoints
- fixed duplicate detection
    - fixed parsing of breakpoint values >16bit (I misread the
      ParseInt() documentation)

o disassembly / commands
    - GREP results now provide context

o gopher2600
    - initscript now definable on the command line

o tia / playfield
    - implemented "scoremode"
    * I'd totally forgotten about this 2600 feature and was trying to
    understand why the "28c3 intro" demo wasn't showing the atari logo
    at the top of the screen. at the same time I had stumbled across
    SvOlli's Revision 2013 lecture where he mentions it. lucky. I would
    have spent a couple of hours probably, scratching my noggin.
2020-01-05 18:58:32 +00:00
steve
6d597c5035 o errors
- renamed GopherError to FormattedError
    - reading files now handled by ioutil.ReadAll(), rather than
    os.Read()
2020-01-05 18:58:32 +00:00
steve
5a223794d4 o gui
- separated gui specific elements from television package
    - sdl implementation moved to gui package
2020-01-05 18:58:32 +00:00
steve
36f63c8ace o tia / video
- HMOVE corrected such that the test code in the "games that do bad
     things to HMOVE" post is correct
2020-01-05 18:58:32 +00:00
steve
eace335cce o sprite
- fixed bug that caused sprite position to be misrecorded
    - caused by reckoning the effects of HMOVE from the reset position
    rather than the current (possibly already adjusted) position

o debugger / colorterm
    - implemented HOME/END keys for input loop

o monitor / sdltv staterecorder
    - generalised colour assignment
    - not perfect but more flexible

o debugger / breakpoints
    - parsing of negative numbers now allowed
2020-01-05 18:58:32 +00:00
steve
0725530e1c o colorterm / easyterm
- UserRead() fixed such that inputting of certain characters (% and $)
    is reflected correctly

o debugger
    - improved commentary surrounding ctrl-c handling

o system monitor
    - added monitor package to debugger
    - this replaces the call to TV.MetaSignal in the TIA
    - it is thought that this approach will be more flexible
    - plus, it removes debugging specific code from the core emulation

o television
    - renamed a few things so that they better describe new concepts
    introduced with the system monitor package
2020-01-05 18:58:32 +00:00
steve
757a9b1f16 o debugger / television
- debugging colours can now be selected with a single keypress
    - television scaling increase (=) and decrease (-)
    - added hblank indicator when screen is unmasked
    - metasignals overlay can now be toggled with the keyboard
2020-01-05 18:58:32 +00:00
steve
c1a1d3ef5d o television
- improved debugging output
    - introduced meta-signals - can now show when HMOVE, RSYNC and WSYNC
	are activated
    - flipping between regular and debugging colors can now happen at
	any time
2020-01-05 18:58:32 +00:00
steve
00873d6308 o debugger
- DISPLAY command only opens the display if it is called without
	additional arguments.
    - for example, calling "DISPLAY DEBUGCOLORS" does not cause the
	display to appear.
2020-01-05 18:58:32 +00:00
steve
8ebc46cc6f o sdltv
- keyboard events now selectively handled by callback function, rather than the in the guiLoop
    - benefits to this approach:
	* more flexible - debugger can react differently to keyboard
	    events than, for example, the run mode frontend
	* because the guiLoop is running in a different goroutine there
	    are limits to what it can do to the SDL window. using a
	    callback is the first step in synchronising the goroutines
2020-01-05 18:58:31 +00:00
steve
d05ba0c823 o breakpoints
- better duplication detection
    - listing of breakpoints now prints target value in the targets
	canonical format

o debugger
    - fixed how debugger reacts to SDLTV right mouse button - not
	duplicating breakpoints

o tia / video
    - calculation of sprite pixel corrected
    - reworked code for clarity
    - moved TIA HMOVE into its own package to prevent circular imports
	between the TIA tia and video packages.

o sdltv
    - improved cursor display - the currently affected pixel is now
	visible "through the cursor"
2020-01-05 18:58:31 +00:00
steve
736cd5bb0b o tia
- debug colours (just the players for now)
    - hmove type now uses a latch to keep track of when hmove event is
	over, rather than the rather clumsy and prone to error method we
	had previously. this goes someway to fixing a bug in the
	emulation caused by late HMOVEs
    o polycounter
	- modified MachineInfo() output
	- updated test routines to reflect changes to MachineInfo output

o debugger
    - added DEBUGCOLORS toggle to DISPLAY command
    - PLAYER command in verbose mode now prints player 0 and player 1
	side by side for easier comparison
    - similarly for MISSILE command
    - verbose PLAYER output now includes commentary of the sprite size
	setting
    - similarly for MISSILE command
    - corrected initialisation script error output
    - removed tab completion time limit - can now cycle through options
	until another key is pressed

o television
    - improved screen size detection and stability routines
    - this currently breaks the fix we had in place for Plaque Attack
	but I think we can probably fix that some other way
2020-01-05 18:58:31 +00:00
steve
3995e539f2 o memory
- renamed some files in memory package
    - removed unused functions / parameters
    - corrected location of TIM*T registers

o cartridge
    - implemented cartridge RAM
    - now working (not withstanding other bugs)
	* Crystal Castles
	* Donkey Kong (Homebrew)
	* Gauntlet (Homebrew)
    - bank switching now occurs on write as well as read
    - now working
	* MsPacman
2020-01-05 18:58:31 +00:00
steve
2358423ace o debugger
- reworked PEEK and POKE commands
    - reworked watch parsing
    - added HEXLOAD command
2020-01-05 18:58:31 +00:00
steve
8332dc2ab5 o video
- write delay for NUSIZ registers
    - fixes visual bug in Real Sport Boxing
2020-01-05 18:58:31 +00:00
steve
e1103db8db o televsion
- removed TVState construct
    - GetTVState now returns an interface{}
    - after second thoughts TVState was too clumsy. debugging targets
	can be constructed with the genericTarget struct
    - the only thing we've lost for now, is automatic consistency of
	labelling but I think that can be solved more elegantly

o debugger/targets
    - parse targets now wraps GetTVState results in genericTarget struct

o panics
    - all panics now follow the same pattern - no mixture of Sprinf()s
    and Errorf()s

o disassembler
    - parseMemory now reaches all areas of the ROM
2020-01-05 18:58:31 +00:00
steve
f53592df13 o disassembly
- reworked disassembly routines so that it works better with
	multi-bank cartridges.
    - unfinished

o cpu
    - reworked cpu testing routines
    - NoSideEffects has been changed to NoFlowControl
    * this means that memory is now written
    * it is intended that NoFlowControl CPU instances be supplied with a
    memory shim that can filter out write addresses as appropriate
    * this was done so that we can see switching of cartridge banks
2020-01-05 18:58:31 +00:00
steve
f3eb00f40d o television
- better solution to changes in 8214ba8a0542ed21e70411e6b0b2c1d3d30808de
    - cursor positioning now correct in all instances
2020-01-05 18:58:31 +00:00
steve
297391c488 o disassembly
- added support for multibank cartridges

o breakpoints/traps
    - bank changes are now a valid target
2020-01-05 18:58:31 +00:00