The hardware will not be explained in any detail but the various ports and bit assignments are covered here.
The cassette data input, level detection input, remote control outputs and sound feedthrough control are all available as bits on I/O ports as follows:
data input port 0B6h bit 7 level input port 0B6h bit 6 remote 1 output port 0B5h bit 6 remote 2 output port 0B5h bit 7 feedthrough toggle port 0B5h bit 5
The cassette output is in fact the same as the sound output, with the cassette out socket doubling as a headphone socket. The cassette output is therefore done by using the DAVE in D/A mode and so several of the DAVE chip registers are used. These will not be detailed here as they are defined in the DAVE chip specification.