Commit graph

21 commits

Author SHA1 Message Date
JetSetIlly
0288e3d968 simplified realtime audio mixer
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
2025-01-12 10:12:54 +00:00
JetSetIlly
314e1d2dd4 reworked audio system
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
2025-01-11 16:14:47 +00:00
JetSetIlly
49c223b90f simplified VSYNC and screen roll
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
2025-01-10 17:46:41 +00:00
JetSetIlly
7098984611 render "resync" is triggered if a frame takes too long
display average render time per frame in overlay along with an alert
whenever a frame takes too long
2024-12-15 18:32:34 +00:00
JetSetIlly
96bcf125f3 reworked memstats overlay
removed TotalAlloc field because it's meaningless really and
causes people to think more memory is being allocated than is
reality

added GC CPU % field
2024-12-15 18:31:36 +00:00
JetSetIlly
1145b823b7 a short delay after every window event
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
2024-12-15 18:31:36 +00:00
JetSetIlly
97dafa93b2 reworked frame queue mechanism
emulation is nudged when the queue slack gets too short in addition to
when the render catches up to the emulation

undoing frame advancement skips back two frames rather than one. this
helps flicker kerneals and doesn't seem to introduce any visual
consequence

added queue slack meter to playscreen overlay. this replaces the "input
lag" field. the input lag can now be seen to change depending on load
2024-12-15 18:31:36 +00:00
JetSetIlly
18284032d1 added graphical bevels
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
2024-12-15 18:31:36 +00:00
JetSetIlly
8f9e78cad5 fixed all unkeyed struct field errors
makefile vet target removed and put 'go vet' into lint target. awk
filter for unkeyed struct errors removed
2024-11-23 14:56:36 +00:00
JetSetIlly
77f6e02a4d tweaked vblank/vsync text in play screen overlay 2024-07-06 22:03:11 +01:00
JetSetIlly
7a2e257c36 VBLANK information in the playscreen overlay
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
2024-07-06 22:03:11 +01:00
JetSetIlly
4950d7ccea debugger menu bar shows halt reason
overlay shows a bug icon if VSYNC ever changes
2024-07-06 22:03:11 +01:00
JetSetIlly
de803e6f1c added VSYNC trace to timeline window
television would not desynchronise if scanlines was less than user
preference

desync is now less aggressive. for example, the transition between the
map screen and main screen in Lord of the Rings would trigger a full
screen roll but now it's less noticeable
2024-07-06 21:52:28 +01:00
JetSetIlly
45378fa526 screen size fixed at 4:3
TV image will be squeezed into the 4:3 aperture automatically
depending on detected screen size
2024-06-11 13:58:14 +01:00
JetSetIlly
516092310c added user preference for "synchronised on startup" 2024-06-11 13:58:14 +01:00
JetSetIlly
735190c889 added user preference for "immediate desynchronisation"
when enabled the screen will begin to roll on any change of refresh rate
regardless if it is single frame change
2024-06-11 13:58:14 +01:00
JetSetIlly
78ee3bfd34 refresh rate display updated immediately when changed 2024-06-11 13:58:14 +01:00
JetSetIlly
1c3b4454e8 corrected specification switching in conjunction with new VSYNC code 2024-06-11 13:58:11 +01:00
JetSetIlly
d7b8f19c21 added memory usage to FPS overlay 2024-05-03 18:38:20 +01:00
JetSetIlly
7e1f1f17b6 improved prioritisation of state icon in playmode overlay 2024-04-12 19:55:41 +01:00
JetSetIlly
d32262adff simplified how gui implements and handles notifications
debugger no longer sends play, pause notifications to the gui. the gui
polls for that information as required

govern package now has SubState type to complement the State type.
StateIntegrity() function enforces combinations of State and SubState,
called from debugger.setState() function

playmode notifications reworked and contained in a single playmode_overlay.go
file. this includes the FPS and screen detail

preference value sdlimgui.playmode.fpsOverlay replaced with
sdlimgui.playmode.fpsDetail. still toggled with F7 key

coproc icon moved to top-left corner of playmode overlay and only
visible when FPS detail is showing

when FPS detail is showing multiple (small) icons care shown. when it is
not showing, a single (large) icon is shown according to the priority of
the icon. eg. pause indicator has higher priority than the mute
indicator
2024-04-12 18:20:29 +01:00