Core/burn/drv/pgm/pgm_prot.cpp
// the internal MCU boot code automatically does this DMA
// and puts the version # of the data rom in ram
the internal MCU boot code automatically does this DMA
and puts the version # of the data rom in ram
the internal MCU boot code automatically does this DMA and puts the version # of the data rom in ram
static void IGS022_reset()
{
	int i;
	UINT16 *PROTROM = (UINT16*)(PGMUSER0 + 0x10000);
	UINT16 tmp;
	for (i = 0; i < 0x4000/2; i++)
		sharedprotram[i] = 0xa55a;
	UINT16 src = PROTROM[0x100 / 2];
	UINT32 dst = PROTROM[0x102 / 2];
	UINT16 size = PROTROM[0x104/ 2];
	UINT16 mode = PROTROM[0x106 / 2];
	src = ((src & 0xff00) >> 8) | ((src & 0x00ff) << 8);
	dst = ((dst & 0xff00) >> 8) | ((dst & 0x00ff) << 8);
	size = ((size & 0xff00) >> 8) | ((size & 0x00ff) << 8);
	mode &= 0xff;
	src >>= 1;
	IGS022_do_dma(src,dst,size,mode);
	tmp = PROTROM[0x114/2];
	tmp = ((tmp & 0xff00) >> 8) | ((tmp & 0x00ff) << 8);
	sharedprotram[0x2a2/2] = tmp;
}
static void IGS022_reset ( ) { int i ; UINT16 * PROTROM = ( UINT16 * ) ( PGMUSER0 + 0x10000 ) ; UINT16 tmp ; for ( i = 0 ; i < 0x4000 / 2 ; i ++ ) sharedprotram [ i ] = 0xa55a ; UINT16 src = PROTROM [ 0x100 / 2 ] ; UINT32 dst = PROTROM [ 0x102 / 2 ] ; UINT16 size = PROTROM [ 0x104 / 2 ] ; UINT16 mode = PROTROM [ 0x106 / 2 ] ; src = ( ( src & 0xff00 ) >> 8 ) | ( ( src & 0x00ff ) << 8 ) ; dst = ( ( dst & 0xff00 ) >> 8 ) | ( ( dst & 0x00ff ) << 8 ) ; size = ( ( size & 0xff00 ) >> 8 ) | ( ( size & 0x00ff ) << 8 ) ; mode &= 0xff ; src >>= 1 ; IGS022_do_dma ( src , dst , size , mode ) ; tmp = PROTROM [ 0x114 / 2 ] ; tmp = ( ( tmp & 0xff00 ) >> 8 ) | ( ( tmp & 0x00ff ) << 8 ) ; sharedprotram [ 0x2a2 / 2 ] = tmp ; }
the internal MCU boot code automatically does this DMA
and puts the version # of the data rom in ram
the internal MCU boot code automatically does this DMA and puts the version # of the data rom in ram
// fill ram with A5 patern // the auto-dma // there is also a version ID? (or is it some kind of checksum) that is stored in the data rom, and gets copied.. // Dragon World 3 checks it