
___________________

ZeriBeep user guide
___________________


User, please note
=================

ZeriBeep is Freeware, i.e. it is free software, but not public domain.

Copyright notice
================

The copyrights (c) of this program belong to John Kortink. All rights are
reserved.

You may not make changes to this program (except for documented configuration
changes). If you distribute it, you may only distribute the complete and
unchanged original copy (as you first received it). You may distribute this
program freely, but must obtain written permission from me if it is to be
distributed as part of, or alongside, any product that is meant to generate
profits. This program is provided 'as is'. Fitness of this program for any
particular purpose is not implied. Using it is entirely at your own risk.


//
//
// Introduction
//
//

Features :

- Accurately emulates the SN76489 sound chip, as found in the Acorn BBC Model
  B/B+/Master.

- Provides a simple 'write byte x to chip' call. All emulation beyond that is
  taken care of.

ZeriBeep is basically an 'SN76489 in a RISC OS module'. It is meant to be used
as supporting software for BBC emulators and the like. I use it myself for my
port of the Acornsoft game Labyrinth (refer to my website for more details).

Emulation is complete in all respects and, in use, should be close to (if not
exactly like) the real thing. White noise is emulated based on the actual bit
sequence output by the sound chip !


//
//
// Compatibility
//
//

ZeriBeep should be compatible with :

- RISC OS 3.1 and later
- ARM 2 and later processors (26- or 32-bit architectures)


//
//
// Using ZeriBeep
//
//

RMEnsure the current version of ZeriBeep in your program's !Run file.

When you initialise your program, call SWI ZeriBeep_Attach (0x55E40). This
returns the 'write byte' routine address in r0, and the module's workspace
pointer in r1. Then, to write a byte to the emulated SN76489, call the 'write
byte' routine with the byte value in r0, the current 'time' in 2 MHz ticks in
r1, and the module's workspace pointer in r12. When you shut down your program,
call SWI ZeriBeep_Detach (0x55E41).

If you really need to, you can change the default sample period and sample
length of ZeriBeep's sound channels by calling SWI ZeriBeep_Configure (0x55E42)
with r0 = 3, r1 = sample period in microseconds (default setting 24) and r2 =
sample length in bytes per channel (default setting 104). Please refer to the
RISC OS Programmer's Reference Manuals (volume 4 in particular) to find out
what these parameters mean. SWI ZeriBeep_Configure must only be called once,
and always *before* SWI ZeriBeep_Attach.


//
//
// Epilogue
//
//

Updates of ZeriBeep (if any appear) will be made available by (in order of
preference) :

- World Wide Web : visit web.inter.nl.net/users/J.Kortink
- Electronic mail : email kortink@inter.nl.net

Enjoy !


John Kortink



