/[VRac]/Orao.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /Orao.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 89 by dpavlin, Thu Aug 2 12:01:09 2007 UTC revision 90 by dpavlin, Thu Aug 2 12:23:18 2007 UTC
# Line 20  Orao - Orao emulator Line 20  Orao - Orao emulator
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    
# Line 55  select(STDERR); $| = 1; Line 55  select(STDERR); $| = 1;
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',
# Line 284  sub read { Line 289  sub read {
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
# Line 364  sub write { Line 369  sub write {
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 );

Legend:
Removed from v.89  
changed lines
  Added in v.90

  ViewVC Help
Powered by ViewVC 1.1.26