Skip to content

Commit

Permalink
nevermind i dont like amend
Browse files Browse the repository at this point in the history
ft. @emilydaemon icon again
  • Loading branch information
Naim2000 committed Oct 3, 2023
1 parent 88f3160 commit 82503bc
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.*/
build/
*.dol
*.elf
*.elf
*.zip
Binary file added apps/photo_upgrader/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 7 additions & 3 deletions apps/photo_upgrader/meta.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<app version="1">
<name>photo_upgrader</name>
<version>0.9.0</version>
<version>1.0.0</version>
<release_date></release_date>
<coder>thepikachugamer</coder>
<short_description></short_description>
<long_description>
<short_description>Photo Channel 1.1 Installer</short_description>
<long_description>Photo Channel 1.1 installer.

This application downloads the hidden Photo Channel 1.1 title and places it directly over Photo Channel 1.0, allowing it to show on the Wii menu.

Source code: https://github.com/Naim2000/photo_upgrader
</long_description>
<ahb_access/>
</app>
Binary file removed photo_upgrader.zip
Binary file not shown.
21 changes: 14 additions & 7 deletions source/main.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define VERSION "0.9.0"
#define VERSION "1.0.0"

#include <stdio.h>
#include <stdlib.h>
Expand Down Expand Up @@ -217,11 +217,13 @@ int install() {
return 0;
}

printf("=> Installing Photo Channel 1.1...\n");

if (check_title(tid) >= 2)
printf("HAYA is present, using offline mode.\n\n");
printf("Hidden channel is present, using offline mode.\n\n");

else {
printf("HAYA is not present, using online mode.\n");
printf("Hidden channel is not present, downloading time!\n");

printf("> Initializing network... ");
ret = net_init_retry(5);
Expand Down Expand Up @@ -421,10 +423,15 @@ int restore() {
unsigned int certs_size = 0, tik_size = 0, tmd_size = 0;
signed_blob *s_certs, *s_tmd, *s_tik;

printf("=> Restoring Photo Channel 1.0...\n");

int HAAA_rev = get_title_rev(tid_new), HAZA = check_title(tid_stub);
OSReport("HAAA rev is %u, HAZA existence level is %d\n", HAAA_rev, HAZA);
if(HAAA_rev <= 2 && HAZA >= 2) {
printf("Check Data management.\n");
if(HAAA_rev > 0 && HAAA_rev <= 2) {
printf(HAZA >= 2 ?
"Check Data management.\n" :
"You already did this?\n"
);
return 0;
}

Expand Down Expand Up @@ -541,7 +548,7 @@ int restore() {
return ret;
}

printf("OK!!\n");
printf("\x1b[42m All done! \x1b[40m\n");
return 0;
}

Expand Down Expand Up @@ -574,7 +581,7 @@ int main() {

"Press A to install Photo Channel 1.1." "\n"
"Press B to restore Photo Channel 1.0." "\n"
"Press HOME/START to return to loader." "\n"
"Press HOME/START to return to loader." "\n\n"
);

while(true) {
Expand Down
8 changes: 5 additions & 3 deletions source/tools.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ void init_video(int row, int col) {
VIDEO_Flush();
VIDEO_WaitVSync();
if(rmode->viTVMode&VI_NON_INTERLACE) VIDEO_WaitVSync();
//printf("\x1b[%d;%dH", row, col);
printf("\x1b[%d;%dH", row, col);
}

unsigned int check_title(const uint64_t tid) {
Expand Down Expand Up @@ -61,15 +61,17 @@ bool check_vwii(void) {

int get_title_rev(const uint64_t tid) {
unsigned int viewsize = 0;
OSReport("get_title_rev(%016llx)\n", tid);

ES_GetTMDViewSize(tid, &viewsize);
if(!viewsize) return -ENOENT;
OSReport("view size %u\n", viewsize);
if(!viewsize) return -1;

unsigned char _view[viewsize] ATTRIBUTE_ALIGN(0x20);
tmd_view* view = (void*)_view;

int ret = ES_GetTMDView(tid, _view, viewsize);
if(ret < 0) return ret;
if(ret < 0) return -1;
else return view->title_version;
}

Expand Down

0 comments on commit 82503bc

Please sign in to comment.