mattgodbolt / jsbeeb

Javascript BBC micro emulator
GNU General Public License v3.0
351 stars 68 forks source link

Option to connect analogue port to microphone input #175

Open mattgodbolt opened 6 years ago

mattgodbolt commented 6 years ago

From Barrie:

Would Analogue access to a "Micro Mike" be possible. This was a microphone system aimed at people who couldn't use standard controls. You can see a lovely clip of it in use here:
https://youtu.be/YIChZsWig6w

I've a batch of MicroMike software here: https://www.dropbox.com/sh/xkxttyundjhgg0d/AACHKHd5hVJnJdqcJwnUvlkha?dl=0 - including the newly recovered Micromike Olympics.

oneswitch commented 6 years ago

Here's MicroMike Olympics played with sound: https://www.youtube.com/watch?v=cpTcKibdces

And here's a little BASIC programming info that may be useful: https://stardot.org.uk/forums/viewtopic.php?f=9&t=9721&p=187663#p187663

It's easy to hack the games to get them to play, but I'd love to get a CB Mike working on a BBC. Here' some info so far...

Hacking the code to test the games benefits from deleting the early ONERROR line. Then find the ADVAL procedure...

DEFPROC ADVAL V%=ADVAL1DIV(SENSE) END PROC

...then bodge in something like K$=GET$:IFK$ ="1" V%=0 .... then having a few more keys to vary the value between -255 and +255.

Some of the games ask that the CB mike button is pressed...

So far....

LEFT-ANALOGUE BUTTON is linked to the CB Mike button (X=ADVAL(0) AND 3 ---- if returns a 1, the button is being pressed)

The MICROPHONE is detected via Analogue Channel 1...

DEFPROC ADVAL V%=ADVAL1DIV(SENSE) END PROC

In one game, "SHOUT TO CONTINUE" means V% HAS TO BE OVER 63.

The input voltage has to be 0 volt to 1.8 volt I read here: http://regregex.bbcmicro.net/BPlusUserGuide-1.07.pdf

This is the analogue port pin-out... http://chrisacorns.computinghistory.org ... ort_UG.pdf

Such a brilliant thing they did. Wish more people were making software like this today.