Game BASIC Update: More Homebrew Unearthed

For those of you interested in Game BASIC for Sega Saturn, I have a pretty cool update! I mentioned in the full article that the Internet Archive Wayback Machine did a nice job of archiving several Japanese Game BASIC-related sites from back in the day. In my exploration of those archives, I’ve managed to dig up several interesting programs that don’t seem to have filtered out to the English-language web. (Or, at least, they weren’t archived by Satakore.) One is a small but very well made game, while the other two are fairly robust demos. Here’s more info:

Naruto v1.0

So far as I can tell, this has absolutely nothing to do with the cartoon, so don’t get your hopes up if you’re a fan! Instead, the title refers to the spiral/whirlpool pattern that forms the basis of the game. This is an interesting one-button game, somewhat reminiscent of the old classic Snake. But instead of wandering freely around the screen eating food, you’re a constantly spiraling line. The basic goal is the same, though: last as long as you can without running into anything else, all while constantly growing. Holding a button changes the angle of travel. Last as long as you can to rack up high scores and earn big bonus points by skimming the edge of the line.

The unique gimmick of this game is that it saves a recording of your gameplay to the backup device of your choice. The author even held a high-score competition and asked that players send in their best replays! The downloadable archive includes several of these for you to watch and compete against.

This game was created by NAKATH, who produced several other Game BASIC games and demos. There are two version of this archive available, though both contain the same source code and documentation. The difference is that the November 1999 version includes gameplay recordings that were submitted to the author by other players.

Below are links to the original files. I’ve also provided alternate links in the Game BASIC forum thread, along with English translations of the Readme file.

To browse more of NAKATH’s work, here’s a full directory link to browse everything in the Wayback Machine’s archive of his site. You can find some other little demos and games, as well: https://web.archive.org/web/*/http:/www.dcn.ne.jp/~nakath/*

Operation Apollo 1

Another one by the prolific NAKATH, this one was apparently inspired when the author viewed the movie Apollo 13! This is a fairly robust gravity demo with a central object (apparently the moon) and an orbiting rocket. You can change the rocket’s angle with the D-Pad and engage its thrusters by holding the A button, thus changing its orbit speed and angle. Zoom in and out with the L and R buttons.

Again, I have provided an English translation and mirrored downloads of the files in the Game BASIC forum thread.

Do Dan Baku

Roughly translating to “Rage Bomb,” this demo is vaguely reminiscent of a Bomberman game, giving you control of a small character in a top-down arena. But instead of dropping your own bombs, you wander around, setting off the bombs that appear and grow automatically. Set off a chain reaction for big points! This seems incomplete, though, as there are no obstacles or enemies, just a very long timer. Still, it’s pretty satisfying to let the screen fill with bombs and then set them all off at once. (Note: this program requires a standard digital control pad to be inserted in port 1 to run.)

The provenance of this game is a little less clear to me than the ones above from NAKATH. I found the program in an archive of SegaNet.com. The source file credits the programmer as “Bois,” but I’ve been unable to find anything else by this person. There is no readme to translate, but I’ve provided a mirror of the archive and translation of the program headers in the Game BASIC forum thread:

Hopefully you have the chance to explore and enjoy these pieces of Sega Saturn history! If setting up a whole Game BASIC environment to play old games and demos seems intimidating or like a hassle, I’m working on instructions for how to create bootable ISOs to run Game BASIC programs in emulators or on original hardware. Stay tuned! In the meantime, if you find any other interesting programs that deserve to be shared, please leave a comment here or in the forum thread.

Running N64 homebrew the absurd way: The GameShark Pro loader

Do you really, really want to play homebrew on your original N64 hardware? Is a flash cart just too pedestrian and mainstream for you? Do you posses a GameShark Pro, a 4MB Expansion Pak, and a brain disease that makes you enjoy doing things the hard way? Well, I sure do! And hoo boy, do I have a project for you…

Read on, brave souls, for herein lies the story of how I played a commercial homebrew NES game (legally purchased electronically from Steam) on my N64 via an NES emulator, which I loaded with a GameShark Pro that was interfaced to my Windows 10 PC via a very specific USB-to-Parallel adapter, that was then passed through to a lubuntu virtual machine running via VirtualBox, containing a USB GameShark homebrew loader program.

Doesn’t that sound fun?

This method made the rounds on the web a couple of years ago, but nobody really described how to do it in layman’s terms and the information was a bit scattered. So when I found out about it, it still took some piecing together. Let’s rectify that and make the method as clear as possible. Let’s get started!

The Background

What You’ll Need

  • An original N64 with a 4MB Expansion Pak installed
  • A GameShark Pro with a functional parallel port
  • A USB-to-Parallel adapter based off of a MosChip 7705 bridge
  • The ability to run Linux (I prefer lubuntu on VirtualBox for these sorts of projects)
  • A copy of gs_libusb
  • Your favorite NES ROM (I highly recommend Micro Mages! The Steam version even includes a legal NES ROM that works perfectly for this project.)

The basic goal for this project is that we need to run a Linux application called “gs_libusb” to transfer programs to our GameShark Pro. The tough part is how to get them talking to each other.

The hardest part of making this work might be sourcing the USB-to-Parallel adapter. Any old adapter off of Amazon or eBay or whatever just won’t work. As I mentioned in my post about connecting the GameShark to a PC, it’s only possible to do this with an adapter based off of a MosChip MCS7705 bridge (in fact, gs_libusb is hard-coded to look for it). I don’t know how to identify whether a random cable has this chip, so hunting one down is hard. I did manage to figure out that the USB-1475 manufactured by Cables Unlimited contains this chip and works well. These specific cables don’t seem to be produced anymore and are hard to come by these days. If anyone knows of other cables that contain the right chip, please let me know by leaving a comment.

Next, you’ll need to have the right version of the GameShark Pro. Versions 3.1, 3.2, and 3.3 all came with parallel ports on the back. All versions of 3.1 and 3.2 should work, but only certain versions of 3.3 carts will work. With version 3.3, some contain a working parallel port and some don’t. Usually, GameSharks with a speckled-looking case will work. The folks over at Micro-64 have a good explanation of the difference. (That article also explains how to load homebrew with legacy PC hardware, so check it out if you have an old Windows 98 machine lying around and can’t find the USB-to-Parallel adapter that’s needed for this method.)

Enough rambling, let’s get to it. Here’s the method…

The Method

Step 1: Set up your virtual machine

I won’t go into much depth here about how to set up a virtual machine, I’ll just reiterate that I like lubuntu and Virtual Box for projects like this. Go through the normal setup process for any virtual machine and you’ll be good to go. Here are the important configuration changes you’ll need to make once your install is complete:

  • Install the Virtual Box Extension Pack: By default, Virtual Box only supports USB 1.1. Installing the Extension Pack will allow us to configure USB 3.0.
  • Set your virtual machine to use USB 3.0: Without this step, you’ll be relegated to USB 1.1 and probably get a lot of very frustrating USB timeout errors when you attempt to load anything to the N64. Once the Extension Pack is installed, edit the USB settings for your virtual machine to set them to USB 3.0 mode. Then, with the USB-to-Parallel adapter plugged into your host machine, add a USB device filter for “MosChip Semiconductor MCS7705 Parallel port adapter [0100].” This is what will allow the virtual machine to see your adapter. Or, alternately, add a blank filter to allow all USB devices to pass through.
  • Optional – Install the VirtualBox Guest Additions for Linux: This isn’t strictly necessary, it just makes life easier by allowing you to copy/paste files from Windows to Linux and share a clipboard. Instructions for the install are at the VirtualBox site. I highly recommend doing this, unless you prefer to map network drives to do file sharing between systems.

Step 2: Compile gs_libusb

This is the loader program that will send files to the GameShark Pro, but it’s just provided as source code and needs to be compiled on your system. It’s not too hard, just follow these steps on your Linux machine:

  • Install libusb 1.0 dev libraries: libusb is a tool that allows programs to communicate with USB devices. Your system may have the binaries installed already, but we’ll need the libraries to compile our own code with it. To get them, open a terminal prompt and enter the following commands…
sudo apt-get update
sudo apt-get install libusb-1.0-0-dev
  • Download and extract the gs_libusb project: Grab the whole project from the Github page (download it as a .zip) and extract it to a reasonable directory somewhere, such as your home directory.
  • Compile the code: Open a terminal window in the root gs_libusb-master directory and type the following commands…
sudo make clean
sudo make

Assuming your libusb 1.0 libraries installed correctly, the compile should run quickly, and that’s all there is to this step. You’ll see warnings, but they can be safely ignored.

Step 3: Prepare your N64

Now we need to make sure that the N64 is ready to accept a program we send it. Just do the following…

  • Ensure your N64 has a 4MB Expansion Pak installed: This step is absolutely required, this simply won’t work without an Expansion Pak.
  • Plug in your GameShark: Use a common game, such as Super Mario 64 or Pilotwings 64, in the top slot. Avoid anything that uses the Expansion Pak memory.
  • Plug the USB-to-Parallel adapter into the GameShark: This should be self-explanatory.
  • Boot your game: Power on your N64 and choose to start your game. Make sure to turn the Code Generator ON and start the game Without Cheats. Once the game begins, your GameShark is ready and waiting for commands on the parallel port! (I typically use Super Mario 64, loaded up to the Select File screen.)

Step 4: Run the loader

Finally, the real step. With our VM prepared, gs_libusb compiled, and our N64 waiting patiently, let’s send it something to run!

  • Plug the USB-to-Parallel adapter into your PC: Be careful here and ensure that the VM actually picks it up and sees it. Run the following command at the terminal to ensure the MCS7705 is listed. If it’s not, check your VM’s USB settings and make sure that your host PC hasn’t “claimed” the device. (Unplug it and plug it back in with the VM running.)
lsusb
  • Copy your ROM to the gs_libusb-master/examples directory: Really, you can put the ROM anywhere on your Linux machine, this will just make the next command simpler.
  • Execute the loader to run an NES emulator and your ROM: Run the following command from the root gs_libusb-master directory. It will load Neon64 and and whatever ROM you specify in place of YOUR_ROM.bin!
sudo ./gsuploader/gsuploader examples/neon64gs.bin examples/YOUR_ROM.bin
  • Let everything load: Here, all you have to do is wait. Your N64 will appear to freeze while the load is happening; that’s okay. Once the load is complete, you should see the Neon64 main screen. Hit any button and play! At any time, you can hit L+R to bring up the main menu.

Step 5: Run other programs

  • The examples folder contains a simple demo program that you can run, too. With everything set up and working, just run the following command to load it instead of neon64gs.bin:
sudo ./gsuploader/gsuploader examples/flames.bin
  • It’s also possible to build and run your own programs to be compatible with this load method. To do so, you’ll need to install gsdevkit, which will give you a complete GameShark-compatible homebrew toolchain. Go knock yourself out!

Much of the info in this tutorial was gleaned from the relevant GitHub Readme files and the following video. Have a look if you want to see someone walk through running the loader:

Running Homebrew on the N64 Without an Everdrive

Sega Saturn Homebrew with Game BASIC

Sega Saturn for Game BASIC - Complete in Box
Game BASIC for Sega Saturn – Complete in Box

Part 1: Introduction

Summary

Game BASIC for Sega Saturn is a homebrew development kit that allows you to program games for the Sega Saturn using the BASIC programming language.  If you’re familiar with the PlayStation’s Net Yaroze platform, think of this as the Saturn’s answer to it – just cheaper and easier to get started with.

Game BASIC’s use of the BASIC language makes for a very low barrier to entry in terms of programming skill.  Though the Saturn is notoriously difficult to program for, Game BASIC makes it easy to get started and is surprisingly powerful, allowing very easy sprite manipulation and straightforward 3D polygon implementation.  It even includes an adapter cable that allows you to communicate with the Saturn from your PC to transfer or save programs and streamline development. For example, here’s a Pilotwings-esque demo, but in Game BASIC:

“Jump” demo, provided with Game BASIC (video courtesy Satakore.com)

The caveat?  Game BASIC was released only in Japan, so this means a complete setup can be difficult to obtain and all documentation is in Japanese!  Moreover, the supporting software that allows you to use your PC for streamlined development was intended for the Windows 95 era and flat out does not install on modern systems. Oh, and the adapter cable that allows you to connect your Saturn to your PC is a 25-pin serial connection!

Who in the world still has both Game BASIC and a Windows 95 PC with a physical serial port? Nobody!  (Well, unless you’re Modern Vintage Gamer) But if you’re a brave experimenter who’s not afraid to tinker a bit, there are still multiple options to get everything working, even today!  You can even do a lot just via emulation.  So, let’s head to the Lab and get started…

Continue reading “Sega Saturn Homebrew with Game BASIC”