romdevtools 0.29.0 → 0.40.0

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 (103) hide show
  1. package/AGENTS.md +14 -5
  2. package/CHANGELOG.md +114 -12
  3. package/README.md +2 -1
  4. package/examples/gb/templates/tile_engine.c +1 -1
  5. package/examples/gbc/templates/tile_engine.c +1 -1
  6. package/examples/genesis/templates/two_plane_parallax.c +4 -4
  7. package/examples/nes/templates/tile_engine.c +1 -1
  8. package/package.json +14 -12
  9. package/src/analysis/analyze.js +263 -0
  10. package/src/analysis/decompile.js +108 -0
  11. package/src/analysis/decompiler/sleigh/6502.cspec +34 -0
  12. package/src/analysis/decompiler/sleigh/6502.ldefs +33 -0
  13. package/src/analysis/decompiler/sleigh/6502.pspec +16 -0
  14. package/src/analysis/decompiler/sleigh/6502.sla +3414 -0
  15. package/src/analysis/decompiler/sleigh/65816-snes.pspec +249 -0
  16. package/src/analysis/decompiler/sleigh/65816.cspec +17 -0
  17. package/src/analysis/decompiler/sleigh/65816.ldefs +15 -0
  18. package/src/analysis/decompiler/sleigh/65816.sla +23670 -0
  19. package/src/analysis/decompiler/sleigh/65c02.sla +4683 -0
  20. package/src/analysis/decompiler/sleigh/68000.cspec +67 -0
  21. package/src/analysis/decompiler/sleigh/68000.ldefs +68 -0
  22. package/src/analysis/decompiler/sleigh/68000.pspec +9 -0
  23. package/src/analysis/decompiler/sleigh/68000_register.cspec +118 -0
  24. package/src/analysis/decompiler/sleigh/68040.sla +81693 -0
  25. package/src/analysis/decompiler/sleigh/ARM.ldefs +377 -0
  26. package/src/analysis/decompiler/sleigh/ARM4t_le.sla +53758 -0
  27. package/src/analysis/decompiler/sleigh/ARM_v45.cspec +209 -0
  28. package/src/analysis/decompiler/sleigh/ARM_v45.pspec +40 -0
  29. package/src/analysis/decompiler/sleigh/ARMt_v45.pspec +43 -0
  30. package/src/analysis/decompiler/sleigh/HuC6280.cspec +67 -0
  31. package/src/analysis/decompiler/sleigh/HuC6280.ldefs +18 -0
  32. package/src/analysis/decompiler/sleigh/HuC6280.pspec +150 -0
  33. package/src/analysis/decompiler/sleigh/HuC6280.sla +7524 -0
  34. package/src/analysis/decompiler/sleigh/sm83.cspec +70 -0
  35. package/src/analysis/decompiler/sleigh/sm83.ldefs +29 -0
  36. package/src/analysis/decompiler/sleigh/sm83.pspec +19 -0
  37. package/src/analysis/decompiler/sleigh/sm83.sla +7695 -0
  38. package/src/analysis/decompiler/sleigh/z80.cspec +122 -0
  39. package/src/analysis/decompiler/sleigh/z80.ldefs +57 -0
  40. package/src/analysis/decompiler/sleigh/z80.pspec +43 -0
  41. package/src/analysis/decompiler/sleigh/z80.sla +20518 -0
  42. package/src/analysis/decompiler/wasm/decompile.js +2 -0
  43. package/src/analysis/decompiler/wasm/decompile.wasm +0 -0
  44. package/src/analysis/rizin.js +129 -0
  45. package/src/analysis/wasm/rizin.js +6032 -0
  46. package/src/analysis/wasm/rizin.wasm +0 -0
  47. package/src/cores/wasm/bluemsx_libretro.js +1 -1
  48. package/src/cores/wasm/bluemsx_libretro.wasm +0 -0
  49. package/src/cores/wasm/fceumm_libretro.js +1 -1
  50. package/src/cores/wasm/fceumm_libretro.wasm +0 -0
  51. package/src/cores/wasm/gambatte_libretro.js +1 -1
  52. package/src/cores/wasm/gambatte_libretro.wasm +0 -0
  53. package/src/cores/wasm/geargrafx_libretro.js +1 -1
  54. package/src/cores/wasm/geargrafx_libretro.wasm +0 -0
  55. package/src/cores/wasm/genesis_plus_gx_libretro.js +1 -1
  56. package/src/cores/wasm/genesis_plus_gx_libretro.wasm +0 -0
  57. package/src/cores/wasm/handy_libretro.js +1 -1
  58. package/src/cores/wasm/handy_libretro.wasm +0 -0
  59. package/src/cores/wasm/mgba_libretro.js +1 -1
  60. package/src/cores/wasm/mgba_libretro.wasm +0 -0
  61. package/src/cores/wasm/prosystem_libretro.js +1 -1
  62. package/src/cores/wasm/prosystem_libretro.wasm +0 -0
  63. package/src/cores/wasm/snes9x_libretro.js +1 -1
  64. package/src/cores/wasm/snes9x_libretro.wasm +0 -0
  65. package/src/cores/wasm/stella2014_libretro.js +1 -1
  66. package/src/cores/wasm/stella2014_libretro.wasm +0 -0
  67. package/src/cores/wasm/vice_x64_libretro.js +1 -1
  68. package/src/cores/wasm/vice_x64_libretro.wasm +0 -0
  69. package/src/host/LibretroHost.js +25 -7
  70. package/src/http/routes.js +1 -1
  71. package/src/http/skill-doc.js +1 -1
  72. package/src/mcp/tools/cart-parts.js +5 -2
  73. package/src/mcp/tools/disasm.js +32 -5
  74. package/src/mcp/tools/font-map.js +3 -3
  75. package/src/mcp/tools/index.js +2 -2
  76. package/src/mcp/tools/memory.js +131 -24
  77. package/src/mcp/tools/project.js +1 -1
  78. package/src/mcp/tools/record.js +6 -7
  79. package/src/mcp/tools/reinject.js +1 -1
  80. package/src/mcp/tools/run-until.js +8 -2
  81. package/src/mcp/tools/symbols.js +10 -4
  82. package/src/mcp/tools/trace-vram-source.js +1 -1
  83. package/src/mcp/tools/watch-memory.js +50 -8
  84. package/src/platforms/_guides/ROMHACKING_PLAYBOOK.md +80 -6
  85. package/src/platforms/atari2600/MENTAL_MODEL.md +6 -0
  86. package/src/platforms/atari7800/MENTAL_MODEL.md +6 -0
  87. package/src/platforms/c64/MENTAL_MODEL.md +6 -0
  88. package/src/platforms/gb/MENTAL_MODEL.md +6 -0
  89. package/src/platforms/gb/lib/c/README.md +1 -1
  90. package/src/platforms/gba/MENTAL_MODEL.md +7 -1
  91. package/src/platforms/gbc/MENTAL_MODEL.md +6 -0
  92. package/src/platforms/gbc/lib/c/README.md +1 -1
  93. package/src/platforms/genesis/MENTAL_MODEL.md +8 -2
  94. package/src/platforms/genesis/TROUBLESHOOTING.md +2 -2
  95. package/src/platforms/genesis/lib/wram.s +1 -1
  96. package/src/platforms/gg/MENTAL_MODEL.md +6 -0
  97. package/src/platforms/lynx/MENTAL_MODEL.md +6 -0
  98. package/src/platforms/msx/MENTAL_MODEL.md +6 -0
  99. package/src/platforms/nes/MENTAL_MODEL.md +6 -0
  100. package/src/platforms/pce/MENTAL_MODEL.md +6 -0
  101. package/src/platforms/sms/MENTAL_MODEL.md +6 -0
  102. package/src/platforms/snes/MENTAL_MODEL.md +10 -4
  103. package/src/toolchains/_worker/wasm-worker.js +5 -0
@@ -0,0 +1,70 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ Copyright 2019-2020 Joonas Javanainen <joonas.javanainen@gmail.com>
4
+
5
+ Licensed under the Apache License, Version 2.0 (the "License");
6
+ you may not use this file except in compliance with the License.
7
+ You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
16
+ -->
17
+ <compiler_spec>
18
+ <data_organization>
19
+ <machine_alignment value="1"/>
20
+ <default_alignment value="1"/>
21
+ <default_pointer_alignment value="1"/>
22
+ <pointer_size value="2"/>
23
+ <integer_size value="2"/>
24
+ </data_organization>
25
+ <global>
26
+ <range space="ram"/>
27
+ </global>
28
+ <stackpointer register="SP" space="ram" growth="negative"/>
29
+ <returnaddress>
30
+ <varnode space="stack" offset="0" size="2"/>
31
+ </returnaddress>
32
+ <default_proto>
33
+ <prototype name="__asm" extrapop="2" stackshift="2" strategy="register">
34
+ <input>
35
+ <pentry minsize="1" maxsize="1">
36
+ <register name="A"/>
37
+ </pentry>
38
+ <pentry minsize="1" maxsize="2">
39
+ <register name="HL"/>
40
+ </pentry>
41
+ <pentry minsize="1" maxsize="2">
42
+ <register name="BC"/>
43
+ </pentry>
44
+ <pentry minsize="1" maxsize="2">
45
+ <register name="DE"/>
46
+ </pentry>
47
+ <pentry minsize="1" maxsize="500" align="1">
48
+ <addr offset="2" space="stack"/>
49
+ </pentry>
50
+ </input>
51
+ <output>
52
+ <pentry minsize="1" maxsize="1">
53
+ <register name="A"/>
54
+ </pentry>
55
+ <pentry minsize="1" maxsize="2">
56
+ <register name="HL"/>
57
+ </pentry>
58
+ <pentry minsize="1" maxsize="2">
59
+ <register name="BC"/>
60
+ </pentry>
61
+ <pentry minsize="1" maxsize="2">
62
+ <register name="DE"/>
63
+ </pentry>
64
+ </output>
65
+ <unaffected>
66
+ <register name="SP"/>
67
+ </unaffected>
68
+ </prototype>
69
+ </default_proto>
70
+ </compiler_spec>
@@ -0,0 +1,29 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ Copyright 2019-2020 Joonas Javanainen <joonas.javanainen@gmail.com>
4
+
5
+ Licensed under the Apache License, Version 2.0 (the "License");
6
+ you may not use this file except in compliance with the License.
7
+ You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
16
+ -->
17
+ <language_definitions>
18
+ <language processor="SM83"
19
+ endian="little"
20
+ size="16"
21
+ variant="default"
22
+ version="1.0"
23
+ slafile="sm83.sla"
24
+ processorspec="sm83.pspec"
25
+ id="SM83:LE:16:default">
26
+ <description>Sharp SM83</description>
27
+ <compiler name="default" spec="sm83.cspec" id="default"/>
28
+ </language>
29
+ </language_definitions>
@@ -0,0 +1,19 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ Copyright 2019-2020 Joonas Javanainen <joonas.javanainen@gmail.com>
4
+
5
+ Licensed under the Apache License, Version 2.0 (the "License");
6
+ you may not use this file except in compliance with the License.
7
+ You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
16
+ -->
17
+ <processor_spec>
18
+ <programcounter register="PC"/>
19
+ </processor_spec>