PDA

View Full Version : rpix86 v0.04 released! - Dos(PC) Emulator for RaspBerry Pi Released



wraggster
April 3rd, 2013, 22:59
via http://rpix86.patrickaalto.com/rblog.html

Version 0.04 information
In case you are not interested in reading my whole blog post, here first is the most important information about the changes in this new version:

Added support for 80x50 text mode. This is used by some of my old MIDI software, and also by Little Big Adventure setup program.
Added support for USB analog joysticks (and foot pedals). Like in the old DOS days, up to 4 buttons and 4 analog channels are supported.
Added emulation of Roland MPU-401 MIDI ports in "dumb UART" mode. All the MIDI commands are sent to /dev/midi1 device, so if you have a General MIDI synth connected to your RPi using an USB MIDI dongle, you should now get proper MIDI music out of your DOS games.
Stripped out the debug symbol information from the executable, as that decreased the size of rpix86 to less than half of what it was.

Sudden jump in interest for rpix86After I released version 0.03, I began working on the Android version of my emulator, as it looked like my new rpix86 release did not generate much interest (I received no emails nor any forum messages (http://www.raspberrypi.org/phpBB3/viewtopic.php?f=78&t=32934) about it for the first two days after the release). I managed to create a download system for 4DOS.COM into my Android version as well. I am still relatively new to Android programming, so I was pretty proud of myself for getting this working after spending just a few hours of work on it.
Then suddenly on Tuesday evening I got several emails concerning rpix86, and also the Raspberry Pi forum thread seemed to suddenly have more views and replies than before. The same thing continued on Wednesday. On Thursday I then checked the web statistics of my rpix86 subdomain, and at first glance I thought there was some sort of a statistics error or hacking attempt going on. The normal traffic of about 50 visits per day had suddenly jumped to over 3000 visits per day!
After checking the "connected from" list of web sites, I realized that the statistics were probably correct, rpix86 had been mentioned on the Hack A Day (http://hackaday.com/2013/03/26/raspberry-pi-the-perfect-machine-for-old-dos-games/) site, and there had been over a thousand hits per day from that article alone to my web pages! No wonder the general interest had suddenly increased!
rpix86 and DOSBox relationshipIn the comments of that Hack-a-day post there are some outright accusations of rpix86 being a *significant* ripoff of DOSBox. Even though everyone who reads these blog posts of mine will be able to immediately dismiss such accusations as untrue, I feel like it might be a good idea for me to address them here anyways. You can perhaps imagine that after working almost 4 years bulding my emulation core from the ground up opcode by opcode, it is pretty annoying having someone dismiss it offhand as a simple copy of some other software.
As a proof that rpix86 is a ripoff of DOSBox, one commenter has found three (3) functions that have the same names in rpix86 as in DOSBox: DasmI386, DasmLastOperandSize and op386map1. The author conveniently fails to mention that the remaining 56600 or so (based on the output of listing the symbol table of rpix86 and counting the resulting number of lines) functions in rpix86 have no counterpart in DOSbox. I would not consider 0.005 per cent similarity to be in any sense *significant*, but perhaps that is a matter of opinion.
The other issue that the author brings up is a possible GPL violation. Since I use the same names in my disassembler routine (which by the way is never executed during the normal run of rpix86, it is only used if/when rpix86 crashes) and the code seems to be very similar, the author thinks this is obviously a GPL violation. However, the debug_disasm.cpp source module in DOSBox is based on earlier work done by Robin Hilliard, which was released under Apache License (which does not force derivative works to be released as open source). His original source code is available for example here (https://code.google.com/p/squidutils/source/browse/trunk/Std/disasm.cpp?spec=svn2&r=2). Both DOSBox and my disassembler routines are based on this original implementation, I named my routines similarly to DOSBox simply to keep track of the bug fixes done by the DOSBox people, which I also might need to do to my version of the code. This was pretty much the first code I made into DSx86 back in the summer of 2009, and it has only had a few minor bug fixes and changes done to it after that time.
You would be hard pressed to find any other similarities between rpix86 and DOSBox, as I have made sure not to violate any licenses, and have sourced information from many other sources besides DOSBox. For example my DOS int21h emulation routines are much more closely related to FreeDOS (http://en.wikipedia.org/wiki/FreeDOS) than to DOSBox, as I used FreeDOS as an example when coding all those routines, not DOSBox.

If you are interested in the main architectural differences between my rpix86 and DOSBox, you might be interested in checking out the history of my emulation core. The roots of my emulator are explained in my earliest DSx86 blog posts, so if you are interested feel free to read them (from the bottom up if you wish to read them in chronological order):

See here (http://dsx86.patrickaalto.com/DSblog.html) for DSx86 blog entries from July-December 2012.
See here (http://dsx86.patrickaalto.com/DSblog2012a.html) for DSx86 blog entries from January-June 2012.
See here (http://dsx86.patrickaalto.com/DSblog2011b.html) for DSx86 blog entries from July-December 2011.
See here (http://dsx86.patrickaalto.com/DSblog2011a.html) for DSx86 blog entries from January-June 2011.
See here (http://dsx86.patrickaalto.com/DSblog2010b.html) for DSx86 blog entries from July-December 2010.
See here (http://dsx86.patrickaalto.com/DSblog2010a.html) for DSx86 blog entries from January-June 2010.
See here (http://dsx86.patrickaalto.com/DSblog2009.html) for DSx86 blog entries from 2009.

MIDI supportLast week I got an email asking whether rpix86 would support MIDI, specifically running an old DOS MIDI sequencer program. I had not thought about this possibility at all, until this email message. I began to think about this, and realized that it should not be all that difficult to have rpix86 emulate a Roland MPU-401, and then send and receive all MIDI messages to/from the /dev/midi1 device. Since I already had an EDIROL UM-1EX USB MIDI interface and still have my old Akai X-7000 Sampling Keyboard (from around 1989), it looked like I actually have everything I need to code and test support for MIDI! Well, everything except a powered USB hub, which I then purchased on my way home from work.
I then hunted for some software to use for testing, and remembered my own old MidiTracker from 1991, which I used to play MOD files via MIDI using my Akai sampler. When testing it I realized I did not yet have 80x50 text mode support in rpix86, so before I could start working on the MIDI support I needed to code support for that text mode. My MidiTracker (same as my old LineWars II game) only used the "dumb UART" mode of the Roland MPU-401, so I started by coding support for that. After some coding I managed to get both MTRACKER and LW2 to detect a Roland MPU-401 MIDI interface in rpix86, and send the MIDI notes all the way to my Akai sampler. My MTRACKER should be able to also send the MOD samples to my sampler, but for some reason this does not seem to work. The sampler never acknowledges the received MIDI SYSEX header, and I have not yet found out the problem. This should not affect any of you rpix86 users, though, so fixing this is a low priority. If you are interested in MidiTracker, it is available here as MTRACKER.ZIP (http://patrickaalto.com/MTRACKER.ZIP). The zip contains also documentation and full source code.

Download Attached