Hacker News new | past | comments | ask | show | jobs | submit login
GoldenEye (N64) has a fully-functional ZX Spectrum 48x emulator built into it. (therwp.com)
241 points by emillon on March 29, 2012 | hide | past | favorite | 47 comments



I wrote a NES emulator for ExciteBike 64, so that the original 8-bit ExciteBike could be played as an unlockable level. The hardest part was getting the audio to sound approximately right!

Fun fact: NES Excitebike supported saving and loading your custom tracks to the Famicom Data Recorder. The USA version of the FDR was never released, but the USA version of NES Excitebike still had all the save/load code+functionality built in. When you tried to save a track it would just hang for a while before returning to the menu. After figuring out where the save/load routines were, and where the track was stored in RAM, we were able to put hooks in the emulator to save the tracks to the N64 cart.


Audio seems to be a problem in a lot of emulators... SNES emulators had issues with sound for years. (wind blowing in FF3 (6j) being the one I always remember) I guess it's because of trying to support the capabilities of the actual sound chip?

Also the bit about the track saving is fantastic. Thanks for sharing!


No worries! Audio emulation can be hard for a couple of other reasons too: Firstly, it's sometimes easy to tell that something "isn't quite right", but unless you have awesome ears (I don't), it's hard to hear exactly what the problem is. Secondly, audio isn't the sexiest part of emulator development - it often gets overlooked, and consequently there's far less information available about it.

As it happens, audio emulation on the ZX-Spectrum 48k is easier: There's a one-bit on/off output wired to a speaker. Even generating tones has to be done by timing Z80 cycles! Some people still managed to do amazing things using pulse-width modulation.


> I guess it's because of trying to support the capabilities of the actual sound chip?

This may be the case for some emulators -- such as the NES emulator in excitebike. However, (if I understand everything I've read correctly) the SNES didn't have a 'sound chip' in the same sense that the NES (or GameBoy, C64, etc.) did. The NES and all of Nintendo's other hardware used to synthesize its sound in real-time, but that changed with the SNES, which introduced sample-based audio instead. (Fun fact: some people suggest that the N64's sampled audio can meet -- or exceed -- CD quality!)

These pages know more about SNES audio than I do:

http://chipmusic.org/forums/topic/217/so-super-nintendo/ http://en.wikipedia.org/wiki/Super_Nintendo_Entertainment_Sy...

I suspect issues with SNES emulation are simply that all of the SNES emulators we have are fairly poor in _all regards_, it's just that it's easier to notice in the sound than in things like timing.

Here are some examples of the other failings of many SNES emulators:

http://byuu.org/bsnes/accuracy


The SNES sound hardware was a little bit more complicated than that.

It has a control CPU, and it's own RAM, with no access to the contents of the cartridge, or to main RAM. Obviously, you have to emulate all of that accurately, or the code that controls the sound output might not work correctly.

The actual hardware is more complicated than just a sample mixer. It's implemented as a custom DSP, which does sample decompression, high quality resampling, mixing, has an envelope generator, several effects (programmable FIR filter, echo, panning), and a noise generator.

Older SNES emulators didn't really emulate any of this. They treated it as if it were a simple sample playback device. This worked OK for most games, because they didn't use those features. However, when a game actually used those features, everything sounded wrong.

Later, they started supporting the effects, but nobody understood how the DSP was actually implementing those effects, so they didn't sound quite right. They just implemented stuff that sounded about right on the games they were testing on. Reverse-engineering all the hardware, so this stuff could be emulated accurately, took a very long time.

Right now, the SNES audio hardware is completely understood. We have several emulators that are perfectly accurate, both in terms of timing, and output. For example:

http://www.slack.net/~ant/libs/audio.html#snes_spc

Both ZSNES and bsnes use that library, and I believe that Snes9x is nearly as accurate now.

That said, I don't think anyone's actually dumped the DSP's program code.


The amount of stuff that lies hidden in video game codebases for decades never ceases to amaze me.

See http://tvtropes.org/pmwiki/pmwiki.php/Main/DummiedOut

If this kind of thing interests you, then you will very probably enjoy the story of the legendary Ocarina of Time Debug Cart

http://www.assemblergames.com/forums/showthread.php?23285-Or...

http://tcrf.net/The_Legend_of_Zelda:_Ocarina_of_Time_(Debug_...

Also, I'd just like to take a moment to show some appreciation for Rareware, one of the greatest game dev houses ever. They're responsible for so many great childhood memories, as well as breaking many technical and artistic boundaries.


> See http://tvtropes.org/pmwiki/pmwiki.php/Main/DummiedOut

You bastard.

> The Cutting Room Floor is a site dedicated to unearthing and researching unused and cut content from video games.

Seriously, stop it. I have things I have to do like eat and sleep. If I'm found starved to death at my computer, you'll know who to blame.

> http://tcrf.net/Final_Fantasy_VII/Debug_Room

"In the latest case of video game related violence, shinratdr was found dead at his house today, after spending two straight weeks reading about content cut from various video games. He was about to quit when he stumbled upon the page for the FFVII debug room and all hope was instantly lost. He will be missed, I guess."


Yeah sorry about that. Should've given some warning.


Looks like the server is busy with requests. Here's a cached version: http://webcache.googleusercontent.com/search?q=cache:http://...


Neat. Jetpac actually shipped as a playable sub-game in Donkey Kong 64, so I guess this emulator was ultimately used there.


Later on in the linked thread, the original poster seems to indicate that it doesn't appear to be the same emulator - or at least that the big chunk of code for the controller mapping isn't retained in Donkey Kong 64.

Perhaps they did a quick port or trimmed the emulator to fit the requirements of that specific game.


I remember a friend being excited before Donkey Kong 64's release because he'd heard about the Jetpac sub-game - I wonder if he already had Goldeneye...

I just felt old on realising that the N64, which I remember reading previews of in Edge magazine, is as old now as the 48k Spectrum (treasured artefact of my childhood) was when the N64 came out. It helps a little that I didn't see an N64 in action until 3 years after its Japanese release.


The N64 is actually the only console I've ever played... I had a Commodore 64 and then Amiga all they way through the "early console years", and only played some N64 stuff because a house mate bought one.

Then I sort of fell out of gaming apart from a bit of simulation and strategy games... Getting tempted again these days when I see how far they've gotten. With a young son taking up my time I suspect it'll be him that'll be the excuse...


Very nice, but do they mean ZX Spectrum 48K? I've never heard of a 48x.


Yeah, it looks like a typo. A Google search for "ZX Spectrum 48x" shows this article as the top result, and the Wikipedia page only lists the 48k and 16k.


This was the greatest video game ever made.


Watching your arms float around disjointedly as you run is the best part, or taking 25 sniper shots to kill a guard. I went from playing MW3 one morning to Goldeneye in the afternoon and it was mindblowing.


I spent plenty of time playing GoldenEye; it was a good game. But the hyperbole surrounding it on the internet is unbelievable.

It was released in August 1997. Even if you only care about the first-person shooter genre, Duke Nukem 3D had already been out for over a year, and it was a much more sophisticated game.


Sophistication wasn't what made GoldenEye great. I think the four person multi-player and control accessibility are what made GoldenEye such a big hit. There was something very fluid and "easy" about the controls in GoldenEye. Many of my friends that never played FPS made the jump for that game, and we spent countless hours swearing like sailors as we killed each other in the archives.


I liked it for the fun single player level design mostly. The game engine also paid a lot of attention to details othe fps did not. Different reactions based on where the bullet hits an enemy. Security cameras. Alarms. Stealth sections.


I really enjoyed the music and atmosphere. It really made you feel like you were in a James Bond movie. I also enjoyed all the shout-outs to the old movies too - stuff like the Moonraker level.


Definitely agree that it was the multiplayer that made it a hit.

I had a friend who memorized the respawn pattern for some of the levels in goldeneye. He also memorized paths quick enough from spot to spot to be at the right spot every time you respawned.

He'd only have to kill you once. After that, you'd respawn and meet a bullet in the back of your head, respawn, bullet in the head, respawn, bullet in the head, until endgame.


My friends and I hung a golf club with cardboard hanging from it across the TV so that you couldn't see past your half of the screen in team mode. Suddenly, recognizing the sounds of particular doors became a valued skill.


I didn't memorize the respawn pattern but I knew where all of the respawn spots were, so I'd throw a proximity mine on each one. My friends would be so pissed, they'd respawn and die over and over and over.... ;)


It was all about trolling your friends with remote trigger mines and proximity mines.

Getting access to the tank on the single player level in the arctic air base was precious too.


...and the rage that accompanies being hoist by one's own petard.


I agree, it was the multi-player which made it the great game it was. I remember my buddies and I made up a game in the Complex map where one person would take what we dubbed "the house" which was an area you could go up and had a vantage point of several areas while the other person had to try and take the "house". It was a good time.


Simply great game and the remake of it on the Wii is not half as good as the original. I remember that I nearly knew every map by heart :)

(But I didn't manage to remember the respawn points.. crazy ;))


I had already been playing Quake for a year by then and Goldeneye was an extremely slow game in comparison. I've never really been impressed with any console FPS since then (actually I really like the first Gears of War).


Some of our employees play this game a few days a week after work. Remote mines in the Complex, 2v2 or free for all.

If you think you're good, we're hiring for a few positions. See profile.


Was? Until what?


Perfect Dark, which was basically the same game but with updated graphics and an alien plotline.


That game always seemed like a choppy, blurry GoldenEye to me.


Perfect Dark benefited greatly from the N64 expansion pack, and was a lot less fun without it. I'm not certain it was better than Golden Eye (mostly because I found the second level very frustrating) but it had better graphics and a much more ambitious style of play.


elite?


Looks like a video of this in use can be found here: http://www.youtube.com/watch?v=ONJtqf2lIIM


Hrrm, being that cartridge space is absolutely premium, and the size of the games affected their profitability, I wonder if this code was left in there with the space trade off of other features. (Golden Eye was a 96 megabit/12 megabyte cartridge.)


GoldenEye has a surprising amount of stuff "left over" on the cartridge (levels, meshes, weapons, scripts) which people have been digging out for years: http://tcrf.net/Goldeneye_007

It would be really interesting to know about the environment that generated something like that.

Time was probably at a much bigger premium than cartridge space while it was under development, as I don't remember hearing that later Rare games had quite so much left over in them.


My guess is that it was just a screw-up, and cost them $x0,000 over all the cartridges.


The cartridges have a fixed size, so if the game was made to fit in a bit less than 12MB but more than 8MB(or 10MB I didn't lookup the size of rom chips) then the cartridge would cost the same


Excellent! Now all I need is an N64 emulator...


The N64 is inexpensive enough and readily available at secondhand shops. I got mine so I could play Road Rash 64 - in my experience, the best version ever, having played all of the RR titles.


Or you can try this app, which Google appears to have removed today (cache: http://webcache.googleusercontent.com/search?q=cache:https%3...) -- installed it, but haven't tried it yet... here's a backup of the .apk from my phone: http://dl.dropbox.com/u/32510284/N64%20Player%28Free%20N64%2...

It's also hosted on Github: https://github.com/emudeveloper/N64-Player--Mupen64plus-


For the ZX Spectrum! ;-)


I remember the legality of emulators being rather spotty until this ruling was made: http://en.wikipedia.org/wiki/Lewis_Galoob_Toys,_Inc._v._Nint.... Since Nintendo are against emulators: http://www.nintendo.com/corp/legal.jsp#emulator I wonder what they think about the ZX Spectrum emulator and the roms that it contains that the player did not specifically buy..


With the exception of the "Monitor Program" (which "was not supposed to be included"), the games included were all developed by Tim and Chris Stamper, co-founders of Rare.

Provided they own their own IP, i don't see how this could be a problem.


Even the "monitor program" - ie. the Spectrum 16KB ROM image is probably ok:

http://www.worldofspectrum.org/permits/amstrad-roms.txt

1) What exactly do you have to do to use Sinclair ROMs in an emulator, such as acknowledgements etc?"

"Amstrad are happy for emulator writers to include images of our copyrighted code as long as the (c)opyright messages are not altered and we appreciate it if the program/manual includes a note to the effect that "Amstrad have kindly given their permission for the redistribution of their copyrighted material but retain that copyright"."




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: