Skip to content

Commit

Permalink
Add apploader.img for Swiss IGR
Browse files Browse the repository at this point in the history
See: emukidid/swiss-gc@3e351a7
Co-authored-by: Extrems <[email protected]>
  • Loading branch information
9ary and Extrems committed Aug 12, 2024
1 parent 61aadb8 commit 49a4c55
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Supported targets:
- Qoob Pro and Qoob SX
- ViperGC and ViperGC Extreme
- Savegame exploits
- Swiss in-game reset (IGR)

## Usage

Expand Down Expand Up @@ -129,6 +130,12 @@ It will be saved as `boot.dol` and can be used in conjunction with the various

[GCMM]: https://github.com/suloku/gcmm

### Swiss in-game reset (IGR)

1. Copy the contents of the `swiss_igr` folder to your SD card,
retaining the directory structure.
1. In Swiss, go to global game settings, and set in-game reset to "Apploader".


## Troubleshooting

Expand Down
20 changes: 20 additions & 0 deletions buildtools/dol2ipl.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import math
import struct
import sys
import zlib

# bootrom descrambler reversed by segher
def scramble(data, *, qoobsx=False):
Expand Down Expand Up @@ -212,6 +213,25 @@ def main():

out = img

elif output.endswith(".img"):
if entry != 0x81300000 or load != 0x01300000:
print("Invalid entry point and base address (must be 0x81300000)")
return -1

date = "*gekkoboot"
assert date < "2004/02/01"

header_size = 32
header = struct.pack(
"> 16s 8x I I",
str.encode(date),
len(img),
zlib.crc32(img)
)
assert len(header) == header_size

out = header + img

else:
print("Unknown output format")
return -1
Expand Down
10 changes: 10 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -178,4 +178,14 @@ gci = custom_target(
install_dir: '/',
)

apploader = custom_target(
'apploader',
input: gekkoboot_dol,
output: 'apploader.img',
command: [dol2ipl, '@OUTPUT@', '@INPUT@'],
build_by_default: true,
install: true,
install_dir: '/swiss_igr/swiss/patches',
)

install_data('README.md', install_dir: '/')

0 comments on commit 49a4c55

Please sign in to comment.