@henols/c64-re-tools 2.1.8 → 2.2.0-rc.2
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.
- package/README.md +29 -41
- package/package.json +1 -1
- package/skills/c64-assembler/SKILL.md +5 -2
- package/skills/c64-assembler/scripts/assembler.ts +24 -12
- package/skills/c64-development/SKILL.md +179 -0
- package/skills/c64-docs/references/page-types.md +1 -1
- package/skills/c64-knowledge/SKILL.md +66 -13
- package/skills/c64-knowledge/scripts/knowledge.ts +165 -18
- package/skills/c64-provenance/SKILL.md +11 -3
- package/skills/c64-reverse-engineering/SKILL.md +30 -13
- package/skills/c64-source/SKILL.md +33 -13
- package/skills/c64-source/scripts/lib/loader.ts +3 -1
- package/skills/c64-source/scripts/lib/source.ts +151 -37
- package/skills/c64-source/scripts/source.ts +135 -45
- package/skills/c64-testing/SKILL.md +5 -3
- package/skills/c64-testing/references/scenario-format.md +34 -2
- package/skills/c64-testing/scripts/lib/runs.ts +122 -12
- package/skills/c64-testing/scripts/testing.ts +1 -1
- package/skills/c64-unpacker/SKILL.md +4 -1
- package/src/cli/main.ts +7 -7
- package/src/knowledge/conflicts.ts +32 -8
- package/src/knowledge/history.ts +18 -0
- package/src/knowledge/read.ts +98 -4
- package/src/knowledge/schema.ts +43 -2
- package/src/knowledge/text.ts +22 -0
- package/src/knowledge/write.ts +248 -25
- package/src/native/c64run.ts +1 -1
- package/src/native/discover.ts +5 -5
- package/src/native/ghidra/index.ts +5 -9
- package/src/native/status.ts +1 -1
- package/tools/install-chips.sh +10 -19
- package/tools/install-dxa.sh +9 -51
- package/tools/install-ghidra.sh +6 -6
package/tools/install-dxa.sh
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
set -Eeuo pipefail
|
|
4
4
|
|
|
5
5
|
# ------------------------------------------------------------
|
|
6
|
-
# dxa installer
|
|
6
|
+
# dxa installer. install-container.sh runs it as root, with build-essential
|
|
7
|
+
# and curl.
|
|
7
8
|
#
|
|
8
9
|
# Installs:
|
|
9
10
|
# /usr/local/bin/dxa
|
|
@@ -59,39 +60,10 @@ trap cleanup EXIT
|
|
|
59
60
|
|
|
60
61
|
|
|
61
62
|
# ------------------------------------------------------------
|
|
62
|
-
# Check
|
|
63
|
+
# Check user
|
|
63
64
|
# ------------------------------------------------------------
|
|
64
65
|
|
|
65
|
-
|
|
66
|
-
error "This script is intended for Debian/Ubuntu-style Linux systems."
|
|
67
|
-
fi
|
|
68
|
-
|
|
69
|
-
# shellcheck disable=SC1091
|
|
70
|
-
source /etc/os-release
|
|
71
|
-
|
|
72
|
-
case "${ID:-}" in
|
|
73
|
-
debian|ubuntu)
|
|
74
|
-
;;
|
|
75
|
-
*)
|
|
76
|
-
if [[ "${ID_LIKE:-}" != *debian* ]]; then
|
|
77
|
-
error "Unsupported distribution: ${ID:-unknown}. This script expects Debian or Ubuntu."
|
|
78
|
-
fi
|
|
79
|
-
;;
|
|
80
|
-
esac
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
# ------------------------------------------------------------
|
|
84
|
-
# Determine sudo command
|
|
85
|
-
# ------------------------------------------------------------
|
|
86
|
-
|
|
87
|
-
if [[ "$(id -u)" -eq 0 ]]; then
|
|
88
|
-
SUDO=""
|
|
89
|
-
else
|
|
90
|
-
command -v sudo >/dev/null 2>&1 ||
|
|
91
|
-
error "sudo is required when the script is not run as root."
|
|
92
|
-
|
|
93
|
-
SUDO="sudo"
|
|
94
|
-
fi
|
|
66
|
+
[[ "$(id -u)" -eq 0 ]] || error "Run as root."
|
|
95
67
|
|
|
96
68
|
|
|
97
69
|
# ------------------------------------------------------------
|
|
@@ -112,20 +84,6 @@ It will NOT install xa or xa65.
|
|
|
112
84
|
EOF
|
|
113
85
|
|
|
114
86
|
|
|
115
|
-
# ------------------------------------------------------------
|
|
116
|
-
# Install build requirements
|
|
117
|
-
# ------------------------------------------------------------
|
|
118
|
-
|
|
119
|
-
info "Installing build requirements"
|
|
120
|
-
|
|
121
|
-
${SUDO} apt-get update
|
|
122
|
-
|
|
123
|
-
${SUDO} apt-get install -y --no-install-recommends \
|
|
124
|
-
build-essential \
|
|
125
|
-
ca-certificates \
|
|
126
|
-
curl
|
|
127
|
-
|
|
128
|
-
|
|
129
87
|
# ------------------------------------------------------------
|
|
130
88
|
# Create temporary build directory
|
|
131
89
|
# ------------------------------------------------------------
|
|
@@ -260,9 +218,9 @@ echo "Compiled dxa binary runs."
|
|
|
260
218
|
|
|
261
219
|
info "Installing dxa"
|
|
262
220
|
|
|
263
|
-
|
|
221
|
+
install -d -m 0755 "${BIN_DIR}"
|
|
264
222
|
|
|
265
|
-
|
|
223
|
+
install \
|
|
266
224
|
-m 0755 \
|
|
267
225
|
"${DXA_BINARY}" \
|
|
268
226
|
"${BIN_DIR}/dxa"
|
|
@@ -284,15 +242,15 @@ if [[ -n "${DXA_MANPAGE}" ]]; then
|
|
|
284
242
|
|
|
285
243
|
info "Installing dxa manual page"
|
|
286
244
|
|
|
287
|
-
|
|
245
|
+
install -d -m 0755 "${MAN_DIR}"
|
|
288
246
|
|
|
289
|
-
|
|
247
|
+
install \
|
|
290
248
|
-m 0644 \
|
|
291
249
|
"${DXA_MANPAGE}" \
|
|
292
250
|
"${MAN_DIR}/dxa.1"
|
|
293
251
|
|
|
294
252
|
if command -v mandb >/dev/null 2>&1; then
|
|
295
|
-
|
|
253
|
+
mandb -q || true
|
|
296
254
|
fi
|
|
297
255
|
else
|
|
298
256
|
echo
|
package/tools/install-ghidra.sh
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Installs Ghidra in
|
|
3
|
-
#
|
|
4
|
-
#
|
|
5
|
-
#
|
|
2
|
+
# Installs Ghidra in /opt/ghidra_<version>_PUBLIC and points /opt/ghidra at
|
|
3
|
+
# it, so that C64RT_GHIDRA=/opt/ghidra stays the same when the version
|
|
4
|
+
# changes. Removes the Ghidra versions that it installed before. Ghidra needs
|
|
5
|
+
# Java 21. install-container.sh runs it as root.
|
|
6
6
|
|
|
7
7
|
set -Eeuo pipefail
|
|
8
8
|
|
|
@@ -10,7 +10,7 @@ GHIDRA_VERSION="12.1.3"
|
|
|
10
10
|
GHIDRA_ZIP="ghidra_${GHIDRA_VERSION}_PUBLIC_20260817.zip"
|
|
11
11
|
GHIDRA_URL="https://github.com/NationalSecurityAgency/ghidra/releases/download/Ghidra_${GHIDRA_VERSION}_build/${GHIDRA_ZIP}"
|
|
12
12
|
GHIDRA_SHA256="93a5d11a9ad510622acaaf908c556a7b9b764d338e78a7567f3689bf5081fd54"
|
|
13
|
-
DEST="
|
|
13
|
+
DEST="/opt"
|
|
14
14
|
GHIDRA_DIR="${DEST}/ghidra_${GHIDRA_VERSION}_PUBLIC"
|
|
15
15
|
|
|
16
16
|
fail() {
|
|
@@ -18,7 +18,7 @@ fail() {
|
|
|
18
18
|
exit 1
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
[[ "$(id -u)" -eq 0
|
|
21
|
+
[[ "$(id -u)" -eq 0 ]] || fail "run as root."
|
|
22
22
|
|
|
23
23
|
if [[ ! -d "${GHIDRA_DIR}" ]]; then
|
|
24
24
|
BUILD_DIR="$(mktemp -d -t ghidra-XXXXXXXX)"
|