indigodarkwolf / box16

A fork of the official X16 emulator, converted to C++20 and with a bunch of features tweaked and added.
MIT License
42 stars 19 forks source link

Port MCIOUT hypercall from x16-emulator, fix MACPTR bug #104

Closed mooinglemur closed 9 months ago

mooinglemur commented 9 months ago

This adds MCIOUT, new API call for blockwise/stream write in ROM, which is also supported on x16-emulator hostfs.

Unfortunately the low byte of the PC of this new call clashes with LISTEN, so the hypercall table needed another bit.

Also, MACPTR would always return only one byte regardless of how many bytes were requested due to a mismatch between what the MACPTR was expecting as a return value from ACPTR, and what ACPTR was actually returning. I changed both MACPTR and CIOUT to match x16-emulator's implementation.