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 is on by default and seems to be the cause of the occassional loss
of VSYNC (for want of a better description) seen when displaying ROMs
with flicker kernels
note that disabling the bypass_compositor option doesn't completely
solve the VSYNC problems when running under the muffin window manager.
it does however solve the problem under other window managers that have
been tested. either way, the issue is purely one for X11 and doesn't
affect Windows of MacOS
I've also removed the artificial window event delays added in 28c22cb34.
the delays seemed to mitigate the problem but not solve it.
it never worked very well and was likely to cause screen tearing
added SetConstraint() function to the types in the prefs package. this
is used to make sure the old ticker value is replaced with the value
indicating 'sync with vertical retrace'
this seems to help the screen rendering to mesh with the monitor's
VSYNC. this method was already in place when switching between
full-screen and windowed mode
the current policy is to run time.Sleep() for the duration of a frame
(1000/60ms for a 60Hz monitor) before calling GLSwap() and to do that
for 5 consecutive frames
for the specific instance of WINDOWEVENT_RESIZED the GLSwap() is
also completely inhibited for a frame
outside of the window event period a random sleep of between 1 and 10
microseconds is introduced
tweaked frame queue slack indicator
screen can now be repositioning and sized so that it fits inside the
bevel. this needs improvement such that a bevel can specify how the
screen needs to be transformed for the bevel
set ClearColor before calling gl.Clear(). this completes the change
started in 8763b77f
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
the logger.Permission interface indicates whether the environment making
the logging request is allowed to create new log entries. the
environment.Environment type satisifies the Permission interface
logger.Allow is provided as a convienient way of indicating the the log
entry should always be created
EventDataPaddle can now specify whether the values are relative or
absolute values. previously all values were absolute
hardware mice use relative values whereas devices like the stelladaptor
use absolute values
removed gamepad trigger operation of paddles. it was a poor solution to
the problem
all references to opengl are now made through the renderer interface.
which renderer is to be used is controlled by buildtags
now requires minimum go version of 1.21
CRT preferences and CRT preview in debugger TV window are disabled for
OpenGL2.1
Makefile now sets the version string for the project. the version
package tries to set a meaningful version string if the project is not
built with the Makefile
added VERSION command
undoes much of the changes in 203891dde9
macos shader compiler is much stricter than others and won't compile a
glsl version 1.5 script gl version 2.1 and dropping the glsl version to
1.2 degrades the features of glsl too much
in any case, dropping to v2.1 was only an experiment to see if there was
any meaningful performance difference. there is not
emulation will wait for half as many render frames as there are in the
frame queue. this ensures that plotting and rendering are as far away
from each other as possible and ensures that the framequeue has
sufficient space to do its job properly
sdl.GLSetSwapInterval() would fail with "Restore All" in prefs window
"Restore All" pushes preference loading to the emulation thread. it does
not need to push loading for GUI preferences however. GLSetSwapInterval()
was failing because it was running outside of the GL context
curated package predated the standard errors package introduced in
go1.13
the standard package does a better job of what curated attempted to do
the change of package also gave me a opportunity to clean up the error
messages a little bit
added a small delay to the program after SDL SetFullscreen() has been
called. this seems to give the system time to make the change to the
full screen state - meaning that placement of imgui windows in the
debugger is more consistent
if a left mouse button is pressed down and up in the same frame, imgui
will not see the down event. trickling the two events over two frames
should solve the problem
*.windowSize and *.windowPos preference values replaced with single *.windowGeometry value
prefs package type now have a pre-hook (called before new value is set).
existing hook/callback clarified to be a post-hook (called after new
value is set).
prefs generic type now handles prefs.GenericGetValueUndefined to
indicate that the value cannot be ascertained at this time (the prefs
package should use the most recent previous value instead)
switch between debugger and playmode with F6 or backtick key
pakage debugger remains for now but it will be renamed to emulator or
something like that. playmode package removed.
commandline options for both debugger and playmode are the same
currently, with some playmode features being lost (temporarily)
window not opened until window preferences loaded. fullscreen state
saved on exit.
changed hotkeys. toggle mouse capture with scroll-lock and quit with
escape key
all devices control player zero. other players will be supported in the
future once a suitable system for allocating controllers is settled on.
this was added only so that my Hori fighting stick could be used with
minimal effort
debugger and playmode refer to userinput package rather than the common
code being in the playmode package
GUI events are now userinput events
more versatile handling of EventData in controller package. parsing of
EventData is handled by the controller types as required. added
EventDataPlayback type to ports package to help distinguish source of
data.
EventDataStick used to specify stick data value. used to help
distinguish between setting a stick direction and toggle a stick
direction. the latter case is useful for (physical) gamepad input and
the former for input from a keyboard.
Gamepad analogue stick can be used for paddle input. PaddleFire removed
and Fire used instead.
version number of playback file increased to 1.1. version detection of
recorder.IsPlaybackFile() improved.
two polling methods have been abstracted into two files polling_fancy
and polling_simple. these are built according to the build constraints.
currently fancy polling is used by linux and darwin and simple by
everything else.
expanded --profile option for DEBUG and PERFORMANCE so that different
profile options can be selected/combined
added --profile option to PLAY mode.
many lint errors removed (re-added "make lint" to git pre-commit hook)