diff options
author | Michael Pavone <pavone@retrodev.com> | 2017-01-02 16:25:13 -0800 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2017-01-02 16:25:13 -0800 |
commit | 04869663109a86188677a5e65d8b68d6850a5c27 (patch) | |
tree | b7f4f2d7fe37dd5efcbe6ca59eb66f4c6454479d | |
parent | e87e2d186f3a5663cf91eb93dd1950299bb17020 (diff) |
Fix Mode 4 sprite table Y scan to account for VRAM byte swapping
-rw-r--r-- | vdp.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -470,7 +470,7 @@ static void scan_sprite_table_mode4(vdp_context * context) line &= 0xFF; uint32_t sat_address = mode4_address_map[(context->regs[REG_SAT] << 7 & 0x3F00) + context->sprite_index]; - uint32_t y = context->vdpmem[sat_address]; + uint32_t y = context->vdpmem[sat_address+1]; uint32_t size = (context->regs[REG_MODE_2] & BIT_SPRITE_SZ) ? 16 : 8; if (y >= 0xd0) { @@ -491,7 +491,7 @@ static void scan_sprite_table_mode4(vdp_context * context) } if (context->sprite_index < MAX_SPRITES_FRAME_H32) { - y = context->vdpmem[sat_address+1]; + y = context->vdpmem[sat_address]; if (y >= 0xd0) { context->sprite_index = MAX_SPRITES_FRAME_H32; return; |