ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/vt102/vt102
Revision: 1.6
Committed: Mon Dec 1 19:40:48 2014 UTC (9 years, 5 months ago) by root
Branch: MAIN
Changes since 1.5: +49 -20 lines
Log Message:
*** empty log message ***

File Contents

# Content
1 #!/opt/bin/perl
2
3 #
4 # Copyright(C) 2014 Marc Alexander Lehmann <vt102@schmorp.de>
5 #
6 # vt102 is free software; you can redistribute it and/or modify it under
7 # the terms of the GNU General Public License as published by the Free
8 # Software Foundation; either version 3, or (at your option) any later
9 # version.
10 #
11 # vt102 is distributed in the hope that it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 # for more details.
15 #
16
17 # If this file contains embedded ROMs, the above copyright notice does
18 # not apply to them.
19
20 # this hack is not considered release ready in and way, shape, or form
21 # ./vt102 bash
22 # ./vt102 telnet towel.blinkenlights.nl
23 # ./vt102 curl http://artscene.textfiles.com/vt100/trekvid.vt
24 # ./vt102 curl http://artscene.textfiles.com/vt100/surf.vt # in 3d!
25
26 # TODO: ctrl
27
28 use common::sense;
29
30 $| = 1;
31
32 my $VT102 = 1;
33 my $AVO = $VT102 || 1;
34 my $KBD = 1;
35
36 #############################################################################
37 # rom initialising
38
39 my $ROM = do {
40 binmode DATA;
41 local $/;
42 <DATA>
43 };
44
45 0x6001 == length $ROM or die "corrupted rom image";
46
47 binmode STDOUT;
48
49 my @M = (0xff) x 65536; # main memory, = (0xff) x 65536;
50
51 # populate mem with rom contents
52 if ($VT102) {
53 @M[0x0000 .. 0x1fff] = unpack "C*", substr $ROM, 0x2000, 0x2000;
54 @M[0x8000 .. 0x9fff] = unpack "C*", substr $ROM, 0x4000, 0x2000;
55 } else {
56 @M[0x0000 .. 0x1fff] = unpack "C*", substr $ROM, 0x0000, 0x2000;
57 }
58
59 #############################################################################
60 # cpu registers and I/O support
61
62 my $PTY; # the pty we allocated, if any
63 my $PRSTATUS = 0;
64
65 # 8080/8085 registers
66 # b, c, d, e, h, l, a
67 my ($A, $B, $C, $D, $E, $H, $L, $A);
68 my ($PC, $SP, $IFF, $FA, $FZ, $FS, $FP, $FC);
69
70 my $RST = 0; # 8080 pending interrupts
71 my $INTMASK = 7; # 8085 half interrupts
72 my $INTPEND = 0; # 8085 half interrupts
73
74 my $x; # dummy temp for instructions
75
76 my $CLK; # rather inexact clock
77
78 #############################################################################
79 # the dreaded nvr1400 chip. not needed to get it going, but provided for reference
80
81 # nvram
82 my @NVR = (0x3fff) x 100; # vt102: 214e accum, 214f only lower 8 bit used, first 44 bytes
83 my $NVRADDR;
84 my $NVRDATA;
85 my $NVRLATCH;
86
87 my @NVRCMD = (
88 sub { $NVRDATA = ($NVRDATA << 1) + $_[1]; }, # 0 accept data
89 sub { $NVRADDR = ($NVRADDR << 1) + $_[1]; }, # 1 accept addr
90 sub { ($NVRDATA <<= 1) & 0x4000 }, # 2 shift out
91 undef, # 3 not used, will barf
92 sub { $NVR[$_[0]] = $NVRDATA & 0x3fff; }, # 4 write
93 sub { $NVR[$_[0]] = 0x3fff; }, # 5 erase
94 sub { $NVRDATA = $NVR[$_[0]]; }, # 6 read
95 sub { }, # 7 standby
96 );
97
98 my @bitidx;
99 $bitidx[1 << $_] = 9 - $_ for 0..9;
100
101 # the nvr1400 state machine. what a monster
102 sub nvr() {
103 my $a1 = $bitidx[(~$NVRADDR ) & 0x3ff];
104 my $a0 = $bitidx[(~$NVRADDR >> 10) & 0x3ff];
105
106 # printf "NVR %02x A %020b %d %d D %02x\n", $NVRLATCH, $NVRADDR & 0xfffff, $a1, $a0, $NVRDATA;
107
108 $NVRCMD[($NVRLATCH >> 1) & 7]($a1 * 10 + $a0, $NVRLATCH & 1)
109 }
110
111 #############################################################################
112
113 my $DC11_REVERSE = 0;
114
115 my $XON = 1; # false if terminal wants us to pause
116 my $PUSARTCMD;
117
118 my @KXMIT; # current scan queue
119 my %KXMIT; # currently pressed keys
120 my @KQUEUE; # key event queue
121 my $KXCNT; # count for debouncew
122 my @PUSARTRECV;
123 my $KSTATUS;
124
125 sub out_00 { # pusartdata
126 # handle xon/xoff, but also pass it through
127 if ($_[0] == 0x13) {
128 $XON = 0;
129 return;#d#
130 } elsif ($_[0] == 0x11) {
131 $XON = 1;
132 return;#d#
133 }
134
135 syswrite $PTY, chr $_[0];
136
137 $INTPEND |= 1;
138 }
139
140 sub out_01 {
141 $PUSARTCMD = shift;
142
143 $INTPEND |= 1 if $PUSARTCMD & 0x01; # VT102, 5.5 txrdy
144 $INTPEND |= 2 if $PUSARTCMD & 0x04 && !@PUSARTRECV; # VT102, 6.5 rxrdy, needed for some reason
145 }
146
147 sub out_02 { } # baudrate generator
148
149 sub out_23 { } # unknown
150 sub out_27 { } # unknown
151 sub out_2f { } # unknown, connected to in 0f
152
153 sub out_42 { } # brightness
154
155 sub out_62 {
156 $NVRLATCH = shift;
157 }
158
159 sub out_a2 {
160 my $dc11 = 0x0f & shift;
161
162 $DC11_REVERSE = 1 if $dc11 == 0b1010;
163 $DC11_REVERSE = 0 if $dc11 == 0b1011;
164 }
165
166 sub out_c2 { } # unknown
167 sub out_d2 { } # 0..3 == 80c/132c/60hz/50hz
168
169 sub out_82 {
170 # keyboard
171
172 # CLICK STARTSCAN ONLINE LOCKED | CTS DSR INSERT L1(?)
173 # CLICK STARTSCAN ONLINE LOCKED | LED1 LED2 LED3 LED4
174 $KSTATUS = $_[0];
175
176 # start new scan unless scan in progress
177 if (($_[0] & 0x40) && !@KXMIT) {
178 # do not reply with keys in locked mode
179 # or during post (0xff),
180 # mostly to skip init and not fail POST,
181 # and to send startup keys only when terminal is ready
182 unless (($_[0] & 0x10) || ($_[0] == 0xff) || ($VT102 && $INTMASK == 0x07)) {
183 if ($KXCNT <= 0 && @KQUEUE) {
184 my $c = shift @KQUEUE;
185
186 if ($c < 0) { # key up
187 delete $KXMIT{-$c};
188 $KXCNT = 10;
189 } elsif ($c > 0) { # key down
190 undef $KXMIT{$c};
191 $KXCNT = 10;
192 } else { # delay
193 $KXCNT = 100;
194 }
195 }
196
197 --$KXCNT;
198 @KXMIT = sort keys %KXMIT;
199 }
200
201 $RST |= 1;
202 }
203 }
204
205 #############################################################################
206
207 my $NVRBIT;
208 my $LBA;
209
210 sub in_00 { # pusart data
211 # interrupt not generated here, because infinite
212 # speed does not go well with the vt102.
213
214 shift @PUSARTRECV
215 }
216
217 sub in_01 { # pusart status
218 # DSR SYNDET FE OE | PE TXEMPTY RXRDY TXRDY
219 0x85 + (@PUSARTRECV && 0x02)
220 }
221
222 sub in_22 { # modem buffer(?)
223 # wild guess: -CTS -SPDI -RI -CD 0 0 0 0
224 0x20
225 }
226
227 sub in_0f { } # unknown, connected to out 2f
228
229 sub in_42 { # flag buffer
230 ++$LBA;
231
232 $NVRBIT = nvr ? 0x20 : 0x00 if ($LBA & 0x3) == 0x2;
233
234 # KBD_XMITEMPTY LBA7 NVRDATA ODDFIELD - OPTION !GFX !AVO PUSART_TXRDY
235
236 my $f = 0x85 | $NVRBIT;
237
238 $f |= 0x02 unless $AVO;
239 $f |= 0x40 if $LBA & 0x2;
240
241 $f
242 }
243
244 sub in_82 { # tbmt keyboard uart
245 return 0x7f unless @KXMIT;
246
247 $RST |= 1;
248 shift @KXMIT
249 }
250
251 sub in_03 { 0xff } # unknown, printer uart input?
252 sub in_0b { 0xff } # unknown
253 sub in_17 { 0xff } # unknown, printer status clear by reading?
254 sub in_1b { 0xff } # unknown
255
256 #############################################################################
257
258 sub sf { # set flags (ZSC - AP not implemented)
259 $FS = $_[0] & 0x080;
260 $FZ = ($_[0] & 0x0ff) == 0;
261 $FC = $_[0] & 0x100;
262
263 $_[0] & 0xff
264 }
265
266 sub sf_nc { # set flags except carry
267 $FS = $_[0] & 0x080;
268 $FZ = ($_[0] & 0x0ff) == 0;
269
270 $_[0] & 0xff
271 }
272
273 my @op = map { sprintf "status(); die 'unknown op %02x'", $_ } 0 .. 255;
274 my @ops;
275
276 my @reg = qw($B $C $D $E $H $L $M[$H*256+$L] $A);
277 my @cc = ('if !$FZ', 'if $FZ', 'if !$FC', 'if $FC', ';die', ';die', 'if !$FS', 'if $FS'); # die == unimplemented $FP parity
278
279 # mov r,r / r,M / M,r
280 for my $s (0..7) {
281 for my $d (0..7) {
282 $op[0x40 + $d * 8 + $s] = "$reg[$d] = $reg[$s]";
283 }
284 }
285
286 $op[0x00] = '';
287
288 $op[0x01] = '($B, $C) = (IMM16 >> 8, IMM16 & 0xff)'; # lxi
289 $op[0x11] = '($D, $E) = (IMM16 >> 8, IMM16 & 0xff)'; # lxi
290 $op[0x21] = '($H, $L) = (IMM16 >> 8, IMM16 & 0xff)'; # lxi
291 $op[0x31] = '$SP = IMM16' ; # lxi #d# 0xf000 because of limited stack
292
293 $op[0x02] = '$M[$B * 256 + $C] = $A'; # stax
294 $op[0x12] = '$M[$D * 256 + $E] = $A'; # stax
295 $op[0x32] = '$M[IMM16 ] = $A'; # sta
296
297 sub inxdcx($$$) {
298 $x = ($_[0] * 256 + $_[1] + $_[2]) & 0xffff;
299 $_[0] = $x >> 8;
300 $_[1] = $x & 0xff;
301 }
302
303 $op[0x03] = 'inxdcx $B, $C, 1'; # inx
304 $op[0x13] = 'inxdcx $D, $E, 1'; # inx
305 $op[0x23] = 'inxdcx $H, $L, 1'; # inx
306 $op[0x33] = '$SP++' ; # inx
307 $op[0x0b] = 'inxdcx $B, $C, -1'; # dcx
308 $op[0x1b] = 'inxdcx $D, $E, -1'; # dcx
309 $op[0x2b] = 'inxdcx $H, $L, -1'; # dcx
310 $op[0x3b] = '--$SP' ; # dcx
311
312 # "no carry" doesn't seem to be needed for vt100 - optimize?
313 $op[0x04 + $_ * 8] = "$reg[$_] = sf_nc $reg[$_] + 1" for 0..7; # inr
314 $op[0x05 + $_ * 8] = "$reg[$_] = sf_nc $reg[$_] - 1" for 0..7; # dcr
315
316 # mvi r / M
317 $op[0x06 + $_ * 8] = "$reg[$_] = IMM8" for 0..7;
318
319 # getting this insn wrong (its the only 16 bit insn to modify flags)
320 # wasted three of my best days with mindless vt102 rom reverse engineering
321 sub dad {
322 $x = $H * 256 + $L + $_[0];
323
324 ($H, $L) = (($x >> 8) & 0xff, $x & 0xff);
325 $FC = $x > 0xffff;
326 }
327
328 $op[0x09] = 'dad $B * 256 + $C'; # dad
329 $op[0x19] = 'dad $D * 256 + $E'; # dad
330 $op[0x29] = 'dad $H * 256 + $L'; # dad
331 $op[0x39] = 'dad $SP '; # dad
332
333 $op[0x07] = ' $FC = $A >> 7; $A = ($A * 2 + $FC) & 0xff '; # rlc
334 $op[0x17] = ' ($FC, $A) = ($A >> 7, ($A * 2 + $FC) & 0xff)'; # ral
335
336 $op[0x0f] = ' $FC = $A & 1; $A = ($A >> 1) | ($FC && 0x80) '; # rrc
337 $op[0x1f] = ' ($FC, $A) = ($A & 1, ($A >> 1) | ($FC && 0x80))'; # rar
338
339 $op[0x0a] = '$A = $M[$B * 256 + $C]'; # ldax b
340 $op[0x1a] = '$A = $M[$D * 256 + $E]'; # ldax d
341 $op[0x3a] = '$A = $M[IMM16]'; # lda
342
343 $op[0x20] = '$A = $INTPEND * 16 + $INTMASK + ($IFF && 8)'; # rim (incomplete)
344 $op[0x30] = '$INTMASK = $A & 7 if $A & 8'; # sim (incomplete)
345
346 $op[0x22] = '($M[IMM16], $M[IMM16 + 1]) = ($L, $H)'; # shld
347 $op[0x2a] = '($L, $H) = ($M[IMM16], $M[IMM16 + 1])'; # lhld
348
349 # yeah, the fucking setup screens actually use daa...
350 $op[0x27] = '
351 my ($h, $l);
352
353 ($h, $l) = ($A >> 4, $A & 15);
354
355 if ($l > 9 || $FA) {
356 $A = sf $A + 6;
357 ($h, $l) = ($A >> 4, $A & 15);
358 }
359
360 if ($h > 9 || $FC) {
361 $h += 6;
362 $A = ($h * 16 + $l) & 0xff;
363 }
364 '; # daa, almost certainly borked, also, acarry not set by sf
365
366 $op[0x2f] = '$A ^= 0xff'; # cma
367
368 $op[0x37] = '$FC = 1 '; # stc
369 $op[0x3f] = '$FC = !$FC'; # cmc
370
371 $op[0x76] = 'die "HLT"'; # hlt
372
373 $op[0x80 + $_] = '$A = sf $A + ' . $reg[$_] for 0..7; # add
374 $op[0x88 + $_] = '$A = sf $A + $FC + ' . $reg[$_] for 0..7; # adc
375 $op[0x90 + $_] = '$A = sf $A - ' . $reg[$_] for 0..7; # sub
376 $op[0x98 + $_] = '$A = sf $A - $FC - ' . $reg[$_] for 0..7; # sbb
377 $op[0xa0 + $_] = '$A = sf $A & ' . $reg[$_] for 0..7; # ana
378 $op[0xa8 + $_] = '$A = sf $A ^ ' . $reg[$_] for 0..7; # xra
379 $op[0xb0 + $_] = '$A = sf $A | ' . $reg[$_] for 0..7; # ora
380 $op[0xb8 + $_] = ' sf $A - ' . $reg[$_] for 0..7; # cmp
381 # possible todo: optimize ora a, maybe xra a
382
383 $op[0xc6 + $_] = '$A = sf $A + IMM8'; # adi
384 $op[0xd6 + $_] = '$A = sf $A - IMM8'; # sui
385 $op[0xe6 + $_] = '$A = sf $A & IMM8'; # ani
386 $op[0xee + $_] = '$A = sf $A ^ IMM8'; # xri
387 $op[0xf6 + $_] = '$A = sf $A | IMM8'; # ori
388 $op[0xfe + $_] = ' sf $A - IMM8'; # cpi
389
390 $op[0xc1] = '($C, $B) = (POP, POP)'; # pop
391 $op[0xd1] = '($E, $D) = (POP, POP)'; # pop
392 $op[0xe1] = '($L, $H) = (POP, POP)'; # pop
393 $op[0xf1] = '($x, $A) = (POP, POP); ($FS, $FZ, $FA, $FP, $FC) = (!!($x & 0x80), !!($x & 0x40), !!($x & 0x10), !!($x & 0x04), !!($x & 0x01))'; # pop psw
394
395 $op[0xeb] = '($D, $E, $H, $L) = ($H, $L, $D, $E)'; # xchg
396
397 $op[0xc2 + $_ * 8] = 'BRA IMM16 ' . $cc[$_] for 0..7; # jcc
398 $op[0xc3] = 'JMP IMM16'; # jmp
399
400 $op[0xc4 + $_ * 8] = '(PUSH PC >> 8), (PUSH PC & 0xff), (BRA IMM16) ' . $cc[$_] for 0..7; # ccc
401 $op[0xcd] = '(PUSH PC >> 8), (PUSH PC & 0xff), (BRA IMM16)'; # call
402
403 $op[0xc7 + $_ * 8] = "JMP $_ * 8" for 0..7; # rst
404
405 $op[0xc0 + $_ * 8] = 'BRA POP + POP * 256 ' . $cc[$_] for 0..7; # rcc
406 $op[0xc9] = 'JMP POP + POP * 256'; # ret
407
408 $op[0xc5] = 'PUSH $B; PUSH $C';
409 $op[0xd5] = 'PUSH $D; PUSH $E';
410 $op[0xe5] = 'PUSH $H; PUSH $L';
411 $op[0xf5] = 'PUSH $A; PUSH +($FS && 0x80) | ($FZ && 0x40) | ($FA && 0x10) | ($FP && 0x04) | ($FC && 0x01)'; # psw
412
413 $op[0xd3] = 'OUT'; # out
414 $op[0xdb] = 'IN'; # in
415
416 # e3 xthl @ 917b, hl <-> (sp)
417
418 $op[0xe9] = 'JMP $H * 256 + $L'; # pchl
419
420 $op[0xf3] = '$IFF = 0'; # DI
421 $op[0xfb] = '$IFF = 1'; # EI
422
423 @ops = @op; # for debugging #d#
424
425 #############################################################################
426
427 # print cpu status, for debugging
428 sub status {
429 my $PC = shift || $PC;
430
431 printf "%04x/%04x A=%02x BC=%02x:%02x DE=%02x:%02x HL=%02x:%02x ZSCAP=%s: %02x %s\n",
432 $PC, $SP,
433 $A, $B, $C, $D, $E, $H, $L,
434 ($FZ ? "1" : "0")
435 . ($FS ? "1" : "0")
436 . ($FC ? "1" : "0")
437 . ($FA ? "1" : "0")
438 . ($FP ? "1" : "0"),
439 $M[$PC], $ops[$M[$PC]];
440 }
441
442 #############################################################################
443
444 my @chr = (
445 " " , "\x{29eb}", "\x{2592}", "\x{2409}",
446 "\x{240c}", "\x{240d}", "\x{240a}", "\x{00b0}",
447 "\x{00b1}", "\x{2424}", "\x{240b}", "\x{2518}",
448 "\x{2510}", "\x{250c}", "\x{2514}", "\x{253c}",
449 "\x{23ba}", "\x{23bb}", "\x{2500}", "\x{23bc}",
450 "\x{23bd}", "\x{251c}", "\x{2524}", "\x{2534}",
451 "\x{252c}", "\x{2502}", "\x{2264}", "\x{2265}",
452 "\x{03c0}", "\x{2260}", "\x{00a3}", "\x{00b7}",
453 (map chr, 0x020 .. 0x7e),
454 );
455
456 utf8::encode $_ for @chr;
457
458 my @sgr; # sgr sequences for attributes
459
460 for (0x00 .. 0xff) {
461 my $sgr = "";
462
463 $sgr .= ";5" unless $_ & 0x01;
464 $sgr .= ";4" unless $_ & 0x02;
465 $sgr .= ";1" unless $_ & 0x04;
466 $sgr .= ";7" if $_ & 0x80;
467
468 $sgr[$_] = "\e[${sgr}m";
469 }
470
471 sub prscr {
472 my $i = 0x2000;
473
474 my $scr = sprintf "\e[H--- KBD %08b CLK %d\e[K\n", $KSTATUS, $CLK;
475
476 $scr .= "\e[?5" . ($DC11_REVERSE ? "h" : "l");
477
478 line:
479 for my $y (0 .. 25) { # ntsc, two vblank delay lines, up to 24 text lines
480 my $prev_sgr;
481
482 $scr .= sprintf "%2d |", ++$y;
483
484 for (0..139) {
485 my $c = $M[$i];
486
487 if ($c == 0x7f) { # also 0xff, but the firmware avoids that
488 $scr .= "\e[m|\e[K\n";
489
490 my $a1 = $M[$i + 1];
491 my $a0 = $M[$i + 2];
492
493 $i = 0x2000 + (($a1 * 256 + $a0) & 0xfff);
494
495 next line;
496 }
497
498 my $sgr = $sgr[ ($M[$i++ + 0x1000] & 15) | ($c & 0x80)];
499
500 # ~1 sgr 5 blink
501 # ~2 sgr 4 underline
502 # ~4 sgr 1 bold
503 # 0x80 in attr, sgr 7, reversed
504
505 $scr .= $prev_sgr = $sgr if $sgr ne $prev_sgr;
506
507 $scr .= $chr[$c & 0x7f];
508 }
509
510 $scr .= "\e[K\nvideo overflow\e[K\n";
511 last;
512 }
513
514 $scr .= "\e[m";
515
516 if (0) {
517 $scr .= "\e[K\n";
518 for my $o (0x200 .. 0x232) {
519 $scr .= sprintf "%04x:", $o * 16;
520 for (0..15) {
521 $scr .= sprintf " %02x", $M[$o * 16 + $_];
522 }
523 $scr .= "\e[K\n";
524 }
525 }
526
527 $scr .= "\e[J";
528
529 syswrite STDOUT, $scr;
530 }
531
532 #############################################################################
533
534 if (@ARGV) {
535 require IO::Pty;
536 $PTY = IO::Pty->new;
537
538 my $slave = $PTY->slave;
539
540 $PTY->set_winsize (24, 80);
541
542 unless (fork) {
543 $ENV{TERM} = $VT102 ? "vt102" : "vt100";
544
545 close $PTY;
546
547 open STDIN , "<&", $slave;
548 open STDOUT, ">&", $slave;
549 open STDERR, ">&", $slave;
550
551 system "stty ixoff erase ^H";
552
553 $PTY->make_slave_controlling_terminal;
554 $PTY->close_slave;
555
556 exec @ARGV;
557 }
558
559 $PTY->close_slave;
560
561 } else {
562 open $PTY, "</dev/null" or die;#d
563 }
564
565 #############################################################################
566
567 # initial key input, to set up online mode etc.
568 @KQUEUE = (
569 0x7b, -0x7b, # setup
570 0, # delay
571 0x28, -0x28, # 4, toggle local/online
572 0x38, -0x38, # 5, setup b
573 0, # delay
574 (0x10, -0x10) x 2, # cursor right
575 0x37, -0x37, # 6 toggle soft scroll
576 (0x10, -0x10) x 1, # cursor right
577 0x37, -0x37, # 6 toggle autorepeat off
578 (0x10, -0x10) x 8, # cursor right
579 0x37, -0x37, # 6 toggle keyclick
580 (0x10, -0x10) x 1, # cursor right
581 $VT102 ? () : (0x37, -0x37), # 6 toggle ansi/vt52
582 (0x10, -0x10) x 7, # cursor right
583 0x37, -0x37, # 6 toggle wrap around
584 0x7b, -0x7b, # leave setup
585 );
586
587 #############################################################################
588
589 # 0x80 shift, 0x100 ctrl, 0x200 toggle
590 my %KEYMAP = (
591 "\t" => 0x3a,
592 "\r" => 0x64,
593 "\n" => 0x44,
594
595 # hardcoded rxvt keys
596 "\e" => 0x2a, # ESC
597 "\e[3~" => 0x03, # DC
598 "\e[5~" => 0x7e, # CAPS LOCK (prior)
599 "\e[6~" => 0x6a, # NO SCROLL (next)
600 "\e[A" => 0x30, # UP
601 "\e[B" => 0x22, # DOWN
602 "\e[C" => 0x10, # RIGHT
603 "\e[D" => 0x20, # LEFT
604 "\e[a" => 0x30 | 0x080, # UP
605 "\e[b" => 0x22 | 0x080, # DOWN
606 "\e[c" => 0x10 | 0x080, # RIGHT
607 "\e[d" => 0x20 | 0x080, # LEFT
608 "\e[7~" => 0x7b, # SETUP (home)
609 "\e[8~" => 0x23, # BREAK (end)
610 "\e[8\$" => 0x23 | 0x080, # SHIFT BREAK / DISCONNECT (shift-end)
611 "\x7f" => 0x33, # BACKSPACE
612
613 "\e[11~" => 0x32, # F1
614 "\e[11~" => 0x42, # F2
615 "\e[11~" => 0x31, # F3
616 "\e[11~" => 0x41, # F4
617 );
618
619 @KEYMAP{map chr, 0x20..0x40} = unpack "C*", pack "H*",
620 "779ad5a9a8b8a755a6b5b6b466256575" . "351a3929283837273626d656e634e5f5" . "b9";
621
622 @KEYMAP{map chr, 0x5b .. 0x7e} = unpack "C*", pack "H*",
623 "154514b7a5" . "244a6879591949485816574746766706" . "050a185a0817780969077a95c594a4";
624
625 $KEYMAP{"\x3f" & $_} ||= $KEYMAP{$_} | 0x100 for "a" .. "z"; # ctrl
626 $KEYMAP{uc $_} ||= $KEYMAP{$_} | 0x080 for "a" .. "z"; # shift
627
628 my $KEYMATCH = join "|", map quotemeta, reverse sort keys %KEYMAP;
629 $KEYMATCH = qr{^($KEYMATCH)}s;
630
631 sub key {
632 my ($key) = @_;
633
634 state %MOD;
635
636 push @KQUEUE, -0x7c if !($key & 0x100) && delete $MOD{0x7c}; # ctrl-up
637 push @KQUEUE, -0x7d if !($key & 0x080) && delete $MOD{0x7d}; # shift-up
638
639 push @KQUEUE, 0x7c if $key & 0x100 && !$MOD{0x7c}++; # ctrl-down
640 push @KQUEUE, 0x7d if $key & 0x080 && !$MOD{0x7d}++; # shift-down
641
642 $key &= 0x7f;
643 push @KQUEUE, $key, -$key;
644 }
645
646 my $STDIN_BUF;
647
648 sub stdin_parse {
649 key $KEYMAP{$1}
650 while $STDIN_BUF =~ s/$KEYMATCH//;
651
652 # skip input we can't decipher
653 substr $STDIN_BUF, 0, 1, "";
654 }
655
656 if ($KBD) {
657 system "stty -icanon -icrnl -inlcr -echo min 1 time 0";
658 eval q{ sub END { system "stty sane" } };
659 $SIG{INT} = $SIG{TERM} = $SIG{QUIT} = sub { exit 1 };
660 }
661
662 #############################################################################
663
664 my @ICACHE; # compiled instruction cache
665
666 # the cpu
667 while () {
668
669 # execute extended basic blocks
670 $PC = ($ICACHE[$PC] ||= do {
671 my $pc = $PC;
672
673 my $insn = "";
674
675 # the jit compiler
676 for (0..15) {
677
678 # optional tracing support
679 if (0) {
680 $insn .= qq<
681 if (\$PRSTATUS) {
682 status $pc;
683 die unless --\$PRSTATUS;
684 }
685 >;
686 }
687
688 my $imm;
689 my $op = $op[$M[$pc++]];
690
691 for ($op) {
692 s/\bPUSH\b/\$M[--\$SP] =/g; # push byte to stack
693 s/\bPOP\b/\$M[\$SP++]/g; # pop byte from stack
694
695 s/\bIMM16\b/$imm \/\/= $M[$pc++] + $M[$pc++] * 256/xge; # 16 bit insn immediate
696 s/\bIMM8\b /$imm \/\/= $M[$pc++] /xge; # 8 bit insn immediate
697
698 s/\bPC\b/$pc/ge; # PC at end of insn
699 s/\bBRA\b/return/g; # conditional jump
700 s/\bJMP\b(.*)/$1\x00/sg; # unconditional jump
701
702 s/\bIN\b/ sprintf "\$A = in_%02x", $M[$pc++]/xge;
703 s/\bOUT\b/sprintf "out_%02x \$A ", $M[$pc++]/xge;
704 }
705
706 $insn .= "$op;\n";
707 }
708
709
710 $insn .= "$pc";
711 $insn =~ s/\x00.*$//s;
712
713 eval "use integer; sub { $insn }" or die "$insn: $@"
714 })->();
715
716 ++$CLK;
717
718 # things we do from time too time only
719 unless ($CLK & 0xf) {
720 # do I/O
721
722 unless ($CLK & 0x7ff) {
723
724 # pty/serial I/O
725 unless (@PUSARTRECV || @KQUEUE || !$PTY) {
726 my $rin = ""; (vec $rin, fileno $PTY, 1) = 1;
727
728 if (select $rin, undef, undef, 0) {
729 sysread $PTY, my $buf, 256;
730 push @PUSARTRECV, unpack "C*", $buf;
731 }
732 }
733
734 # keyboard input
735 if ($KBD) {
736 while (select my $rin = "\x01", undef, undef, 0) {
737 sysread STDIN, $STDIN_BUF, 1, length $STDIN_BUF
738 or last;
739 }
740
741 stdin_parse if length $STDIN_BUF;
742 }
743 }
744
745 # kick off various interrupts
746
747 $RST |= 2 if @PUSARTRECV && $XON; # VT100, but works on vt102, too (probably not used on real hardware though)
748 #$INTPEND |= 2 if @PUSARTRECV && $XON; # VT102, 6.5 rxrdy
749
750 # kick off vertical retrace form time to time
751 unless ($CLK & 0x1ff) {
752 $RST |= 4; # vertical retrace
753 }
754
755 # handle video hardware
756
757 unless ($CLK & 0x1fff) {
758 prscr;
759 }
760 }
761
762 # the interrupt logic
763 $x = $INTPEND & ~$INTMASK;
764 if (($RST || $x) && $IFF) {
765 # rst 1 kbd data available
766 # rst 2 pusart xmit+recv flag
767 # rst 4 vertical retrace
768 # 5.5 vt125 mb7 trans ready (serial send?)
769 # 6.5 vt125 mb7 read ready (something modem?)
770 # 7.5 vt125 mb7 vblank h(?)
771 # trap vt125 mbi init h(?)
772 my $vec;
773
774 if ($x & 1) { $vec = 0x2c; $INTPEND &= ~1;
775 } elsif ($x & 2) { $vec = 0x34; $INTPEND &= ~2;
776 } elsif ($x & 4) { $vec = 0x3c; $INTPEND &= ~4;
777 # } elsif ($RST ) { $vec = $RST * 8; $RST = 0; # for some reason, this breaks vt102
778 } elsif ($RST & 1) { $vec = 0x08; $RST &= ~1; # separate is better for vt102
779 } elsif ($RST & 2) { $vec = 0x10; $RST &= ~2;
780 } elsif ($RST & 4) { $vec = 0x20; $RST &= ~4;
781 } else {
782 die;
783 }
784
785 $M[--$SP] = $PC >> 8;
786 $M[--$SP] = $PC & 0xff;
787 $PC = $vec;
788
789 $IFF = 0;
790 }
791 }
792
793 __DATA__
794 1N ;0>b/BWog<Gӂ,O$ O[xI<ӂ,Bt@`+6+|v#~ʐ|¡0ڡq~ʨ|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