splat64 0.36.0__tar.gz → 0.36.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.36.0 → splat64-0.36.1}/CHANGELOG.md +4 -0
  2. {splat64-0.36.0 → splat64-0.36.1}/PKG-INFO +2 -2
  3. {splat64-0.36.0 → splat64-0.36.1}/README.md +1 -1
  4. {splat64-0.36.0 → splat64-0.36.1}/pyproject.toml +1 -1
  5. {splat64-0.36.0 → splat64-0.36.1}/src/splat/__init__.py +1 -1
  6. {splat64-0.36.0 → splat64-0.36.1}/src/splat/util/file_presets.py +94 -79
  7. {splat64-0.36.0 → splat64-0.36.1}/.gitattributes +0 -0
  8. {splat64-0.36.0 → splat64-0.36.1}/.github/workflows/black.yml +0 -0
  9. {splat64-0.36.0 → splat64-0.36.1}/.github/workflows/mypy.yml +0 -0
  10. {splat64-0.36.0 → splat64-0.36.1}/.github/workflows/publish_docs_to_wiki.yml +0 -0
  11. {splat64-0.36.0 → splat64-0.36.1}/.github/workflows/pypi.yml +0 -0
  12. {splat64-0.36.0 → splat64-0.36.1}/.github/workflows/test_lib.yml +0 -0
  13. {splat64-0.36.0 → splat64-0.36.1}/.github/workflows/unit_tests.yml +0 -0
  14. {splat64-0.36.0 → splat64-0.36.1}/.gitignore +0 -0
  15. {splat64-0.36.0 → splat64-0.36.1}/LICENSE +0 -0
  16. {splat64-0.36.0 → splat64-0.36.1}/create_config.py +0 -0
  17. {splat64-0.36.0 → splat64-0.36.1}/docs/Adding-Symbols.md +0 -0
  18. {splat64-0.36.0 → splat64-0.36.1}/docs/Advanced-Reloc.md +0 -0
  19. {splat64-0.36.0 → splat64-0.36.1}/docs/Advanced.md +0 -0
  20. {splat64-0.36.0 → splat64-0.36.1}/docs/Configuration.md +0 -0
  21. {splat64-0.36.0 → splat64-0.36.1}/docs/Examples.md +0 -0
  22. {splat64-0.36.0 → splat64-0.36.1}/docs/General-Workflow.md +0 -0
  23. {splat64-0.36.0 → splat64-0.36.1}/docs/Home.md +0 -0
  24. {splat64-0.36.0 → splat64-0.36.1}/docs/Quickstart.md +0 -0
  25. {splat64-0.36.0 → splat64-0.36.1}/docs/Segments.md +0 -0
  26. {splat64-0.36.0 → splat64-0.36.1}/docs/VramClasses.md +0 -0
  27. {splat64-0.36.0 → splat64-0.36.1}/mypy.ini +0 -0
  28. {splat64-0.36.0 → splat64-0.36.1}/requirements.txt +0 -0
  29. {splat64-0.36.0 → splat64-0.36.1}/split.py +0 -0
  30. {splat64-0.36.0 → splat64-0.36.1}/src/splat/__main__.py +0 -0
  31. {splat64-0.36.0 → splat64-0.36.1}/src/splat/disassembler/__init__.py +0 -0
  32. {splat64-0.36.0 → splat64-0.36.1}/src/splat/disassembler/disassembler.py +0 -0
  33. {splat64-0.36.0 → splat64-0.36.1}/src/splat/disassembler/disassembler_instance.py +0 -0
  34. {splat64-0.36.0 → splat64-0.36.1}/src/splat/disassembler/disassembler_section.py +0 -0
  35. {splat64-0.36.0 → splat64-0.36.1}/src/splat/disassembler/null_disassembler.py +0 -0
  36. {splat64-0.36.0 → splat64-0.36.1}/src/splat/disassembler/spimdisasm_disassembler.py +0 -0
  37. {splat64-0.36.0 → splat64-0.36.1}/src/splat/platforms/__init__.py +0 -0
  38. {splat64-0.36.0 → splat64-0.36.1}/src/splat/platforms/n64.py +0 -0
  39. {splat64-0.36.0 → splat64-0.36.1}/src/splat/platforms/ps2.py +0 -0
  40. {splat64-0.36.0 → splat64-0.36.1}/src/splat/platforms/psp.py +0 -0
  41. {splat64-0.36.0 → splat64-0.36.1}/src/splat/platforms/psx.py +0 -0
  42. {splat64-0.36.0 → splat64-0.36.1}/src/splat/py.typed +0 -0
  43. {splat64-0.36.0 → splat64-0.36.1}/src/splat/scripts/__init__.py +0 -0
  44. {splat64-0.36.0 → splat64-0.36.1}/src/splat/scripts/capy.py +0 -0
  45. {splat64-0.36.0 → splat64-0.36.1}/src/splat/scripts/create_config.py +0 -0
  46. {splat64-0.36.0 → splat64-0.36.1}/src/splat/scripts/split.py +0 -0
  47. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/__init__.py +0 -0
  48. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/common/__init__.py +0 -0
  49. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/common/asm.py +0 -0
  50. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/common/asmtu.py +0 -0
  51. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/common/bin.py +0 -0
  52. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/common/bss.py +0 -0
  53. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/common/c.py +0 -0
  54. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/common/code.py +0 -0
  55. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/common/codesubsegment.py +0 -0
  56. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/common/cpp.py +0 -0
  57. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/common/data.py +0 -0
  58. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/common/databin.py +0 -0
  59. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/common/eh_frame.py +0 -0
  60. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/common/gcc_except_table.py +0 -0
  61. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/common/group.py +0 -0
  62. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/common/hasm.py +0 -0
  63. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/common/header.py +0 -0
  64. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/common/lib.py +0 -0
  65. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/common/linker_offset.py +0 -0
  66. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/common/pad.py +0 -0
  67. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/common/rdata.py +0 -0
  68. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/common/rodata.py +0 -0
  69. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/common/rodatabin.py +0 -0
  70. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/common/sbss.py +0 -0
  71. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/common/sdata.py +0 -0
  72. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/common/segment.py +0 -0
  73. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/common/textbin.py +0 -0
  74. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/linker_entry.py +0 -0
  75. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/n64/__init__.py +0 -0
  76. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/n64/ci.py +0 -0
  77. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/n64/ci4.py +0 -0
  78. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/n64/ci8.py +0 -0
  79. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/n64/decompressor.py +0 -0
  80. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/n64/gfx.py +0 -0
  81. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/n64/header.py +0 -0
  82. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/n64/i1.py +0 -0
  83. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/n64/i4.py +0 -0
  84. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/n64/i8.py +0 -0
  85. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/n64/ia16.py +0 -0
  86. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/n64/ia4.py +0 -0
  87. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/n64/ia8.py +0 -0
  88. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/n64/img.py +0 -0
  89. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/n64/ipl3.py +0 -0
  90. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/n64/mio0.py +0 -0
  91. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/n64/palette.py +0 -0
  92. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/n64/rgba16.py +0 -0
  93. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/n64/rgba32.py +0 -0
  94. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/n64/rsp.py +0 -0
  95. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/n64/vtx.py +0 -0
  96. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/n64/yay0.py +0 -0
  97. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/ps2/__init__.py +0 -0
  98. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/ps2/ctor.py +0 -0
  99. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/ps2/lit4.py +0 -0
  100. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/ps2/lit8.py +0 -0
  101. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/ps2/vtables.py +0 -0
  102. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/psp/__init__.py +0 -0
  103. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/psx/__init__.py +0 -0
  104. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/psx/header.py +0 -0
  105. {splat64-0.36.0 → splat64-0.36.1}/src/splat/segtypes/segment.py +0 -0
  106. {splat64-0.36.0 → splat64-0.36.1}/src/splat/util/__init__.py +0 -0
  107. {splat64-0.36.0 → splat64-0.36.1}/src/splat/util/cache_handler.py +0 -0
  108. {splat64-0.36.0 → splat64-0.36.1}/src/splat/util/color.py +0 -0
  109. {splat64-0.36.0 → splat64-0.36.1}/src/splat/util/compiler.py +0 -0
  110. {splat64-0.36.0 → splat64-0.36.1}/src/splat/util/conf.py +0 -0
  111. {splat64-0.36.0 → splat64-0.36.1}/src/splat/util/log.py +0 -0
  112. {splat64-0.36.0 → splat64-0.36.1}/src/splat/util/n64/__init__.py +0 -0
  113. {splat64-0.36.0 → splat64-0.36.1}/src/splat/util/n64/find_code_length.py +0 -0
  114. {splat64-0.36.0 → splat64-0.36.1}/src/splat/util/n64/rominfo.py +0 -0
  115. {splat64-0.36.0 → splat64-0.36.1}/src/splat/util/options.py +0 -0
  116. {splat64-0.36.0 → splat64-0.36.1}/src/splat/util/palettes.py +0 -0
  117. {splat64-0.36.0 → splat64-0.36.1}/src/splat/util/progress_bar.py +0 -0
  118. {splat64-0.36.0 → splat64-0.36.1}/src/splat/util/psx/__init__.py +0 -0
  119. {splat64-0.36.0 → splat64-0.36.1}/src/splat/util/psx/psxexeinfo.py +0 -0
  120. {splat64-0.36.0 → splat64-0.36.1}/src/splat/util/relocs.py +0 -0
  121. {splat64-0.36.0 → splat64-0.36.1}/src/splat/util/statistics.py +0 -0
  122. {splat64-0.36.0 → splat64-0.36.1}/src/splat/util/symbols.py +0 -0
  123. {splat64-0.36.0 → splat64-0.36.1}/src/splat/util/utils.py +0 -0
  124. {splat64-0.36.0 → splat64-0.36.1}/src/splat/util/vram_classes.py +0 -0
  125. {splat64-0.36.0 → splat64-0.36.1}/test/Dockerfile +0 -0
  126. {splat64-0.36.0 → splat64-0.36.1}/test/README.md +0 -0
  127. {splat64-0.36.0 → splat64-0.36.1}/test/basic_app/.gitignore +0 -0
  128. {splat64-0.36.0 → splat64-0.36.1}/test/basic_app/Makefile +0 -0
  129. {splat64-0.36.0 → splat64-0.36.1}/test/basic_app/build/basic_app.bin +0 -0
  130. {splat64-0.36.0 → splat64-0.36.1}/test/basic_app/dummy_ipl3.s +0 -0
  131. {splat64-0.36.0 → splat64-0.36.1}/test/basic_app/expected/.splache +0 -0
  132. {splat64-0.36.0 → splat64-0.36.1}/test/basic_app/expected/asm/data/main.bss.s +0 -0
  133. {splat64-0.36.0 → splat64-0.36.1}/test/basic_app/expected/asm/data/main.data.s +0 -0
  134. {splat64-0.36.0 → splat64-0.36.1}/test/basic_app/expected/asm/data/main.rodata.s +0 -0
  135. {splat64-0.36.0 → splat64-0.36.1}/test/basic_app/expected/asm/handwritten.s +0 -0
  136. {splat64-0.36.0 → splat64-0.36.1}/test/basic_app/expected/asm/header.s +0 -0
  137. {splat64-0.36.0 → splat64-0.36.1}/test/basic_app/expected/asm/main.s +0 -0
  138. {splat64-0.36.0 → splat64-0.36.1}/test/basic_app/expected/asm/nonmatchings/main/D_80000510.s +0 -0
  139. {splat64-0.36.0 → splat64-0.36.1}/test/basic_app/expected/asm/nonmatchings/main/func_80000400.s +0 -0
  140. {splat64-0.36.0 → splat64-0.36.1}/test/basic_app/expected/asm/nonmatchings/main/func_800004A0.s +0 -0
  141. {splat64-0.36.0 → splat64-0.36.1}/test/basic_app/expected/assets/dummy_ipl3.bin +0 -0
  142. {splat64-0.36.0 → splat64-0.36.1}/test/basic_app/expected/basic_app.d +0 -0
  143. {splat64-0.36.0 → splat64-0.36.1}/test/basic_app/expected/build/test/basic_app/split/src/main.asmproc.d +0 -0
  144. {splat64-0.36.0 → splat64-0.36.1}/test/basic_app/expected/include/include_asm.h +0 -0
  145. {splat64-0.36.0 → splat64-0.36.1}/test/basic_app/expected/include/labels.inc +0 -0
  146. {splat64-0.36.0 → splat64-0.36.1}/test/basic_app/expected/include/macro.inc +0 -0
  147. {splat64-0.36.0 → splat64-0.36.1}/test/basic_app/expected/src/main.c +0 -0
  148. {splat64-0.36.0 → splat64-0.36.1}/test/basic_app/expected/undefined_funcs_auto.txt +0 -0
  149. {splat64-0.36.0 → splat64-0.36.1}/test/basic_app/expected/undefined_syms_auto.txt +0 -0
  150. {splat64-0.36.0 → splat64-0.36.1}/test/basic_app/handwritten.s +0 -0
  151. {splat64-0.36.0 → splat64-0.36.1}/test/basic_app/header.s +0 -0
  152. {splat64-0.36.0 → splat64-0.36.1}/test/basic_app/main.c +0 -0
  153. {splat64-0.36.0 → splat64-0.36.1}/test/test_gen_expected.sh +0 -0
  154. {splat64-0.36.0 → splat64-0.36.1}/test.py +0 -0
@@ -1,5 +1,9 @@
1
1
  # splat Release Notes
2
2
 
3
+ ### 0.36.1
4
+ * Files generated with `generate_asm_macros_files` will not be overwritten if they already exist on disk unchanged.
5
+ * Updated GTE macros to better document opcode encodings
6
+
3
7
  ### 0.36.0
4
8
 
5
9
  * New symbol attribute: `align`.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: splat64
3
- Version: 0.36.0
3
+ Version: 0.36.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.36.0,<1.0.0
79
+ splat64[mips]>=0.36.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.36.0,<1.0.0
24
+ splat64[mips]>=0.36.1,<1.0.0
25
25
  ```
26
26
 
27
27
  ### Optional dependencies
@@ -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.0"
4
+ version = "0.36.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.36.0"
4
+ __version__ = "0.36.1"
5
5
  __author__ = "ethteck"
6
6
 
7
7
  from . import util as util
@@ -24,6 +24,12 @@ def write_all_files():
24
24
  def _write(filepath: str, contents: str):
25
25
  p = Path(os.path.normpath(options.opts.base_path / filepath))
26
26
  p.parent.mkdir(parents=True, exist_ok=True)
27
+
28
+ if p.exists():
29
+ with p.open("r", encoding="UTF-8") as f:
30
+ existing_contents = f.read()
31
+ if existing_contents == contents:
32
+ return
27
33
  with p.open("w", encoding="UTF-8", newline="\n") as f:
28
34
  f.write(contents)
29
35
 
@@ -339,92 +345,99 @@ def write_gte_macros():
339
345
  # Taken directly from https://github.com/Decompollaborate/rabbitizer/blob/develop/docs/r3000gte/gte_macros.s
340
346
  # Please try to upstream any fix/update done here.
341
347
  gte_macros = """
342
- ## GTE instructions macros
343
- ## This macros are meant to be used with GAS and avoid using DMPSX
348
+ .ifndef .L_GTE_MACRO_INC
349
+ .L_GTE_MACRO_INC:
350
+
351
+ ## GTE instruction macros
352
+ ## These are meant for use with GAS and replace DMPSX
353
+
354
+ .macro cop2op pseudo, op, sf = 1, mx = 0, v = 0, cv = 0, lm = 0
355
+ cop2 \\pseudo << 20 | \\sf << 19 | \\mx << 17 | \\v << 15 | \\cv << 13 | \\lm << 10 | \\op
356
+ .endm
344
357
 
345
358
  /* RTPS 15 0x4A180001 Perspective transform */
346
359
  .macro rtps
347
- .word 0x4A180001
360
+ cop2op 0x01, 0x01
348
361
  .endm
349
362
 
350
363
  /* RTPT 23 0x4A280030 Perspective transform on 3 points */
351
364
  .macro rtpt
352
- .word 0x4A280030
365
+ cop2op 0x02, 0x30
353
366
  .endm
354
367
 
355
368
  /* DPCL 8 0x4A680029 Depth Cue Color light */
356
369
  .macro dpcl
357
- .word 0x4A680029
370
+ cop2op 0x06, 0x29
358
371
  .endm
359
372
 
360
373
  /* DPCS 8 0x4A780010 Depth Cueing */
361
374
  .macro dpcs
362
- .word 0x4A780010
375
+ cop2op 0x07, 0x10
363
376
  .endm
364
377
 
365
- /* DPCT 17 0x4AF8002A Depth cue color RGB0,RGB1,RGB2 */
378
+ /* DPCT 17 0x4A88002A Depth cue color RGB0,RGB1,RGB2 */
366
379
  .macro dpct
367
- .word 0x4AF8002A
380
+ cop2op 0x08, 0x2A
368
381
  .endm
369
382
 
370
383
  /* INTPL 8 0x4A980011 Interpolation of vector and far color */
371
384
  .macro intpl
372
- .word 0x4A980011
385
+ cop2op 0x09, 0x11
373
386
  .endm
374
387
 
375
388
  /* NCS 14 0x4AC8041E Normal color v0 */
376
389
  .macro ncs
377
- .word 0x4AC8041E
390
+ cop2op 0x0C, 0x1E, lm = 1
378
391
  .endm
379
392
 
380
393
  /* NCT 30 0x4AD80420 Normal color v0, v1, v2 */
381
394
  .macro nct
382
- .word 0x4AD80420
395
+ cop2op 0x0D, 0x20, lm = 1
383
396
  .endm
384
397
 
385
398
  /* NCDS 19 0x4AE80413 Normal color depth cuev0 */
386
399
  .macro ncds
387
- .word 0x4AE80413
400
+ cop2op 0x0E, 0x13, lm = 1
388
401
  .endm
389
402
 
390
403
  /* NCDT 44 0x4AF80416 Normal color depth cue v0, v1, v2 */
391
404
  .macro ncdt
392
- .word 0x4AF80416
405
+ cop2op 0x0F, 0x16, lm = 1
393
406
  .endm
394
407
 
395
408
  /* NCCS 17 0x4B08041B Normal color col. v0 */
396
409
  .macro nccs
397
- .word 0x4B08041B
410
+ cop2op 0x10, 0x1B, lm = 1
398
411
  .endm
399
412
 
400
413
  /* NCCT 39 0x4B18043F Normal color col.v0, v1, v2 */
401
414
  .macro ncct
402
- .word 0x4B18043F
415
+ cop2op 0x11, 0x3F, lm = 1
403
416
  .endm
404
417
 
405
418
  /* CDP 13 0x4B280414 Color Depth Queue */
406
419
  .macro cdp
407
- .word 0x4B280414
420
+ cop2op 0x12, 0x14, lm = 1
408
421
  .endm
409
422
 
410
423
  /* CC 11 0x4B38041C Color Col. */
411
424
  .macro cc
412
- .word 0x4B38041C
425
+ cop2op 0x13, 0x1C, lm = 1
413
426
  .endm
414
427
 
415
428
  /* NCLIP 8 0x4B400006 Normal clipping */
416
429
  .macro nclip
417
- .word 0x4B400006
430
+ cop2op 0x14, 0x06, sf = 0
418
431
  .endm
419
432
 
420
433
  /* AVSZ3 5 0x4B58002D Average of three Z values */
421
434
  .macro avsz3
422
- .word 0x4B58002D
435
+ cop2op 0x15, 0x2D
423
436
  .endm
424
437
 
425
438
  /* AVSZ4 6 0x4B68002E Average of four Z values */
426
439
  .macro avsz4
427
- .word 0x4B68002E
440
+ cop2op 0x16, 0x2E
428
441
  .endm
429
442
 
430
443
 
@@ -435,29 +448,29 @@ def write_gte_macros():
435
448
  # cv : arg is 2 bit wide
436
449
  # lm : arg is 1 bit wide
437
450
 
438
- /* MVMVA 8 0x4A400012 Multiply vector by matrix and vector addition. */
451
+ /* mvmva 8 0x4A4nnn12 Multiply vector by matrix and vector addition. */
439
452
  .macro mvmva sf, mx, v, cv, lm
440
- .word 0x4A400012 | (\\sf & 0x1) << 19 | (\\mx & 0x3) << 17 | (\\v & 0x3) << 15 | (\\cv & 0x3) << 13 | (\\lm & 0x1) << 10
453
+ cop2op 0x04, 0x12, sf = \\sf, mx = \\mx, v = \\v, cv = \\cv, lm = \\lm
441
454
  .endm
442
455
 
443
- /* SQR 5 0x4AA00428 Square of vector */
456
+ /* SQR 5 0x4AAn0428 Square of vector */
444
457
  .macro sqr sf
445
- .word 0x4AA00428 | (\\sf & 0x1) << 19
458
+ cop2op 0x0A, 0x28, sf = \\sf, lm = 1
446
459
  .endm
447
460
 
448
- /* OP 6 0x4B70000C Outer Product */
461
+ /* OP 6 0x4B7n000C Outer Product */
449
462
  .macro op sf
450
- .word 0x4B70000C | (\\sf & 0x1) << 19
463
+ cop2op 0x17, 0x0C, sf = \\sf
451
464
  .endm
452
465
 
453
- /* GPF 6 0x4B90003D General purpose interpolation */
466
+ /* GPF 6 0x4B9n003D General purpose interpolation */
454
467
  .macro gpf sf
455
- .word 0x4B90003D | (\\sf & 0x1) << 19
468
+ cop2op 0x19, 0x3D, sf = \\sf
456
469
  .endm
457
470
 
458
- /* GPL 5 0x4BA0003E general purpose interpolation */
471
+ /* GPL 5 0x4BAn003E general purpose interpolation */
459
472
  .macro gpl sf
460
- .word 0x4BA0003E | (\\sf & 0x1) << 19
473
+ cop2op 0x1A, 0x3E, sf = \\sf
461
474
  .endm
462
475
 
463
476
 
@@ -466,284 +479,286 @@ def write_gte_macros():
466
479
  /* rtv0 - 0x4A486012 v0 * rotmatrix */
467
480
  .macro rtv0
468
481
  # .word 0x4A486012
469
- MVMVA 1, 0, 0, 3, 0
482
+ mvmva 1, 0, 0, 3, 0
470
483
  .endm
471
484
 
472
485
  /* rtv1 - 0x4A48E012 v1 * rotmatrix */
473
486
  .macro rtv1
474
487
  # .word 0x4A48E012
475
- MVMVA 1, 0, 1, 3, 0
488
+ mvmva 1, 0, 1, 3, 0
476
489
  .endm
477
490
 
478
491
  /* rtv2 - 0x4A496012 v2 * rotmatrix */
479
492
  .macro rtv2
480
493
  # .word 0x4A496012
481
- MVMVA 1, 0, 2, 3, 0
494
+ mvmva 1, 0, 2, 3, 0
482
495
  .endm
483
496
 
484
497
  /* rtir12 - 0x4A49E012 ir * rotmatrix */
485
498
  .macro rtir12
486
499
  # .word 0x4A49E012
487
- MVMVA 1, 0, 3, 3, 0
500
+ mvmva 1, 0, 3, 3, 0
488
501
  .endm
489
502
 
490
503
  /* rtir0 - 0x4A41E012 ir * rotmatrix */
491
504
  .macro rtir0
492
505
  # .word 0x4A41E012
493
- MVMVA 0, 0, 3, 3, 0
506
+ mvmva 0, 0, 3, 3, 0
494
507
  .endm
495
508
 
496
509
  /* rtv0tr - 0x4A480012 v0 * rotmatrix + tr vector */
497
510
  .macro rtv0tr
498
511
  # .word 0x4A480012
499
- MVMVA 1, 0, 0, 0, 0
512
+ mvmva 1, 0, 0, 0, 0
500
513
  .endm
501
514
 
502
515
  /* rtv1tr - 0x4A488012 v1 * rotmatrix + tr vector */
503
516
  .macro rtv1tr
504
517
  # .word 0x4A488012
505
- MVMVA 1, 0, 1, 0, 0
518
+ mvmva 1, 0, 1, 0, 0
506
519
  .endm
507
520
 
508
521
  /* rtv2tr - 0x4A490012 v2 * rotmatrix + tr vector */
509
522
  .macro rtv2tr
510
523
  # .word 0x4A490012
511
- MVMVA 1, 0, 2, 0, 0
524
+ mvmva 1, 0, 2, 0, 0
512
525
  .endm
513
526
 
514
527
  /* rtirtr - 0x4A498012 ir * rotmatrix + tr vector */
515
528
  .macro rtirtr
516
529
  # .word 0x4A498012
517
- MVMVA 1, 0, 3, 0, 0
530
+ mvmva 1, 0, 3, 0, 0
518
531
  .endm
519
532
 
520
533
  /* rtv0bk - 0x4A482012 v0 * rotmatrix + bk vector */
521
534
  .macro rtv0bk
522
535
  # .word 0x4A482012
523
- MVMVA 1, 0, 0, 1, 0
536
+ mvmva 1, 0, 0, 1, 0
524
537
  .endm
525
538
 
526
539
  /* rtv1bk - 0x4A48A012 v1 * rotmatrix + bk vector */
527
540
  .macro rtv1bk
528
541
  # .word 0x4A48A012
529
- MVMVA 1, 0, 1, 1, 0
542
+ mvmva 1, 0, 1, 1, 0
530
543
  .endm
531
544
 
532
545
  /* rtv2bk - 0x4A492012 v2 * rotmatrix + bk vector */
533
546
  .macro rtv2bk
534
547
  # .word 0x4A492012
535
- MVMVA 1, 0, 2, 1, 0
548
+ mvmva 1, 0, 2, 1, 0
536
549
  .endm
537
550
 
538
551
  /* rtirbk - 0x4A49A012 ir * rotmatrix + bk vector */
539
552
  .macro rtirbk
540
553
  # .word 0x4A49A012
541
- MVMVA 1, 0, 3, 1, 0
554
+ mvmva 1, 0, 3, 1, 0
542
555
  .endm
543
556
 
544
557
  /* ll - 0x4A4A6412 v0 * light matrix. Lower limit result to 0 */
545
558
  .macro ll
546
559
  # .word 0x4A4A6412
547
- MVMVA 1, 1, 0, 3, 1
560
+ mvmva 1, 1, 0, 3, 1
548
561
  .endm
549
562
 
550
563
  /* llv0 - 0x4A4A6012 v0 * light matrix */
551
564
  .macro llv0
552
565
  # .word 0x4A4A6012
553
- MVMVA 1, 1, 0, 3, 0
566
+ mvmva 1, 1, 0, 3, 0
554
567
  .endm
555
568
 
556
569
  /* llv1 - 0x4A4AE012 v1 * light matrix */
557
570
  .macro llv1
558
571
  # .word 0x4A4AE012
559
- MVMVA 1, 1, 1, 3, 0
572
+ mvmva 1, 1, 1, 3, 0
560
573
  .endm
561
574
 
562
575
  /* llv2 - 0x4A4B6012 v2 * light matrix */
563
576
  .macro llv2
564
577
  # .word 0x4A4B6012
565
- MVMVA 1, 1, 2, 3, 0
578
+ mvmva 1, 1, 2, 3, 0
566
579
  .endm
567
580
 
568
581
  /* llvir - 0x4A4BE012 ir * light matrix */
569
582
  .macro llvir
570
583
  # .word 0x4A4BE012
571
- MVMVA 1, 1, 3, 3, 0
584
+ mvmva 1, 1, 3, 3, 0
572
585
  .endm
573
586
 
574
587
  /* llv0tr - 0x4A4A0012 v0 * light matrix + tr vector */
575
588
  .macro llv0tr
576
589
  # .word 0x4A4A0012
577
- MVMVA 1, 1, 0, 0, 0
590
+ mvmva 1, 1, 0, 0, 0
578
591
  .endm
579
592
 
580
593
  /* llv1tr - 0x4A4A8012 v1 * light matrix + tr vector */
581
594
  .macro llv1tr
582
595
  # .word 0x4A4A8012
583
- MVMVA 1, 1, 1, 0, 0
596
+ mvmva 1, 1, 1, 0, 0
584
597
  .endm
585
598
 
586
599
  /* llv2tr - 0x4A4B0012 v2 * light matrix + tr vector */
587
600
  .macro llv2tr
588
601
  # .word 0x4A4B0012
589
- MVMVA 1, 1, 2, 0, 0
602
+ mvmva 1, 1, 2, 0, 0
590
603
  .endm
591
604
 
592
605
  /* llirtr - 0x4A4B8012 ir * light matrix + tr vector */
593
606
  .macro llirtr
594
607
  # .word 0x4A4B8012
595
- MVMVA 1, 1, 3, 0, 0
608
+ mvmva 1, 1, 3, 0, 0
596
609
  .endm
597
610
 
598
611
  /* llv0bk - 0x4A4A2012 v0 * light matrix + bk vector */
599
612
  .macro llv0bk
600
613
  # .word 0x4A4A2012
601
- MVMVA 1, 1, 0, 1, 0
614
+ mvmva 1, 1, 0, 1, 0
602
615
  .endm
603
616
 
604
617
  /* llv1bk - 0x4A4AA012 v1 * light matrix + bk vector */
605
618
  .macro llv1bk
606
619
  # .word 0x4A4AA012
607
- MVMVA 1, 1, 1, 1, 0
620
+ mvmva 1, 1, 1, 1, 0
608
621
  .endm
609
622
 
610
623
  /* llv2bk - 0x4A4B2012 v2 * light matrix + bk vector */
611
624
  .macro llv2bk
612
625
  # .word 0x4A4B2012
613
- MVMVA 1, 1, 2, 1, 0
626
+ mvmva 1, 1, 2, 1, 0
614
627
  .endm
615
628
 
616
629
  /* llirbk - 0x4A4BA012 ir * light matrix + bk vector */
617
630
  .macro llirbk
618
631
  # .word 0x4A4BA012
619
- MVMVA 1, 1, 3, 1, 0
632
+ mvmva 1, 1, 3, 1, 0
620
633
  .endm
621
634
 
622
635
  /* lc - 0x4A4DA412 v0 * color matrix, Lower limit clamped to 0 */
623
636
  .macro lc
624
637
  # .word 0x4A4DA412
625
- MVMVA 1, 2, 3, 1, 1
638
+ mvmva 1, 2, 3, 1, 1
626
639
  .endm
627
640
 
628
641
  /* lcv0 - 0x4A4C6012 v0 * color matrix */
629
642
  .macro lcv0
630
643
  # .word 0x4A4C6012
631
- MVMVA 1, 2, 0, 3, 0
644
+ mvmva 1, 2, 0, 3, 0
632
645
  .endm
633
646
 
634
647
  /* lcv1 - 0x4A4CE012 v1 * color matrix */
635
648
  .macro lcv1
636
649
  # .word 0x4A4CE012
637
- MVMVA 1, 2, 1, 3, 0
650
+ mvmva 1, 2, 1, 3, 0
638
651
  .endm
639
652
 
640
653
  /* lcv2 - 0x4A4D6012 v2 * color matrix */
641
654
  .macro lcv2
642
655
  # .word 0x4A4D6012
643
- MVMVA 1, 2, 2, 3, 0
656
+ mvmva 1, 2, 2, 3, 0
644
657
  .endm
645
658
 
646
659
  /* lcvir - 0x4A4DE012 ir * color matrix */
647
660
  .macro lcvir
648
661
  # .word 0x4A4DE012
649
- MVMVA 1, 2, 3, 3, 0
662
+ mvmva 1, 2, 3, 3, 0
650
663
  .endm
651
664
 
652
665
  /* lcv0tr - 0x4A4C0012 v0 * color matrix + tr vector */
653
666
  .macro lcv0tr
654
667
  # .word 0x4A4C0012
655
- MVMVA 1, 2, 0, 0, 0
668
+ mvmva 1, 2, 0, 0, 0
656
669
  .endm
657
670
 
658
671
  /* lcv1tr - 0x4A4C8012 v1 * color matrix + tr vector */
659
672
  .macro lcv1tr
660
673
  # .word 0x4A4C8012
661
- MVMVA 1, 2, 1, 0, 0
674
+ mvmva 1, 2, 1, 0, 0
662
675
  .endm
663
676
 
664
677
  /* lcv2tr - 0x4A4D0012 v2 * color matrix + tr vector */
665
678
  .macro lcv2tr
666
679
  # .word 0x4A4D0012
667
- MVMVA 1, 2, 2, 0, 0
680
+ mvmva 1, 2, 2, 0, 0
668
681
  .endm
669
682
 
670
683
  /* lcirtr - 0x4A4D8012 ir * color matrix + tr vector */
671
684
  .macro lcirtr
672
685
  # .word 0x4A4D8012
673
- MVMVA 1, 2, 3, 0, 0
686
+ mvmva 1, 2, 3, 0, 0
674
687
  .endm
675
688
 
676
689
  /* lev0bk - 0x4A4C2012 v0 * color matrix + bk vector */
677
690
  .macro lev0bk
678
691
  # .word 0x4A4C2012
679
- MVMVA 1, 2, 0, 1, 0
692
+ mvmva 1, 2, 0, 1, 0
680
693
  .endm
681
694
 
682
695
  /* lev1bk - 0x4A4CA012 v1 * color matrix + bk vector */
683
696
  .macro lev1bk
684
697
  # .word 0x4A4CA012
685
- MVMVA 1, 2, 1, 1, 0
698
+ mvmva 1, 2, 1, 1, 0
686
699
  .endm
687
700
 
688
701
  /* lev2bk - 0x4A4D2012 v2 * color matrix + bk vector */
689
702
  .macro lev2bk
690
703
  # .word 0x4A4D2012
691
- MVMVA 1, 2, 2, 1, 0
704
+ mvmva 1, 2, 2, 1, 0
692
705
  .endm
693
706
 
694
707
  /* leirbk - 0x4A4DA012 ir * color matrix + bk vector */
695
708
  .macro leirbk
696
709
  # .word 0x4A4DA012
697
- MVMVA 1, 2, 3, 1, 0
710
+ mvmva 1, 2, 3, 1, 0
698
711
  .endm
699
712
 
700
713
  /* sqr12 - 0x4AA80428 square of ir 1,19,12 */
701
714
  # .macro sqr12
702
715
  # # .word 0x4AA80428
703
- # SQR 1
716
+ # sqr 1
704
717
  # .endm
705
718
 
706
- /* sqr0 - 0x4AA80428 square of ir 1,31, 0 */
719
+ /* sqr0 - 0x4AA00428 square of ir 1,31, 0 */
707
720
  # .macro sqr0
708
- # # .word 0x4AA80428
709
- # SQR 1
721
+ # # .word 0x4AA00428
722
+ # sqr 0
710
723
  # .endm
711
724
 
712
725
  /* op12 - 0x4B78000C outer product 1,19,12 */
713
726
  .macro op12
714
727
  # .word 0x4B78000C
715
- OP 1
728
+ op 1
716
729
  .endm
717
730
 
718
731
  /* op0 - 0x4B70000C outer product 1,31, 0 */
719
732
  .macro op0
720
733
  # .word 0x4B70000C
721
- OP 0
734
+ op 0
722
735
  .endm
723
736
 
724
737
  /* gpf12 - 0x4B98003D general purpose interpolation 1,19,12 */
725
738
  .macro gpf12
726
739
  # .word 0x4B98003D
727
- GPF 1
740
+ gpf 1
728
741
  .endm
729
742
 
730
743
  /* gpf0 - 0x4B90003D general purpose interpolation 1,31, 0 */
731
744
  .macro gpf0
732
745
  # .word 0x4B90003D
733
- GPF 0
746
+ gpf 0
734
747
  .endm
735
748
 
736
749
  /* gpl12 - 0x4BA8003E general purpose interpolation 1,19,12 */
737
750
  .macro gpl12
738
751
  # .word 0x4BA8003E
739
- GPL 1
752
+ gpl 1
740
753
  .endm
741
754
 
742
755
  /* gpl0 - 0x4BA0003E general purpose interpolation 1,31, 0 */
743
756
  .macro gpl0
744
757
  # .word 0x4BA0003E
745
- GPL 0
758
+ gpl 0
746
759
  .endm
760
+
761
+ .endif
747
762
  """
748
763
 
749
764
  _write("include/gte_macros.inc", gte_macros)
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
File without changes