News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Clueless

Audio in mod: can I spoof "play + any key" on audio input?

Started by Clueless, 01:08, 05 March 25

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Clueless

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

andycadley

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).

Clueless

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 

Bryce


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.

Clueless

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

andycadley

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.

GUNHED

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?
http://futureos.de --> Get the revolutionary FutureOS (Update: 2024.10.27)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

andycadley

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.

Brocky

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!...



Powered by SMFPacks Menu Editor Mod