diff --git a/inc/main.inc b/inc/main.inc index a87d324..253f793 100644 --- a/inc/main.inc +++ b/inc/main.inc @@ -21,6 +21,13 @@ if HIRES { constant HEIGHT(240) } +if HICOLOR { + constant VIDEO_MODE(BPP32 | INTERLACE | AA_MODE_2) +} else { +// constant VIDEO_MODE(BPP16 | AA_MODE_2) + constant VIDEO_MODE(BPP16 | GAMMA_EN | GAMMA_DITHER_EN | AA_MODE_1 | DIVOT_EN | PIXEL_ADV_3) +} + constant TASK_YIELDED(0x0001) constant TASK_DP_WAIT(0x0002) constant TASK_LOADABLE(0x0004) @@ -29,8 +36,8 @@ constant TASK_SP_ONLY(0x0008) constant VIDEO_C_IMAGE_SIZE(WIDTH * HEIGHT * (HICOLOR * 2 + 2)) constant VIDEO_Z_IMAGE_SIZE(WIDTH * HEIGHT * 2) constant VIDEO_OUTPUT_SIZE(0x18000) // technically a buffer? -constant VIDEO_STACK_SIZE(0x400) // used for dlist calls, pushing matrices, etc? -constant VIDEO_YIELD_SIZE(0xC00) // stores and restores DMEM. +constant VIDEO_STACK_SIZE(0x8000) // used for dlist calls, pushing matrices, etc? +constant VIDEO_YIELD_SIZE(0x1000) // stores and restores DMEM. // NOTE: these should be row-aligned to avoid caching issues and DMA issues. constant VIDEO_END(0x80400000) diff --git a/main.asm b/main.asm index 1587313..f2aaeae 100644 --- a/main.asm +++ b/main.asm @@ -118,8 +118,8 @@ MainLoop: - lui t0, VI_BASE lw t0, VI_V_CURRENT_LINE(t0) - // until line <= 3 - sltiu t0, 4 // larger values seem to die on N64 (cen64 has no problem) + // until line <= 10 + sltiu t0, 10 + 1 beqz t0,- nop @@ -144,11 +144,7 @@ KSL(SPreFrame, "now waiting for VI") KSL(SNewFrame, "next frame") SetupScreen: -if HICOLOR { - ScreenNTSC(WIDTH, HEIGHT, BPP32|INTERLACE|AA_MODE_2, VIDEO_C_IMAGE | UNCACHED) -} else { - ScreenNTSC(WIDTH, HEIGHT, BPP16|AA_MODE_2, VIDEO_C_IMAGE | UNCACHED) -} + ScreenNTSC(WIDTH, HEIGHT, VIDEO_MODE, VIDEO_C_IMAGE | UNCACHED) jr ra nop