Display Control

namespace gba

Enums

enum oam_hblank_access

OAM access mode

See display_control.oam_hblank_access

Values:

enumerator locked

OAM memory cannot be modified during hblank.

enumerator unlocked

OAM can be modified during hblank.

struct display_control
#include <display_control.hpp>

Base implementation of display_control

Public Functions

inline display_control &flip_page() noexcept

Flips the value of display_control.page

Returns

this

Public Members

uint16 mode

Display mode (0, 1, 2, 3, 4 or 5)

bool color_game_boy

Read-only flag for CGB mode.

uint16 page

Currently displayed page (available only with mode 3 or 5)

gba::oam_hblank_access oam_hblank_access

OAM registers writable during hblank.

object::tile_map object_tile_map

Object tile mapping mode.

bool force_blank

Turn off display.

bool layer_background_0

Enable background layer 0.

bool layer_background_1

Enable background layer 1.

bool layer_background_2

Enable background layer 2.

bool layer_background_3

Enable background layer 3.

bool layer_object

Enable object layer.

bool window_0

Enable window 0.

bool window_1

Enable window 1.

bool window_object

Enable object window.

namespace object

Object namespace

Enums

enum tile_map

Object tile mapping mode

See display_control.object_tile_map

Values:

enumerator two_dimensional

Object tiles are arranged as a tile-map in memory.

enumerator one_dimensional

Object tiles are arranged sequentially in memory.

enumerator linear

alias of one_dimensional

namespace undocumented

Undocumented types

Enums

enum green_swap

Green-swap mode

Values:

enumerator normal

disabled

enumerator swap

enabled