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

revision 135 by dpavlin, Sat Aug 4 22:14:09 2007 UTC revision 150 by dpavlin, Sun Aug 5 15:16:10 2007 UTC
# Line 9  use Data::Dump qw/dump/; Line 9  use Data::Dump qw/dump/;
9  use M6502; # import @mem $PC and friends  use M6502; # import @mem $PC and friends
10  use Screen qw/$white $black/;  use Screen qw/$white $black/;
11    
12  use base qw(Class::Accessor VRac M6502 Screen Prefs Tape);  use base qw(Class::Accessor VRac M6502 Screen Prefs Tape Session);
13  #__PACKAGE__->mk_accessors(qw());  #__PACKAGE__->mk_accessors(qw());
14    
15  =head1 NAME  =head1 NAME
# Line 18  Orao - Orao emulator Line 18  Orao - Orao emulator
18    
19  =head1 VERSION  =head1 VERSION
20    
21  Version 0.05  Version 0.06
22    
23  =cut  =cut
24    
25  our $VERSION = '0.05';  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    
# Line 54  sub run { Line 54  sub run {
54          warn "emulating ", $#mem, " bytes of memory\n";          warn "emulating ", $#mem, " bytes of memory\n";
55    
56  #       $self->scale( 2 );  #       $self->scale( 2 );
57    #       $self->show_mem( 1 );
58            $self->load_session( 'session.pl' );
59    
60          $self->open_screen;          $self->open_screen;
61          $self->load_rom({          $self->load_rom({
# Line 79  sub run { Line 81  sub run {
81          $self->trace( 0 );          $self->trace( 0 );
82          $self->debug( 0 );          $self->debug( 0 );
83    
84          warn "rendering video memory\n";          warn "rendering memory\n";
85          $self->render_vram;          $self->render_mem( @mem );
86    
87          if ( $self->show_mem ) {          if ( $self->show_mem ) {
88    
                 warn "rendering memory map\n";  
   
                 $self->render_mem( @mem );  
   
89                  my @mmap = (                  my @mmap = (
90                          0x0000, 0x03FF, 'nulti blok',                          0x0000, 0x03FF, 'nulti blok',
91                          0x0400, 0x5FFF, 'korisnički RAM (23K)',                          0x0400, 0x5FFF, 'korisnički RAM (23K)',
# Line 99  sub run { Line 97  sub run {
97                          0xE000, 0xFFFF, 'sistemski ROM',                          0xE000, 0xFFFF, 'sistemski ROM',
98                  );                  );
99    
100                    print "Orao memory map:";
101    
102                    while ( @mmap ) {
103                            my ( $from, $to, $desc ) = splice(@mmap, 0, 3);
104                            printf("%04x-%04x %s\n", $from, $to, $desc);
105                    }
106    
107          }          }
108          $self->sync;  
109          $self->trace( $trace );          $self->trace( $trace );
110          $self->debug( $debug );          $self->debug( $debug );
111    
# Line 385  sub write { Line 390  sub write {
390          warn sprintf("# Orao::write(%04x,%02x)\n", $addr, $byte) if $self->trace;          warn sprintf("# Orao::write(%04x,%02x)\n", $addr, $byte) if $self->trace;
391    
392          if ( $addr == 0x8800 ) {          if ( $addr == 0x8800 ) {
393                    $self->write_tape( $byte );
394                  warn sprintf "sound ignored: %x\n", $byte;                  warn sprintf "sound ignored: %x\n", $byte;
395          }          }
396    
# Line 397  sub write { Line 403  sub write {
403          return;          return;
404  }  }
405    
406    =head1 Architecture specific
407    
408  =head2 render_vram  =head2 render_vram
409    
410  Render one frame of video ram  Render one frame of video ram
# Line 441  sub render_vram { Line 449  sub render_vram {
449    
450  =head2 cpu_PC  =head2 cpu_PC
451    
452    Helper metod to set or get PC for current architecture
453    
454  =cut  =cut
455    
456  sub cpu_PC {  sub cpu_PC {
# Line 452  sub cpu_PC { Line 462  sub cpu_PC {
462          return $PC;          return $PC;
463  }  }
464    
465    =head1 SEE ALSO
466    
467    L<VRac>, L<M6502>, L<Screen>, L<Tape>
468    
469  =head1 AUTHOR  =head1 AUTHOR
470    
471  Dobrica Pavlinusic, C<< <dpavlin@rot13.org> >>  Dobrica Pavlinusic, C<< <dpavlin@rot13.org> >>
472    
 =head1 BUGS  
   
473  =head1 ACKNOWLEDGEMENTS  =head1 ACKNOWLEDGEMENTS
474    
475  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.135  
changed lines
  Added in v.150

  ViewVC Help
Powered by ViewVC 1.1.26