221 |
=head2 render_mem |
=head2 render_mem |
222 |
|
|
223 |
$self->render_mem( @mem ); |
$self->render_mem( @mem ); |
224 |
|
$self->render_mem( $memory_bytes ); |
225 |
|
|
226 |
=cut |
=cut |
227 |
|
|
230 |
|
|
231 |
return unless $self->show_mem; |
return unless $self->show_mem; |
232 |
|
|
233 |
my $pixels = pack("C*", @_); |
my $pixels; |
234 |
|
if ( defined $# ) { |
235 |
|
$pixels = pack("C*", @_); |
236 |
|
} else { |
237 |
|
$pixels = shift; |
238 |
|
} |
239 |
|
|
240 |
my $vram = SDL::Surface->new( |
my $vram = SDL::Surface->new( |
241 |
-width => 256, |
-width => 256, |
380 |
} |
} |
381 |
} |
} |
382 |
|
|
383 |
# helper array to flip bytes for display |
=head2 @flip |
384 |
|
|
385 |
|
Exported helper array used to flip bytes (from character roms for example) |
386 |
|
|
387 |
|
my $flipped = $flip[ $byte ]; |
388 |
|
|
389 |
|
=cut |
390 |
|
|
391 |
our @flip; |
our @flip; |
392 |
|
|
393 |
foreach my $i ( 0 .. 255 ) { |
foreach my $i ( 0 .. 255 ) { |