214 |
my $char_rom = 'rom/Galaksija/CHRGEN.BIN'; |
my $char_rom = 'rom/Galaksija/CHRGEN.BIN'; |
215 |
|
|
216 |
my @chars = map { ord($_) } split(//, read_file( $char_rom )); |
my @chars = map { ord($_) } split(//, read_file( $char_rom )); |
217 |
warn "loaded ", $#chars, " characters\n"; |
warn "loaded ", $#chars, " bytes from $char_rom\n"; |
218 |
|
|
219 |
my @char2pos; |
my @char2pos; |
220 |
|
|
231 |
|
|
232 |
#warn "## chars2pos = ",dump( @char2pos ); |
#warn "## chars2pos = ",dump( @char2pos ); |
233 |
|
|
234 |
|
sub screen_width { 256 } |
235 |
|
sub screen_height { 16 * 13 } |
236 |
|
|
237 |
sub render_vram { |
sub render_vram { |
238 |
my $self = shift; |
my $self = shift; |
239 |
|
|
258 |
} |
} |
259 |
|
|
260 |
my $vram = SDL::Surface->new( |
my $vram = SDL::Surface->new( |
261 |
-width => 256, |
-width => $self->screen_width, |
262 |
-height => 256, |
-height => $self->screen_height, |
263 |
-depth => 1, # 1 bit per pixel |
-depth => 1, # 1 bit per pixel |
264 |
-pitch => 32, # bytes per line |
-pitch => 32, # bytes per line |
265 |
-from => pack("C*", @pixels), |
-from => pack("C*", @pixels), |