--- M6502/Orao.pm 2007/08/02 12:01:09 89 +++ M6502/Orao.pm 2007/08/02 12:23:18 90 @@ -20,11 +20,11 @@ =head1 VERSION -Version 0.02 +Version 0.03 =cut -our $VERSION = '0.02'; +our $VERSION = '0.03'; =head1 SUMMARY @@ -55,10 +55,15 @@ sub boot { my $self = shift; warn "Orao calling upstream init\n"; - $self->SUPER::init( $self, @_ ); + $self->SUPER::init( + read => sub { $self->read( @_ ) }, + write => sub { $self->write( @_ ) }, + ); warn "Orao $Orao::VERSION emulation starting\n"; + warn "emulating ", $#mem, " bytes of memory\n"; + $self->open_screen; $self->load_rom({ 0x1000 => 'dump/SCRINV.BIN', @@ -284,7 +289,7 @@ my $self = shift; my ($addr) = @_; my $byte = $mem[$addr]; - confess sprintf("can't find memory at address %04x",$addr); + confess sprintf("can't find memory at address %04x",$addr) unless defined($byte); warn sprintf("# Orao::read(%04x) = %02x\n", $addr, $byte) if $self->trace; # keyboard @@ -364,8 +369,7 @@ } if ( $addr > 0xafff ) { - warn sprintf "write access 0x%04x > 0xafff aborting\n", $addr; - return; + confess sprintf "write access 0x%04x > 0xafff aborting\n", $addr; } $self->mmap_pixel( $addr, $byte, 0, 0 );