/[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 137 by dpavlin, Sat Aug 4 22:40:14 2007 UTC revision 139 by dpavlin, Sat Aug 4 23:01:25 2007 UTC
# Line 65  sub run { Line 65  sub run {
65          $mem[$_] = 0xff foreach ( 0x2000 .. 0x2800 );          $mem[$_] = 0xff foreach ( 0x2000 .. 0x2800 );
66    
67          # display          # display
68          $mem[$_] = ' '  foreach ( 0x2800 .. 0x2a00 );          $mem[$_] = 0x20 foreach ( 0x2800 .. 0x2a00 );
69    
70          # 6116-ice          # 6116-ice
71          $mem[$_] = 0    foreach ( 0x2a00 .. 0x4000 );          $mem[$_] = 0    foreach ( 0x2a00 .. 0x4000 );
# Line 151  Simple hex dumper of text buffer Line 151  Simple hex dumper of text buffer
151    
152  =cut  =cut
153    
154    my $last_dump = '';
155    
156  sub render_vram {  sub render_vram {
157          my $self = shift;          my $self = shift;
158    
159          my $addr = 0x2800;          my $addr = 0x2800;
160    
161          print " "; # FIXME auch!          my $dump;
162    
163          for my $y ( 0 .. 15 ) {          for my $y ( 0 .. 15 ) {
164                  printf "%2d: %s\n",$y, join('', map { sprintf("%02x ",$_) } @mem[ $addr .. $addr+31 ] );                  $dump .= sprintf "%2d: %s\n",$y, join('', map { sprintf("%02x ",$_) } @mem[ $addr .. $addr+31 ] );
165                  $addr += 32;                  $addr += 32;
166          }          }
167            if ( $dump ne $last_dump ) {
168                    print $dump;
169                    $last_dump = $dump;
170            }
171  }  }
172    
173  =head2 cpu_PC  =head2 cpu_PC

Legend:
Removed from v.137  
changed lines
  Added in v.139

  ViewVC Help
Powered by ViewVC 1.1.26