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

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

revision 29 by dpavlin, Mon Jul 30 17:32:41 2007 UTC revision 31 by dpavlin, Mon Jul 30 18:07:29 2007 UTC
# Line 80  sub poke_code { Line 80  sub poke_code {
80          $mem[$addr++] = $_ foreach @_;          $mem[$addr++] = $_ foreach @_;
81  }  }
82    
83    =head2 write_chunk
84    
85      $emu->write_chunk( $address, $chunk_of_data );
86    
87    =cut
88    
89    sub write_chunk {
90            my ($self, $addr, $chunk) = @_;
91            my $len = length($chunk);
92            splice @mem, $addr, $len, unpack('C*', $chunk);
93    }
94    
95  =head2 ram  =head2 ram
96    
97  Read searies of bytes from memory without passing through MMU  Read searies of bytes from memory without passing through MMU
# Line 92  sub ram { Line 104  sub ram {
104          my $self = shift;          my $self = shift;
105          my ($from,$to) = @_;          my ($from,$to) = @_;
106          if ($from + $to) {          if ($from + $to) {
107                  #printf "ram %04x - %04x\n", $from, $to;                  printf "ram %04x - %04x\n", $from, $to;
108                  return $mem[$from .. $to - 1];                  return $mem[$from .. $to - 1];
109          }          }
110            printf "ram %04x\n", $from;
111          return $mem[$from] if defined($from);          return $mem[$from] if defined($from);
112          confess "no from address";          confess "no from address";
113  }  }

Legend:
Removed from v.29  
changed lines
  Added in v.31

  ViewVC Help
Powered by ViewVC 1.1.26