splat64 0.35.0__tar.gz → 0.35.1__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 (154) hide show
  1. {splat64-0.35.0 → splat64-0.35.1}/CHANGELOG.md +5 -0
  2. {splat64-0.35.0 → splat64-0.35.1}/PKG-INFO +2 -2
  3. {splat64-0.35.0 → splat64-0.35.1}/README.md +1 -1
  4. {splat64-0.35.0 → splat64-0.35.1}/docs/Segments.md +4 -4
  5. {splat64-0.35.0 → splat64-0.35.1}/pyproject.toml +1 -1
  6. {splat64-0.35.0 → splat64-0.35.1}/src/splat/__init__.py +1 -1
  7. {splat64-0.35.0 → splat64-0.35.1}/src/splat/util/file_presets.py +14 -5
  8. {splat64-0.35.0 → splat64-0.35.1}/.gitattributes +0 -0
  9. {splat64-0.35.0 → splat64-0.35.1}/.github/workflows/black.yml +0 -0
  10. {splat64-0.35.0 → splat64-0.35.1}/.github/workflows/mypy.yml +0 -0
  11. {splat64-0.35.0 → splat64-0.35.1}/.github/workflows/publish_docs_to_wiki.yml +0 -0
  12. {splat64-0.35.0 → splat64-0.35.1}/.github/workflows/pypi.yml +0 -0
  13. {splat64-0.35.0 → splat64-0.35.1}/.github/workflows/test_lib.yml +0 -0
  14. {splat64-0.35.0 → splat64-0.35.1}/.github/workflows/unit_tests.yml +0 -0
  15. {splat64-0.35.0 → splat64-0.35.1}/.gitignore +0 -0
  16. {splat64-0.35.0 → splat64-0.35.1}/LICENSE +0 -0
  17. {splat64-0.35.0 → splat64-0.35.1}/create_config.py +0 -0
  18. {splat64-0.35.0 → splat64-0.35.1}/docs/Adding-Symbols.md +0 -0
  19. {splat64-0.35.0 → splat64-0.35.1}/docs/Advanced-Reloc.md +0 -0
  20. {splat64-0.35.0 → splat64-0.35.1}/docs/Advanced.md +0 -0
  21. {splat64-0.35.0 → splat64-0.35.1}/docs/Configuration.md +0 -0
  22. {splat64-0.35.0 → splat64-0.35.1}/docs/Examples.md +0 -0
  23. {splat64-0.35.0 → splat64-0.35.1}/docs/General-Workflow.md +0 -0
  24. {splat64-0.35.0 → splat64-0.35.1}/docs/Home.md +0 -0
  25. {splat64-0.35.0 → splat64-0.35.1}/docs/Quickstart.md +0 -0
  26. {splat64-0.35.0 → splat64-0.35.1}/docs/VramClasses.md +0 -0
  27. {splat64-0.35.0 → splat64-0.35.1}/mypy.ini +0 -0
  28. {splat64-0.35.0 → splat64-0.35.1}/requirements.txt +0 -0
  29. {splat64-0.35.0 → splat64-0.35.1}/split.py +0 -0
  30. {splat64-0.35.0 → splat64-0.35.1}/src/splat/__main__.py +0 -0
  31. {splat64-0.35.0 → splat64-0.35.1}/src/splat/disassembler/__init__.py +0 -0
  32. {splat64-0.35.0 → splat64-0.35.1}/src/splat/disassembler/disassembler.py +0 -0
  33. {splat64-0.35.0 → splat64-0.35.1}/src/splat/disassembler/disassembler_instance.py +0 -0
  34. {splat64-0.35.0 → splat64-0.35.1}/src/splat/disassembler/disassembler_section.py +0 -0
  35. {splat64-0.35.0 → splat64-0.35.1}/src/splat/disassembler/null_disassembler.py +0 -0
  36. {splat64-0.35.0 → splat64-0.35.1}/src/splat/disassembler/spimdisasm_disassembler.py +0 -0
  37. {splat64-0.35.0 → splat64-0.35.1}/src/splat/platforms/__init__.py +0 -0
  38. {splat64-0.35.0 → splat64-0.35.1}/src/splat/platforms/n64.py +0 -0
  39. {splat64-0.35.0 → splat64-0.35.1}/src/splat/platforms/ps2.py +0 -0
  40. {splat64-0.35.0 → splat64-0.35.1}/src/splat/platforms/psp.py +0 -0
  41. {splat64-0.35.0 → splat64-0.35.1}/src/splat/platforms/psx.py +0 -0
  42. {splat64-0.35.0 → splat64-0.35.1}/src/splat/py.typed +0 -0
  43. {splat64-0.35.0 → splat64-0.35.1}/src/splat/scripts/__init__.py +0 -0
  44. {splat64-0.35.0 → splat64-0.35.1}/src/splat/scripts/capy.py +0 -0
  45. {splat64-0.35.0 → splat64-0.35.1}/src/splat/scripts/create_config.py +0 -0
  46. {splat64-0.35.0 → splat64-0.35.1}/src/splat/scripts/split.py +0 -0
  47. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/__init__.py +0 -0
  48. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/common/__init__.py +0 -0
  49. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/common/asm.py +0 -0
  50. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/common/asmtu.py +0 -0
  51. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/common/bin.py +0 -0
  52. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/common/bss.py +0 -0
  53. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/common/c.py +0 -0
  54. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/common/code.py +0 -0
  55. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/common/codesubsegment.py +0 -0
  56. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/common/cpp.py +0 -0
  57. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/common/data.py +0 -0
  58. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/common/databin.py +0 -0
  59. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/common/eh_frame.py +0 -0
  60. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/common/gcc_except_table.py +0 -0
  61. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/common/group.py +0 -0
  62. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/common/hasm.py +0 -0
  63. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/common/header.py +0 -0
  64. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/common/lib.py +0 -0
  65. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/common/linker_offset.py +0 -0
  66. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/common/pad.py +0 -0
  67. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/common/rdata.py +0 -0
  68. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/common/rodata.py +0 -0
  69. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/common/rodatabin.py +0 -0
  70. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/common/sbss.py +0 -0
  71. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/common/sdata.py +0 -0
  72. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/common/segment.py +0 -0
  73. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/common/textbin.py +0 -0
  74. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/linker_entry.py +0 -0
  75. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/n64/__init__.py +0 -0
  76. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/n64/ci.py +0 -0
  77. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/n64/ci4.py +0 -0
  78. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/n64/ci8.py +0 -0
  79. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/n64/decompressor.py +0 -0
  80. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/n64/gfx.py +0 -0
  81. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/n64/header.py +0 -0
  82. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/n64/i1.py +0 -0
  83. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/n64/i4.py +0 -0
  84. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/n64/i8.py +0 -0
  85. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/n64/ia16.py +0 -0
  86. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/n64/ia4.py +0 -0
  87. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/n64/ia8.py +0 -0
  88. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/n64/img.py +0 -0
  89. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/n64/ipl3.py +0 -0
  90. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/n64/mio0.py +0 -0
  91. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/n64/palette.py +0 -0
  92. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/n64/rgba16.py +0 -0
  93. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/n64/rgba32.py +0 -0
  94. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/n64/rsp.py +0 -0
  95. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/n64/vtx.py +0 -0
  96. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/n64/yay0.py +0 -0
  97. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/ps2/__init__.py +0 -0
  98. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/ps2/ctor.py +0 -0
  99. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/ps2/lit4.py +0 -0
  100. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/ps2/lit8.py +0 -0
  101. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/ps2/vtables.py +0 -0
  102. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/psp/__init__.py +0 -0
  103. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/psx/__init__.py +0 -0
  104. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/psx/header.py +0 -0
  105. {splat64-0.35.0 → splat64-0.35.1}/src/splat/segtypes/segment.py +0 -0
  106. {splat64-0.35.0 → splat64-0.35.1}/src/splat/util/__init__.py +0 -0
  107. {splat64-0.35.0 → splat64-0.35.1}/src/splat/util/cache_handler.py +0 -0
  108. {splat64-0.35.0 → splat64-0.35.1}/src/splat/util/color.py +0 -0
  109. {splat64-0.35.0 → splat64-0.35.1}/src/splat/util/compiler.py +0 -0
  110. {splat64-0.35.0 → splat64-0.35.1}/src/splat/util/conf.py +0 -0
  111. {splat64-0.35.0 → splat64-0.35.1}/src/splat/util/log.py +0 -0
  112. {splat64-0.35.0 → splat64-0.35.1}/src/splat/util/n64/__init__.py +0 -0
  113. {splat64-0.35.0 → splat64-0.35.1}/src/splat/util/n64/find_code_length.py +0 -0
  114. {splat64-0.35.0 → splat64-0.35.1}/src/splat/util/n64/rominfo.py +0 -0
  115. {splat64-0.35.0 → splat64-0.35.1}/src/splat/util/options.py +0 -0
  116. {splat64-0.35.0 → splat64-0.35.1}/src/splat/util/palettes.py +0 -0
  117. {splat64-0.35.0 → splat64-0.35.1}/src/splat/util/progress_bar.py +0 -0
  118. {splat64-0.35.0 → splat64-0.35.1}/src/splat/util/psx/__init__.py +0 -0
  119. {splat64-0.35.0 → splat64-0.35.1}/src/splat/util/psx/psxexeinfo.py +0 -0
  120. {splat64-0.35.0 → splat64-0.35.1}/src/splat/util/relocs.py +0 -0
  121. {splat64-0.35.0 → splat64-0.35.1}/src/splat/util/statistics.py +0 -0
  122. {splat64-0.35.0 → splat64-0.35.1}/src/splat/util/symbols.py +0 -0
  123. {splat64-0.35.0 → splat64-0.35.1}/src/splat/util/utils.py +0 -0
  124. {splat64-0.35.0 → splat64-0.35.1}/src/splat/util/vram_classes.py +0 -0
  125. {splat64-0.35.0 → splat64-0.35.1}/test/Dockerfile +0 -0
  126. {splat64-0.35.0 → splat64-0.35.1}/test/README.md +0 -0
  127. {splat64-0.35.0 → splat64-0.35.1}/test/basic_app/.gitignore +0 -0
  128. {splat64-0.35.0 → splat64-0.35.1}/test/basic_app/Makefile +0 -0
  129. {splat64-0.35.0 → splat64-0.35.1}/test/basic_app/build/basic_app.bin +0 -0
  130. {splat64-0.35.0 → splat64-0.35.1}/test/basic_app/dummy_ipl3.s +0 -0
  131. {splat64-0.35.0 → splat64-0.35.1}/test/basic_app/expected/.splache +0 -0
  132. {splat64-0.35.0 → splat64-0.35.1}/test/basic_app/expected/asm/data/main.bss.s +0 -0
  133. {splat64-0.35.0 → splat64-0.35.1}/test/basic_app/expected/asm/data/main.data.s +0 -0
  134. {splat64-0.35.0 → splat64-0.35.1}/test/basic_app/expected/asm/data/main.rodata.s +0 -0
  135. {splat64-0.35.0 → splat64-0.35.1}/test/basic_app/expected/asm/handwritten.s +0 -0
  136. {splat64-0.35.0 → splat64-0.35.1}/test/basic_app/expected/asm/header.s +0 -0
  137. {splat64-0.35.0 → splat64-0.35.1}/test/basic_app/expected/asm/main.s +0 -0
  138. {splat64-0.35.0 → splat64-0.35.1}/test/basic_app/expected/asm/nonmatchings/main/D_80000510.s +0 -0
  139. {splat64-0.35.0 → splat64-0.35.1}/test/basic_app/expected/asm/nonmatchings/main/func_80000400.s +0 -0
  140. {splat64-0.35.0 → splat64-0.35.1}/test/basic_app/expected/asm/nonmatchings/main/func_800004A0.s +0 -0
  141. {splat64-0.35.0 → splat64-0.35.1}/test/basic_app/expected/assets/dummy_ipl3.bin +0 -0
  142. {splat64-0.35.0 → splat64-0.35.1}/test/basic_app/expected/basic_app.d +0 -0
  143. {splat64-0.35.0 → splat64-0.35.1}/test/basic_app/expected/build/test/basic_app/split/src/main.asmproc.d +0 -0
  144. {splat64-0.35.0 → splat64-0.35.1}/test/basic_app/expected/include/include_asm.h +0 -0
  145. {splat64-0.35.0 → splat64-0.35.1}/test/basic_app/expected/include/labels.inc +0 -0
  146. {splat64-0.35.0 → splat64-0.35.1}/test/basic_app/expected/include/macro.inc +0 -0
  147. {splat64-0.35.0 → splat64-0.35.1}/test/basic_app/expected/src/main.c +0 -0
  148. {splat64-0.35.0 → splat64-0.35.1}/test/basic_app/expected/undefined_funcs_auto.txt +0 -0
  149. {splat64-0.35.0 → splat64-0.35.1}/test/basic_app/expected/undefined_syms_auto.txt +0 -0
  150. {splat64-0.35.0 → splat64-0.35.1}/test/basic_app/handwritten.s +0 -0
  151. {splat64-0.35.0 → splat64-0.35.1}/test/basic_app/header.s +0 -0
  152. {splat64-0.35.0 → splat64-0.35.1}/test/basic_app/main.c +0 -0
  153. {splat64-0.35.0 → splat64-0.35.1}/test/test_gen_expected.sh +0 -0
  154. {splat64-0.35.0 → splat64-0.35.1}/test.py +0 -0
@@ -1,5 +1,10 @@
1
1
  # splat Release Notes
2
2
 
3
+ ### 0.35.1
4
+
5
+ * Fixes issues in the generated `macro.inc` and `labels.inc` files on psx projects.
6
+ * Change `jlabel`s to be global if the user has turned off rodata migration to functions.
7
+
3
8
  ### 0.35.0
4
9
 
5
10
  * Add `pair_segment` option to segments.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: splat64
3
- Version: 0.35.0
3
+ Version: 0.35.1
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
@@ -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.35.0,<1.0.0
79
+ splat64[mips]>=0.35.1,<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.35.0,<1.0.0
24
+ splat64[mips]>=0.35.1,<1.0.0
25
25
  ```
26
26
 
27
27
  ### Optional dependencies
@@ -189,9 +189,9 @@ Data located in the ROM that is linked from a C file. Use the `.data` segment to
189
189
 
190
190
  **NOTE:** `splat` will not generate any `.data.s` files for these `.` (dot) sections.
191
191
 
192
- ## `.sdata`
192
+ ## `sdata` / `.sdata`
193
193
 
194
- The `.sdata` segment behaves the same as the `.data` segment but supports "small data" linker sections named `.sdata`.
194
+ The `sdata` and `.sdata` segments behaves the same as the `data` and `.data` segments, but supports "small data" linker sections.
195
195
 
196
196
  ## `rodata`
197
197
 
@@ -263,9 +263,9 @@ Links the `.bss` section of the associated `c` file.
263
263
  - { start: 0x7D1AD0, type: .bss, name: filepath, vram: 0x803C0420 }
264
264
  ```
265
265
 
266
- ## `.sbss`
266
+ ## `sbss` / `.sbss`
267
267
 
268
- The `.sbss` segment behaves the same as the `.bss` segment but supports "small bss" linker sections named `.sbss`.
268
+ The `sbss` and `.sbss` segments behaves the same as the `bss` and `.bss` segments, but supports "small bss" linker sections.
269
269
 
270
270
  ## `lib`
271
271
 
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  name = "splat64"
3
3
  # Should be synced with src/splat/__init__.py
4
- version = "0.35.0"
4
+ version = "0.35.1"
5
5
  description = "A binary splitting tool to assist with decompilation and modding projects"
6
6
  readme = "README.md"
7
7
  license = {file = "LICENSE"}
@@ -1,7 +1,7 @@
1
1
  __package_name__ = __name__
2
2
 
3
3
  # Should be synced with pyproject.toml
4
- __version__ = "0.35.0"
4
+ __version__ = "0.35.1"
5
5
  __author__ = "ethteck"
6
6
 
7
7
  from . import util as util
@@ -122,20 +122,26 @@ def write_assembly_inc_files():
122
122
  options.opts.asm_jtbl_label_macro != ""
123
123
  and options.opts.asm_jtbl_label_macro != options.opts.asm_function_macro
124
124
  ):
125
- jlabel_macro_labelsinc = f"""
125
+ jlabel_macro_macroinc = f"""
126
126
  # A label referenced by a jumptable.
127
127
  .macro {options.opts.asm_jtbl_label_macro} label, visibility=global
128
+ .\\visibility \\label
129
+ .type \\label, @function
128
130
  \\label:
129
131
  .endm
130
132
  """
131
- jlabel_macro_macroinc = f"""
133
+ if options.opts.migrate_rodata_to_functions:
134
+ jlabel_macro_labelsinc = f"""
132
135
  # A label referenced by a jumptable.
133
136
  .macro {options.opts.asm_jtbl_label_macro} label, visibility=global
134
- .\\visibility \\label
135
- .type \\label, @function
136
137
  \\label:
137
138
  .endm
138
139
  """
140
+ else:
141
+ # If the user doesn't migrate rodata, like jumptables, to functions
142
+ # then the user will need jlabels to be global instead of local,
143
+ # so we just reuse the definition from macro.inc
144
+ jlabel_macro_labelsinc = jlabel_macro_macroinc
139
145
 
140
146
  data_macros = ""
141
147
  if (
@@ -186,6 +192,9 @@ def write_assembly_inc_files():
186
192
  if options.opts.compiler.uses_include_asm:
187
193
  # File used by original assembler
188
194
  preamble = "# This file is used by the original compiler/assembler.\n# Defines the expected assembly macros.\n"
195
+
196
+ if options.opts.platform == "psx":
197
+ preamble += '\n.include "gte_macros.inc"\n'
189
198
  _write("include/labels.inc", f"{preamble}\n{labels_inc}")
190
199
 
191
200
  if options.opts.platform in {"n64", "psx"}:
@@ -275,7 +284,7 @@ def write_assembly_inc_files():
275
284
  .set $fs5f, $f31
276
285
  """
277
286
  elif options.opts.platform == "psx":
278
- gas += '\ninclude "gte_macros.inc"\n'
287
+ gas += '\n.include "gte_macros.inc"\n'
279
288
  write_gte_macros()
280
289
 
281
290
  if options.opts.generated_macro_inc_content is not None:
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes