Trying to run old 68k app with MIDI - OS 7.1.1

Anything about Mac emulation that does not belong in the above categories.

Moderators: Cat_7, Ronald P. Regensburg

Post Reply
etienned
Space Cadet
Posts: 4
Joined: Wed Nov 02, 2016 2:39 am

Trying to run old 68k app with MIDI - OS 7.1.1

Post by etienned »

Hi,

I'm trying to run an old custom Mac app that was running on a Quadra 660AV with a MIDI interface connected to the serial port. The app was also using the Mic input of the Quadra. I have a copy of the original hard drive as a read-write .dmg.

At first I tried with Basilisk II. I can boot from the .dmg when using a Quadra 630 ROM and emulating a Mac IIci with a 68040. The system run relatively fine (crash sometimes) but when I run the app there's always a dialog popping because the app can't find the Mic input. I think it's normal because the Quadra 630 do not have a Mic input. In fact, I didn't find a ROM of a Mac that have Mic input that was running in Basilisk II with my system. This is my first problem.

My second problem is that this app is sending MIDI messages to a serial to MIDI interface. Apple MIDI manager is use in the original system as the driver. Unfortunately it looks like there's nothing outputted to the serial port (is there a way to "catch" the emulator serial port output?). I have read somewhere that Basilisk II do not support MIDI but Fusion is supposed to support MIDI. So I tried to use Fusion but I would like to boot from the system I have on my .dmg. I think Fusion can only use .hfv images. Is this right? And is there as way to convert my .dmg to a .hfv image? I don't want to reinstall a system from scratch if possible.

I would like to add that the final goal is to run this app, catch the MIDI output and convert it to another protocol, live.

Do you think I have any chances to run my old custom app with functional MIDI? If yes, what should I try (which emulator, etc).

Regards,
Etienne
User avatar
24bit
Forum All-Star
Posts: 1424
Joined: Wed Nov 11, 2009 5:47 pm
Location: Germany

Re: Trying to run old 68k app with MIDI - OS 7.1.1

Post by 24bit »

Fusion_PC might be worth a shot.
If you are willing to set up Windows95/98 or DOS host for Fusion PC 3.0, give it a whirl.
Fusion emulates the 68040 chip but lacks MMU support.The "manual" says:
"FUSION supports standard RS-232 and RS-422 serial devices in asyncronous mode.
Devices that use syncronous serial communications will not work with the emulation due to limitations in the PC serial controllers."

I doubt anybody did report success with MIDI devices so far. :(
http://macintoshgarden.org/apps/fusion-pc
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Trying to run old 68k app with MIDI - OS 7.1.1

Post by adespoton »

FWIW, I have Fusion running on OS X inside a WineSkin wrapper. However, this means no MIDI, as I don't have any serial port mapped. This may also be an issue running under Windows.

Having said that, depending on what kind of delay your MIDI equipment can handle, Bluetooth (using the bluetooth block device) can be mapped to serial out. You can then bind a client bluetooth device using the host's Apple MIDI app, and the client will handle the serial MIDI.

If you don't have any bluetooth serial adapter for your client MIDI, you may be able to pull the same thing off using USB -- but I've never succeeded with this. Maybe with an RS232-USB adapter (the full multiplex type, NOT the printer adapter type)?

HVF is just a raw image format, so it's basically DMG minus the wrapper. However, you'll have more issues, as modern OS X doesn't support HFS.

Using hdiutil, you can convert a dmg to an NDIF disk image, give it the appropriate extension, and it should work in Fusion. Might be the best way to go as you won't be able to fiddle with HFS easily on the host.
etienned
Space Cadet
Posts: 4
Joined: Wed Nov 02, 2016 2:39 am

Re: Trying to run old 68k app with MIDI - OS 7.1.1

Post by etienned »

Thanks all for the replies.

@adespoton I will try to convert my image as you have written. I'll let you know if it works.

As for the MIDI output, in fact I don't need (and don't want if possible) a physical MIDI adapter. My old custom app only output MIDI messages, there's no input. What I wish is to be able to "read" those MIDI messages in my host system in an application I will program. Timing is definitely not crucial in my case. Do you think it's possible to do that with one of the 68k emulators? If yes, do you have an idea how I can achieve this?

Another question: is it possible to run a 68k app in SheepShaver running OS 9 (like it's possible to run 68k app on real PPC)?
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Trying to run old 68k app with MIDI - OS 7.1.1

Post by adespoton »

Actually, this should be possible, if you're doing one-way serial-based MIDI passing! I'd try on Fusion, Mini vMac and Basilisk II -- all three allow the host to capture serial out from the guest. What Mini vMac and Basilisk II don't do is emulate the clock chip, but if you don't actually need clock sync, you could set MIDI to just use the CPU clock (on Mac OS 7.1.1) and point the output at the modem port. In your emulator settings, set your modem port to output to either a file (which will then be a midi file), or a /dev/ device that you can redirect to some app using the MIDI configuration app. This should be doable, but I haven't done it yet, and it will involve a fair bit of tweaking to get all the parts working together.

What I did instead in my case, is run DMCS in 7.1.1 and save the files as type MIDI -- then I copied them over to the host and imported to Sibelius. Amazingly, it worked!
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Trying to run old 68k app with MIDI - OS 7.1.1

Post by Ronald P. Regensburg »

etienned wrote:Another question: is it possible to run a 68k app in SheepShaver running OS 9 (like it's possible to run 68k app on real PPC)?
Many 68k applications will indeed run in SheepShaver (running System 7.5.3 through MacOS 9.0.4).
etienned
Space Cadet
Posts: 4
Joined: Wed Nov 02, 2016 2:39 am

Re: Trying to run old 68k app with MIDI - OS 7.1.1

Post by etienned »

Hi and sorry for the delayed answer. It's a side project so I have not plenty of time to work on it.

So, following your answers, here is what I tried:
  1. I converted my .dmg image to an NDIF image with hdutil and it works flawlessly.
  2. I tried to boot Fusion with this image. It works until it hit the "Welcome to Macinthosh" box. There the box frame is flashing and everything else is stuck.
  3. I tried in Basilisk to redirect the serial port to a virtual serial port (/dev/ttyp9) that I can monitor with "screen /dev/ptyp9 baudrate". Everything seem to work in Basilisk: I can see the MIDI connection in the PatchBay. I can run my custom app (but with a dialog popping regularly stating that it can't find the mic input ("SPBOpenDevice" Error, Invalid Device Name). Unfortunately I never got any MIDI output on ptyp9. I tried different baudrates (38400, 57600, any ideas on correct baudrate?) without any success.
  4. I tried also in sheepshaver with the hope that this will fix the SPBOpenDevice Error. My app is running in SheepShaver in OS 9 but unfortunately I'm still having the error dialog. It's probably because SS and BII do not emulate the sound input? Also, if I install Apple Midi Manager in OS 9 under SheepShaver, if I try to run PatchBay or my app, SS crash instantly.
  5. In general SS ans BII are not really stable. They crash often.
After all those tests, I think I'll stop trying to run my app in an emulator, except if you give me some advices that will give me some new hopes.

Thank you for your time, it's really appreciated.
User avatar
24bit
Forum All-Star
Posts: 1424
Joined: Wed Nov 11, 2009 5:47 pm
Location: Germany

Re: Trying to run old 68k app with MIDI - OS 7.1.1

Post by 24bit »

Fusion is picky with bootable hard files.
I´ll add a bootable SSW 7.1 image to the Fusion page soon, meanwhile you might try the 7.6.1 one.
http://macintoshgarden.org/apps/fusion-pc

As far as I recall, the authors of ShapeShifter, wich is the ancestor of BII and SS stated that MIDI was not supported.
I can't imagine that MIDI was added later by them while modernizing and adapting the Mac emulators for GNU/Linux without dropping a single hint somewhere.
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Trying to run old 68k app with MIDI - OS 7.1.1

Post by adespoton »

Just to clarify: setting the serial line data rate to 2400/33600/57600 baud is setting the clock rate of the serial line. MIDI uses its own clock controller to send variable-timed signals over RS-232. So in order for what you're attempting to work properly, you'd need asynchronous serial communications where you could send the clock pulse from your host controller to the guest system. This is what ShapeShifter/BII/SheepShaver don't support. There are probably ways around this, but none will be easy.
etienned
Space Cadet
Posts: 4
Joined: Wed Nov 02, 2016 2:39 am

Re: Trying to run old 68k app with MIDI - OS 7.1.1

Post by etienned »

@24bit Thanks for the info and the link. I've downloaded the 8.1 version (my app run fine under 8.1) and tried to boot from this system. On the first boot it worked until the desktop appear then it freeze and do a lot of beeps. After that, my other attempts to boot just gives me the diskette with the flashing question mark. ROM and setting are Quadra 700. Maybe it's not working because I'm running Fusion in DOSbox (Boxer to be exact)? Or I have wrongly set something (memory, etc)?

@adespoton Thanks for the clarification. In fact, it was initially my understanding of the problem but as you wrote that I could set my modem port to a /dev/ device I was a bit lost. So I try it anyway!

I think that I put enough time on the emulation solution now. From now I'll go another way to run this app (I'll probably recode it).

Thanks to all the great peoples that are on this forum!
Post Reply