rk86 2.0.21 → 2.0.23
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/package.json +1 -1
- package/rk86.js +162 -6
package/package.json
CHANGED
package/rk86.js
CHANGED
|
@@ -1263,12 +1263,12 @@ var init_catalog_data = __esm(() => {
|
|
|
1263
1263
|
leadingE6: true
|
|
1264
1264
|
},
|
|
1265
1265
|
{
|
|
1266
|
-
name: "MESHANINA.
|
|
1266
|
+
name: "MESHANINA.RK",
|
|
1267
1267
|
title: "\u0418\u0433\u0440\u0430 \xAB\u041C\u0435\u0448\u0430\u043D\u0438\u043D\u0430\xBB, \u0432\u0435\u0440\u0441\u0438\u044F 1.1",
|
|
1268
1268
|
description: `\u041B\u042D\u041C\u0417, 1989. \u041F\u0435\u0440\u0435\u0440\u0430\u0431\u043E\u0442\u043A\u0430 \u0430\u043D\u0433\u043B\u0438\u0439\u0441\u043A\u043E\u0433\u043E \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u0430.
|
|
1269
1269
|
\u0418\u0433\u0440\u0430 \u043D\u0430 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435 \u0438\u043D\u0442\u0443\u0438\u0446\u0438\u0438 \u0438 \u043D\u0430\u0432\u044B\u043A\u043E\u0432 \u0440\u0430\u0431\u043E\u0442\u044B \u0441 \u043A\u043B\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u043E\u0439: \u043A\u043E\u043C\u043F\u044C\u044E\u0442\u0435\u0440 \u0432\u044B\u0431\u0438\u0440\u0430\u0435\u0442 \u0441\u043B\u043E\u0432\u043E \u0438\u0437 3\u20147 \u0431\u0443\u043A\u0432 \u0438 \u043F\u0440\u043E\u0438\u0437\u0432\u043E\u043B\u044C\u043D\u043E \u043F\u0435\u0440\u0435\u0441\u0442\u0430\u0432\u043B\u044F\u0435\u0442 \u0432 \u043D\u0451\u043C \u0431\u0443\u043A\u0432\u044B \u2014 \u043D\u0443\u0436\u043D\u043E \u0443\u0433\u0430\u0434\u0430\u0442\u044C.`,
|
|
1270
1270
|
screenshots: [
|
|
1271
|
-
"MESHANINA.
|
|
1271
|
+
"MESHANINA.RK-1.png"
|
|
1272
1272
|
],
|
|
1273
1273
|
start: 256,
|
|
1274
1274
|
end: 3344,
|
|
@@ -2884,6 +2884,20 @@ var init_catalog_data = __esm(() => {
|
|
|
2884
2884
|
checkSum: 44381,
|
|
2885
2885
|
leadingE6: false
|
|
2886
2886
|
},
|
|
2887
|
+
{
|
|
2888
|
+
name: "cpudetect.rk",
|
|
2889
|
+
title: "\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u0442\u0438\u043F\u0430 \u043F\u0440\u043E\u0446\u0435\u0441\u0441\u043E\u0440\u0430 (8080/Z80)",
|
|
2890
|
+
description: "",
|
|
2891
|
+
screenshots: [
|
|
2892
|
+
"cpudetect.rk-1.png"
|
|
2893
|
+
],
|
|
2894
|
+
start: 0,
|
|
2895
|
+
end: 75,
|
|
2896
|
+
size: 76,
|
|
2897
|
+
entry: 0,
|
|
2898
|
+
checkSum: 41813,
|
|
2899
|
+
leadingE6: false
|
|
2900
|
+
},
|
|
2887
2901
|
{
|
|
2888
2902
|
name: "cputest.bin",
|
|
2889
2903
|
title: "\u0422\u0435\u0441\u0442 CPU TEST DIAGNOSTICS II V1.2",
|
|
@@ -2896,6 +2910,20 @@ var init_catalog_data = __esm(() => {
|
|
|
2896
2910
|
checkSum: 65444,
|
|
2897
2911
|
leadingE6: false
|
|
2898
2912
|
},
|
|
2913
|
+
{
|
|
2914
|
+
name: "dizzy75.rkr",
|
|
2915
|
+
title: "\u0418\u0433\u0440\u0430 Dizzy",
|
|
2916
|
+
description: "",
|
|
2917
|
+
screenshots: [
|
|
2918
|
+
"dizzy75.rkr-1.png"
|
|
2919
|
+
],
|
|
2920
|
+
start: 0,
|
|
2921
|
+
end: 30207,
|
|
2922
|
+
size: 30208,
|
|
2923
|
+
entry: 0,
|
|
2924
|
+
checkSum: 21118,
|
|
2925
|
+
leadingE6: false
|
|
2926
|
+
},
|
|
2899
2927
|
{
|
|
2900
2928
|
name: "mars3-lpe.rkr",
|
|
2901
2929
|
title: "\u0418\u0433\u0440\u0430 \u041C\u0430\u0440\u0441",
|
|
@@ -2965,6 +2993,20 @@ var init_catalog_data = __esm(() => {
|
|
|
2965
2993
|
checkSum: 48506,
|
|
2966
2994
|
leadingE6: false
|
|
2967
2995
|
},
|
|
2996
|
+
{
|
|
2997
|
+
name: "monkey.rk",
|
|
2998
|
+
title: "\u041A\u0430\u0440\u0442\u0438\u043D\u043A\u0430 \xAB\u041E\u0431\u0435\u0437\u044C\u044F\u043D\u043A\u0430\xBB",
|
|
2999
|
+
description: "",
|
|
3000
|
+
screenshots: [
|
|
3001
|
+
"monkey.rk-1.png"
|
|
3002
|
+
],
|
|
3003
|
+
start: 0,
|
|
3004
|
+
end: 1334,
|
|
3005
|
+
size: 1335,
|
|
3006
|
+
entry: 0,
|
|
3007
|
+
checkSum: 55511,
|
|
3008
|
+
leadingE6: false
|
|
3009
|
+
},
|
|
2968
3010
|
{
|
|
2969
3011
|
name: "okoshki-demo.rkr",
|
|
2970
3012
|
title: "\u0414\u0435\u043C\u043E\u043D\u0441\u0442\u0440\u0430\u0446\u0438\u044F \u0434\u043B\u044F \u041C\u043E\u043D\u0438\u0442\u043E\u0440\u0430 \xABmon_okoshki.bin\xBB",
|
|
@@ -2995,6 +3037,20 @@ var init_catalog_data = __esm(() => {
|
|
|
2995
3037
|
checkSum: 6845,
|
|
2996
3038
|
leadingE6: false
|
|
2997
3039
|
},
|
|
3040
|
+
{
|
|
3041
|
+
name: "radio-86.rk",
|
|
3042
|
+
title: "\u0417\u0430\u0441\u0442\u0430\u0432\u043A\u0430 \xAB\u0420\u0430\u0434\u0438\u043E-86\u0420\u041A\xBB",
|
|
3043
|
+
description: "",
|
|
3044
|
+
screenshots: [
|
|
3045
|
+
"radio-86.rk-1.png"
|
|
3046
|
+
],
|
|
3047
|
+
start: 0,
|
|
3048
|
+
end: 547,
|
|
3049
|
+
size: 548,
|
|
3050
|
+
entry: 0,
|
|
3051
|
+
checkSum: 16294,
|
|
3052
|
+
leadingE6: false
|
|
3053
|
+
},
|
|
2998
3054
|
{
|
|
2999
3055
|
name: "rk8080pre.bin",
|
|
3000
3056
|
title: '\u0422\u0435\u0441\u0442 "8080 Preliminary tests" \u043E\u0442 Ian Bartholomew',
|
|
@@ -3086,6 +3142,37 @@ var init_catalog_data = __esm(() => {
|
|
|
3086
3142
|
checkSum: 26258,
|
|
3087
3143
|
leadingE6: false
|
|
3088
3144
|
},
|
|
3145
|
+
{
|
|
3146
|
+
name: "squash.rkr",
|
|
3147
|
+
title: "\u0418\u0433\u0440\u0430 Squash (\u0441\u043A\u0432\u043E\u0448)",
|
|
3148
|
+
description: "\u0410\u0432\u0442\u043E\u0440: \u0414\u043C\u0438\u0442\u0440\u0438\u0439 \u0418\u0432\u0430\u043D\u043E\u0432, 2024.",
|
|
3149
|
+
screenshots: [
|
|
3150
|
+
"squash.rkr-1.png",
|
|
3151
|
+
"squash.rkr-2.png"
|
|
3152
|
+
],
|
|
3153
|
+
start: 0,
|
|
3154
|
+
end: 7906,
|
|
3155
|
+
size: 7907,
|
|
3156
|
+
entry: 0,
|
|
3157
|
+
checkSum: 12710,
|
|
3158
|
+
leadingE6: false
|
|
3159
|
+
},
|
|
3160
|
+
{
|
|
3161
|
+
name: "trex.rk",
|
|
3162
|
+
title: "\u0418\u0433\u0440\u0430 T-Rex (\u0422\u0438\u0440\u0430\u043D\u043D\u043E\u0437\u0430\u0432\u0440)",
|
|
3163
|
+
description: "",
|
|
3164
|
+
screenshots: [
|
|
3165
|
+
"trex.rk-1.png",
|
|
3166
|
+
"trex.rk-2.png",
|
|
3167
|
+
"trex.rk-3.png"
|
|
3168
|
+
],
|
|
3169
|
+
start: 0,
|
|
3170
|
+
end: 13511,
|
|
3171
|
+
size: 13512,
|
|
3172
|
+
entry: 0,
|
|
3173
|
+
checkSum: 58261,
|
|
3174
|
+
leadingE6: false
|
|
3175
|
+
},
|
|
3089
3176
|
{
|
|
3090
3177
|
name: "viewport.rkr",
|
|
3091
3178
|
title: "\u0414\u0435\u043C\u043E\u043D\u0441\u0442\u0440\u0430\u0446\u0438\u044F \u0434\u043B\u044F \u041C\u043E\u043D\u0438\u0442\u043E\u0440\u0430 \xABmon_okoshki.bin\xBB",
|
|
@@ -3107,6 +3194,20 @@ var init_catalog_data = __esm(() => {
|
|
|
3107
3194
|
entry: 0,
|
|
3108
3195
|
checkSum: 56892,
|
|
3109
3196
|
leadingE6: false
|
|
3197
|
+
},
|
|
3198
|
+
{
|
|
3199
|
+
name: "weird.rkr",
|
|
3200
|
+
title: "\u041F\u0440\u0435\u0434\u0441\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u0438\u0446\u0430 \u2014 \u0433\u0430\u0434\u0430\u043B\u043A\u0430 \u0441 \u043F\u0440\u0435\u0434\u0441\u043A\u0430\u0437\u0430\u043D\u0438\u044F\u043C\u0438.",
|
|
3201
|
+
description: "",
|
|
3202
|
+
screenshots: [
|
|
3203
|
+
"weird.rkr-1.png"
|
|
3204
|
+
],
|
|
3205
|
+
start: 0,
|
|
3206
|
+
end: 10677,
|
|
3207
|
+
size: 10678,
|
|
3208
|
+
entry: 0,
|
|
3209
|
+
checkSum: 16541,
|
|
3210
|
+
leadingE6: false
|
|
3110
3211
|
}
|
|
3111
3212
|
];
|
|
3112
3213
|
});
|
|
@@ -3982,7 +4083,7 @@ import { basename } from "path";
|
|
|
3982
4083
|
// packages/rk86/package.json
|
|
3983
4084
|
var package_default = {
|
|
3984
4085
|
name: "rk86",
|
|
3985
|
-
version: "2.0.
|
|
4086
|
+
version: "2.0.22",
|
|
3986
4087
|
description: "\u042D\u043C\u0443\u043B\u044F\u0442\u043E\u0440 \u0420\u0430\u0434\u0438\u043E-86\u0420\u041A (Intel 8080) \u0434\u043B\u044F \u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B\u0430",
|
|
3987
4088
|
bin: {
|
|
3988
4089
|
rk86: "rk86.js"
|
|
@@ -5104,6 +5205,7 @@ class Memory {
|
|
|
5104
5205
|
video_screen_size_x_buf = 0;
|
|
5105
5206
|
video_screen_size_y_buf = 0;
|
|
5106
5207
|
ik57_e008_80_cmd = 0;
|
|
5208
|
+
ik57_ff = 0;
|
|
5107
5209
|
vg75_c001_80_cmd = 0;
|
|
5108
5210
|
cursor_x_buf = 0;
|
|
5109
5211
|
cursor_y_buf = 0;
|
|
@@ -5130,6 +5232,7 @@ class Memory {
|
|
|
5130
5232
|
this.video_screen_size_x_buf = 0;
|
|
5131
5233
|
this.video_screen_size_y_buf = 0;
|
|
5132
5234
|
this.ik57_e008_80_cmd = 0;
|
|
5235
|
+
this.ik57_ff = 0;
|
|
5133
5236
|
this.vg75_c001_80_cmd = 0;
|
|
5134
5237
|
this.cursor_x_buf = 0;
|
|
5135
5238
|
this.cursor_y_buf = 0;
|
|
@@ -5162,6 +5265,7 @@ class Memory {
|
|
|
5162
5265
|
cursor_y_buf: this.cursor_y_buf,
|
|
5163
5266
|
vg75_c001_60_cmd: this.vg75_c001_60_cmd,
|
|
5164
5267
|
ik57_e008_80_cmd: this.ik57_e008_80_cmd,
|
|
5268
|
+
ik57_ff: this.ik57_ff,
|
|
5165
5269
|
tape_8002_as_output: this.tape_8002_as_output,
|
|
5166
5270
|
video_memory_base_buf: h16(this.video_memory_base_buf),
|
|
5167
5271
|
video_memory_size_buf: h16(this.video_memory_size_buf),
|
|
@@ -5186,6 +5290,7 @@ class Memory {
|
|
|
5186
5290
|
this.cursor_y_buf = snapshot.cursor_y_buf;
|
|
5187
5291
|
this.vg75_c001_60_cmd = snapshot.vg75_c001_60_cmd;
|
|
5188
5292
|
this.ik57_e008_80_cmd = snapshot.ik57_e008_80_cmd;
|
|
5293
|
+
this.ik57_ff = snapshot.ik57_ff ?? 0;
|
|
5189
5294
|
this.tape_8002_as_output = snapshot.tape_8002_as_output;
|
|
5190
5295
|
this.video_memory_base_buf = h(snapshot.video_memory_base_buf);
|
|
5191
5296
|
this.video_memory_size_buf = h(snapshot.video_memory_size_buf);
|
|
@@ -5226,7 +5331,11 @@ class Memory {
|
|
|
5226
5331
|
return ch;
|
|
5227
5332
|
}
|
|
5228
5333
|
if (addr === 49153) {
|
|
5229
|
-
|
|
5334
|
+
const ticks = this.machine.runner.total_ticks;
|
|
5335
|
+
const FRAME = 35600;
|
|
5336
|
+
const VRTC_ON = 3560;
|
|
5337
|
+
const vrtc = ticks % FRAME >= FRAME - VRTC_ON ? 32 : 0;
|
|
5338
|
+
return vrtc | (this.machine.screen.light_pen_active ? 16 : 0);
|
|
5230
5339
|
}
|
|
5231
5340
|
if (addr === 49152) {
|
|
5232
5341
|
if (this.vg75_c001_60_cmd === 1) {
|
|
@@ -5319,6 +5428,7 @@ class Memory {
|
|
|
5319
5428
|
}
|
|
5320
5429
|
if (peripheral_reg === 57352 && byte === 128) {
|
|
5321
5430
|
this.ik57_e008_80_cmd = 1;
|
|
5431
|
+
this.ik57_ff = 0;
|
|
5322
5432
|
this.tape_8002_as_output = 1;
|
|
5323
5433
|
return;
|
|
5324
5434
|
}
|
|
@@ -5349,6 +5459,29 @@ class Memory {
|
|
|
5349
5459
|
this.tape_8002_as_output = 0;
|
|
5350
5460
|
return;
|
|
5351
5461
|
}
|
|
5462
|
+
if (peripheral_reg === 57348 && this.ik57_e008_80_cmd === 0) {
|
|
5463
|
+
if (this.ik57_ff === 0) {
|
|
5464
|
+
this.video_memory_base_buf = this.video_memory_base & 65280 | byte;
|
|
5465
|
+
this.ik57_ff = 1;
|
|
5466
|
+
} else {
|
|
5467
|
+
this.video_memory_base = this.video_memory_base_buf & 255 | byte << 8;
|
|
5468
|
+
this.video_memory_base_buf = this.video_memory_base;
|
|
5469
|
+
this.machine.screen.set_video_memory(this.video_memory_base);
|
|
5470
|
+
this.ik57_ff = 0;
|
|
5471
|
+
}
|
|
5472
|
+
return;
|
|
5473
|
+
}
|
|
5474
|
+
if (peripheral_reg === 57349 && this.ik57_e008_80_cmd === 0) {
|
|
5475
|
+
if (this.ik57_ff === 0) {
|
|
5476
|
+
this.video_memory_size_buf = byte;
|
|
5477
|
+
this.ik57_ff = 1;
|
|
5478
|
+
} else {
|
|
5479
|
+
this.video_memory_size = ((this.video_memory_size_buf | byte << 8) & 16383) + 1;
|
|
5480
|
+
this.video_memory_size_buf = this.video_memory_size;
|
|
5481
|
+
this.ik57_ff = 0;
|
|
5482
|
+
}
|
|
5483
|
+
return;
|
|
5484
|
+
}
|
|
5352
5485
|
if (addr === 32770) {
|
|
5353
5486
|
if (this.tape_8002_as_output) {
|
|
5354
5487
|
this.tape_write_bit(byte & 1);
|
|
@@ -6034,6 +6167,17 @@ function setupKeyboard(keyboard) {
|
|
|
6034
6167
|
process.stdout.write("\x1B[2J\x1B[H");
|
|
6035
6168
|
process.exit(0);
|
|
6036
6169
|
}
|
|
6170
|
+
if (data.length === 1 && data >= "\x01" && data <= "\x1A" && data !== "\b" && data !== "\t" && data !== `
|
|
6171
|
+
` && data !== "\r") {
|
|
6172
|
+
const code2 = `Key${String.fromCharCode(data.charCodeAt(0) + 64)}`;
|
|
6173
|
+
keyboard.onkeydown("ControlLeft");
|
|
6174
|
+
keyboard.onkeydown(code2);
|
|
6175
|
+
setTimeout(() => {
|
|
6176
|
+
keyboard.onkeyup(code2);
|
|
6177
|
+
keyboard.onkeyup("ControlLeft");
|
|
6178
|
+
}, 50);
|
|
6179
|
+
return;
|
|
6180
|
+
}
|
|
6037
6181
|
const code = KEY_MAP[data] || KEY_MAP[data.toLowerCase()];
|
|
6038
6182
|
if (code) {
|
|
6039
6183
|
if (data.length === 1 && data >= "A" && data <= "Z") {
|
|
@@ -6100,7 +6244,8 @@ function printHelp() {
|
|
|
6100
6244
|
bunx rk86 -g 0x100 prog.bin \u0437\u0430\u043F\u0443\u0441\u043A \u0441 \u0430\u0434\u0440\u0435\u0441\u0430 100h
|
|
6101
6245
|
|
|
6102
6246
|
\u0423\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435:
|
|
6103
|
-
Ctrl+C
|
|
6247
|
+
Ctrl+C \u0432\u044B\u0445\u043E\u0434
|
|
6248
|
+
Ctrl+<\u0431\u0443\u043A\u0432\u0430> \u0421\u0421 + <\u0431\u0443\u043A\u0432\u0430> (\u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440 Ctrl+A = \u0421\u0421+A)`);
|
|
6104
6249
|
}
|
|
6105
6250
|
function htmlToAnsi(html) {
|
|
6106
6251
|
return html.replace(/<a\s+href="([^"]*)"[^>]*>(.*?)<\/a>/g, (_m, url, text) => `\x1B]8;;${url}\x1B\\${text}\x1B]8;;\x1B\\`).replace(/<[^>]*>/g, "").replace(/\n+/g, " ").trim();
|
|
@@ -6358,10 +6503,21 @@ function dumpScreen(machine) {
|
|
|
6358
6503
|
const { memory, screen } = machine;
|
|
6359
6504
|
const lines = [];
|
|
6360
6505
|
let addr = screen.video_memory_base;
|
|
6506
|
+
let frameStopped = false;
|
|
6361
6507
|
for (let y = 0;y < screen.height; y++) {
|
|
6362
6508
|
let line = "";
|
|
6509
|
+
let rowStopped = frameStopped;
|
|
6363
6510
|
for (let x = 0;x < screen.width; x++) {
|
|
6364
|
-
const
|
|
6511
|
+
const raw = memory.read_raw(addr++);
|
|
6512
|
+
if (rowStopped || raw >= 240) {
|
|
6513
|
+
line += ".";
|
|
6514
|
+
if (raw >= 240)
|
|
6515
|
+
rowStopped = true;
|
|
6516
|
+
if (raw >= 248)
|
|
6517
|
+
frameStopped = true;
|
|
6518
|
+
continue;
|
|
6519
|
+
}
|
|
6520
|
+
const byte = raw & 127;
|
|
6365
6521
|
if (byte === 0 || byte === 9 || byte === 10 || byte === 13) {
|
|
6366
6522
|
line += ".";
|
|
6367
6523
|
} else {
|