		-------------------------------------------------------
				        Dualis
			             A DS emulator

				      /Mic, 2006

		-------------------------------------------------------



	About
	-----
	
	Dualis is a plugin-based DS emulator for x86/Win32 computers. It is
	written	in x86 assembly and C++.


	What is emulated
	----------------

	ARM946E-S	Most armv4 features, some armv5te features.
			Caches are currently disabled.

	ARM7TDMI	Missing some instructions.

	Video		Both screens are emulated.
			The following modes are emulated (more or less):
			
			  BG_MODE0
			  BG_MODE1
			  BG_MODE2
			  BG_MODE3
			  BG_MODE4
			  BG_MODE5
			  BG_MODE6	 (main core)
			  MODE_FB0..FB3	 (main core)

			All color effects are emulated.
			The 3D-hardware commands are mapped directly
			onto OpenGL. 3D hardware emulation is currently
			fairly limited and only works in OpenGL mode.
			The main 2D core data is effectively discarded
			when BG0 is set as a 3D layer.

	Audio		PCM8, PCM16. PSG is supported for channels 8-15.
			Audio is not recorded in AVI captures currently.
			
	WiFi		Nothing.

	IPC		Sync register and FIFO are emulated.

	SPI		Firmware access is partially supported.
			Touchscreen input is faked using the IPC method
			implemented in NDSLib.

	Keys		All keys are emulated.

	DMA		All channels, nearly all modes.
	
	Timers		All timers are emulated in both prescalar and count-up mode.

	Interrupts	Vblank, hblank, key, DMA and timer interrupts are emulated,
			though not completely accurate.	

	CF devices	GBAMP


	Keys
	----

	D-Up		Up arrow
	D-Down		Down arrow
	D-Left		Left arrow
	D-Right		Right arrow
	B		Z
	A		X
	Start		Return
	Select		Space
	L		L
	R		R

	Touchscreen	Use the mouse to move the stylus around, and the left
			button to "touch" the screen.


	Keyboard shortcuts
	------------------

	Ctrl+Shift+D 	Toggle DMA transfers on/off.

	Ctrl+1		Screenshot main video core
	Ctrl+2		Screenshot sub video core
	Ctrl+3		Screenshot both video cores

	Ctrl+Shift+1	Display main video core only
	Ctrl+Shift+2	Display sub video core only
	Ctrl+Shift+3	Display both video cores

	Alt+Return	Toggle fullscreen mode

	Ctrl+Shift+F	Toggle fps display in fullscreen mode

	,		Start recording AVI
	.		Stop recording AVI
	Ctrl+a		Setup AVI recording


	Commandline parameters
	----------------------

	-theme <n>	Select color theme setting (n = 0..15)

	-wincon		Makes dualis open up a windows console where it 
			prints some information.


	Notes on GBAMP emulation
	------------------------

	The directory of the ROM that you are running is considered the root
	directory. It and its subdirectories will be scanned recursively for
	files when the ROM is loaded, and whenever you reset emulation.
	The emulator only supports read-operations, so creating new files
	and directories from witin the ROM is not possible. File date/time
	data is not available.
	The limitations of the FAT are as follows:

	Max total number of files/directories: 			32768*
	Max number of files/directories on the root level: 	512*
	Max total file size:					256 MB

	* The numbers specify the number of directory entries. Files that
	use long filenames require more than one directory entry - thereby
	reducing the possible number of files.


	Notes on main memory (display fifo) mode
	----------------------------------------
	
	The display fifo is at this point not emulated accurately in respect
	to the hardware. Instead what happens in the emulator is the following:

	When display fifo mode is enabled in DISPCNT, at the beginning of a hblank
	the GPU sends a request to the MMU checking for a properly set up DMA
	channel (word count=4, repeat on, fixed dest, etc). If no such channel is
	found, nothing is done. If such a channel is found the MMU will return the
	DMA source address to the GPU, which in turn copies the data from that
	address (offset by the current scanline) to the virtual screen.

	There's no delay until the next frame starts, as would be the case on
	a real DS.

		