/[VRac]/M6502/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 /M6502/Orao.pm

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

revision 33 by dpavlin, Mon Jul 30 21:00:36 2007 UTC revision 34 by dpavlin, Mon Jul 30 21:34:30 2007 UTC
# Line 8  use lib './lib'; Line 8  use lib './lib';
8  #use Time::HiRes qw(time);  #use Time::HiRes qw(time);
9  use File::Slurp;  use File::Slurp;
10  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
11    use M6502;
12    
13  use base qw(Class::Accessor M6502 Screen);  use base qw(Class::Accessor M6502 Screen);
14  __PACKAGE__->mk_accessors(qw(debug trace run_for mem_dump trace));  __PACKAGE__->mk_accessors(qw(debug trace run_for mem_dump trace));
# Line 42  our $PC = 0x1000; Line 43  our $PC = 0x1000;
43    
44  sub init {  sub init {
45          my $self = shift;          my $self = shift;
46          warn "call upstream init\n";          warn "Orao calling upstream init\n";
47          $self->SUPER::init( $self, @_ );          $self->SUPER::init( $self, @_ );
48    
49          warn "staring Orao $Orao::VERSION emulation\n";          warn "staring Orao $Orao::VERSION emulation\n";
# Line 75  sub init { Line 76  sub init {
76                  my $o = $i * 3;                  my $o = $i * 3;
77                  my ( $from, $to, $desc ) = @mmap[$o,$o+1,$o+2];                  my ( $from, $to, $desc ) = @mmap[$o,$o+1,$o+2];
78                  printf "%04x - %04x - %s\n", $from, $to, $desc;                  printf "%04x - %04x - %s\n", $from, $to, $desc;
79  #               for my $a ( $from .. $to ) {                  for my $a ( $from .. $to ) {
80  #                       $orao->read( $a );                          $orao->read( $a );
81  #               }                  }
82  #               $self->sync;                  $self->sync;
83          }          }
84    
85            warn "Orao init finished\n";
86    
87  }  }
88    
89  =head2 load_rom  =head2 load_rom
# Line 128  sub load_oraoemu { Line 131  sub load_oraoemu {
131                  return;                  return;
132          }          }
133          printf "loading %s at %04x - %04x %02x\n", $path, $addr, $addr+$size-1, $size;          printf "loading %s at %04x - %04x %02x\n", $path, $addr, $addr+$size-1, $size;
134            return $self->poke_code( $addr, map { ord($_) } split(//,$buff) );
135          return $self->write_chunk( $addr, $buff );          return $self->write_chunk( $addr, $buff );
136    
137          my $chunk;          my $chunk;
# Line 215  L<Acme::6502> was just too slow to handl Line 219  L<Acme::6502> was just too slow to handl
219    
220  =cut  =cut
221    
 my @mem = (0xff) x 0x100000; # 64Mb  
   
222  =head2 read  =head2 read
223    
224  Read from memory  Read from memory

Legend:
Removed from v.33  
changed lines
  Added in v.34

  ViewVC Help
Powered by ViewVC 1.1.26