mirror of
https://github.com/holub/mame
synced 2025-04-20 23:42:22 +03:00
channelf: Correct screen resolution, fixes MT#08012
- Pixels are double width, and repeat scanlines 4 times for NTSC, 5 times for PAL.
This commit is contained in:
parent
a32810d974
commit
c8192c898c
@ -216,11 +216,8 @@ void channelf_state::channelf(machine_config &config)
|
||||
|
||||
/* video hardware */
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
|
||||
screen.set_refresh_hz(60);
|
||||
screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
|
||||
screen.set_size(128, 64);
|
||||
screen.set_visarea(4, 112 - 7, 4, 64 - 3);
|
||||
screen.set_screen_update(FUNC(channelf_state::screen_update_channelf));
|
||||
screen.set_raw(3.579545_MHz_XTAL * 8 / 7, 256, 8, 212, 264, 16, 248);
|
||||
screen.set_screen_update(FUNC(channelf_state::screen_update_ntsc));
|
||||
screen.set_palette("palette");
|
||||
|
||||
PALETTE(config, "palette", FUNC(channelf_state::channelf_palette), 8);
|
||||
@ -241,11 +238,8 @@ void channelf_state::sabavdpl(machine_config &config)
|
||||
|
||||
/* video hardware */
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
|
||||
screen.set_refresh_hz(50);
|
||||
screen.set_vblank_time(ATTOSECONDS_IN_USEC(4623)); /* approximate */
|
||||
screen.set_size(128, 64);
|
||||
screen.set_visarea(4, 112 - 7, 4, 64 - 3);
|
||||
screen.set_screen_update(FUNC(channelf_state::screen_update_channelf));
|
||||
screen.set_raw(4_MHz_XTAL, 256, 8, 212, 312, 20, 310);
|
||||
screen.set_screen_update(FUNC(channelf_state::screen_update_pal));
|
||||
screen.set_palette("palette");
|
||||
|
||||
PALETTE(config, "palette", FUNC(channelf_state::channelf_palette), 8);
|
||||
@ -267,11 +261,8 @@ void channelf_state::channlf2(machine_config &config)
|
||||
|
||||
/* video hardware */
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
|
||||
screen.set_refresh_hz(60);
|
||||
screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
|
||||
screen.set_size(128, 64);
|
||||
screen.set_visarea(4, 112 - 7, 4, 64 - 3);
|
||||
screen.set_screen_update(FUNC(channelf_state::screen_update_channelf));
|
||||
screen.set_raw(3.579545_MHz_XTAL * 8 / 7, 256, 8, 212, 264, 16, 248);
|
||||
screen.set_screen_update(FUNC(channelf_state::screen_update_ntsc));
|
||||
screen.set_palette("palette");
|
||||
|
||||
PALETTE(config, "palette", FUNC(channelf_state::channelf_palette), 8);
|
||||
@ -293,11 +284,8 @@ void channelf_state::sabavpl2(machine_config &config)
|
||||
|
||||
/* video hardware */
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
|
||||
screen.set_refresh_hz(50);
|
||||
screen.set_vblank_time(ATTOSECONDS_IN_USEC(4623)); /* approximate */
|
||||
screen.set_size(128, 64);
|
||||
screen.set_visarea(4, 112 - 7, 4, 64 - 3);
|
||||
screen.set_screen_update(FUNC(channelf_state::screen_update_channelf));
|
||||
screen.set_raw(4_MHz_XTAL, 256, 8, 212, 312, 20, 310);
|
||||
screen.set_screen_update(FUNC(channelf_state::screen_update_pal));
|
||||
screen.set_palette("palette");
|
||||
|
||||
PALETTE(config, "palette", FUNC(channelf_state::channelf_palette), 8);
|
||||
|
@ -46,7 +46,9 @@ public:
|
||||
virtual void video_start() override;
|
||||
virtual void machine_start() override;
|
||||
void channelf_palette(palette_device &palette) const;
|
||||
uint32_t screen_update_channelf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
uint32_t screen_update_ntsc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
uint32_t screen_update_pal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
uint32_t screen_update_channelf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int y_rpt);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<channelf_sound_device> m_custom;
|
||||
required_device<channelf_cart_slot_device> m_cart;
|
||||
|
@ -50,19 +50,33 @@ int channelf_state::recalc_palette_offset(int reg1, int reg2)
|
||||
return ((reg2&0x2)|(reg1>>1)) << 2;
|
||||
}
|
||||
|
||||
uint32_t channelf_state::screen_update_channelf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
uint32_t channelf_state::screen_update_ntsc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
return screen_update_channelf(screen, bitmap, cliprect, 4);
|
||||
}
|
||||
|
||||
uint32_t channelf_state::screen_update_pal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
return screen_update_channelf(screen, bitmap, cliprect, 5);
|
||||
}
|
||||
|
||||
uint32_t channelf_state::screen_update_channelf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int y_rpt)
|
||||
{
|
||||
uint16_t ma=0;
|
||||
|
||||
for (uint8_t y = 0; y < 64; y++ )
|
||||
for (uint8_t y = 0; y < 64; y++)
|
||||
{
|
||||
uint16_t *p = &bitmap.pix(y);
|
||||
int const palette_offset = recalc_palette_offset(m_p_videoram[y*128+125]&3, m_p_videoram[y*128+126]&3);
|
||||
|
||||
for (uint16_t x = ma; x < ma + 128; x++)
|
||||
for (int y_pos = y * y_rpt; y_pos < (y * y_rpt) + y_rpt; y_pos++)
|
||||
{
|
||||
uint8_t const col = palette_offset+(m_p_videoram[x|(y<<7)]&3);
|
||||
*p++ = colormap[col];
|
||||
uint16_t *p = &bitmap.pix(y_pos);
|
||||
for (uint16_t x = ma; x < ma + 128; x++)
|
||||
{
|
||||
uint8_t const col = palette_offset+(m_p_videoram[x|(y<<7)]&3);
|
||||
*p++ = colormap[col];
|
||||
*p++ = colormap[col];
|
||||
}
|
||||
}
|
||||
ma+=128;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user