mirror of
https://github.com/holub/mame
synced 2025-04-22 16:31:49 +03:00
vector06c hook AY8910 (2 variants), promoted to working
This commit is contained in:
parent
bda55823e4
commit
b5761952c7
@ -1,11 +1,13 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Miodrag Milanovic
|
||||
// copyright-holders:Miodrag Milanovic, MetalliC
|
||||
/***************************************************************************
|
||||
|
||||
Vector06c driver by Miodrag Milanovic
|
||||
|
||||
10/07/2008 Preliminary driver.
|
||||
|
||||
note: press F12 after initial boot was load (indicated in screen lower part)
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
#include "includes/vector06.h"
|
||||
@ -27,6 +29,7 @@ static ADDRESS_MAP_START(vector06_io, AS_IO, 8, vector06_state)
|
||||
AM_RANGE( 0x08, 0x0B) AM_READWRITE(pit8253_r, pit8253_w)
|
||||
AM_RANGE( 0x0C, 0x0C) AM_WRITE(vector06_color_set)
|
||||
AM_RANGE( 0x10, 0x10) AM_WRITE(vector06_ramdisk_w)
|
||||
AM_RANGE( 0x14, 0x15) AM_DEVREADWRITE("aysnd", ay8910_device, data_r, data_address_w)
|
||||
AM_RANGE( 0x18, 0x18) AM_DEVREADWRITE("wd1793", fd1793_t, data_r, data_w)
|
||||
AM_RANGE( 0x19, 0x19) AM_DEVREADWRITE("wd1793", fd1793_t, sector_r, sector_w)
|
||||
AM_RANGE( 0x1a, 0x1a) AM_DEVREADWRITE("wd1793", fd1793_t, track_r, track_w)
|
||||
@ -170,6 +173,7 @@ static MACHINE_CONFIG_START( vector06, vector06_state )
|
||||
MCFG_DEVICE_ADD("ppi8255_2", I8255, 0)
|
||||
MCFG_I8255_OUT_PORTA_CB(WRITE8(vector06_state, vector06_romdisk_porta_w))
|
||||
MCFG_I8255_IN_PORTB_CB(READ8(vector06_state, vector06_romdisk_portb_r))
|
||||
MCFG_I8255_OUT_PORTB_CB(WRITE8(vector06_state, vector06_romdisk_portb_w))
|
||||
MCFG_I8255_OUT_PORTC_CB(WRITE8(vector06_state, vector06_romdisk_portc_w))
|
||||
|
||||
MCFG_CASSETTE_ADD("cassette")
|
||||
@ -201,6 +205,10 @@ static MACHINE_CONFIG_START( vector06, vector06_state )
|
||||
MCFG_PIT8253_OUT0_HANDLER(WRITELINE(vector06_state, speaker_w))
|
||||
MCFG_PIT8253_OUT1_HANDLER(WRITELINE(vector06_state, speaker_w))
|
||||
MCFG_PIT8253_OUT2_HANDLER(WRITELINE(vector06_state, speaker_w))
|
||||
|
||||
// optional
|
||||
MCFG_SOUND_ADD("aysnd", AY8910, 1773400)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
/* ROM definition */
|
||||
@ -242,7 +250,7 @@ ROM_END
|
||||
/* Driver */
|
||||
|
||||
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */
|
||||
COMP( 1987, vector06, 0, 0, vector06, vector06, driver_device, 0, "<unknown>", "Vector 06c", MACHINE_NOT_WORKING)
|
||||
COMP( 1987, vector06, 0, 0, vector06, vector06, driver_device, 0, "<unknown>", "Vector 06c", 0)
|
||||
COMP( 1987, vec1200, vector06, 0, vector06, vector06, driver_device, 0, "<unknown>", "Vector 1200", MACHINE_NOT_WORKING)
|
||||
COMP( 1987, pk6128c, vector06, 0, vector06, vector06, driver_device, 0, "<unknown>", "PK-6128c", MACHINE_NOT_WORKING)
|
||||
COMP( 1987, krista2, vector06, 0, vector06, vector06, driver_device, 0, "<unknown>", "Krista-2", MACHINE_NOT_WORKING)
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "cpu/i8085/i8085.h"
|
||||
#include "sound/speaker.h"
|
||||
#include "sound/wave.h"
|
||||
#include "sound/ay8910.h"
|
||||
#include "machine/i8255.h"
|
||||
#include "machine/pit8253.h"
|
||||
#include "machine/ram.h"
|
||||
@ -39,6 +40,7 @@ public:
|
||||
m_ppi(*this, "ppi8255"),
|
||||
m_ppi2(*this, "ppi8255_2"),
|
||||
m_pit8253(*this, "pit8253"),
|
||||
m_ay(*this, "aysnd"),
|
||||
m_ram(*this, RAM_TAG),
|
||||
m_palette(*this, "palette"),
|
||||
m_bank1(*this, "bank1"),
|
||||
@ -57,6 +59,7 @@ public:
|
||||
DECLARE_WRITE8_MEMBER(vector06_8255_portb_w);
|
||||
DECLARE_WRITE8_MEMBER(vector06_color_set);
|
||||
DECLARE_READ8_MEMBER(vector06_romdisk_portb_r);
|
||||
DECLARE_WRITE8_MEMBER(vector06_romdisk_portb_w);
|
||||
DECLARE_WRITE8_MEMBER(vector06_romdisk_porta_w);
|
||||
DECLARE_WRITE8_MEMBER(vector06_romdisk_portc_w);
|
||||
DECLARE_READ8_MEMBER(vector06_8255_1_r);
|
||||
@ -90,6 +93,7 @@ private:
|
||||
required_device<i8255_device> m_ppi;
|
||||
required_device<i8255_device> m_ppi2;
|
||||
required_device<pit8253_device> m_pit8253;
|
||||
required_device<ay8910_device> m_ay;
|
||||
required_device<ram_device> m_ram;
|
||||
required_device<palette_device> m_palette;
|
||||
required_memory_bank m_bank1;
|
||||
@ -106,6 +110,7 @@ private:
|
||||
UINT8 m_romdisk_lsb;
|
||||
UINT8 m_vblank_state;
|
||||
UINT8 m_rambank;
|
||||
UINT8 m_aylatch;
|
||||
bool m_stack_state;
|
||||
bool m_romen;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Miodrag Milanovic
|
||||
// copyright-holders:Miodrag Milanovic, MetalliC
|
||||
/***************************************************************************
|
||||
|
||||
Vector06c driver by Miodrag Milanovic
|
||||
@ -72,7 +72,12 @@ READ8_MEMBER( vector06_state::vector06_romdisk_portb_r )
|
||||
if (m_cart->exists() && addr < m_cart->get_rom_size())
|
||||
return m_cart->read_rom(space, addr);
|
||||
else
|
||||
return 0xff;
|
||||
return m_ay->ay8910_read_ym();
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(vector06_state::vector06_romdisk_portb_w)
|
||||
{
|
||||
m_aylatch = data;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( vector06_state::vector06_romdisk_porta_w )
|
||||
@ -82,6 +87,8 @@ WRITE8_MEMBER( vector06_state::vector06_romdisk_porta_w )
|
||||
|
||||
WRITE8_MEMBER( vector06_state::vector06_romdisk_portc_w )
|
||||
{
|
||||
if (data & 4)
|
||||
m_ay->ay8910_write_ym((data >> 1) & 1, m_aylatch);
|
||||
m_romdisk_msb = data;
|
||||
}
|
||||
|
||||
@ -107,10 +114,7 @@ WRITE8_MEMBER( vector06_state::vector06_8255_2_w )
|
||||
|
||||
INTERRUPT_GEN_MEMBER(vector06_state::vector06_interrupt)
|
||||
{
|
||||
m_vblank_state++;
|
||||
if (m_vblank_state>1) m_vblank_state=0;
|
||||
device.execute().set_input_line(0,m_vblank_state ? HOLD_LINE : CLEAR_LINE);
|
||||
|
||||
device.execute().set_input_line(0, HOLD_LINE);
|
||||
}
|
||||
|
||||
IRQ_CALLBACK_MEMBER(vector06_state::vector06_irq_callback)
|
||||
|
Loading…
Reference in New Issue
Block a user