Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
6fb142c
Fixes issue #991. If disk has invalid signature, for example a Wii-U-…
cyberstudio10 Mar 21, 2022
6fd3b03
Update credits according to GitHub's contributor list
cyberstudio10 Mar 21, 2022
3af36e1
Since the update check directly references the GitHub repository, CI …
cyberstudio10 Mar 21, 2022
1ce080e
Correct loader path
cyberstudio10 Mar 21, 2022
c5d1967
loader.dol
Mar 21, 2022
403c410
Second place with a list of contributors, used by main.c to write a n…
cyberstudio10 Mar 21, 2022
7aba39f
loader.dol
cyberstudio10 Mar 21, 2022
2ab8549
When loader writes its own meta.xml it is now able to write the curre…
cyberstudio10 Mar 22, 2022
118c2bb
loader.dol
cyberstudio10 Mar 22, 2022
35188ae
Pass down GitHub CI workflow sequence number to be the MINOR_VERSION …
cyberstudio10 Mar 22, 2022
e5dc72a
loader.dol 7.7
cyberstudio10 Mar 22, 2022
8e84886
NintendontVersion.h has to be automatically committed, too, because t…
cyberstudio10 Mar 22, 2022
cef494a
Use devkitppc tag 20210619 because that's the oldest with both devkit…
cyberstudio10 Mar 22, 2022
a024307
loader.dol v7.9
cyberstudio10 Mar 22, 2022
451304f
We shall use the date/time of the last commit as the date/time in met…
cyberstudio10 Mar 23, 2022
5e1a9e7
loader.dol v7.10
cyberstudio10 Mar 23, 2022
cbc998a
Move version number change from loader level to top level
cyberstudio10 Mar 23, 2022
d742680
Need to define where NintendontVersion.h is
cyberstudio10 Mar 23, 2022
e394181
loader.dol v7.12
cyberstudio10 Mar 23, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/actions/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: 'Make Nintendont'
description: 'Compiles Nintendont'

runs:
using: 'docker'
image: 'devkitpro/devkitppc:latest'
entrypoint: make
24 changes: 24 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: CI

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Compile Nintendont
uses: ./.github/actions
- name: Commit loader.dol
run: |
git config user.name '${GITHUB_ACTOR}'
git config user.email '${GITHUB_ACTOR}@users.noreply.github.com'
git add nintendont/loader.dol
git commit -m "loader.dol"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the version at least be written here?

@cyberstudio10 cyberstudio10 Mar 22, 2022

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean, something like loader.dol v<major ver>.<build number>?

git push
- uses: actions/upload-artifact@v1
with:
name: Nintendont
path: build/
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
*.o
*.bin
*.elf
build/
codehandler/*.h
kernel/asm/*.h
kernel/kernel.map
loader/build/
loader/data/kernel.zip
nintendont/boot.dol
nintendont/*.dol
fatfs/*.a
codehandler/*.h
codehandler/*.h
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ loader: multidol resetstub fatfs/libfat-ppc.a kernel kernelboot loader/source/pp
@echo "Building Nintendont loader"
@echo " "
$(MAKE) -C loader
mkdir -p build/apps/Nintendont/
cp -p nintendont/icon.png nintendont/titles.txt build/apps/Nintendont/
unzip -d build/controllers -q -n controllerconfigs/controllers.zip

clean:
@echo " "
Expand Down
2 changes: 1 addition & 1 deletion common/include/NintendontVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define __NINTENDONT_VERSION_H__

#define NIN_MAJOR_VERSION 6
#define NIN_MINOR_VERSION 498
#define NIN_MINOR_VERSION 499

#define NIN_VERSION ((NIN_MAJOR_VERSION << 16) | NIN_MINOR_VERSION)

Expand Down
4 changes: 3 additions & 1 deletion loader/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ export OUTPUT := $(CURDIR)/$(TARGET)
$(BUILD):
@[ -d $@ ] || mkdir -p $@
@$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
@cp $(OUTPUT).dol ../nintendont/boot.dol
@mkdir -p ../build/apps/Nintendont/
@cp -p $(OUTPUT).dol ../build/apps/Nintendont/boot.dol
$(CC) -E -traditional -P -include ../common/include/NintendontVersion.h -DTIMESTAMP=`date +%Y%m%d%H%M%S` ../metaxml.sx | sed -n '/^<?xml/,$$p' > ../build/apps/Nintendont/meta.xml

#---------------------------------------------------------------------------------
clean:
Expand Down
Binary file removed loader/loader.dol
Binary file not shown.
40 changes: 22 additions & 18 deletions loader/source/usbstorage.c
Original file line number Diff line number Diff line change
Expand Up @@ -946,27 +946,31 @@ static bool __usbstorage_IsInserted(void)
// If not, it might be a Wii U drive.
retval = USBStorageOGC_Read(&__usbfd, __lun, 0, 1, sector_buf);
if (retval == 0) {
if (sector_buf[510] == 0x55 &&
(sector_buf[511] == 0xAA || sector_buf[511] == 0xAB))
{
// Valid MBR and/or UStealth signature.
__mounted = true;
__vid = vid;
__pid = pid;
usb_last_used = gettime()-secs_to_ticks(100);
usleep(10000);
} else {
// Invalid signature.
// discard first read. I've seen a controller so buggy which returns the boot sector of LUN 1 when that of LUN 0 is asked for.
usb_last_used = gettime()-secs_to_ticks(100);
usleep(10000);
retval = USBStorageOGC_Read(&__usbfd, __lun, 0, 1, sector_buf);
if (retval == 0) {
if (sector_buf[510] == 0x55 &&
(sector_buf[511] == 0xAA || sector_buf[511] == 0xAB))
{
// Valid MBR and/or UStealth signature.
__mounted = true;
__vid = vid;
__pid = pid;
usb_last_used = gettime()-secs_to_ticks(100);
usleep(10000);
break; // found valid signature. Done!
}
// Else invalid signature.
// This may be a Wii U-formatted HDD.
__mounted = false;
__lun = 0;
}
} else {
// Read error.
__mounted = false;
__lun = 0;
// Else read error.
}
break;
// Else read error.
__mounted = false;
__lun = 0;
// continue scanning for next LUN instead of giving up
}

if (__mounted)
Expand Down
15 changes: 15 additions & 0 deletions metaxml.sx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<app version="1">
<name>Nintendont</name>
<coder>FIX94, crediar</coder>
<version>NIN_MAJOR_VERSION.NIN_MINOR_VERSION</version>
<release_date>TIMESTAMP</release_date>
<short_description>Gamecube Loader</short_description>
<long_description>Nintendont allows you to run GameCube games on a Wii or Wii U from an SD or HDD device.

Project website: https://github.com/FIX94/Nintendont

Committers: GerbilSoft, JoostinOnline, GreyRogue, Howard, Cyan, nastys, carnage702, AnthonyRyuki, DankRank, Chickoodel, akemin-dayo, SuperrSonic, KoldMonster12, cheatfreak47, capnfunky77, cesarmades, crazycaveman, Wolfy76700, AndyCasaceli, ShadowOne333, Aurelio92, darkalemanbr, jmapjp, sailormoon, Dr-Crow, cyberstudio10, corey-underdown</long_description>
<no_ios_reload/>
<ahb_access/>
</app>
15 changes: 0 additions & 15 deletions nintendont/meta.xml

This file was deleted.