udo-munk / z80pack

A Zilog Z80 and Intel 8080 systems emulation
MIT License
162 stars 37 forks source link

make port_in/port_out const arrays of pointers #419

Closed sneakywumpus closed 3 months ago

sneakywumpus commented 3 months ago

Mostly reverts d7f4eea85b.

Add IO_DATA_UNUSED to define the value returned by unused I/O ports (only really used by intelmdssim, which returns 0x00).

I would really like to clean things up, and move all the extern 's and definitions into header files, which then defines the interface of the corresponding .c file. This convention is already followed by iodevices. Opinions?

udo-munk commented 3 months ago

The return value for unused I/O ports is system dependent, on S100 systems one reads 0xff, because there are pullup resistors on the CPU cards for the data in bus.

That's OK, I never wrote a header file for iosim because theoretically only two functions are exposed to the CPU cores for the IN and OUT instructions. But over time it got more complicated, probably better to define the interface now.