He also has modified the Rom found on one of the MIDI interface prototypes that Vilmos Kopácsy(aka GUY KOPEXY) gifted to Werner Lindner. Now it can be put to work on the 06 and 07 memory segments on the emulator. The only problem is that it only works on these two segments, because the interface uses a memory zone to transfer the information, just like the SD-reader Rom does on the same segment 07....
Actually, the emulator uses I/O ports (F6h and F7h) instead of memory mapped I/O, that is why the ROM had to be modified, it is not compatible with the original interface. Fortunately, only a few bytes needed to be changed in the ROM code. However, the ROM is not "EXOS compatible", it uses hardcoded segment numbers, so it still needs to be loaded to 06-07 even without the MMIO.
By the way, here is how the emulated ports can be programmed (this may change later):
Port F6h is a command/status register, writing 0 to it clears the 255 byte FIFO, while reading the port returns the following:
bit 7 = 0 if input is available on port F7h (the device is in input mode and the buffer is not empty), otherwise FFh would be read
bit 6 = 0 if output can be sent on port F7h (the device is in output mode and the buffer is not full), otherwise the data would be discarded
bits 2 to 5 are unused, currently always 1
bit 1 = 0 if a valid output device is opened
bit 0 = 0 if a valid input device is opened
Without MIDI emulation support, or with no device opened, FFh is read from the port.
Port F7h is the data register. It can be read or written depending on the type of the currently opened MIDI device (I = input, O = output in the sound configuration).
If bit 7 of port F6h indicates that input is available, then a complete MIDI message can always be read, the emulator will not send truncated data. Currently, it also does not use the "repeat status" feature, nor nested MIDI messages, and most system messages are filtered out with the exception of Clock (F8h), Start (FAh), Continue (FBh) and Stop (FCh). These make it easier to parse the input data, but it could be difficult to implement the filtering if the interface was actually built as hardware. The emulator uses a FIFO of 255 bytes (the size may be increased if necessary), if the Z80 code does not consume the input fast enough, then further data is lost.
The MIDI output does support repeating the status byte between channel messages, but parsing the data is otherwise somewhat limited and may be buggy. It only supports the same few types of system messages as the input, and nested messages like an F8h in the middle of a Note On do not work.
For the ScoreTrack ROM, an output device is needed, like the Windows software synthesizer.