Files
gw-basic-2026/include/portio.h
Eremey Valetov e100290dd3 Implement Hardware I/O Simulator (OUT/INP/WAIT/MOTOR, port emulation)
New portio.c module following the virmem.c dispatch-by-address pattern,
emulating 8253 PIT channel 2 (speaker frequency), PPI port B (speaker
on/off), CGA mode/color select registers, game port (joystick stub),
COM1 serial (transmitter-ready stub), and floating bus default (0xFF).

OUT/WAIT/MOTOR statements and INP()/STICK()/STRIG() functions now fully
functional. Continuous tone generation via PulseAudio pthread worker for
programs that drive the speaker through OUT &H43/&H42/&H61.
2026-03-28 18:27:19 -04:00

16 lines
297 B
C

#ifndef PORTIO_H
#define PORTIO_H
#include <stdint.h>
/* Read a byte from an I/O port */
uint8_t portio_inp(uint16_t port);
/* Write a byte to an I/O port */
void portio_out(uint16_t port, uint8_t value);
/* Reset all port state (called on NEW, CLEAR, RUN) */
void portio_reset(void);
#endif