<?xml version="1.0" encoding="UTF-8"?>
<metadata>
  <identifier>nintendo-lodgenet-gateway-system-rom-collection</identifier>
  <mediatype>software</mediatype>
  <collection>prototypesandpress</collection>
  <creator>Nintendo</creator>
  <description>&lt;h1 class="title" style="margin:0px 0px 15px;padding:0px;font-size:32px;text-align:center;font-family:'pt sans';"&gt;&lt;br /&gt;&lt;/h1&gt;&lt;p class="post-meta" style="margin:0px 0px 15px;padding:0px;color:rgb(130,130,130);text-align:center;"&gt;Tuesday April 25th, 2023 - &lt;em class="post-category" style="font-family:'source sans pro', Lato, Helvetica;font-size:16px;"&gt;Nintendo 64&lt;/em&gt;&lt;/p&gt;&lt;div class="post-content" style="margin-bottom:30px;color:rgb(17,17,17);font-family:'source sans pro';font-size:18px;background-color:rgba(255,255,255,0.95);"&gt;&lt;p style="margin:0px 0px 15px;padding:0px;font-size:1.5rem;"&gt;32 N64 ROMs (31 games, one tool) have been recovered from a LodgeNet system!&lt;/p&gt;&lt;p style="margin:0px 0px 15px;padding:0px;font-size:1.5rem;"&gt;Many hotels in the late 90s and early 2000s were equipped with the “LodgeNet” system, allowing guests to play Nintendo games from their hotel rooms. Several consoles were supported in this system, but the N64 is one of the most memorable and sought after by the preservation community.&lt;/p&gt;&lt;p style="margin:0px 0px 15px;padding:0px;font-size:1.5rem;"&gt;In order for a game to be provided on the LodgeNet system, it needed some &lt;a href="http://n64devkit.square7.ch/info/submission/gateway/01-01.html" style="color:rgb(170,170,170);" rel="nofollow"&gt;modifications&lt;/a&gt;. There was no way to store save data, there was no Rumble Pak, and it only supported a single controller. Because of this, LodgeNet ROMs are different from any currently dumped versions of their games.&lt;/p&gt;&lt;p style="margin:0px 0px 15px;padding:0px;font-size:1.5rem;"&gt;For a long time, these modified games had been considered lost to time. However, a small group of preservationists recently acquired a complete LodgeNet system, which included the hard drives containing the games. The following is an explanation of where the ROMs in this release came from and how they were recovered.&lt;/p&gt;&lt;h2 style="margin:0px 0px 15px;padding:0px;font-weight:400;font-size:32px;"&gt;Preservation&lt;/h2&gt;&lt;h3 style="margin:0px 0px 15px;padding:0px;font-weight:400;font-size:26px;"&gt;Dumping the drives&lt;/h3&gt;&lt;p style="margin:0px 0px 15px;padding:0px;font-size:1.5rem;"&gt;The system data was stored on 11 IDE harddrives of various sizes ranging from 80 to 250GB.&lt;/p&gt;&lt;p style="margin:0px 0px 15px;padding:0px;font-size:1.5rem;"&gt;Each drive was mounted via USB and dumped using &lt;code style="font-size:15px;border:1px solid rgb(232,232,232);background-color:rgb(238,238,255);padding:1px 5px;"&gt;ddrescue&lt;/code&gt;. This meant the whole disk was preserved, not just the current contents according to the filesystem. Each drive was assigned a number based on the order that it was dumped in.&lt;/p&gt;&lt;p style="margin:0px 0px 15px;padding:0px;font-size:1.5rem;"&gt;Most of the drives used the UFS partition system and could not be easily mounted under Linux. Mounting the drives under FreeBSD showed very little data - certainly no ROMs sitting around.&lt;/p&gt;&lt;p style="margin:0px 0px 15px;padding:0px;font-size:1.5rem;"&gt;Looking at the drives in a hex editor, it was clear that there were at least remnants of some N64 ROMs, and so the goal was clear: &lt;em&gt;Recover as much data as possible!&lt;/em&gt;&lt;/p&gt;&lt;h3 style="margin:0px 0px 15px;padding:0px;font-weight:400;font-size:26px;"&gt;Pulling data from hard drive images&lt;/h3&gt;&lt;p style="margin:0px 0px 15px;padding:0px;font-size:1.5rem;"&gt;There were two drives that were the target for extraction of the ROMs.&lt;/p&gt;&lt;p style="margin:0px 0px 15px;padding:0px;font-size:1.5rem;"&gt;One drive, “drive A”, contained what appears to be a ‘live’ partition for the server, containing the ROMs as used by the actual system.&lt;/p&gt;&lt;p style="margin:0px 0px 15px;padding:0px;font-size:1.5rem;"&gt;The other, “drive B”, was a backup drive, which contained an additional backup copy of various files, including ROMs (as it turned out, some ROMs were only present on this drive, so it was a lucky break).&lt;/p&gt;&lt;p style="margin:0px 0px 15px;padding:0px;font-size:1.5rem;"&gt;The combination of these two drives is what allowed the ROMs to be extracted without directly taking apart the file system.&lt;/p&gt;&lt;p style="margin:0px 0px 15px;padding:0px;font-size:1.5rem;"&gt;While some ROMs were possible to extract with only one drive (such as the ones only on drive A), many others were fragmented in ways that made them difficult to assemble on their own.&lt;/p&gt;&lt;p style="margin:0px 0px 15px;padding:0px;font-size:1.5rem;"&gt;Two approaches were taken to put them together, which we’ll call “striping” and “daisy chaining”.&lt;/p&gt;&lt;h4 style="margin:0px 0px 15px;padding:0px;font-weight:400;font-size:20px;"&gt;Striping&lt;/h4&gt;&lt;p style="margin:0px 0px 15px;padding:0px;font-size:1.5rem;"&gt;The file system on these systems (UFS) stored files as a combination of blocks. These blocks would be interlaced with the file system’s own header/alignment blocks.&lt;/p&gt;&lt;p style="margin:0px 0px 15px;padding:0px;font-size:1.5rem;"&gt;However, it’s not guaranteed that the blocks of a file were all in a row.&lt;br /&gt;&lt;/p&gt;&lt;p style="margin:0px 0px 15px;padding:0px;font-size:1.5rem;"&gt;In these cases simply stripping out the FS blocks would not work - you’d get parts of another file or another ROM. But, since the next part was usually close in sight, and we had two drives, we could ‘stripe’ to check whether the next block was part of the same file or not.&lt;br /&gt;&lt;/p&gt;&lt;p style="margin:0px 0px 15px;padding:0px;font-size:1.5rem;"&gt;Since usually at least one drive would have a contiguous next block (usually drive A, the backup drive), this approach worked to recover just over half of the ROMs on the drives.&lt;/p&gt;&lt;p style="margin:0px 0px 15px;padding:0px;font-size:1.5rem;"&gt;In addition, it helped provide additional evidence that the dumped data we were getting was correct, since it was sourced on two drives instead of one.&lt;/p&gt;&lt;p style="margin:0px 0px 15px;padding:0px;font-size:1.5rem;"&gt;However, for the remainder of the ROMs, either the blocks being different on &lt;strong&gt;both&lt;/strong&gt; drives, or other problems (as we’ll see later) meant another method had to be used.&lt;/p&gt;&lt;h4 style="margin:0px 0px 15px;padding:0px;font-weight:400;font-size:20px;"&gt;Daisy-chaining&lt;/h4&gt;&lt;p style="margin:0px 0px 15px;padding:0px;font-size:1.5rem;"&gt;While in the previous diagrams, the fs blocks were shown as being in line between the two drives, in reality this wasn’t usually the case.&lt;/p&gt;&lt;p style="margin:0px 0px 15px;padding:0px;font-size:1.5rem;"&gt;This didn’t stop the striping method above from working when the fs blocks were accounted for, and contrary to what you might think, it actually &lt;em&gt;helped&lt;/em&gt; when it didn’t work.&lt;/p&gt;&lt;p style="margin:0px 0px 15px;padding:0px;font-size:1.5rem;"&gt;Because the blocks were out of line, it meant that we could rely on the overlap to help locate the next block on the other drive.&lt;/p&gt;&lt;p style="margin:0px 0px 15px;padding:0px;font-size:1.5rem;"&gt;This approach meant that it didn’t matter where the missing block was, it could have even been &lt;em&gt;earlier&lt;/em&gt; in the drive and it still would allow extraction.&lt;/p&gt;&lt;p style="margin:0px 0px 15px;padding:0px;font-size:1.5rem;"&gt;All but one or two ROMs were able to be extracted with the two above methods. The remainder were usually because two files shared the same block without an FS block to separate them.&lt;/p&gt;&lt;p style="margin:0px 0px 15px;padding:0px;font-size:1.5rem;"&gt;It’s not obvious why this even happens - perhaps the files were stored in some kind of archive file (this would make a lot of sense for drive A as it is a backup drive), but these cases were managed by eyeballing the point of divergence and manually locating the final parts.&lt;/p&gt;&lt;h3 style="margin:0px 0px 15px;padding:0px;font-weight:400;font-size:26px;"&gt;Decryption &amp;amp; checksumming&lt;/h3&gt;&lt;p style="margin:0px 0px 15px;padding:0px;font-size:1.5rem;"&gt;A while before the drives were obtained, we released the &lt;a href="https://forestillusion.com/2022/gateway-64-host-v1-2-lodgenet" style="color:rgb(170,170,170);" rel="nofollow"&gt;Gateway 64 Host software&lt;/a&gt;. This program was responsible for communicating with the game consoles, and is also capable of converting Z64 roms into the format used by the Gateway64 system.&lt;/p&gt;&lt;p style="margin:0px 0px 15px;padding:0px;font-size:1.5rem;"&gt;We reverse engineered the Visual Basic scripts that were extracted from this software in order to understand how the communication protocol worked, and also how an N64 ROM was transformed into a Gateway64 ROM and info file. After a bit of work, we noticed there were calls to an external DLL, for the encryption.&lt;/p&gt;&lt;p style="margin:0px 0px 15px;padding:0px;font-size:1.5rem;"&gt;Using Ghidra, we reverse engineered the encryption algorithm, and using unicorn, we ran the code from the original DLL in order to check our reimplementation was matching. Once the encryption worked, we encrypted some files and then worked on decryption using the information we had gained.&lt;/p&gt;&lt;p style="margin:0px 0px 15px;padding:0px;font-size:1.5rem;"&gt;Finally, matching decryption was worked out (a round trip plaintext -&amp;gt; ciphertext -&amp;gt; plaintext produces the same plaintext) and some tests were made to make sure it worked in all cases. Within the encryption code, there was also checksumming code, which was also reimplemented and used to verify the contents recovered from the drives.&lt;/p&gt;&lt;p style="margin:0px 0px 15px;padding:0px;font-size:1.5rem;"&gt;This release includes the corresponding i64 files for each rom, which were found on the drives intact. The i64 roms include the last two bytes of the encryption checksum as well as a custom user-supplied name for the rom.&lt;/p&gt;&lt;h3 style="margin:0px 0px 15px;padding:0px;font-weight:400;font-size:26px;"&gt;List of ROMs found&lt;/h3&gt;&lt;p style="margin:0px 0px 15px;padding:0px;font-size:1.5rem;"&gt;In total there were 38 N64 games released for LodgeNet. We managed to find and recover the following 31:&lt;/p&gt;&lt;ul style="margin:0px 0px 15px 30px;padding:0px;"&gt;&lt;li&gt;1080 Snowboarding&lt;/li&gt;&lt;li&gt;Donkey Kong 64&lt;/li&gt;&lt;li&gt;Dr. Mario&lt;/li&gt;&lt;li&gt;Excitebike&lt;/li&gt;&lt;li&gt;F-Zero X&lt;/li&gt;&lt;li&gt;Gauntlet Legends&lt;/li&gt;&lt;li&gt;Hydro Thunder&lt;/li&gt;&lt;li&gt;Kirby 64: Crystal Shards&lt;/li&gt;&lt;li&gt;Legend of Zelda: Majora’s Mask&lt;/li&gt;&lt;li&gt;Legend of Zelda: Ocarina of Time&lt;/li&gt;&lt;li&gt;Mario Golf&lt;/li&gt;&lt;li&gt;Mario Kart 64&lt;/li&gt;&lt;li&gt;Mario Party 3&lt;/li&gt;&lt;li&gt;Mario Tennis&lt;/li&gt;&lt;li&gt;Midway’s Greatest Arcade Hits&lt;/li&gt;&lt;li&gt;Mortal Kombat 4&lt;/li&gt;&lt;li&gt;The New Tetris&lt;/li&gt;&lt;li&gt;Paper Mario&lt;/li&gt;&lt;li&gt;Pilotwings 64&lt;/li&gt;&lt;li&gt;Pokemon Snap&lt;/li&gt;&lt;li&gt;Rampage 2: Universal Tour&lt;/li&gt;&lt;li&gt;Ready 2 Rumble Boxing&lt;/li&gt;&lt;li&gt;Rush 2: Extreme Racing USA&lt;/li&gt;&lt;li&gt;Star Fox 64&lt;/li&gt;&lt;li&gt;Star Wars: Rogue Squadron&lt;/li&gt;&lt;li&gt;Super Mario 64&lt;/li&gt;&lt;li&gt;Super Smash Brothers&lt;/li&gt;&lt;li&gt;Virtual Chess&lt;/li&gt;&lt;li&gt;Virtual Pool 64&lt;/li&gt;&lt;li&gt;Wave Race 64&lt;/li&gt;&lt;li&gt;Yoshi’s Story&lt;/li&gt;&lt;/ul&gt;&lt;p style="margin:0px 0px 15px;padding:0px;font-size:1.5rem;"&gt;There was mention of &lt;em&gt;Namco Museum 64&lt;/em&gt; in a database backup found on one of the drives, but no data to recover (nor header or checksum information), suggesting that if the game had been available once, it had long since been deleted.&lt;/p&gt;&lt;p style="margin:0px 0px 15px;padding:0px;font-size:1.5rem;"&gt;There were no traces of the other 6 N64 games released for LodgeNet:&lt;/p&gt;&lt;ul style="margin:0px 0px 15px 30px;padding:0px;"&gt;&lt;li&gt;Extreme-G&lt;/li&gt;&lt;li&gt;Forsaken 64&lt;/li&gt;&lt;li&gt;Iggy’s Reckin’ Balls&lt;/li&gt;&lt;li&gt;Milo’s Astro Lanes&lt;/li&gt;&lt;li&gt;San Francisco Rush: Extreme Racing&lt;/li&gt;&lt;li&gt;Turok 2: Seeds of Evil&lt;/li&gt;&lt;/ul&gt;&lt;h3 style="margin:0px 0px 15px;padding:0px;font-weight:400;font-size:26px;"&gt;Other stuff&lt;/h3&gt;&lt;h4 style="margin:0px 0px 15px;padding:0px;font-weight:400;font-size:20px;"&gt;eeerase&lt;/h4&gt;&lt;p style="margin:0px 0px 15px;padding:0px;font-size:1.5rem;"&gt;In addition to the games, the system used a ROM named eeerase which is responsible for clearing out the EEPROMs and SRAM, used for game saves, that are present on the Gateway64 hardware. This piece of software is run before each game is run. This was likely done, as opposed to modifying the games, in order to make the list of changes required to each game as simple as possible, since the game saves aren’t kept between plays.&lt;/p&gt;&lt;/div&gt;</description>
  <scanner>Internet Archive HTML5 Uploader 1.7.0</scanner>
  <subject>N64;Nintendo;Prototype;Development;Debug;Sample</subject>
  <title>Nintendo LodgeNet 64 (Gateway System) ROM Collection</title>
  <uploader>wiiprotos@gmail.com</uploader>
  <publicdate>2023-04-25 23:15:33</publicdate>
  <addeddate>2023-04-25 23:15:33</addeddate>
  <curation>[curator]jscott@archive.org[/curator][date]20230509181042[/date][state]un-dark[/state][comment]Not Spam[/comment]</curation>
  <noarchivetorrent>true</noarchivetorrent>
  <collection>softwarelibrary</collection>
  <collection>emulation</collection>
</metadata>
