10 |
use Data::Dump qw/dump/; |
use Data::Dump qw/dump/; |
11 |
use M6502; |
use M6502; |
12 |
|
|
13 |
use base qw(Class::Accessor M6502 Screen Prefs); |
use base qw(Class::Accessor M6502 Screen Prefs Tape); |
14 |
__PACKAGE__->mk_accessors(qw(booted)); |
__PACKAGE__->mk_accessors(qw(booted)); |
15 |
|
|
16 |
=head1 NAME |
=head1 NAME |
443 |
return $keyboard_none; |
return $keyboard_none; |
444 |
} |
} |
445 |
|
|
446 |
|
if ( $addr == 0x87ff ) { |
447 |
|
return $self->read_tape; |
448 |
|
} |
449 |
|
|
450 |
$self->mmap_pixel( $addr, 0, $byte, 0 ); |
$self->mmap_pixel( $addr, 0, $byte, 0 ); |
451 |
return $byte; |
return $byte; |
452 |
} |
} |
583 |
print "run_for $run_for instructions\n"; |
print "run_for $run_for instructions\n"; |
584 |
$show_R = 1; |
$show_R = 1; |
585 |
last; |
last; |
586 |
} elsif ( $c =~ m/^(u|j)/ ) { |
} elsif ( $c =~ m/^(u|j)/i ) { |
587 |
my $to = $v || $a; |
my $to = $v || $a; |
588 |
printf "set pc to %04x\n", $to; |
printf "set pc to %04x\n", $to; |
589 |
$PC = $to; # remember for restart |
$PC = $to; # remember for restart |
591 |
$last = "r $run_for"; |
$last = "r $run_for"; |
592 |
$show_R = 1; |
$show_R = 1; |
593 |
last; |
last; |
594 |
} elsif ( $c =~ m/^t/ ) { |
} elsif ( $c =~ m/^tape/ ) { |
595 |
|
if ( ! $v ) { |
596 |
|
warn "ERROR: please specify tape name!\n"; |
597 |
|
} elsif ( ! -e $v ) { |
598 |
|
warn "ERROR: tape $v: $!\n"; |
599 |
|
} else { |
600 |
|
$self->load_tape( $v ); |
601 |
|
} |
602 |
|
$last = ''; |
603 |
|
} elsif ( $c =~ m/^t/i ) { |
604 |
$self->trace( not $self->trace ); |
$self->trace( not $self->trace ); |
605 |
print "trace ", $self->trace ? 'on' : 'off', "\n"; |
print "trace ", $self->trace ? 'on' : 'off', "\n"; |
606 |
$last = ''; |
$last = ''; |
607 |
} elsif ( $c =~ m/^d/ ) { |
} elsif ( $c =~ m/^d/i ) { |
608 |
$self->debug( not $self->debug ); |
$self->debug( not $self->debug ); |
609 |
print "debug ", $self->debug ? 'on' : 'off', "\n"; |
print "debug ", $self->debug ? 'on' : 'off', "\n"; |
610 |
$last = ''; |
$last = ''; |