- 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
- 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
- further fixes to SBC
- in addition to 573984396ccd8296d6fd8da2c05a61adea532b035
- previous fix neglected to take into account subtraction of value=0
and carry=0 (which means -1)
- tweaked motion clock times (fixes Keystone Kapers ROM)
- added delay to setting of COLUBK (fixes Keystone Kapers ROM)
o sprite
- machine info functions now report the number of cycles remaining
until reset
- 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
- 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
- removed sanity-panic from future write schedule() function
- this is to keep a BRK command from causing a panic when pushing
onto an extended stack
- i'm pretty sure the sanity-check is not needed
- implemented BRK and RTI instructions - not fully tested
- tidied up when NoSideEffect is checked
o debugger
- fixed breakAndTrapCallback
- fixed instruction result validity check crash caused when
instruction step resulted a runtime error
o cartridge
- added support for half-size cartridges
- tidied up error handling
o various commentary cleanups/clarifications
o move test files to test/ directory
- implemented RESMP0/1
- gave the trigger a 2 video cycle delay but I'm not sure if
this is necessary
* Yar's Revenge now works
o polycounter
- fixed polycounter testing routines
- implemented Sync()
- nailed playfield rendering
- I couldn't find a delay value for playfield-writing which
satisfied the ROMs I was testing with:
* Flappy
* Adventure
* Bezerk
- by making sure we use the initial playfield-pixel value for
the duration of the four video cycles, even if playfield data
is changed, then a delay value of 4 satisfies the test ROMs
- I'm now wondering if this idea is applicable to sprite
rendering - a simple rule, rather than the crufty logic I've
been experimenting with
- split Tick() into TickPlayfield and TickFutureWrites()
- fixed SBC command
- it *was* taking 2's complement and passing to the ADC operation
with an inverted carry flag
- the correct behaviour however, is to take 2's complement only
of the operand if carry flag is true; otherwise, we need to take
1's complement only
- in either case, we pass a carry flag of false to ADC
- we hadn't spotted this because in the tests we hadn't used a
carry flag of false when subtracting past zero
UNFINISHED
more tweaking of video sprites - trying to normalise everything
so there's no special conditions
- removed ColorClock type - color-clock is now just an instance
of a polycounter within video type
- implemented motion clock - this seems to fix a lot of
positioning problems
- writing of player data and the enable bit for missile and ball
sprites is now delayed correctly
- this seems to fix the timing problem related to the writing of
player data
- NOTE that there are still visual issues that are not resolved
by this realisation but it brings us closer to a correct
emulation
- 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
- 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
- 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
- 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
- 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
- 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
- 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)
- 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
- "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
- 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