diff --git a/forwarder/wad.vwii/00000001.app b/forwarder/wad.vwii/00000001.app index 3ae4c4d..888ddb6 100644 Binary files a/forwarder/wad.vwii/00000001.app and b/forwarder/wad.vwii/00000001.app differ diff --git a/forwarder/wad/00000001.app b/forwarder/wad/00000001.app index 3ae4c4d..888ddb6 100644 Binary files a/forwarder/wad/00000001.app and b/forwarder/wad/00000001.app differ diff --git a/forwarder/wad/0001000148424630.tmd b/forwarder/wad/0001000148424630.tmd index 4bcd2d0..58383ec 100644 Binary files a/forwarder/wad/0001000148424630.tmd and b/forwarder/wad/0001000148424630.tmd differ diff --git a/installer/wad.vwii/0001000154484246.tmd b/installer/wad.vwii/0001000154484246.tmd index fd4bd4a..e118935 100644 Binary files a/installer/wad.vwii/0001000154484246.tmd and b/installer/wad.vwii/0001000154484246.tmd differ diff --git a/main/source/Menus/menu_main.cpp b/main/source/Menus/menu_main.cpp index e681531..7dd545b 100644 --- a/main/source/Menus/menu_main.cpp +++ b/main/source/Menus/menu_main.cpp @@ -678,19 +678,10 @@ int MenuMain() if(!first) { - if (Options.sdgecko) - { - xprintf("The HomebrewFilter rev%i\n= == == == == == == == =\nSD Card Gecko initialized.\n\n", SvnRev()); - } - else if(Options.wifigecko) - { + if(Options.wifigecko) WifiGecko_Connect(); - xprintf("The HomebrewFilter rev%i\n= == == == == == == == =\nWifi Gecko connected.\n\n", SvnRev()); - } - else - { - xprintf("The HomebrewFilter rev%i\n= == == == == == == == =\nUSB Gecko initialized.\n\n", SvnRev()); - } + + xprintf("The HomebrewFilter rev%i\n= == == == == == == == =\n\n", SvnRev()); first = true; } @@ -754,7 +745,9 @@ int MenuMain() } // SD, USB - else if(sd_usb_Btn.GetState() == STATE_CLICKED || Settings.sd_insert == -1 || Settings.sd_insert == 2 + else if(sd_usb_Btn.GetState() == STATE_CLICKED || WPAD_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_ZL + || WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_ZL + || Settings.sd_insert == -1 || Settings.sd_insert == 2 || Settings.usb_insert == -1 || Settings.usb_insert == 2 #ifndef VWII || Settings.dvd_insert == -1 || Settings.dvd_insert == 2 @@ -764,8 +757,7 @@ int MenuMain() ) { int device = -1; - if(sd_usb_Btn.GetState() == STATE_CLICKED) - device = devicePrompt(); + device = devicePrompt(); if(device == 1) Settings.device = "sd1"; @@ -780,9 +772,9 @@ int MenuMain() Settings.device = "gca"; else if(device == 6) Settings.device = "gcb"; -#endif else if(device == 7) Settings.device = "all"; +#endif if(device != -1 || Settings.sd_insert == -1 || Settings.sd_insert == 2 || Settings.usb_insert == -1 || Settings.usb_insert == 2 @@ -802,7 +794,9 @@ int MenuMain() } #ifndef VWII // Wii, GC - else if(wii_gc_Btn.GetState() == STATE_CLICKED) + else if(wii_gc_Btn.GetState() == STATE_CLICKED || + WPAD_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_ZR || + WUPC_ButtonsDown(0) & WPAD_CLASSIC_BUTTON_ZR) { int choice = systemPrompt(); diff --git a/main/source/Tools/fileop.cpp b/main/source/Tools/fileop.cpp index 3c89890..f4ca724 100644 --- a/main/source/Tools/fileop.cpp +++ b/main/source/Tools/fileop.cpp @@ -20,6 +20,8 @@ #include #include +#include "../xprintf.h" + #include "fileop.h" #include "main.h" #include "Tools/app_list.h" @@ -154,15 +156,6 @@ typedef struct _EXTENDED_BOOT_RECORD { u16 signature; /* EBR signature; 0xAA55 */ } __attribute__((__packed__)) EXTENDED_BOOT_RECORD; -//#define DEBUG_MOUNTALL - -#ifdef DEBUG_MOUNTALL -#define debug_printf(fmt, args...) \ - fprintf(stderr, "%s:%d:" fmt, __FUNCTION__, __LINE__, ##args) -#else -#define debug_printf(fmt, args...) -#endif - DEVICE_STRUCT part[2][MAX_DEVICES]; static void AddPartition(sec_t sector, int device, int type, int *devnum) @@ -210,6 +203,7 @@ static void AddPartition(sec_t sector, int device, int type, int *devnum) else part[device][*devnum].name[0] = 0; } +#ifndef VWII else if (type == T_ISO9660) { @@ -219,6 +213,7 @@ static void AddPartition(sec_t sector, int device, int type, int *devnum) strcpy(part[device][*devnum].name, "DVD"); } +#endif strcpy(part[device][*devnum].mount, mount); part[device][*devnum].type = type; @@ -270,11 +265,11 @@ static int FindPartitions(int device) } // If this is the devices master boot record - debug_printf("0x%x\n", sector.mbr.signature); + xprintf("0x%x\n", sector.mbr.signature); if (sector.mbr.signature == MBR_SIGNATURE) { memcpy(&mbr, §or, sizeof(MASTER_BOOT_RECORD)); - debug_printf("Valid Master Boot Record found\n"); + xprintf("Valid Master Boot Record found\n"); // Search the partition table for all partitions (max. 4 primary partitions) for (i = 0; i < 4; i++) @@ -282,7 +277,7 @@ static int FindPartitions(int device) partition = &mbr.partitions[i]; part_lba = le32_to_cpu(mbr.partitions[i].lba_start); - debug_printf( + xprintf( "Partition %i: %s, sector %u, type 0x%x\n", i + 1, partition->status == PARTITION_STATUS_BOOTABLE ? "bootable (active)" @@ -294,21 +289,21 @@ static int FindPartitions(int device) // NTFS partition case PARTITION_TYPE_NTFS: { - debug_printf("Partition %i: Claims to be NTFS\n", i + 1); + xprintf("Partition %i: Claims to be NTFS\n", i + 1); // Read and validate the NTFS partition if (interface->readSectors(part_lba, 1, §or)) { - debug_printf("sector.boot.oem_id: 0x%x\n", sector.boot.oem_id); - debug_printf("NTFS_OEM_ID: 0x%x\n", NTFS_OEM_ID); + xprintf("sector.boot.oem_id: 0x%x\n", sector.boot.oem_id); + xprintf("NTFS_OEM_ID: 0x%x\n", NTFS_OEM_ID); if (sector.boot.oem_id == NTFS_OEM_ID) { - debug_printf("Partition %i: Valid NTFS boot sector found\n", i + 1); + xprintf("Partition %i: Valid NTFS boot sector found\n", i + 1); AddPartition(part_lba, device, T_NTFS, &devnum); } else { - debug_printf("Partition %i: Invalid NTFS boot sector, not actually NTFS\n", i + 1); + xprintf("Partition %i: Invalid NTFS boot sector, not actually NTFS\n", i + 1); } } @@ -318,7 +313,7 @@ static int FindPartitions(int device) case PARTITION_TYPE_DOS33_EXTENDED: case PARTITION_TYPE_WIN95_EXTENDED: { - debug_printf("Partition %i: Claims to be Extended\n", i + 1); + xprintf("Partition %i: Claims to be Extended\n", i + 1); // Walk the extended partition chain, finding all NTFS partitions within it sec_t ebr_lba = part_lba; @@ -330,7 +325,7 @@ static int FindPartitions(int device) { if (sector.ebr.signature == EBR_SIGNATURE) { - debug_printf( + xprintf( "Logical Partition @ %d: %s type 0x%x\n", ebr_lba + next_erb_lba, sector.ebr.partition.status @@ -348,7 +343,7 @@ static int FindPartitions(int device) if(sector.ebr.partition.type==PARTITION_TYPE_LINUX) { - debug_printf("Partition : type EXT2/3/4 found\n"); + xprintf("Partition : type EXT2/3/4 found\n"); AddPartition(part_lba, device, T_EXT2, &devnum); } // Check if this partition has a valid NTFS boot record @@ -356,13 +351,13 @@ static int FindPartitions(int device) { if (sector.boot.oem_id == NTFS_OEM_ID) { - debug_printf( + xprintf( "Logical Partition @ %d: Valid NTFS boot sector found\n", part_lba); if (sector.ebr.partition.type != PARTITION_TYPE_NTFS) { - debug_printf( + xprintf( "Logical Partition @ %d: Is NTFS but type is 0x%x; 0x%x was expected\n", part_lba, sector.ebr.partition.type, @@ -377,7 +372,7 @@ static int FindPartitions(int device) + BPB_FAT32_fileSysType, FAT_SIG, sizeof(FAT_SIG))) { - debug_printf("Partition : Valid FAT boot sector found\n"); + xprintf("Partition : Valid FAT boot sector found\n"); AddPartition(part_lba, device, T_FAT, &devnum); } } @@ -393,7 +388,7 @@ static int FindPartitions(int device) case PARTITION_TYPE_LINUX: { - debug_printf("Partition %i: Claims to be LINUX\n", i + 1); + xprintf("Partition %i: Claims to be LINUX\n", i + 1); // Read and validate the EXT2 partition AddPartition(part_lba, device, T_EXT2, &devnum); @@ -402,7 +397,7 @@ static int FindPartitions(int device) // Ignore empty partitions case PARTITION_TYPE_EMPTY: - debug_printf("Partition %i: Claims to be empty\n", i + 1); + xprintf("Partition %i: Claims to be empty\n", i + 1); // Unknown or unsupported partition type default: { @@ -412,10 +407,10 @@ static int FindPartitions(int device) { if (sector.boot.oem_id == NTFS_OEM_ID) { - debug_printf("Partition %i: Valid NTFS boot sector found\n",i + 1); + xprintf("Partition %i: Valid NTFS boot sector found\n",i + 1); if (partition->type != PARTITION_TYPE_NTFS) { - debug_printf( + xprintf( "Partition %i: Is NTFS but type is 0x%x; 0x%x was expected\n", i + 1, partition->type, PARTITION_TYPE_NTFS); @@ -427,12 +422,12 @@ static int FindPartitions(int device) sector.buffer + BPB_FAT32_fileSysType, FAT_SIG, sizeof(FAT_SIG))) { - debug_printf("Partition : Valid FAT boot sector found\n"); + xprintf("Partition : Valid FAT boot sector found\n"); AddPartition(part_lba, device, T_FAT, &devnum); } else { - debug_printf("Trying : EXT partition\n"); + xprintf("Trying : EXT partition\n"); AddPartition(part_lba, device, T_EXT2, &devnum); } } @@ -443,7 +438,7 @@ static int FindPartitions(int device) } if(devnum==0) // it is assumed this device has no master boot record or no partitions found { - debug_printf("No Master Boot Record was found or no partitions found!\n"); + xprintf("No Master Boot Record was found or no partitions found!\n"); // As a last-ditched effort, search the first 64 sectors of the device for stray NTFS/FAT partitions for (i = 0; i < 64; i++) @@ -452,7 +447,7 @@ static int FindPartitions(int device) { if (sector.boot.oem_id == NTFS_OEM_ID) { - debug_printf("Valid NTFS boot sector found at sector %d!\n", i); + xprintf("Valid NTFS boot sector found at sector %d!\n", i); AddPartition(i, device, T_NTFS, &devnum); break; } @@ -460,13 +455,13 @@ static int FindPartitions(int device) sizeof(FAT_SIG)) || !memcmp(sector.buffer + BPB_FAT32_fileSysType, FAT_SIG, sizeof(FAT_SIG))) { - debug_printf("Partition : Valid FAT boot sector found\n"); + xprintf("Partition : Valid FAT boot sector found\n"); AddPartition(i, device, T_FAT, &devnum); break; } else { - debug_printf("Trying : EXT partition\n"); + xprintf("Trying : EXT partition\n"); AddPartition(part_lba, device, T_EXT2, &devnum); } } @@ -500,12 +495,14 @@ static void UnmountPartitions(int device) ext2Unmount(part[device][i].mount); break; } +#ifdef VWII else if(part[device][i].type == T_ISO9660) { sprintf(mount, "ISO9660: %s:", part[device][i].mount); UnMountDVD(); break; } +#endif part[device][i].name[0] = 0; part[device][i].mount[0] = 0; @@ -632,11 +629,14 @@ void UnmountAllDevices() { UnmountPartitions(DEVICE_SD); UnmountPartitions(DEVICE_USB); +#ifndef VWII UnMountDVD(); fatUnmount("gca:"); fatUnmount("gcb:"); +#endif } +#ifndef VWII bool GCA_Inserted() { @@ -689,6 +689,7 @@ void check_gcb() } } } +#endif bool SDCard_Inserted() { @@ -741,6 +742,7 @@ void check_usb() } } +#ifndef VWII void check_dvd() { if(Settings.dvd_insert <= 0) @@ -761,6 +763,7 @@ void check_dvd() } } } +#endif void check_device() { diff --git a/main/source/main.cpp b/main/source/main.cpp index 0f07b0c..523378f 100644 --- a/main/source/main.cpp +++ b/main/source/main.cpp @@ -259,7 +259,9 @@ main(int argc, char *argv[]) xprintf("Warning: no AHBPROT\n"); } } +#ifndef VWII DI2_Init(); // Init DVD +#endif if(strstr(Options.language, tr("STANDARD"))) translate(); diff --git a/main/source/xprintf.cpp b/main/source/xprintf.cpp index 98d4272..fb8a26a 100644 --- a/main/source/xprintf.cpp +++ b/main/source/xprintf.cpp @@ -29,9 +29,10 @@ extern "C" void xprintf(const char *str, ...) if(Options.sdgecko) sdprintf(str); - else if(Options.wifigecko) + if(Options.wifigecko) wifi_printf(str); - else + + if(!Options.wifigecko && !Options.sdgecko) gprintf(str); } diff --git a/web/updates b/web/updates index c7c6686..e584bff 100644 --- a/web/updates +++ b/web/updates @@ -11,12 +11,22 @@ - press Z on Game Cube Controller or L Classic Controller or Wii U Pro Controller to open Settings menu - press R on Classic Controller or Wii U Pro Controller to - open External Applications menu (no unsued button left for + open External Applications menu (no unused button left for + Game Cube Controller) +- press ZL on the Classic Controller or Wii U Pro Controller to + open the device selection prompt (no unused button left for + Game Cube Controller) +- press ZR on the Classic Controller or Wii U Pro Controller to + open the system selection prompt (no unused button left for Game Cube Controller) - previously only the first controller was honoured, now all four are being connected, though only the first one of each kind (Wii Remote, Game Cube Controller or Wii U Pro Controller) can be used, each additional non-unique controller is ignored +- in partition mounter replace debug_printf with xprintf +- disable several DVD and Memory Card related functions in vWii +- don't initialize DVD drive on start in vWii builds +- allow 'SD Gecko' and 'Wifi Gecko' in parallel - update german translation //rev45: