mirror of
https://github.com/holub/mame
synced 2025-07-05 18:08:04 +03:00
skyarmy: tweak clocks based on pcb video
This commit is contained in:
parent
02994e4792
commit
981f059c12
@ -25,9 +25,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
|
|
||||||
#include "cpu/z80/z80.h"
|
#include "cpu/z80/z80.h"
|
||||||
#include "machine/74259.h"
|
#include "machine/74259.h"
|
||||||
|
#include "machine/timer.h"
|
||||||
#include "sound/ay8910.h"
|
#include "sound/ay8910.h"
|
||||||
|
|
||||||
#include "emupal.h"
|
#include "emupal.h"
|
||||||
#include "screen.h"
|
#include "screen.h"
|
||||||
#include "speaker.h"
|
#include "speaker.h"
|
||||||
@ -80,7 +83,7 @@ private:
|
|||||||
|
|
||||||
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
|
|
||||||
INTERRUPT_GEN_MEMBER(nmi_source);
|
TIMER_DEVICE_CALLBACK_MEMBER(scanline);
|
||||||
void skyarmy_io_map(address_map &map) ATTR_COLD;
|
void skyarmy_io_map(address_map &map) ATTR_COLD;
|
||||||
void skyarmy_map(address_map &map) ATTR_COLD;
|
void skyarmy_map(address_map &map) ATTR_COLD;
|
||||||
};
|
};
|
||||||
@ -180,10 +183,17 @@ uint32_t skyarmy_state::screen_update(screen_device &screen, bitmap_ind16 &bitma
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
INTERRUPT_GEN_MEMBER(skyarmy_state::nmi_source)
|
TIMER_DEVICE_CALLBACK_MEMBER(skyarmy_state::scanline)
|
||||||
{
|
{
|
||||||
if (m_nmi)
|
int scanline = param;
|
||||||
|
|
||||||
|
// 16 NMIs per frame
|
||||||
|
if ((scanline & 0xf) == 0 && scanline <= 240 && m_nmi)
|
||||||
m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
|
m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
|
||||||
|
|
||||||
|
// vblank interrupt
|
||||||
|
if (scanline == 248)
|
||||||
|
m_maincpu->set_input_line(0, HOLD_LINE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -313,11 +323,11 @@ GFXDECODE_END
|
|||||||
|
|
||||||
void skyarmy_state::skyarmy(machine_config &config)
|
void skyarmy_state::skyarmy(machine_config &config)
|
||||||
{
|
{
|
||||||
Z80(config, m_maincpu, 4000000);
|
Z80(config, m_maincpu, 18.432_MHz_XTAL / 6);
|
||||||
m_maincpu->set_addrmap(AS_PROGRAM, &skyarmy_state::skyarmy_map);
|
m_maincpu->set_addrmap(AS_PROGRAM, &skyarmy_state::skyarmy_map);
|
||||||
m_maincpu->set_addrmap(AS_IO, &skyarmy_state::skyarmy_io_map);
|
m_maincpu->set_addrmap(AS_IO, &skyarmy_state::skyarmy_io_map);
|
||||||
m_maincpu->set_vblank_int("screen", FUNC(skyarmy_state::irq0_line_hold));
|
|
||||||
m_maincpu->set_periodic_int(FUNC(skyarmy_state::nmi_source), attotime::from_hz(650));
|
TIMER(config, "scanline").configure_scanline(FUNC(skyarmy_state::scanline), "screen", 0, 1);
|
||||||
|
|
||||||
ls259_device &latch(LS259(config, "latch")); // 11C
|
ls259_device &latch(LS259(config, "latch")); // 11C
|
||||||
latch.q_out_cb<0>().set(FUNC(skyarmy_state::coin_counter_w));
|
latch.q_out_cb<0>().set(FUNC(skyarmy_state::coin_counter_w));
|
||||||
@ -328,10 +338,7 @@ void skyarmy_state::skyarmy(machine_config &config)
|
|||||||
|
|
||||||
/* video hardware */
|
/* video hardware */
|
||||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
|
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
|
||||||
screen.set_refresh_hz(60);
|
screen.set_raw(18.432_MHz_XTAL / 3, 384, 0, 256, 264, 8, 248);
|
||||||
screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
|
|
||||||
screen.set_size(32*8,32*8);
|
|
||||||
screen.set_visarea(0*8,32*8-1,1*8,31*8-1);
|
|
||||||
screen.set_screen_update(FUNC(skyarmy_state::screen_update));
|
screen.set_screen_update(FUNC(skyarmy_state::screen_update));
|
||||||
screen.set_palette(m_palette);
|
screen.set_palette(m_palette);
|
||||||
|
|
||||||
@ -340,8 +347,8 @@ void skyarmy_state::skyarmy(machine_config &config)
|
|||||||
|
|
||||||
/* sound hardware */
|
/* sound hardware */
|
||||||
SPEAKER(config, "mono").front_center();
|
SPEAKER(config, "mono").front_center();
|
||||||
AY8910(config, "ay0", 2500000).add_route(ALL_OUTPUTS, "mono", 0.15);
|
AY8910(config, "ay0", 18.432_MHz_XTAL / 12).add_route(ALL_OUTPUTS, "mono", 0.5);
|
||||||
AY8910(config, "ay1", 2500000).add_route(ALL_OUTPUTS, "mono", 0.15);
|
AY8910(config, "ay1", 18.432_MHz_XTAL / 12).add_route(ALL_OUTPUTS, "mono", 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user