CPCWiki forum

General Category => Amstrad CPC hardware => Topic started by: Clueless on 01:08, 05 March 25

Title: Audio in mod: can I spoof "play + any key" on audio input?
Post by: Clueless on 01:08, 05 March 25
I want to connect an old RaspberryPi to an audio-in mod so I can start tzx-player remotely from my phone or iPad.

Ideally I'd want the Pi to drive as much of the run command-to-loading screen as possible, so my question is:
How much of that is possible?
And are there existing projects doing it? (In a way that can be duplicated with an external RPi 3, no fpga's or custom ROMS, etc?)

Thanks
Title: Re: Audio in mod: can I spoof "play + any key" on audio input?
Post by: andycadley on 08:52, 05 March 25
Pressing "PLAY" just makes the tape motor start and audio come into the system, so you can certainly spoof that. There's no way of driving the keyboard from the audio in socket though, so you'd have to connect something to the expansion bus and fake  a sequence of IO signals to make that part work (which to me sounds like a lot more effort than using a custom ROM that could just set up a periodic event using the firmware to listen on a single IO port and start loading when signalled).
Title: Re: Audio in mod: can I spoof "play + any key" on audio input?
Post by: Clueless on 09:35, 05 March 25
Quote from: andycadley on 08:52, 05 March 25Pressing "PLAY" just makes the tape motor start and audio come into the system, so you can certainly spoof that. There's no way of driving the keyboard from the audio in socket though, so you'd have to connect something to the expansion bus and fake  a sequence of IO signals to make that part work (which to me sounds like a lot more effort than using a custom ROM that could just set up a periodic event using the firmware to listen on a single IO port and start loading when signalled).
Thank you, yeah I don't want to go too far modding this. Just as much as is reasonable/ easy. So yeah you're right, if I'm gonna go that far may as well do it right or leave it out.

Thanks again 
Title: Re: Audio in mod: can I spoof "play + any key" on audio input?
Post by: Bryce on 10:58, 05 March 25

Quote from: andycadley on 08:52, 05 March 25Pressing "PLAY" just makes the tape motor start and audio come into the system, so you can certainly spoof that. There's no way of driving the keyboard from the audio in socket though, so you'd have to connect something to the expansion bus and fake  a sequence of IO signals to make that part work (which to me sounds like a lot more effort than using a custom ROM that could just set up a periodic event using the firmware to listen on a single IO port and start loading when signalled).

Way too complicated. You just have to pull one of the joystick pins low for a tiny moment. That would be enough to fulfil "any Key" being pressed.

Bryce.
Title: Re: Audio in mod: can I spoof "play + any key" on audio input?
Post by: Clueless on 12:04, 05 March 25
Quote from: Bryce on 10:58, 05 March 25
Quote from: andycadley on 08:52, 05 March 25Pressing "PLAY" just makes the tape motor start and audio come into the system, so you can certainly spoof that. There's no way of driving the keyboard from the audio in socket though, so you'd have to connect something to the expansion bus and fake  a sequence of IO signals to make that part work (which to me sounds like a lot more effort than using a custom ROM that could just set up a periodic event using the firmware to listen on a single IO port and start loading when signalled).

Way too complicated. You just have to pull one of the joystick pins low for a tiny moment. That would be enough to fulfil "any Key" being pressed.

Bryce.
Ahhh that's great to know  :) , thanks
Title: Re: Audio in mod: can I spoof "play + any key" on audio input?
Post by: andycadley on 14:49, 05 March 25
Quote from: Bryce on 10:58, 05 March 25
Quote from: andycadley on 08:52, 05 March 25Pressing "PLAY" just makes the tape motor start and audio come into the system, so you can certainly spoof that. There's no way of driving the keyboard from the audio in socket though, so you'd have to connect something to the expansion bus and fake  a sequence of IO signals to make that part work (which to me sounds like a lot more effort than using a custom ROM that could just set up a periodic event using the firmware to listen on a single IO port and start loading when signalled).

Way too complicated. You just have to pull one of the joystick pins low for a tiny moment. That would be enough to fulfil "any Key" being pressed.

Bryce.
I was assuming that, if you were going to drive it entirely remotely, you also need the be able to "type" the RUN "" command in.
Title: Re: Audio in mod: can I spoof "play + any key" on audio input?
Post by: GUNHED on 20:25, 05 March 25
Quote from: andycadley on 08:52, 05 March 25Pressing "PLAY" just makes the tape motor start and audio come into the system, so you can certainly spoof that. There's no way of driving the keyboard from the audio in socket though, so you'd have to connect something to the expansion bus and fake  a sequence of IO signals to make that part work (which to me sounds like a lot more effort than using a custom ROM that could just set up a periodic event using the firmware to listen on a single IO port and start loading when signalled).
Why not just using the joystick port?
Title: Re: Audio in mod: can I spoof "play + any key" on audio input?
Post by: andycadley on 21:38, 05 March 25
Quote from: GUNHED on 20:25, 05 March 25
Quote from: andycadley on 08:52, 05 March 25Pressing "PLAY" just makes the tape motor start and audio come into the system, so you can certainly spoof that. There's no way of driving the keyboard from the audio in socket though, so you'd have to connect something to the expansion bus and fake  a sequence of IO signals to make that part work (which to me sounds like a lot more effort than using a custom ROM that could just set up a periodic event using the firmware to listen on a single IO port and start loading when signalled).
Why not just using the joystick port?
As I said, it seems a bit pointless to have a user type RUN "", then press ENTER and then only automate one final key press.
Title: Re: Audio in mod: can I spoof "play + any key" on audio input?
Post by: Brocky on 00:20, 06 March 25
you could always just take the signal from the motor relay and wire it to an input on the PI...
then when you type RUN" and hit enter the pi can detect that the motor is engaged and start playing the audio...

this is how its done on most tzx devices (altho it isnt needed if you do it manually)
its done with a 3 pole socket and headphone jack, one line is ground, one for audio (it can be a pure digital signal doesnt have to come from audio out!) from the pi to the cpc, and one for the motor relay signal to the pi...

youre not gonna get the pi to control the cpc without a hell of a lot of effort, and extra hardware..at which point youre better off turning the pi into a disk emulator..

you might wanna look into more details...and a faster way to load!...
https://www.youtube.com/watch?v=MAIsOIwgJWA

Powered by SMFPacks Menu Editor Mod