Commit graph

1240 commits

Author SHA1 Message Date
steve
b39ff8ce60 o TIA
- fixed timer so that it updates INTIM on the first cycle
	- fixed pixel ordering

o cpu definitions
	- fixed definitions
	- branch insructions now flagged as page sensitive
	- store instructions flagged as page sensitive

o debugger
	- added instruction result verification
2020-01-05 18:58:28 +00:00
steve
9179c79ac2 o symbols
- search symbols now searches all tables and returns table id of found table

o memory
	- renamed some files in memory package
	- MapAddress now takes additional argument, readAddress -
	used to apply the additional readMask is necessary
	- removed readMask application from chipbus.Read() functions
	- more convenient for readMask to be in MapAddress only

o debugger
	- fixed DEBUGGERSTATE command
	- ONHALT and ONSTEP now has optional ECHO argument
2020-01-05 18:58:28 +00:00
steve
786fb5b254 o 6502 instructions
- added 0x80 - immediate 3-byte nop

o vcs
	- reset operation now resets TIA and RIOT in addition to CPU

o cpu
	- reset attempt mid-instruction now returns suitable error
	instead of panicking

o debugger
	- fixed breakpoint/trap check when it occurs mid-instruction
	- broken in 6045b9a9b65d623800b8e386e06fe0fdfb71998f
	- fixed PEEK command
	- fixed SYMBOL command
	- SYMBOL command now takes optional ALL argument - prints every
	mirror address of the resolved symbol
2020-01-05 18:58:28 +00:00
steve
74d8f6e297 o debugger
- implemented DROP command
2020-01-05 18:58:28 +00:00
steve
bdd330bc2f o television
- tv breakpoints now set with right mouse button, not left
	button

o debugger
	- moved top-level command parser into commands file
2020-01-05 18:58:28 +00:00
steve
3a20e6d394 o breakpoints
- reworked breakpoints so that we can AND conditions together
	- breakpoints are now checked every video cycle regardless of
	current step mode - this is required if we want to break on
	attributes like Horiz Pos (HP) which may jump over values in CPU
	step mode
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
e96f052c1f o debugger/input
- parser package renamed to input
	- tokeniser moved to input
	- command templates are now specified using a simple markup
	language
2020-01-05 18:58:28 +00:00
steve
d744e6229a o debugger
- better lexing/parsing of command input
	- break/trap on instruction effect (read, write, etc.)
	(we had to implement a more flexible way of satisfying the
	target interface for this. it works but it's a bit ugly)
2020-01-05 18:58:28 +00:00
steve
d569fb4bca o targets
- started to generalise targets a little. preparation for future
		changes

o register
	- split register operations into a separate file - for clarity
2020-01-05 18:58:28 +00:00
steve
0c4b644a4a o vcs
- there is now a way of operating the vcs with a "monolithic"
	cpu; that is, for the vcs to cycle the TIA only when the CPU has
	completed an instruction, rather than after a every cycle
	- no purpose to this except to compare correct and incorrect
	behaviour
2020-01-05 18:58:28 +00:00
steve
09c90b72f7 o tia/video
- removed unnecessary new*() methods
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
10a768c863 o video
- more timing tweaking - still not correct
2020-01-05 18:58:28 +00:00
steve
9f4ca060cd o debugger
- fixed ctrl-c handling again. stupid race condition between the
		go routine and setting of the "running" variable to true
2020-01-05 18:58:28 +00:00
steve
8ced225257 o tia
- fixed RSYNC
	- tweaking timings
2020-01-05 18:58:28 +00:00
steve
cb67625001 o debugger
- more reliable ctrl-c handling (increased size of signal
		channel)

o player sprite
	- fixed drawing of double/quadruple size sprites so that HMOVE
		works correctly for them
2020-01-05 18:58:28 +00:00
steve
f063aeadfb o tia
- adjusted initial value of colorClock so that machine works
		correctly before a call to RSYNC
2020-01-05 18:58:28 +00:00
steve
404430fe08 o debugger
- implemented DISASSEMBLE command
2020-01-05 18:58:28 +00:00
steve
76b5d9503a o panel
- implemented panel

o controller
	- mapped back and start button on xbox controller to select and
		reset buttons on panel
2020-01-05 18:58:27 +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
7142d2d989 o traps
- can't add more than one of the same trap type

o symbols
	- rearranged symbol definitions
2020-01-05 18:58:27 +00:00
steve
37504437d4 o cpu
- fixed decimal mode subtraction and addition
2020-01-05 18:58:27 +00:00
steve
913727407a o symbols
- added universal symbols file
	- chip memory definitions no longer include symbol definitions.
		they use the new universal symbols file

o cpu
	- moved instruction_result from cpu package to result package

o disassembly
	- style parameters moved to new result package

o memory / debugger
	- improved PEEK command implementation
	- can now use symbolic addresses
2020-01-05 18:58:27 +00:00
steve
06cca94acd o disassembly
- if no cartridge file has no symbols file then the standard VCS
		symbols are used

o cpu
	- fixed "noSideEffects" version of JSR
2020-01-05 18:58:27 +00:00
steve
34ca0409a9 o television
- performance improvement: color definitions are now a plain
		array not a map
	- introduced SignalAttributes type. more convenient

o video
	- tidied up collisions code
2020-01-05 18:58:27 +00:00
steve
ff98bd9362 o memory
- removed chipWriteRegisters map. ChipWrite() now requires a
	uint16 value, given by the "chip write registers" enumerations.
	significant speed increase due to no longer having to access a
	map multiple times every video cycle
2020-01-05 18:58:27 +00:00
steve
0d1d4a0f97 o debugger
- added ONSTEP command. similar to ONHALT but run every step
	- implemented LAST command. debugger no longer runs the result
		of the last instruction unless it is part of the ONSTEP
		command sequence
	- fixed printing of HEX. step mode video no longer crashes if
		print style includes hex.

o video
	- sketched in collisions support

o cpu
	- BIT instruction fixed (zero flag is result of AND with
		accumulator but sign and overflow flags are set with
		reference to the value from memory)
2020-01-05 18:58:27 +00:00
steve
7792e4efb7 o controller
- added up/down for player 0

o video
	- fixed player sprite reflection
2020-01-05 18:58:27 +00:00
steve
63fa147a16 o debugger
- ONHALT now performs the new command sequence straight away
	- added RAM command
	- HEX output alongside disassembly
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
b2a0c9b9ea o video sprites
- fixed sprite rendering

o cpu
	- fixed zero/negative detection for non-accumulator versions of
		INC and DEC
2020-01-05 18:58:27 +00:00
steve
ef47c46803 o cpu
- implemented decimal mode (for ADC and SBC)
	- overflow flag not affected (yet?)
	- fixed how binary mode SBC reacts to an operand of zero
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
9df59c9aea o player sprite
- fully implemented player sprite

o playfield
	- fixed reflection indexing

o debugger
	- tweaked command parsing

o corrected CPU instruction definitions
	- 0x19 was missing (mistakenly specified to be 0x10)
2020-01-05 18:58:27 +00:00
steve
a16ca04b12 o video
- implemented trigger lists for missile/players
	- implemented player sprite
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
c99f379f20 o memory
- improved/clarified comments
	- removed clear() functions - never needed
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
3b29679983 o colorterm / input
- fixed delete key detection
2020-01-05 18:58:27 +00:00
steve
7fa4861f5c o playfield
- fixed write delay
	- added PLAYFIELD command in debugger

o debugger
	- fixed prompt when in video step-mode
	- fixed STEPMODE parsing
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
f6427d23d6 o debugger
- sketched in HELP command
2020-01-05 18:58:27 +00:00
steve
30f3abf90a o debugger
- finished basic tab completion
	- doesn't support command arguments but is does support option
		cycling and timeouts
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