Fix various errors in README

This commit is contained in:
rozlette 2020-01-25 00:22:56 -06:00
parent 3302c3333b
commit 1b4bc7910d
3 changed files with 29 additions and 19 deletions

View File

@ -1,7 +1,7 @@
# TODO think about how to split this up # TODO think about how to split this up
AS := $(MIPS_BINUTILS)as AS := $(MIPS_BINUTILS_PREFIX)as
LD := $(MIPS_BINUTILS)ld LD := $(MIPS_BINUTILS_PREFIX)ld
IRIX_71_ROOT := ./tools/ido7.1_compiler/ IRIX_71_ROOT := ./tools/ido7.1_compiler/
IRIX_53_ROOT := ./tools/ido5.3_compiler/ IRIX_53_ROOT := ./tools/ido5.3_compiler/
@ -104,10 +104,10 @@ $(ROM): $(ROM_FILES)
@./tools/makerom.py ./tables/dmadata_table.py $@ @./tools/makerom.py ./tables/dmadata_table.py $@
build/%_pre_dmadata.bin: build/code_pre_dmadata.elf build/%_pre_dmadata.bin: build/code_pre_dmadata.elf
$(MIPS_BINUTILS)objcopy --dump-section $*=$@ $< $(MIPS_BINUTILS_PREFIX)objcopy --dump-section $*=$@ $<
build/%.bin: build/code.elf build/%.bin: build/code.elf
$(MIPS_BINUTILS)objcopy --dump-section $*=$@ $< $(MIPS_BINUTILS_PREFIX)objcopy --dump-section $*=$@ $<
build/code_pre_dmadata.elf: $(S_O_FILES) $(C_O_FILES) linker_scripts/code_script.txt undef.txt linker_scripts/object_script.txt build/code_pre_dmadata.elf: $(S_O_FILES) $(C_O_FILES) linker_scripts/code_script.txt undef.txt linker_scripts/object_script.txt
$(LD) -r -T linker_scripts/code_script.txt -T undef.txt -T linker_scripts/object_script.txt --no-check-sections --accept-unknown-input-arch -o $@ $(LD) -r -T linker_scripts/code_script.txt -T undef.txt -T linker_scripts/object_script.txt --no-check-sections --accept-unknown-input-arch -o $@
@ -128,7 +128,7 @@ linker_scripts/dmadata_script.txt: $(DECOMP_PRE_DMADATA_FILES) $(BASEROM_PRE_DMA
mv build/decomp_temp build/decomp mv build/decomp_temp build/decomp
test.txt: build/src/test.o test.txt: build/src/test.o
$(MIPS_BINUTILS)objdump -d -z --adjust-vma=0x80080790 $< > test.txt $(MIPS_BINUTILS_PREFIX)objdump -d -z --adjust-vma=0x80080790 $< > test.txt
clean: clean:
rm $(ROM) -r build rm $(ROM) -r build

View File

@ -13,19 +13,31 @@ If you're running Windows 10, [install WSL](https://docs.microsoft.com/en-us/win
## Step 2: ## Step 2:
Using sudo apt-get, install the following packages: Install the following packages:
``` ```
make make
git git
binutils-mips-linux-gnu binutils-mips-linux-gnu
python3 python3
pip3
``` ```
## Step 2: For your convience, you can copy the following:
Download build_tools.zip from the Releases section and extract it to the tools folder.
```
sudo apt-get update
sudo apt-get install make
sudo apt-get install git
sudo apt-get install binutils-mips-linux-gnu
sudo apt-get install python3
sudo apt-get install python3-pip
```
## Step 3: ## Step 3:
Download build_tools.zip from the Releases section and extract it to the tools folder. This contains the compilers the decompilation uses, as well as a modified version of Qemu to emulate them on a modern Linux system. The compilers must go into the tools folder. Qemu may be placed wherever you like.
## Step 4:
Open up your .bashrc file (~/.bashrc), scroll to the bottom, and add the following, replacing `/path/to/qemu-mips` with the location the qemu-mips you extracted from the build tools: Open up your .bashrc file (~/.bashrc), scroll to the bottom, and add the following, replacing `/path/to/qemu-mips` with the location the qemu-mips you extracted from the build tools:
@ -36,25 +48,25 @@ export MIPS_BINUTILS_PREFIX=mips-linux-gnu-
Save and close/reopen your terminal window. Save and close/reopen your terminal window.
## Step 4:
Make a fork of the main repository https://github.com/Rozelette/Majora-Unmasked.git and clone your fork.
## Step 5: ## Step 5:
Make a fork of the main repository https://github.com/n64decomp/majora.git and clone your fork.
Navigate to the Majora-Unmasked folder you just cloned. Type the following commands: ## Step 6:
Navigate to the folder you just cloned. Type the following commands:
``` ```
git submodule update --init --recursive git submodule update --init --recursive
pip install -r requirements.txt pip3 install -r requirements.txt
``` ```
## Step 6: ## Step 7:
You will need to acquire a copy of the ROM. The md5 of this ROM should be `2a0a8acb61538235bc1094d297fb6556`. You will need to acquire a copy of the ROM. The md5 of this ROM should be `2a0a8acb61538235bc1094d297fb6556`.
Once this has been done, type, replacing `<ROM>` with the name of your ROM: Once this has been done, type, replacing `<ROM>` with the name of your ROM:
``` ```
./tools/extract_baserom.py <ROM> ./tools/extract_rom.py <ROM>
``` ```
This will extract all the individual files in the ROM into a newly created baserom folder, as well as decompress the compressed files in a newly created decomp folder. This will extract all the individual files in the ROM into a newly created baserom folder, as well as decompress the compressed files in a newly created decomp folder.
@ -66,7 +78,7 @@ make disasm
This will create the build folders as well as a newly created asm folder containing the disassemblies of nearly all the files containing code. This will create the build folders as well as a newly created asm folder containing the disassemblies of nearly all the files containing code.
## Step 7: ## Step 8:
Type the following: Type the following:
``` ```

View File

@ -1,8 +1,6 @@
#!/bin/bash #!/bin/bash
MIPS_BINUTILS="mips-linux-gnu-" OBJDUMP="${MIPS_BINUTILS_PREFIX}objdump -D -z -mmips -EB -j .text -j .data -j .rodata"
OBJDUMP="${MIPS_BINUTILS}objdump -D -z -mmips -EB -j .text -j .data -j .rodata"
FORMATTER="sed '/^0/!s/.*://'" FORMATTER="sed '/^0/!s/.*://'"