updated first half of mame/video devices to use device_add_mconfig insted of device_mconfig_additions (nw)

This commit is contained in:
Ivan Vangelista 2017-05-24 17:44:38 +02:00
parent 0832b6e2be
commit 8f13c7eb04
20 changed files with 89 additions and 153 deletions

View File

@ -710,19 +710,6 @@ uint32_t asr733_device::screen_update(screen_device &screen, bitmap_ind16 &bitma
return 0;
}
static MACHINE_CONFIG_START( asr733 )
MCFG_PALETTE_ADD("palette", 2)
MCFG_PALETTE_INIT_OWNER(asr733_device, asr733)
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60)
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
MCFG_SCREEN_UPDATE_DEVICE(DEVICE_SELF, asr733_device, screen_update)
MCFG_SCREEN_SIZE(640, 480)
MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
MCFG_SCREEN_PALETTE("palette")
MACHINE_CONFIG_END
INPUT_PORTS_START( asr733 )
PORT_START("KEY0") /* keys 1-16 */ \
@ -793,11 +780,20 @@ ioport_constructor asr733_device::device_input_ports() const
}
//-------------------------------------------------
// machine_config_additions - return a pointer to
// the device's machine fragment
// device_add_mconfig - add device configuration
//-------------------------------------------------
machine_config_constructor asr733_device::device_mconfig_additions() const
{
return MACHINE_CONFIG_NAME( asr733 );
}
MACHINE_CONFIG_MEMBER( asr733_device::device_add_mconfig )
MCFG_PALETTE_ADD("palette", 2)
MCFG_PALETTE_INIT_OWNER(asr733_device, asr733)
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60)
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
MCFG_SCREEN_UPDATE_DEVICE(DEVICE_SELF, asr733_device, screen_update)
MCFG_SCREEN_SIZE(640, 480)
MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
MCFG_SCREEN_PALETTE("palette")
MACHINE_CONFIG_END

View File

@ -19,8 +19,6 @@ public:
asr733_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_PALETTE_INIT(asr733);
DECLARE_READ8_MEMBER(cru_r);
DECLARE_WRITE8_MEMBER(cru_w);
@ -33,13 +31,11 @@ public:
return downcast<asr733_device &>(device).m_lineint_line.set_callback(std::forward<Object>(cb));
}
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
protected:
// device-level overrides
void device_start() override;
void device_reset() override;
machine_config_constructor device_mconfig_additions() const override;
virtual void device_add_mconfig(machine_config &config) override;
void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
ioport_constructor device_input_ports() const override;
@ -59,6 +55,10 @@ private:
void linefeed();
void transmit(uint8_t data);
DECLARE_PALETTE_INIT(asr733);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
emu_timer *m_line_timer; // screen line timer
uint8_t m_recv_buf;

View File

@ -798,7 +798,11 @@ INPUT_PORTS_START( vdt911 )
PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("(not on US keyboard)") PORT_CODE(KEYCODE_PLUS_PAD)
INPUT_PORTS_END
static MACHINE_CONFIG_START( vdt911 )
//-------------------------------------------------
// device_add_mconfig - add device configuration
//-------------------------------------------------
MACHINE_CONFIG_MEMBER( vdt911_device::device_add_mconfig )
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60)
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
@ -817,16 +821,6 @@ static MACHINE_CONFIG_START( vdt911 )
MCFG_PALETTE_INIT_OWNER(vdt911_device, vdt911)
MACHINE_CONFIG_END
//-------------------------------------------------
// machine_config_additions - return a pointer to
// the device's machine fragment
//-------------------------------------------------
machine_config_constructor vdt911_device::device_mconfig_additions() const
{
return MACHINE_CONFIG_NAME( vdt911 );
}
ioport_constructor vdt911_device::device_input_ports() const
{
return INPUT_PORTS_NAME( vdt911 );

View File

@ -48,8 +48,6 @@ public:
DECLARE_READ8_MEMBER(cru_r);
DECLARE_WRITE8_MEMBER(cru_w);
DECLARE_PALETTE_INIT(vdt911);
template <class Object> static devcb_base &static_set_keyint_callback(device_t &device, Object &&cb)
{
return downcast<vdt911_device &>(device).m_keyint_line.set_callback(std::forward<Object>(cb));
@ -60,14 +58,11 @@ public:
return downcast<vdt911_device &>(device).m_lineint_line.set_callback(std::forward<Object>(cb));
}
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
protected:
// device-level overrides
void device_start() override;
void device_reset() override;
machine_config_constructor device_mconfig_additions() const override;
virtual void device_add_mconfig(machine_config &config) override;
ioport_constructor device_input_ports() const override;
void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
@ -77,6 +72,10 @@ private:
int get_refresh_rate();
void check_keyboard();
DECLARE_PALETTE_INIT(vdt911);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
screen_size m_screen_size; // char_960 for 960-char, 12-line model; char_1920 for 1920-char, 24-line model
model m_model; // country code

View File

@ -188,10 +188,10 @@ MC6845_ON_UPDATE_ADDR_CHANGED( abc1600_mover_device::crtc_update )
}
//-------------------------------------------------
// MACHINE_CONFIG_START( abc1600_mover )
// device_add_mconfig - add device configuration
//-------------------------------------------------
static MACHINE_CONFIG_START( abc1600_mover )
MACHINE_CONFIG_MEMBER( abc1600_mover_device::device_add_mconfig )
MCFG_DEFAULT_LAYOUT(layout_abc1600)
MCFG_SCREEN_ADD_MONOCHROME(SCREEN_TAG, RASTER, rgb_t::green())
@ -208,18 +208,6 @@ static MACHINE_CONFIG_START( abc1600_mover )
MACHINE_CONFIG_END
//-------------------------------------------------
// machine_config_additions - device-specific
// machine configurations
//-------------------------------------------------
machine_config_constructor abc1600_mover_device::device_mconfig_additions() const
{
return MACHINE_CONFIG_NAME( abc1600_mover );
}
//**************************************************************************
// LIVE DEVICE
//**************************************************************************

View File

@ -40,25 +40,18 @@ public:
// construction/destruction
abc1600_mover_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// optional information overrides
virtual const tiny_rom_entry *device_rom_region() const override;
virtual machine_config_constructor device_mconfig_additions() const override;
virtual DECLARE_ADDRESS_MAP(vram_map, 8);
virtual DECLARE_ADDRESS_MAP(crtc_map, 8);
virtual DECLARE_ADDRESS_MAP(iowr0_map, 8);
virtual DECLARE_ADDRESS_MAP(iowr1_map, 8);
virtual DECLARE_ADDRESS_MAP(iowr2_map, 8);
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
MC6845_UPDATE_ROW(crtc_update_row);
MC6845_ON_UPDATE_ADDR_CHANGED(crtc_update);
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
virtual const tiny_rom_entry *device_rom_region() const override;
virtual void device_add_mconfig(machine_config &config) override;
// device_memory_interface overrides
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
@ -104,6 +97,11 @@ private:
DECLARE_WRITE8_MEMBER( flag_strobe_w );
DECLARE_WRITE8_MEMBER( endisp_w );
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
MC6845_UPDATE_ROW(crtc_update_row);
MC6845_ON_UPDATE_ADDR_CHANGED(crtc_update);
inline uint16_t read_videoram(offs_t offset);
inline void write_videoram(offs_t offset, uint16_t data, uint16_t mask);
inline uint16_t get_crtca(uint16_t ma, uint8_t ra, uint8_t column);

View File

@ -35,7 +35,11 @@
DEFINE_DEVICE_TYPE(AGAT7VIDEO, agat7video_device, "agat7video", "Agat-7 Video")
MACHINE_CONFIG_START(agat7video)
//-------------------------------------------------
// device_add_mconfig - add device configuration
//-------------------------------------------------
MACHINE_CONFIG_MEMBER(agat7video_device::device_add_mconfig)
MCFG_SCREEN_ADD("a7screen", RASTER)
MCFG_SCREEN_RAW_PARAMS(XTAL_10_5MHz, 672, 0, 512, 312, 0, 256)
MCFG_SCREEN_UPDATE_DRIVER(agat7video_device, screen_update)
@ -45,19 +49,6 @@ MACHINE_CONFIG_START(agat7video)
MCFG_PALETTE_INIT_OWNER(agat7video_device, agat7)
MACHINE_CONFIG_END
/***************************************************************************
FUNCTION PROTOTYPES
***************************************************************************/
//-------------------------------------------------
// machine_config_additions - device-specific
// machine configurations
//-------------------------------------------------
machine_config_constructor agat7video_device::device_mconfig_additions() const
{
return MACHINE_CONFIG_NAME( agat7video );
}
//**************************************************************************
// LIVE DEVICE

View File

@ -26,13 +26,6 @@ public:
// construction/destruction
agat7video_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// optional information overrides
virtual machine_config_constructor device_mconfig_additions() const override;
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_PALETTE_INIT(agat7);
DECLARE_READ8_MEMBER(read);
DECLARE_WRITE8_MEMBER(write);
@ -43,6 +36,7 @@ public:
protected:
virtual void device_start() override;
virtual void device_reset() override;
virtual void device_add_mconfig(machine_config &config) override;
void text_update_lores(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int beginrow, int endrow);
void text_update_hires(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int beginrow, int endrow);
@ -64,7 +58,10 @@ private:
void plot_text_character(bitmap_ind16 &bitmap, int xpos, int ypos, int xscale, uint32_t code, const uint8_t *textgfx_data, uint32_t textgfx_datalen, int fg, int bg);
public:
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_PALETTE_INIT(agat7);
required_device<palette_device> m_palette;
};

View File

@ -58,7 +58,7 @@ static GFXDECODE_START( cshooter )
GFXDECODE_ENTRY( "fg_gfx", 0, char16layout, 0, 16 )
GFXDECODE_END
static MACHINE_CONFIG_START( airraid_vid )
MACHINE_CONFIG_MEMBER( airraid_video_device::device_add_mconfig )
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@ -73,10 +73,6 @@ static MACHINE_CONFIG_START( airraid_vid )
MACHINE_CONFIG_END
machine_config_constructor airraid_video_device::device_mconfig_additions() const
{
return MACHINE_CONFIG_NAME( airraid_vid );
}
void airraid_video_device::device_start()
{

View File

@ -26,10 +26,8 @@ public:
DECLARE_WRITE8_MEMBER(vregs_w);
void layer_enable_w(uint8_t enable);
uint32_t screen_update_airraid(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
protected:
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;
@ -71,6 +69,8 @@ private:
bitmap_ind16 m_temp_bitmap;
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
void mix_layer(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, uint8_t* clut, int base);
uint32_t screen_update_airraid(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
};
#endif // MAME_VIDEO_AIRRAID_DEV_H

View File

@ -540,9 +540,12 @@ static ADDRESS_MAP_START( adder2_memmap, AS_PROGRAM, 8, bfm_adder2_device )
AM_RANGE(0xE000, 0xFFFF) AM_ROM AM_REGION(":adder2", 0xE000) // 8k ROM
ADDRESS_MAP_END
///////////////////////////////////////////////////////////////////////////
static MACHINE_CONFIG_START( adder2 )
//-------------------------------------------------
// device_add_mconfig - add device configuration
//-------------------------------------------------
MACHINE_CONFIG_MEMBER( bfm_adder2_device::device_add_mconfig )
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_SIZE( 400, 280)
MCFG_SCREEN_VISIBLE_AREA( 0, 400-1, 0, 280-1)
@ -556,13 +559,3 @@ static MACHINE_CONFIG_START( adder2 )
MCFG_CPU_PROGRAM_MAP(adder2_memmap) // setup adder2 board memorymap
MCFG_DEVICE_VBLANK_INT_DEVICE("screen", DEVICE_SELF, bfm_adder2_device, adder2_vbl) // board has a VBL IRQ
MACHINE_CONFIG_END
//-------------------------------------------------
// machine_config_additions - device-specific
// machine configurations
//-------------------------------------------------
machine_config_constructor bfm_adder2_device::device_mconfig_additions() const
{
return MACHINE_CONFIG_NAME( adder2 );
}

View File

@ -14,8 +14,7 @@ public:
TILE_GET_INFO_MEMBER( get_tile0_info );
TILE_GET_INFO_MEMBER( get_tile1_info );
uint32_t update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER( adder2_vbl );
DECLARE_READ8_MEMBER( screen_ram_r );
DECLARE_WRITE8_MEMBER( screen_ram_w );
DECLARE_READ8_MEMBER( normal_ram_r );
@ -42,9 +41,9 @@ protected:
// device-level overrides
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;
private:
int m_adder2_screen_page_reg; // access/display select
int m_adder2_c101;
int m_adder2_rx;
@ -64,6 +63,9 @@ private:
uint8_t m_adder2_sc2data;
optional_device<cpu_device> m_cpu;
uint32_t update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER( adder2_vbl );
};
// device type definition

View File

@ -287,7 +287,7 @@ INTERRUPT_GEN_MEMBER( bfm_dm01_device::nmi_line_assert )
m_matrixcpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
}
static MACHINE_CONFIG_START( bdmdm01 )
MACHINE_CONFIG_MEMBER( bfm_dm01_device::device_add_mconfig )
MCFG_CPU_ADD("matrix", M6809, 2000000 ) /* matrix board 6809 CPU at 2 Mhz ?? I don't know the exact freq.*/
MCFG_CPU_PROGRAM_MAP(bfm_dm01_memmap)
MCFG_CPU_PERIODIC_INT_DRIVER(bfm_dm01_device, nmi_line_assert, 1500 ) /* generate 1500 NMI's per second ?? what is the exact freq?? */
@ -304,12 +304,6 @@ static MACHINE_CONFIG_START( bdmdm01 )
MCFG_SCREEN_PALETTE("palette_lcd")
MACHINE_CONFIG_END
machine_config_constructor bfm_dm01_device::device_mconfig_additions() const
{
return MACHINE_CONFIG_NAME( bdmdm01 );
}
///////////////////////////////////////////////////////////////////////////
void bfm_dm01_device::writedata(uint8_t data)

View File

@ -35,13 +35,9 @@ public:
void writedata(uint8_t data);
int busy(void);
INTERRUPT_GEN_MEMBER(nmi_line_assert);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
protected:
// device-level overrides
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;
@ -68,6 +64,9 @@ private:
bitmap_ind16 m_tmpbitmap;
INTERRUPT_GEN_MEMBER(nmi_line_assert);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
};
DECLARE_DEVICE_TYPE(BFM_DM01, bfm_dm01_device)

View File

@ -204,7 +204,7 @@ static ADDRESS_MAP_START( decodmd1_io_map, AS_IO, 8, decodmd_type1_device )
AM_RANGE(0x00, 0xff) AM_READWRITE(dmd_port_r, dmd_port_w)
ADDRESS_MAP_END
static MACHINE_CONFIG_START( decodmd1 )
MACHINE_CONFIG_MEMBER( decodmd_type1_device::device_add_mconfig )
/* basic machine hardware */
MCFG_CPU_ADD("dmdcpu", Z80, XTAL_8MHz / 2)
MCFG_CPU_PROGRAM_MAP(decodmd1_map)
@ -212,14 +212,14 @@ static MACHINE_CONFIG_START( decodmd1 )
MCFG_QUANTUM_TIME(attotime::from_hz(50))
MCFG_TIMER_DRIVER_ADD_PERIODIC("nmi_timer",decodmd_type1_device,dmd_nmi,attotime::from_hz(2000)) // seems a lot
MCFG_TIMER_DRIVER_ADD_PERIODIC("nmi_timer", decodmd_type1_device, dmd_nmi, attotime::from_hz(2000)) // seems a lot
MCFG_DEFAULT_LAYOUT(layout_lcd)
MCFG_SCREEN_ADD("dmd",LCD)
MCFG_SCREEN_SIZE(128, 16)
MCFG_SCREEN_VISIBLE_AREA(0, 128-1, 0, 16-1)
MCFG_SCREEN_UPDATE_DRIVER(decodmd_type1_device,screen_update)
MCFG_SCREEN_UPDATE_DRIVER(decodmd_type1_device, screen_update)
MCFG_SCREEN_REFRESH_RATE(50)
MCFG_RAM_ADD(RAM_TAG)
@ -227,10 +227,6 @@ static MACHINE_CONFIG_START( decodmd1 )
MACHINE_CONFIG_END
machine_config_constructor decodmd_type1_device::device_mconfig_additions() const
{
return MACHINE_CONFIG_NAME( decodmd1 );
}
decodmd_type1_device::decodmd_type1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, DECODMD1, tag, owner, clock),

View File

@ -26,8 +26,6 @@ public:
required_device<ram_device> m_ram;
memory_region* m_rom;
uint32_t screen_update( screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect );
DECLARE_READ8_MEMBER(latch_r);
DECLARE_WRITE8_MEMBER(data_w);
DECLARE_READ8_MEMBER(busy_r);
@ -37,12 +35,11 @@ public:
DECLARE_WRITE8_MEMBER(status_w);
DECLARE_READ8_MEMBER(dmd_port_r);
DECLARE_WRITE8_MEMBER(dmd_port_w);
TIMER_DEVICE_CALLBACK_MEMBER(dmd_nmi);
static void static_set_gfxregion(device_t &device, const char *tag);
protected:
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;
@ -73,6 +70,8 @@ private:
void output_data();
void set_busy(uint8_t input, uint8_t val);
uint32_t screen_update( screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect );
TIMER_DEVICE_CALLBACK_MEMBER(dmd_nmi);
};
DECLARE_DEVICE_TYPE(DECODMD1, decodmd_type1_device)

View File

@ -128,14 +128,14 @@ static ADDRESS_MAP_START( decodmd2_map, AS_PROGRAM, 8, decodmd_type2_device )
AM_RANGE(0x8000, 0xffff) AM_ROMBANK("dmdbank2") // last 32k of ROM
ADDRESS_MAP_END
static MACHINE_CONFIG_START( decodmd2 )
MACHINE_CONFIG_MEMBER( decodmd_type2_device::device_add_mconfig )
/* basic machine hardware */
MCFG_CPU_ADD("dmdcpu", M6809E, XTAL_8MHz)
MCFG_CPU_PROGRAM_MAP(decodmd2_map)
MCFG_QUANTUM_TIME(attotime::from_hz(60))
MCFG_TIMER_DRIVER_ADD_PERIODIC("firq_timer",decodmd_type2_device,dmd_firq,attotime::from_hz(80))
MCFG_TIMER_DRIVER_ADD_PERIODIC("firq_timer", decodmd_type2_device, dmd_firq, attotime::from_hz(80))
MCFG_MC6845_ADD("dmd6845", MC6845, nullptr, XTAL_8MHz / 8) // TODO: confirm clock speed
MCFG_MC6845_SHOW_BORDER_AREA(false)
@ -147,7 +147,7 @@ static MACHINE_CONFIG_START( decodmd2 )
MCFG_SCREEN_ADD("dmd",RASTER)
MCFG_SCREEN_SIZE(128, 32)
MCFG_SCREEN_VISIBLE_AREA(0, 128-1, 0, 32-1)
MCFG_SCREEN_UPDATE_DEVICE("dmd6845",mc6845_device, screen_update)
MCFG_SCREEN_UPDATE_DEVICE("dmd6845", mc6845_device, screen_update)
MCFG_SCREEN_REFRESH_RATE(60)
MCFG_RAM_ADD(RAM_TAG)
@ -155,10 +155,6 @@ static MACHINE_CONFIG_START( decodmd2 )
MACHINE_CONFIG_END
machine_config_constructor decodmd_type2_device::device_mconfig_additions() const
{
return MACHINE_CONFIG_NAME( decodmd2 );
}
decodmd_type2_device::decodmd_type2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, DECODMD2, tag, owner, clock),

View File

@ -33,13 +33,11 @@ public:
DECLARE_READ8_MEMBER(ctrl_r);
DECLARE_READ8_MEMBER(status_r);
DECLARE_WRITE8_MEMBER(status_w);
TIMER_DEVICE_CALLBACK_MEMBER(dmd_firq);
MC6845_UPDATE_ROW(crtc_update_row);
static void static_set_gfxregion(device_t &device, const char *tag);
protected:
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;
@ -62,6 +60,9 @@ private:
uint8_t m_busy;
uint8_t m_command;
const char* m_gfxtag;
TIMER_DEVICE_CALLBACK_MEMBER(dmd_firq);
MC6845_UPDATE_ROW(crtc_update_row);
};
DECLARE_DEVICE_TYPE(DECODMD2, decodmd_type2_device)

View File

@ -130,14 +130,14 @@ static ADDRESS_MAP_START( decodmd3_map, AS_PROGRAM, 16, decodmd_type3_device )
AM_RANGE(0x00c00020, 0x00c00021) AM_READWRITE(latch_r,status_w)
ADDRESS_MAP_END
static MACHINE_CONFIG_START( decodmd3 )
MACHINE_CONFIG_MEMBER( decodmd_type3_device::device_add_mconfig )
/* basic machine hardware */
MCFG_CPU_ADD("dmdcpu", M68000, XTAL_12MHz)
MCFG_CPU_PROGRAM_MAP(decodmd3_map)
MCFG_QUANTUM_TIME(attotime::from_hz(60))
MCFG_TIMER_DRIVER_ADD_PERIODIC("irq_timer",decodmd_type3_device,dmd_irq,attotime::from_hz(150))
MCFG_TIMER_DRIVER_ADD_PERIODIC("irq_timer", decodmd_type3_device, dmd_irq, attotime::from_hz(150))
MCFG_MC6845_ADD("dmd6845", MC6845, nullptr, XTAL_12MHz / 4) // TODO: confirm clock speed
MCFG_MC6845_SHOW_BORDER_AREA(false)
@ -149,17 +149,13 @@ static MACHINE_CONFIG_START( decodmd3 )
MCFG_SCREEN_ADD("dmd",RASTER)
MCFG_SCREEN_SIZE(192, 64)
MCFG_SCREEN_VISIBLE_AREA(0, 192-1, 0, 64-1)
MCFG_SCREEN_UPDATE_DEVICE("dmd6845",mc6845_device, screen_update)
MCFG_SCREEN_UPDATE_DEVICE("dmd6845", mc6845_device, screen_update)
MCFG_SCREEN_REFRESH_RATE(60)
MCFG_RAM_ADD(RAM_TAG)
MCFG_RAM_DEFAULT_SIZE("64K")
MACHINE_CONFIG_END
machine_config_constructor decodmd_type3_device::device_mconfig_additions() const
{
return MACHINE_CONFIG_NAME( decodmd3 );
}
decodmd_type3_device::decodmd_type3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, DECODMD3, tag, owner, clock),

View File

@ -31,13 +31,11 @@ public:
DECLARE_WRITE16_MEMBER(crtc_address_w);
DECLARE_WRITE16_MEMBER(crtc_register_w);
DECLARE_READ16_MEMBER(crtc_status_r);
TIMER_DEVICE_CALLBACK_MEMBER(dmd_irq);
MC6845_UPDATE_ROW(crtc_update_row);
static void static_set_gfxregion(device_t &device, const char *tag);
protected:
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;
@ -59,6 +57,9 @@ private:
uint8_t m_command;
const char* m_gfxtag;
TIMER_DEVICE_CALLBACK_MEMBER(dmd_irq);
MC6845_UPDATE_ROW(crtc_update_row);
};
DECLARE_DEVICE_TYPE(DECODMD3, decodmd_type3_device)