The romreader Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The romreader Reference Manual

This is the romreader Reference Manual, version 0.5, generated automatically by Declt version 2.3 "Robert April" on Tue Jan 09 15:40:16 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

romreader

An extensible reader of ROM formats in portable CL.

Install

You are strongly encouraged to use this library via Quicklisp. Simply start your lisp and run: (ql:quickload 'romreader).

Getting Started

If you're reading this, you're probably interested in parsing ROMs using Lisp. There are 3 things you can do with romreader: parse a rom it supports, teach it how to parse a new format, and access parts of a loaded rom.

Thus far, I have been using a plist to store metadata and a vector to store the binary but feel free to use your own representations. rom-binary and rom-metadata don't care. :)

Docs

API Docs


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 romreader

Author

Brit Butler <redline6561@gmail.com>

License

BSD

Description

A library for reading various ROM formats.

Version

0.5

Source

romreader.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 romreader.asd

Location

/home/quickbuilder/quicklisp/dists/quicklisp/software/romreader-20140713-git/romreader.asd

Systems

romreader (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 romreader/package.lisp

Parent

romreader (system)

Location

package.lisp

Packages

romreader


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.3 romreader/conditions.lisp

Dependency

package.lisp (file)

Parent

romreader (system)

Location

conditions.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.4 romreader/romreader.lisp

Dependency

conditions.lisp (file)

Parent

romreader (system)

Location

romreader.lisp

Exported Definitions
Internal Definitions

Previous: , Up: Lisp files   [Contents][Index]

3.1.5 romreader/nes.lisp

Dependency

romreader.lisp (file)

Parent

romreader (system)

Location

nes.lisp

Packages

romreader-nes

Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

4.1 romreader

Homepage: <a href="http://github.com/redline6561/romreader">Github</a>

Source

package.lisp (file)

Use List

common-lisp

Used By List

romreader-nes

Exported Definitions
Internal Definitions

Previous: , Up: Packages   [Contents][Index]

4.2 romreader-nes

Source

nes.lisp (file)

Use List
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Special variables

Special Variable: *valid-formats*

A list of ROM formats with implemented readers. Do not manually modify this.

Package

romreader

Source

romreader.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Macros

Macro: defreader FORMAT &body BODY

Define a reader for FORMAT. FORMAT should be a pathname-type
(i.e. file extension). FORMAT will be added to *valid-formats* if needed. BODY executes inside a WITH-OPEN-FILE binding ’in’ to a binary-stream of the ROM. The BODY should return a list like so: (rom-metadata rom-binary).

Package

romreader

Source

romreader.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.3 Functions

Function: load-rom PATH

Check to see if PATH exists and is a supported ROM format. If so, call the appropriate reader and return a ROM instance, otherwise error.

Package

romreader

Source

romreader.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.4 Generic functions

Generic Function: rom-binary ROM

Return a bytevector of the ROM data.

Package

romreader

Source

romreader.lisp (file)

Methods
Method: rom-binary (ROM rom)

automatically generated reader method

Generic Function: rom-chr ROM

Return the character/sprite data from the ROM.

Package

romreader

Source

romreader.lisp (file)

Writer

(setf rom-chr) (generic function)

Methods
Method: rom-chr (ROM rom)

automatically generated reader method

Generic Function: (setf rom-chr) NEW-VALUE OBJECT
Package

romreader

Reader

rom-chr (generic function)

Methods
Method: (setf rom-chr) NEW-VALUE (ROM rom)

automatically generated writer method

Source

romreader.lisp (file)

Generic Function: rom-format ROM

Return the file extension of the ROM as a symbol.

Package

romreader

Source

romreader.lisp (file)

Methods
Method: rom-format (ROM rom)

automatically generated reader method

Generic Function: rom-metadata ROM

Return a plist of the ROM metadata.

Package

romreader

Source

romreader.lisp (file)

Methods
Method: rom-metadata (ROM rom)

automatically generated reader method

Generic Function: rom-prg ROM

Return the program data from the ROM.

Package

romreader

Source

romreader.lisp (file)

Writer

(setf rom-prg) (generic function)

Methods
Method: rom-prg (ROM rom)

automatically generated reader method

Generic Function: (setf rom-prg) NEW-VALUE OBJECT
Package

romreader

Reader

rom-prg (generic function)

Methods
Method: (setf rom-prg) NEW-VALUE (ROM rom)

automatically generated writer method

Source

romreader.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.5 Conditions

Condition: malformed-header ()

Signalled when a corrupted or invalid header is encountered.

Package

romreader

Source

conditions.lisp (file)

Direct superclasses

romreader-error (condition)

Direct methods

message (method)

Direct slots
Slot: message
Initargs

:message

Readers

message (generic function)

Condition: romreader-error ()

The base condition for all errors in ROMREADER.

Package

romreader

Source

conditions.lisp (file)

Direct superclasses

error (condition)

Direct subclasses

Previous: , Up: Exported definitions   [Contents][Index]

5.1.6 Classes

Class: rom ()
Package

romreader

Source

romreader.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses

nes (class)

Direct methods
Direct slots
Slot: metadata
Initargs

:metadata

Readers

rom-metadata (generic function)

Slot: binary
Initargs

:binary

Readers

rom-binary (generic function)

Slot: format
Initargs

:format

Readers

rom-format (generic function)

Slot: prg
Initargs

:prg

Readers

rom-prg (generic function)

Writers

(setf rom-prg) (generic function)

Slot: chr
Initargs

:prg

Readers

rom-chr (generic function)

Writers

(setf rom-chr) (generic function)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Special variables

Special Variable: *mapper-table*

A list of known NES Memory Mappers of the form (Number . Name).

Package

romreader-nes

Source

nes.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Functions

Function: ksymb &rest ARGS
Package

romreader

Source

romreader.lisp (file)

Function: mkstr &rest ARGS
Package

romreader

Source

romreader.lisp (file)

Function: parse-header BYTE-VECTOR
Package

romreader-nes

Source

nes.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.3 Generic functions

Generic Function: filename CONDITION
Package

romreader

Methods
Method: filename (CONDITION unknown-format)
Source

conditions.lisp (file)

Generic Function: message CONDITION
Package

romreader

Methods
Method: message (CONDITION malformed-header)
Source

conditions.lisp (file)

Generic Function: parse-rom FORMAT PATHNAME

Parse the file located at PATHNAME as a ROM of the given
FORMAT. FORMAT should be a symbol denoting a file extension. Returns a ROM instance.

Package

romreader

Source

romreader.lisp (file)

Methods
Method: parse-rom (ROM (eql nes)) PATHNAME
Source

nes.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.4 Conditions

Condition: unknown-format ()

Signalled when an appropriate parser method could not be found for the extension of the given ROM pathname.

Package

romreader

Source

conditions.lisp (file)

Direct superclasses

romreader-error (condition)

Direct methods

filename (method)

Direct slots
Slot: filename
Initargs

:filename

Readers

filename (generic function)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.5 Classes

Class: nes ()
Package

romreader-nes

Source

nes.lisp (file)

Direct superclasses

rom (class)

Direct methods

initialize-instance (method)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   L   R  
Index Entry  Section

F
File, Lisp, romreader.asd: The romreader<dot>asd file
File, Lisp, romreader/conditions.lisp: The romreader/conditions<dot>lisp file
File, Lisp, romreader/nes.lisp: The romreader/nes<dot>lisp file
File, Lisp, romreader/package.lisp: The romreader/package<dot>lisp file
File, Lisp, romreader/romreader.lisp: The romreader/romreader<dot>lisp file

L
Lisp File, romreader.asd: The romreader<dot>asd file
Lisp File, romreader/conditions.lisp: The romreader/conditions<dot>lisp file
Lisp File, romreader/nes.lisp: The romreader/nes<dot>lisp file
Lisp File, romreader/package.lisp: The romreader/package<dot>lisp file
Lisp File, romreader/romreader.lisp: The romreader/romreader<dot>lisp file

R
romreader.asd: The romreader<dot>asd file
romreader/conditions.lisp: The romreader/conditions<dot>lisp file
romreader/nes.lisp: The romreader/nes<dot>lisp file
romreader/package.lisp: The romreader/package<dot>lisp file
romreader/romreader.lisp: The romreader/romreader<dot>lisp file

Jump to:   F   L   R  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   (  
D   F   G   K   L   M   P   R  
Index Entry  Section

(
(setf rom-chr): Exported generic functions
(setf rom-chr): Exported generic functions
(setf rom-prg): Exported generic functions
(setf rom-prg): Exported generic functions

D
defreader: Exported macros

F
filename: Internal generic functions
filename: Internal generic functions
Function, ksymb: Internal functions
Function, load-rom: Exported functions
Function, mkstr: Internal functions
Function, parse-header: Internal functions

G
Generic Function, (setf rom-chr): Exported generic functions
Generic Function, (setf rom-prg): Exported generic functions
Generic Function, filename: Internal generic functions
Generic Function, message: Internal generic functions
Generic Function, parse-rom: Internal generic functions
Generic Function, rom-binary: Exported generic functions
Generic Function, rom-chr: Exported generic functions
Generic Function, rom-format: Exported generic functions
Generic Function, rom-metadata: Exported generic functions
Generic Function, rom-prg: Exported generic functions

K
ksymb: Internal functions

L
load-rom: Exported functions

M
Macro, defreader: Exported macros
message: Internal generic functions
message: Internal generic functions
Method, (setf rom-chr): Exported generic functions
Method, (setf rom-prg): Exported generic functions
Method, filename: Internal generic functions
Method, message: Internal generic functions
Method, parse-rom: Internal generic functions
Method, rom-binary: Exported generic functions
Method, rom-chr: Exported generic functions
Method, rom-format: Exported generic functions
Method, rom-metadata: Exported generic functions
Method, rom-prg: Exported generic functions
mkstr: Internal functions

P
parse-header: Internal functions
parse-rom: Internal generic functions
parse-rom: Internal generic functions

R
rom-binary: Exported generic functions
rom-binary: Exported generic functions
rom-chr: Exported generic functions
rom-chr: Exported generic functions
rom-format: Exported generic functions
rom-format: Exported generic functions
rom-metadata: Exported generic functions
rom-metadata: Exported generic functions
rom-prg: Exported generic functions
rom-prg: Exported generic functions

Jump to:   (  
D   F   G   K   L   M   P   R  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *  
B   C   F   M   P   S  
Index Entry  Section

*
*mapper-table*: Internal special variables
*valid-formats*: Exported special variables

B
binary: Exported classes

C
chr: Exported classes

F
filename: Internal conditions
format: Exported classes

M
message: Exported conditions
metadata: Exported classes

P
prg: Exported classes

S
Slot, binary: Exported classes
Slot, chr: Exported classes
Slot, filename: Internal conditions
Slot, format: Exported classes
Slot, message: Exported conditions
Slot, metadata: Exported classes
Slot, prg: Exported classes
Special Variable, *mapper-table*: Internal special variables
Special Variable, *valid-formats*: Exported special variables

Jump to:   *  
B   C   F   M   P   S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   M   N   P   R   S   U  
Index Entry  Section

C
Class, nes: Internal classes
Class, rom: Exported classes
Condition, malformed-header: Exported conditions
Condition, romreader-error: Exported conditions
Condition, unknown-format: Internal conditions

M
malformed-header: Exported conditions

N
nes: Internal classes

P
Package, romreader: The romreader package
Package, romreader-nes: The romreader-nes package

R
rom: Exported classes
romreader: The romreader system
romreader: The romreader package
romreader-error: Exported conditions
romreader-nes: The romreader-nes package

S
System, romreader: The romreader system

U
unknown-format: Internal conditions

Jump to:   C   M   N   P   R   S   U