Mercurial > repos > blastem
comparison vdp.c @ 1163:b251899f2b97
Fix disagreement on line change location between vdp_h32_mode4 and vdp_run_context that was causing the first line to be garbage in some cases
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 09 Jan 2017 19:24:11 -0800 |
parents | c2210d586950 |
children | e758ddbf0624 |
comparison
equal
deleted
inserted
replaced
1162:c4ea535cf57e | 1163:b251899f2b97 |
---|---|
1528 }\ | 1528 }\ |
1529 context->cycles += slot_cycles;\ | 1529 context->cycles += slot_cycles;\ |
1530 CHECK_ONLY | 1530 CHECK_ONLY |
1531 | 1531 |
1532 #define MODE4_CHECK_SLOT_LINE(slot) \ | 1532 #define MODE4_CHECK_SLOT_LINE(slot) \ |
1533 if ((slot) == LINE_CHANGE_MODE4) {\ | |
1534 vdp_advance_line(context);\ | |
1535 if (context->vcounter == 192) {\ | |
1536 return;\ | |
1537 }\ | |
1538 }\ | |
1539 if (context->flags & FLAG_DMA_RUN) { run_dma_src(context, -1); } \ | 1533 if (context->flags & FLAG_DMA_RUN) { run_dma_src(context, -1); } \ |
1540 if ((slot) == 147) {\ | 1534 if ((slot) == 147) {\ |
1541 context->hslot = 233;\ | 1535 context->hslot = 233;\ |
1542 } else {\ | 1536 } else {\ |
1543 context->hslot++;\ | 1537 context->hslot++;\ |
1544 }\ | 1538 }\ |
1545 context->cycles += slot_cycles;\ | 1539 context->cycles += slot_cycles;\ |
1540 if ((slot+1) == LINE_CHANGE_MODE4) {\ | |
1541 vdp_advance_line(context);\ | |
1542 if (context->vcounter == 192) {\ | |
1543 return;\ | |
1544 }\ | |
1545 }\ | |
1546 CHECK_ONLY | 1546 CHECK_ONLY |
1547 | 1547 |
1548 #define CALC_SLOT(slot, increment) ((slot+increment) > 147 && (slot+increment) < 233 ? (slot+increment-148+233): (slot+increment)) | 1548 #define CALC_SLOT(slot, increment) ((slot+increment) > 147 && (slot+increment) < 233 ? (slot+increment-148+233): (slot+increment)) |
1549 | 1549 |
1550 #define SPRITE_RENDER_H32_MODE4(slot) \ | 1550 #define SPRITE_RENDER_H32_MODE4(slot) \ |