sgdk
lsd

Local Symmetric Data-link. Implements an extremely simple protocol to link two full-duplex devices, multiplexing the data link. More...

Local Symmetric Data-link. Implements an extremely simple protocol to link two full-duplex devices, multiplexing the data link.

The multiplexing facility allows having up to LSD_MAX_CH simultaneous channels on the serial link.

The module has synchronous functions to send/receive data (easy to use, but due to polling hang the console until transfer is complete) and their asyncronous counterparts. The asynchronous functions return immediately, but require calling frequently lsd_process() to actually send/receive data. Once the asynchronous functions complete sending/receiving data, the specified callback is run.

Author:
Jesus Alonso (doragasu)
Date:
2019
Note:
Unfortunately the Megadrive does have neither an interrupt pin nor DMA threshold pins in the cartridge slot, so polling is the only way. So you have Megadrive does not have an interrupt pin on the cart, implementing more efficient data transmission techniques will be tricky.
Warning:
The syncrhonous API is easier to use, but a lot less reliable: * It polls, using all the CPU until the send/recv operation completes. * A lsd_recv_sync() can freeze the machine if no frame is received. USE IT WITH CARE!
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines