ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/vt102/vt102
(Generate patch)

Comparing vt102/vt102 (file contents):
Revision 1.8 by root, Mon Dec 1 20:04:11 2014 UTC vs.
Revision 1.9 by root, Mon Dec 1 20:12:07 2014 UTC

21# ./vt102 bash 21# ./vt102 bash
22# ./vt102 telnet towel.blinkenlights.nl 22# ./vt102 telnet towel.blinkenlights.nl
23# ./vt102 curl http://artscene.textfiles.com/vt100/trekvid.vt 23# ./vt102 curl http://artscene.textfiles.com/vt100/trekvid.vt
24# ./vt102 curl http://artscene.textfiles.com/vt100/surf.vt # in 3d! 24# ./vt102 curl http://artscene.textfiles.com/vt100/surf.vt # in 3d!
25 25
26# TODO: ctrl key map 26use strict;
27 27use feature qw(state);
28use common::sense; 28#use common::sense;
29 29
30$| = 1; 30$| = 1;
31 31
32my $VT102 = 1; 32my $VT102 = 1;
33my $AVO = $VT102 || 1; 33my $AVO = $VT102 || 1;
477 477
478 line: 478 line:
479 for my $y (0 .. 25) { # ntsc, two vblank delay lines, up to 24 text lines 479 for my $y (0 .. 25) { # ntsc, two vblank delay lines, up to 24 text lines
480 my $prev_sgr; 480 my $prev_sgr;
481 481
482 $scr .= sprintf "%2d |", ++$y; 482 $scr .= sprintf "%2d \xe2\x94\x82", $y;
483 483
484 for (0..139) { 484 for (0..139) {
485 my $c = $M[$i]; 485 my $c = $M[$i];
486 486
487 if ($c == 0x7f) { # also 0xff, but the firmware avoids that 487 if ($c == 0x7f) { # also 0xff, but the firmware avoids that
488 $scr .= "\e[m|\e[K\n"; 488 $scr .= "\e[m\xe2\x94\x82\e[K\n";
489 489
490 my $a1 = $M[$i + 1]; 490 my $a1 = $M[$i + 1];
491 my $a0 = $M[$i + 2]; 491 my $a0 = $M[$i + 2];
492 492
493 $i = 0x2000 + (($a1 * 256 + $a0) & 0xfff); 493 $i = 0x2000 + (($a1 * 256 + $a0) & 0xfff);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines