For Advanced Users: 1964 Compiler Switches and Hardware Switches
================================================================

If you right-click on the rom browser, or left-click if you inverted the mouse-keys ;)..it will bring you
to the Game ini Options. These are settings that get saved into the 1964.ini file.
The following settings are the defaults. They are the optimal settings for speed and compatibility.
Most games will work with them:

-------------------------------------------------
Expansion Pak: No
Game Save Type: All Used Types
CPU Emulator: Dyna-Compiler
TLB: yes (no=faster/less compatible-depends on whether or not game requires TLB emulation)
DMA in Segments: Yes (No=Faster)
Self-Modifying Code: Protect Memory
EEPROM Size: 2KB
Register Caching: Yes
Counter Factor: 2 (You should play around with this)
FPU Hack: Yes.
Max VI Limit: Auto Sync (No limit for full speed)
Link 4KB Blocks: Yes
Advanced Analysis: Yes
Assume 32bit: No
-------------------------------------------------

When you modify settings in the Game ini Settings window and click the OK button, your changes
modify the ini settings of the selected game.

Assume 32bit (New!)
============
No: Default

This is an experimental compiler option to get you more speed by compiling 32bit only in most cases.
You'll generally want to keep it set to No (default). However, many games will appear to work, 
but this still needs patch work. It is still fun to play around with. Some games like Majora's Mask work nearly
perfectly in 32bit. However, if you try the 32bit compiler, many games will NOT run with it, 
but those that do run will run faster. If you play a game for a long time with the 32bit compiler,
be sure to use the F5/F7 (quicksave/quickload) functions to load and save
since SRAM and flashram saves are not guaranteed to work in 32bit only mode.
Please don't email us that this or that game doesn't work in 32bit mode. It is not a bug.
Use 64bit for the game. If you get a game working in 32bit though, we are interested.


Expansion Pak
=============
Leaving this off will only allocate 4MB for RDRAM, while turning on the expansion pak
will allocate 8MB. Majora's Mask, for instance, requires it on.


CPU Emulator
============
Dyna-Compiler (dynarec) refers to the dynamic recompiling engine. Leave it on :) If you want
information on how it works you can download my doc here:
http://1964emu.emulation64.com/download/1964_Recompiler.zip.


TLB (Translation Look-aside Buffer)
===================================
In simple terms, TLB is used so a game can use virtual memory. A lookup table translates virtual
addresses to physical addresses quickly. Turning this off will help speed, but some games like 
CastleVania require TLB. However, there are the strange rare cases (such as Xena) that will not work with the TLB enabled.


Register Caching
================
On is faster. It is part of the dynarec, and is explained briefly in my recompiler doc.


Counter Factor (CF)
===================
The Counter Factor is a multiple that affects the speed of the count register. It basically
fools the virtual machine into thinking it has executed more (or less) cycles than it has.
The advantage of this is you can get more speed this way. In general, the closer the counter rate
is to the actual N64, the better the game sync and thread throughput will be. 
Of course, screwing with the timing in 1964 can have adverse affects. 
So, it's interesting to play with. CF6, CF7 and CF8 are in several cases not stable and are choppy.
Have fun.


FPU Hack
========
Turning this off can get a tiny bit more speed out of the thing (not much at all), but it is highly recommended
that you leave this on. Interestingly, some a few games require it off (Tom&Jerry).
the "FPU Hack" is basically an additional check in the FPU to test for what is known as a 
"Coprocessor Unusable" exception. Refer to MIPS documentation for information about it if you
are interested.


DMA in Segments
===============
Turning this off can get you some more speed. Most games will not matter with this 
setting, but a few require it on, while a few others need it off. Tweak away :)


Self-Modifying Code - Use Protect Memory when you can!
===================
Self Modifying code is code that is changed at an address for one reason or another, when it was once 
something else. You can't emulate the old instructions since the memory has changed, so you need to detect
these things. Protect Memory is hands-down the fastest method for detection. Of course, No_Check is fastest,
but only some games like Mario and MarioKart will work with No Check, because they don't have self-modifying code.

Check Block+DMA is the slowest, because it checks every DWORD in the block of code for a change.
It also checks for modifications in the DMA. So, Protect Memory is the way to go, but if a game isn't
working with it, try one of the slower methods. The other methods (like "Check DWORD") just check the first few bits (DWORD) in the block for a change.


Link 4K Blocks - Set to "Yes" when you can!
==============
This method will "link blocks" within a 4KB page together. This basically means that when a jump, branch or eret is
encountered whose target is in the same 4KB-aligned boundary, it does not need to return to the main engine loop to 
fetch the next block. Conker's, Turok games and Quake games may require it off.


Advanced Analysis - Yes is faster
===============
Turn this on to enable the analysis compiler pass.
This is an additional pass on the instructions of a block of game code.
By analyzing what's ahead, the 1964 compiler is able to do many more advanced
optimizations. At the time I wrote this doc, Conker's does not work with this option, but
all other games should. Yes is default. Advanced analysis will continue to improve in speed.

-schibo <schibo@emulation64.com>