Skip to content

Releases: patters-match/revs-source-code-bbc-micro

Revs with adaptive *TV interlace support

Choose a tag to compare

Builds of all four Revs releases with adaptive *TV interlace support.

Stock Revs always forces an interlaced display regardless of what *TV is
set to. On a period CRT that's essentially invisible, but through modern
scalers and flat panels interlace looks considerably worse than progressive.
These builds honour whatever *TV is already set to, and are unchanged from
the originals when *TV is interlaced.

Discs

File Release Tracks
revs-acornsoft.ssd Acornsoft (1985) Silverstone
revs-4tracks.ssd Revs 4 Tracks Brands Hatch, Donington Park, Oulton Park, Snetterton
revs-superior.ssd Superior Software the above four, plus Silverstone
revs-plus.ssd Revs+ the above five, plus Nurburgring

Usage

*TV takes two parameters, *TV <vertical shift>,<interlace>, where the
second is 0 for interlace and 1 for non-interlace:

  • *TV 0,1 — progressive display, no vertical shift
  • *TV 0,0, or just *TV — the original interlaced behaviour

The setting is read at load time, so set it before running the game.

Note that the first parameter is an independent vertical-position adjustment
and has nothing to do with the interlace fix. The commonly seen *TV 255,1
will give you a progressive display but also shifts the picture by a scan
line, so use *TV 0,1 unless you actually want that shift.

What changed

The game code itself is untouched. The real game binary is renamed to Revs3
on disc, and a small standalone patch binary is catalogued as Revs2 in its
place — so every existing loader's unmodified *RUN/*LOAD Revs2 call runs
the patch first, with none of the loaders needing to change at all. The patch
loads Revs3, applies six bytes if *TV is non-interlaced, and jumps to its
entry point. (Thanks to Mark Moxon for suggesting this approach.)

Four things need correcting for a non-interlaced frame, all of them because
the custom screen mode's 6522 User VIA timer 1 is set up assuming 312.5 scan
lines rather than 312:

  • the 6845's interlace bit (register R8)
  • the free-running timer latch used during startup, which otherwise drifts 32 ticks every frame
  • the one-time phase anchor, which needs a half-scan-line correction
  • the last screen section's reload, so the five-section chain still totals exactly one frame

The startup latch is the interesting one: because it drifts per frame and
startup takes a different number of frames on each track, the bug presented
as though it were track-dependent, corrupting Brands Hatch, Donington Park,
Oulton Park and Snetterton while leaving Silverstone and Nurburgring looking
fine. Brands Hatch needed its anchor 896 ticks earlier than Silverstone —
exactly 28 frames of 32-tick drift.

Testing

Verified in b2 across both interlace states on all four variants and all six
circuits, on both BBC Model B and Master, and confirmed on real BBC Model B
hardware via an OSSC.

Credits

Revs was written by Geoffrey J Crammond and is copyright Acornsoft 1985.
The reconstructed and commented source these builds come from is
Mark Moxon's —
see revs.bbcelite.com. This is an unofficial
fork adding the *TV support.