Commit graph

209 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
975a96193d o television
- reworked stability code - a lot of bugs were introduced when I
    added this code originally that manifested in the debugger in
    certain situations
2020-01-05 18:58:31 +00:00
steve
c280063599 o video
- collisions registers are set only when they need to be altered and
    not every video cycle - dramatic increase in performance
    - futures now implemented with a linked list
	* improves performance when number of pending futures is low

o sdltv
    - improved frame limiter (not yet perfect)

o gopher2600
    - run and fps modes correctly report error on failure
    - without checking, I'm pretty sure this was removed in error in the recent past
2020-01-05 18:58:31 +00:00
steve
3d4ecc685e o sdltv
- removed mutex lock and replaced with call to LockOSThread
    - speed increase

o gopher2600
    - profiling when in FPS mode is now optional
2020-01-05 18:58:31 +00:00
steve
52e847a51b o gopher/vcs
- simplified run and stepping frontend to vcs hardware
    - improved fps mode

o television
    - removed extraneous members in headless class
    - corrected setting of visible screen size
2020-01-05 18:58:31 +00:00
steve
21612cb125 o sdltv
- fixed stability detection - increased number of required
    consecutive frames to six.
    - this fixes an issue with the homebrew donkey kong rom under
    certain circumstances.
2020-01-05 18:58:31 +00:00
steve
23bd591752 o gopher2600
- tidy up of command line parsing

o regression testing
    - added regression package
    - implemented simple database to facilitate regression tests
    - uses DigestTV
2020-01-05 18:58:30 +00:00
steve
348ea29939 o ImageTV
- implemented a headless television that can save the last image to a file

o DigestTV
    - implemented a headless television that updates a screen digest
    every frame

o gopher2600
    - added "regress" mode. uses digesttv and will be used as the basis
    of a complete regression testing mode
2020-01-05 18:58:30 +00:00
steve
5b2f51197a o sdltv
- window is now resized according how and when VBLANK is
    switched on and off
    - implemented stability check to limit when window resizing occurs
    - Dragster now works correctly

o television
    - improved how out-of-spec television signals are handled
    - added new request type SETVISIBILITYWHENSTABLE
    - SETVISIBILITY request type now accepts optional second argument
    for whether the screen should be updated when visiblity is true
    (some code paths will deadlock otherwise)
    - updated Signal() interface - now propagates errors correctly

o gopher2600
    - run mode now uses SETVISIBILITYWHENSTABLE
2020-01-05 18:58:30 +00:00
steve
139fdd2ad5 o sdltv
- fixed onclose event
	- close callback is now called
	- this was inadvertently removed sometime between faaf21a99ea6bbe711d258b1785700f8c3f8a9fe
	    and a45d1fcdd0b198f04d9757cd27add880981e1e46
    - improved (slightly) how out-of-spec displays are handled

o regsiter_test
    - tweaked test functions

o futures
    - fixed resolution of individual instances
2020-01-05 18:58:30 +00:00
steve
372743b567 o video
- motion clock now works correctly
    - sprite ticks now called correctly on motion clock
    - vertical delay is now
    - parallel future write buffers
	- one for writes that tick off of the color clock
	- and another one off of the motion clock
	- additionally, each future instance has a ring buffer of length 3
	- 3 seems sufficiently long
    - ball sprite fixed (satisfies stress tests)
    - missile sprite fixed (satisfies stress tests)
    - player sprite fixed (satisfies stress tests)
    - horizontal position of sprite now reflected correctly when HMOVED
    - tidied up MachineInfo() and MachineInfoTerse() of all video elements

o television
    - mask now only drawn if top and bottom are correct
    - this fixes those roms that do not call vsync correctly
    - still not perfect but at least we can now see the screen
    - improved verbose machine info output

o cpu
    - instructions with a WRITE side-effect tweaked

o gopher2600
    - tv not displayed until it can be reasonably assured there will be
    no errors
2020-01-05 18:58:30 +00:00
steve
1a3ff0189f o unfinished changes 2020-01-05 18:58:30 +00:00
steve
cb49bf2afb o disassembly
- dump() now uses a io.Writer interface rather than returning a
     string

o debugger
    - ansi code building now uses strings.Builder
2020-01-05 18:58:29 +00:00
steve
9118ebd304 o cpu
- corrected initial state of break and interrupt disable flags on
	startup
    - result.InstructionData now set as soon as possible in all
	instances
    - corrected RTI implementation
    - corrected RTS implementation
    - implemented some undocumented instructions:
	0x0c skw
	0xb3 lax
	0xc7 dcp
	0x4b asr
    - a homebrew version of pacman (pac-man_4k.bin) now works (up to a
	point; not sure if bug is in the implementation of the new
	instructions or is a video issue)
    - new effect classification "Interrupt" for BRK and RTI
    - instructions_gen program is now more robust

o disassembly
    - added validity check to ParseMemory() function
    - Dump() now uses strings.Builder

o result.Instruction
    - corrected GetString() function
	- function would panic when in videostep mode
	- bug most probably introduced in 58f452cf52343eb27fb495b3b0f6e6675806203f
    - improved output of IsValid()
	- disassembly of problem line is now included as part of the
	    error string
2020-01-05 18:58:29 +00:00
steve
4613bcc4cf o cpu
- marginal speed improvement by converting opcode map to an array
    - changed instructions_gen accordingly

o added benchmarking to repository
2020-01-05 18:58:29 +00:00
steve
ba8e03ab7d o television
- reworked television module(s)
	- SetVisibility()/SetPause() replaced with RequestSetAttr()

o debugger
	- "DISPLAY SCALE n" now works
	- tightening up of command template parsing - more error
	conditions/messages
2020-01-05 18:58:28 +00:00
steve
0da75cc3ef o television
- setVisibility() now takes showOverscan argument
2020-01-05 18:58:28 +00:00
steve
0a8267d7d6 o television
- tidy up how state requests are made
	- added info requests
	- implemented MOUSE info request

o debugger
	- implemented 'LAST DEFN'. prints the definition of the last
	instruction executed
	- STEP now takes optional CPU or VIDEO keywords
	- removed critical sections and replaced with channel
	communication
2020-01-05 18:58:28 +00:00
steve
35e31cccb7 o errors
- refined error package
2020-01-05 18:58:28 +00:00
steve
ec173372c9 o gopher2600
- "mode PLAY" is now a synonym for "mode RUN"

o chip memory
	- implemented PeriphBus interface
	- controller now uses PeriphBus interface
	- panel now uses PeriphBus interface

o hardware
	- consolidated controller and panel packages into peripheral
		package

o assert
	- added GetGoRoutineID function to help with debugging/testing
	- not for general use. it's too slow and in bad taste
2020-01-05 18:58:28 +00:00
steve
d5895261bd o television
- refactored SDL television
	- implemented close window for SDL windows
	- backquote key toggles screen-mode (debug guides on/off)
	- window resizes to fit screen-mode
	- sketched in mouse support for SDL implementation
	   - the intention here is to be able to select breakpoints
	     with the mouse

o concurrency
	- made sure shared memory is locked for all go routines

o errors
	- reworked gopher errors a little
2020-01-05 18:58:28 +00:00
steve
c7ee93312e o debugger
- initisalisation script is now an argument to debugger.Start()
	rather than calling from gopher2600
2020-01-05 18:58:27 +00:00
steve
4e9f48630b o debugger
- added SYMBOL command. searches for address label, returns
		address
	- fixed disassembly output for ROMs without a symbol file
	- improved disassembly a little bit. now attempts to disassemble
		entire of cartridge memory and doesn't bail out of loop
		at first sign of an unimplemented instruction. cpu
		package now returns a ProgramCounterCycled error when
		program counter reads past end of memory

o video
	- tweaked horizontal movement
	- fixed player vertical delay (tested with Pitfall ROM)
	- fixed ball enable detection (0x02 not 0x20. doh!)

o cpu
	- implemented LAX command
	- renamed 3 byte NOP to DOP
	- added program counter information to unimplemented instruction
		error

o gopher 2600
	- error message now returned and displayed in run mode

o
2020-01-05 18:58:27 +00:00
steve
6957a52adc o controller
- added basic controller support
	- uses third-party package:
		- github.com/splace/joysticks
2020-01-05 18:58:27 +00:00
steve
1a59db31d1 o implemented disassembly
- symbol loading
	- printing of disassembly now uses symbols (if available)
	- run mode disasm now works as expected

o errors
	- added GopherError - started to replace calls to fmt.Errorf()
	with instantiations of GopherError

o debugger
	- prompt now shows (brief) disassembly of next instruction to be
	executed
2020-01-05 18:58:27 +00:00
steve
21dbb029f4 o debugger
- improved command parsing, although still lacking in required
	features
	- clear/listing of breaks/traps now handled by CLEAR and LIST
	commands
2020-01-05 18:58:27 +00:00
steve
fb1a07d803 o video
- ball, missile and player sprite types added - tidy up of
	sprite class
	- properties moved from video type to the correct sprite type
	- delayCounter now renamed and reworked as future. it was felt
	that needlessly conflicted with the VCS concept of vertical
	delay
	- completed horizontal movement for all sprite types

o correction of assorted linting errors
2020-01-05 18:58:27 +00:00
steve
6f2ac8efd1 o cpu
- fixed bug caused by RMW version of instructions working on the
	accumulator rather than the memory value via a temporary
	register

o debugger / traps
	- fixed segfault caused by attempting to set a trap for illegal target

o video / playfield
	- fixed bug when writing value to playfield
	- clarified names and comments
	- fixed write delay for playfield registers
2020-01-05 18:58:27 +00:00
steve
b9e3dd9617 o debugger
- debugger can be launched without specifying a cartridge
	- tidied up commands package
	- sketched in filename tab-completion
	- corrected tab-completion comments
2020-01-05 18:58:27 +00:00
steve
3739f89202 o fixed tabcompletion
- panic when list of options is empty

o debugger
	- debugger now initialises with plain terminal
	- other terminals are still specified on debugger.Start()
	- this fixes a bug caused when trying to print error messages
	from a startup script
	- conversion of user input to upper cause is now more selective
	- SCRIPT command added
2020-01-05 18:58:27 +00:00
steve
9d3d9d10ac o debugger
- refactored user interface types and functions - now in ui
	package
	- sketched in tab completion
2020-01-05 18:58:27 +00:00
steve
b5cf097363 o colorterm
- implemented cursor navigation
	- implemented history
	- ansi source file moved into it's own package
	- created easyterm - wraps termios with additional functions
2020-01-05 18:58:26 +00:00
steve
480c60d4f9 o debugger
- implemented traps
	- tidied up breakpoint implementations

o tia / video
	- first pass at playfield rendering
2020-01-05 18:58:26 +00:00
steve
de3c30beda o gopher2600
- cartridge file now required on command line when launching

*** versions prior to this used literal strings to specify the
cartridge, which may or may not exist if previous versions are checked
out of the repository
2020-01-05 18:58:26 +00:00
steve
c19f7c8c39 o video
- completed horizontal movement

o gopher2600
  - added new mode TVFPS, to test perfomance with the SDL TV window
    active
2020-01-05 18:58:26 +00:00
steve
f06d958487 o vcs
- video stepping doesn't callback to debugger when CPU isn't ready (like cpu
		stepping)
	- RIOT now only runs once per CPU cycle, instead of once per video cycle
		timer now runs as expected

o tia/video
	- tidied up sprite types for easier debugging/thinking

o television
	- MachineInfo* now reports on whether tv is performing out-of-spec

o sdl tv
	- added overlays
		- cursor
		- screen boundary
		- pixel guide

o debugger
	- replaced strings.Split(s, " ") and a small amount of post-processing,
		with a single call to strings.Fields() - I've just discovered it.
	- added STEPMODE command
	- STEPMODE VIDEO will now print video step result (what it can of instruction
		result)
	- implemented script loading and running - no SCRIPT command just yet though
		this is intended for initialisation for the time being
	- added VERBOSITY and DEBUGGERSTATE commands

o cpu
	- better, more complete, printing for instruction result

o sprite/drawSig
  - counting drawSig the wrong way, causing pixels in sprites to be
    flipped horizontally
2020-01-05 18:58:26 +00:00
steve
1916a556fe o color terminal
- improved ansi color
  - moved ui package to debugger/colorterm

o debugger
  - replaced SHOW and HIDE commands with DISPLAY command
  - DISPLAY command takes optional argument OFF
  - replaced CLEAR BREAKS command with BREAK CLEAR

o sprites
  - improved MachineInfo() messages
  - ball sprite now ticks/pixels correctly

o debugger/breakpoints
  - tidied up breakpoints implementation
2020-01-05 18:58:26 +00:00