Esempio n. 1
0
// this must be the first executable code as the loader executes from the first program address
ReturnType file_loader(int block, int status)
{
	APPLICATION_INITIALISE();

	// boot an elf file
	{
		unsigned int i = status;
		if (ARRAY_SIZE(LoadList) <= i) {
			i = 0;
		}
		//for (; i < ARRAY_SIZE(LoadList); ++i) {
		{
			print("load: ");
			print(LoadList[i].filename);
			print_char('\n');
			int error = elf32_exec(LoadList[i].filename, LoadList[i].arg);
			print("load '");
			print(LoadList[i].filename);
			print("' error = ");
			print_int(error);
			print_char('\n');
		}
	}

	APPLICATION_FINALISE(0, 0);
}
Esempio n. 2
0
// this must be the first executable code as the loader executes from the first program address
ReturnType lcd_test(int block, int status)
{
	APPLICATION_INITIALISE();

	print("lcd test\n");

	print("LCD_VRAM          = ");
	print_u32(LCD_VRAM);
	print_char('\n');

	print("LCD_HEIGHT_LINES  = ");
	print_u32(LCD_HEIGHT_LINES);
	print_char('\n');

	print("LCD_WIDTH_PIXELS  = ");
	print_u32(LCD_WIDTH_PIXELS);
	print_char('\n');

	print("LCD_WIDTH_BYTES   = ");
	print_u32(LCD_WIDTH_BYTES);
	print_char('\n');


	print("VRAM_HEIGHT_LINES = ");
	print_u32(LCD_VRAM_HEIGHT_LINES);
	print_char('\n');

	print("VRAM_WIDTH_PIXELS = ");
	print_u32(LCD_VRAM_WIDTH_PIXELS);
	print_char('\n');

	print("VRAM_WIDTH_BYTES  = ");
	print_u32(LCD_VRAM_WIDTH_BYTES);
	print_char('\n');

	init_lcd();

	do {
		print("loop (space->pause/resume, enter -> exit)\n");
	} while (process());


	APPLICATION_FINALISE(0, 0);
}