patching the .ini file  (__JC & -Max-)
--------------------------------------

How to use command MAPMEM?  (__JC & -Max-)

  To use mapmem, you need to be looking at the big DOS window with ultraHLE
  frantic version, when you start the emu, you also get a big black window the DOS
  debug window. You need to check the numbers in the blue box at the top of this
  window. Look for 'sp' which is the bottom of the second row from the right! OK,
  this is how it works: the error you get in the 'debug output' window of the main
  HLE window, this is the first number, then, the 'sp' number is the second number
  and the last number, I make it 10000000 always.

Why  use bootloader=1 ?     (__JC & -Max-)

   Ok, ALL n64 roms, use a small piece of code, called the boot code, so that they
  can load from the cartridge, into the n64, it is also called the bootloader. So,
  if you have a bad rom file from the internet ultraHLE has this code built-in.
  So, you can try to add the line 'bootloader=1' to use the internal HLE code, and
  not that which is in the game rom.

How to find the OSrange?    (__JC & -Max-)

  Each game rom, has bootcode, when you load a rom, in the DOS window, you should
  make a note of the address which is waiting to run. Load the frantic version of
  UltraHLE, from file menu, open the rom you want, but do NOT run it yet. In the
  big black window, it should be waiting at 800xxxxx, can you see this? REMEMBER
  THIS, ALL BOOT CODE IS 3F0 LONG. Ok, so we add '3f0' to '800xxxxx' and we get
  '800xxxf0', ok?  i.e : 80000400 add "3f0"  we get 800007f0.
  In the big DOS window, type 'u 800007f0'. Click the window once, to make it
  active, then start typing, you will see what you type at the bottom of the DOS
  window. Notice at 8000xxxx, the line starting with 'jal'  i.e: jal 800322D0
  osCreateThread #10
  Ok, where you see that osCreateThread, it means this is the part of the game
  that goes off to the osrange. What you do, is take the 800 and the first number
  after this, and that is the start of the game. So, rom osrange is
  osrange=80030000, 8xxxxxx

patch 0, xxxxxxxx, patch yy (0-255)

  This is an insert patch, where yy is the decimal value to the hex code of the
  patch. If this patch is used, then all addresses following this patch to the
  next available 'nop' instruction in the code, must be patched too, using the
  patch 0 command.

patch=-1, xxxxxxxx, byte yy (0-255)

  This places the hex value for yy at bit location 7 & 8 ie. if yy is 22, before,
  the address shows 00000000, but now it shows 16000000. This is what is used to enable
  cheats, extra, lives etc. Remember, that this is loaded as decimal in the .ini
  file, and stored as hex in 
  the ROM, such as 22 decimal is 0x16 in Hex.

patch=-2, xxxxxxxx, byte 2

  This places the opcode 'syscall' at the address.

patch=-2, xxxxxxxx, patch yy

  This places the patch decimal yy at the address. Remember, that yy is in
  decimal, and the value patched will be a hex value.
  patch 30  // audio
  patch 31  // audio



These are SOME errors that I found and fixed! It should work at all roms that have
the same error. These errors are found at ULTRAfrantic and windows debugger at
Ultrahle. This might be Helpfull!!!  By: -MAX-
------------------------------------------------------------------
			All this are examples!  By: -MAX-
------------------------------------------------------------------

XXXXXXXX  1000FFFF  a2   b 

---> Patch= -1, XXXXXXXX, word 0x1000FFF9

XXXXXXXX  xxxxFFFF  a2   bne1 T9!=r0 

---> Patch= -1, XXXXXXXX, word 0x00000000

XXXXXXXX  xxxxxxxx  addiu  s0=s0+001 

---> Patch= -1, XXXXXXXX, word 0x00000000

XXXXXXXX  xxxxxxxx  LBU T4

---> Patch= -1, XXXXXXXX, word 0x00000000

XXXXXXXX  xxxxxxxx  Beq1  V0=r0 -->XXXXXXXX

---> Patch= -1, XXXXXXXX, word 0x00000000

XXXXXXXX  xxxxxxxx  Beq1  T7=r0 -->XXXXXXXX

---> Patch= -1, XXXXXXXX, word 0x00000000

XXXXXXXX  xxxxxxxx  Bne1  s0!=v1 

---> Patch= -1, XXXXXXXX, patch 49

XXXXXXXX  xxxxxxxx  a3  lw

---> Patch= -1, XXXXXXXX, word 0x00000000

Display list too large

---> Patch= -1, XXXXXXXX, patch 49

Display doesn't look right

---> Patch= -1, XXXXXXXX, patch 49  or
---> Patch= -1, XXXXXXXX, patch 14

DMA Copy illega ranges

---> Patch= -1, XXXXXXXX, patch 13

Unimplemented CPU opcode

---> Patch= -1, XXXXXXXX, patch 53

Unimplemented CPU opcode patch 14880

---> Patch= -1, XXXXXXXX, patch 53

Queue id -2145978976 at 801702c0 too large

---> Patch= -1, XXXXXXXX, patch 53

Dlist matrix stask underflow

---> Patch= -1, XXXXXXXX, patch 49 

Cpu a util:reg allocnew with r0

---> Patch= -1, XXXXXXXX, patch 49 

(03ff000) execution invalid address

---> mapmem= 03ff000, sp N0, 10000000  (sp N0 can be found at ultrafrantic on second row from right)
------------------------------------------------------------------
* XXXXXXXX means any number.