Monday, February 20, 2023

Mame-Nabu under Linux

I bought a Nabu PC, a new batch has went up for sale. I missed the first batch and decided I was not going to buy one, but as usual, I find my impulse control to be lacking. It is going to be a while before it arrives, so I decided to check out the Nabu PC Mame emulator, so I could check out the Nabu Internet Adapter software so I could sort that out before I got my machine and maybe do some programming on it. I am not going to go into how to set that up, it is easy enough to do. You can get it at https://nabu.ca/

The problem I did run into was getting the emulator. The only pre compiled binaries were for Windows and there were no instructions on what you needed to get it running under Linux. It was not just a matter of install it from a repo or downloading the code and compiling it, Nabu support is new and is not available in the mainline code. I am going to assume you have some experience in using Linux, otherwise you would not be doing this.

Goto https://github.com/brijohn/mame/tree/nabupc_wip, click on the <>Code button and click on Download zip. Do not use git to retrieve the code, for some reason the nabupc code is not included in the git repository, but is included in the zip file. Once you have it downloaded, extract the file and cd into the folder containing the code.

To compile Mame, you will need some dependencies, install them using this command;

sudo apt-get install git build-essential python3 libsdl2-dev libsdl2-ttf-dev libfontconfig-dev libpulse-dev qtbase5-dev qtbase5-dev-tools qtchooser qt5-qmake

You can just type "make" at this point and it will build, however this will build Mame with everything and will take a while to do, we really only need it to build the Nabu emulator, so we start the compile process with;

make SOURCES=src/mame/nabu/nabupc.cpp REGENIE=1

Next go grab the Windows Nabu Mame file from here, https://gtamp.com/nabu/nabu-mame.zip. This file has everything needed including the ROM files and disk images, this will save you a bit of time in figuring out what you need and where to put it. Extract it to where you plan to run the emulator from. Delete mame.exe, floppy-boot.cmd and nabu.cmd, you will not need these files. Next copy the mame executable you just built into this new folder.  Run the Nabu Internet Adapter, and start the TCP service, you must do this before you start the emulator, or it will crash. You can now run the emulator with this command.

./mame nabupc -window -kbd nabu_hle -hcca null_modem -bitb socket.127.0.0.1:5816

That is it, the emulator should come up and connect automatically.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Mastodon