Functions
SET_BANK_SEGMENT
inline void SET_BANK_SEGMENT(
u8 b,
u8 s
)

Set the current segment of the given bank

Parameters
b
u8

Bank number to set (0-5, depending of the mapper)

s
u8

Segment to select in this bank (8 or 16-bit depending on the mapper)

SET_BANK_SEGMENT_LOW
inline void SET_BANK_SEGMENT_LOW(
u8 b,
u8 s
)

Set the low byte of the current segment of the given bank (for 16-bit mappers)

Parameters
b
u8

Bank number to set (0-5, depending of the mapper)

s
u8

Low byte of the segment to select in this bank

SET_BANK_SEGMENT_HIGH
inline void SET_BANK_SEGMENT_HIGH(
u8 b,
u8 s
)

Set the high byte of the current segment of the given bank (for 16-bit mappers)

Parameters
b
u8

Bank number to set (0-5, depending of the mapper)

s
u8

High byte of the segment to select in this bank

GET_BANK_SEGMENT
inline u8 GET_BANK_SEGMENT(
u8 b
)

Get the current segment of the given bank

Parameters
b
u8

Bank number to get (0-5, depending of the mapper)

Return

Segment selected in this bank (8 or 16-bit depending on the mapper)

GET_BANK_SEGMENT_LOW
inline u8 GET_BANK_SEGMENT_LOW(
u8 b
)

Get the low byte of the current segment of the given bank (for 16-bit mappers)

Parameters
b
u8

Bank number to get (0-5, depending of the mapper)

Return

Low byte of the segment selected in this bank

GET_BANK_SEGMENT_HIGH
inline u8 GET_BANK_SEGMENT_HIGH(
u8 b
)

Get the high byte of the current segment of the given bank (for 16-bit mappers)

Parameters
b
u8

Bank number to get (0-5, depending of the mapper)

Return

High byte of the segment selected in this bank