#define dither_table_row(a, b, c, d) \
((a & 0xFF) | ((b & 0xFF) << 8) | ((c & 0xFF) << 16) | ((d & 0xFF) << 24)) \
-void initialize_psx_gpu(psx_gpu_struct *psx_gpu)
+void initialize_psx_gpu(psx_gpu_struct *psx_gpu, u16 *vram)
{
vec_8x16u test_mask =
{ { { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 } } };
psx_gpu->render_state_base = 0;
psx_gpu->num_blocks = 0;
- psx_gpu->vram_ptr = psx_gpu->_vram;
+ psx_gpu->vram_ptr = vram;
psx_gpu->texture_page_ptr = psx_gpu->vram_ptr;
psx_gpu->clut_ptr = psx_gpu->vram_ptr;
edge_data_struct span_edge_data[MAX_SPANS];
u32 span_b_offset[MAX_SPANS];
- u16 _vram[1024 * 512];
u8 texture_4bpp_cache[32][256 * 256];
u8 texture_8bpp_even_cache[16][256 * 256];
u8 texture_8bpp_odd_cache[16][256 * 256];
void flush_render_block_buffer(psx_gpu_struct *psx_gpu);
-void initialize_psx_gpu(psx_gpu_struct *psx_gpu);
+void initialize_psx_gpu(psx_gpu_struct *psx_gpu, u16 *vram);
void gpu_parse(psx_gpu_struct *psx_gpu, u32 *list, u32 size);
void triangle_benchmark(psx_gpu_struct *psx_gpu);
#define psx_gpu_span_edge_data_offset 0x4100
#define psx_gpu_span_b_offset_offset 0x5100
-#define psx_gpu__vram_offset 0x005900
-
#define edge_data_left_x_offset 0
#define edge_data_num_blocks_offset 2
#define edge_data_right_mask_offset 4
static gpu_dump_struct state;
psx_gpu_struct __attribute__((aligned(256))) _psx_gpu;
+u16 __attribute__((aligned(256))) _vram[1024 * 512];
#define percent_of(numerator, denominator) \
((((double)(numerator)) / (denominator)) * 100.0) \
screen = SDL_SetVideoMode(1024, 512, 32, 0);
}
- initialize_psx_gpu(psx_gpu);
+ initialize_psx_gpu(psx_gpu, _vram);
#ifdef PANDORA_BUILD
system("ofbset -fb /dev/fb1 -mem 6291456 -en 0");