class GBA::PPU

Defined in:

crab/gba/ppu.cr

Constant Summary

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

Constructors

Instance Method Summary

Constructor Detail

def self.new(gba : GBA) #

[View source]

Instance Method Detail

def [](io_addr : UInt32) : UInt8 #

[View source]
def []=(io_addr : UInt32, value : UInt8) : Nil #

[View source]
def bitmap? : Bool #

[View source]
def blend(top : UInt16, bot : UInt16, blend_mode : BlendMode) : UInt16 #

Simple blending routine just to mix two UInt16 colors.


[View source]
def blend(top : Color, bot : Color, effects_enabled : Bool) : UInt16 #

Blend the colors handling special-case sprite logic.


[View source]
def calculate_color(col : Int) : UInt16 #

Calculate the color at the current position.


[View source]
def composite(scanline : Slice(UInt16)) : Nil #

[View source]
def draw : Nil #

[View source]
def end_hblank : Nil #

[View source]
def frame : Bool #

[View source]
def frame=(frame : Bool) #

[View source]
def framebuffer : Slice(UInt16) #

[View source]
def get_enables(col : Int) : Tuple(UInt16, Bool) #

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


[View source]
def oam : Slice(UInt8) #

[View source]
def pram : Slice(UInt8) #

[View source]
def render_aff_bg(bg : Int) : Nil #

[View source]
def render_reg_bg(bg : Int) : Nil #

[View source]
def render_sprites : Nil #

[View source]
def scanline : Nil #

[View source]
def 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


[View source]
def select_top_colors(enable_bits : Int, col : Int) : Tuple(Color, Color) #

Select the top two colors at the current position.


[View source]
def start_hblank : Nil #

[View source]
def start_line : Nil #

[View source]
def vram : Slice(UInt8) #

[View source]