mc6847: Eliminate MCFG_ macros; modernize screen auto-configuration (nw)

N.B. The system shine had a PAL screen configured despite using a MC6847_NTSC device. This was probably a mistake and is no longer the case.
This commit is contained in:
AJR 2019-01-19 01:03:24 -05:00
parent 22cbb3dd29
commit b842eb72ab
17 changed files with 156 additions and 140 deletions

View File

@ -132,14 +132,14 @@ const uint32_t mc6847_base_device::s_palette[mc6847_base_device::PALETTE_LENGTH]
mc6847_friend_device::mc6847_friend_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock,
const uint8_t *fontdata, bool is_mc6847t1, double tpfs, int field_sync_falling_edge_scanline, int divider, bool supports_partial_body_scanlines)
: device_t(mconfig, type, tag, owner, clock)
, device_video_interface(mconfig, *this)
, m_write_hsync(*this)
, m_write_fsync(*this)
, m_character_map(fontdata, is_mc6847t1)
, m_tpfs(tpfs)
, m_divider(divider)
, m_supports_partial_body_scanlines(supports_partial_body_scanlines)
{
m_tpfs = tpfs;
m_divider = divider;
m_supports_partial_body_scanlines = supports_partial_body_scanlines;
// The MC6847 and the GIME apply field sync on different scanlines
m_field_sync_falling_edge_scanline = field_sync_falling_edge_scanline;
}
@ -576,6 +576,29 @@ void mc6847_base_device::setup_fixed_mode()
}
//-------------------------------------------------
// device_config_complete - device-specific startup
//-------------------------------------------------
void mc6847_base_device::device_config_complete()
{
if (!has_screen())
return;
if (!screen().refresh_attoseconds())
{
// FIXME: use correct raw parameters rather than this nonsense
screen().set_refresh_hz(m_tpfs > 310.0 ? 50 : 60);
screen().set_size(320, 243);
screen().set_visarea(0, 320-1, 1, 241-1);
screen().set_vblank_time(0);
}
if (!screen().has_screen_update())
screen().set_screen_update(screen_update_rgb32_delegate(FUNC(mc6847_base_device::screen_update), this));
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------

View File

@ -19,41 +19,6 @@
// MC6847 CONFIGURATION / INTERFACE
//**************************************************************************
#define MCFG_SCREEN_MC6847_NTSC_ADD(_tag, _mctag) \
MCFG_SCREEN_ADD(_tag, RASTER) \
MCFG_SCREEN_UPDATE_DEVICE(_mctag, mc6847_base_device, screen_update) \
MCFG_SCREEN_REFRESH_RATE(60) \
MCFG_SCREEN_SIZE(320, 243) \
MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 1, 241-1) \
MCFG_SCREEN_VBLANK_TIME(0)
#define MCFG_SCREEN_MC6847_PAL_ADD(_tag, _mctag) \
MCFG_SCREEN_ADD(_tag, RASTER) \
MCFG_SCREEN_UPDATE_DEVICE(_mctag, mc6847_base_device, screen_update) \
MCFG_SCREEN_REFRESH_RATE(50) \
MCFG_SCREEN_SIZE(320, 243) \
MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 1, 241-1) \
MCFG_SCREEN_VBLANK_TIME(0)
#define MCFG_MC6847_HSYNC_CALLBACK(_write) \
downcast<mc6847_friend_device &>(*device).set_hsync_wr_callback(DEVCB_##_write);
#define MCFG_MC6847_FSYNC_CALLBACK(_write) \
downcast<mc6847_friend_device &>(*device).set_fsync_wr_callback(DEVCB_##_write);
#define MCFG_MC6847_CHARROM_CALLBACK(_class, _method) \
downcast<mc6847_friend_device &>(*device).set_get_char_rom(mc6847_friend_device::get_char_rom_delegate(&_class::_method, #_class "::" #_method, this));
#define MCFG_MC6847_INPUT_CALLBACK(_read) \
downcast<mc6847_base_device &>(*device).set_input_callback(DEVCB_##_read);
#define MCFG_MC6847_FIXED_MODE(_mode) \
downcast<mc6847_base_device &>(*device).set_get_fixed_mode(_mode);
#define MCFG_MC6847_BW(_bw) \
downcast<mc6847_base_device &>(*device).set_black_and_white(_bw);
#define MC6847_GET_CHARROM_MEMBER(_name) uint8_t _name(uint8_t ch, int line)
@ -67,7 +32,7 @@ INPUT_PORTS_EXTERN(mc6847_artifacting);
//**************************************************************************
// base class so that the GIME emulation can access mc6847 stuff
class mc6847_friend_device : public device_t
class mc6847_friend_device : public device_t, public device_video_interface
{
public:
// video mode constants
@ -92,6 +57,15 @@ public:
auto fsync_wr_callback() { return m_write_fsync.bind(); }
template <typename Object> void set_get_char_rom(Object &&cb) { m_charrom_cb = std::forward<Object>(cb); }
void set_get_char_rom(get_char_rom_delegate cb) { m_charrom_cb = cb; }
template <class FunctionClass> void set_get_char_rom(const char *devname, uint8_t (FunctionClass::*cb)(uint8_t, int), const char *name)
{
set_get_char_rom(get_char_rom_delegate(cb, name, devname, static_cast<FunctionClass *>(nullptr)));
}
template <class FunctionClass> void set_get_char_rom(uint8_t (FunctionClass::*cb)(uint8_t, int), const char *name)
{
set_get_char_rom(get_char_rom_delegate(cb, name, nullptr, static_cast<FunctionClass *>(nullptr)));
}
protected:
mc6847_friend_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock,
@ -479,16 +453,19 @@ private:
emu_timer *m_hsync_off_timer;
emu_timer *m_fsync_timer;
protected:
const double m_tpfs;
private:
// incidentals
double m_tpfs;
int m_divider;
const int m_divider;
int m_field_sync_falling_edge_scanline;
bool m_wide;
bool m_video_changed;
uint16_t m_top_border_scanlines;
uint16_t m_body_scanlines;
bool m_recording_scanline;
bool m_supports_partial_body_scanlines;
const bool m_supports_partial_body_scanlines;
// video state
uint16_t m_physical_scanline;
@ -524,18 +501,6 @@ public:
updating is complete, end_update() */
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
template <typename T, typename U>
static screen_device &add_pal_screen(machine_config &config, T &&screen_tag, U &&mc_tag)
{
screen_device &screen(SCREEN(config, std::forward<T>(screen_tag), SCREEN_TYPE_RASTER));
screen.set_screen_update(std::forward<U>(mc_tag), FUNC(mc6847_base_device::screen_update));
screen.set_refresh_hz(50);
screen.set_size(320, 243);
screen.set_visarea(0, 320-1, 1, 241-1);
screen.set_vblank_time(0);
return screen;
}
// mode changing operations
DECLARE_WRITE_LINE_MEMBER( ag_w ) { change_mode(MODE_AG, state); }
DECLARE_WRITE_LINE_MEMBER( gm2_w ) { change_mode(MODE_GM2, state); }
@ -550,6 +515,7 @@ protected:
mc6847_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const uint8_t *fontdata, double tpfs);
// device-level overrides
virtual void device_config_complete() override;
virtual void device_start() override;
virtual void device_reset() override;
virtual ioport_constructor device_input_ports() const override;

View File

@ -526,12 +526,13 @@ MACHINE_CONFIG_START(apf_state::apfm1000)
MCFG_DEVICE_PROGRAM_MAP(apfm1000_map)
/* video hardware */
MCFG_SCREEN_MC6847_NTSC_ADD("screen", "mc6847")
SCREEN(config, "screen", SCREEN_TYPE_RASTER);
MCFG_DEVICE_ADD("mc6847", MC6847_NTSC, 3.579545_MHz_XTAL)
MCFG_MC6847_FSYNC_CALLBACK(WRITELINE("pia0", pia6821_device, cb1_w))
MCFG_MC6847_INPUT_CALLBACK(READ8(*this, apf_state, videoram_r))
MCFG_MC6847_FIXED_MODE(mc6847_ntsc_device::MODE_GM2 | mc6847_ntsc_device::MODE_GM1)
MC6847_NTSC(config, m_crtc, 3.579545_MHz_XTAL);
m_crtc->fsync_wr_callback().set("pia0", FUNC(pia6821_device::cb1_w));
m_crtc->input_callback().set(FUNC(apf_state::videoram_r));
m_crtc->set_get_fixed_mode(mc6847_ntsc_device::MODE_GM2 | mc6847_ntsc_device::MODE_GM1);
m_crtc->set_screen("screen");
// INTEXT = GND
// other lines not connected

View File

@ -714,10 +714,11 @@ MACHINE_CONFIG_START(atom_state::atom)
MCFG_DEVICE_PROGRAM_MAP(atom_mem)
/* video hardware */
MCFG_SCREEN_MC6847_PAL_ADD(SCREEN_TAG, MC6847_TAG)
SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER);
MCFG_DEVICE_ADD(MC6847_TAG, MC6847_PAL, XTAL(4'433'619))
MCFG_MC6847_INPUT_CALLBACK(READ8(*this, atom_state, vdg_videoram_r))
MC6847_PAL(config, m_vdg, XTAL(4'433'619));
m_vdg->input_callback().set(FUNC(atom_state::vdg_videoram_r));
m_vdg->set_screen(SCREEN_TAG);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@ -821,10 +822,11 @@ MACHINE_CONFIG_START(atom_state::atombb)
MCFG_DEVICE_PROGRAM_MAP(atombb_mem)
/* video hardware */
MCFG_SCREEN_MC6847_PAL_ADD(SCREEN_TAG, MC6847_TAG)
SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER);
MCFG_DEVICE_ADD(MC6847_TAG, MC6847_PAL, XTAL(4'433'619))
MCFG_MC6847_INPUT_CALLBACK(READ8(*this, atom_state, vdg_videoram_r))
MC6847_PAL(config, m_vdg, XTAL(4'433'619));
m_vdg->input_callback().set(FUNC(atom_state::vdg_videoram_r));
m_vdg->set_screen(SCREEN_TAG);
/* sound hardware */
SPEAKER(config, "mono").front_center();

View File

@ -477,12 +477,13 @@ MACHINE_CONFIG_START(coco12_state::coco)
cartslot.halt_callback().set_inputline(m_maincpu, INPUT_LINE_HALT);
// video hardware
MCFG_SCREEN_MC6847_NTSC_ADD(SCREEN_TAG, VDG_TAG)
SCREEN(config, "screen", SCREEN_TYPE_RASTER);
MCFG_DEVICE_ADD(VDG_TAG, MC6847_NTSC, XTAL(14'318'181) / 4) // VClk output from MC6883
MCFG_MC6847_HSYNC_CALLBACK(WRITELINE(*this, coco12_state, horizontal_sync))
MCFG_MC6847_FSYNC_CALLBACK(WRITELINE(*this, coco12_state, field_sync))
MCFG_MC6847_INPUT_CALLBACK(READ8(m_sam, sam6883_device, display_read))
MC6847_NTSC(config, m_vdg, XTAL(14'318'181) / 4); // VClk output from MC6883
m_vdg->set_screen("screen");
m_vdg->hsync_wr_callback().set(FUNC(coco12_state::horizontal_sync));
m_vdg->fsync_wr_callback().set(FUNC(coco12_state::field_sync));
m_vdg->input_callback().set(m_sam, FUNC(sam6883_device::display_read));
// sound hardware
coco_sound(config);
@ -544,14 +545,15 @@ MACHINE_CONFIG_START(coco12_state::coco2h)
m_ram->set_default_size("64K");
MACHINE_CONFIG_END
MACHINE_CONFIG_START(coco12_state::coco2b)
void coco12_state::coco2b(machine_config &config)
{
coco2(config);
MCFG_DEVICE_REMOVE(VDG_TAG)
MCFG_DEVICE_ADD(VDG_TAG, MC6847T1_NTSC, XTAL(14'318'181) / 4)
MCFG_MC6847_HSYNC_CALLBACK(WRITELINE(*this, coco12_state, horizontal_sync))
MCFG_MC6847_FSYNC_CALLBACK(WRITELINE(*this, coco12_state, field_sync))
MCFG_MC6847_INPUT_CALLBACK(READ8(m_sam, sam6883_device, display_read))
MACHINE_CONFIG_END
MC6847T1_NTSC(config.replace(), m_vdg, XTAL(14'318'181) / 4);
m_vdg->set_screen(SCREEN_TAG);
m_vdg->hsync_wr_callback().set(FUNC(coco12_state::horizontal_sync));
m_vdg->fsync_wr_callback().set(FUNC(coco12_state::field_sync));
m_vdg->input_callback().set(m_sam, FUNC(sam6883_device::display_read));
}
MACHINE_CONFIG_START(coco12_state::coco2bh)
coco2b(config);

View File

@ -293,6 +293,7 @@ MACHINE_CONFIG_START(coco3_state::coco3)
config.set_default_layout(layout_coco3);
GIME_NTSC(config, m_gime, XTAL(28'636'363), MAINCPU_TAG, RAM_TAG, CARTRIDGE_TAG, MAINCPU_TAG);
m_gime->set_screen(COMPOSITE_SCREEN_TAG);
m_gime->hsync_wr_callback().set(PIA0_TAG, FUNC(pia6821_device::ca1_w));
m_gime->fsync_wr_callback().set(PIA0_TAG, FUNC(pia6821_device::cb1_w));
m_gime->irq_wr_callback().set(FUNC(coco3_state::gime_irq_w));
@ -339,6 +340,7 @@ MACHINE_CONFIG_START(coco3_state::coco3p)
// An additional 4.433618 MHz XTAL is required for PAL color encoding
GIME_PAL(config.replace(), m_gime, XTAL(28'475'000), MAINCPU_TAG, RAM_TAG, CARTRIDGE_TAG, MAINCPU_TAG);
m_gime->set_screen(COMPOSITE_SCREEN_TAG);
m_gime->hsync_wr_callback().set(PIA0_TAG, FUNC(pia6821_device::ca1_w));
m_gime->fsync_wr_callback().set(PIA0_TAG, FUNC(pia6821_device::cb1_w));
m_gime->irq_wr_callback().set(FUNC(coco3_state::gime_irq_w));

View File

@ -224,12 +224,13 @@ MACHINE_CONFIG_START(dragon_state::dragon_base)
MCFG_DEVICE_ADD(PRINTER_TAG, PRINTER, 0)
// video hardware
MCFG_SCREEN_MC6847_PAL_ADD(SCREEN_TAG, VDG_TAG)
SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER);
MCFG_DEVICE_ADD(VDG_TAG, MC6847_PAL, 4.433619_MHz_XTAL)
MCFG_MC6847_HSYNC_CALLBACK(WRITELINE(*this, dragon_state, horizontal_sync))
MCFG_MC6847_FSYNC_CALLBACK(WRITELINE(*this, dragon_state, field_sync))
MCFG_MC6847_INPUT_CALLBACK(READ8(m_sam, sam6883_device, display_read))
MC6847_PAL(config, m_vdg, 4.433619_MHz_XTAL);
m_vdg->set_screen(SCREEN_TAG);
m_vdg->hsync_wr_callback().set(FUNC(dragon_state::horizontal_sync));
m_vdg->fsync_wr_callback().set(FUNC(dragon_state::field_sync));
m_vdg->input_callback().set(m_sam, FUNC(sam6883_device::display_read));
// sound hardware
coco_sound(config);
@ -284,12 +285,12 @@ MACHINE_CONFIG_START(dragon64_state::dragon64h)
m_ram->set_default_size("64K");
MACHINE_CONFIG_END
MACHINE_CONFIG_START(dragon200e_state::dragon200e)
void dragon200e_state::dragon200e(machine_config &config)
{
dragon64(config);
// video hardware
MCFG_DEVICE_MODIFY(VDG_TAG)
MCFG_MC6847_CHARROM_CALLBACK(dragon200e_state, char_rom_r)
MACHINE_CONFIG_END
m_vdg->set_get_char_rom(FUNC(dragon200e_state::char_rom_r));
}
MACHINE_CONFIG_START(d64plus_state::d64plus)
dragon64(config);

View File

@ -522,14 +522,15 @@ MACHINE_CONFIG_START(fc100_state::fc100)
MCFG_DEVICE_IO_MAP(fc100_io)
/* video hardware */
MCFG_DEVICE_ADD("vdg", M5C6847P1, XTAL(7'159'090)/3) // Clock not verified
MCFG_MC6847_INPUT_CALLBACK(READ8(*this, fc100_state, mc6847_videoram_r))
MCFG_MC6847_CHARROM_CALLBACK(fc100_state, get_char_rom)
MCFG_MC6847_FIXED_MODE(m5c6847p1_device::MODE_INTEXT)
M5C6847P1(config, m_vdg, XTAL(7'159'090)/3); // Clock not verified
m_vdg->set_screen("screen");
m_vdg->input_callback().set(FUNC(fc100_state::mc6847_videoram_r));
m_vdg->set_get_char_rom(FUNC(fc100_state::get_char_rom));
m_vdg->set_get_fixed_mode(m5c6847p1_device::MODE_INTEXT);
// other lines not connected
MCFG_SCREEN_MC6847_NTSC_ADD("screen", "vdg")
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "f4palette", gfx_fc100)
SCREEN(config, "screen", SCREEN_TYPE_RASTER);
GFXDECODE(config, "gfxdecode", "f4palette", gfx_fc100);
PALETTE(config, "f4palette", palette_device::MONOCHROME);
/* sound hardware */

View File

@ -513,10 +513,11 @@ MACHINE_CONFIG_START(mc10_state::mc10)
m_maincpu->out_p2_cb().set(FUNC(mc10_state::mc10_port2_w));
/* video hardware */
MCFG_SCREEN_MC6847_NTSC_ADD("screen", "mc6847")
SCREEN(config, "screen", SCREEN_TYPE_RASTER);
MCFG_DEVICE_ADD("mc6847", MC6847_NTSC, XTAL(3'579'545))
MCFG_MC6847_INPUT_CALLBACK(READ8(*this, mc10_state, mc6847_videoram_r))
mc6847_ntsc_device &vdg(MC6847_NTSC(config, "mc6847", XTAL(3'579'545)));
vdg.set_screen("screen");
vdg.input_callback().set(FUNC(mc10_state::mc6847_videoram_r));
/* sound hardware */
SPEAKER(config, "speaker").front_center();

View File

@ -558,12 +558,13 @@ MACHINE_CONFIG_START(mc1000_state::mc1000)
MCFG_TIMER_PARAM(ASSERT_LINE)
/* video hardware */
MCFG_SCREEN_MC6847_PAL_ADD(SCREEN_TAG, MC6847_TAG)
SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER);
MCFG_DEVICE_ADD(MC6847_TAG, MC6847_NTSC, XTAL(3'579'545))
MCFG_MC6847_HSYNC_CALLBACK(WRITELINE(*this, mc1000_state, hs_w))
MCFG_MC6847_FSYNC_CALLBACK(WRITELINE(*this, mc1000_state, fs_w))
MCFG_MC6847_INPUT_CALLBACK(READ8(*this, mc1000_state, videoram_r))
MC6847_NTSC(config, m_vdg, XTAL(3'579'545));
m_vdg->hsync_wr_callback().set(FUNC(mc1000_state::hs_w));
m_vdg->fsync_wr_callback().set(FUNC(mc1000_state::fs_w));
m_vdg->input_callback().set(FUNC(mc1000_state::videoram_r));
m_vdg->set_screen(SCREEN_TAG);
/* sound hardware */
SPEAKER(config, "mono").front_center();

View File

@ -340,31 +340,35 @@ MACHINE_CONFIG_START(phc25_state::phc25)
MCFG_SOFTWARE_LIST_ADD("cass_list", "phc25_cass")
MACHINE_CONFIG_END
MACHINE_CONFIG_START(phc25_state::pal)
void phc25_state::pal(machine_config &config)
{
phc25(config);
/* video hardware */
MCFG_SCREEN_MC6847_PAL_ADD(SCREEN_TAG, MC6847_TAG)
SCREEN(config, "screen", SCREEN_TYPE_RASTER);
MCFG_DEVICE_ADD(MC6847_TAG, MC6847_PAL, XTAL(4'433'619))
MCFG_MC6847_FSYNC_CALLBACK(WRITELINE(*this, phc25_state, irq_w))
MCFG_MC6847_INPUT_CALLBACK(READ8(*this, phc25_state, video_ram_r))
MCFG_MC6847_CHARROM_CALLBACK(phc25_state, pal_char_rom_r)
MCFG_MC6847_FIXED_MODE(mc6847_pal_device::MODE_GM2 | mc6847_pal_device::MODE_GM1 | mc6847_pal_device::MODE_INTEXT)
MC6847_PAL(config, m_vdg, XTAL(4'433'619));
m_vdg->set_screen("screen");
m_vdg->fsync_wr_callback().set(FUNC(phc25_state::irq_w));
m_vdg->input_callback().set(FUNC(phc25_state::video_ram_r));
m_vdg->set_get_char_rom(mc6847_friend_device::get_char_rom_delegate(FUNC(phc25_state::pal_char_rom_r), this));
m_vdg->set_get_fixed_mode(mc6847_pal_device::MODE_GM2 | mc6847_pal_device::MODE_GM1 | mc6847_pal_device::MODE_INTEXT);
// other lines not connected
MACHINE_CONFIG_END
}
MACHINE_CONFIG_START(phc25_state::ntsc)
void phc25_state::ntsc(machine_config &config)
{
phc25(config);
/* video hardware */
MCFG_SCREEN_MC6847_NTSC_ADD(SCREEN_TAG, MC6847_TAG)
SCREEN(config, "screen", SCREEN_TYPE_RASTER);
MCFG_DEVICE_ADD(MC6847_TAG, MC6847_NTSC, XTAL(3'579'545))
MCFG_MC6847_FSYNC_CALLBACK(WRITELINE(*this, phc25_state, irq_w))
MCFG_MC6847_INPUT_CALLBACK(READ8(*this, phc25_state, video_ram_r))
MCFG_MC6847_CHARROM_CALLBACK(phc25_state, ntsc_char_rom_r)
MCFG_MC6847_FIXED_MODE(mc6847_ntsc_device::MODE_GM2 | mc6847_ntsc_device::MODE_GM1 | mc6847_ntsc_device::MODE_INTEXT)
MC6847_NTSC(config, m_vdg, XTAL(3'579'545));
m_vdg->set_screen("screen");
m_vdg->fsync_wr_callback().set(FUNC(phc25_state::irq_w));
m_vdg->input_callback().set(FUNC(phc25_state::video_ram_r));
m_vdg->set_get_char_rom(FUNC(phc25_state::pal_char_rom_r));
m_vdg->set_get_fixed_mode(mc6847_pal_device::MODE_GM2 | mc6847_pal_device::MODE_GM1 | mc6847_pal_device::MODE_INTEXT);
// other lines not connected
MACHINE_CONFIG_END
}
/* ROMs */

View File

@ -228,7 +228,8 @@ void shine_state::machine_start()
}
MACHINE_CONFIG_START(shine_state::shine)
void shine_state::shine(machine_config &config)
{
/* basic machine hardware */
M6502(config, m_maincpu, 2000000); // 2MHz ??
m_maincpu->set_addrmap(AS_PROGRAM, &shine_state::shine_mem);
@ -236,9 +237,10 @@ MACHINE_CONFIG_START(shine_state::shine)
INPUT_MERGER_ANY_HIGH(config, "irqs").output_handler().set_inputline("maincpu", M6502_IRQ_LINE);
/* video hardware */
MCFG_SCREEN_MC6847_PAL_ADD("screen", "vdg")
SCREEN(config, "screen", SCREEN_TYPE_RASTER);
MC6847_NTSC(config, m_vdg, 3.579545_MHz_XTAL);
MC6847_NTSC(config, m_vdg, 3.579545_MHz_XTAL); // or really PAL?
m_vdg->set_screen("screen");
m_vdg->input_callback().set(FUNC(shine_state::vdg_videoram_r));
m_vdg->set_black_and_white(true);
@ -267,7 +269,7 @@ MACHINE_CONFIG_START(shine_state::shine)
auto &cassette(CASSETTE(config, "cassette"));
cassette.set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED);
MACHINE_CONFIG_END
}
ROM_START( shine )

View File

@ -473,13 +473,14 @@ MACHINE_CONFIG_START(spc1000_state::spc1000)
MCFG_DEVICE_IO_MAP(spc1000_io)
/* video hardware */
MCFG_SCREEN_MC6847_NTSC_ADD("screen", "mc6847")
SCREEN(config, "screen", SCREEN_TYPE_RASTER);
MCFG_DEVICE_ADD("mc6847", MC6847_NTSC, XTAL(3'579'545))
MCFG_MC6847_FSYNC_CALLBACK(WRITELINE(*this, spc1000_state, irq_w))
MCFG_MC6847_INPUT_CALLBACK(READ8(*this, spc1000_state, mc6847_videoram_r))
MCFG_MC6847_CHARROM_CALLBACK(spc1000_state, get_char_rom)
MCFG_MC6847_FIXED_MODE(mc6847_ntsc_device::MODE_GM2)
MC6847_NTSC(config, m_vdg, XTAL(3'579'545));
m_vdg->set_screen("screen");
m_vdg->fsync_wr_callback().set(FUNC(spc1000_state::irq_w));
m_vdg->input_callback().set(FUNC(spc1000_state::mc6847_videoram_r));
m_vdg->set_get_char_rom(FUNC(spc1000_state::get_char_rom));
m_vdg->set_get_fixed_mode(mc6847_ntsc_device::MODE_GM2);
// other lines not connected
/* sound hardware */

View File

@ -391,10 +391,11 @@ MACHINE_CONFIG_START(sv8000_state::sv8000)
/* video hardware */
// S68047P - Unknown whether the internal or an external character rom is used
MCFG_DEVICE_ADD("s68047p", S68047, XTAL(10'738'635)/3 ) // Clock not verified
MCFG_MC6847_INPUT_CALLBACK(READ8(*this, sv8000_state, mc6847_videoram_r))
S68047(config, m_s68047p, XTAL(10'738'635)/3); // Clock not verified
m_s68047p->input_callback().set(FUNC(sv8000_state::mc6847_videoram_r));
m_s68047p->set_screen("screen");
MCFG_SCREEN_MC6847_NTSC_ADD("screen", "s68047p")
SCREEN(config, "screen", SCREEN_TYPE_RASTER);
/* sound hardware */
SPEAKER(config, "mono").front_center();

View File

@ -445,14 +445,16 @@ void vtech1_state::laser110(machine_config &config)
// video hardware
MC6847_PAL(config, m_mc6847, XTAL(4'433'619));
m_mc6847->set_screen("screen");
m_mc6847->fsync_wr_callback().set_inputline(m_maincpu, 0).invert();
m_mc6847->input_callback().set(FUNC(vtech1_state::mc6847_videoram_r));
m_mc6847->set_black_and_white(true);
m_mc6847->set_get_fixed_mode(mc6847_pal_device::MODE_GM1);
mc6847_base_device::add_pal_screen(config, "screen", "mc6847");
// GM2 = GND, GM0 = GND, INTEXT = GND
// other lines not connected
SCREEN(config, "screen", SCREEN_TYPE_RASTER);
// sound hardware
SPEAKER(config, "mono").front_center();
WAVE(config, "wave", m_cassette).add_route(ALL_OUTPUTS, "mono", 0.25);
@ -479,6 +481,7 @@ void vtech1_state::laser200(machine_config &config)
{
laser110(config);
MC6847_PAL(config.replace(), m_mc6847, XTAL(4'433'619));
m_mc6847->set_screen("screen");
m_mc6847->fsync_wr_callback().set_inputline(m_maincpu, 0).invert();
m_mc6847->input_callback().set(FUNC(vtech1_state::mc6847_videoram_r));
m_mc6847->set_get_fixed_mode(mc6847_pal_device::MODE_GM1);
@ -506,6 +509,7 @@ void vtech1_state::laser310h(machine_config &config)
m_maincpu->set_addrmap(AS_IO, &vtech1_state::vtech1_shrg_io);
MC6847_PAL(config.replace(), m_mc6847, XTAL(4'433'619));
m_mc6847->set_screen("screen");
m_mc6847->fsync_wr_callback().set_inputline(m_maincpu, 0).invert();
m_mc6847->input_callback().set(FUNC(vtech1_state::mc6847_videoram_r));
m_mc6847->set_get_fixed_mode(mc6847_pal_device::MODE_GM1);

View File

@ -467,10 +467,11 @@ MACHINE_CONFIG_START(z80ne_state::z80net)
m_lx387_kr2376->control().set(FUNC(z80ne_state::lx387_control_r));
/* video hardware */
MCFG_SCREEN_MC6847_PAL_ADD("lx388", "mc6847")
SCREEN(config, "lx388", SCREEN_TYPE_RASTER);
MCFG_DEVICE_ADD("mc6847", MC6847_PAL, 4.433619_MHz_XTAL)
MCFG_MC6847_INPUT_CALLBACK(READ8(*this, z80ne_state, lx388_mc6847_videoram_r))
MC6847_PAL(config, m_vdg, 4.433619_MHz_XTAL);
m_vdg->set_screen("lx388");
m_vdg->input_callback().set(FUNC(z80ne_state::lx388_mc6847_videoram_r));
// AG = GND, GM2 = GND, GM1 = GND, GM0 = GND, CSS = GND
// other lines not connected
@ -516,10 +517,11 @@ MACHINE_CONFIG_START(z80ne_state::z80netb)
m_lx387_kr2376->control().set(FUNC(z80ne_state::lx387_control_r));
/* video hardware */
MCFG_SCREEN_MC6847_PAL_ADD("lx388", "mc6847")
SCREEN(config, "lx388", SCREEN_TYPE_RASTER);
MCFG_DEVICE_ADD("mc6847", MC6847_PAL, 4.433619_MHz_XTAL)
MCFG_MC6847_INPUT_CALLBACK(READ8(*this, z80ne_state, lx388_mc6847_videoram_r))
MC6847_PAL(config, m_vdg, 4.433619_MHz_XTAL);
m_vdg->set_screen("lx388");
m_vdg->input_callback().set(FUNC(z80ne_state::lx388_mc6847_videoram_r));
// AG = GND, GM2 = GND, GM1 = GND, GM0 = GND, CSS = GND
// other lines not connected
@ -555,10 +557,11 @@ MACHINE_CONFIG_START(z80netf_state::z80netf)
KR2376_ST(config, m_lx387_kr2376, 50000);
/* video hardware */
MCFG_SCREEN_MC6847_PAL_ADD("lx388", "mc6847")
SCREEN(config, "lx388", SCREEN_TYPE_RASTER);
MCFG_DEVICE_ADD("mc6847", MC6847_PAL, 4.433619_MHz_XTAL)
MCFG_MC6847_INPUT_CALLBACK(READ8(*this, z80ne_state, lx388_mc6847_videoram_r))
MC6847_PAL(config, m_vdg, 4.433619_MHz_XTAL);
m_vdg->set_screen("lx388");
m_vdg->input_callback().set(FUNC(z80ne_state::lx388_mc6847_videoram_r));
// AG = GND, GM2 = GND, GM1 = GND, GM0 = GND, CSS = GND
// other lines not connected

View File

@ -72,6 +72,7 @@ protected:
private:
void configure_sam(void);
protected:
required_device<mc6847_base_device> m_vdg;
};