Example #1
0
int main()
{
	xenos_init(VIDEO_MODE_VGA_640x480);
	console_init();

	xenon_make_it_faster(XENON_SPEED_FULL);

	usb_init();
	usb_do_poll();

	xenon_ata_init();

	xenon_atapi_init();

	fatInitDefault();
	
	xenon_caps_init("uda:/video.avi");
	xenon_caps_start();
	
	int i = 20;
	while(i>0) {
		printf("I'm happy and you ?\n");
		delay(1);
		printf("Kick Ass !!\n");
		delay(1);
		printf("Real Time encoding !!!\n");
		i--;
	}
	
	xenon_caps_end();
	
	return 0;
}
Example #2
0
void main (int argc, char **argv)
{
	// Init libxenon
	xenos_init(VIDEO_MODE_AUTO);
	console_init();

	xenon_make_it_faster(XENON_SPEED_FULL);

#if 0
	threading_init();
	network_init_sys();
#endif

	usb_init();
	usb_do_poll();

	xenon_ata_init();

	xenon_atapi_init();

	fatInitDefault();
#ifdef CAPS	
	fatMountSimple("udb", &usb2mass_ops_1);
	printf("CAPTURE BUILD !!!\n");
#endif	
	// Quake II
	
	char * newargv[] = {
		"uda:/q3.elf",
		//"+set", "game", "baseq2", "+set", "cddir", "uda:/baseq2/"
		"+set", "basedir" , "uda:/",
		"+set", "cddir", "uda:/baseq2/",
		"+set", "cl_maxfps", "400"
	};
	int newargc = sizeof (newargv) / sizeof (char *);
	
	Qcommon_Init (newargc, newargv);
	
	console_close();

	int	time, oldtime, newtime;
	oldtime = Sys_Milliseconds();
	while (1)
	{
		do {
			newtime = Sys_Milliseconds ();
			time = newtime - oldtime;
		} while (time < 1);
		Qcommon_Frame (time);
		oldtime = newtime;
	}
}
Example #3
0
static void frontend_xenon_init(void *data)
{
   (void)data;
   xenos_init(VIDEO_MODE_AUTO);
   console_init();
   xenon_make_it_faster(XENON_SPEED_FULL);
   usb_init();
   usb_do_poll();
   xenon_ata_init();
#if 0
   dvd_init();
#endif
}
Example #4
0
File: main.cpp Project: JQE/Tank360
int main() {
#ifdef LIBXENON
    usb_init();
    usb_do_poll();
    xenon_ata_init();
    dvd_init();
    xenon_smc_start_bootanim();
#endif

    cApp.Run();

    while (1) {
    }

    return 0;
}
Example #5
0
int main(int argc, char *argv[])
{
	xenon_make_it_faster(XENON_SPEED_FULL);
	InitVideo();
	
	usb_init();
	usb_do_poll();
	xenon_ata_init();
	
	xenon_sound_init();
	
	SetupPads();
	mount_all_devices();
	// Set defaults
	DefaultSettings(); 
	// Initialize font system
	InitFreeType((u8*)font_ttf, font_ttf_size); 
	
	browserList = (BROWSERENTRY *)malloc(sizeof(BROWSERENTRY)*MAX_BROWSER_SIZE);
		
	while (1) // main loop
	{
		MainMenu(MENU_GAMESELECTION);
		EmuLaunch();
		
		if(EmuRunning)
			MainMenu(MENU_GAME);
		else
			MainMenu(MENU_GAMESELECTION);		

		if(EmuRunning)
			EmuResume();
		else
			EmuLaunch();
		
		if(EmuConfigRequested) {				
			EmuConfigRequested = 0;
			break;
		}
		if(EmuResetRequested) {
			EmuResetRequested = 0;
			EmuReset();
		}
	}
	
	return 0;
}
Example #6
0
    void Hw::SystemInit(int flags){
        if(init_flags==0){
            xenon_make_it_faster(XENON_SPEED_FULL);
            
            if(flags & INIT_SOUND){
                
            }
            if(flags & INIT_VIDEO){
                
            }
            if(flags & INIT_USB){
                usb_init();
                usb_do_poll();
            }
            if(flags & INIT_NETWORK){
                network_init();
            }
            
            if(flags & INIT_ATA){
                xenon_ata_init();
            }
            
            if(flags & INIT_ATAPI){
                xenon_atapi_init();
            }
            
            if(flags & INIT_FILESYSTEM){
				mount_all_devices();
				findDevices();
            }
            
            if(flags & INIT_SFCX){
				sfcx_init();
            }
            
            init_flags = flags;
        }
    }
Example #7
0
void Sys_PlatformInit( void )
{
	// Init libxenon
	xenos_init(VIDEO_MODE_AUTO);

	console_init();

	xenon_make_it_faster(XENON_SPEED_FULL);
	
	
	http_output_start();
		
#if 0
	threading_init();
	network_init_sys();
#endif	
	
	usb_init();
	usb_do_poll();

	xenon_ata_init();
	xenon_atapi_init();

	// fatInitDefault();
	// XTAFMount();	
	
	// fatInit(16, 1);
	
	fatMount ("uda", &usb2mass_ops_0, 0, 256, 64);
	
	ListDevices();
	
	Sys_SetEnv("HOME", "uda:/");
	
	console_close();
}
Example #8
0
void HardwareManager::InitializeXbox()
{
    // Will only be instantiated once for the lifetime of the application
    static int initialized = 0;
    
    // Don't do anything if we've already initialized
    if(initialized == 1) return;
    
    // Make sure all CPU cores are at full speed
    xenon_make_it_faster(XENON_SPEED_FULL);
    
    // Initialize USB and scan for devices
    usb_init();
    usb_do_poll();
    
    // Initialize HDD's
    xenon_ata_init();
    
    // Initialize DVD
    dvd_init();
    
    // Make sure this only happens once
    initialized = 1;
}
Example #9
0
int main(){
	const char * s;
	char path[256];
	
	int handle;
	struct controller_data_s pad;
	int pos=0,ppos=-1,start,count,i;

	xenos_init(VIDEO_MODE_AUTO);
	console_init();

	xenon_make_it_faster(XENON_SPEED_FULL);
	
	usb_init();
	usb_do_poll();
	
	xenon_ata_init();

	xenon_atapi_init();
	
	fatInitDefault();

	handle=-1;
    handle=bdev_enum(handle,&s);
    if(handle<0) return 0;

	strcpy(path,s);
	strcat(path,":/");	

	load_dir(path);
	
	for(;;){
 		usb_do_poll();		
 		get_controller_data(&pad, 0);
		
		if (pad.s1_y>STICK_THRESHOLD) --pos;
		if (pad.s1_y<-STICK_THRESHOLD) ++pos;
		
		if (entrycount && (pos<0 || pos>=entrycount)){
			pos=ppos;
			continue;
		}
		
		if (pad.logo) return 0;
		
		if (pad.a){
			if(entries[pos].d_type&DT_DIR){
				append_dir_to_path(path,entries[pos].d_name);
				load_dir(path);
				ppos=-1;
				pos=0;
			}else{
				char fn[256];
				strcpy(fn,path);
				strcat(fn,entries[pos].d_name);
				
				printf("%s\n",fn);

				if (strstr(entries[pos].d_name,".elf") || strstr(entries[pos].d_name,".elf32")) { // ugly
					elf_runFromDisk(fn);
				}else{
					FILE * f=fopen(fn,"rb");
					if(f){
						int size=1024*1024;
						int totred=0,red;

						void * buf=malloc(size);

						u64 beg=mftb();
						do{
							red=fread(buf,1,size,f);
							totred+=red;
							console_putch('.');
						}while(red==size);

						printf("\n%d bytes, %f KB/s\n",totred, (float)(totred/1024.0)/((float)(mftb()-beg)/PPC_TIMEBASE_FREQ));

						free(buf);

						fclose(f);
					}
				}
			}
		}
		
		if(pad.back){
			append_dir_to_path(path,"..");
			load_dir(path);
			ppos=-1;
			pos=0;
		}
		
		if(pad.b){
		    do{
				handle=bdev_enum(handle,&s);
			}while(handle<0);
			strcpy(path,s);
			strcat(path,":/");
			load_dir(path);
			ppos=-1;
			pos=0;
		}

		if (ppos==pos) continue;
		
		memset(&pad,0,sizeof(struct controller_data_s));
		
		console_set_colors(BG_COL,FG_COL);
		console_clrscr();
		printf("A: select, B: change disk, Back: parent dir, Logo: reload Xell\n\n%s\n\n",path);
		
		start=MAX(0,pos-MAX_DISPLAYED_ENTRIES/2);
		count=MIN(MAX_DISPLAYED_ENTRIES,entrycount-start);
		
		for(i=start;i<start+count;++i){
			struct dirent *de = &entries[i];

			if (i==pos){
				console_set_colors(FG_COL,BG_COL);
			}else{
				console_set_colors(BG_COL,FG_COL);
			}
			
			if (de->d_type&DT_DIR) console_putch('[');

			s=de->d_name;
			while(*s) console_putch(*s++);
			
			if (de->d_type&DT_DIR) console_putch(']');

			console_putch('\r');
			console_putch('\n');
		}
			
		ppos=pos;
		
		do{
	 		usb_do_poll();		
			get_controller_data(&pad, 0);
		}while(pad.a || pad.b || pad.back || pad.s1_y>STICK_THRESHOLD || pad.s1_y<-STICK_THRESHOLD);
	}
	
	
	return 0;
}
Example #10
0
int main() {

	printf("main\n");

	xenos_init(VIDEO_MODE_HDMI_720P);
	xenon_make_it_faster(XENON_SPEED_FULL);

	xenon_sound_init();
	//xenos_init(VIDEO_MODE_YUV_720P);
	//console_init();
	usb_init();
	usb_do_poll();
	xenon_ata_init();
	xenon_atapi_init();

	//fatInitDefault();
	
	//char mount[10];
	//sprintf(mount, "uda0");
	//fatMount(mount, &usb2mass_ops_0, 0, 2, 64);
	
	ntfs_md *mounts;
	//ntfsMountAll (&mounts, NTFS_READ_ONLY);
	
	
	XTAFMount();
	
	findDevices();
	
	init_miss();
	
	time_t rawtime;
	time ( &rawtime );
	printf ( "The current local time is: %s", ctime (&rawtime) );
	
	/*

	 */
	memset(&Config, 0, sizeof (PcsxConfig));

	//    network_init();
	//    network_print_config();

	//console_close();

	xenon_smc_start_bootanim(); // tell me that telnet or http are ready

	// telnet_console_init();
	// mdelay(5000);

	//httpd_start();

	// uart speed patch 115200 - jtag/freeboot
	// *(volatile uint32_t*)(0xea001000+0x1c) = 0xe6010000;

	//memset(&Config, 0, sizeof (PcsxConfig));
	strcpy(Config.Net, "Disabled");
	strcpy(Config.Cdr, "CDR");
	strcpy(Config.Gpu, "GPU");
	strcpy(Config.Spu, "SPU");
	strcpy(Config.Pad1, "PAD1");
	strcpy(Config.Pad2, "PAD2");

	strcpy(Config.Bios, "SCPH1001.BIN"); // Use actual BIOS
	//strcpy(Config.Bios, "scph7502.bin"); // Use actual BIOS
	//strcpy(Config.Bios, "HLE"); // Use HLE
	strcpy(Config.BiosDir, "sda0:/devkit/pcsxr/bios");
	strcpy(Config.PatchesDir, "sda0:/devkit/pcsxr/patches_/");

	Config.PsxAuto = 1; // autodetect system
	
	Config.Cpu = CPU_DYNAREC;
	//Config.Cpu =  CPU_INTERPRETER;

	strcpy(Config.Mcd1, "sda0:/devkit/pcsxr/memcards/card1.mcd");
	strcpy(Config.Mcd2, "sda0:/devkit/pcsxr/memcards/card2.mcd");

	// useSoftGpu();
	/*
		strcpy(Config.Mcd1, "sda:/hdd1/xenon/memcards/card1.mcd");
		strcpy(Config.Mcd2, "sda:/hdd1/xenon/memcards/card2.mcd");
	 */

	//InitVideo();

	SetIso(cdfile);
	if (LoadPlugins() == 0) {
		if (OpenPlugins() == 0) {
			if (SysInit() == -1) {
				printf("SysInit() Error!\n");
				return -1;
			}

			SysReset();
			// Check for hle ...
			if (Config.HLE == 1) {
				printf("Can't continue ... bios not found ...\r\n");
				//exit(0);
			}

			CheckCdrom();
			LoadCdrom();

			psxCpu->Execute();
		}
	}

	printf("Pcsx exit ...\r\n");
	return 0;
}
Example #11
0
int main(void)
{
   const char *s = NULL;
   char path[256];

   int handle;
   struct controller_data_s pad;
   int pos = 0, ppos = -1;

   xenos_init(VIDEO_MODE_AUTO);
   console_init();
   xenon_make_it_faster(XENON_SPEED_FULL);
   usb_init();
   usb_do_poll();
   xenon_ata_init();
   dvd_init();

   handle = -1;
   handle = bdev_enum(handle, &s);
   if (handle < 0)
      return 0;

   strcpy(path, s);
   strcat(path, ":/");	

   load_dir(path);

   for (;;)
   {
      usb_do_poll();		
      get_controller_data(&pad, 0);

      if (pad.s1_y > STICK_THRESHOLD || pad.up)
         pos--;
      if (pad.s1_y < -STICK_THRESHOLD || pad.down)
         pos++;

      if (entrycount && (pos < 0 || pos >= entrycount))
      {
         pos = ppos;
         continue;
      }

      if (pad.logo)
         return 0;

      if (pad.a)
      {
         if (entries[pos].d_type & DT_DIR)
         {
            append_dir_to_path(path,entries[pos].d_name);
            load_dir(path);
            ppos = -1;
            pos = 0;
         }
         else
         {
            char fn[256];
            strcpy(fn, path);
            strcat(fn, entries[pos].d_name);

            printf("%s\n", fn);

            start_ssnes(fn);
         }
      }

      if (pad.select)
      {
         append_dir_to_path(path, "..");
         load_dir(path);
         ppos = -1;
         pos = 0;
      }

      if (pad.b)
      {
         do
         {
            handle = bdev_enum(handle, &s);
         } while (handle < 0);

         strcpy(path, s);
         strcat(path, ":/");
         load_dir(path);
         ppos = -1;
         pos = 0;
      }

      if (ppos == pos)
         continue;

      memset(&pad, 0, sizeof(pad));

      console_set_colors(BG_COL, FG_COL);
      console_clrscr();
      printf("A: select, B: change disk, Back: parent dir, Logo: reload Xell\n\n%s\n\n", path);

      int start = MAX(0, pos - MAX_DISPLAYED_ENTRIES / 2);
      int count = MIN(MAX_DISPLAYED_ENTRIES, entrycount - start);

      for (int i = start; i < start + count; i++)
      {
         struct dirent *de = &entries[i];

         if (i == pos)
            console_set_colors(FG_COL, BG_COL);
         else
            console_set_colors(BG_COL, FG_COL);

         if (de->d_type & DT_DIR)
            console_putch('[');

         s = de->d_name;
         while (*s)
            console_putch(*s++);

         if (de->d_type & DT_DIR)
            console_putch(']');

         console_putch('\r');
         console_putch('\n');
      }

      ppos = pos;

      do
      {
         usb_do_poll();		
         get_controller_data(&pad, 0);
      } while (pad.a || pad.b || pad.select || pad.s1_y > STICK_THRESHOLD || pad.s1_y < -STICK_THRESHOLD);
   }

   return 0;
}