Commit graph

171 commits

Author SHA1 Message Date
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
steve
6edf4bbb09 o debugger
- added CARTRIDGE command

o cpu
    - redid/clarified test for post-indexed-indirect addressing

o tia
    - sketched in audio package
    - altered video package and tia to make sure it fitted in correctly
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
97446a6293 o television/headless
- fixed how we note when VBLANK is turned on
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
6f565a228d o debugger
- fixed tab completion array error
2020-01-05 18:58:31 +00:00
steve
cc137ab542 o cpu
- fixed number of cycles in definition for instruction b7 (lax)
    - fixed memory violation in instruction.GetString()
2020-01-05 18:58:31 +00:00
steve
888904cd1c o cpu/register
- corrected how overflow is assessed in Add operation
    - simplified Subtract operation
2020-01-05 18:58:31 +00:00
steve
42afb463e8 o imageTV
- fixed setPixel() signature
2020-01-05 18:58:31 +00:00
steve
3062515254 o headless tv
- recording of when vblank is turned off/on has been refined
    - this fixes Custer's Revenge which turns vblank off mid-screen, and
    then back on again.

o sdl tv
    - no longer plots pixels if vblank is off within the play area
    - unless masking is turned off
    - fixed stability detection - once a stable number of scanlines has
    been detected the emulation sticks with it. this prevents the play
    window from being resized.
    - Plaq Attack turns off vblank a scanline "late" sometimes - this
    causes the image to bounce - this has now been fixed (note that the
    bounce still occurs when the screen is unmasked; although this is
    arguably the correct behaviour for that mode)

o cpu
    - added "indexed zero page x" version of undocumented "lax"
    instruction
2020-01-05 18:58:31 +00:00
steve
208ee69977 o cpu
- fixed PLA instruction
    - if accumulator was loaded with a 0 from the stack, status flags
    were not altered [fixes Tennis]
2020-01-05 18:58:31 +00:00
steve
d14370a251 o panel
- fixed the value written by SWCHB
2020-01-05 18:58:31 +00:00
steve
100591759a o debugger / watches
- fixed watches match value condition
2020-01-05 18:58:31 +00:00
steve
4f15a18075 o cartridges
- added support for basic bank switching for 8k, 16k and 32k
    cartridges
    - improved how 4k and 2k cartridges are handled
2020-01-05 18:58:31 +00:00
steve
f3ee8df037 o video
- fixed issue with Keystone ROM while not breaking regression tests
    - I don't believe for a moment that this is a perfect solution but it makes sense in the context of that ROM.
2020-01-05 18:58:31 +00:00
steve
dcf31a379a o debugger
- added the concept of MachineInfoInternal - which is meant to be
    provide deeper and probably inaccessible insight into the emulation
    - added to accomodate new "TIA HMOVE" command
    - retrofitted "TIA FUTURE" in the same way
2020-01-05 18:58:31 +00:00
steve
a53d2ace76 o sprites
- tidied up HMOVE implementation in sprite objects
    - added more information to MachineInfoTerse() implementation for
    sprite objects
2020-01-05 18:58:30 +00:00
steve
520bfb9b56 o debugger
- color terminal input loop now responds to gui events correctly
    - fixed debugger/memory layer
    - debugger/memory layer also now searches cartridge specific symbols

o television
    - altered semantics of status requests (for clarity)
    - added Reset() to television interface
    - HeadlessTV implements Reset()

o regression testing
    - now shows complete paths to cartridge file
    - fixes confusion in regression output when cartridges with the same
    name appear in different folders

o video/future
    - rerolled future group Tick() function
2020-01-05 18:58:30 +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
d27f1d99ad o sdltv / headless
- moved pixel decoding to Signal() function of headless type
    - added HookSetPixel() to headless
2020-01-05 18:58:30 +00:00
steve
37aeb96bfe o tia
- reverted motion clock timings from 480ff22670eb8898b0d15d5f884257232db584bf
    - this visually breaks Keystone Kapers ROM again but this was
    definitely not the right solution because the fix broke both Yar's
    Revenge and the stress-test-cards.

* I really now need to implement automatic regression tests

o debugger
    - implemented grepping of disassembly
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