class

GBA::PPU

Inherits Reference < Object

Constants

SPRITE_PIXEL = SpritePixel.new(4, 0, false, false)

Constructors

new(gba : GBA)
Source

Instance methods

[](io_addr : UInt32) : UInt8
Source
[]=(io_addr : UInt32, value : UInt8) : Nil
Source
bitmap?
Source
blend(top : UInt16, bot : UInt16, blend_mode : BlendMode) : UInt16

Simple blending routine just to mix two UInt16 colors.

Source
blend(top : Color, bot : Color, effects_enabled : Bool) : UInt16

Blend the colors handling special-case sprite logic.

Source
calculate_color(col : Int) : UInt16

Calculate the color at the current position.

Source
composite(scanline : Slice(UInt16)) : Nil
Source
draw
Source
end_hblank
Source
frame
Source
frame=(frame : Bool)
Source
framebuffer
Source
get_enables(col : Int) : Tuple(UInt16, Bool)

Returns a u16 representing the layer enable bits and a bool indicating whether effects are enabled.

Source
pram
Source
render_aff_bg(bg : Int) : Nil
Source
render_reg_bg(bg : Int) : Nil
Source
render_sprites
Source
scanline
Source
se_address(tx : Int, ty : Int, screen_size : Int) : Int

Get the screen entry offset from the tile x, tile y, and background screen-size param using tonc algo

Source
select_top_colors(enable_bits : Int, col : Int) : Tuple(Color, Color)

Select the top two colors at the current position.

Source
start_hblank
Source
start_line
Source
vram
Source