Commit graph

25 commits

Author SHA1 Message Date
JetSetIlly
9a99ff7a3e fixed searching for PAL60 in filename and PAL60 sizing
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()
2025-02-23 17:39:08 +00:00
JetSetIlly
62f7218456 changed signal.VideoBlack to signal.ZeroBlack for clarity
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
2025-02-21 16:53:43 +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
abddcd445e colour generation moved from specification to colourgen package
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
2024-12-20 14:05:32 +00:00
JetSetIlly
b54439e574 correct processing of signal array in pixel renderers
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
2024-11-23 14:56:37 +00:00
JetSetIlly
e4dea5c7b9 reverted SignalAttributes to a struct
profiling shows that the performance penalty is no longer that great.
the struct is preferable because the code is clearer
2024-11-23 14:56:37 +00:00
JetSetIlly
a7c296d6c4 simplified calls to logger package
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
2024-11-23 14:56:36 +00:00
JetSetIlly
5cf739e938 fixed hash for starting image for videochess bot
bug introduced in e534c43181

and present in release v0.31.0 to v0.34.0
2024-09-07 17:47:21 +01:00
JetSetIlly
cd2a00d4ba logger.Log() and logger.Logf() now require a logger.Permission instance
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
2024-04-30 11:23:40 +01:00
JetSetIlly
3cff5da258 updated vidchess bot
can now work with vidchess level 2-8 as well as level 1

image searching now works with sha1 hashes throughout
2023-09-23 20:12:12 +01:00
JetSetIlly
395a0785a9 simplified input package by removing AllowPushedEvents()
pushed events are always available and do not have the same performance
impact as orignally thought
2023-08-03 06:53:35 +01:00
JetSetIlly
11fb367ff5 periperhal event PaddleSet now takes a pair of float32 values
float32 pair defined as ports.EventDataPaddle

added functions to convert the float32 to and from a playback entry.
conversion from the playback entry tolerates a single float32 value
meaning that old recording files will work

rename plugging.PortLeftPlayer and plugging.PortRightPlayer to just
plugging.PortLeft and plugging.PortRight
2023-02-27 21:27:21 +00:00
JetSetIlly
3aa5885ebe removed curated pacakge. replaced with wrapped errors
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
2023-02-13 21:58:39 +00:00
JetSetIlly
8ceeedd93b expanded list of paths in which stockfish is looked for
this relates to the experimental Video Chess bot only
2023-02-11 12:48:18 +00:00
JetSetIlly
cdcbe6e5b5 spacejockey bot. basic for now but it works 2021-12-17 22:05:22 +00:00
JetSetIlly
9d8113df27 improved videochess bot
detection of black move (by vcs) improved

bot removes its own pixel renderer and audio mixer on quit
2021-12-14 08:10:53 +00:00
JetSetIlly
a8df94f544 improved performance of input pacakge
pushed events are only serviced once per frame
2021-12-14 08:10:20 +00:00
JetSetIlly
58848acdf9 input system and ports system separated
playback/recorder and driven input systems moved out of the the ports
package and into a new input package. how the input systems interact has
been clarified and improved - for example, it is now posssible for a
playback file to be used to drive two emulations for comparison purposes

the debugger startup procedure has been clarified with two distinct
startup functions for playmode and debugger - each of which take
different arguments. the clarity has allowed the reintroduction of
recording and playback to the main play mode
2021-12-11 08:19:46 +00:00
JetSetIlly
fe2bd37451 videochess bot behaves correctly if chess engine (stockfish) can't be found
cleanup up how bo GUI features are requested/discarded
2021-12-10 13:45:17 +00:00
JetSetIlly
4c665d465e videochess Feedback Image uses x/image package (scaling) 2021-12-05 22:05:35 +00:00
JetSetIlly
2942d35320 added ports.TimedInputEvent to accompany ports.InputEvent
the Time field was in ports.InputEvent but it didn't make sense to
specify a time value in all contexts
2021-12-05 22:05:35 +00:00
JetSetIlly
76d6d163b0 finished implementing the bots package. added the bots.wrangler package
videochess bot moved into the chess package

more flexible feedback from the bot
2021-12-05 22:04:01 +00:00
JetSetIlly
4df1eb071e added the ports.InputEvent type
this is now used when passing events and event data around. it also
records the port and time (in TV coordinates) which are required by
driver/passenger synchronisation and playback recording

removed television interfaces from signal package and moved the
interfaces to where they are needed
2021-12-05 20:17:43 +00:00
JetSetIlly
01f0a4f2ae videochess bot works with image (partly implemented) 2021-12-05 20:17:43 +00:00
JetSetIlly
c94c4b9d4b experimental UCI bot. currently works with videochess 2021-12-05 20:17:43 +00:00