splat64 0.37.0__py3-none-any.whl → 0.37.1__py3-none-any.whl
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.
- splat/__init__.py +1 -1
- splat/segtypes/common/c.py +2 -0
- splat/segtypes/common/codesubsegment.py +20 -15
- splat/util/file_presets.py +0 -3
- {splat64-0.37.0.dist-info → splat64-0.37.1.dist-info}/METADATA +2 -2
- {splat64-0.37.0.dist-info → splat64-0.37.1.dist-info}/RECORD +9 -9
- {splat64-0.37.0.dist-info → splat64-0.37.1.dist-info}/WHEEL +0 -0
- {splat64-0.37.0.dist-info → splat64-0.37.1.dist-info}/entry_points.txt +0 -0
- {splat64-0.37.0.dist-info → splat64-0.37.1.dist-info}/licenses/LICENSE +0 -0
splat/__init__.py
CHANGED
splat/segtypes/common/c.py
CHANGED
|
@@ -152,6 +152,8 @@ class CommonSegC(CommonSegCodeSubsegment):
|
|
|
152
152
|
|
|
153
153
|
def split(self, rom_bytes: bytes):
|
|
154
154
|
if self.is_auto_segment:
|
|
155
|
+
if options.opts.make_full_disasm_for_code:
|
|
156
|
+
self.split_as_asmtu_file(self.asm_out_path())
|
|
155
157
|
return
|
|
156
158
|
|
|
157
159
|
if self.rom_start != self.rom_end:
|
|
@@ -252,22 +252,21 @@ class CommonSegCodeSubsegment(Segment):
|
|
|
252
252
|
f.write(self.spim_section.disassemble())
|
|
253
253
|
|
|
254
254
|
# Same as above but write all sections from siblings
|
|
255
|
-
def split_as_asmtu_file(self, out_path:
|
|
256
|
-
if self.spim_section is None:
|
|
257
|
-
return
|
|
258
|
-
|
|
259
|
-
if not out_path:
|
|
260
|
-
return
|
|
261
|
-
|
|
255
|
+
def split_as_asmtu_file(self, out_path: Path):
|
|
262
256
|
out_path.parent.mkdir(parents=True, exist_ok=True)
|
|
263
257
|
|
|
264
258
|
self.print_file_boundaries()
|
|
265
259
|
|
|
266
260
|
with open(out_path, "w", newline="\n") as f:
|
|
267
|
-
#
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
261
|
+
# self.spim_section would be None if the current section was
|
|
262
|
+
# declared `auto` in the yaml.
|
|
263
|
+
# This can be useful when there are TUs with only data/rodata/bss/etc
|
|
264
|
+
# sections but not text section.
|
|
265
|
+
if self.spim_section is not None:
|
|
266
|
+
# Write `.text` contents
|
|
267
|
+
for line in self.get_asm_file_header():
|
|
268
|
+
f.write(line + "\n")
|
|
269
|
+
f.write(self.spim_section.disassemble())
|
|
271
270
|
|
|
272
271
|
# Disassemble the siblings to this file by respecting the `section_order`
|
|
273
272
|
for sect in self.section_order:
|
|
@@ -281,25 +280,31 @@ class CommonSegCodeSubsegment(Segment):
|
|
|
281
280
|
if (
|
|
282
281
|
isinstance(sibling, CommonSegCodeSubsegment)
|
|
283
282
|
and sibling.spim_section is not None
|
|
284
|
-
and
|
|
283
|
+
and (
|
|
284
|
+
not sibling.should_self_split()
|
|
285
|
+
or options.opts.make_full_disasm_for_code
|
|
286
|
+
)
|
|
285
287
|
):
|
|
286
288
|
f.write("\n")
|
|
287
289
|
f.write(f"{sibling.get_section_asm_line()}\n\n")
|
|
288
290
|
f.write(sibling.spim_section.disassemble())
|
|
289
291
|
|
|
290
|
-
# Another loop to check anything that somehow may not be present
|
|
292
|
+
# Another loop to check anything that somehow may not be present in the `section_order`
|
|
291
293
|
for sect, sibling in self.siblings.items():
|
|
292
294
|
if sect == self.get_linker_section_linksection():
|
|
293
295
|
continue
|
|
294
296
|
|
|
295
297
|
if sect in self.section_order:
|
|
296
|
-
# Already handled
|
|
298
|
+
# Already handled in the above loop
|
|
297
299
|
continue
|
|
298
300
|
|
|
299
301
|
if (
|
|
300
302
|
isinstance(sibling, CommonSegCodeSubsegment)
|
|
301
303
|
and sibling.spim_section is not None
|
|
302
|
-
and
|
|
304
|
+
and (
|
|
305
|
+
not sibling.should_self_split()
|
|
306
|
+
or options.opts.make_full_disasm_for_code
|
|
307
|
+
)
|
|
303
308
|
):
|
|
304
309
|
f.write("\n")
|
|
305
310
|
f.write(f"{sibling.get_section_asm_line()}\n\n")
|
splat/util/file_presets.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: splat64
|
|
3
|
-
Version: 0.37.
|
|
3
|
+
Version: 0.37.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.37.
|
|
79
|
+
splat64[mips]>=0.37.1,<1.0.0
|
|
80
80
|
```
|
|
81
81
|
|
|
82
82
|
### Optional dependencies
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
splat/__init__.py,sha256=
|
|
1
|
+
splat/__init__.py,sha256=u9i1mpp1a75UqxBlneTIdu6BW5x33bBJEUxT2u14sKQ,291
|
|
2
2
|
splat/__main__.py,sha256=T333dHDgr-2HYYhtARnYMEjdECnYiNIKfcXDD99o22A,732
|
|
3
3
|
splat/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
splat/disassembler/__init__.py,sha256=LXuCElHxOvbb9xuSSeswT8W_v78chwtqjKq_9nxFVzQ,167
|
|
@@ -24,9 +24,9 @@ splat/segtypes/common/asm.py,sha256=gpR4uZ57l4Q9G0XTOeO1JIk9P5d8xXBxRfkrPIN-M1A,
|
|
|
24
24
|
splat/segtypes/common/asmtu.py,sha256=C52kKh-8YeDHu0EucEfQ-tQMtDgfKfwAJ6wwiW6nOBU,354
|
|
25
25
|
splat/segtypes/common/bin.py,sha256=qZeuvHNSrRuxdk-8V0xW0tcFhtzPk6doyf43E_t7D9Q,1250
|
|
26
26
|
splat/segtypes/common/bss.py,sha256=cX0RO7LRcBRO6t463AUSSV8sGdlxZTcd5_McZjjqfFo,3107
|
|
27
|
-
splat/segtypes/common/c.py,sha256=
|
|
27
|
+
splat/segtypes/common/c.py,sha256=_YxDn2jyDjfk8ttqsTPrZvD-c6OStmERjz_P98ihS3g,21444
|
|
28
28
|
splat/segtypes/common/code.py,sha256=FfBuy6x8fQXoJYX2Ul80uOs-CzlVslUaveD-hBmvKXM,10693
|
|
29
|
-
splat/segtypes/common/codesubsegment.py,sha256=
|
|
29
|
+
splat/segtypes/common/codesubsegment.py,sha256=a9AGNfWrQRfMVKP84_a_2BBfQSwOVviAltp8ZjOivT0,11140
|
|
30
30
|
splat/segtypes/common/cpp.py,sha256=p-duowCt4czrmaWgj1LuFw5LGfdyB_uaeLTKVmH80Cg,180
|
|
31
31
|
splat/segtypes/common/data.py,sha256=l3CCa95vHH8XwiksamaxuZuSF_rOGqcozGlZj0bt9Yw,5712
|
|
32
32
|
splat/segtypes/common/databin.py,sha256=nDI1ciAv0QLt2xDYjEtGJHSoONZzJZKyST-BuSKML2Q,1169
|
|
@@ -80,7 +80,7 @@ splat/util/cache_handler.py,sha256=BrTWo8U4bj8TBcZfIRwiAYmogc3YUlBz9P-34Y0aIrg,1
|
|
|
80
80
|
splat/util/color.py,sha256=FSmy0dAQJ9FzRBc99Yt4kBEyB62MC_YiVkqoWgPMsRU,371
|
|
81
81
|
splat/util/compiler.py,sha256=n5hlxazUy8rq-t7DADBbC0n6ZGuLDzp3ma3883oHQ3E,1848
|
|
82
82
|
splat/util/conf.py,sha256=0Qcv5d5XAvdVzqF4i4L_lJuC5hI0PEufeob58YaN-xs,3230
|
|
83
|
-
splat/util/file_presets.py,sha256=
|
|
83
|
+
splat/util/file_presets.py,sha256=4UsDMqQy5ZACSafjCba1pwwTQKK_2leOycwTFkNG4Ac,18985
|
|
84
84
|
splat/util/log.py,sha256=aJA1rg8IirJu1wGzjNuATHvepYvD3k5CtEyMasyJWxI,1193
|
|
85
85
|
splat/util/options.py,sha256=Lq1noBa-2f_j7lSvFfOyq4b2rFhBuCvB-M_s1Czu1Pg,31931
|
|
86
86
|
splat/util/palettes.py,sha256=d3KoZnwt-zunI9eNwb3txysXg4DY3xnF0O5aQRxM4so,2920
|
|
@@ -97,8 +97,8 @@ splat/util/ps2/__init__.py,sha256=hAU12HtQLOc_sxc8_rzxOERBT5wjg3DhQ8XRN9hBXfA,39
|
|
|
97
97
|
splat/util/ps2/ps2elfinfo.py,sha256=v6nTPabzXpG1N-MhhkbVeLoGjgsjBEpHL1DoPv26-Hs,7982
|
|
98
98
|
splat/util/psx/__init__.py,sha256=kCCaR-KB1mNlIcXB4OuuSQ2zVLbWg_SnIZIUeyjeBBI,39
|
|
99
99
|
splat/util/psx/psxexeinfo.py,sha256=Oxd5Lt8HTNHuUzw3cVujdyJRqEG-yo0XT78wEISUXms,5705
|
|
100
|
-
splat64-0.37.
|
|
101
|
-
splat64-0.37.
|
|
102
|
-
splat64-0.37.
|
|
103
|
-
splat64-0.37.
|
|
104
|
-
splat64-0.37.
|
|
100
|
+
splat64-0.37.1.dist-info/METADATA,sha256=3QvXBmz8S6MtVua2En81GEBd_2Q2CSy6SWS7k0gA9UQ,3879
|
|
101
|
+
splat64-0.37.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
102
|
+
splat64-0.37.1.dist-info/entry_points.txt,sha256=O7Xy-qNOHcI87-OQrWJ-OhRDws74SuwVb_4rtnp0eLo,52
|
|
103
|
+
splat64-0.37.1.dist-info/licenses/LICENSE,sha256=97VMVzjG8yQvsf8NG2M9IFSbh7R8cifJnc6QK1cZqj8,1070
|
|
104
|
+
splat64-0.37.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|