20 |
|
|
21 |
=head1 VERSION |
=head1 VERSION |
22 |
|
|
23 |
Version 0.02 |
Version 0.03 |
24 |
|
|
25 |
=cut |
=cut |
26 |
|
|
27 |
our $VERSION = '0.02'; |
our $VERSION = '0.03'; |
28 |
|
|
29 |
=head1 SUMMARY |
=head1 SUMMARY |
30 |
|
|
55 |
sub boot { |
sub boot { |
56 |
my $self = shift; |
my $self = shift; |
57 |
warn "Orao calling upstream init\n"; |
warn "Orao calling upstream init\n"; |
58 |
$self->SUPER::init( $self, @_ ); |
$self->SUPER::init( |
59 |
|
read => sub { $self->read( @_ ) }, |
60 |
|
write => sub { $self->write( @_ ) }, |
61 |
|
); |
62 |
|
|
63 |
warn "Orao $Orao::VERSION emulation starting\n"; |
warn "Orao $Orao::VERSION emulation starting\n"; |
64 |
|
|
65 |
|
warn "emulating ", $#mem, " bytes of memory\n"; |
66 |
|
|
67 |
$self->open_screen; |
$self->open_screen; |
68 |
$self->load_rom({ |
$self->load_rom({ |
69 |
0x1000 => 'dump/SCRINV.BIN', |
0x1000 => 'dump/SCRINV.BIN', |
289 |
my $self = shift; |
my $self = shift; |
290 |
my ($addr) = @_; |
my ($addr) = @_; |
291 |
my $byte = $mem[$addr]; |
my $byte = $mem[$addr]; |
292 |
confess sprintf("can't find memory at address %04x",$addr); |
confess sprintf("can't find memory at address %04x",$addr) unless defined($byte); |
293 |
warn sprintf("# Orao::read(%04x) = %02x\n", $addr, $byte) if $self->trace; |
warn sprintf("# Orao::read(%04x) = %02x\n", $addr, $byte) if $self->trace; |
294 |
|
|
295 |
# keyboard |
# keyboard |
369 |
} |
} |
370 |
|
|
371 |
if ( $addr > 0xafff ) { |
if ( $addr > 0xafff ) { |
372 |
warn sprintf "write access 0x%04x > 0xafff aborting\n", $addr; |
confess sprintf "write access 0x%04x > 0xafff aborting\n", $addr; |
|
return; |
|
373 |
} |
} |
374 |
|
|
375 |
$self->mmap_pixel( $addr, $byte, 0, 0 ); |
$self->mmap_pixel( $addr, $byte, 0, 0 ); |