This commit reduces the number of times the refresh() slot is called in
the Tile Viewer and the Tilemap Viewer.
The `inUpdateFormCall` flag is still required because the QSpinBox and
CgramWidget does not have any "user edited value" signals.
This commit will allow the image created by drawTilemap() to be
accessed multiple times.
It will also save a memory allocation if the image size does not change
in-between two drawTilemap() calls.
The low-level tile drawing functions keep wordsPerScanline as a function
argument in order to save 1024 function calls per map drawn (16K calls
for a mode7 map).
Previously the CgramWidget would render the selected color outline as a
17% white, 83% black dashed line on Qt5 with a QT_SCALE_FACTOR of 2.
This commit changes the CgramWidget so that the selected color outline
is drawn as a 50% white, 50% black dashed line, independent of the
device pixel ratio.
This commit also fixes a glitch in Qt5 where the outline of some
selected TilemapViewer cells were not rendered correctly if the zoom was
set to a prime number.
Qt5's default pen width is 1.0 and therefore the grid line thickness
increases when zooming in.
This commit changes the grid pen width to the inverse of zoom so it is
rendered same thickness independent of the zoom setting.
Optiroc has mentioned that the selected tile box's position and size is
multiplied by two on his Mac. This is caused by either
`painter->combinedTransform()` returning the wrong value for hi-dpi
displays or `painter->resetTransform()` not working as expected on
hi-dpi displays.
The new code does not call `painter->resetTransform()` but instead sets
the pen width and cell adjust to the inverse of the zoom, which cancels
out the transform and should render as one pixel to the user.
added register 3036 (rom bank register ROMBR)
fixed register 3039 (clock register CLSR), used to display wrong values due
to misinterpreted implementation detail