56 |
|
|
57 |
our $_rw_hooks = { |
our $_rw_hooks = { |
58 |
read => sub { |
read => sub { |
59 |
|
warn sprintf("# callback read(%04x) not implemented", @_) if $debug; |
60 |
return $mem[$_[0]]; |
return $mem[$_[0]]; |
61 |
}, |
}, |
62 |
write => sub { |
write => sub { |
63 |
|
warn sprintf("# callback write(%04x,%02x) not implemented", @_) if $debug; |
64 |
$mem[$_[0]] = $_[1]; |
$mem[$_[0]] = $_[1]; |
65 |
}, |
}, |
66 |
}; |
}; |
92 |
warn sprintf("## M6502::poke_code(%04x,%s)\n", $addr, dump( @_ )) if $self->debug; |
warn sprintf("## M6502::poke_code(%04x,%s)\n", $addr, dump( @_ )) if $self->debug; |
93 |
#$mem[$addr++] = $_ foreach @_; |
#$mem[$addr++] = $_ foreach @_; |
94 |
# call low-level write |
# call low-level write |
95 |
M6502::write($addr++, $_) foreach @_; |
$_rw_hooks->{write}->( $addr++, $_ ) foreach @_; |
96 |
} |
} |
97 |
|
|
98 |
=head2 ram |
=head2 ram |