Skip to content

Commit

Permalink
Add A Button hold to not skip IPL animation.
Browse files Browse the repository at this point in the history
Fix 64-bit compatibility with GCM structures.
Update apploader date and remove bogus trailer size.
  • Loading branch information
Extrems committed Nov 29, 2020
1 parent f78cb31 commit c53e4cf
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 12 deletions.
4 changes: 2 additions & 2 deletions include/gcm.h
Expand Up @@ -48,7 +48,7 @@ struct gcm_disk_header {
struct gcm_disk_info info;
char game_name[992];
uint32_t debug_monitor_offset;
unsigned long debug_monitor_address;
uint32_t debug_monitor_address;
char unused_2[24];
struct gcm_disk_layout layout;
} __attribute__ ((__packed__));
Expand All @@ -69,7 +69,7 @@ struct gcm_disk_header_info {
struct gcm_apploader_header {
char date[10];
char padding_1[6];
unsigned long entry_point;
uint32_t entry_point;
uint32_t size;
uint32_t trailer_size;
uint32_t unknown_1;
Expand Down
3 changes: 1 addition & 2 deletions mkgbi/mkgbi.c
Expand Up @@ -77,9 +77,8 @@ static void default_apploader_header(struct gcm_apploader_header *ah)
{
memset(ah, 0, sizeof(*ah));

memcpy(ah->date, "2006/01/06", 10);
memcpy(ah->date, "2020/11/29", 10);
ah->entry_point = 0x81200000; /* gets proper endianness later */
ah->trailer_size = cpu_to_be32(0x20000); /* bogus */
}

/*
Expand Down
Binary file modified ppc/apploader/apploader.bin
Binary file not shown.
28 changes: 21 additions & 7 deletions ppc/apploader/apploader.c
Expand Up @@ -648,31 +648,45 @@ static void skip_ipl_animation(void)
{
switch (get_ipl_revision()) {
case IPL_NTSC_10:
if (*(uint32_t *)0x8145d6f0 == 0x81465728)
if (*(uint32_t *)0x8145d6d0 == 1
&& !(*(uint16_t *)0x8145f14c & 0x0100)
&& *(uint32_t *)0x8145d6f0 == 0x81465728)
*(uint8_t *)0x81465747 = 1;
break;
case IPL_NTSC_11:
if (*(uint32_t *)0x81481538 == 0x81489e58)
if (*(uint32_t *)0x81481518 == 1
&& !(*(uint16_t *)0x8148370c & 0x0100)
&& *(uint32_t *)0x81481538 == 0x81489e58)
*(uint8_t *)0x81489e77 = 1;
break;
case IPL_PAL_10:
if (*(uint32_t *)0x814ad3d8 == 0x814b5d58)
if (*(uint32_t *)0x814ad3b8 == 1
&& !(*(uint16_t *)0x814af60c & 0x0100)
&& *(uint32_t *)0x814ad3d8 == 0x814b5d58)
*(uint8_t *)0x814b5d77 = 1;
break;
case IPL_MPAL_11:
if (*(uint32_t *)0x8147c1f8 == 0x81484b18)
if (*(uint32_t *)0x8147c1d8 == 1
&& !(*(uint16_t *)0x8147e3cc & 0x0100)
&& *(uint32_t *)0x8147c1f8 == 0x81484b18)
*(uint8_t *)0x81484b37 = 1;
break;
case IPL_NTSC_12a:
if (*(uint32_t *)0x81483610 == 0x8148b438)
if (*(uint32_t *)0x814835f0 == 1
&& !(*(uint16_t *)0x81484cec & 0x0100)
&& *(uint32_t *)0x81483610 == 0x8148b438)
*(uint8_t *)0x8148b457 = 1;
break;
case IPL_NTSC_12b:
if (*(uint32_t *)0x81483a90 == 0x8148b8d8)
if (*(uint32_t *)0x81483a70 == 1
&& !(*(uint16_t *)0x8148518c & 0x0100)
&& *(uint32_t *)0x81483a90 == 0x8148b8d8)
*(uint8_t *)0x8148b8f7 = 1;
break;
case IPL_PAL_12:
if (*(uint32_t *)0x814af6d0 == 0x814b7518)
if (*(uint32_t *)0x814af6b0 == 1
&& !(*(uint16_t *)0x814b0dcc & 0x0100)
&& *(uint32_t *)0x814af6d0 == 0x814b7518)
*(uint8_t *)0x814b7537 = 1;
break;
default:
Expand Down
2 changes: 1 addition & 1 deletion ppm2bnr/ppm2bnr.c
Expand Up @@ -16,7 +16,7 @@

#include <stdio.h>

#include <pam.h> /* netpbm */
#include <netpbm/pam.h>

#include "../include/lib.h"
#include "../include/bnr.h"
Expand Down

0 comments on commit c53e4cf

Please sign in to comment.