diff options
author | Michael Pavone <pavone@retrodev.com> | 2020-02-27 18:38:15 -0800 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2020-02-27 18:38:15 -0800 |
commit | 9d1e8f4a08789a59e7721637720239e58120b01e (patch) | |
tree | fc2fdcb1316fd0fc5034a20de29a62dcfd00b5ef /vdp.h | |
parent | ad54f7bc43c818d9aed7f371e8986d59368025d2 (diff) |
Make VDP VSRAM capacity respect model selection
Diffstat (limited to 'vdp.h')
-rw-r--r-- | vdp.h | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -16,7 +16,8 @@ #define SHADOW_OFFSET CRAM_SIZE #define HIGHLIGHT_OFFSET (SHADOW_OFFSET+CRAM_SIZE) #define MODE4_OFFSET (HIGHLIGHT_OFFSET+CRAM_SIZE) -#define VSRAM_SIZE 40 +#define MIN_VSRAM_SIZE 40 +#define MAX_VSRAM_SIZE 64 #define VRAM_SIZE (64*1024) #define BORDER_LEFT 13 #define BORDER_RIGHT 14 @@ -178,6 +179,7 @@ typedef struct { uint32_t debugcolors[1 << (3 + 1 + 1 + 1)];//3 bits for source, 1 bit for priority, 1 bit for shadow, 1 bit for hilight uint16_t cram[CRAM_SIZE]; uint32_t frame; + uint32_t vsram_size; uint8_t cd; uint8_t flags; uint8_t regs[VDP_REGS]; @@ -186,7 +188,7 @@ typedef struct { uint32_t pending_vint_start; uint32_t pending_hint_start; uint32_t top_offset; - uint16_t vsram[VSRAM_SIZE]; + uint16_t vsram[MAX_VSRAM_SIZE]; uint16_t vscroll_latch[2]; uint16_t vcounter; uint16_t inactive_start; @@ -239,7 +241,7 @@ typedef struct { -vdp_context *init_vdp_context(uint8_t region_pal); +vdp_context *init_vdp_context(uint8_t region_pal, uint8_t has_max_vsram); void vdp_free(vdp_context *context); void vdp_run_context_full(vdp_context * context, uint32_t target_cycles); void vdp_run_context(vdp_context * context, uint32_t target_cycles); |