Skip to content

Commit a08b113

Browse files
authored
casio/pv1000.cpp: borders are on top and bottom (#12548)
1 parent 1d803e7 commit a08b113

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/mame/casio/pv1000.cpp

+9-9
Original file line numberDiff line numberDiff line change
@@ -353,23 +353,23 @@ DEVICE_IMAGE_LOAD_MEMBER(pv1000_state::cart_load)
353353

354354
uint32_t pv1000_state::screen_update_pv1000(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
355355
{
356-
bitmap.fill(m_border_col); // TODO: might be either black or colored by this register
356+
bitmap.fill(m_border_col); // border is on top and bottom
357357

358358
for (int y = 0; y < 24; y++)
359359
{
360-
for (int x = 2; x < 30; x++) // left-right most columns are definitely masked by the border color
360+
for (int x = 2; x < 30; x++) // left-right most columns never even drawn, black instead
361361
{
362362
uint16_t tile = m_p_videoram[y * 32 + x];
363363

364364
if (tile < 0xe0 || m_force_pattern)
365365
{
366366
tile += (m_pcg_bank << 8);
367-
m_gfxdecode->gfx(0)->opaque(bitmap,cliprect, tile, 0, 0, 0, x*8, y*8);
367+
m_gfxdecode->gfx(0)->opaque(bitmap,cliprect, tile, 0, 0, 0, x*8-16, y*8+26);
368368
}
369369
else
370370
{
371371
tile -= 0xe0;
372-
m_gfxdecode->gfx(1)->opaque(bitmap,cliprect, tile, 0, 0, 0, x*8, y*8);
372+
m_gfxdecode->gfx(1)->opaque(bitmap,cliprect, tile, 0, 0, 0, x*8-16, y*8+26);
373373
}
374374
}
375375
}
@@ -380,7 +380,7 @@ uint32_t pv1000_state::screen_update_pv1000(screen_device &screen, bitmap_ind16
380380

381381

382382
/* Interrupt is triggering 16 times during vblank. */
383-
/* we have chosen to trigger on scanlines 195, 199, 203, 207, 211, 215, 219, 223, 227, 231, 235, 239, 243, 247, 251, 255 */
383+
/* They are spaced every 4 scanlines, with equal padding before and after */
384384
TIMER_CALLBACK_MEMBER(pv1000_state::d65010_irq_on_cb)
385385
{
386386
int vpos = m_screen->vpos();
@@ -394,11 +394,11 @@ TIMER_CALLBACK_MEMBER(pv1000_state::d65010_irq_on_cb)
394394
m_irq_off_timer->adjust(m_screen->time_until_pos(vpos, 380/2));
395395

396396
/* Schedule next IRQ trigger */
397-
if (vpos >= 255)
397+
if (vpos >= 281)
398398
{
399-
next_vpos = 195;
399+
next_vpos = 221;
400400
}
401-
m_irq_on_timer->adjust(m_screen->time_until_pos(next_vpos, 0));
401+
m_irq_on_timer->adjust(m_screen->time_until_pos(next_vpos, 224));
402402
}
403403

404404

@@ -478,7 +478,7 @@ void pv1000_state::pv1000(machine_config &config)
478478

479479
/* D65010G031 - Video & sound chip */
480480
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
481-
m_screen->set_raw(17897725/3, 380, 0, 256, 262, 0, 192);
481+
m_screen->set_raw(17897725/4, 288, 0, 224, 262, 0, 244);
482482
m_screen->set_screen_update(FUNC(pv1000_state::screen_update_pv1000));
483483
m_screen->set_palette(m_palette);
484484

0 commit comments

Comments
 (0)