Accelerated Tape Loading: TAP2F16
(v1.2 August 2025 by S.Guyart, based on Fabrice's WAV2TAP)
This tool, based on Fabrice's TAP2WAV, converts Oric .TAP files
to 44kHz (big) WAV files designed to work on any standard Oric,
but that will load about 1.6 times faster than the usual FAST
speed - "F16" standing for "Fast *1.6".
One may wonder "why?", since TAP2CD from Fabrice already loads
programs much, much faster. Well here the challenge was: what
can be achieved with zero hadware or software change? So a few
more programs work, and it also works on Oric-1's ROM 1.0. No
impressive upgrade but funny to see that digital player
reliability allows an average 38% improvement.
THE IDEA
So you got it: no special routines here, just an optimized tape
signal. It was based on a study of the ROMs.
The standard signal, in FAST, codes a bit "1" by a 416 microseconds
sinusoid (2 x a 208µs duration), and a "0" by a 624µs sinusoid
(3 x 208µs). When reading a tape, the VIA 6522 detects a sinusoid,
then sends a flag to the Oric, which will start counting the time
between it and the next one (and so on).
Then Oric compares this duration to 512µs (which is the middle
between 416 and 624µs), and stores a "0" bit for a longer duration,
or a "1" for a shorter duration. So there is an 20% margin which
was useful with 1980's tape players running at different speeds.
This decoding method is interesting with nowadays digital players,
which offer good audio quality and perfect reading speed. So let's
try and save loading time on two sides:
1- the 20% margin is now useless
2- the "1" bit has no minimal length! So it can be much shorter...
Its only limits are hardware response and ROM decoding time.
After painful counting of ASM instructions duration, confirmed by
testing with a small program, the results show that the minimal
duration for a "0" is 529µs (at 44kHz, which is 23 samples), and
115µs for a "1" (5 samples). Try to remove ONE sample to any of
these values, and the Oric won't load anymore.
So you can see right now that you'll need a PERFECT WAV player,
without any audio interference - a single sample not read and it's
over. For instance, on my PC, I need to shut down WiFi, and even to
reboot it from time to time - seems after a while it's not able (or
doesn't have enough ressources anymore) to read WAV files perfectly.
This has been successfully tested on Atmos and Oric-1, even the
display of the program name, or the making of a whole byte is OK,
the Oric still has time to compute them even if the stop bits are
shorter (and BTW, I set 3 stop bits, instead of 4 with TAP2WAV, to
save a little more time).
THE PROGRAM
You should find TAP2F16.EXE compiled in two versions: 16 and 32
bits, as well as the source code in TAP2F16.C.
16 bits if for older machines still running real MS-DOS, 32 bits
should run on recent computers (even 64 bits)
Just type: TAP2F16 yourprogram.TAP wavfilename.WAV
In case of failure, I have added a "-o" ("old machine") switch which
adds an extra sample (so 23µs) to each "0" and "1" bit. I'm not sure
it's really useful, but it may help if your Oric fails to load (or
if the comptuer fails playing the WAV file properly!), at the price
of a longer loading time...
New in v1.2: you can now add or remove stop bits, using switch -bX.
X is the amount of stop bits, between 2 and 9. By default, TAP2F16
will keep 3 stop bits, as it did before.
2 should work with standard programs, thus load a little faster.
Some other programs, doing things while loading, may require more
stop bits to load with F16. This will slower the loading a little,
but makes TAP2F16 more compatible.
For instance, the game Trouble In Store, which fails to load with
TAP2F16 1.1, now loads with TAP2F16 1.2 using 9 (a lot!) stop bits.
Loading time examples:
----------------------
FAST standard FAST F16 TAP2CD
HIRES screen 0:56 0:34 0:08
Zorgon 4:31 2:37 0:31
Oricium 5:45 3:25 0:49
Lone Raider 5:08 2:59 (3 stop bits) fails
Trouble In Store 5:14 3:43 (9 stop bits) fails
Programs compatibility:
-----------------------
FAST standard FAST F16 TAP2CD
Oric-1 yes yes no
Atmos yes yes yes
Emulator yes no no
Real tape yes no no
Digital player yes 11kHz yes 44kHz yes 22kHz