program Music;
@use "screen"
var
	sidfile: incsid("resources/music/courier30.sid",2);
	const useKernal:byte=0;

/*
	Sid music is played by calling
	the sidfile_1_play address for each raster interupt trigger

*/
interrupt Raster1();
begin
	StartIRQ(useKernal);
	// Turn on background color only when SID file is playing
	screen_bg_col:=green;
	call(sidfile_1_play);	
	// Turn off (black) backgrund color. We can now observe how much raster time has been used!
	screen_bg_col:=black;
	CloseIRQ();
end;

begin
	Screen::Init();
	Screen::EnableVIC4();
	InitSid(sidfile_1_init);
	setmemoryconfig(1,0,useKernal);
	StartRasterChain(Raster1(),$50,useKernal);
	Loop();

end.