Thursday, October 27, 2016

Music References in Retro Videogames

As long as there have been people producing music, the muses of the past have provided them with inspiration. This is also true for video games, granted sometimes the line between inspiration and outright plagiarism was crossed. The original inspiration for this article came as the result of the similarities and references of the music in the game Earthbound and American popular music. Set in a peculiar representation of American and Western culture, the game has close to three hours of soundtrack that is inspired by American and English popular music from the previous decades. A lot of references come from The Beatles, and even the character naming screen hosts a hidden sample of the intro to Monty Python. If you listen closely to the recording, you can tell that the sample that plays in the background throughout Your Name Please actually the Monty Python intro being sampled and not just the song from the intro; called The Liberty Bell March.

There are plenty other examples of music references in video games. I wanted to make this article a little different than the other articles and videos out there and point out similarities I have found, rather than copy the hundreds of webpages and Youtube videos out there. For example, I am under the impression that the Earthbound song Humeresque of a Little Dog samples Arlo Guthrie's Alice's Resturant. Have a listen; comment below and tell me what you think.

Earthbound - Humoresque of a Little Dog (Buy Something Will Ya) / Arlo Guthrie - Allison's Restaurant

Mega Man's Electric Man Stage / Journey's Faithfully

Black Sabbath's The Mob Rules / Maximum Carnage on the SNES.
Ok, so this one is outright plagiarism, the song is copied note for note, including the guitar solo.It sounds like the programmers wanted The Mob Rules to be the backing track to this stage and did the best they could.

Ys III Dungeon / Metallica's Call of Kthulu
Listen specifically to the intro bass, it matches Metallica's bass about 33 seconds into the song

Ys IV / Yngwie Malmsteen - Far Beyond The Sun
When I showed my friends this similarity and I told them that I liked the Ys music, one of them told me that if I liked that bullshit music I should just listen to Yngwie Malmsteen. So I did, and that's how I came across this similarity. I wouldn't be surprised if there isn't a lot more similarities between the what they Falcom in-house band recorded and Yngwie Malmsteen.

Koji Kondo who has done music for the Zelda series and Punchout has cited Deep Purple as an influence on his work, which brings us to the next two examples:

Punch Out - Get Up Mac / Deep Purple's Burn

Zelda's Dungeon / Deep Purple - April 
You can also hear the Zelda overworld music in Deep Purple's April.

Neo Geo Basebal Stars / Van Halen's Jump

Street Fighter II - Ken's Stage / Cheap Trick's Mighty Wings
Mighty Wings was written for the film Top Gun and makes me wonder if at one point Ken's music was supposed to be Guile's theme music instead. Thank god we didn't get a theme or stage based off of Playing With The Boys.

Finally, here's some music from Road Rash III. It doesn't sample anything in particular as far as I know. It does sound like Motohead though, which means it kicks ass.

Saturday, October 22, 2016

The Famicom Disk System

The Famicom Disk System was a peripheral released for the Nintendo Famicom which would let Japanese consumers plays their Famicom games on disks instead of cartridges. This article explores why such technology was developed and produced, as well as why it never saw a release outside of the Japanese market. Despite the obscure history of the FDS to us westerners, it was released in Japan in 1986 where the peripheral had over 50% market penetration and where Famicom disk kiosks were not fully discontinued until 2003. Nintendo continued to service disk systems until October 2007. By the time I had finished this article and my research on this topic, I ended up with more questions than I had answers to in regards to this peripheral.

In the nineties Japanese Nintendo console peripherals were borderline urban legends in the US. The NES, SNES, and N64 all had add-on peripherals that were released in Japan but never in the US. I am under the impression that even a test release of a NES modem in Minnesota never actually saw the light of day for two reasons. First, with a supposed test release of 10,000 units one would expect to see units turn up for sale every once in a while on the Internet, or show up at swap meets; even if they were to be recalled once the market test was over. Second, all images of the modem look like they were taken from a promotional VHS tape, leading me to believe the modem was never even released. This sort of muddled history has led to a lot of fascination, speculation, and rumors about what all those expansion slots under our Nintendo consoles were for!

The biggest contributor to the release of the FDS might have been the chip shortage of 1988. In 1986 there was a semiconductor trade pact between the US and Japan. While the pact was aimed at helping U.S. chip makers compete with Japan, at the insistence of the US, Japan agreed to cut back on worldwide chip exportation and also gave up a twenty percent portion of their worldwide market share. The US government anticipated that this would give US chip makers a chance to grab a bigger piece of worldwide chip production The plan was an economic failure, and anticipating the political situation, the release of the FDS may have been a move by Nintendo to continue to produce games in Japan through the shortage. Disks were cheap, re-writable, inexpensive especially compared to the price of chips, and were in ready supply.

Early on, the chip shortage also lead my into the biggest contradiction I ran into while writing this article. Nintendo may have simply played up the chip shortage to their advantage. Even today, Nintendo is renowned for under supplying retailers in their orders. Go ahead and ask the mom and pop retailer in your town about their Nintendo orders through their distributors. Right now collectors are scrambling to find the NES Mini. And remember the Amiibo shortage? This practice of under supplying goes all the way back to the NES and Famicom, and is heavily documented Blake Harris' book Console Wars. While the chip shortage certainly was real, Nintendo used it as leverage to create demand, and hype around their intellectual property while simultaneously avoiding flooding the market with too much product; a lesson learned from Atari and the video game market crash in 1983.

The disks allowed for 128KB of storage, 64KB on each side, which was twice of the typical cartridge at the time. As the diskettes were re-writable, it was possible for the first time ever to actually save your home console games on the disk. Battery backed memory did not exist until the 1987 U.S. release of The Legend of Zelda. ASCII, the creators of the Wizardry series, actually made an accessory called the Turbofile which was a hard drive that plugged into the Famicom's expansion port and could save games and characters' progress to. It also allowed players to import their characters into sequels of the Wizardy games.

The FDS also came with a RAM expansion cart which also included an extra sound channel, and a second graphics processor for scaling, rotation, and compression which only a few un-noteworthy games used. The second graphics processor was technically impressive for the Famicom, but in the end was not implemented to make any great games. Despite being advertised as an expansion, that was not really the purpose of the RAM adapter. Game data would be read from the disk, stored on the expansion RAM, where it was then read by the Famicom. As a result this meant that these games had loading screens. Can you imagine playing Zelda and having to wait for the dungeon to load? In a Youtube video Clyde "Tomamto" Mandolyn said that this is an aspect of classic Nintendo that Japanese gamers are nostalgic for. They say that the clicking of the FDS when a dungeon in Zelda was loading was like the sounds of stepping down the steps into the dungeon.

Another aspect of the FDS were disk kiosk machines which would allow you to write, and rewrite your games onto the proprietary Nintendo diskettes. Because the disks were two sided you could have a 64KB game on each side of the diskette. In a way the FDS is comparable to the rental industry in the US, which Nintendo vehemently battled the legality of. In Japan the rental industry in terms of media is illegal. In 1986 a new FDS game out of the package cost about $14, and about $3 at a disk kiosk. In comparison a new NES game in 1987 in America could cost $45 or more! The impermanent state of the media, as well as the reduction in cost of physical hardware, manuals, and logistics meant a reduced cost for consumers. It's just a shame these same prices are not reflected today in Nintendo's eShops.

The FDS was released in February of 1986 with The Legend of Zelda as one of the launch titles. Less than a year later, in January of 1987, The Adventures of Link was released for the FDS. A Famicom cartridge version of The Legend of Zelda in Japan would not be released until 1994, right before the release of A Link To The Past for the Super Nintendo. In comparison, copies of LoZ did not come into North America until around August 1987 and Zelda II in December of 1988. This delayed release date was beneficial for the US version of the game, there are major regional improvements between the Japanese and North American versions of Zelda II.  The FDS added an extra sound channel, although preference is simply a matter of taste and familiarity. Japanese players, for example, have said that the Zelda Theme music just doesn't sound the same without its iconic bells.

The second reason that the disk system was released may have been due to the hardware architecture of the NES and Famicom. To a certain extent, The NES and Famicom were very similar to the Commodore 64. And for clarification, the Famicom and Nintendo Entertainment System are the same in terms of internal hardware outside of the pin connectors, as far as I know. The only exception I can think of is that European consoles often had slower processor clock speed in order to accommodate the slower refresh rate of PAL television set. The NES CPU is a Ricoh 2A03 MOS 6502 core, a slightly older model than the Commodore 64's CPU the MOS 6510, the NES's CPU is identical to the CPU in the Commodore Vic-20, released before the C64. Here in the States, most of the popular home computers and game machines used a 6502 or some variant of it. Which, incidentally, was designed by a Commodore subsidiary. This is also why, for example, so many bad games were released for the NES. Commodore Games game like Winter Games, and Karate Champ were often quickly ported to the NES by publishers; often terribly. For example, the box for Karate Champ has a screenshot of a part of the game that's not even in the NES version! They weren't necessarily bad games, just bad ports of Commodore games!

While Japan had the Family Computer, we had the Entertainment System. The simplest explanation as to the difference was marketing. Nintendo, entering the home console market in the U.S. after the video game crash had to be very particular in marketing their new system. Indeed, early prototypes and patents of the NES were a personal computer complete with a keyboard and cassette data recorder. As a result of the system being the Family Computer in Japan, it may have been Nintendo's intention all along to release a disk peripheral for their system. And Nintendo did in fact eventually release in Japan a keyboard, BASIC cartridge for the system, as well as the cassette deck for saving levels in "programmable games" such as Excitebike and Wrecking Crew. The save feature was notorious for not doing anything in the U.S. releases. Nevertheless cassettes were slower than diskette and less reliable. So while cassettes were probably fine for programming hobbyists and making your own courses in Excitebike, the average consumer did not have much interest in this component of the Famicom. 

Releasing a watered down computer with the promise of expansions released down the line was a way to release new technology at an affordable cost. By stripping down the Commodore architecture and building a small console Nintendo was able to get video games back into living rooms across America. By offering BASIC for the Famicom Nintendo was dipping their toes in the hobbiest market without taking much of a risk. Sony did something similar with the Playstation 2 in 2009, offering a Linux development kit for their system.

Even though the Disk System sits under the Famicom, there is no underside expansion port like the NES. The Famicom, however, does have a fifteen pin expansion port at the front of the copnsole for third party controllers and accessories, such as the aforementioned ACSII Turbo File. This port probably existed to offer customers alternatives to the Fanicom controllers being hardwired into the system. The Famicom Light Gun for example, used this port. It is possible to get the disk system working on a toploading NES, or a toaster NES if you open it up to get access to the pin connectors.

A Youtube user by the name of Chykn80 demonstrated, that you could use the expansion port at the bottom of the NES to run the Famicom BASIC cart with the Famicom keyboard! Some of the pins that the FDS uses in the Famicom were relocated to the expansion port of the NES as well. This Wiki page has mapped the pinouts of the NES expansion port.

Back in Japan, the disk system had become obsolete well before the Famicom's lifespan. Final Fantasy, released in 1987 at 145KB, would not have even fit on a Famicom disk. There were reports that by July of 1989 Konami had released a 1-meg cartridge. However this was the MSX release of the game, a Japanese personal computer. The Famicom version still managed to be over a whopping 300kb though. Many publishers simply did not release games on the FDS. The low price of the games meant even smaller revenue for the publishers and developers who were already paying Nintendo large licensing fees for the right to publish on the Famicom. The advantage of save state technology was often off set by the fact that games utilizing save states often took much longer to produce and develop than other games and therefore were more costly. Third party publishers that did release games on the FDS usually failed. The most prominent example is Squaresoft who spawned a spiff-off company along with a handful of smaller smaller partners called Disk Original Group (DOG) where they both published and released games for the FDS. In less than two years DOG went bankrupt. Had this venture been successful Final Fantasy would have almost certainly been released for the FDS. Perhaps even developed differently under a different name since Squaresoft might not have been in such dire straights. 

By 1987 battery backed SRAM was finally a reality and we saw games on cartridges with save states for the first time. In fact battery, backed memory might have been engineered by Nintendo in order to solve the save state problem. I was unable to find an earlier example of save states on a cartridge based system or computer BIOS before the Legend of Zelda on the NES. If you have any details or information on battery back memory storage in general please email me! While battery save games were more expensive to produce, this could often be off set by password systems. Metroid, Castlevania, and Kid Icarus were all FDS releases that utilized save states in their Japanese releases. The NES hardware was not originally designed with save states in mind. Battery backed save states in cartridges were almost certainly an afterthought. Games with save states would warn you to hold reset while turning off the system otherwise the NES' CPU would experience power spikes that potentially would write data at random locations, including the battery-powered registers of the cartridge, overwriting and corrupting savegames in the process. Holding RESET would send the CPU into a low-power state which would prevent any power surge from overwriting any register. This issue was resolved in future Nintendo consoles.

I've never been really good at writing endings to long articles or papers, and I really didn't know where or when to end this article. The disk system ended up being a rabbit hole I couldn't find the bottom to. The history of the Disk System and NES are so multifaceted that it is difficult to write about it without writing about technology, politics, or marketing. I hope you find the article interesting or helpful. If you have anything you'd like to add please comment below or send me a line.

Saturday, August 20, 2016

How to Set Up a Civilization V Server

2K Game's instructions on how to set up a Civ V server are unfortunately lacking. While the instructions will get you on right path to initially getting the server SDK running, you will be plagued with crashes and errors. After over a week of trying to figure out how to correctly configure a Civ server, I decided to make my own guide. Let me be the first to welcome all of you die hard Civ V fans, and those that are waiting for the two expansions packs to be released for Civ VI so you can actually play the game.

I like to play Civ with my friends, unfortunately we are not all able to play at the same time. Online play without hosting your own server means that other players cannot connect and disconnect at will, which can be a problem if you like to take breaks and play a game that can span over a few days. This mode we are going to set up is called Pitboss mode and offers players the most versatility and control when playing online with friends. Below you will find the steps to get started.

Installing for the first time:

1. Ensure that network port 27016 is open to UDP communication on the server's router. Consult your router manual for instructions. The dedicated server does not use Steam's NAT punch-through facilities, so turn on port forwarding.
2. We're going to skip the email settings for now, and come back to that later.
3. Install Sid Meier's Civilization V SDK. This can be found in the Tools section of your Steam Library.
4. Launch Sid Meier's Civilization V SDK.Make sure that *everything* successfully installs. One problem I experienced early on was that the specific version of .NET Framework was not installing successfully; I was getting an error message every time it tried to install. In that case there ended up being an issue with my installation of Windows and I had to reformat.
5. Select Dedicated Server from the SDK Launcher. Once Civ boots successfully you can exit out of the game for now.

Running a Pitboss game without crashing:

- Run in windowed mode at a lower resolution. Also turn down all graphics to their minimum setting.
- Leave the game on the player list; no map view. After all looking at the map would be cheating.
- Use the Server specific launcher in the SDK menu. 
- Run Steam in offline mode.
- Sometimes players ending their turn wont be recognized server side until the game window is put into focus on the computer you're using.
- On default windows update will restart your computer at 3AM. You will need to configure this so that you don't need to restart your game every other morning or so.

Setting up email notifications: 

The instructions for setting up an email notification on 2K's forums are correct. However you will still have to change some settings in Gmail once you have followed the steps provided. After getting the server options set up in the SDK you will need to log into Gmail and go to Settings>Forwarding and POP/IMAP. Here you need to disable IMAP.

After that you will need to go to the My Account page for your Google account (NOT Gmail, but the Google account itself). From there you need to go to My Account>Sign-in and Security>Connected Apps and Site and then turn on the option that says Allow Less Secure Apps. Otherwise when the turn bot goes to do its thing, you will just get an email instead saying that an unsecure app is trying to access your Gmail. This most likely happens because the emails sent out by your server are unencrypted.

This is what a turn notification looks like:

The game name reflects my frustration of dealing with over a week of server crashes.
Since the SDK tends to crash when Steam is in online mode, Steam notifications aren't really an option. As a result getting email notification on your phone is probably the best way to go about turn notifications as of right now.

Joining a pitboss game:

If you encounter a bug where a player or two are getting "error joining multiplayer session" it is probably because they don't have some small chunk of DLC that the game was hosted with. In this case it's best to remove that DLC option from the settings menu, even if you aren't using it. Otherwise the game may boot into vanilla Civ. The easiest way to tell if this happens is if you get the loading screen in the background that looks like the Atlas statue, and on game start you wont see tourism or faith.

If you listed your game as private other players will need to type in your IP and hit enter to connect. Otherwise if you are playing on a computer behind the same router or network as the server you will be be able to find the game listed under local network.