VOGONS


Emulating MT-32 on an RPi2

Topic actions

Reply 20 of 292, by stamasd

User metadata
Rank l33t
Rank
l33t

If the Pi zero is too underpowered, my next platform to try is this: http://www.aliexpress.com/item/Orange-Pi-PC-l … 2448079125.html

Orange Pi, software-compatible with the Raspberry, 4 A7 cores at 1.6 GHz, half price of the Pi3. I have a couple in the mail.

Or this: http://www.aliexpress.com/item/Orange-Pi-One- … 100009.2.pnCzdQ Twice the price of the zero, but has ethernet and 4 cores at 1.2GHz.

I/O, I/O,
It's off to disk I go,
With a bit and a byte
And a read and a write,
I/O, I/O

Reply 21 of 292, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++

I thought about an Allwinner board, but opted not to as their Linux kernel support has been historically awful. The lesser amount of RAM might cause problems for me as well if I decide to use really big soundfonts for the GM/GS side.

It would certainly have plenty of performance to run Munt, though.

keropi wrote:

there is a Pi3 now, faster and better - maybe it will work fine with this project

Looking at the architectural info from ARM, the A53 is fully backwards compatible with the A7 architecture. I see no reason why the same instructions couldn't be followed for a Pi 3, and certainly the performance is there. I haven't tested, though.

Last edited by gdjacobs on 2016-03-11, 01:56. Edited 1 time in total.

All hail the Great Capacitor Brand Finder

Reply 22 of 292, by stamasd

User metadata
Rank l33t
Rank
l33t

There is a board with 2GB RAM for about the same price as a RPi3 IIRC.

(edit) No, it'ss $55, but has other cool gadgets too (onboard wifi, SATA etc). None of which of course do anything for Munt.

I/O, I/O,
It's off to disk I go,
With a bit and a byte
And a read and a write,
I/O, I/O

Reply 25 of 292, by stamasd

User metadata
Rank l33t
Rank
l33t

I had completely forgotten about this one. Some time ago I had ordered an Odroid-C2 that was not released yet. I received it in the mail today. 😀

It's an ARMv8 development board, same form factor as the RPi. Has a 4-core Cortex-A53 at 2GHz, 2GB RAM, 40-pin GPIO compatible with RPi (well except for 3 pins), microSD and eMMC slots, etc. http://www.hardkernel.com/main/products/prdt_ … 16438&tab_idx=1

Runs Ubuntu 16.04-ARM, not Raspbian though I wouldn't be surprised if Debian were available soon. Costs $5 more than the RPi3, with faster CPU and twice the memory.

I'm installing the OS as I type this, then it's off to play.

Should have plenty of power for MT32 emulation methinks.

I/O, I/O,
It's off to disk I go,
With a bit and a byte
And a read and a write,
I/O, I/O

Reply 26 of 292, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++

It has A53 cores at a higher clock than the Pi 3. I guarantee it will have plenty of power. I suggest finding and using the recommended code generator flags for GCC. Please post what you use and what your results are!

Edit:
I had a quick look at some documentation from GCC and ARM. It's not quite as nice and clear, but I cobbled together a set of declarations which should work with an A53 based CPU in a 64 bit Linux. Please let me know if they cause any problems.

export CCFLAGS="-Ofast -mcpu=cortex-a53"
export CXXFLAGS="-Ofast -mcpu=cortex-a53"

Edit: Removed FPU spec, presumably not needed for ARM8.

Last edited by gdjacobs on 2016-03-16, 03:34. Edited 2 times in total.

All hail the Great Capacitor Brand Finder

Reply 27 of 292, by gerwin

User metadata
Rank l33t
Rank
l33t

I admire the effort to use the Raspberry Pi 1/2/3 for retro gaming one way or the other. Like RetroArch. Or for just about anything else. Though I think my transition will be to linux on x86 first, before diving into something non-x86. A lot of my knowledge and all my tools will just be useless on Raspbian(Debian/Linux)+ARM systems... I don't think I feel for using Windows 10 either. OS dilemma...

--> ISA Soundcard Overview // Doom MBF 2.04 // SetMul

Reply 28 of 292, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++
gerwin wrote:

I admire the effort to use the Raspberry Pi 1/2/3 for retro gaming one way or the other. Like RetroArch. Or for just about anything else. Though I think my transition will be to linux on x86 first, before diving into something non-x86. A lot of my knowledge and all my tools will just be useless on Raspbian(Debian/Linux)+ARM systems... I don't think I feel for using Windows 10 either. OS dilemma...

Well, grab one of those cheap LGA 775 boards Phil's always telling us about and give it a go!

All hail the Great Capacitor Brand Finder

Reply 29 of 292, by gerwin

User metadata
Rank l33t
Rank
l33t

As long as it is compact, I am interested. I have my eye on a AMD E-350 Mini-ITX. Since it makes a nice video streamer too. Problem with Mini-ITX is that I again need a fitting PSU and Case. For now I'll just keep looking and pondering, Don't have much spare time anyways. And as with time Windows urguably gets worse and Linux gets better, the situation will slowly change.

--> ISA Soundcard Overview // Doom MBF 2.04 // SetMul

Reply 32 of 292, by stamasd

User metadata
Rank l33t
Rank
l33t
gdjacobs wrote:
It has A53 cores at a higher clock than the Pi 3. I guarantee it will have plenty of power. I suggest finding and using the reco […]
Show full quote

It has A53 cores at a higher clock than the Pi 3. I guarantee it will have plenty of power. I suggest finding and using the recommended code generator flags for GCC. Please post what you use and what your results are!

Edit:
I had a quick look at some documentation from GCC and ARM. It's not quite as nice and clear, but I cobbled together a set of declarations which should work with an A53 based CPU in a 64 bit Linux. Please let me know if they cause any problems.

export CCFLAGS="-Ofast -mcpu=cortex-a53 -mfpu=neon-vfpv4"
export CXXFLAGS="-Ofast -mcpu=cortex-a53 -mfpu=neon-vfpv4"

I finally got around to playing with it a bit.

The g++ supplied (g++ (Ubuntu/Linaro 5.3.1-11ubuntu1) 5.3.1 20160311) does not recognize "-mfpu=neon-vfpv4" as a valid option. Still looking.

c++: error: unrecognized command line option ‘-mfpu=neon-vfpv4’

I/O, I/O,
It's off to disk I go,
With a bit and a byte
And a read and a write,
I/O, I/O

Reply 34 of 292, by stamasd

User metadata
Rank l33t
Rank
l33t

I was told elsewhere that the correct flags are:

-march=armv8-a+crc -mtune=cortex-a53

Will attempt again when I have time.

Also, https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html
There is no '-mfpu' option for AArch64

I/O, I/O,
It's off to disk I go,
With a bit and a byte
And a read and a write,
I/O, I/O

Reply 35 of 292, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++

Regarding the mfpu flag, I noticed that when you got the error. I was guessing out loud why that was. Presumably armv8 is a little better defined as far as execution units than armv7 was.

All hail the Great Capacitor Brand Finder

Reply 36 of 292, by stamasd

User metadata
Rank l33t
Rank
l33t

I'm stalled for now. I can't install Qt5 on Ubuntu-16.04-arm64 due to conflict between mesa and the mali driver. Will try another distribution soon, which is supposed to have a fixed driver that avoids the conflict. 🙁

Edit: compiled successfully on a custom Debian Jessie-arm64. Testing to follow.

I/O, I/O,
It's off to disk I go,
With a bit and a byte
And a read and a write,
I/O, I/O

Reply 37 of 292, by stamasd

User metadata
Rank l33t
Rank
l33t

Hmm. On the Odroid-C2, I get the following output

silviu@odroid-jessie64:~/munt/munt.git/trunk/mt32emu_alsadrv$ sudo mt32d
MT-32 emulator ALSA address is 128:0
Buffer resize: Requested 40 msec got 40 msec / 60 periods
Set thread priority to -20
Set thread priority to -20
Starting MT-32 core
silviu@odroid-jessie64:~/munt/munt.git/trunk/mt32emu_alsadrv$ aconnect -o
-bash: aconnect: command not found
silviu@odroid-jessie64:~/munt/munt.git/trunk/mt32emu_alsadrv$ sudo aconnect -o
sudo: aconnect: command not found
silviu@odroid-jessie64:~/munt/munt.git/trunk/mt32emu_alsadrv$ cat /proc/asound/seq/clients
Client info
cur clients : 1
peak clients : 2
max clients : 192

Client 0 : "System" [Kernel]
Port 0 : "Timer" (Rwe-)
Port 1 : "Announce" (R-e-)
Client 14 : "Midi Through" [Kernel]
Port 0 : "Midi Through Port-0" (RWe-)

i.e. I don't see that the system has actually registered the MT-32 emulator. Not sure how to proceed from here.
BTW, on the Pi zero, mt32d segfaults. I rebuilt it and it still does the same.

I/O, I/O,
It's off to disk I go,
With a bit and a byte
And a read and a write,
I/O, I/O

Reply 38 of 292, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++

What alsa packages do you have installed on the C2?

What compiler flags did you use on the Pi zero?

All hail the Great Capacitor Brand Finder

Reply 39 of 292, by stamasd

User metadata
Rank l33t
Rank
l33t

I used the flags you posted on the Pi zero.

export CCFLAGS="-march=armv6zk -mcpu=arm1176jzf-s -mfloat-abi=hard -mfpu=vfp"
export CXXFLAGS="-march=armv6zk -mcpu=arm1176jzf-s -mfloat-abi=hard -mfpu=vfp"

Can't look at the packages on the C2 as I'm compiling something else on it at this time, and it's a bit touchy (memory-intensive, don't want to open another terminal to it as it has killed the compiler before). Will update.

I/O, I/O,
It's off to disk I go,
With a bit and a byte
And a read and a write,
I/O, I/O