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

Comparing vt102/vt102 (file contents):
Revision 1.12 by root, Wed Dec 3 02:10:35 2014 UTC vs.
Revision 1.14 by root, Wed Dec 3 02:13:41 2014 UTC

23my $VT102 = 1; 23my $VT102 = 1;
24my $VT131 = 0; 24my $VT131 = 0;
25my $AVO = 1; 25my $AVO = 1;
26my $KBD = 1; 26my $KBD = 1;
27 27
28if ($ARGV[0] =~ /^-?-vt100$/) { 28shift, ($VT102 = 0), ($AVO = 0) if $ARGV[0] =~ /^-?-vt100$/;
29 shift; $VT102 = 0; $AVO = 0; 29shift, ($VT102 = 0) if $ARGV[0] =~ /^-?-vt100\+avo$/;
30} 30shift if $ARGV[0] =~ /^-?-vt102$/;
31 31shift, ($VT131 = 1) if $ARGV[0] =~ /^-?-vt131$/;
32if ($ARGV[0] =~ /^-?-vt100\+avo$/) {
33 shift; $VT102 = 0; $AVO = 1;
34}
35
36if ($ARGV[0] =~ /^-?-vt102$/) {
37 shift; # default
38}
39
40if ($ARGV[0] =~ /^-?-vt131$/) {
41 shift; $VT131 = 1;
42}
43 32
44if ($ARGV[0] =~ /^-/) { 33if ($ARGV[0] =~ /^-/) {
45 die <<EOF; 34 die <<EOF;
46 35
47VT102, A VT100/101/102/131 SIMULATOR 36VT102, A VT100/101/102/131 SIMULATOR
91 local $/; 80 local $/;
92 <DATA> 81 <DATA>
93}; 82};
94 83
950x6801 == length $ROMS or die "corrupted rom image"; 840x6801 == length $ROMS or die "corrupted rom image";
96
97binmode STDOUT;
98 85
99my @M = (0xff) x 65536; # main memory, = (0xff) x 65536; 86my @M = (0xff) x 65536; # main memory, = (0xff) x 65536;
100 87
101# populate mem with rom contents 88# populate mem with rom contents
102if ($VT102) { 89if ($VT102) {
498 $M[$PC], $op[$M[$PC]]; 485 $M[$PC], $op[$M[$PC]];
499} 486}
500 487
501############################################################################# 488#############################################################################
502# video emulation 489# video emulation
490
491binmode STDOUT;
503 492
504my @CHARMAP = ( 493my @CHARMAP = (
505 " " , "\x{29eb}", "\x{2592}", "\x{2409}", 494 " " , "\x{29eb}", "\x{2592}", "\x{2409}",
506 "\x{240c}", "\x{240d}", "\x{240a}", "\x{00b0}", 495 "\x{240c}", "\x{240d}", "\x{240a}", "\x{00b0}",
507 "\x{00b1}", "\x{2424}", "\x{240b}", "\x{2518}", 496 "\x{00b1}", "\x{2424}", "\x{240b}", "\x{2518}",

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines