2 * (C) GraÅžvydas "notaz" Ignotas, 2011
4 * This work is licensed under the terms of any of these licenses
6 * - GNU GPL, version 2 or later.
7 * - GNU LGPL, version 2.1 or later.
8 * See the COPYING file in the top-level directory.
13 #define CMD_BUFFER_LEN 1024
16 uint16_t vram[1024 * 512];
17 uint16_t guard[1024 * 512]; // overdraw guard
18 uint32_t cmd_buffer[CMD_BUFFER_LEN];
23 uint32_t tx:4; // 0 texture page
26 uint32_t tp:2; // 7 t.p. mode (4,8,15bpp)
27 uint32_t dtd:1; // 9 dither
29 uint32_t md:1; // 11 set mask bit when drawing
30 uint32_t me:1; // 12 no draw on mask
32 uint32_t width1:1; // 16
34 uint32_t dheight:1; // 19 double height
35 uint32_t video:1; // 20 NTSC,PAL
37 uint32_t interlace:1; // 22 interlace on
38 uint32_t blanking:1; // 23 display not enabled
40 uint32_t busy:1; // 26 !busy drawing
41 uint32_t img:1; // 27 ready to DMA image data
42 uint32_t com:1; // 28 ready for commands
43 uint32_t dma:2; // 29 off, ?, to vram, from vram
60 const uint32_t *lcf_hc;
74 int32_t set:3; /* -1 auto, 0 off, 1 fixed */
76 uint32_t frame_ready:1;
77 uint32_t skipped_blits:5;
82 extern struct psx_gpu gpu;
84 extern const unsigned char cmd_lengths[256];
86 void do_cmd_list(uint32_t *list, int count);
88 int renderer_init(void);
89 void renderer_sync_ecmds(uint32_t * ecmds);
90 void renderer_invalidate_caches(int x, int y, int w, int h);
91 void renderer_flush_queues(void);
94 int vout_finish(void);