This repository was archived by the owner on Aug 15, 2026. It is now read-only.
Repository navigation
Expand file tree
/
Copy pathsetup.bat
More file actions
78 lines (68 loc) · 2.33 KB
/
Copy pathsetup.bat
File metadata and controls
78 lines (68 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
@echo off
:: PokemonStadiumRecomp setup - Windows
::
:: What this does:
:: 1. Clones N64Recomp into n64recomp\ at the SHA pinned in
:: n64recomp.pin (or junctions to a sister checkout if present).
:: 2. Initializes the disasm submodule (pret/pokestadium).
:: 3. Stages the verified baserom.z64 into disasm\baseroms\us\.
:: 4. (Optional) Clones Ares emulator if WITH_ARES=1.
setlocal enabledelayedexpansion
set "N64RECOMP_REPO=https://github.com/N64Recomp/N64Recomp.git"
set "ARES_REPO=https://github.com/ares-emulator/ares.git"
set "SISTER_N64RECOMP=..\N64Recomp"
:: ---- Parse SHA from n64recomp.pin ----
set "SHA="
for /f "usebackq tokens=1,* delims==" %%a in ("n64recomp.pin") do (
set "key=%%a"
set "key=!key: =!"
if "!key!"=="sha" (
set "SHA=%%b"
set "SHA=!SHA: =!"
)
)
if not defined SHA (
echo Error: no sha found in n64recomp.pin
exit /b 1
)
:: ---- Provision n64recomp\ ----
if not exist "n64recomp" (
if exist "%SISTER_N64RECOMP%\.git" (
echo Junctioning n64recomp -^> %SISTER_N64RECOMP%
mklink /J n64recomp %SISTER_N64RECOMP%
) else (
echo Cloning N64Recomp...
git clone --recurse-submodules %N64RECOMP_REPO% n64recomp
)
)
:: ---- Pin enforcement ----
for /f %%h in ('git -C n64recomp rev-parse HEAD') do set "ACTUAL=%%h"
if not "!ACTUAL!"=="%SHA%" (
echo Note: n64recomp HEAD ^(!ACTUAL!^) != pinned ^(%SHA%^).
echo To align: git -C n64recomp checkout %SHA%
echo To roll forward: edit n64recomp.pin to sha = !ACTUAL!
)
:: ---- Disasm submodule ----
git submodule update --init --recursive disasm
:: ---- Stage ROM into disasm ----
if exist "baserom.z64" (
if not exist "disasm\baseroms\us\baserom.z64" (
if not exist "disasm\baseroms\us" mkdir "disasm\baseroms\us"
copy /Y "baserom.z64" "disasm\baseroms\us\baserom.z64" >nul
echo Staged baserom.z64 -^> disasm\baseroms\us\
)
)
:: ---- Ares oracle (optional, opt-in) ----
if "%WITH_ARES%"=="1" (
if not exist "ares-emulator\.git" (
echo Cloning Ares ^(this is a large repo^)...
git clone %ARES_REPO% ares-emulator
)
)
echo.
echo Setup complete.
echo Next:
echo 1. cd disasm ^&^& make init ^&^& make
echo 2. (back at root) cmake -S . -B build -G "Visual Studio 17 2022" -A x64
echo 3. See ghidra\instructions.txt for analysis setup.
endlocal