Peanut-GB icon indicating copy to clipboard operation
Peanut-GB copied to clipboard

core: add selectable, internal peripheral support

Open deltabeard opened this issue 6 years ago • 0 comments

Implement peripherals that may be connected to the Game Boy serial port. Then allow the front-end to select which peripheral is connected.

Example below:

enum serial_peripherals {
SERIAL_NOT_CONNECTED, /* Emulate no serial device connected (Default). */
SERIAL_PRINTER, /* Emulate printer connected. */
SERIAL_EXTERNAL /* Send serial output to front-end (eg. for multiplayer). */
};

/* Must be set before switching to printer peripheral. */
int gb_serial_printer_init((void printer_output)(gb_t *gb, uint8_t *buffer));

/* To set the connected peripheral. Returns error if peripheral not initialised. */
int gb_serial_set_peripheral(enum serial_peripherals);

deltabeard avatar Dec 10 '18 14:12 deltabeard