neutrinoSX2 v0.2 - a PS2 Emulator by Muad 
email : atreides.muaddib@caramail.com

This emu is OpenSource under the GNU License.


HOW IT WORKS ?
version: 0.1
date: 9 september 2002


THIS FILE IS FOR PEOPLE WHO WANT TO HELP ME IN CODING THIS EMU.
( or if you are a bit curious ).

Notes:
It's a hard work to do this, so it is very short but I hope it can help you.


I./
Read the Elf File and copy it to the memory


II./

Main loop ( nSX2.c )
|
|----Execute the current opcode ( r5900_main.c )
|
|
|----Execute the DMA Stuff ( DMA_main.c )
|
|----Execute the GS Stuff ( GS_main.c )




Execute the current opcode ( r5900_main.c )	
	1./
	Read a 32 bit value  at a Specific addresse ( MipsCpu.PC ) and store it in ( MipsCpu.opcode )
	
	2./
	Decode this value
		I use function pointer to execute the opcode.
		The line is :
		
		normal_opc[((MipsCpu.opcode >> 26) & 0x3F)]();				//Execute the current opcode
		
		For exemple if MipsCpu.opcode = 0x3c021000.
			(0x3c021000 >> 26) 	=  	0x0f
			(0x0f & 0x3F )		=	0x0f ( 15 )
			
		the 16 th value ( In C, array start at 0 ) of the array normal_opc ( r5900_main_table.h ) is LUI
		
		So the emulator executes the functions:
			normal_opc[15]() which is  LUI() ( r5900_main.c )
			
	3./
	If the opcode is a LOAD or STORE functions :
		I do all memory acces in r5900_memory.c.
		And the emu write or read to a special area, I store the values.
					
					
Execute the DMA Stuff ( DMA_main.c )
	1./
	If an acces to the DMA Memory is detected,
		I do some stuffs.
		
	2./
	Else I do Nothing						
	
	
Execute the GS Stuff ( GS_main.c )	
	1./
	I use a counter to refresh the screen, until I don't know when refresh the screen.
	