Skip to content

Commit

Permalink
Fix r5900 disassembly issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ethteck committed Nov 12, 2023
1 parent d6490bb commit 263661d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# splat Release Notes

### 0.19.1

* Fixed disassembly of certain ps2 instructions to properly re-assemble in a compatible and matching way.

### 0.19.0: vram_classes

* New top-level yaml feature: `vram_classes`. This allows you to make common definitions for vram locations that can be applied to multiple segments. Please see the [documentation](docs/VramClasses.md) for more details!
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ intervaltree
colorama
# This value should be keep in sync with the version listed on disassembler/spimdisasm_disassembler.py
spimdisasm>=1.18.0
rabbitizer>=1.7.0
rabbitizer>=1.8.0
pygfxd
n64img>=0.1.4
10 changes: 10 additions & 0 deletions segtypes/common/codesubsegment.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,16 @@ def process_insns(

# Main loop
for i, insn in enumerate(func_spim.instructions):
if options.opts.platform == "ps2":
from segtypes.common.c import CommonSegC
from rabbitizer import TrinaryValue

if isinstance(self, CommonSegC):
insn.flag_r5900UseDollar = TrinaryValue.FALSE
else:
insn.flag_r5900UseDollar = TrinaryValue.TRUE
insn.flag_r5900DisasmAsData = TrinaryValue.TRUE

instr_offset = i * 4

# update pointer accesses from this function
Expand Down
2 changes: 1 addition & 1 deletion split.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from segtypes.segment import Segment
from util import log, options, palettes, symbols, relocs

VERSION = "0.19.0"
VERSION = "0.19.1"

parser = argparse.ArgumentParser(
description="Split a rom given a rom, a config, and output directory"
Expand Down

0 comments on commit 263661d

Please sign in to comment.