From 4eafbde6d2134edfbe1b23bb96b3a76c1f34a7a3 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Thu, 27 Apr 2017 23:08:49 -0700 Subject: Fixes to sprite phase 2 so that sprite X reads use the exact same slot as on hardware in the case that there are fewer than the max number of sprites on each line. Re-read sprite Y from SAT cache during phase 2 and properly mask the calculated row. Fixes remaining issues with spinning cube scene in Overdrive 2. --- vdp.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'vdp.h') diff --git a/vdp.h b/vdp.h index f16f5e8..3e35aa0 100644 --- a/vdp.h +++ b/vdp.h @@ -179,11 +179,6 @@ typedef struct { uint16_t hscroll_b; uint16_t h40_lines; uint16_t output_lines; - uint8_t hslot; //hcounter/2 - uint8_t sprite_index; - uint8_t sprite_draws; - int8_t slot_counter; - int8_t cur_slot; sprite_draw sprite_draw_list[MAX_DRAWS]; sprite_info sprite_info_list[MAX_SPRITES_LINE]; uint8_t sat_cache[SAT_CACHE_SIZE]; @@ -192,6 +187,13 @@ typedef struct { uint16_t hv_latch; uint16_t prefetch; uint16_t test_port; + uint8_t hslot; //hcounter/2 + uint8_t sprite_index; + uint8_t sprite_draws; + int8_t slot_counter; + int8_t cur_slot; + uint8_t max_sprites_frame; + uint8_t max_sprites_line; uint8_t fetch_tmp[2]; uint8_t v_offset; uint8_t dma_cd; -- cgit v1.2.3