|Re: [hatari-devel] Can't build Hatari on Mac if PortMidi is not installed|
[ Thread Index |
| More lists.tuxfamily.org/hatari-devel Archives
On 29.5.2022 14.29, Chris Jenkins wrote:
I was thinking of trying to implement direct file access in the Mac GUI
myself. I have a couple of questions:
- What precisely is it that is needed here? Is it just porting the "read
mifi input from file" / "write midi output to file" UI from the SDK GUI to
the Mac GUI?
I think that should be enough.
- What's the best way to test this? I'd ideally like to test it with an
Atari app that outputs real MIDI event
On Mac, PortMidi option is more useful for actual MIDI events. "Raw"
MIDI device access is for networking multiple Atari machines and debug
(It would be nice to be able to switch between the two at run-time, but
for now it's not possible.)
but I confess I never used MIDI
back when I had a real ST and I'm not sure what would be the easiest
application to use for testing purposes. Or would it be enough to just
output a .cfg file and verify that the contents look ok?
First you obviously need to build Hatari without PortMidi support (I set
PortMidi include and lib paths to empty in "ccmake" for that).
GEMDOS test binary in tests/tosboot/disk/ writes a debug message to
MIDI. You can try it with:
hatari --midi-in /dev/zero --midi-out stdout GEMDOS.PRG
Message on Hatari stdout should be either "success" or "failure"
(depending whether its tests, unrelated to MIDI, work i.e. how close
your config is to TOS boot tester Hatari config).
You might also try "tools/hatari-local-midi-ring.sh" script to connect
multiple Hatari instances into a MIDI ring using FIFOs.
I've tried that e.g. by running Midi Squared 2 in one Hatari instance to
generate music (by moving mouse), and Sequencer One in another instance
to record it, but that one should be able to do also with PortMidi as
both deal with MIDI events.
To try it, after making sure new Hatari binary is first in PATH, run two
Hatari instance MIDI ring with the script:
../hatari-local-midi-ring.sh 2 /path/to/both/programs/
More interesting use-case for MIDI ring is using MIDI for networking
games, e.g. MidiMaze 2:
../hatari-local-midi-ring.sh 2 midimaze.2/
To start the game, press mouse button or Enter key on the slave
MidiMaze2 Hatari instance(s), and then press Enter on the master
instance until game starts. Then use joystick to play.
I've just tested it and it works, although it's a bit fragile. For some
reason MIDI communication sometimes takes a lot of time / or times out.
I tested several TOS and machine configs, but could not find a
repeatable pattern. STE / TOS 2 or EmuTOS did seem more reliable that
ST / TOS 1.x though.
There were also few other games I tested for MIDI ring networking
* MidiMaze 1 I did not get working, it just gave a "MIDI Boo-Boo" dialog
after trying to connect, but it's apparently known to be buggy(?)
* Midimaze 3 is beta version, and GUI lost mouse cursor (under EmuTOS
v1.1.1) before I was able to start game from the menu.
* Masters of Chaos did connect with MIDI between two Hatari instances,
but I have no idea what it was doing with the connection
* JitterBug threw an error after game run for a while