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

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

revision 130 by dpavlin, Sat Aug 4 20:34:59 2007 UTC revision 131 by dpavlin, Sat Aug 4 20:50:33 2007 UTC
# Line 6  use strict; Line 6  use strict;
6  use Carp qw/confess/;  use Carp qw/confess/;
7  use File::Slurp;  use File::Slurp;
8  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
9  use Z80 qw'@mem';  use Z80; # import
10    
11  use base qw(Class::Accessor VRac Z80 Screen Prefs);  use base qw(Class::Accessor VRac Z80 Screen Prefs);
12  __PACKAGE__->mk_accessors(qw(booted));  __PACKAGE__->mk_accessors(qw(booted));
# Line 39  our $emu; Line 39  our $emu;
39    
40  sub run {  sub run {
41          my $self = shift;          my $self = shift;
42          warn "Galaksija calling upstream init\n";  
43            warn "Galaksija $Galaksija::VERSION emulation starting\n";
44    
45            $self->show_mem( 1 );
46            $self->trace( 1 );
47    
48          $self->SUPER::init(          $self->SUPER::init(
49                  read => sub { $self->read( @_ ) },                  read => sub { $self->read( @_ ) },
50                  write => sub { $self->write( @_ ) },                  write => sub { $self->write( @_ ) },
51          );          );
52    
         warn "Galaksija $Galaksija::VERSION emulation starting\n";  
   
         warn "emulating ", $#mem, " bytes of memory\n";  
   
53          for my $a ( 0x1000 .. 0x2000 ) {          for my $a ( 0x1000 .. 0x2000 ) {
54                  $mem[$a] = 0xff;                  $mem[$a] = 0xff;
55          }          }
# Line 143  sub write { Line 144  sub write {
144          return;          return;
145  }  }
146    
147    =head2 cpu_PC
148    
149    Helper metod to set or get PC for current architecture
150    
151    =cut
152    
153    sub cpu_PC {
154            my ( $self, $addr ) = @_;
155            if ( defined($addr) ) {
156                    $PC = $addr;
157                    warn sprintf("running from PC %04x\n", $PC);
158            };
159            return $PC;
160    }
161    
162  =head1 AUTHOR  =head1 AUTHOR
163    
164  Dobrica Pavlinusic, C<< <dpavlin@rot13.org> >>  Dobrica Pavlinusic, C<< <dpavlin@rot13.org> >>

Legend:
Removed from v.130  
changed lines
  Added in v.131

  ViewVC Help
Powered by ViewVC 1.1.26