dumper.c
void SerialTransferListen()
{
	int i = 0;
	unsigned int MemPoint = 0;

	//Wait for command from the PC
	if(CheckSIOInBuffer())
	{
		switch(ReadByteSIO())
		{
			default:
				break;

			case 'R':			//Read BIOS
				//Get part of the BIOS to send (0 - 255)
				while(1)if(CheckSIOInBuffer())break;
				MemPoint = ReadByteSIO();

				//Get offset in 2048 byte segments
				MemPoint = (MemPoint * 2048);

				for (i = 0; i < 2048; i++)
				{
					while(1)if(CheckSIOOutBuffer())break;
					SendByteSIO(*(uchar *)(0x0bfc00000 + i + MemPoint));
				}
				VSyncCounter = 0;
				break;

			case 'C':			//Send BIOS CRC-32

				while(1)if(CheckSIOOutBuffer())break;
				SendByteSIO((uchar)(BIOSCRC32 & 0xFF));

				while(1)if(CheckSIOOutBuffer())break;
				SendByteSIO((uchar)(BIOSCRC32 >> 8));

				while(1)if(CheckSIOOutBuffer())break;
				SendByteSIO((uchar)(BIOSCRC32 >> 16));

				while(1)if(CheckSIOOutBuffer())break;
				SendByteSIO((uchar)(BIOSCRC32 >> 24));

				VSyncCounter = 0;
				break;
		}
	}

	VSyncCounter++;

	//If half a second passed from the last transmission, cancel communication
	if(VSyncCounter > 30)CurrentScreen--;

	GsPrintString(20,20,"Serial cable transfer");
	GsPrintString(20,40,"Status:");
	GsPrintString(20,50,"Transferring data");
}
//Command listen mode of the serial transfer
Command listen mode of the serial transfer
Command listen mode of the serial transfer
void SerialTransferListen()
{
	int i = 0;
	unsigned int MemPoint = 0;
	if(CheckSIOInBuffer())
	{
		switch(ReadByteSIO())
		{
			default:
				break;
			case 'R':			
				while(1)if(CheckSIOInBuffer())break;
				MemPoint = ReadByteSIO();
				MemPoint = (MemPoint * 2048);
				for (i = 0; i < 2048; i++)
				{
					while(1)if(CheckSIOOutBuffer())break;
					SendByteSIO(*(uchar *)(0x0bfc00000 + i + MemPoint));
				}
				VSyncCounter = 0;
				break;
			case 'C':			
				while(1)if(CheckSIOOutBuffer())break;
				SendByteSIO((uchar)(BIOSCRC32 & 0xFF));
				while(1)if(CheckSIOOutBuffer())break;
				SendByteSIO((uchar)(BIOSCRC32 >> 8));
				while(1)if(CheckSIOOutBuffer())break;
				SendByteSIO((uchar)(BIOSCRC32 >> 16));
				while(1)if(CheckSIOOutBuffer())break;
				SendByteSIO((uchar)(BIOSCRC32 >> 24));
				VSyncCounter = 0;
				break;
		}
	}
	VSyncCounter++;
	if(VSyncCounter > 30)CurrentScreen--;
	GsPrintString(20,20,"Serial cable transfer");
	GsPrintString(20,40,"Status:");
	GsPrintString(20,50,"Transferring data");
}
void SerialTransferListen ( ) { int i = 0 ; unsigned int MemPoint = 0 ; if ( CheckSIOInBuffer ( ) ) { switch ( ReadByteSIO ( ) ) { default : break ; case ' ' : while ( 1 ) if ( CheckSIOInBuffer ( ) ) break ; MemPoint = ReadByteSIO ( ) ; MemPoint = ( MemPoint * 2048 ) ; for ( i = 0 ; i < 2048 ; i ++ ) { while ( 1 ) if ( CheckSIOOutBuffer ( ) ) break ; SendByteSIO ( * ( uchar * ) ( 0x0bfc00000 + i + MemPoint ) ) ; } VSyncCounter = 0 ; break ; case ' ' : while ( 1 ) if ( CheckSIOOutBuffer ( ) ) break ; SendByteSIO ( ( uchar ) ( BIOSCRC32 & 0xFF ) ) ; while ( 1 ) if ( CheckSIOOutBuffer ( ) ) break ; SendByteSIO ( ( uchar ) ( BIOSCRC32 >> 8 ) ) ; while ( 1 ) if ( CheckSIOOutBuffer ( ) ) break ; SendByteSIO ( ( uchar ) ( BIOSCRC32 >> 16 ) ) ; while ( 1 ) if ( CheckSIOOutBuffer ( ) ) break ; SendByteSIO ( ( uchar ) ( BIOSCRC32 >> 24 ) ) ; VSyncCounter = 0 ; break ; } } VSyncCounter ++ ; if ( VSyncCounter > 30 ) CurrentScreen -- ; GsPrintString ( 20 , 20 , " " ) ; GsPrintString ( 20 , 40 , " " ) ; GsPrintString ( 20 , 50 , " " ) ; }
Command listen mode of the serial transfer
Command listen mode of the serial transfer
//Wait for command from the PC //Read BIOS //Get part of the BIOS to send (0 - 255) //Get offset in 2048 byte segments //Send BIOS CRC-32 //If half a second passed from the last transmission, cancel communication