This adapter simply decodes parts of the 6809 address bus: A8 – A15. More fine grained decoding is not necessary as the peripheral address mapping is done by the upper 8 bit only.
So write access to 0b00111000???????? = 0x38?? will be recognized as a sound command.
Looking at the bus timing of the 6809 see https://github.com/cavnex/mc6809/blob/master/documentation/6809Details.md the data bus is latched on the adapter with the falling edge of Q, and written (strobed) to the data east compatible connect STB pin with the rising edge of E.
That is basically all the whitestar adapter does.
To simulate a cpu writing sound commands we can use an arduino mega, that provides a “8 bit data bus” = PORT A. Two outputs to drive Q and E and one additional output that toggles one of the address bits, e.g. A15. all in all 1 data bit plus common ground / 5V.
All other address bits are just hard wired to high or low to match the required bit pattern for 0x38??.
So using the lower end 2×18 connector we have all we need to connect to a DIP20 socket that the whitestar adapter is plugged in.
Looking at the schematic, one can easily see that the falling edge of “Q” will latch the data and the rising edge of “E” will trigger the “strobe” (also rising) on the data bus to data east.
Of course this will only happen if the address decoder detects a 0x38 for A8-A15 on the address bus.
Based on this I created a small sketch for the arduino mega (see … ) that sends a few bytes in a loop, which should result in some sounds on the TILT!Audio board.
Code snippet:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
int sound[] = { 0xFD, 0x1A, 5000, 0xfd, 0xcd, 2000, 0xfc, 0x3d, 4000, 0xfe, 0x64, 1000, 0xfd, 0x02, 6000, 0 }; void loop() { int i = 0; while( sound[i] ) { latchData(sound[i++]); strobe(); latchData(sound[i++]); strobe(); delay(sound[i++]); } delay(10000); } |
The test adapter looks like this:
Full source code of the sketch can be found at https://github.com/sker65/Whitestar-Tester