//
// Early Splash Screen, on the GS Version
// Since it takes a while to initialize
//
#include "system.h"
#include "game.h"


#ifdef IIGS
segment "screen";
#pragma noroot
#include <Memory.h>
#endif

extern char credits_lz4;

extern char incbin_sprites_data_256_start[];

CODE_BLOCK(8) void scr_credit()
{
#ifdef F256
	//$$JGA TODO - fix this
	*((char*)0x200) = (char)((long)(&incbin_sprites_data_256_start));
	*((char*)0x201) = (char)((long)(&incbin_sprites_data_256_start)>>8);
	*((char*)0x202) = (char)((long)(&incbin_sprites_data_256_start)>>16);
#endif

#ifdef IIGS
	// Keep the Screen on
	*VIDEO_REGISTER|=0xC0;
	// Blank the screen, so you don't see trash in the Frame Buffer
	memset((void*)0xE19E00, (int)0, (size_t)32);
	memset((void*)0xE19D00, (int)0, (size_t)200);
	// Display the Credits
	LZ4_Unpack((char*)(0xE12000), &credits_lz4);
#endif
}
