MIDI via UART in RISC OS


3 posts
by novoline » Mon Nov 05, 2012 8:56 am
Hi,
Not sure if this was the right subforum as it falls under peripheral, RISCOS, Multimedia and Interfacing :cry:
I've posted on the RISCOSOPEN forums about this as well but I'd like to broaden who I can reach to get some help/answers.
I am trying to get MIDI to work on an Atari emulator and interface with the rPi hardware. The first hitch was that the linux port of Hatari* (even on the barest of Linux distros I could manage to find) doesn't run at full speed, i.e. an 8mhz 1MB RAM machine cannot be emulated at 100%.
With the release of RISC OS on the rPi I quickly jumped to that anticipating the already-ported !Hatari for ARMv7 chips be recompiled shortly to run on the ARMv6, and sure enough after a few days it was, and it's running at full speed fantastically.
Now I'm at a point with little know-how and a very new OS (new to the rPi platform I mean) hoping for either a USB** driver for MIDI be written or some OS-level stuff be written for interfacing with the UART pins on the GPIO. Neither of which I know how to do and my programming level is as high as a compsci B.S. and a few years as a Q/A analyst can get you. So I've maybe got the skills but not the know-how, or the talent but not the experience. Something like that.

I put forth: USB or GPIO -> I'd like to know which route is easier, which route is better, which route is possible, how can it be done, what to look out for, what hurdles can there be?

*I went directly to Hatari because AFAIK, it is the only ST emulator that has functioning MIDI in Linux and the !Hatari uses the same source.
** From reading and correspondence I know of a ~20% performance hit when USB MIDI is used in Linux, but maybe this depends solely on the driver and Linux's nature and in RISC OS this may not be (as big as) an issue?

Thanks,
NL
Posts: 3
Joined: Wed Oct 24, 2012 12:32 pm
Location: Berlin
by Ibanezjem » Thu Nov 15, 2012 3:56 pm
Hi, I've had a look at this and my initial results are at https://www.riscosopen.org/forum/forums/5/topics/1444 if you haven't already seen it.
The init_uart_rate=38400 as suggested on other sites didn't work for me. I think this may be because RISC OS does transmit something on the serial port at boot up and may set another baud rate then, possibly 115200.
I found that using init_uart_clock=813802 in CONFIG.TXT worked with a BASIC program I wrote.
I don't know what software can make use of this yet, but if you can write your own, then go for it!
Stephen.
User avatar
Posts: 33
Joined: Tue Mar 20, 2012 7:58 pm
Location: Stafford, UK
by novoline » Sun Nov 25, 2012 10:17 pm
Nice! That's great progress. I am going on a trip soon but when I get back i'm excited to take a stab at this over the holidays; haven't written basic in a while but excited to try with RISCOS.
Posts: 3
Joined: Wed Oct 24, 2012 12:32 pm
Location: Berlin