Glide64


International Emulation Project

Version: "Napalm WX"

Author: Sergey 'Gonetz' Lipski (Russia)

Disclaimer:

Neither I, nor anyone who is working with me, will take ANY responsibility for your actions or if this program causes harm to anything, including you and your computer, in any way, physically or mentally.

Table of Contents:

  1. What is Glide64?
  2. The Very Quick Start
  3. Common Settings
  4. Emulation settings
  5. About hardware frame buffer emulation
  6. Texture enhancement and hi-resolution textures
  7. Hotkeys
  8. Specific Game Settings

 

1. What is Glide64?

Glide64 is a graphics plugin for Nintendo 64 emulators. It can run natively on 3dfx cards, or via a OpenGL-based wrapper for modern video cards. The project started on 29 December 2001 by David 'Dave2001' Forrester (USA). Gugaman (Brazil) and Sergey 'Gonetz' Lipski (that is me) joined him at February 2002. We worked together until the autumn of 2002. Then, Dave2001 and Gugaman left the project. Since that time I'm the only developer of the plugin. However, I'm not the only one, who works on this project. The Glide64 project includes two additional libraries beside the plugin itself. The first one is the library known as the 'Glitch64' wrapper, previously known as "Hacktarux's glide wrapper", named after its original author, Hacktarux (France). It then was heavily modified & improved by Vincent 'ziggy' Penne (France) and Brad 'mudlord' Miller (Australia). The second library is a texture enhancement module named 'GlideHQ', created by Hiroshi 'KoolSmoky' Morii (Japan). Beside that, lots of people from around the world helped me to test the plugin and gave me valuable advices on how to improve it. The main tester of this version is Olivieryuyu (France); and additional testing, advices and friendly support was provided by Wes 'Legend' McDaniel (USA).

2. The Very Quick Start

To install Glide64:

  1. Open archive and copy everything from the 'Plugin' folder into the folder where all your N64 plugins are stored (this is usually the 'Plugin' folder in your emulator's folder, e.g. Project64\Plugin).
  2. If you don’t have a Voodoo card, make sure you copy the glide3x.dll file from the 'Wrapper' folder into your emulator's folder.

To setup Glide64:

  1. Launch your emulator.
  2. Select Glide64 as your graphics plugin.
  3. Select 'Configure graphics plugin'
  4. In Glide64 configuration dialog, on the 'Common settings' tab, in the "Rendering" section, select your desired windowed and full screen resolution. 

Glide64 is now ready to use. If you're a novice in N64 emulation, you may skip the rest of this document, start your favorite games and enjoy! If you are an experienced emu fan, or a curious person, read further for explanation for other options and various tips and tricks.

3. Common Settings

3.1 Rendering

Rendering related settings described here.

3.1.1 Common

'Windowed or 3dfx card resolution' - This option selects the fullscreen resolution for 3dfx cards and windowed resolution for other cards. Note: for 3dfx cards the plugin must be in fullscreen mode to see anything.

'Vertical sync' - This option will enable the vertical sync, which will prevent tearing. Note: this option will ONLY have effect if vsync is set to "Software Controlled".

3.1.2 OpenGL settings

'Anisotropic filtering'  -  This filter sharpens and brings out the details of textures that recede into the distance. When activated, it will use the max anisotropy your video card supports. However, this will override native way of texture filtering and may cause visual artifacts in some games.

'Autodetect VRAM Size' - If checked, plugin will try to autodetect VRAM size. But if this appears wrong, please uncheck and set it to correct value. Currently VRAM autodetection is implemented only for Windows.

'Use Frame buffer objects' - Changes the way frame buffer effects are rendered - with or without usage of the OpenGL Frame Buffer Objects (FBO) extension. The choice depends on game and your video card. FBO off is good for NVIDIA cards, while for ATI cards, it's usually best that FBOs are turned on. Also, some FB effects work only with one of the methods, no matter which card you have. On the whole, with FBO off, compatibility/accuracy is a bit better (which is the case for Resident Evil 2). However, with FBO on with some systems, it can actually be a bit faster in cases.

3.2 On screen display

These settings are located in 'Common settings' tab - in the 'On screen display' section. You may select them with no worries - these settings do not impact the emulation.

Select any or all options in the 'Speed' option group to see how fast the game is running. 'FPS counter' will show you the actual frames per second (FPS) for the current game. This number depends on the running game. The 'VI/s counter' will show you the number of visual interrupts per second received by the plugin. This number must be 50 for PAL games and 60 for NTSC games.  '% speed' will show you, how fast your game is emulated; 100% means that the currently emulated game runs at perfect speed. 'FPS transparent' option makes the background of the counter(s) transparent.

Select 'Clock enabled' in the 'Time' group to see the current  time. Select 'Clock is 24-hour' to see the time in 24-hour format. Time information will be displayed in the lower right corner of the screen.

3.3 Other

All other common settings are grouped in the 'Other' section.

'Show advanced emulation options' - Enable 'Emulation settings' tab. Read more in 'Emulation settings' section.

'Show texture enhancement options' - Enable 'Texture enhancement' tab. Read more in 'Texture enhancement and hi-resolution textures' section.

'Screenshot format' - Format, in which screen shots will be saved. Currently you may choose 'BMP', 'PNG' or 'JPEG'.

'Glide card #' - This option is only for users with multiple 3dfx cards installed in one machine. This selects the glide card number to use. If you only have one glide card installed in your system, set this option to #1. Otherwise, select the number that corresponds to the glide card you want to use.

4. Emulation settings

Warning: The plugin already has optimal settings for all games. Changing these settings is dangerous: it can cause glitches and instability. Access to emulation settings is disabled by default.

To enable 'Emulation settings' tab, check 'Show advanced emulation options' on the 'Common settings tab' and close the configuration dialog. Open configuration dialog again and the 'Emulation settings' tab will now be available.

Important: 'Emulation settings' tab operates in 2 different ways depending on whether or not a game is running.

4.1 General options

'Filtering mode' - you may set 'Force bilinear', 'Automatic' or 'Force point-sampled' mode. You also may easily switch between filtering modes during game play by pressing the backspace button.

'Buffer swapping modes' - It's hard to explain the difference between these modes. Just select any available option. If a game suffers from flickering, select another buffer swapping mode and see if that fixes the problem.

'LOD calculation'. The N64 uses a very special way to implement mip-mapping, which is not available on PC hardware. Glide64 implements a rough approximation of N64 mip-mapping, which can be enabled by setting 'LOD calculation' option to 'fast' or 'precise'. The result is not always good though.

'Aspect ratio' - Most N64 games use 4:3 aspect ratio, but some support widescreen too. You may select appropriate aspect here and set widescreen mode in game settings. In 'Stretch' mode the output will be stretched to the entire screen, other modes may add black boarders if necessary.

'Fog' - Sets fog emulation on/off.

'Buffer clear on every frame' - Forces the frame buffer to be cleared every frame drawn. Usually frame buffer clear is controlled by the game. However, in some cases it is not well emulated, and some garbage may be left on the screen. In such cases, this option must be set on.

4.2. Frame buffer emulation

N64 games often use auxiliary frame buffers to implement special game effects like motion blur or for optimization purposes. The console can allocate as many auxiliary frame buffers as needed and then use them as usual textures. PC video cards usually use only one buffer per frame, thus emulation of frame buffer effects is always a hard problem. Glide64 implements lot of methods of frame buffer emulation, to support as many effects as possible. Most games will work fine with pre-defined settings, but some effects require additional options to be set. Known cases are described in the Compatibility List and in the Specific Game Settings. You may set the following options:

'Enable frame buffer emulation' - When this option is on, the plugin will try to detect frame buffer effects usage and emulate them. This option is off by default, but for all games, which use frame buffer effects, it will be automatically turned on.

'Hardware frame buffer emulation' - Enables hardware frame buffer emulation. Usually, this must be set on, except some rare cases, mentioned in the Compatibility List. Read next chapter for explanation of hardware frame buffer emulation.

'Motion blur' - Enables motion blur emulation. Motion blur works slow without hardware frame buffer emulation, so it is made optional. This option usually must be on, because most of cards support hardware frame buffer emulation. You may also switch it on/off during game play by pressing ALT-B.

'Read every frame' - In some cases,  Glide64 cannot detect frame buffer usage by the game. In this case the only way to emulate frame buffer effects, is to read every rendered frame from video memory and put it into the emulated RDRAM. Reading from video memory is usually slow, so this method of frame buffer emulation is optional. You may also switch it on/off during game play by pressing ALT-V.

'Get frame buffer info' - This is another way to emulate frame buffer effects, which the plugin cannot detect. This option allows the plugin to get notification about frame buffer usage from the emulator and thus emulate frame buffer effects without slowdown. Currently it works only with Mupen64 (and even Mupen is not 100% reliable with this). Do not enable this option with 1964, otherwise the emulator will crash.

'Render N64 frame buffer as texture'. The N64 architecture allows the CPU to write directly into the frame buffer. Sometimes N64 games uses this ability, which may lead to graphics lost during emulation, since graphics plugin does not know, that some graphics are already written in the N64 frame buffer by the CPU. Some examples of this are: falling pills in Dr.Mario and rain in Jet Force Gemini. When this option is enabled, content of each N64 frame buffer is rendered as a texture over the current rendered frame. This prevents graphics loss, but may cause slowdowns and various glitches in some games.

'Detect CPU write to N64 frame buffer'- This option works as the previous options, but the plugin is trying to detect, when a game uses CPU writes to the N64 frame buffer. The N64 frame buffer is rendered only when CPU writes is detected. Use this option for those games, in which you see still image or no image at all for some time with no reason.

4.3. Depth buffer emulation

Sometimes N64 games use values in the depth buffer to decide, when to render some particular object or not. This is often used for coronas, which must be rendered only if they are not covered by other objects in the 3D scene. To emulate it properly, the N64 depth buffer must be filled with correct values. Glide64 uses software rendering to fill the N64 depth buffer. It is enabled by default. If you experience performance issues, set the 'Software depth buffer rendering' option off.

5. About hardware frame buffer emulation

The usual method of frame buffer emulation, which theoretically should always work, is to render auxiliary frame buffers into the main video buffer and then read it from video memory into main memory, and put into the structure representing N64 memory (RDRAM). This approach has 2 main disadvantages:

1) auxiliary frame buffers may be visible when they should n't be.

2) reading from video memory is a very slow operation, thus many frame buffer effects will be slow.

Also, image taken from video memory must be scaled down to N64 native resolution (usually 320x240), thus quality lost is inevitable. To avoid these problems, Glide64 uses the Glide3x extension, which allows it to create auxiliary frame buffers right into video memory, like the N64 does. This allows the plugin to run frame buffer effects without speed hits or quality loss. Hardware frame buffer emulation (HWFBE) greatly improves many games, but it has some restrictions:

1) HWFBE is in fact a hack - auxiliary frame buffers are not put into N64 memory. When a game uses a texture located in RDRAM corresponding to an auxiliary frame buffer, the plugin uses the texture located in video memory instead. The game may use this area in RDRAM for different textures later, but the plugin will use it's auxiliary buffer anyway, which leads to serious glitches. I have tried to reduce the probability of this situation, but it is still possible. If you encounter it, switch to windowed mode, and then back to full screen again.

2) The Glide extension used for HWFBE is fully supported by Voodoo 4/5 only. Banshee and Voodoo3 cards also support it, but only for small auxiliary frame buffers (e.g. shadows). Other Voodoo cards do not support it at all!

3) HWFBE may not work for Voodoo4/5 if the anti-aliasing option is set to "fastest performance". Use any other option there.

4) Anti-aliasing is not applicable to auxiliary frame buffers.

5) The wrapper support HWFBE almost fully, but it has its peculiarities. Two ways of hardware frame buffer emulation are implemented in the wrapper - with, and without usage of the OpenGL Frame Buffer Objects (FBO) extension. The method with FBO's works fast on any card, which supports FBO's, but it may cause depth issues, since framebuffer objects use their own depth buffer. The method without FBO's works on almost any card, has no problems with depth buffer usage, but it may work slowly on ATI cards. To switch between these methods set the 'Use frame buffer objects' option on/off. 

6. Texture enhancement and hi-resolution textures

Texture enhancement is done via GlideHQ - a real-time texture enhancer library with hi-resolution texture pack support. GlideHQ is an independent DLL, which dynamically loaded by Glide64, when it is needed. GlideHQ itself has no user interface; all its settings are placed on the 'Texture enhancement' tab. This tab is disabled by default. To enable it, check 'Show texture enhancement options' on the 'Common settings' tab and close the configuration dialog. Open configuration dialog again and switch to 'Texture enhancement' tab.

6.1. Texture enhancement

GlideHQ uses variety of methods to enhance the original N64 textures.

'Filter' - Apply a filter to either smooth or sharpen textures. There are 4 different smoothing filters and 2 different sharpening filters. The higher the number, the stronger the effect, i.e. 'Smoothing filter 4' will have a much more noticeable effect than 'Smoothing filter 1'. Be aware that performance may have an impact depending on the game and/or the PC.

'Enhancement' - 7 different filters are selectable here, each one with a distinctive look. Be aware of possible performance impacts.
Important: 'Store' mode - saves textures in cache "as is". It can improve performance in games, which load many textures. Disable 'Ignore backgrounds' option for better result.

'Texture cache' - Enhanced and filtered textures are cached for later use. This helps boost performance if there are subsequent requests for the same texture, which is the case for most games. Normally, 128MB should be more than enough but there is a sweet spot for each game. 32MB will be enough for Super Mario, but Conker's BFD streams a lot of textures so setting 256MB or more will boost performance.

'Compress texture cache' - Memory will be compressed so that more textures can be held in the texture cache. The compression ratio varies with each texture, but 1/5 of the original size would be a modest approximation. They will be decompressed on-the-fly, before being downloaded to the gfx hardware. This option will still help save memory space even when using texture compressions such as FXT1 and S3TC.

'Apply texture compression' - Textures will be compressed using selected texture compression method. The overall compression ratio is about 1/6 for FXT1 and 1/4 for S3TC. In addition to saving space on the texture cache, the space occupied on the GFX hardware's texture RAM, by the enhanced textures, will be greatly reduced. This minimizes texture RAM usage, decreasing the number of texture swaps to the GFX hardware leading to performance gains. However, due to the nature of lossy compression of FXT1 and S3TC, using this option can sometimes lead to quality degradtion of small size textures and color banding of gradient colored textures.

'Ignore backgrounds' - It is used to skip enhancement for wide narrow textures, usually used for backgrounds. This may save texture memory greatly and increase performance.

6.2 Hi-resolution textures

GlideHQ supports hi-resolution texture packs, and texture dumping/editing.

'Format' - Chose which method is to be used for loading Hi-res texture packs. Only Rice's format is available currently. Leave on 'None' if you will not be needing to load hi-res packs.

'Alternative CRC calculation' - This option enables emulation of a palette CRC calculation bug in RiceVideo. If some textures are not loaded, try to set this option on/off. This option is disabled in texture dumping mode.

'Texture dumping/editing mode' - In this mode, you have that ability to dump textures on screen to the appropriate folder. You can also reload textures while the game is running to see how they look instantly - big time saver! Hotkeys: "R" reloads hires textures from texture pack - "D" toggles texture dumps on/off.

'Use alpha channel fully' - When this option is off, 16bit rgba textures will be loaded using RiceVideo style - with 1bit for alpha channel. When it is on, GlideHQ will check, how alpha channel is used by the hires texture, and select most appropriate format for it. This gives texture designers freedom to play with alpha, as they need, regardless of format of original N64 texture. For older and badly designed texture packs it may cause unwanted black borders.

'Compress texture cache'  - When game started, plugin loads all its hi-resolution textures into PC memory. Since hi-resolution textures are usually large, the whole pack can take hundreds megabytes of memory. Cache compression allows to save memory space greatly. Textures will be decompressed on-the-fly, before being downloaded to the gfx hardware. This option will still help save memory space even when using texture compression.

'Apply texture compression' - Textures will be compressed using selected texture compression method. The overall compression ratio is about 1/6 for FXT1 and 1/4 for S3TC. In addition to saving space on the texture cache, the space occupied on the GFX hardware's texture RAM, by the enhanced textures, will be greatly reduced. This minimizes texture RAM usage, decreasing the number of texture swaps to the GFX hardware leading to performance gains. However, due to the nature of lossy compression of FXT1 and S3TC, using this option can sometimes lead to quality degradtion of small size textures and color banding of gradient colored textures.

'Force 16bpp textures' - The color of the textures will be reduced to 16bpp. This is another space saver and performance enhancer. This halves the space used on the texture cache and the GFX hardware's texture RAM. Color reduction is done so that the original quality is preserved as much as possible. Depending on the texture, this usually is hardly noticeable. Sometimes though, it can be: skies are a good example.

'Tile textures' - When on, wide texture will be split on several tiles to fit in one 256-width texture. This tiled texture takes much less video memory space and thus overall performance will increase. However, corresponding polygons must be split too, and this is not polished yet- various issues are possible, including black lines and polygons distortions.

6.3 Common

'Texture compression method' - Select the method for texture compression. 3dfx cards support both FXT1 and S3TC, other cards can use S3TC only.

'Save texture cache to hard disk' - For enhanced textures cache: this will save all previously loaded and enhanced textures to the hard drive. So upon next game launch, all the textures will be instantly loaded, resulting in smoother performance for all your games. For high-resolution textures cache: After creation, loading hi-res texture will take only a few seconds upon game launch, as opposed to the 5 - 60 seconds a pack can take to load without this cache file. The only downside here is upon any changes to the pack, the cache file will need to be manually deleted. Saved cache files go into a folder called "Cache" within the "Plugins" folder.

7. Hotkeys

Glide64 uses the following hotkeys:

"BACKSPACE" - Cycle between texture filtering modes. Currently selected mode will be shown in the status line on the bottom of the screen for a short time.

"Alt"+"V" - Toggles read every frame on/off. Current status of this option will be shown in the status line on the bottom of the screen for a short time.

"Alt"+"B" - Toggles motion blur on/off. Current status of this option will be shown in the status line on the bottom of the screen for a short time.

GlideHQ uses the following hotkeys:

"D" - toggles texture dumps on/off.

"R" - reloads hires textures from the texture pack.

 8. Specific Game Settings

Banjo-Kazooie

The puzzle effect is not emulated by default. To see it, either set 'Read every frame' option on or set 'Get frame buffer info' and run this game with Mupen64.

Beetle Adventure Racing / HSV Adventure Racing

Fog. The fog in this game is implemented in a very specific way. When rendering of the current frame is finished, the depth buffer, filled during rendering of this frame, is used as a texture and blended with the color buffer. As the result, the frame becomes fogged, and the fog is thicker where depth values are higher. Glide64 implements two ways to emulate this effect, software and hardware ones.

Software emulation uses software depth buffer rendering. It works on all cards, but has two disadvantages:

 - Alpha testing is not used during software depth buffer rendering. As the result, the pixels, which would normally be rejected by alpha testing, are stored in the depth buffer. This causes artifacts in the produced fog.

- The software depth buffer has original (that is low) N64 resolution output. When it is used as a texture, blended with the high-resolution frame buffer, aliasing is visible.

Hardware emulation produces perfect fog, but currently it works only on 3dfx Voodoo 4/5's. These cards use the same depth buffer format, as the N64, and they can allocate the depth buffer right in the texture memory, so it can be easily used as a texture, as on N64 hardware. In both cases, the 'Software depth buffer rendering' option must be on.


On car reflection. Your car (the car you drive) should reflect the environment in this game. That is, various objects, which you roll by, should be reflected on your car. This is implemented via the usage of frame buffer content. Emulation of this effect implies frame buffer emulation. Unfortunately, this can't be done in hardware, because the texture, which is used as a reflection, is not a part of the frame buffer - it is the result of frame buffer post processing, made on the N64 CPU. Thus, the only way to emulate this effect is to use the 'Read every frame' option. If your hardware allows you to use this option without slowdown, you are lucky.

Bio Hazard 2 / Resident Evil 2

This game uses pre-rendered depth buffers, which are stored in the game's ROM, and are loaded into the depth buffer memory area each frame before rendering is started. This is hard to emulate, and especially hard to emulate efficiently. The following options must be set:

'Hardware frame buffer emulation' - on

'Software depth buffer rendering' - on

'Use Framebuffer Objects' - off

To get good sound in this game, use Mupen64 with Azimer's HLE sound plugin v.056. However, the game may flicker in some places with Mupen64.  

Conker's Bad Fur Day

The game is well emulated with default settings. However, there are two special effects in this game, which require special settings: the black-and-white "It's war" cut-scene, and the Uga-Buga pixilated effect. To see these effects, set the following options:
'Read every frame' - on
'Render N64 frame buffer as texture' - on
The game is not playable with these settings, so use them only to see these particular effects.

Note for ATI users: you must set 'Use Framebuffer Objects' option on, otherwise the game will work very slow.

Fushigi no Dungeon - Furai no Shiren 2 (J)

To see correct background in menus, either set 'Read every frame' option on or set 'Get frame buffer info' and run this game with Mupen64.

Legend of Zelda, The - Majora's Mask

Lens of  Truth may not work, if 'Use Framebuffer Objects' option set off .
Also, when Lens of Truth is used, some objects outside of the lens can be cut. This is not a bug - depth buffer copy must be emulated to fully emulate Lens of Truth. It is currently supported only by 3dfx Voodoo 4/5 cards.

Mario Story / Paper Mario

To see correct background in the menu subscreen, either set the 'Read every frame' option on or set 'Get frame buffer info' and run this game with Mupen64. 

Perfect Dark

Frame buffer emulation must be disabled in multiplayer mode to avoid flickering. Most of the special effects used will not work without frame buffer emulation, but it's not that important for multiplayer.

For settings for other games check the Compatibility List.