Setting up a Raspberry Pi for compiling rpix86

I had ordered a Raspberry Pi 2 about a week before, and on Friday the 5th of June it arrived! I spent that weekend setting it up, with a goal of switching my rpix86 programming work over to the newer and faster Pi. Almost since my original Raspberry Pi was new, I have been having some SD card related problems with it. It runs for a couple of hours, then it suddenly starts failing with "Journal has aborted" and "journal commit I/O error" messages, after which I can only turn it off and back on. After the restart it again works for a couple of hours. I have been worrying that it will eventually corrupt my SD card, and I would have a hard time restoring my rpix86 build system back to working order.
So, when I got my new RPi 2, I copied all my rpix86 sources over, and then just began trying to compile it. For future reference I'll log here all the compile and linking errors I encountered and how I solved them. This should help me in the future if I need to reinstall everything at some point.

  1. The first problem was
    /usr/include/interface/vmcs_host/vcgencmd.h:33:27: fatal error: vchost_config.h: No such file or directory I googled for solutions to this problem, and according to this forum post one (if perhaps not the best) way to solve this is to simply edit the vcgencmd.h file to have the correct path to that include file. I did that, which fixed this problem.

  2. Next I encountered
    fatal error: X11/Xlib.h: No such file or directory This got solved by installing the X11 development environment:
    sudo apt-get install libx11-dev
  3. The next step was to build the libilclient.a library, which was missing. This was done by running make in the /opt/vc/src/hello_pi/libs/ilclient directory.

  4. The next problem was that the curses libraries were missing. I use the ncurses library when rpix86 is launched from the terminal window. To fix this I just needed to install the ncurses development package.
    sudo apt-get install libncurses5-dev
  5. Somewhat strangely, next I needed to add -ldl -lm to my Makefile. I did not need to have these libraries specifically included in my original Raspberry Pi Makefile, for some reason.

  6. Finally, I wanted to access my Raspberry Pi 2 rpix86 folder from my Windows 8.1 PC, similarly to how I had shared the corresponding folder on my original Raspberry Pi. I used the instructions in this post for the basic Samba configuration, and then just copied the relevant /etc/samba/smb.conf sections from my old Pi over to the new Pi 2:
    [rpix86] comment = rpix86 share path = /home/pi/rpix86 valid users = @users force group = users create mask = 0666 directory mask = 0777 read only = no [ipc$] valid users = nobody @users I remember having some problems when I tried to configure samba on my original Pi, but this time it began working immediately. I think it was that last [ipc$] section that was originally missing, and it seems to be required for Windows access to Raspberry Pi.

Work on supporting TradeWars 2002 continues

Since my last blog post I received some additional information about how to properly install and set up TradeWars 2002 (thanks for that!), and found out that I still had some FPU opcodes unimplemented. I implemented the missing FPU opcodes, which made the game progress further. I am currently looking into the problem where the game exits back to DOS with the following error message:
Opening Planet File TW2002 has ended in error. The errorcode is 205 EC=205 LF=StrTable.D8A L1= L2=ReadAt_STRING_TABLE Addr=11F6:7E33 I have managed to use the built-in debugger to run up to the top level routine (that calls some subroutines where this error happens), and am currently in the process of digging deeper into those routines to determine the actual cause. Tyrian SoundBlaster audio fails on Raspberry Pi 2

I was also told that the SB digitized audio crashes Tyrian 2000 in rpix86 running on a Raspberry Pi 2, but on my old original Raspberry Pi it works fine. I am looking also into this problem now that I have my own Raspberry Pi 2. This looks like some timing or thread synchronization problem. The original Pi only has a single CPU core, so it does not need as much thread synchronization as a proper multi-core CPU that the newer Raspberry Pi 2 has. It seems that the problem is a non-present SB buffer table segment, but determining why the buffer is not present when the first SB IRQ occurs still needs further digging into.
Thanks again for your interest in my work on rpix86, I plan to release a new version after I get at least these two games working properly in rpix86.