mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
perfrman: Partially guessed video adjustment
This commit is contained in:
parent
b2ef8aba82
commit
12b6572a7e
@ -896,7 +896,7 @@ GFXDECODE_END
|
||||
void slapfght_state::perfrman(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
Z80(config, m_maincpu, XTAL(16'000'000)/4); // 4MHz? XTAL is known, divider is guessed
|
||||
Z80(config, m_maincpu, 16_MHz_XTAL/4); // 4MHz? XTAL is known, divider is guessed
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &slapfght_state::perfrman_map);
|
||||
m_maincpu->set_addrmap(AS_IO, &slapfght_state::io_map_nomcu);
|
||||
|
||||
@ -906,7 +906,7 @@ void slapfght_state::perfrman(machine_config &config)
|
||||
mainlatch.q_out_cb<3>().set(FUNC(slapfght_state::irq_enable_w));
|
||||
mainlatch.q_out_cb<6>().set(FUNC(slapfght_state::palette_bank_w));
|
||||
|
||||
Z80(config, m_audiocpu, XTAL(16'000'000)/8); // 2MHz? XTAL is known, divider is guessed
|
||||
Z80(config, m_audiocpu, 16_MHz_XTAL/8); // 2MHz? XTAL is known, divider is guessed
|
||||
m_audiocpu->set_addrmap(AS_PROGRAM, &slapfght_state::perfrman_sound_map);
|
||||
m_audiocpu->set_periodic_int(FUNC(slapfght_state::sound_nmi), attotime::from_hz(240)); // music speed, verified
|
||||
|
||||
@ -914,7 +914,8 @@ void slapfght_state::perfrman(machine_config &config)
|
||||
|
||||
/* video hardware */
|
||||
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
|
||||
m_screen->set_raw(36_MHz_XTAL/6, 388, 0, 296, 270, 0, 240);
|
||||
// pure guesswork, hopefully we can get real values
|
||||
m_screen->set_raw(16_MHz_XTAL/3, 344, 0, 256, 270, 0, 240);
|
||||
m_screen->set_screen_update(FUNC(slapfght_state::screen_update_perfrman));
|
||||
m_screen->screen_vblank().set(m_spriteram_buffer, FUNC(buffered_spriteram8_device::vblank_copy_falling));
|
||||
m_screen->screen_vblank().append(FUNC(slapfght_state::vblank_irq));
|
||||
@ -929,12 +930,12 @@ void slapfght_state::perfrman(machine_config &config)
|
||||
/* sound hardware */
|
||||
SPEAKER(config, "mono").front_center();
|
||||
|
||||
ay8910_device &ay1(AY8910(config, "ay1", XTAL(16'000'000)/8));
|
||||
ay8910_device &ay1(AY8910(config, "ay1", 16_MHz_XTAL/8));
|
||||
ay1.port_a_read_callback().set_ioport("IN0");
|
||||
ay1.port_b_read_callback().set_ioport("IN1");
|
||||
ay1.add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
|
||||
ay8910_device &ay2(AY8910(config, "ay2", XTAL(16'000'000)/8));
|
||||
ay8910_device &ay2(AY8910(config, "ay2", 16_MHz_XTAL/8));
|
||||
ay2.port_a_read_callback().set_ioport("DSW1");
|
||||
ay2.port_b_read_callback().set_ioport("DSW2");
|
||||
ay2.add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
|
@ -55,6 +55,8 @@ VIDEO_START_MEMBER(slapfght_state, perfrman)
|
||||
{
|
||||
m_pf1_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(slapfght_state::get_pf_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
|
||||
|
||||
m_pf1_tilemap->set_scrolldy(-16, 0);
|
||||
|
||||
m_pf1_tilemap->set_transparent_pen(0);
|
||||
}
|
||||
|
||||
@ -152,7 +154,7 @@ void slapfght_state::draw_perfrman_sprites(bitmap_ind16 &bitmap, const rectangle
|
||||
*/
|
||||
|
||||
int code = src[offs + 0];
|
||||
int sy = src[offs + 3] - 1;
|
||||
int sy = src[offs + 3] - 17;
|
||||
int sx = src[offs + 1] - 13;
|
||||
int pri = src[offs + 2] >> 6 & 3;
|
||||
int color = (src[offs + 2] >> 1 & 3) | (src[offs + 2] << 2 & 4) | (m_palette_bank << 3);
|
||||
@ -160,8 +162,8 @@ void slapfght_state::draw_perfrman_sprites(bitmap_ind16 &bitmap, const rectangle
|
||||
|
||||
if (flip_screen())
|
||||
{
|
||||
sy = 256 - sy;
|
||||
sx = 240 - sx;
|
||||
sy = (206 - sy) & 0xff;
|
||||
sx = 284 - sx;
|
||||
fx = fy = 1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user