Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Journal of LTjake (4001)

Wednesday August 02, 2006
07:18 AM

Games::NES::Rom, sprites abound!

[ #30512 ]

I've had this module, Games::NES::ROM, sitting on my drive for a while, so i thought i'd push it to CPAN. It's a fun little module that loads up an NES ROM file and parses its contents. It's not a terribly difficult module to understand; read in a few bytes, shift some bits around, save the flags. But, it was interesting to learn about the anatomy of an NES ROM none the less.

The latest edition has a new method: sprite()

Given the CHR bank number and index offset of any given sprite, it will return a raw, 4 color, 8x8 image. With a little bit of extra hackery, I was able to generate a 16x32 table of the CHR bank from Super Mario Bros. 1 which, with a grayscale palette, looks like this.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.