regressionDB wasn't storing the requested cartridge mapping correctly.
for example, if no mapping was specified by the user but a mapping was
detected by file extension then the detected mapper was stored. this
caused problems with supercharger audio files - the AR mapping was
stored in the DB but no that it was an audio file
DB now stores the user specified mapping in all instances (ie. not the
mapping detected by the file extension).
related to this was that the deserialisation of DB entries was not using
the cartridgeloader package correctly. instead of using NewLoader, the
deserialisation was populating the Loader type manually.
if pixel array was too large for remaining screen buffer then *no* new
pixels were drawn to the screen. this was fine in most situations but
in some instances this resulted in poor screen updating. for example the
loading curtains in the Supercharger ROM weren't being drawn correctly.
pref types are likely to be called in critical sections. to make the
prefs package easy to use, values in the types were protected by
mutexes, this is relatively expensive however. with the exception of the
generic type, critical sections are now protected with atomics.
small performance improvement
the measurement was/is limited by a one second clock pulse but we were
checking to see if the pulse had ticked every TV clock. we now only
check the pulse every frame.
capping in the callfn package was misleading because it meant the ARM
program was allowed to run until completion. capping during ARM
execution means that not all side-effects of the program will occur
it's still not clear what actually happens in the Harmony/Melody
hardware but testing with known good/bad ROMs is encouraging
the lazy cartridge type was being reinitialiased in the wrong emulation
state. it needs to be reinitialised in order to prevent atomic.Value
panics when the cartridge type changes but it was being done too
aggressively. it now reinitialised only when emulation state switches to
Initialising.
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"
the stability check is simply wrong now that I think about it more, but
it was only obvious for a ROM that never achieved stability (and
therefore never showing any output).
in these cases the texture was never updated to begin with so the screen
never had anything to show.
additional observation: it follows from this reasoning that on the
occasions when a television frame lost stability it would show "stale"
information for the period the TV was unsynced.
this has revealed the way forward for an effective convergence of
playmode and debugging mode. for this commit a Playmode interface has
been added but this will abstracted into an Emulation interface in the
future
the problem can be seen when the monitor refresh rate is higher than the
emulation speed. for example, PAL on a 60Hz monitor. the problem was
caused by the reuse of the previous frame, rather than the current
frame.
N cycle stretched only for a back-to-back N cycle
MAM prefetch will succeed unless the previous cycle was a data read,
meaning the pending prefetch has failed. this affects S cycle prefetches
(for the MAM) which will always succeed unless the prefetch has been
aborted. we're also assuming that MAMTIM is set correctly
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
wasn't noticeable except for symbols that have different underlying
read/write addresses. for example, TIM64T has no read address so the
lookup was failing.
thumb program will abort if illegal memory access is detected
illegal accesses will always be logged even if the option is off
program will always abort on illegal PC fetch even if the option is off
small performance improvement when in immediate mode. modified last
execution window to say if execution was in immediate mode or not (to
explain the absence of cycle count)
removed stale ARM preferences
updated screenshots and README