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
adds a blue tint to the bevel image around the screen. good for
simulating low light environments.
the strength of the bevel reflection is now dependent on the amount
of blue tint
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
window now includes revision information if the build is not a "release"
build
added version.Version() function to help with deciding if build is a
"release". supercedes the global Version and Revision variables in the
version package
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
the inside of the bevel nearest the screen reflects the colour from the
screen. it's not perfect but it's a nice effect and can form the basis
for something better
screen centering inside solid state bevel moved very slightly to the
right
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
we needed more control over the post-change hooks for CRT values. in
particular we wanted the pixel perfect value to call the playscreen's
resize() function when changed. it would be awkward to do that from
a different package
incidentally, the resize() function needs to be called when toggling
pixel perfect mode becaus the CRT and pixel perfect screens may have
different scaling requirements
the bevel requires a bias for the Y scaling that wasn't applied
at program start because the bevel preference hadn't been loaded
you could see the error by resizing the window which forced a
recalculation taking the bevel pref and therefore the bias into
consideration
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
a CRT preview directly in the debugger should be a separate window.
there's no real value in having the debugging information applied
directly to a CRT rendering
there was previously a flyback line but that left a large black area for
most ROMs, with no explanation
sensible tooltip for TV screen when outside of TV frame
removed striping parameters for dbgscr_overlay shader
improved VSYNC/VBLANK reflection colours. distinguished how VSYNC is
indicated in the overlay when VBLANK is active and when it is not
it is likely that CPU performance in the pause state can be improved,
particularly for non-active pauses. but we would need to be careful with
the colourgen package - we want changes to the colourgen prefs values to
show up on the screen even when paused. some sort of trigger from the
colourgen package would work but I'm not sure if the added complexity
is worth it
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
single, flicker and composite replaced with single, double, triple
added a new movement mode (hotkey alt-F12). this tries to recreate the
old composite mode
screenshotting is now much simpler and uses gl.ReadPixels() to capture
the screen buffer as it is displayed
currently include any windows and icons etc that have also been drawn to
the screen
if pixel perfect is disabled and using bevel is enabled, then the curve
and rounded corners amount are fixed values specific to the selected
bevel. currently only the 'solid state' bevel is allowed
set new default values for crt preferences
increased perlin noise value for CRT screen
including the removal of 'ghosting' shader. this was useful for
exagerrating the zookeeper brick effect but it wasn't necessary (because
of how we scale the image). also, it was a confusing name with regards
to the ghosting effect inherent in the chroma interference. rather than
change the name I just removed it
the crt 'enabled' setting has been renamed to 'pixel perfect' (which is
an inverted value). I find this easier to think about
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
this covers the situation where a ROM was selected on the command line.
we want the ROM select window to behave as though the command line ROM
was selected in the window
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
if the name of the directory to be read hadn't changed then the result
was returned immediately but with the complete flag being set
this caused the ROM select window to forever centre on the currently
selected file. the bug was not noticeable unless the select window was
used for a second time in a session
the archivefs set channel now expects an instance of an Options type.
added a force option to instruct archivefs to always re-read directory
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
this means the image is generated in the GUI goroutine as required
an advantage of this is that the image is repsonsive to changes in
colour generation without having to clear the frame queue
added Complete field to AsyncResults in archivefs package. set to true
once all entries have been read into the Entries list
previously it was possible for the centreOnFile flag to be set to
false prematurely, leaving the select window incorrectly centered on th
most recent file
this allows us to remove the global DisableSaving flag from the prefs
package. it also allows us to remove the preferences.go file from the
debugger package, simplifying things a little bit
the ReqROMSelector request has been removed from the gui package and
handling from the sdlimgui package. the decision on whether to open the
ROM selector is done entirely inside the sdlimgui package now. this is
good because there shouldn't be any need for the debugger package to
worry about that kind of thing
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
pushing/popping the new TV Colour marking into the drawlist happened
too frequently
clearer handling of tooltips and drag-and-drop in the palette windows
for conveinece and to prevent ordering accidents. it's a small point but
creating shaders when appending to the array has to be done in the
correct order. it's clearer and safer to use a map
renamed name of textureType type to shaderType
enabling and disabling of TV colour in the GUI now uses texture IDs for
a specially allocated texture, removing any possibility of accidentally
misuing a real texture ID
in other words, the shader can be called for specific pixels in the GUI
texture. previously, the shader was only used for specific textures,
which is fine but for that meant GUI elements were not rendered
correctly with regard to the current TV settings (brightness, contrast,
etc.)
this will be particularly important when we move the YIQ generation to
the shader