News
Welcome to NeoRHDN! This place is still a work-in-progress, so pardon the construction...

Chat on Discord
Views: 760,537
Sections: Documents | Utilities | ROM Hacks | Games | Translations | Homebrew | Fonts | Community
Site: Main | Rules/FAQ | Discord | Memberlist | Latest posts | Stats | Ranks | Online users
11-23-24 12:04 PM
Guest: Register | Login

NeoRHDN - Hacks - Hack Information

GoldenEye Spectrum Emulation Unlocked
Hack of GoldenEye 007
Description
GoldenEye Spectrum Emulation Unlocked

Little beknownst to the world all this time, GoldenEye (N64) has a fully-functional ZX Spectrum 48x emulator built into it. By feeding it a proper Spectrum monitor program and calling menu 25 to load a snapshot, any Spectrum 48x program can be run.

The emulator started life as a side project to see if Spectrum emulation was possible on N64 and was hooked into GE, the current game in development. It was supposed to be removed before release but was only made inaccessible and inoperable. All the registers, dependencies, and script required to run the emulator still reside in retail GoldenEye carts.

The original list of games were previous Rare titles, then known as Ultimate Play the Game. The embedded filelist is, in order:
[list][li]em/data/sabre.seg.rz
Sabre Wulf
[li]em/data/atic.seg.rz
Atic Atac
[li]em/data/jetpac.seg.rz
Jetpac
[li]em/data/jetman.seg.rz
Lunar Jetman
[li]em/data/alien8.seg.rz
Alien 8
[li]em/data/gunfright.seg.rz
Gun Fright
[li]em/data/under.seg.rz
Underwurlde
[li]em/data/knightlore.seg.rz
Knight Lore
[li]em/data/pssst.seg.rz
Pssst
[li]em/data/cookie.seg.rz
Cookie
[li]em/data/spec_rom.seg.rz
Spectrum 16k monitor program[/list]

In actual fact, the emulator was supposed to run without the aid of the monitor program. Critical subroutines were copied out or hardcoded. In its current state, however, the monitor is required.

Originally, the emulator was run much the same way that stages are run. Unlike stages which run by switching to menu 11, the emulator runs by switching to menu 25. When initialized, it reads what buttons are held on controller 3. Depending on the button held is which game would be loaded. From there, the monitor program and selected snapshot file are loaded from ROM, and if necessary these files are decompressed.
Only controller 1 is detected. This is mapped as a Kempston joystick on port 31. Necessary buttons to start each game (usually keyboard '0') and any additional keys to play the game are mapped to the keyboard port 254 halfwords. These are set on a per-game basis, but general controls are A/B to start a game, Z for the 'action' button, and L to unload the emulator and return to gameplay.
Each emulation cycle lasts 69888 Spectrum cycles. Each opcode consumes a certain amount of this cycle count. At the end, the screen is drawn to the Spectrum screen buffer, and this is displayed like an image using usual N64 microcode. Emulation continues as long as menu 25 is called.

+_+

Why a Patch Is Required

In its pre-patched state the emulator has some peculiar issues, probably due to the different versions of included files used to compile the retail game.
For instance, the ten games listed above were not all selectable. The initializer only has button masks for eight games, defaulting to SabreWulf. The snapshot loader restricts this list to only the first five. The controller mapping function, however, redirects buttons for all ten titles.

Interestingly, the ROM file table leaves only ten spaces for the ten different snapshot files blank. These are completely blank, without any data or indices until the final file placeholder. As previously mentioned, the monitor was not supposed to be included but is requested by the snapshot loader. Otherwise, the list would require eleven spaces.

The 'unloader' does not, in fact, work properly. It copies NULLs over the program manager. This, obviously, will cause any number of fatal errors to the current game and make it impossible to return to normal gameplay. Also, there is no capacity to reset the screen registers to default.

+_+

The Patch

The patch will reactivate full emulation support in GoldenEye.
The patch should be applied only to an unedited, unbyteswapped (big-endian) North American GoldenEye ROM (NGEE). The GoldenEye Setup Editor can apply and byteswap the ROM for you, as well as recalculate the checksum. (Yes, that was a shameless plug.) It should run properly on hardware.

For more details, read the readme in the patch folder.
TitleGoldenEye Spectrum Emulation Unlocked
GameGoldenEye 007
Released ByZoinkity
CategoryBug Fix
LicenseN/A
Patching InformationNo Special Requirements
GenreAction > Shooter
ModsO
Patch Version1.0
Hack Release Date27 March 2012
ReadmeReadme File
Downloads1864
Last Modified2024-08-15 00:40:08
Source
YoutubeN/A


Screenshots

Affiliates:


Acmlmboard v2.5.6+neo (2024-08-13)
© 2005-2024 Acmlm, Emuz, NinCollin, et al.

Page rendered in 0.029 seconds. (680KB of memory used)
MySQL - queries: 24, rows: 323/329, time: 0.023 seconds.