… | |
… | |
81 | <DATA> |
81 | <DATA> |
82 | }; |
82 | }; |
83 | |
83 | |
84 | 0x6801 == length $ROMS or die "corrupted rom image"; |
84 | 0x6801 == length $ROMS or die "corrupted rom image"; |
85 | |
85 | |
86 | binmode STDOUT; |
|
|
87 | |
|
|
88 | my @M = (0xff) x 65536; # main memory, = (0xff) x 65536; |
86 | my @M = (0xff) x 65536; # main memory, = (0xff) x 65536; |
89 | |
87 | |
90 | # populate mem with rom contents |
88 | # populate mem with rom contents |
91 | if ($VT102) { |
89 | if ($VT102) { |
92 | @M[0x0000 .. 0x1fff] = unpack "C*", substr $ROMS, 0x2000, 0x2000; |
90 | @M[0x0000 .. 0x1fff] = unpack "C*", substr $ROMS, 0x2000, 0x2000; |
… | |
… | |
487 | $M[$PC], $op[$M[$PC]]; |
485 | $M[$PC], $op[$M[$PC]]; |
488 | } |
486 | } |
489 | |
487 | |
490 | ############################################################################# |
488 | ############################################################################# |
491 | # video emulation |
489 | # video emulation |
|
|
490 | |
|
|
491 | binmode STDOUT; |
492 | |
492 | |
493 | my @CHARMAP = ( |
493 | my @CHARMAP = ( |
494 | " " , "\x{29eb}", "\x{2592}", "\x{2409}", |
494 | " " , "\x{29eb}", "\x{2592}", "\x{2409}", |
495 | "\x{240c}", "\x{240d}", "\x{240a}", "\x{00b0}", |
495 | "\x{240c}", "\x{240d}", "\x{240a}", "\x{00b0}", |
496 | "\x{00b1}", "\x{2424}", "\x{240b}", "\x{2518}", |
496 | "\x{00b1}", "\x{2424}", "\x{240b}", "\x{2518}", |