Commit graph

54 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
37038b3619 digest video uses the ColorSignal rather than the mapped colour
this means the test is independent of what happens in the colour
generation code
2025-01-17 22:00:01 +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
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
00497b6d50 corrected signal loop in audio/video digests
the SetPixels() loop in both digest types were using signals that were
invalid for that frame. this can happen when the screen size changes or
during a change of VSYNC profile
2024-11-23 14:56:37 +00:00
JetSetIlly
babeade87a recording and playback system sets the television to simple mode
this simplifies the information in the recording and playback files and
means that the current VSYNC settings are ignored

television preferences window disable VSYNC controls when in TV is in
simplified mode

playback used GetReqSpecID() instead of GetCreationSpecID(). noting the
TV specification in the playback file will be replaced with a more
flexible system in the future
2024-06-11 17:47:47 +01: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
31138f16f3 removed InstructionBoundary() interface and television.ReqState()
Instruction boundaries can be inferred by the debugging input loop,
which is the only place it is requred. reworked GetAdjustedCoords() in
the televsion package (now called AdjCoords()) to cope with this.

ReqState() is totally replaced by GetCoords()
2021-10-23 10:50:19 +01:00
JetSetIlly
c8481bc19d digest.Video initialised with correct specification.Spec 2021-09-30 21:14:50 +01:00
JetSetIlly
3c1b30623d removed visible artefact on debug screen when pausing emulation
caused by changes introduced in dda5ed5d5c

taking the clock/scanline values from LazyTV was a good idea but the
time it takes for the lazy system to update is just long enough for the
old value to be visible.

an additional argument to PixelRender.SetPixels() is required but it
can't be helped.
2021-09-27 22:08:15 +01:00
JetSetIlly
db2342193e simplified how signals are processed by PixelRenderers
entire signal history is sent to SetPixels(). this makes it easier to
handle and to synchronise with the reflection package.
2021-09-27 22:07:43 +01:00
JetSetIlly
0a2e40be49 reworked how television signals are sent to the PixelRenderer
all signals are now sent with SetPixels(). this simplifies PixelRenderer
implementations. removed the current flag, that information can be
obtained with television.GetState()

AbsoluteMaxScanlines increased to 313. this is to accomodate ROMS that
use the absolute limit of the PAL specification and turn off VSYNC such
that it tips over into the extra line.
2021-09-26 17:53:02 +01:00
JetSetIlly
2a6cb49741 audio mixing is now a separate pacakge
TIA now puts both audio channels in the SignalAttributes separately

it is up to television.AudioMixer implementions to mix the two
channels as required
2021-09-15 18:53:48 +01:00
JetSetIlly
d31271f7a6 simplified PixelRenderer interface/protocol 2021-09-13 22:27:31 +01:00
JetSetIlly
9a8019d654 SetAudio() in AudioMixer interface now expects a slice of SignalAttributes
This allows a single call to SetAudio() and for the loop to happen
inside that function - as opposed to looping over the slice and calling
SetAudio() multiple times
2021-09-02 14:59:34 +01:00
JetSetIlly
61b4125d74 replaced SignalAttributes struct with a single uint64 value
more efficient memory usage and marginally faster performance. maybe
possible to compress to a single uint32 value?
2021-09-02 14:20:44 +01:00
JetSetIlly
4bdba33551 television package keeps better track of current frame information
this simplifies the sdlimgui/screen type in addition to the NewFrame()
and Resize() functions in the PixelRenderer interface

will allow better overview and summarising of television performance

playscreen F7 window shows "total scanlines" rather than "visible
scanlines"
2021-08-12 11:28:59 +01:00
JetSetIlly
b0e973a0fd first attempt at screen roll 2021-06-15 06:55:13 +01:00
JetSetIlly
de05480f65 added SetPixels() to PixelRenderer. significant performance boost
this is in addition to SetPixel()
2021-05-01 19:53:20 +01:00
JetSetIlly
2e94d1fb00 mute audio in debugger 2021-03-06 11:22:49 +00:00
JetSetIlly
91c88d555b renamed all instances of HorizPos to Clock
it's less clumsy when used as a label and it's accurate with regards to
how the VCS is documented. not sure why I thought HorizPos was a better
label. maybe it helped my thinking in the earlier phases of development.
2021-01-19 17:34:43 +00:00
JetSetIlly
510c155989 clarified (and corrected) reset procedures 2021-01-14 12:37:38 +00:00
JetSetIlly
2fd42f52fa television passed by reference in all instances
suports changes made in previous commit
2020-11-20 12:18:43 +00:00
JetSetIlly
d438244fbe PixelRenderer reset when TV is reset
rewind frequency limit improved
2020-11-11 07:00:15 +00:00
JetSetIlly
9f6ffdf5d0 television saved state did not include all resizing information
- this caused issues during rewinding

simplified signal history in television storage

simplified pixelrenderer.NewFrame()

simplified pixel management for GUI screen implementation

frame limiter turned off for rewind events
2020-11-10 22:04:03 +00:00
JetSetIlly
0fb6b780cc abstracted VCS facing parts of the television implementation into the signal package
NTSC and PAL information, including colours, moved into specification package
2020-10-31 22:01:12 +00:00
JetSetIlly
b1203a94ef reworked frame limiter system
removed debugger specific system; added features to "main" television
limiter system.
2020-10-27 22:30:50 +00:00
JetSetIlly
d5cecf2bde pixel render performance improvements
television signal history array is static

PixelRenderer.SetPixel() now expects an augment SignalAttributes
instance. Color is indexed by the PixelRenderer implementation. SDLImgui
implementation now stores copy of specification for speed.

PixelRefresher folded into PixelRenderer. SetPixel() should be called
between two calls UpdatingPixles(true) and UpdatingPixels(false) for all
PixelRenderer implementations - whether it does anything or not.
2020-10-27 15:48:21 +00:00
JetSetIlly
63da4073d9 remove Television interface / renamed Reference to Television
the interface was becoming too large and was a remnant of a very early
development phase. the gui interface type has replaced that concept.
2020-10-23 15:35:39 +01:00
JetSetIlly
664ea09f5c halting a non-frame boundary will add add a partial snapshot
continuing from a partial snapshot will cull that snapshot

rewinding state and then continuing from that point will crop the
state history
2020-10-22 21:40:57 +01:00
JetSetIlly
3902b13a55 television state is now rewindable
updates attached pixelrenderers. added Refresh() function and added
'refreshing' flag to SetPixel()

cpu and tia memory references updated on rewind

fixed rewind.Append()
2020-10-22 10:55:41 +01:00
JetSetIlly
e3eb439cf8 tidy up of television package 2020-10-21 16:19:57 +01:00
JetSetIlly
4253af599e moved televsion to hardware package 2020-10-21 11:14:20 +01:00
JetSetIlly
9e159b97d8 added more linters to golangci-lint config
godot --fix has been run to make sure all comments end in a full-stop

specified nolint directive to apply to specific linter
2020-10-16 16:31:07 +01:00
JetSetIlly
81b5a84a0b simplifed code (golangci-lint -E gosimple) 2020-10-15 20:56:48 +01:00
JetSetIlly
7fc48dcd65 renamed errors package to 'curated'
to differentiate with the now existing errors package in the standard
library.
2020-09-28 22:16:59 +01:00
JetSetIlly
2d5cae17f5 reworking of errors package
removed all messages from errors package. the strings are now hard coded
in place. the original reason for extracting the error strings like that
was (a) for redundancy and (b) for localisation possibilities. However,
in reality there is not much redundancy and since the project started
the scope of localisation is much larger (particularly due to the
addition of a GUI)

this is the first step. the next step is to remove the errors package
altogether. recent additions to Go mean that the functionality of the
errors package is no longer required. moreover, the original idea for
the errors package functions turns out not to have been as useful as
first appeared (the Error() functionality which makes sure no repeating
sub-strings occur is probably better achieved with static tooling).

one idea that comes from this which is quite interesting is the idea of
a curated error. that is, any error that has been "wrapped" as some
'generic' type. the IsAny() function in the errors package effectively
serves this purpose. we use that in one place in the input loop of the
debugger. not strictly necessary but nice to have so it would ideal
if we could remove the errors package but keep that idea.
2020-09-28 22:16:59 +01:00
JetSetIlly
298a5d343f updated copyright notice in all files
the note about historical versions also being covered wasn't strictly
needed and was ugly. the LICENCE being in the root file from the very
first commit is sufficient.
2020-07-26 20:18:56 +01:00
JetSetIlly
1eb0100194 corrected DPC+ data-fetcher address decrement
unified/normalised static area structure and presentation

better tab bars for static area window

corrected cropped cursor drawing for pixel position on the VBLANK
boundary

TV specification changeable at command line and via GUI's debug screen
window

abstracted resizing mechanism opening the possiblity
for more sophisticated analysis

digest/video handles TV specification changes

bumped imgui-go version to 2.4.1
2020-07-21 21:36:40 +01:00
JetSetIlly
5ae8a86a94 fixed race condition on television.IsStable()
PixelRenderer.NewFrame() now requires isStable boolean argument

removed some deprecated gui implementations
2020-07-18 11:02:59 +01:00
JetSetIlly
323459fd16 move altPixel signalling to reflection package
reworked how palettes and individual colors are stored

reworked reflection package. dropped the TIA register reflection for
now. will add back again at a later date.

dropped the altPixel phraseology. now just referred to as debug colors
(like Stella and how earlier versions did). rename gui requests
accordingly.

improved mouse-hover window in debugger
2020-05-26 21:56:10 +01:00
JetSetIlly
b039b59017 removed PauseAudio() and FlushAudio() from AudioMixer 2020-03-30 15:17:56 +01:00
Robin Eklind
24cb28843f gopher2600: use fully qualified import path as module path
Fixes #4.
2020-03-21 23:39:56 +01:00
steve
299db2277e removed Resize() events from digest.Video hashes 2020-01-07 11:42:09 +00:00
steve
9f17a89259 audio fixes / overscan option
removed fixes previously added to account for Pitfall silences. caused
problems with other ROMs, particularly chiphead demo

added option to PLAY mode that presets window to use overscan area.
prevents excessive window resizing when overscan use is detected.

commentary fixes
2020-01-06 19:24:14 +00:00
steve
16b15fad95 o added licence headers to all files 2020-01-05 18:58:43 +00:00
steve
50dd2e3f8d o breakpoints
- fixed breaks with more than one AND condition
    - duplicate breakpoint detection improved
2020-01-05 18:58:42 +00:00
steve
6c210ee6c1 o debugger
- reorganised packages within the debugger package
    - commentary and documentation

o terminal
    - renaming of console to terminal in all instances
2020-01-05 18:58:41 +00:00
steve
aba69ec69a o added overview documentation for every package
o recorder
    - fixed recorder after recent changes made to digest/video
    - fdf3f2765c59de4097a01b7fdf736ae38e4398b4
2020-01-05 18:58:41 +00:00