############################################################
Unofficial Yabause for wii (An Sega Saturn Emulator for Wii)
############################################################

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
You must not ask the Yabause Team about unofficial versions
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

http://wiibrew.org/wiki/Yabause_Wii
(I will update the above website. But the site is wiki, anyone 
 can edit it. If I felt inconvenience, I might stop updating.)

#Introduction
In this unofficial version, some functions was added to the
 original Yabause by Yabause Team, and it was modified mainly
 in displaying.
But, this emulator is originated from the great effort of
 "Yabause Team".
So, you should write the name "Yabause Team" as the author
 or creator.
But, note that Yabause Team does not support Wii port.
So, you must not ask the Yabause Team about this unofficial Wii
 version.

This set includes the source.
The original sources are available on the following sites.

Yabause original source
http://yabause.org/download/
or
http://sourceforge.net/projects/yabause/

#Features
- ISO or CUE file, cue file needs the files listed in cue file. (not support sega original CD, bacause Wii cannot read CD)
- Wiimote, Classic, and Game Cube controllers.
- front SD/SDHC and USB storage (only FAT)
- save/load state
- configurate buttons
- Save settings

#How to set up
1) Copy the contens in the HBC to your SD (including SDHC) card or USB storage (only FAT). 
2) Copy game roms files (.cue with needed files, or .iso) to SSROMS
directory.
Optional) If you want, copy the bios file of the Sega Saturn to 
SSROMS directory as the name "bios.bin" (But, the default setting is "Without bios". So, if you want to use bios, please set the "With bios" in the Settings submenu).
The current version of Yabause Wii can execute games without BIOS.
Some games need the bios file to run normally.
But, some games freeze with BIOS (ex., Sega Rally Champ.)
So, "With BIOS" is not almighty.
Morover, you can use the bios utilities (catridge management (remove, copy, etc.), etc.), when you set the "Bios only" in the Settings submenu.

When there are game files in both SD card and USB storage, the game files in SD card are given  to priority.

#How to use
Load this emulator by a loader such as the homebrew channel.
At first, select the "Load ISO/CUE" menu.
Then, the game files in the SSROMS directory are displayed.
Second, select a game.
Then, you return to the main menu.
Finally, select the "Start emulation".

Some games need to select the proper cartridge.
So, you must select the proper cartridge before start.

#Cartridge types and file names
type           file name
---------------------------------------
None           ""
Action Replay  "/SSROMS/actionreplay.bin"
Backup  4M RAM "/SSROMS/bkram4M.bin"
Backup  8M RAM "/SSROMS/bkram8M.bin"
Backup 16M RAM "/SSROMS/bkram16M.bin"
Backup 32M RAM "/SSROMS/bkram32M.bin"
DRAM  8M       ""
DRAM 32M       ""
ROM 16M        "/SSROMS/ROM16M.bin"
Japanese Modem ""

The above file names cannot be changed.
Tested cartridge types are only backup-RAMs and DRAMs.
The other types cannot be tested.
The file name of the internal backup ram is "/SSROMS/bkram.bin", though it is not cartridge.

#Controls
In Menu : 
A(2 in wiimote): select menu item
up/down: pad or stick

InGame (Do not point monitor by wiimote 1 in any controllers.)
Wiimote(horizontal), Classic, Gamecube: Action
PADs or Stick: move
A, Y, Y: A (chageable)
1, B, B: B (chageable)
2, A, A: C (chageable)
-, X, X: X (chageable)
B, ZL,subStick(any direction): Y (chageable)
 , ZR, Z: Z (chageable)
 ,FULL L, LTrigger: LTrigger (chageable)
 ,FULL R, RTrigger: RTrigger (chageable)
+,+,Start: Start (chageable)
Home, Home, Z+Start: Quit
Wiimote when poinging monitor (you can see a breif square pointer)
-&1  : save state slot 1
-&2  : save state slot 2
+&1  : load state slot 1
+&2  : load state slot 2
UP   : Toggle VDP2 NBG0 display
RIGHT: Toggle VDP2 NBG1 display
DOWN : Toggle VDP2 NBG2 display
LEFT : Toggle VDP2 NBG3 display
A    : Toggle VDP2 RBG0 display
B    : Toggle VDP1 display

You can save two states in each game.
When you cannot play normaly bacause of display priority, try toggle buttons.

#Known issues
-Slow (owing to software video driver): 5-15 fps average. However, because the auto-frameskip is active by default, some games run at playable speed.
-Not displaying some images (So, try to push any buttons on black screen.)
-Freezing

#Brief Change Log
% ver. Unofficial r2604 beta14 - Oct. 1, 2010
 -support saving settings
 -support configuring buttons
 -some optimizations (a little fast)
 -scroll display of long file name
 -some minor fixes and changes

% ver. Unofficial r2604 beta13 - Sep. 24, 2010
 -improve processing vdp1 (fix some unvisiblities and flickers of vdp1)
 -fix path name of ROM 16M-bit cartridge (maybe affect KOF95 etc.)
 -some minor fixes and changes

% ver. Unofficial r2604 beta12 - Sep. 18, 2010
 -add some previous unhandled commands of vdp2
 -use optimization options of compiler (a little fast)
 -use inline assemblies more in functions used in RBG0 and RBG1 (a little fast but not accurate)
 -some minor fixes and changes

% ver. Unofficial r2604 beta11 - Sep. 11, 2010
 -add "additive" special color calculation mode
 -fix color bug owing to endian
 -use inline assembler in the mulfixed-function (used in RBG0 and RBG1) for speed up (but a little..)
 -some minor fixes and changes

% ver. Unofficial r2604 beta10 - Sep. 6, 2010
 -change order of drawing vdp2 for special color calculation mode

% ver. Unofficial r2604 beta9 - Sep. 5, 2010
 -add special color calculation mode (blend colors)
 -thread audio and increase buffer
 -some minor fixes and changes

% ver. Unofficial r2604 beta8 - Aug. 28, 2010
 -add more some previous unhandled commands of SH2 and memory accesses
 -fix color offset to avoid bluish image
 -some minor fixes and changes

% ver. Unofficial r2604 beta7 - Aug. 18, 2010
 -based on the original yabause r2604
 -change mounting method of fat for stable mounting (retry three times)
 -some minor fixes and changes

% ver. Unofficial r2411 beta6 - Aug. 15, 2010
 -recompile for recent HBC1.0.8 and recenet libogc (I don't know using IOS58 for USB2)
 -add some previous unhandled commands of SH2 (ex. Sega Rally Champ. works)
 -some minor fixes and changes

% ver. Unofficial r2411 beta5 - Mar. 27, 2010
 -fix user-clipping
 -add subsubmenu of selecting sound driver
 -some minor fixes and changes

% ver. Unofficial r2411 beta4 - Mar. 6, 2010
 -add bios setting submenus (default is "without bios")
 -fix variable type of the localX, localY taken from rr branch
 -some minor fixes and changes

% ver. Unofficial r2411 beta3 - Feb. 13, 2010
 -avoid crash in scsp
 -fix clipping bug more
 -display vdp1 palette only mode

% ver. Unofficial r2411 beta2 - Jan. 23, 2010
 -fix clipping bug in high-reso.
 -support state save & load
 -sort game list alphabetically with case-insensitive
 -some minor fixes and changes

% ver. Unofficial r2411 beta1 - Dec. 26, 2009
 -support USB storage
 -sort game list alphabetically

% ver. Unofficial r2411 alpha10 - Dec. 5, 2009
 -use GX in converting resolution
 -fix pixel size of vdp1 on the games such as Virtua Fighter

% ver. Unofficial r2411 alpha9 - Nov. 6, 2009
 -based on the original yabause r2411 
 -fix putting position of vdp1 in the games using high resolution modes

% ver. Unofficial 0.9.10 alpha8 - Nov. 2, 2009 
 -add submenu of setting cartridge
 -not compile high resolution version (highreso.dol) because of bugs

% ver. Unofficial 0.9.10 alpha7 - Oct. 31, 2009 
 -can play repeatedly
 -fix displaying more
 -high resolution version (highreso.dol)

% ver. Unofficial 0.9.10 alpha6 - Oct. 29, 2009 
 -fix displaying, again (but, cannot test all TV-modes except NTSC-J)
 -omit small black square in left-top corner
 -delete stopping DVD (because the latest HBC stops DVD)

% ver. Unofficial 0.9.10 alpha5 - Oct. 25, 2009 
 -fix displaying

% ver. Unofficial 0.9.10 alpha4 - Oct. 24, 2009 
 -support Gamecube Controller & stick of Classic tontroller
 -improve displaying ..(but, provisionally)

% ver. Unofficial 0.9.10 alpha3 - Jun. 2, 2009 
 -based on the original yabause 0.9.10
 -set DRAM32MBIT Cart

% ver. Unofficial 0.9.8 alpha2 - Feb. 4, 2009 
 -based on the original yabause 0.9.9
 -can play without bios file

% ver. Unofficial 0.9.8 alpha1 - Jan. 10, 2009 
 -based on the original yabause 0.9.8
 -submenu of games
 -stop the sound when you return to the main menu
 -set backup ram as "/SSROMS/bkram.bin"
