/[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

M6502/Orao.pm revision 77 by dpavlin, Wed Aug 1 13:01:17 2007 UTC Orao.pm revision 209 by dpavlin, Mon Apr 14 19:55:29 2008 UTC
# Line 4  use warnings; Line 4  use warnings;
4  use strict;  use strict;
5    
6  use Carp qw/confess/;  use Carp qw/confess/;
 use lib './lib';  
 #use Time::HiRes qw(time);  
7  use File::Slurp;  use File::Slurp;
8  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
9  use M6502;  use M6502 '0.0.3';
10    use Screen;
11    
12  use base qw(Class::Accessor M6502 Screen Prefs);  use base qw(Class::Accessor VRac M6502 Screen Prefs Tape Session);
13  __PACKAGE__->mk_accessors(qw(run_for));  #__PACKAGE__->mk_accessors(qw());
14    
15  =head1 NAME  =head1 NAME
16    
# Line 19  Orao - Orao emulator Line 18  Orao - Orao emulator
18    
19  =head1 VERSION  =head1 VERSION
20    
21  Version 0.02  Version 0.06
22    
23  =cut  =cut
24    
25  our $VERSION = '0.02';  our $VERSION = '0.06';
26    
27  =head1 SUMMARY  =head1 SUMMARY
28    
29  Emulator or Orao 8-bit 6502 machine popular in Croatia  Emulator for Orao 8-bit 6502 machine popular in Croatia (especially schools)
30    
31  =cut  =cut
32    
33  =head2 init  =head1 FUNCTIONS
34    
35  Start emulator, open L<Screen>, load initial ROM images, and render memory  =head2 run
36    
37  =cut  Start emulator, open L<Screen>, load initial ROM images, and start emulator loop
38    
39  our $orao;  =cut
40    
41  select(STDERR); $| = 1;  our $emu;
42    
43  sub init {  sub run {
44          my $self = shift;          my $self = shift;
45    
46            M6502::reset();
47            $self->_init_callbacks;
48    
49          warn "Orao calling upstream init\n";          warn "Orao calling upstream init\n";
50          $self->SUPER::init( $self, @_ );          $self->SUPER::init(
51                    read => sub { $self->read( @_ ) },
52                    write => sub { $self->write( @_ ) },
53            );
54    
55          warn "Orao $Orao::VERSION emulation starting\n";          warn "Orao $Orao::VERSION emulation starting\n";
56    
57            warn "emulating ", $#mem, " bytes of memory\n";
58    
59    #       $self->scale( 2 );
60            $self->show_mem( 1 );
61            $self->load_session( 'sess/current' );
62    
63          $self->open_screen;          $self->open_screen;
64          $self->load_rom({          $self->load_rom({
65                  0x1000 => 'dump/SCRINV.BIN',  #               0x1000 => 'dump/SCRINV.BIN',
66                  # should be 0x6000, but oraoemu has 2 byte prefix                  # should be 0x6000, but oraoemu has 2 byte prefix
67                  0x5FFE => 'dump/screen.dmp',  #               0x5FFE => '/home/dpavlin/orao/dump/screen.dmp',
68                  0xC000 => 'rom/BAS12.ROM',  #               0xC000 => 'rom/Orao/BAS12.ROM',
69                  0xE000 => 'rom/CRT12.ROM',  #               0xE000 => 'rom/Orao/CRT12.ROM',
70                    0xC000 => 'rom/Orao/BAS13.ROM',
71                    0xE000 => 'rom/Orao/CRT13.ROM',
72          });          });
73    
74  #       $PC = 0xDD11;   # BC  #       $PC = 0xDD11;   # BC
75  #       $PC = 0xC274;   # MC  #       $PC = 0xC274;   # MC
76    
77          $orao = $self;          $PC = 0xff89;
78    
79            $emu = $self;
80    
81  #       $self->prompt( 0x1000 );  #       $self->prompt( 0x1000 );
82    
# Line 68  sub init { Line 84  sub init {
84          $self->trace( 0 );          $self->trace( 0 );
85          $self->debug( 0 );          $self->debug( 0 );
86    
87          $self->render( @mem[ 0x6000 .. 0x7fff ] );          warn "rendering memory\n";
88            $self->render_mem( M6502::mem_peek_region(0x0000,0xffff) );
89    
90          if ( $self->show_mem ) {          if ( $self->show_mem ) {
91    
                 warn "rendering memory map\n";  
   
                 $self->render_mem( @mem );  
   
92                  my @mmap = (                  my @mmap = (
93                          0x0000, 0x03FF, 'nulti blok',                          0x0000, 0x03FF, 'nulti blok',
94                          0x0400, 0x5FFF, 'korisnički RAM (23K)',                          0x0400, 0x5FFF, 'korisnički RAM (23K)',
# Line 87  sub init { Line 100  sub init {
100                          0xE000, 0xFFFF, 'sistemski ROM',                          0xE000, 0xFFFF, 'sistemski ROM',
101                  );                  );
102    
103          } else {                  print "Orao memory map:";
104    
105                    while ( @mmap ) {
106                            my ( $from, $to, $desc ) = splice(@mmap, 0, 3);
107                            printf("%04x-%04x %s\n", $from, $to, $desc);
108                    }
109    
                 warn "rendering video memory\n";  
                 $self->render( @mem[ 0x6000 .. 0x7fff ] );  
           
110          }          }
111          $self->sync;  
112          $self->trace( $trace );          $self->trace( $trace );
113          $self->debug( $debug );          $self->debug( $debug );
114    
115          #( $A, $P, $X, $Y, $S, $IPeriod ) = ( 1, 2, 3, 4, 5, 6 );          warn "Orao boot finished",
   
         warn "Orao init finished",  
116                  $self->trace ? ' trace' : '',                  $self->trace ? ' trace' : '',
117                  $self->debug ? ' debug' : '',                  $self->debug ? ' debug' : '',
118                  "\n";                  "\n";
119    
120  }  #       $self->load_tape( 'tapes/Orao/bdash.tap' );
121    #       $self->load_tape( 'tapes/Orao/crtanje.tap' );
122  =head2 load_rom          $self->load_tape( 'tapes/Orao/jjack.tap' );
123    
124            $self->render_vram;
125    
126            $self->loop( sub {
127                    my $run_for = shift;
128                    warn sprintf("about to exec from PC %04x for %d cycles\n", $PC, $run_for) if $self->trace;
129                    M6502::exec( $run_for );
130                    $self->render_vram;
131            });
132    };
133    
 called to init memory and load initial rom images  
134    
135    $orao->load_rom;  =head1 Helper functions
136    
137  =cut  =head2 write_chunk
138    
139  sub load_rom {  Write chunk directly into memory, updateing vram if needed
     my ($self, $loaded_files) = @_;  
140    
141      #my $time_base = time();    $emu->write_chunk( 0x1000, $chunk_data );
142    
143          foreach my $addr ( sort keys %$loaded_files ) {  =cut
                 my $path = $loaded_files->{$addr};  
                 $self->load_oraoemu( $path, $addr );  
         }  
 }  
144    
145  # write chunk directly into memory, updateing vram if needed  sub write_chunk {
 sub _write_chunk {  
146          my $self = shift;          my $self = shift;
147          my ( $addr, $chunk ) = @_;          my ( $addr, $chunk ) = @_;
148          $self->write_chunk( $addr, $chunk );          $self->SUPER::write_chunk( $addr, $chunk );
149          my $end = $addr + length($chunk);          my $end = $addr + length($chunk);
150          my ( $f, $t ) = ( 0x6000, 0x7fff );          my ( $f, $t ) = ( 0x6000, 0x7fff );
151    
# Line 142  sub _write_chunk { Line 158  sub _write_chunk {
158          $t = $end if ( $end < $t );          $t = $end if ( $end < $t );
159    
160          warn sprintf("refresh video ram %04x-%04x\n", $f, $t);          warn sprintf("refresh video ram %04x-%04x\n", $f, $t);
161  #       foreach my $a ( $f .. $t ) {          $self->render_vram;
162  #               $self->vram( $a - 0x6000 , $mem[ $a ] );          $self->render_mem( @mem );
 #       }  
         $self->render( @mem[ 0x6000 .. 0x7fff ] );  
         $self->render_mem( @mem ) if $self->show_mem;  
163  }  }
164    
165  =head2 load_oraoemu  =head2 load_image
166    
167  Load binary files, ROM images and Orao Emulator files  Load binary files, ROM images and Orao Emulator files
168    
169    $orao->load_oraoemu( '/path/to/file', 0x1000 );    $emu->load_image( '/path/to/file', 0x1000 );
170    
171  Returns true on success.  Returns true on success.
172    
173  =cut  =cut
174    
175  sub load_oraoemu {  sub load_image {
176          my $self = shift;          my $self = shift;
177          my ( $path, $addr ) = @_;          my ( $path, $addr ) = @_;
178    
# Line 175  sub load_oraoemu { Line 188  sub load_oraoemu {
188          if ( $size == 65538 ) {          if ( $size == 65538 ) {
189                  $addr = 0;                  $addr = 0;
190                  warn sprintf "loading oraoemu 64k dump %s at %04x - %04x %02x\n", $path, $addr, $addr+$size-1, $size;                  warn sprintf "loading oraoemu 64k dump %s at %04x - %04x %02x\n", $path, $addr, $addr+$size-1, $size;
191                  $self->_write_chunk( $addr, substr($buff,2) );                  $self->write_chunk( $addr, substr($buff,2) );
192                  return 1;                  return 1;
193          } elsif ( $size == 32800 ) {          } elsif ( $size == 32800 ) {
194                  $addr = 0;                  $addr = 0;
195                  warn sprintf "loading oraoemu 1.3 dump %s at %04x - %04x %02x\n", $path, $addr, $addr+$size-1, $size;                  warn sprintf "loading oraoemu 1.3 dump %s at %04x - %04x %02x\n", $path, $addr, $addr+$size-1, $size;
196                  $self->_write_chunk( $addr, substr($buff,0x20) );                  $self->write_chunk( $addr, substr($buff,0x20) );
197                  return 1;                  return 1;
198          }          }
         printf "loading %s at %04x - %04x %02x\n", $path, $addr, $addr+$size-1, $size;  
         $self->_write_chunk( $addr, $buff );  
         return 1;  
   
         my $chunk;  
   
         my $pos = 0;  
   
         while ( my $long = substr($buff,$pos,4) ) {  
                 my @b = split(//, $long, 4);  
                 $chunk .=  
                         ( $b[3] || '' ) .  
                         ( $b[2] || '' ) .  
                         ( $b[1] || '' ) .  
                         ( $b[0] || '' );  
                 $pos += 4;  
         }  
   
         $self->_write_chunk( $addr, $chunk );  
199    
200            printf "loading %s at %04x - %04x %02x\n", $path, $addr, $addr+$size-1, $size;
201            $self->write_chunk( $addr, $buff );
202          return 1;          return 1;
203  };  };
204    
 =head2 save_dump  
   
   $orao->save_dump( 'filename', $from, $to );  
   
 =cut  
   
 sub save_dump {  
         my $self = shift;  
   
         my ( $path, $from, $to ) = @_;  
   
         $from ||= 0;  
         $to ||= 0xffff;  
   
         open(my $fh, '>', $path) || die "can't open $path: $!";  
         print $fh $self->read_chunk( $from, $to );  
         close($fh);  
   
         my $size = -s $path;  
         warn sprintf "saved %s %d %x bytes\n", $path, $size, $size;  
 }  
   
 =head2 hexdump  
   
   $orao->hexdump( $address );  
   
 =cut  
   
 sub hexdump {  
         my $self = shift;  
         my $a = shift;  
         return sprintf(" %04x %s\n", $a,  
                 join(" ",  
                         map {  
                                 if ( defined($_) ) {  
                                         sprintf( "%02x", $_ )  
                                 } else {  
                                         '  '  
                                 }  
                         } @mem[ $a .. $a+8 ]  
                 )  
         );  
 }  
205    
206  =head1 Memory management  =head1 Memory management
207    
# Line 265  Read from memory Line 218  Read from memory
218    
219  =cut  =cut
220    
221    my $keyboard_none = 255;
222    
223    my $keyboard = {
224            0x87FC => {
225                    'right'         => 16,
226                    'down'          => 128,
227                    'up'            => 192,
228                    'left'          => 224,
229                    'backspace' => 224,
230            },
231            0x87FD => sub {
232                    my $self = shift;
233                    if ( $self->key_active('return') ) {
234    #                       M6502::_write( 0xfc, 13 );
235                            warn "return\n";
236                            return 0;
237                    } elsif ( $self->key_active('left ctrl','right ctrl') ) {
238                            warn "ctrl\n";
239                            return 16;
240                    }
241                    return $keyboard_none;
242            },
243            0x87FA => {
244                    'f4' => 16,
245                    'f3' => 128,
246                    'f2' => 192,
247                    'f1' => 224,
248            },
249            0x87FB => sub {
250                    my $self = shift;
251                    if ( $self->key_active('space') ) {
252                            warn "space\n";
253                            return 32;
254                    } elsif ( $self->key_active('left shift','right shift') ) {
255                            warn "shift\n";
256                            return 16;
257    #               } elsif ( $self->tape ) {
258    #                       warn "has tape!";
259    #                       return 0;
260                    }
261                    return $keyboard_none;
262            },
263            0x87F6 => {
264                    '6' => 16,
265                    't' => 128,
266                    'y' => 192,     # hr: z
267                    'r' => 224,
268            },
269            0x87F7 => {
270                    '5' => 32,
271                    '4' => 16,
272            },
273            0x87EE => {
274                    '7' => 16,
275                    'u' => 128,
276                    'i' => 192,
277                    'o' => 224,
278            },
279            0x87EF => {
280                    '8' => 32,
281                    '9' => 16,
282            },
283            0x87DE => {
284                    '1' => 16,
285                    'w' => 128,
286                    'q' => 192,
287                    'e' => 224,
288            },
289            0x87DF => {
290                    '2' => 32,
291                    '3' => 16,
292            },
293            0x87BE => {
294                    'm' => 16,
295                    'k' => 128,
296                    'j' => 192,
297                    'l' => 224,
298            },
299            0x87BF => {
300                    ',' => 32,      # <
301                    '.' => 16,      # >
302            },
303            0x877E => {
304                    'z' => 16,      # hr:y
305                    's' => 128,
306                    'a' => 192,
307                    'd' => 224,
308            },
309            0x877F => {
310                    'x' => 32,
311                    'c' => 16,
312            },
313            0x86FE => {
314                    'n' => 16,
315                    'g' => 128,
316                    'h' => 192,
317                    'f' => 224,
318            },
319            0x86FF => {
320                    'b' => 32,
321                    'v' => 16,
322            },
323            0x85FE => {
324                    '<' => 16,              # :
325                    '\\' => 128,    # ¾
326                    '\'' => 192,    # ę
327                    ';' => 224,             # č
328            },
329            0x85FF => {
330                    '/' => 32,
331                    'f11' => 16,    # ^
332            },
333            0x83FE => {
334                    'f12' => 16,    # ;
335                    '[' => 128,             # ¹
336                    ']' => 192,             # š
337                    'p' => 224,
338            },
339            0x83FF => {
340                    '-' => 32,
341                    '0' => 16,
342            },
343    };
344    
345  sub read {  sub read {
346          my $self = shift;          my $self = shift;
347          my ($addr) = @_;          my ($addr) = @_;
348            die "address over 64k: $addr" if ( $addr > 0xffff );
349          my $byte = $mem[$addr];          my $byte = $mem[$addr];
350            confess sprintf("can't find memory at address %04x",$addr) unless defined($byte);
351          warn sprintf("# Orao::read(%04x) = %02x\n", $addr, $byte) if $self->trace;          warn sprintf("# Orao::read(%04x) = %02x\n", $addr, $byte) if $self->trace;
352          $self->mmap_pixel( $addr, 0, $byte, 0 );  
353            # keyboard
354    
355            if ( defined( $keyboard->{$addr} ) ) {
356                    warn sprintf("keyboard port: %04x\n",$addr) if $self->trace;
357            
358                    my $ret = $keyboard_none;
359                    my $r = $keyboard->{$addr} || confess "no definition for keyboard port found";
360                    if ( ref($r) eq 'CODE' ) {
361                            $ret = $r->($self);
362                    } else {
363                            foreach my $k ( keys %$r ) {
364                                    my $return = 0;
365                                    if ( $self->key_active($k) ) {
366                                            warn "key '$k' is active\n";
367                                            $return ||= $r->{$k};
368                                    }
369                                    $ret = $return if $return;
370                            }
371                    }
372                    warn sprintf("keyboard port: %04x code: %d\n",$addr,$ret) if ( $ret != $keyboard_none );
373                    return $ret;
374            }
375    
376            if ( $addr == 0x87ff ) {
377                    return $self->read_tape;
378            }
379    
380            $self->mmap_pixel( $addr, 0, $byte, 0 ) if $self->show_mem;
381          return $byte;          return $byte;
382  }  }
383    
# Line 287  sub write { Line 394  sub write {
394          my ($addr,$byte) = @_;          my ($addr,$byte) = @_;
395          warn sprintf("# Orao::write(%04x,%02x)\n", $addr, $byte) if $self->trace;          warn sprintf("# Orao::write(%04x,%02x)\n", $addr, $byte) if $self->trace;
396    
         if ( $addr >= 0x6000 && $addr < 0x8000 ) {  
                 $self->vram( $addr - 0x6000 , $byte );  
         }  
   
397          if ( $addr == 0x8800 ) {          if ( $addr == 0x8800 ) {
398                    $self->write_tape( $byte );
399                  warn sprintf "sound ignored: %x\n", $byte;                  warn sprintf "sound ignored: %x\n", $byte;
400          }          }
401    
402          if ( $addr > 0xafff ) {          if ( $addr > 0xafff ) {
403                  warn sprintf "write access 0x%04x > 0xafff aborting\n", $addr;                  confess sprintf "write access 0x%04x > 0xafff aborting\n", $addr;
                 return;  
404          }          }
405    
406          $self->mmap_pixel( $addr, $byte, 0, 0 );          $self->render_vram if ( $addr >= 0x6000 && $addr <= 0x7fff );
407    
408          $mem[$addr] = $byte;          $self->mmap_pixel( $addr, $byte, 0, 0 ) if $self->show_mem;
409    #       $mem[$addr] = $byte;
410          return;          return;
411  }  }
412    
413  =head1 Command Line  =head1 Architecture specific
414    
415  Command-line debugging intrerface is implemented for communication with  =head2 render_vram
 emulated device  
416    
417  =head2 prompt  Render one frame of video ram
418    
419    my ( $entered_line, @p ) = $orao->prompt( $address, $last_command );    $self->render_vram;
420    
421  =cut  =cut
422    
423  my $last = 'r 1';  sub render_vram {
   
 sub prompt {  
424          my $self = shift;          my $self = shift;
425          $self->app->sync;  
426          my $a = shift;  #       my $pixels = pack("C*", map { $flip[$_] } @mem[ 0x6000 .. 0x7fff ]);
427          print STDERR $self->hexdump( $a ),  #       my $pixels = pack("C*", map { $flip[$_] } $self->ram( 0x6000, 0x7fff ));
428                  $last ? "[$last] " : '',          my $pixels = M6502::mem_peek_region( 0x6000, 0x7fff );
429                  "> ";  
430          my $in = <STDIN>;          my $vram = SDL::Surface->new(
431          chomp($in);                  -width => 256,
432          warn "## prompt got: $in\n" if $self->debug;                  -height => 256,
433          $in ||= $last;                  -depth => 1,    # 1 bit per pixel
434          $last = $in;                  -pitch => 32,   # bytes per line
435          return ( $in, split(/\s+/, $in) ) if $in;                  -from => $pixels,
436            );
437            $vram->set_colors( 0, $black, $white );
438    
439            $self->render_frame( $vram );
440  }  }
441    
442  =head2 cli  =head2 cpu_PC
443    
444    $orao->cli();  Helper metod to set or get PC for current architecture
445    
446  =cut  =cut
447    
448  my $show_R = 0;  sub cpu_PC {
449            my ( $self, $addr ) = @_;
450            if ( defined($addr) ) {
451                    $PC = $addr;
452                    warn sprintf("running from PC %04x\n", $PC);
453            };
454            return $PC;
455    }
456    
457    
458    =head2 _init_callbacks
459    
460    Mark memory areas for which we want to get callbacks to perl
461    
462  sub cli {  =cut
463    
464    sub _init_callbacks {
465          my $self = shift;          my $self = shift;
466          my $a = $PC || confess "no pc?";          warn "set calbacks to perl for memory areas...\n";
         warn $self->dump_R() if $show_R;  
         while ( my ($line, @v) = $self->prompt( $a, $last ) ) {  
                 my $c = shift @v;  
                 next unless defined($c);  
                 my $v = shift @v;  
                 $v = hex($v) if $v && $v =~ m/^[0-9a-f]+$/;  
                 @v = map { hex($_) } @v;  
                 printf "## a: %04x parsed cli: c:%s v:%s %s\n", $a, $c, ($v || 'undef'), join(",",@v) if $self->debug;  
                 if ( $c =~ m/^[qx]/i ) {  
                         exit;  
                 } elsif ( $c eq '?' ) {  
                         my $t = $self->trace ? 'on' : 'off' ;  
                         my $d = $self->debug ? 'on' : 'off' ;  
                         warn <<__USAGE__;  
 Usage:  
   
 x|q\t\texit  
 e 6000 6010\tdump memory, +/- to walk forward/backward  
 m 1000 ff 00\tput ff 00 on 1000  
 j|u 1000\t\tjump (change pc)  
 r 42\t\trun 42 instruction opcodes  
 t\t\ttrace [$t]  
 d\t\tdebug [$d]  
   
 __USAGE__  
                         warn $self->dump_R;  
                 } elsif ( $c =~ m/^e/i ) {  
                         $a = $v if defined($v);  
                         my $to = shift @v;  
                         $to = $a + 32 if ( ! $to || $to <= $a );  
                         $to = 0xffff if ( $to > 0xffff );  
                         my $lines = int( ($to - $a + 8) / 8 );  
                         printf "## e %04x %04x (%d bytes) lines: %d\n", $a, $to, ($to-$a), $lines;  
                         while ( --$lines ) {  
                                 print $self->hexdump( $a );  
                                 $a += 8;  
                         }  
                         $last = '+';  
                         $show_R = 0;  
                 } elsif ( $c =~ m/^\+/ ) {  
                         $a += 8;  
                         $show_R = 0;  
                 } elsif ( $c =~ m/^\-/ ) {  
                         $a -= 8;  
                         $show_R = 0;  
                 } elsif ( $c =~ m/^m/i ) {  
                         $a = $v if defined($v);  
                         $self->poke_code( $a, @v );  
                         printf "poke %d bytes at %04x\n", $#v + 1, $a;  
                         $last = '+';  
                         $show_R = 0;  
                 } elsif ( $c =~ m/^l/i ) {  
                         my $to = shift @v || 0x1000;  
                         $a = $to;  
                         $self->load_oraoemu( $v, $a );  
                         $last = '';  
                 } elsif ( $c =~ m/^s/i ) {  
                         $self->save_dump( $v || 'mem.dump', @v );  
                         $last = '';  
                 } elsif ( $c =~ m/^r/i ) {  
                         $run_for = $v || 1;  
                         print "run_for $run_for instructions\n";  
                         $show_R = 1;  
                         last;  
                 } elsif ( $c =~ m/^(u|j)/ ) {  
                         my $to = $v || $a;  
                         printf "set pc to %04x\n", $to;  
                         $PC = $to;      # remember for restart  
                         $run_for = 1;  
                         $last = "r $run_for";  
                         $show_R = 1;  
                         last;  
                 } elsif ( $c =~ m/^t/ ) {  
                         $self->trace( not $self->trace );  
                         print "trace ", $self->trace ? 'on' : 'off', "\n";  
                         $last = '';  
                 } elsif ( $c =~ m/^d/ ) {  
                         $self->debug( not $self->debug );  
                         print "debug ", $self->debug ? 'on' : 'off', "\n";  
                         $last = '';  
                 } else {  
                         warn "# ignored $line\n" if ($line);  
                         $last = '';  
                 }  
         }  
467    
468            # don't call for anything
469            M6502::set_all_callbacks( 0x00 );
470    
471            # video ram
472    #       M6502::set_write_callback( $_ ) foreach ( 0x6000 .. 0x7fff );
473            # keyboard
474            M6502::set_read_callback( $_ ) foreach ( keys %$keyboard );
475            # tape
476            M6502::set_read_callback( 0x87ff );
477            M6502::set_write_callback( 0x8800 );
478    
479            my $map = '';
480            foreach ( 0 .. 0xffff ) {
481                    my $cb = M6502::get_callback( $_ );
482                    $map .= sprintf( "%04x: %02x\n", $_, $cb ) if $cb;
483            }
484            warn "callback map:\n$map\n";
485  }  }
486    
487    =head1 SEE ALSO
488    
489    L<VRac>, L<M6502>, L<Screen>, L<Tape>
490    
491  =head1 AUTHOR  =head1 AUTHOR
492    
493  Dobrica Pavlinusic, C<< <dpavlin@rot13.org> >>  Dobrica Pavlinusic, C<< <dpavlin@rot13.org> >>
494    
 =head1 BUGS  
   
495  =head1 ACKNOWLEDGEMENTS  =head1 ACKNOWLEDGEMENTS
496    
497  See also L<http://www.foing.hr/~fng_josip/orao.htm> which is source of all  See also L<http://www.foing.hr/~fng_josip/orao.htm> which is source of all

Legend:
Removed from v.77  
changed lines
  Added in v.209

  ViewVC Help
Powered by ViewVC 1.1.26