Mockbird
Interface Libarary and Synthesizer Setup Tool for Mockingbird-OTTO
Loading...
Searching...
No Matches
Soundscape::SS6850Port Class Reference

MC6850-compatible ODIE communication port. More...

#include <sndscape.h>

Public Member Functions

 SS6850Port (std::uint16_t base, bool with_reset)
 Initializes the port.
 
void out (ss6850_byte data)
 Writes a byte to the port.
 
ss6850_byte in ()
 Reads a byte from the port (blocking).
 
bool in_avail ()
 Polls whether a byte is available.
 
void drain ()
 Receives bytes from the port until no more bytes are available.
 

Detailed Description

MC6850-compatible ODIE communication port.

This class represents an ODIE communication port set to MS6850-compatible mode. This is the only recommended mode for the secondary port, and its command channel is used to interface the firmware.

Constructor & Destructor Documentation

◆ SS6850Port()

Soundscape::SS6850Port::SS6850Port ( std::uint16_t base,
bool with_reset )

Initializes the port.

The constructor writes a control value that takes the port out of reset, after optionally setting it to reset first.

Parameters
baseI/O base address of the port. 0x332 for the secondary port of a Soundscape in default config.
with_resetIf set, reset the port (not the firmware).
Exceptions
HWMissingExceptionThere obviously is no Sounscape port in MC6850 mode at the given address.

Member Function Documentation

◆ in()

ss6850_byte Soundscape::SS6850Port::in ( )

Reads a byte from the port (blocking).

Returns
Byte and source channel.
Exceptions
TimeoutNo byte arrived within half a second

◆ in_avail()

bool Soundscape::SS6850Port::in_avail ( )

Polls whether a byte is available.

Returns
true if a byte is available.

◆ out()

void Soundscape::SS6850Port::out ( ss6850_byte data)

Writes a byte to the port.

Parameters
dataByte and target channel
Exceptions
TimeoutThe output buffer was stuck full for half a second.

The documentation for this class was generated from the following file: