-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcli_commands.txt
More file actions
102 lines (72 loc) · 5.08 KB
/
cli_commands.txt
File metadata and controls
102 lines (72 loc) · 5.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
########################################
########### HexString CLI ##############
########################################
General Synopsis:
For extraction:
console.exe extract --rom <romFile> --file <outputFile> --tbl <tblFile> --p <pointersFormat> --pointers-offset <pointersStartOffset> --pointers-size <tablePointersSize> --base <base> --end-line <end_lines> [Advanced Options]
For insert:
console.exe insert --rom <romFile> --file <inputFile> --tbl <tblFile> --p <pointersFormat> --text-offset <textStartOffset> --text-size <textSize> --pointers-offset <pointersStartOffset> --base <base> [Advanced Options]
##############################################################################################################################################################
General Commands:
##############################################################################################################################################################
extract ;Extract script from ROM
insert ;Insert script into ROM
extractconfig <path> ;Extract script with .json config from GUI
insertconfig <path> ;Insert script with .json config from GUI
-v ;Show build version.
--rom <path> ;Path to the ROM file.")
--out <path> ;Input/Output file")
--tbl <path> ;Path to the tbl file.")
--p <format> ;Pointers format <2b|2bb|3b|3bb|4b|4bb>
2b 2 bytes little endian
2bb 2 bytes big endian
3b 3 bytes little endian
3bb 3 bytes big endian
4b 4 bytes little endian
4bb 4 bytes big endian
--base <base> ;Base address.
for extraction:
--pointers-offset <hex_value> ;Start offset of the pointer table
--pointers-size <hex_value> ;Size of the pointer table
--end-line <end_line> ;End line, can be multiple separate with "," (only for extract)(Not use prefix "0x")
for insertion:
--pointers-offset <hex_value> ;Start offset of the pointer table
--text-offset <hex_value> ;Text start offset (only for insert)
--text-size <hex_value> ;Text size (only for insert)
##############################################################################################################################################################
Advanced Options:
##############################################################################################################################################################
If you want to add advanced options, always do it at the end.
--no-comments Disables comments (optional)
--use-custom-brackets <0|1|2|3> Choose a number for custom brackets (optional, Default: 0)
0 ~hex~
1 [hex]
2 {hex}
3 <hex>
--fill <hex_value> Fill value in hex (optional, Default: 0xFF)
--use-split-pointers <lsb> <msb> <size> Three hexadecimal numbers for split pointers(optional)
--no-use-end-lines <text-end-offset> Do not use end lines. (Need text end offset) (optional)
NOTE: Some advanced options may cause general-purpose instructions to be omitted, for example, if --use-split-pointers is used.
It is possible to ignore --p <format>, in the same way, if no-use-end-lines, you can ignore --pointers-offset
and --pointers-size <hex_value>(Watch examples).
########################################################################################################################################################
Warning:
########################################################################################################################################################
The GUI always uses the absolute path, while the CLI uses the relative path. If you want to create scripts for quick extraction or insertion with the
extractconfig/insertconfig commands, you may need to edit the path in .json config if you want to share it as a project.
########################################################################################################################################################
Examples:
########################################################################################################################################################
NOTE: I WILL OMIT THE NAME OF THE ROM, TBL, INPUT AND OUTPUT FILE BECAUSE IT IS UNNECESSARY
GAME: Star Fox 2 (USA).sfc
CR32: 87653732
For extract:
console.exe extract --rom <romName> --file <outputFile> --tbl <tblFile> --p 2b --pointers-offset 0x2EB3 --pointers-size 0x1ae --base -8000 --end-line 00 --no-use-end-lines 2EB2
For insert:
console.exe insert --rom <romName> --file <outputFile> --tbl <tblFile> --p 2b --text-offset 0x1168 --text-size 0x1d4b --pointers-offset 0x2EB3 --base -8000 --no-use-end-lines 2EB2
GAME: Chip 'n Dale Rescue Rangers (USA).nes
CR32: 8BF29CB6
For extract:
console.exe extract --rom <romName> --base 0x10 --end-line FF --file <outputFile> --tbl <tblFile> --use-split-pointers 9546 955A 14
For insert:
console.exe insert --file <inputFile> --text-offset <textStartOffset> --text-size <textSize> --base 0x10 --rom <romName> --tbl <tblFile> --use-split-pointers 9546 955A 14