Wednesday, 28 September 2011

A look at the current situation of Nintendo 64 (N64) emulation in regards to the game 'GoldenEye 007'.

The Nintendo 64 was a more powerful console than the popular Playstation (PSX). Growing up with PC's I remember comparing from a visual point-of-view, the graphical quality of the PSX to a Matrox Mystique or Nvidia Riva TNT and the N64 to a 3DFX Voodoo2. The PC 3DFX Voodoo line of graphic cards were the 'king of the hill' back in those days. Likewise the N64 garnered the attention of gamers wanting higher resolution graphics than the PSX could provide. Things wouldn't change for a couple more years until the Playstation 2 (PS2) console and PC Nvidia Geforce graphic cards were released.

Unfortunately the N64 didn't have the market presence of the PSX, which can be seen by the difference in the total number of games released for each console. Regardless, there were a number of standout titles on the N64 and one of those was the 1997 'GoldenEye 007'. The game has had and still has a great number of fans even to this day. A search on Google will show a number of MODs that people have been involved in creating for various games over the years. Such is the devotion and power of nostalgia, that comes from memories of playing this game many years ago.

For some the chance to relive those memories again can become a possibility through emulation. For anyone that has looked at N64 emulation over the last ten years, you would have to say it has really been an uphill battle. I won't go into specifics as I assume anyone reading this will already have similar feelings about the situation. To make matters worse 'GoldenEye 007' is a really difficult game to emulate, both in accuracy and performance. I have been interested to see what the current situation in emulation is like after all this time. I have tried alot of emulators and plugins to see what can give the best 'GoldenEye 007' experience. The result has actually turned out clear cut as will be shown below.

Testing system;
PROCESSOR: Intel Pentium 4 (P4) 3.4GHz Extreme Edition
MEMORY: OCZ Technology 2GB RAM (High-Speed)
VISUALS: ATI Radeon HD4670 1GB (Only OpenGL v3 Upwards)
AUDIO: Creative Labs X-Fi Elite Pro
SYSTEM: Microsoft Windows XP SP3 32bit

Video Plugin;
The odd feature that only one plugin could do that no other plugin could do was showing the enemy bleed when shot. I remembered this while playing the original game and was surprised to find only 'Jabos' plugin could do this. Also the 'skybox' (sky with 'moving' clouds) is a feature that has been very hard to emulate. 'Jabos' plugin was one of only a few that could do this properly as well. So it was clear cut that 'Jabos' plugin had won that competition hands down.

Audio Plugin;
A major difficulty in the emulation process has been getting the audio right and with speed. The sound and timing has to be bang on as well as eliminating any pops or crackles that tend to creep in with emulation. In the end one plugin stood out above the rest, 'Alzimer's' HLE audio plugin while used in 'High Level Audio' mode. The fastest of all audio plugins had sound that was very true and with zero pops or crackles.

RSP Plugin;
The main difference between the two portable RSP plugins from the authors of Project64 and Mupen64 is that the Project64 RSP is built towards accuracy whereas the Mupen64 RSP is built towards speed. Your choice could be dictated by whether an RSP can start a particular game or not as normally they are very similar in performance. Although, when using 'Alzimer's' HLE audio plugin I found that only when combined with Mupen64 RSP plugin in 'High Level Audio' mode were all pops and crackles eliminated. The Project64 RSP plugin setup in an equivalent manner was very close only letting a few pops and crackles through with the NTSC version of this game, whereas the PAL version seemed fine. Understandable that the Mupen64 RSP would work best in this setup as the author's were Hacktarux and Alzimer.

Input Plugin;
There are alot of different ones to choose from and it is literary a matter of finding one that works with your controller and provides the features you need. The N-Rage plugin is probably the most predominant so I decided to use that. I had no problems setting up my controller and even the 'rumble' feature works as it should. Again should be noted that there are many plugins out there, even catering for those that want a keyboard/mouse 'first person shooter' setup.

Another difficult decision to make is between the three main N64 emulators; Project64, 1964, and Mupen64. All are mature, capable, and pack similar features. Due to the performance required for 'GoldenEye 007' speed would be the defining factor. Since we are using our own choice of plugins the only factor with the emulators will be how they emulate the 'core' of the Nintendo 64. Mupen64 suprisingly turned out to be the slowest and since not allowing customization of settings to the 'core', means you are stuck with that poor performance. 1964 was a bit quicker but had plenty of stability issues and must be quite buggy, often the game would lock up at anytime. Also, by default it would not play the 'in-game' demonstrations at the end of the intro, it would just replay the intro instead. To fix this I had to turn off "Assume 32bit" under ROM properties, which cut down the performance considerably. The 1964 emulator also struggled transmitting data between the core and any video plugin which can be seen by the 'dlists' performance stat. I even tried using the popular Glide64 plugin which would grind to a halt once reaching the games main menu. The Project64 core is slower than the 1964 core but without the "slow 'core to video plugin' implementation" issues. Unfortunately it is still not perfect, due to the slow core Project64 cannot maintain a high stable FPS at all times. The Project64 v1.7 emulator has strange performance hiccups in the core which could not be eliminated, these can be seen while playing the game or watching the game's intro sequence and therefore can't be recommended. By default the Project64 v1.6 core would also stutter a few times, but once you customize the settings you can make it noticeably stutter free. The 'Vertical Interupts' (VI/s) were rock solid which is what you want from an N64 emulator and the overall Frames Per Second (FPS) pumped out were 50% higher than with the other two emulators. This means that Project64 1.6 will give a smoother and better playing experience. Especially when utilising graphic enhancements like AA, AF, Super2xSAI, pixel shader effects, hires texture packs, and in high resolutions.

Winning setup;
Jabo's Direct3D8 v1.6.1 (latest version at this time)
Azimer's HLE Audio v0.56 WIP2 (latest version at this time)
Hacktarux/Azimer HLE RSP v0.2 (only the 2005 90KB release recommended)
N-Rage Input Plugin V2 v2.2 Final (latest version at this time)
Project64 v1.6 with Unofficial RDB v4.22 (latest version at this time)

Only issue I noticed with this setup was that even though 'Jabo's' video plugin was the best in this test you may still notice the odd geometry error creep in while playing.

1. Tests performed with Windows XP SP3 32bit
2. Modern graphic cards may not be fully compatible with older versions of OpenGL (pre OpenGL version v3.0). Since all N64 OpenGL video plugins are written for OpenGL v1.0 to v2.0 you may notice problems when using modern graphic cards. While using my OpenGL v3.0/v4.0 based graphic card I noticed crashing/reboots (BSOD) when exiting from fullscreen mode while testing OpenGL based video plugins. From my perspective that add's a bonus point to the Direct3D based 'Jabo' plugin.
3. Other computer setups may show different results or maybe fast enough to not notice certain issues.

The following were tested but had various issues;
Direct64, All forms of Rice video, 1964 video, Glide64, All other forms of Jabo video.
All forms of Jabo sound, 1964 audio, Zilmar Audio, TR64 audio, Schibo audio.
All forms of Project64, All forms of Mupen64, and the other forms of 1964; 1964mod, 1964Pistolgrip, 1964Ultrafast. It should be noted that these last three alternative forms of 1964 did not increase performance in my testing. Although the FPS readout may have changed, the game seemed to be playing at about half speed. In the land of Nintendo 64 emulation having stable 'Vertical Interupts per second' (VI/s) is more important than chasing a fixed maximum 'Frames per second' (FPS). I recommend only using the original and now open source 1964 versions.

Things I'll keep an eye on in the future;
Future progress with the 1964, Mupen64, Project64 and all different forms of these emulator's. Alzimer's audio, Jabo's sound plugin, Jabo's video plugin, Glide64 video plugin, and if any OpenGL version 3.0 or greater plugin is released.

Thursday, 22 September 2011

My best setup/settings for 'GoldenEye 007' (N64) Nintendo 64 emulation on the PC.

What you will need;
1. Project64 v1.6
2. Jabo's Project64 v1.6.1 update patch (includes Jabo's Direct3D8 v1.6.1 (latest version at this time))
3. Project64 Unofficial RDB v4.22 by Nekokabu & MASA
4. Azimer's HLE Audio v0.56 WIP2 (latest version at this time)
5. Hacktarux/Azimer HLE RSP v0.2 from Mupen64 v0.5.1 (only the 2005 90KB recommended)
6. N-Rage Input Plugin V2 v2.2 Final (latest version at this time)

Firstly you need to get Project64 v1.6 and then apply Jabo's Project64 v1.6.1 update patch.
Once you have done this go to where you installed Project64 and replace the 'Project64.rdb' file with the unofficial RDB v4.22 by Nekokabu & MASA. This will automatically give you most of the current/best settings for game accuracy and performance.
Now you need to add three plugins to the plugins folder. Azimer's HLE Audio v0.56 WIP2 and N-Rage Input Plugin V2 v2.2 Final are available individually. For Hacktarux/Azimer HLE RSP v0.2 plugin (only the 2005 90KB release recommended) you will need to get it from the Mupen64 v0.5.1 emulator release. You will need to rename the original Project64 'RSP.dll' to 'RSP.backup' and then rename 'mupen64_rsp_hle.dll' to 'RSP.dll' thus switching the RSP plugin's over.

Now to setup everything in Project64 v1.6.1;
1. Press [Alt] [F] for 'File' menu and click 'Choose Rom directory...' to select where your game roms are stored then press [OK] button.
2. Press [Alt] [S] for 'System' menu and make sure 'Limit FPS' is ticked.
3. Press [Ctrl] [T] for 'Option/Settings' window. Go to the 'Plugins' tab and make sure these are listed;
a) Video (graphics) plugin = Jabo's Direct3D8 v1.6.1
b) Audio (sound) plugin = Azimer's HLE Audio v0.56 WIP2
c) Input (controller) plugin =  N-Rage Input Plugin V2 v2.2
4. Press the [OK] button.
5. Press [Alt] [O] for 'Options' menu and click 'Configure Graphics Plugin'. Untick the 'Hide Advanced Settings' box and press the [OK] button.

To setup everything in Video Plugin;
1. Now get back to the 'Configure Graphics Plugin' window and some new tabs should be available. Set everything up as follows;
Under the 'Settings' tab:
a) 'Window Resolution' = Whatever you want, I just choose 640x480 which is usually a 2x aspect ratio zoom for the N64 display.
b) 'Full Screen Resolution' = Whatever you want, at a bare minimum I choose 1024x768 32bit or similar for a less pixelated display.
c) 'Tripple buffer Vsync' = I set this option to remove the unwanted horizontal screen tearing that you would otherwise notice.
d) 'Ansiotropic Filtering' = I set this to atleast 8x which is sufficient to clean up any depth pixelation, producing a very crisp/clear picture.
e) 'Full-Scene Antialiasing' = A trade off between jagged edges and picture smoothing/blurring. Usually 4x for smaller resolutions and 2x for larger resolutions. Try 2x to begin with and see what you think.
f) 'Super2xSaI textures' = Doubles the native size of original textures which can make them appear sharper.
g) 'Always use texture filter' = I do not use this. Manual says cause's more problems than it fixes and should only be used if specifically told to.
Under the 'Advanced' tab:
a) 'Adjust game aspect ratio to match yours' = I do not use this. Probably help with widescreen displays although will stretch either horizontal or vertical.
b) 'Use legacy pixel pipeline' = This can help with modern graphic cards. I noticed much nicer looking textures with this turned on.
c) 'Force alpha blending' = I do not use this. Manual says cause's more problems than it fixes and should only be used if specifically told to.
d) 'Wireframe rendering' = I do not use this. With this setting everything will be shown only as wireframe's so only good for debugging,etc.
e) 'Use Direct3D transformation pipeline' = Depends on your video card. If you notice a strange looking border at edge of screen try turning this on. Worked for me.
f) 'Force Z compare' = I do not use this. If you notice objects showing up in front of others you could try turning this on. Only if needed and I didn't need this.
g) 'Copy framebuffer to RDRAM' = I do not use this. Supposedly used to disable the 'jumbotron' board in Mario Kart 64 for performance issues.
Under the 'Rom Settings' tab:
a) 'Emulated Width' = native resolution width of N64 game. Normally just leave default which is 320, this is the standard width for NTSC and PAL N64 games.
b) 'Emulated Height' = native resolution height of N64 game. Normally just leave default which is 240, this is the standard height for NTSC and PAL N64 games.
c) 'Direct3D Clear Mode' = I leave as default which is none. Can cause problems and should only be used if needed. Try it if you have black screen problems or screen clearing problems.
2. Press the [OK] button when done.

To setup everything in Audio Plugin;
1. Press [Alt] [O] for 'Options' menu and click 'Configure Audio Plugin' and set as follows;
a) 'Dynamic Audio Sync' = I leave as default which is ticked. Fixes pops and crackles if the game or emulator was to run faster than the audio.
b) 'Emulate/Simulate AI' = I leave as default which is ticked. Does an amazing job with the already turned on 'Limit FPS' option in Project64.
a) 'Force Old Audio Sync' = I do not use this. Project64 is excellent so does not require this, may cause problems with games so don't touch.
2. Press the [OK] button when done.

To setup everything in Controller Plugin;
1. Press [Alt] [O] for 'Options' menu and click 'Configure Controller Plugin'. Set your keys/buttons as you like with the following notes;
Under the 'Controls' tab:
a) 'Plugged' = Whether N64 emulator will see the device or not. You obviously want this ticked.
b) 'Analog Stick Range' = I set 50% as I find a good balance of 'sensitivity' and 'usuable range' of my logitech gamepad analog stick controls.
c) 'Analog Stick Real N64 Range' = If on then the range has a circle pattern like with real N64 controllers. If off then the range has a square pattern like PC controllers which I prefer.
Under the 'Devices' tab:
a) 'GamePad Deadzone' = I set 5% as I like a little 'give' before player movement and also eliminates any chance of controller 'jittering'.
Under the 'Controller Pak' tab:
a) 'RawData' = Turns controller pak support on. From the pull-down menu I choose 'Rumble Pak' for Force-Feedback with my gamepad.
b) 'Force-Feedback Device' = Choose your Force-Feedback gamepad from the list.
c) 'Constant Force' or 'Ramp Force' = I choose 'Ramp Force' as it felt more responsive with my gamepad.
d) 'Visual Rumble' = I do not use this. Suppose to make screen blink when Force-Feedback would happen but created a blinking title bar so don't use.
e) 'Rumble Strength' = I set 75% as a good starting point. Up to personal preference if you want a stronger or weaker Force-Feedback effect.
f) 'Test Rumble' = Press this button for a good way to quickly test what your Force-Feedback settings feel like.

Now the important setup of the games RSP settings;
1. First you will have to 'right-click' with your mouse on the game in the Project64 browser window and select 'Edit Game Settings'.
These should already be set by the Project64 Unofficial RDB v4.22 by Nekokabu & MASA but you can check with the following;
CPU core style = Recompiler
Self-modifing code Method = Change Memory & Cache
Memory size = 4 MB
Advanced Block Linking = Off
Default Save type = Use First Used Save Type
Counter Factor = 1
Large Compile Buffer = Ticked
Register Caching = Ticked
SP Hack = Ticked
Use TLB = Ticked
Delay SI Interupt = Unticked
RSP Audio Signal = Unticked

These settings may require a powerful computer, so try disabling some of these if you have issues:
Larger 'Full Screen Resolutions'
'Double buffer Vsync' or 'Triple buffer Vsync'
'Ansiotropic Filtering'
'Full-Scene Antialiasing'
'Super2xSaI textures'


I have been thinking of having somewhere on the internet that I can use as a notepad or logbook, if you will. Atleast to record some of the interesting information I have come across online or findings that I have researched myself. This information may benefit others with similar interests and so could be useful as it seems harder and harder to find good information on the internet now-a-days. These blog posts could be on any subjects relating to my interests, although more likely about something associated with computing. Recently I have been revisiting old computer/video games from my youth and so will probably be the subject of my initial posts, hence the title of my blog.