added PAL60 specification. even though it isn't a real specification it
is more convenient and provides better user feedback
moved FrameInfo into frameinfo package, now called Current as in
frameinfo.Current
clarified storage of requested specification by the television:
how the television is probed for the specification has changed, in
particular the current spec is retreived via the GetFrameInfo()
function. in fact, this was how most other packages did it but there
also existed a GetSpecID() which was uncessary
GetReqSpecID() and GetCreationSpecID() removed, replaced with
GetResetSpecID() and IsAutoSpec()
simplified SetSpec(). removed the force argument
removed reset option for vcs.AttachCartridge()
clarified how VideoBlack and ZeroBlack are related in the 2600
ZeroBlack is now a generated and cached colour for both legacy and new
colour models, rather than an implied zero RGB value
the result of this is that VideoBlack and ZeroBlack are now affected by
colour adjustment in the same way, as it is on real hardware. this
happens because the 2600 outputs 0.0 IRE for VideoBlack and not 7.5 IRE
as you might expect. the most immediate recent change to colour
generation used a VideoBlack value of 7.5
we don't yet emulate RGB mods that do use 7.5 for VideoBlack
legacy PAL palette corrected so that the four VideoBlack values are zero
default setting legacy adjustment settings altered to compensate
NTSC/PAL Colour Signal section of the television preferences are
now drawn disabled if legacy colour model is active
I think the new colour model will cause confusion and there needs to be
a much more solid grounding before it becomes the default
legacy colour model can be colour adjusted. adjustment settings for
legacy and non-legacy are kept separate
this keeps things simple and should also encourage people to use the new
model
now that the colour adjustment only applies to the new colour model the
default values for brightness, contrast, saturation are once again set
to none neutral values
brightness adjusted by addition rather than multiplication
value of hue0/lum0 set to 7.5%. I've heard conflicting opinions that
hum0/lum0 outputs at 0% which is what the previous version did, but I'm
not sure that's really true
ie 'Y * Saturation * sin(phi)' is now 'Saturation * sin(phi)'
this results in more vivid colour throughout the luminance range, which
I believe is more correct
changed generation saturation and contrast ranges
bright/contr/sat default value set to 1.0 and hue value to 0.0
realtime audio mixers, like SDL audio implementation, are expected to
self-regulate. this makes more sense and the Regulate() idea didn't work
as expected
SDL audio now repeats or drops short bursts of samples as they are
received, in order keep the queue inside a generous window. this seems
to work very well and far better than the previous efforts at regulation
there could maybe be more thought around how many samples should be
repeated or dropped such that it isn't audible
the difference between a realtime mixer and a regular mixer is now just
the SetSpec() function. I'll consider adding the SetSpec() function to
the regular mixer interface and dropping the realtime mixer altogether
the current scanline was used when it should have been the
adjusted total scanlines for the fied. usually the two are
the same when newFrame() is called but will not be when
frame is unsynchronised AND the immediate desync option
is disabled
also tweaked conditions for natural flyback
television signal split into video and audio signal. The audio signal is
only sent then a new sample from the TIA is ready
realtime mixer concept change. the mixer can be informed of a change of
TV spec. this allows the realtime mixer to make an informed judgement
about the required sample rate
the sample rate is unlikely to be ideal however unless the number of
scanlines in the TV image is the same as given in the basic TV
specification (ie. 262 lines for NTSC, 312 for PAL). because of that,
the realtime mixer can also indirectly regulate the rate of calls to
SetAudio(). the Regulate() function is called by the television which
then alters the call frequency to SetAudio() depending on the regulate
value. this effectively keeps the audio buffer nicely filled - neither
too long which would be audibly laggy, or too short which would result
in clipped audio
the values that control the regulation in both the sdlaudio package and
television package will need tweaking to find the best values
changed how 'force' parameter for television.SetReqSpec() works
debugger TV Screen shows drawing pixel in all instances, even in areas
that are "covered" by no-signal area
I used a hue "value-1" as the basis for the phi calculation. however,
it makes much more sense to use "value" and then rotate by 33° (YUV to
YIQ conversion)
clarified (comments etc.) how the base phi value is adjusted before
taking the sin/cos, for both NTSC and PAL generation
change of phase slider in preferences window rounds the value to one
decimal place before saving to prefs value. this means that matching to
the preset value can be achieved
the RGB value in the screen texture is gamma corrected but some effects
work best with YIQ values. converting to and from YIQ requires undoing
and redoing the gamma correction
the defaults work well for all three colour methods
all tv specifications use the same gamma value
removed computed CRT bevel effect. removed CRT flicker effect
reverted vignette effect changes
brightness of interference effect regulated to match brightness when
interference effect is disabled
refined scanline/mask effect. now works on Y channel rather than the RGB
perlin noise no longer used as part of the interference effect. it's
still used to add a small amount of noise to help remove banding, but
it's always there
added YIQ interference
the aberration effect is also always appled. the difference with this
commit is that the when the effect is disabled, the intensity of the
effect is simply reduced to zero. this isn't the same as no applying
the effect at all
the aberration effect accumulates two pixels into one. previously an
average was taken but allowing the intensity to increase slightly is
effective and has been kept at 70% (rather than 50%)
black correction shader folded into crt effects shader
increased base saturation during colour generation
tweaked screen offset for solidstate bevel
increased magnitude of vignette effect
colour generation uses clock values as appropriate for NTSC and PAL.
special treatment of PAL-M is not considered yet (for colour
generation), it's just the NTSC palette, but we could add that in the
future relatively easily
NTSC cache used for PAL grayscale value. this clearly slows down PAL
colour generation (recalculation of uncached values) and wrecks NTSC
caching for NTSC ROMs loaded after a PAL ROM
removed tv_color fragment shader. this simplifies the render path
considerably. there's a little extra load on the CPU when retreiving
colour values from the cache and a little more when generating (which
only happens once on startup and when TV controls are changed) but it's
very minimal
SECAM colours generated rather than using a precomputed RGB palette
preferences for TV brightness/contrast/saturation/hue moved to colourgen
pacakge
removed the saveOnFirstUse argument. this means the EnableSaving()
function added in the previous commit can be removed
the reason for adding the EnableSaving() was so that we could intialise
the ColourGen type without writing to a preferences file. this was a
problem for testing because it meant that the global ColourGen
initialisation created a preference file for each test, which is
definitely something we don't want
there is still the global DisableSaving flag that would ideally be
removed in the future. it's currently only needed by the
debugger_test.go test which initialises a Debugger instance and
indirectly causes the preferences file to be saved on exit
saving for an individual prefs.Disk() can be disabled/enabled. this was
added because colourgen is currently a global instance. this is fine
because all access to it is implicitely race protected. however, because
it's a global instance, testing packages will trigger it to save, which
we don't want (.gopher directories in package directories)
for the global instance of colourgen (in the specification package)
prefs saving is disabled by default
Real Sports Tennis would cause a brief instability during the logo
bounce. the difference in VSYNC is one frame long and shouldn't
affect the stability
the MsPacman VSYNC event (when the bouncing fruit appears) revealed the
error in using the VSYNC history to make a decision
removed the "immediate desynchronise" option
this prevents a visual resizing of the image at the moment when the
screen has synchronised. ie. the resizing happens and is disguised
by the synchronisation process
fixed spelling mistake in television preferences window
all SetPixel() function now set VBLANK pixels to 'VideoBlack' via a call
to GetColor(), rather than setting the RGBA values directly. except the
video digest, which remains a special case
this complete work from the previous commit 68263991f
setting the index field to NoSignal should be enough but some pixel
renderers may choose to still render the signal information
this completes the change started in 3284d9f7
simple was added so that regression database didn't need to change along
with the changes to the television (simple is an older television
implementation rather than anything really new). but now that the
regress package can redux playback files, there is now no need for the
'simple' version
added Replace() to database package
simplified Regressor interface
playback regressor can now be reduxed
regression Redux() now uses database.Replace() instead of separate
Delete() and Add(). this makes sure that the redux entry gets the same
database key once the redux has completed
removed -dryrun option from REGRESS REDUX
removed regression fails log. it wasn't well developed and not a
particularly useful idea
fixed television.SetSimple(). the signal function was not set correctly
calls to Logf() which do no formatting replaced with Log()
calls to Log() with Sprintf() replaced with Logf()
error types sent without use of Error(), taken advantage of new logger
package features
correct construction of wrapped errors in eeprom package
signal history only copied if 'realtime' audio is being used.
the signal history is not required except for mitigations related to
'realtime' audio, so limiting the copy means a marginal performance
improvement for headless operation
TV Signal() implementation split into signalFull() and signalSimple().
the decision as to which is called is made once on instantiation, rather
than on every call to Signal()
small changes to tia/video and arm for clarity purposes
reintroduction of the old idea of indicating whether the screen is
"atari safe" (as per the Stella Programmer's Guide). the indicator is
now a tick icon next to the VBLANK information