Brass Core Plugins

rawpages

Writes output as a raw binary file of consecutive, padded pages.

Pages are output sequentially in the order of their indices, and each page in the binary is output at its declared size.

Unused regions of pages will be filled with the last defined empty fill value.

Warning

This output writer is incompatible with output modifiers that increase the size of data.

Example

Sega Master System Mega Cartridge.

/*
The Sega Master System's pages are 16KB in size.
Windows 0, 1 and 2 can be swapped at will (excluding the
first 1KB of window 0), but the official documentation
recommends using a fixed 32KB in windows 0 and 1 and only
varying window 2 (16KB).
$C000..$FFFF contains 8KB of RAM (mirrored) and the paging
registers.
Here is a sample that matches the "Mega" cartridge layout.
*/

; Page 0 is one large 32KB page.
.defpage 0, kb(32), $0000

; Pages 1 to 6 are all 16KB with a base address of $8000.
.for p is 1 to 6
    .defpage p + 1, kb(16), $8000
.loop

/*
For practicality, page indices are offset by 1.
This is so I can directly write a label's page value to
$FFFF and swap the page in automatically.
*/

See Also