/[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 92 by dpavlin, Thu Aug 2 12:49:19 2007 UTC revision 94 by dpavlin, Thu Aug 2 13:04:29 2007 UTC
# Line 56  Setup read and write memory hooks (to im Line 56  Setup read and write memory hooks (to im
56    
57  our $_rw_hooks = {  our $_rw_hooks = {
58          read => sub {          read => sub {
59                  warn sprintf("# callback read(%04x) not implemented", @_) if $debug;                  warn sprintf("# callback read(%04x) not implemented\n", @_) if $debug;
60                  return $mem[$_[0]];                  return $mem[$_[0]];
61          },          },
62          write => sub {          write => sub {
# Line 175  sub _update_perl_R { Line 175  sub _update_perl_R {
175          dump_R();          dump_R();
176  }  }
177    
178    =head1 XS
179    
180    Following functions are implemented in C<M6502.xs> and exported to perl.
181    
182    =head2 set_debug
183    
184      M6502::set_debug( 0 );
185    
186    =head2 get_debug
187    
188      my $debug = M6502::set_debug();
189    
190    =head2 reset
191    
192    Reset 6502 CPU, reading PC from C<0xfffc>
193    
194      M6502::reset();
195    
196    =head2 update_C_R
197    
198    Push perl notion of register values to CPU emulator
199    
200      M6502::update_C_R();
201    
202    =head2 update_perl_R
203    
204    Update perl notion of register values
205    
206      M6502::update_perl_R();
207    
208    =head2 exec
209    
210    Execute cpu for specified number of cycles
211    
212      my $cycles_left = M6502::exec( $execute_cpu_cycles );
213    
214    =head1 Helpers
215    
216  =head2 dump_R  =head2 dump_R
217    
218  helper function which dumps registers in humanly readable form  helper function which dumps registers in humanly readable form

Legend:
Removed from v.92  
changed lines
  Added in v.94

  ViewVC Help
Powered by ViewVC 1.1.26