splat64 0.36.3__tar.gz → 0.36.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (157) hide show
  1. {splat64-0.36.3 → splat64-0.36.4}/.github/workflows/unit_tests.yml +30 -8
  2. {splat64-0.36.3 → splat64-0.36.4}/.gitignore +1 -0
  3. {splat64-0.36.3 → splat64-0.36.4}/CHANGELOG.md +8 -0
  4. {splat64-0.36.3 → splat64-0.36.4}/PKG-INFO +9 -9
  5. {splat64-0.36.3 → splat64-0.36.4}/README.md +1 -1
  6. {splat64-0.36.3 → splat64-0.36.4}/create_config.py +1 -3
  7. {splat64-0.36.3 → splat64-0.36.4}/docs/Home.md +1 -1
  8. splat64-0.36.4/docs/Quickstart-Elf.md +199 -0
  9. {splat64-0.36.3 → splat64-0.36.4}/docs/Quickstart.md +3 -2
  10. {splat64-0.36.3 → splat64-0.36.4}/pyproject.toml +7 -7
  11. {splat64-0.36.3 → splat64-0.36.4}/requirements.txt +6 -6
  12. {splat64-0.36.3 → splat64-0.36.4}/src/splat/__init__.py +1 -1
  13. {splat64-0.36.3 → splat64-0.36.4}/src/splat/scripts/create_config.py +206 -4
  14. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/common/bss.py +1 -1
  15. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/common/c.py +17 -0
  16. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/common/codesubsegment.py +3 -3
  17. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/common/data.py +2 -2
  18. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/common/rodata.py +2 -2
  19. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/n64/ci.py +2 -0
  20. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/n64/img.py +4 -0
  21. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/n64/palette.py +21 -2
  22. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/segment.py +1 -2
  23. {splat64-0.36.3 → splat64-0.36.4}/src/splat/util/__init__.py +1 -0
  24. splat64-0.36.4/src/splat/util/ps2/__init__.py +1 -0
  25. splat64-0.36.4/src/splat/util/ps2/ps2elfinfo.py +249 -0
  26. {splat64-0.36.3 → splat64-0.36.4}/src/splat/util/symbols.py +7 -2
  27. {splat64-0.36.3 → splat64-0.36.4}/test.py +28 -15
  28. {splat64-0.36.3 → splat64-0.36.4}/.gitattributes +0 -0
  29. {splat64-0.36.3 → splat64-0.36.4}/.github/workflows/format.yml +0 -0
  30. {splat64-0.36.3 → splat64-0.36.4}/.github/workflows/lint.yml +0 -0
  31. {splat64-0.36.3 → splat64-0.36.4}/.github/workflows/publish_docs_to_wiki.yml +0 -0
  32. {splat64-0.36.3 → splat64-0.36.4}/.github/workflows/pypi.yml +0 -0
  33. {splat64-0.36.3 → splat64-0.36.4}/.github/workflows/test_lib.yml +0 -0
  34. {splat64-0.36.3 → splat64-0.36.4}/LICENSE +0 -0
  35. {splat64-0.36.3 → splat64-0.36.4}/docs/Adding-Symbols.md +0 -0
  36. {splat64-0.36.3 → splat64-0.36.4}/docs/Advanced-Reloc.md +0 -0
  37. {splat64-0.36.3 → splat64-0.36.4}/docs/Advanced.md +0 -0
  38. {splat64-0.36.3 → splat64-0.36.4}/docs/Configuration.md +0 -0
  39. {splat64-0.36.3 → splat64-0.36.4}/docs/Examples.md +0 -0
  40. {splat64-0.36.3 → splat64-0.36.4}/docs/General-Workflow.md +0 -0
  41. {splat64-0.36.3 → splat64-0.36.4}/docs/Segments.md +0 -0
  42. {splat64-0.36.3 → splat64-0.36.4}/docs/VramClasses.md +0 -0
  43. {splat64-0.36.3 → splat64-0.36.4}/mypy.ini +0 -0
  44. {splat64-0.36.3 → splat64-0.36.4}/split.py +0 -0
  45. {splat64-0.36.3 → splat64-0.36.4}/src/splat/__main__.py +0 -0
  46. {splat64-0.36.3 → splat64-0.36.4}/src/splat/disassembler/__init__.py +0 -0
  47. {splat64-0.36.3 → splat64-0.36.4}/src/splat/disassembler/disassembler.py +0 -0
  48. {splat64-0.36.3 → splat64-0.36.4}/src/splat/disassembler/disassembler_instance.py +0 -0
  49. {splat64-0.36.3 → splat64-0.36.4}/src/splat/disassembler/disassembler_section.py +0 -0
  50. {splat64-0.36.3 → splat64-0.36.4}/src/splat/disassembler/null_disassembler.py +0 -0
  51. {splat64-0.36.3 → splat64-0.36.4}/src/splat/disassembler/spimdisasm_disassembler.py +0 -0
  52. {splat64-0.36.3 → splat64-0.36.4}/src/splat/platforms/__init__.py +0 -0
  53. {splat64-0.36.3 → splat64-0.36.4}/src/splat/platforms/n64.py +0 -0
  54. {splat64-0.36.3 → splat64-0.36.4}/src/splat/platforms/ps2.py +0 -0
  55. {splat64-0.36.3 → splat64-0.36.4}/src/splat/platforms/psp.py +0 -0
  56. {splat64-0.36.3 → splat64-0.36.4}/src/splat/platforms/psx.py +0 -0
  57. {splat64-0.36.3 → splat64-0.36.4}/src/splat/py.typed +0 -0
  58. {splat64-0.36.3 → splat64-0.36.4}/src/splat/scripts/__init__.py +0 -0
  59. {splat64-0.36.3 → splat64-0.36.4}/src/splat/scripts/capy.py +0 -0
  60. {splat64-0.36.3 → splat64-0.36.4}/src/splat/scripts/split.py +0 -0
  61. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/__init__.py +0 -0
  62. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/common/__init__.py +0 -0
  63. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/common/asm.py +0 -0
  64. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/common/asmtu.py +0 -0
  65. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/common/bin.py +0 -0
  66. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/common/code.py +0 -0
  67. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/common/cpp.py +0 -0
  68. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/common/databin.py +0 -0
  69. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/common/eh_frame.py +0 -0
  70. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/common/gcc_except_table.py +0 -0
  71. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/common/group.py +0 -0
  72. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/common/hasm.py +0 -0
  73. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/common/header.py +0 -0
  74. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/common/lib.py +0 -0
  75. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/common/linker_offset.py +0 -0
  76. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/common/pad.py +0 -0
  77. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/common/rdata.py +0 -0
  78. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/common/rodatabin.py +0 -0
  79. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/common/sbss.py +0 -0
  80. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/common/sdata.py +0 -0
  81. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/common/segment.py +0 -0
  82. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/common/textbin.py +0 -0
  83. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/linker_entry.py +0 -0
  84. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/n64/__init__.py +0 -0
  85. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/n64/ci4.py +0 -0
  86. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/n64/ci8.py +0 -0
  87. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/n64/decompressor.py +0 -0
  88. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/n64/gfx.py +0 -0
  89. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/n64/header.py +0 -0
  90. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/n64/i1.py +0 -0
  91. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/n64/i4.py +0 -0
  92. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/n64/i8.py +0 -0
  93. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/n64/ia16.py +0 -0
  94. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/n64/ia4.py +0 -0
  95. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/n64/ia8.py +0 -0
  96. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/n64/ipl3.py +0 -0
  97. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/n64/mio0.py +0 -0
  98. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/n64/rgba16.py +0 -0
  99. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/n64/rgba32.py +0 -0
  100. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/n64/rsp.py +0 -0
  101. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/n64/vtx.py +0 -0
  102. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/n64/yay0.py +0 -0
  103. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/ps2/__init__.py +0 -0
  104. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/ps2/ctor.py +0 -0
  105. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/ps2/lit4.py +0 -0
  106. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/ps2/lit8.py +0 -0
  107. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/ps2/vtables.py +0 -0
  108. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/psp/__init__.py +0 -0
  109. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/psx/__init__.py +0 -0
  110. {splat64-0.36.3 → splat64-0.36.4}/src/splat/segtypes/psx/header.py +0 -0
  111. {splat64-0.36.3 → splat64-0.36.4}/src/splat/util/cache_handler.py +0 -0
  112. {splat64-0.36.3 → splat64-0.36.4}/src/splat/util/color.py +0 -0
  113. {splat64-0.36.3 → splat64-0.36.4}/src/splat/util/compiler.py +0 -0
  114. {splat64-0.36.3 → splat64-0.36.4}/src/splat/util/conf.py +0 -0
  115. {splat64-0.36.3 → splat64-0.36.4}/src/splat/util/file_presets.py +0 -0
  116. {splat64-0.36.3 → splat64-0.36.4}/src/splat/util/log.py +0 -0
  117. {splat64-0.36.3 → splat64-0.36.4}/src/splat/util/n64/__init__.py +0 -0
  118. {splat64-0.36.3 → splat64-0.36.4}/src/splat/util/n64/find_code_length.py +0 -0
  119. {splat64-0.36.3 → splat64-0.36.4}/src/splat/util/n64/rominfo.py +0 -0
  120. {splat64-0.36.3 → splat64-0.36.4}/src/splat/util/options.py +0 -0
  121. {splat64-0.36.3 → splat64-0.36.4}/src/splat/util/palettes.py +0 -0
  122. {splat64-0.36.3 → splat64-0.36.4}/src/splat/util/progress_bar.py +0 -0
  123. {splat64-0.36.3 → splat64-0.36.4}/src/splat/util/psx/__init__.py +0 -0
  124. {splat64-0.36.3 → splat64-0.36.4}/src/splat/util/psx/psxexeinfo.py +0 -0
  125. {splat64-0.36.3 → splat64-0.36.4}/src/splat/util/relocs.py +0 -0
  126. {splat64-0.36.3 → splat64-0.36.4}/src/splat/util/statistics.py +0 -0
  127. {splat64-0.36.3 → splat64-0.36.4}/src/splat/util/utils.py +0 -0
  128. {splat64-0.36.3 → splat64-0.36.4}/src/splat/util/vram_classes.py +0 -0
  129. {splat64-0.36.3 → splat64-0.36.4}/test/Dockerfile +0 -0
  130. {splat64-0.36.3 → splat64-0.36.4}/test/README.md +0 -0
  131. {splat64-0.36.3 → splat64-0.36.4}/test/basic_app/.gitignore +0 -0
  132. {splat64-0.36.3 → splat64-0.36.4}/test/basic_app/Makefile +0 -0
  133. {splat64-0.36.3 → splat64-0.36.4}/test/basic_app/build/basic_app.bin +0 -0
  134. {splat64-0.36.3 → splat64-0.36.4}/test/basic_app/dummy_ipl3.s +0 -0
  135. {splat64-0.36.3 → splat64-0.36.4}/test/basic_app/expected/.splache +0 -0
  136. {splat64-0.36.3 → splat64-0.36.4}/test/basic_app/expected/asm/data/main.bss.s +0 -0
  137. {splat64-0.36.3 → splat64-0.36.4}/test/basic_app/expected/asm/data/main.data.s +0 -0
  138. {splat64-0.36.3 → splat64-0.36.4}/test/basic_app/expected/asm/data/main.rodata.s +0 -0
  139. {splat64-0.36.3 → splat64-0.36.4}/test/basic_app/expected/asm/handwritten.s +0 -0
  140. {splat64-0.36.3 → splat64-0.36.4}/test/basic_app/expected/asm/header.s +0 -0
  141. {splat64-0.36.3 → splat64-0.36.4}/test/basic_app/expected/asm/main.s +0 -0
  142. {splat64-0.36.3 → splat64-0.36.4}/test/basic_app/expected/asm/nonmatchings/main/D_80000510.s +0 -0
  143. {splat64-0.36.3 → splat64-0.36.4}/test/basic_app/expected/asm/nonmatchings/main/func_80000400.s +0 -0
  144. {splat64-0.36.3 → splat64-0.36.4}/test/basic_app/expected/asm/nonmatchings/main/func_800004A0.s +0 -0
  145. {splat64-0.36.3 → splat64-0.36.4}/test/basic_app/expected/assets/dummy_ipl3.bin +0 -0
  146. {splat64-0.36.3 → splat64-0.36.4}/test/basic_app/expected/basic_app.d +0 -0
  147. {splat64-0.36.3 → splat64-0.36.4}/test/basic_app/expected/build/test/basic_app/split/src/main.asmproc.d +0 -0
  148. {splat64-0.36.3 → splat64-0.36.4}/test/basic_app/expected/include/include_asm.h +0 -0
  149. {splat64-0.36.3 → splat64-0.36.4}/test/basic_app/expected/include/labels.inc +0 -0
  150. {splat64-0.36.3 → splat64-0.36.4}/test/basic_app/expected/include/macro.inc +0 -0
  151. {splat64-0.36.3 → splat64-0.36.4}/test/basic_app/expected/src/main.c +0 -0
  152. {splat64-0.36.3 → splat64-0.36.4}/test/basic_app/expected/undefined_funcs_auto.txt +0 -0
  153. {splat64-0.36.3 → splat64-0.36.4}/test/basic_app/expected/undefined_syms_auto.txt +0 -0
  154. {splat64-0.36.3 → splat64-0.36.4}/test/basic_app/handwritten.s +0 -0
  155. {splat64-0.36.3 → splat64-0.36.4}/test/basic_app/header.s +0 -0
  156. {splat64-0.36.3 → splat64-0.36.4}/test/basic_app/main.c +0 -0
  157. {splat64-0.36.3 → splat64-0.36.4}/test/test_gen_expected.sh +0 -0
@@ -6,7 +6,7 @@ on:
6
6
 
7
7
  jobs:
8
8
  unit_tests:
9
- name: unit_tests on ${{ matrix.os.name }}
9
+ name: unit_tests on '${{ matrix.os.name }}', Python ${{ matrix.py_version }}
10
10
  runs-on: ${{ matrix.os.runner }}
11
11
  strategy:
12
12
  fail-fast: false
@@ -15,19 +15,27 @@ jobs:
15
15
  {
16
16
  name: linux,
17
17
  runner: ubuntu-latest,
18
- python_venv: .venv/bin/python3,
18
+ python_venv_activate: source .venv/bin/activate,
19
19
  },
20
20
  {
21
21
  name: macos,
22
22
  runner: macos-latest,
23
- python_venv: .venv/bin/python3,
23
+ python_venv_activate: source .venv/bin/activate,
24
24
  },
25
25
  {
26
26
  name: windows,
27
27
  runner: windows-latest,
28
- python_venv: .venv/Scripts/python3,
28
+ python_venv_activate: .venv/Scripts/Activate.ps1,
29
29
  },
30
30
  ]
31
+ py_version:
32
+ - '3.9'
33
+ - '3.10'
34
+ - '3.11'
35
+ - '3.12'
36
+ - '3.13'
37
+ - '3.14'
38
+ - '3.x' # Explicit latest
31
39
 
32
40
  steps:
33
41
  - name: Checkout
@@ -35,16 +43,29 @@ jobs:
35
43
 
36
44
  - name: Install dependencies
37
45
  if: matrix.os.name == 'linux'
38
- run: sudo apt-get install -y build-essential make binutils-mips-linux-gnu python3 python3-pip python3-venv wget
46
+ run: sudo apt-get install -y build-essential make binutils-mips-linux-gnu wget
47
+
48
+ - name: Print Python version
49
+ run: |
50
+ python3 --version
51
+
52
+ - name: Set up Python ${{ matrix.py_version }}
53
+ uses: actions/setup-python@v6
54
+ with:
55
+ python-version: ${{ matrix.py_version }}
39
56
 
40
57
  - name: Setup Python venv
41
58
  run: |
59
+ python3 --version
42
60
  python3 -m venv .venv
61
+ ${{ matrix.os.python_venv_activate }}
62
+ python3 --version
43
63
 
44
64
  - name: Install Python dependencies
45
65
  run: |
46
- ${{ matrix.os.python_venv }} -m pip install -U -r requirements.txt
47
- ${{ matrix.os.python_venv }} -m pip install -e .
66
+ ${{ matrix.os.python_venv_activate }}
67
+ python3 -m pip install -U -r requirements.txt
68
+ python3 -m pip install -e .
48
69
 
49
70
  - name: Build `basic_app` on ${{ matrix.os.name }}
50
71
  if: matrix.os.name == 'linux'
@@ -57,4 +78,5 @@ jobs:
57
78
 
58
79
  - name: Run the test
59
80
  run: |
60
- ${{ matrix.os.python_venv }} test.py
81
+ ${{ matrix.os.python_venv_activate }}
82
+ python3 test.py
@@ -8,3 +8,4 @@ __pycache__/
8
8
  *.n64
9
9
  *.yaml
10
10
  *.z64
11
+ uv.lock
@@ -1,5 +1,13 @@
1
1
  # splat Release Notes
2
2
 
3
+ ### 0.36.4
4
+
5
+ * Fix missing dollar signs (`$`) on specific ps2 registers on the extra assembly files generated by `make_full_disasm_for_code`.
6
+ * Pin versions of dependencies to avoid breaking because they broke.
7
+ * Add more checks for texture and palette segments to have a correct size in their yaml entries, ensuring their `width`/`height` or `size` attributes match the sizes relative to other segments.
8
+ * Fix `gfx` segments sometimes not picking up properly the corresponding typed reference.
9
+ * * Fix sometimes picking a name symbol from a different segment instead of the owned segment when both symbols have the same address but are from completely different segments.
10
+
3
11
  ### 0.36.3
4
12
 
5
13
  * Fix not generating nonmatching `.s` files for quoted symbols.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: splat64
3
- Version: 0.36.3
3
+ Version: 0.36.4
4
4
  Summary: A binary splitting tool to assist with decompilation and modding projects
5
5
  Project-URL: Repository, https://github.com/ethteck/splat
6
6
  Project-URL: Issues, https://github.com/ethteck/splat/issues
@@ -30,16 +30,16 @@ License-File: LICENSE
30
30
  Classifier: License :: OSI Approved :: MIT License
31
31
  Classifier: Programming Language :: Python :: 3
32
32
  Requires-Python: >=3.9
33
- Requires-Dist: colorama
34
- Requires-Dist: intervaltree
35
- Requires-Dist: pylibyaml
36
- Requires-Dist: pyyaml
37
- Requires-Dist: tqdm
33
+ Requires-Dist: colorama==0.4.6
34
+ Requires-Dist: intervaltree==3.1.0
35
+ Requires-Dist: pylibyaml==0.1.0
36
+ Requires-Dist: pyyaml==6.0.3
37
+ Requires-Dist: tqdm==4.67.1
38
38
  Provides-Extra: dev
39
39
  Requires-Dist: crunch64<1.0.0,>=0.5.1; extra == 'dev'
40
40
  Requires-Dist: mypy; extra == 'dev'
41
41
  Requires-Dist: n64img>=0.3.3; extra == 'dev'
42
- Requires-Dist: pygfxd; extra == 'dev'
42
+ Requires-Dist: pygfxd>=1.0.5; extra == 'dev'
43
43
  Requires-Dist: rabbitizer<2.0.0,>=1.12.0; extra == 'dev'
44
44
  Requires-Dist: ruff; extra == 'dev'
45
45
  Requires-Dist: spimdisasm<2.0.0,>=1.38.0; extra == 'dev'
@@ -48,7 +48,7 @@ Requires-Dist: types-pyyaml; extra == 'dev'
48
48
  Provides-Extra: mips
49
49
  Requires-Dist: crunch64<1.0.0,>=0.5.1; extra == 'mips'
50
50
  Requires-Dist: n64img>=0.3.3; extra == 'mips'
51
- Requires-Dist: pygfxd; extra == 'mips'
51
+ Requires-Dist: pygfxd>=1.0.5; extra == 'mips'
52
52
  Requires-Dist: rabbitizer<2.0.0,>=1.12.0; extra == 'mips'
53
53
  Requires-Dist: spimdisasm<2.0.0,>=1.38.0; extra == 'mips'
54
54
  Description-Content-Type: text/markdown
@@ -76,7 +76,7 @@ The brackets corresponds to the optional dependencies to install while installin
76
76
  If you use a `requirements.txt` file in your repository, then you can add this library with the following line:
77
77
 
78
78
  ```txt
79
- splat64[mips]>=0.36.3,<1.0.0
79
+ splat64[mips]>=0.36.4,<1.0.0
80
80
  ```
81
81
 
82
82
  ### Optional dependencies
@@ -21,7 +21,7 @@ The brackets corresponds to the optional dependencies to install while installin
21
21
  If you use a `requirements.txt` file in your repository, then you can add this library with the following line:
22
22
 
23
23
  ```txt
24
- splat64[mips]>=0.36.3,<1.0.0
24
+ splat64[mips]>=0.36.4,<1.0.0
25
25
  ```
26
26
 
27
27
  ### Optional dependencies
@@ -1,9 +1,7 @@
1
1
  #! /usr/bin/env python3
2
2
 
3
- from pathlib import Path
4
-
5
3
  import src.splat as splat
6
4
 
7
5
  if __name__ == "__main__":
8
6
  args = splat.scripts.create_config.parser.parse_args()
9
- splat.scripts.create_config.main(Path(args.file))
7
+ splat.scripts.create_config.process_arguments(args)
@@ -22,4 +22,4 @@ After scanning and splitting, **splat** will output a linker script that can be
22
22
 
23
23
  ### Sounds great, how do I get started?
24
24
 
25
- Have a look at the [Quickstart](https://github.com/ethteck/splat/wiki/Quickstart), or check out the [Examples](https://github.com/ethteck/splat/wiki/Examples) page to see projects that are using **splat**.
25
+ Have a look at the [Quickstart](https://github.com/ethteck/splat/wiki/Quickstart), [Quickstart for PS2 ELFs](https://github.com/ethteck/splat/wiki/Quickstart-Elf), or check out the [Examples](https://github.com/ethteck/splat/wiki/Examples) page to see projects that are using **splat**.
@@ -0,0 +1,199 @@
1
+ # Quickstart Elf
2
+
3
+ > [!NOTE]
4
+ > This quickstart is written with PS2 ELFs in mind, relocatable ELFs are not supported. It is also assumed that you are using Ubuntu 22.04 either natively, via WSL2 or via Docker.
5
+
6
+ For the purposes of this quickstart, we will assume that we are going to split a game called `mygame` and we have the ELF from the iso named `SLUS_XXX.YY`.
7
+
8
+ Create a directory for `~/mygame` and `cd` into it:
9
+
10
+ ```sh
11
+ mkdir -p ${HOME}/mygame && cd ${HOME}/mygame
12
+ ```
13
+
14
+ Copy the `SLUS_XXX.YY` file into the `mygame` directory inside your home directory.
15
+
16
+ ## System packages
17
+
18
+ ### Python 3.9
19
+
20
+ Ensure you are have **Python 3.9** or higher installed:
21
+
22
+ ```sh
23
+ $ python3 --version
24
+ Python 3.9.10
25
+ ```
26
+
27
+ If you get `bash: python3: command not found` install it with the following command:
28
+
29
+ ```sh
30
+ sudo apt update && sudo apt install -y python3 python3-pip
31
+ ```
32
+
33
+ ### MIPS binutils
34
+
35
+ Ensure you have a MIPS binutils installed in your PC. Specifically we'll need a MIPS `objcopy`.
36
+
37
+ ```sh
38
+ $ mips-linux-gnu-objcopy --version
39
+ GNU objcopy (GNU Binutils for Ubuntu) 2.38
40
+ ```
41
+
42
+ If you get an error then install it with the following command:
43
+
44
+ ```sh
45
+ sudo apt install binutils-mips-linux-gnu
46
+ ```
47
+
48
+ ## Install splat
49
+
50
+ We'll install `splat` using `pip` and enable its `mips` dependencies:
51
+
52
+ ```sh
53
+ python3 -m pip install -U splat64[mips]
54
+ ```
55
+
56
+ ## Create a config file from your ELF
57
+
58
+ `splat` has a script that will generate a `yaml` file based in the ELF file.
59
+
60
+ ```sh
61
+ python3 -m splat create_config SLUS_XXX.YY
62
+ ```
63
+
64
+ This command generates a few files, from which the most important ones are the `SLUS_XXX.YY.rom` and the `SLUS_XXX.YY.yaml`.
65
+
66
+ ### The generated ROM
67
+
68
+ The original ELF file contains the game code and a lot of extra metadata which we don't care about.
69
+
70
+ To get rid of the extra metadata the `create_config` script generated a ROM that only contains the game code and data, and the generated `yaml` is used to split this ROM instead of splitting the original ELF, making the splitting and build process a lot more cleaner.
71
+
72
+ To generate this ROM the `create_config` script uses `objcopy`. You can (and should) integrate this ROM generation step into your setup script / configure script. `create_config` tells you exactly what command it used to generate the ROM, which should look similar to the following:
73
+
74
+ ```sh
75
+ mips-linux-gnu-objcopy -O binary --gap-fill=0x00 SLUS_XXX.YY SLUS_XXX.YY.rom
76
+ ```
77
+
78
+ This approach has a few pros and cons. The biggest pro is being able to generate an ELF with proper metadata as part of your build system, making a lot easier to achieve shiftability eventually. Note only this is not enough for shiftability, other factors must be worked out, like symbol alignment, fake symbols, etc.
79
+
80
+ ### The generated `yaml`
81
+
82
+ `create_config` generates a `yaml` file which describes how the ROM is structured, what parts are code, data, etc. It also includes configuration values for splat.
83
+
84
+ Below is an example of what a generated yaml may look like:
85
+
86
+ ```yaml
87
+ # name: Your game name here!
88
+ sha1: 6da2d0a02aafe3bfba71ca8ba859174756ba3f5e
89
+ options:
90
+ basename: SLUS_206.24
91
+ target_path: SLUS_206.24.rom
92
+ elf_path: build/SLUS_206.24.elf
93
+ base_path: .
94
+ platform: ps2
95
+ compiler: EEGCC
96
+
97
+ gp_value: 0x003A0EF0
98
+ ld_gp_expression: cod_SBSS_START + 0x7FF0
99
+
100
+ # asm_path: asm
101
+ # src_path: src
102
+ # build_path: build
103
+
104
+ ld_script_path: SLUS_206.24.ld
105
+ ld_dependencies: True
106
+ ld_wildcard_sections: True
107
+ ld_bss_contains_common: True
108
+
109
+ create_asm_dependencies: True
110
+
111
+ find_file_boundaries: False
112
+
113
+ o_as_suffix: True
114
+
115
+ symbol_addrs_path:
116
+ - symbol_addrs.txt
117
+ reloc_addrs_path:
118
+ - reloc_addrs.txt
119
+
120
+ # undefined_funcs_auto_path: undefined_funcs_auto.txt
121
+ # undefined_syms_auto_path: undefined_syms_auto.txt
122
+
123
+ extensions_path: tools/splat_ext
124
+
125
+ string_encoding: ASCII
126
+ data_string_encoding: ASCII
127
+ rodata_string_guesser_level: 2
128
+ data_string_guesser_level: 2
129
+
130
+ named_regs_for_c_funcs: False
131
+
132
+ section_order:
133
+ - .text
134
+ # - .vutext
135
+ - .data
136
+ - .rodata
137
+ - .gcc_except_table
138
+ - .sbss
139
+ - .bss
140
+
141
+ auto_link_sections:
142
+ - .data
143
+ - .rodata
144
+ - .gcc_except_table
145
+ - .sbss
146
+ - .bss
147
+
148
+ segments:
149
+ - name: cod
150
+ type: code
151
+ start: 0x000000
152
+ vram: 0x00100000
153
+ bss_size: 0x6907C
154
+ subalign: null
155
+ subsegments:
156
+ - [0x000000, asm, cod/000000] # .text
157
+ - [0x3209C0, textbin, cod/3209C0] # .vutext
158
+ - [0x324680, data, cod/324680] # .data
159
+ - [0x350100, rodata, cod/350100] # .rodata
160
+ - [0x3B0780, gcc_except_table, cod/3B0780] # .gcc_except_table
161
+ - { type: sbss, vram: 0x004B0880, name: cod/004B0880 } # .sbss
162
+ - { type: bss, vram: 0x004B0F80, name: cod/004B0F80 } # .bss
163
+ - [0x3B0864]
164
+ ```
165
+
166
+ This is a bare-bones configuration and there is a lot of work required to map out the different sections of the ROM.
167
+
168
+ ## Run splat with your configuration
169
+
170
+ ```sh
171
+ python3 -m splat split SLUS_XXX.YY.yaml
172
+ ```
173
+
174
+ The output will look something like this:
175
+
176
+ ```plain_text
177
+ splat 0.36.2 (powered by spimdisasm 1.38.0)
178
+ Loading symbols (symbol_addrs): 100%|█████████████████████████| 2/2 [00:00<00:00, 9868.95it/s]
179
+ Scanning cod: 0%| | 0/1 [00:00<?, ?it/s]
180
+ Rodata segment 'cod/350100' may belong to the text segment 'cod/000000'
181
+ Based on the usage from the function func_00102E48 to the symbol D_00450308
182
+ Scanning cod: 100%|█████████████████████████████████████████████| 1/1 [00:26<00:00, 26.62s/it]
183
+ Splitting cod: 100%|████████████████████████████████████████████| 1/1 [00:14<00:00, 14.77s/it]
184
+ Linker script cod: 100%|███████████████████████████████████████| 1/1 [00:00<00:00, 447.54it/s]
185
+ Split 3 MB (85.17%) in defined segments
186
+ asm: 3 MB (84.76%) 1 split, 0 cached
187
+ textbin: 15 KB (0.40%) 1 split, 0 cached
188
+ unknown: 0 B (0.00%) from unknown bin files
189
+ ```
190
+
191
+ It's up to you to figure out the layout of the ROM, finding proper file splits.
192
+
193
+ ## Next Steps
194
+
195
+ The reassembly of the ROM is currently out of scope of this quickstart, as is switching out the `asm` segments for `c` or `cpp`.
196
+
197
+ You can find a general workflow for using `splat` at [General Workflow](https://github.com/ethteck/splat/wiki/General-Workflow)
198
+
199
+ Please feel free to improve this guide!
@@ -1,6 +1,7 @@
1
1
  # Quickstart
2
2
 
3
- > **Note**: This quickstart is written with N64 ROMs in mind, and the assumption that you are using Ubuntu 20.04 either natively, via WSL2 or via Docker.
3
+ > [!NOTE]
4
+ > This quickstart is written with N64 ROMs in mind, and the assumption that you are using Ubuntu 20.04 either natively, via WSL2 or via Docker.
4
5
 
5
6
  For the purposes of this quickstart, we will assume that we are going to split a game called `mygame` and we have the ROM in `.z64` format named `baserom.z64`.
6
7
 
@@ -19,7 +20,7 @@ Copy the `baserom.z64` file into the `mygame` directory inside your home directo
19
20
  Ensure you are have **Python 3.9** or higher installed:
20
21
 
21
22
  ```sh
22
- python3 --version
23
+ $ python3 --version
23
24
  Python 3.9.10
24
25
  ```
25
26
 
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  name = "splat64"
3
3
  # Should be synced with src/splat/__init__.py
4
- version = "0.36.3"
4
+ version = "0.36.4"
5
5
  description = "A binary splitting tool to assist with decompilation and modding projects"
6
6
  readme = "README.md"
7
7
  license = {file = "LICENSE"}
@@ -11,18 +11,18 @@ classifiers = [
11
11
  "License :: OSI Approved :: MIT License",
12
12
  ]
13
13
  dependencies = [
14
- "PyYAML",
15
- "pylibyaml",
16
- "tqdm",
17
- "intervaltree",
18
- "colorama",
14
+ "PyYAML==6.0.3",
15
+ "pylibyaml==0.1.0",
16
+ "tqdm==4.67.1",
17
+ "intervaltree==3.1.0",
18
+ "colorama==0.4.6",
19
19
  ]
20
20
 
21
21
  [project.optional-dependencies]
22
22
  mips = [
23
23
  "spimdisasm>=1.38.0,<2.0.0", # This value should be keep in sync with the version listed on disassembler/spimdisasm_disassembler.py
24
24
  "rabbitizer>=1.12.0,<2.0.0",
25
- "pygfxd",
25
+ "pygfxd>=1.0.5",
26
26
  "n64img>=0.3.3",
27
27
  "crunch64>=0.5.1,<1.0.0",
28
28
  ]
@@ -1,11 +1,11 @@
1
- PyYAML
2
- pylibyaml
3
- tqdm
4
- intervaltree
5
- colorama
1
+ PyYAML==6.0.3
2
+ pylibyaml==0.1.0
3
+ tqdm==4.67.1
4
+ intervaltree==3.1.0
5
+ colorama==0.4.6
6
6
  # This value should be keep in sync with the version listed on disassembler/spimdisasm_disassembler.py and pyproject.toml
7
7
  spimdisasm>=1.38.0
8
8
  rabbitizer>=1.10.0
9
- pygfxd
9
+ pygfxd>=1.0.5
10
10
  n64img>=0.1.4
11
11
  crunch64>=0.2.0
@@ -1,7 +1,7 @@
1
1
  __package_name__ = __name__
2
2
 
3
3
  # Should be synced with pyproject.toml
4
- __version__ = "0.36.3"
4
+ __version__ = "0.36.4"
5
5
  __author__ = "ethteck"
6
6
 
7
7
  from . import util as util