homebrew/inc/main.inc

34 lines
1.1 KiB
PHP

// settings:
constant K_DEBUG(0) // slows down interrupt handling to enable debug routines
constant MAIN_BASE(0x800E)
constant MAIN_COUNTS(0x0010)
constant MAIN_SP_TASK(0x0040)
constant MAIN_XXD(0x0080)
constant MAIN_DLIST(0x1000)
constant MAIN_DLIST_SIZE(0xF000)
constant MAIN_DLIST_JUMPER(MAIN_DLIST - 0xA8)
// video settings
constant WIDTH(640)
constant HEIGHT(480)
constant HICOLOR(1)
constant VIDEO_C_BUFFER_SIZE(WIDTH * HEIGHT * (HICOLOR * 2 + 2))
constant VIDEO_Z_BUFFER_SIZE(WIDTH * HEIGHT * 2)
constant VIDEO_SOMETHING_SIZE(0x18000)
constant VIDEO_STACK_SIZE(0x400)
constant VIDEO_YIELD_SIZE(0xC00)
constant VIDEO_END(0x80400000)
constant VIDEO_C_BUFFER(VIDEO_END - VIDEO_C_BUFFER_SIZE)
constant VIDEO_C_BUFFER_ALT(VIDEO_C_BUFFER - VIDEO_C_BUFFER_SIZE)
constant VIDEO_Z_BUFFER(VIDEO_C_BUFFER_ALT - VIDEO_Z_BUFFER_SIZE)
constant VIDEO_SOMETHING(VIDEO_Z_BUFFER - VIDEO_SOMETHING_SIZE)
constant VIDEO_STACK(VIDEO_SOMETHING - VIDEO_STACK_SIZE)
constant VIDEO_YIELD(VIDEO_STACK - VIDEO_YIELD_SIZE)
constant VIDEO_START(VIDEO_YIELD)
if VIDEO_START < (MAIN_BASE << 16) + 0x10000 {
error "ran out of memory for video"
}