mirror of
https://github.com/holub/mame
synced 2025-10-06 09:00:04 +03:00
qs1000, 315_5124 and 315_5313 devices: test Vas' latest work (nw)
This commit is contained in:
parent
90af5054cf
commit
2609dd1c8f
@ -151,15 +151,6 @@ static ADDRESS_MAP_START( qs1000_io_map, AS_IO, 8, qs1000_device )
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
// Machine fragment
|
||||
static MACHINE_CONFIG_START( qs1000 )
|
||||
MCFG_CPU_ADD("cpu", I8052, DERIVED_CLOCK(1, 1))
|
||||
MCFG_CPU_PROGRAM_MAP(qs1000_prg_map)
|
||||
MCFG_CPU_IO_MAP(qs1000_io_map)
|
||||
MCFG_MCS51_SERIAL_RX_CB(READ8(qs1000_device, data_to_i8052))
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
// ROM definition for the QS1000 internal program ROM
|
||||
ROM_START( qs1000 )
|
||||
ROM_REGION( 0x10000, "cpu", 0 )
|
||||
@ -203,13 +194,14 @@ const tiny_rom_entry *qs1000_device::device_rom_region() const
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - return a pointer to
|
||||
// the device's machine fragment
|
||||
// device_add_mconfig - add machine configuration
|
||||
//-------------------------------------------------
|
||||
machine_config_constructor qs1000_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( qs1000 );
|
||||
}
|
||||
MACHINE_CONFIG_MEMBER( qs1000_device::device_add_mconfig )
|
||||
MCFG_CPU_ADD("cpu", I8052, DERIVED_CLOCK(1, 1))
|
||||
MCFG_CPU_PROGRAM_MAP(qs1000_prg_map)
|
||||
MCFG_CPU_IO_MAP(qs1000_io_map)
|
||||
MCFG_MCS51_SERIAL_RX_CB(READ8(qs1000_device, data_to_i8052))
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
|
@ -85,12 +85,10 @@ public:
|
||||
DECLARE_READ8_MEMBER( p3_r );
|
||||
DECLARE_WRITE8_MEMBER( p3_w );
|
||||
|
||||
DECLARE_READ8_MEMBER( data_to_i8052 );
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual const tiny_rom_entry *device_rom_region() const override;
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
|
||||
@ -153,6 +151,8 @@ private:
|
||||
};
|
||||
|
||||
qs1000_channel m_channels[QS1000_CHANNELS];
|
||||
|
||||
DECLARE_READ8_MEMBER( data_to_i8052 );
|
||||
};
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
// copyright-holders:Wilbert Pol, Enik Land
|
||||
/*********************************************************************
|
||||
|
||||
sega315_5124.c
|
||||
sega315_5124.cpp
|
||||
|
||||
Implementation of video hardware chips used by Sega System E,
|
||||
Master System, and Game Gear.
|
||||
@ -1686,39 +1686,26 @@ void sega315_5124_device::device_reset()
|
||||
memset(m_CRAM, 0, sizeof(m_CRAM));
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START( sega315_5124 )
|
||||
//-------------------------------------------------
|
||||
// device_add_mconfig - add machine configuration
|
||||
//-------------------------------------------------
|
||||
|
||||
MACHINE_CONFIG_MEMBER( sega315_5124_device::device_add_mconfig )
|
||||
MCFG_PALETTE_ADD("palette", SEGA315_5124_PALETTE_SIZE)
|
||||
MCFG_PALETTE_INIT_OWNER(sega315_5124_device, sega315_5124)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - return a pointer to
|
||||
// the device's machine fragment
|
||||
//-------------------------------------------------
|
||||
|
||||
machine_config_constructor sega315_5124_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( sega315_5124 );
|
||||
}
|
||||
|
||||
|
||||
void sega315_5378_device::device_reset()
|
||||
{
|
||||
sega315_5124_device::device_reset();
|
||||
m_draw_time = DRAW_TIME_GG;
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START( sega315_5378 )
|
||||
//-------------------------------------------------
|
||||
// device_add_mconfig - add machine configuration
|
||||
//-------------------------------------------------
|
||||
|
||||
MACHINE_CONFIG_MEMBER( sega315_5378_device::device_add_mconfig )
|
||||
MCFG_PALETTE_ADD("palette", SEGA315_5378_PALETTE_SIZE)
|
||||
MCFG_PALETTE_INIT_OWNER(sega315_5378_device, sega315_5378)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - return a pointer to
|
||||
// the device's machine fragment
|
||||
//-------------------------------------------------
|
||||
|
||||
machine_config_constructor sega315_5378_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( sega315_5378 );
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ protected:
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override { return (spacenum == AS_0) ? &m_space_config : nullptr; }
|
||||
|
||||
@ -192,18 +192,19 @@ class sega315_5378_device : public sega315_5124_device
|
||||
public:
|
||||
sega315_5378_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
DECLARE_PALETTE_INIT( sega315_5378 );
|
||||
|
||||
virtual void set_sega315_5124_compatibility_mode(bool sega315_5124_compatibility_mode) override;
|
||||
|
||||
protected:
|
||||
virtual void device_reset() override;
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
|
||||
virtual void update_palette() override;
|
||||
virtual void cram_write(uint8_t data) override;
|
||||
virtual void blit_scanline( int *line_buffer, int *priority_selected, int pixel_offset_x, int pixel_plot_y, int line ) override;
|
||||
virtual uint16_t get_name_table_row(int row) override;
|
||||
|
||||
private:
|
||||
DECLARE_PALETTE_INIT( sega315_5378 );
|
||||
};
|
||||
|
||||
|
||||
|
@ -178,22 +178,16 @@ void sega315_5313_device::static_set_palette_tag(device_t &device, const char *t
|
||||
downcast<sega315_5313_device &>(device).m_palette.set_tag(tag);
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_add_mconfig
|
||||
// add machine configuration
|
||||
//-------------------------------------------------
|
||||
|
||||
static MACHINE_CONFIG_START( sega_genesis_vdp )
|
||||
MACHINE_CONFIG_MEMBER(sega315_5313_device::device_add_mconfig)
|
||||
MCFG_PALETTE_ADD("palette", 0x200)
|
||||
MCFG_PALETTE_INIT_OWNER(sega315_5124_device, sega315_5124)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - return a pointer to
|
||||
// the device's machine fragment
|
||||
//-------------------------------------------------
|
||||
|
||||
machine_config_constructor sega315_5313_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( sega_genesis_vdp );
|
||||
}
|
||||
|
||||
TIMER_CALLBACK_MEMBER(sega315_5313_device::irq6_on_timer_callback)
|
||||
{
|
||||
// m_irq6_pending = 1;
|
||||
|
@ -117,7 +117,7 @@ public:
|
||||
protected:
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
|
||||
// called when we hit 240 and 241 (used to control the z80 irq line on genesis, or the main irq on c2)
|
||||
devcb_write_line m_sndirqline_callback;
|
||||
|
Loading…
Reference in New Issue
Block a user