Skip to content

Commit

Permalink
Fixup psx header (SPE binaries) (#382)
Browse files Browse the repository at this point in the history
* Fixup psx header (SPE binaries)

* update changelog

* update all the things
  • Loading branch information
mkst authored Jul 9, 2024
1 parent 0689a9d commit 8582e13
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 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.24.6

* Handle PS-X EXE header that includes .text/.data vram address

### 0.24.5

* New `use_src_path` option for incbins segments.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The brackets corresponds to the optional dependencies to install while installin
If you use a `requirements.txt` file in your repository, then you can add this library with the following line:

```txt
splat64[mips]>=0.24.5,<1.0.0
splat64[mips]>=0.24.6,<1.0.0
```

### Optional dependencies
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "splat64"
# Should be synced with src/splat/__init__.py
version = "0.24.5"
version = "0.24.6"
description = "A binary splitting tool to assist with decompilation and modding projects"
readme = "README.md"
license = {file = "LICENSE"}
Expand Down
2 changes: 1 addition & 1 deletion src/splat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
__package_name__ = __name__

# Should be synced with pyproject.toml
__version__ = "0.24.5"
__version__ = "0.24.6"
__author__ = "ethteck"

from . import util as util
Expand Down
8 changes: 6 additions & 2 deletions src/splat/segtypes/psx/header.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ def parse_header(self, rom_bytes):
header_lines.append(
self.get_line("ascii", rom_bytes[0x00:0x08], "Magic number")
)
header_lines.append(self.get_line("word", rom_bytes[0x08:0x0C], "Zerofilled"))
header_lines.append(self.get_line("word", rom_bytes[0x0C:0x10], "Zerofilled"))
header_lines.append(
self.get_line("word", rom_bytes[0x08:0x0C][::-1], ".text vram address")
)
header_lines.append(
self.get_line("word", rom_bytes[0x0C:0x10][::-1], ".data vram address")
)
header_lines.append(
self.get_line("word", rom_bytes[0x10:0x14][::-1], "Initial PC")
)
Expand Down

0 comments on commit 8582e13

Please sign in to comment.