prodos-drivers/clocks/cricket/README.md

56 lines
2.6 KiB
Markdown
Raw Normal View History

# _The Cricket!_ — ProDOS Clock Driver
2018-04-11 03:58:20 +00:00
2017-11-26 18:55:44 +00:00
I acquired a Cricket sound/clock peripheral on eBay. Therefore it is now critical that we have a conforming ProDOS clock driver for it.
2017-12-03 19:46:30 +00:00
> STATUS: Works on my machine!
2017-11-26 18:57:28 +00:00
2017-11-26 18:55:44 +00:00
## Background
2017-12-08 07:47:45 +00:00
_"The Cricket!"_ by Street Electronics Corporation, released in 1984, is a hardware peripheral for the Apple //c computer. It plugs into the serial port and offers a multi-voice sound synthesizer, a speech synthesizer, and a real-time clock.
2017-11-26 18:55:44 +00:00
2017-12-03 22:39:39 +00:00
The disks supplied with the device include:
2017-11-26 18:55:44 +00:00
* `/CRICKET/PRODOS.MOD` which can be BRUN to patch ProDOS in memory with a clock driver.
* A modified version of ProDOS
* A utility to patch ProDOS on disk
2017-12-08 05:47:50 +00:00
## `CRICKET.SYSTEM`
2017-11-26 18:55:44 +00:00
2017-12-08 05:47:50 +00:00
Like the `NS.CLOCK.SYSTEM` (by "CAP"), `CRICKET.SYSTEM` has these features:
2017-11-26 18:55:44 +00:00
2017-11-27 07:04:02 +00:00
* [x] A ProDOS `.SYSTEM` file
2017-12-03 22:39:39 +00:00
* [x] Detects the presence of a Cricket
2017-11-27 07:04:02 +00:00
* [x] Installs a driver in memory following the ProDOS clock driver protocol
* [x] Chains to the next `.SYSTEM` file (e.g. `BASIC.SYSTEM`)
2017-12-02 04:04:20 +00:00
2017-12-03 22:39:39 +00:00
Successfully tested on real hardware. (Laser 128EX, an Apple //c clone — including at 3x speed!)
2017-12-03 19:47:54 +00:00
## Build
Requires [cc65](https://github.com/cc65/cc65). The included `Makefile` is very specific to my machine - sorry about that.
2017-12-03 21:43:15 +00:00
[CRICKET.SYSTEM](cricket.system.s) is the result of the build.
## Notes
I ended up disassembling both [NS.CLOCK.SYSTEM](../ns.clock/ns.clock.system.s) (to understand the SYSTEM chaining - what a pain!) and The Cricket!'s [PRODOS.MOD](prodos.mod.s) and melding them together, adding in the detection routine following the protocol in the manual.
2017-12-03 21:43:15 +00:00
2017-12-08 05:47:50 +00:00
## Other Utilities
These `BRUN`able files are also built:
2017-12-03 21:43:15 +00:00
* [TEST](test.s) attempts to identify an SSC in Slot 2 and the Cricket via the ID sequence, to test routines.
2017-12-08 05:47:50 +00:00
* [SET.DATE](set.date.s) sets the Cricket's current date.
* [SET.TIME](set.time.s) sets the Cricket's current time.
2017-12-03 21:43:15 +00:00
## Resources
Cricket disks on Asimov:
* ftp://ftp.apple.asimov.net/pub/apple_II/images/hardware/sound/cricket_disk1.po
2017-12-03 21:46:03 +00:00
* ftp://ftp.apple.asimov.net/pub/apple_II/images/hardware/sound/cricket_disk2.po
2017-12-03 21:43:15 +00:00
2017-12-03 21:46:03 +00:00
Cricket Manual on Asimov:
* ftp://ftp.apple.asimov.net/pub/apple_II/documentation/hardware/sound/Street%20Electronics%20The%20Cricket.pdf
2017-12-08 07:47:45 +00:00
## FYI...
In the Cricket manual there is a short sample BASIC program to set the clock without the use of any assembly routines, using `PR#2` to talk to the serial card followed by `PRINT` statements. This does not appear to work from ProDOS with the clock driver in place - the time ends up temporarily scrambled until the clock sorts itself out again. Assembly language routines do work, however. I believe ProDOS attempts to read the clock during the execution of the basic program, which interferes the device.