MediaWiki:Sitenotice:
2025-12-29: I have restored the wiki to a backup from the end of November. Starting in September 2025, accesses went form the 800MB-1.2GB range per month to 26GB in September, 42GB in October, and 70GB in November with most accesses originating from China. As soon as I realized what was causing all the access problems in November, I shut it down (it had reached 36GB by then) behind a password/login screen. The database had gotten corrupted, and I tried a restore from just before the spike in access but that didn't work. Thus, end of November. I still have the other daily backups so if there were any important additions in December, let me know and maybe they can be recovered. - Allen H.
Hi-Res Joystick Software
- Aaron wolfe/robert gault
I present here a simple Basic program to demonstrate how the adapter can be used in either the Tandy or CocoMax modes. Most of the work is done by an assembly language routine, one for each mode. This is not the only way to write useful code, it is just an example to get you started on your own projects. Keep in mind that the timed circuit values change when the Coco CPU clock changes. It may be difficult to get the full resolution at fast clock speeds.
Joystick.zip demo Basic program and 2 asm source code files in EDTASM format binary files included plus Tandy/CocoMax circuit (joystick.gif)
- John Kowalski, Robert Gault and Nickolas Marentes
This project was jointly created by John Kowalski, Robert Gault and Nickolas Marentes
How the ADC works
The real work when converting any analogue voltage to a digital reading with the Color Computer is actually done using the DAC (Digital-to-Analogue) converter. To understand how the ADC (Analogue-to-Digital) circuit works, we must understand how the DAC works.
In simple terms, the DAC accepts data from the computer and converts it to an analogue voltage. Although the computer's data bus is 8-bit, the input to the DAC is only 6-bits. This represents a value from 0 to 63 or 64 individual voltage steps as output from the DAC. This is also how the 64 levels of volume is derived when the DAC output is diverted and used for sound generation.
In order to get a digital reading from the joystick port, the output of the DAC is fed into an input of a voltage comparator. At the same time, the voltage from the joystick or mouse is fed into a second input of the voltage comparator. This voltage comparator compares the two input voltages and sets an output high or low to indicate the difference. Software running on the Color Computer can read the comparator output and determine if the DAC voltage needs to be raised or lowered to attempt to match the joystick port voltage. This test is repeated until it locates the DAC voltage value which coincides with the incoming voltage. Through a process of successive approximation, an accurate ADC value can be found.
This is the first stage of reading the joystick port that derives the normal 6-bit joystick port reading.