Brian Cassidy

NAME

Games::NES::ROM::Format::INES - Loads data from a ROM in iNES format

DESCRIPTION

This module loads the details of an NES rom in iNES format. An iNES file is layed out as follows:

    +-----------+-----------------+---------+---------+ Header
    | NES\0x01a | [PC] [CC] F6 F7 | X X X X | X X X X | 16 Bytes
    +-----------+-----------------+---------+---------+
    |                                                 |
    |           Trainer (512 Bytes; Optional)         |
    |                                                 |
    +-------------------------------------------------+
    |                                                 |
    |           PRG Banks (PC * 16384 Bytes)          |
    |                                                 |
    +-------------------------------------------------+
    |                                                 |
    |           CHR Banks (CC * 8192 Bytes)           |
    |                                                 |
    +-------------------------------------------------+
    |                                                 |
    |           Title (128 Bytes; Optional)           |
    |                                                 |
    +-------------------------------------------------+
    
    PC: PRG bank count
    CC: CHR bank count
    F6: Various flags (Byte 6)
    F7: Various flags (Byte 7)

METHODS

BUILD( )

A Moose method which loads the ROM data from a file.

ATTRIBUTES

Along with the base attributes, the following iNES specific attributes are available:

  • id - iNES identifier: "NES\x1a"

  • trainer - Trainer data, if available

SEE ALSO

  • Games::NES::ROM

  • http://wiki.nesdev.com/w/index.php/INES

AUTHOR

Brian Cassidy <bricas@cpan.org>

COPYRIGHT AND LICENSE

Copyright 2007-2013 by Brian Cassidy

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.