Mercurial > repos > blastem
comparison vdp.c @ 2259:425b44fd7bf1
Fix TMS9918A sprite horizontal position
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 18 Dec 2022 22:42:27 -0800 |
parents | a28e1042f4de |
children | 3f155bc13183 |
comparison
equal
deleted
inserted
replaced
2258:a28e1042f4de | 2259:425b44fd7bf1 |
---|---|
3758 | 3758 |
3759 static uint8_t tms_sprite_clock(vdp_context *context, int16_t offset) | 3759 static uint8_t tms_sprite_clock(vdp_context *context, int16_t offset) |
3760 { | 3760 { |
3761 int16_t x = context->hslot << 1; | 3761 int16_t x = context->hslot << 1; |
3762 if (x > 294) { | 3762 if (x > 294) { |
3763 x -= 512; | 3763 x -= 512 + 8; |
3764 } else { | |
3765 x -= 8; | |
3764 } | 3766 } |
3765 x += offset; | 3767 x += offset; |
3766 uint8_t output = 0; | 3768 uint8_t output = 0; |
3767 for (int i = 0; i < 4; i++) { | 3769 for (int i = 0; i < 4; i++) { |
3768 if (x >= context->sprite_draw_list[i].x_pos) { | 3770 if (x >= context->sprite_draw_list[i].x_pos) { |