summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/sorcerer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/sorcerer.cpp')
-rw-r--r--src/mame/drivers/sorcerer.cpp88
1 files changed, 43 insertions, 45 deletions
diff --git a/src/mame/drivers/sorcerer.cpp b/src/mame/drivers/sorcerer.cpp
index f76ddad5d35..a18bd44d42f 100644
--- a/src/mame/drivers/sorcerer.cpp
+++ b/src/mame/drivers/sorcerer.cpp
@@ -408,64 +408,64 @@ DEVICE_INPUT_DEFAULTS_END
MACHINE_CONFIG_START(sorcerer_state::sorcerer)
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80, ES_CPU_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(sorcerer_mem)
- MCFG_DEVICE_IO_MAP(sorcerer_io)
+ Z80(config, m_maincpu, ES_CPU_CLOCK);
+ m_maincpu->set_addrmap(AS_PROGRAM, &sorcerer_state::sorcerer_mem);
+ m_maincpu->set_addrmap(AS_IO, &sorcerer_state::sorcerer_io);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(50)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(200))
- MCFG_SCREEN_SIZE(64*8, 30*8)
- MCFG_SCREEN_VISIBLE_AREA(0, 64*8-1, 0, 30*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(sorcerer_state, screen_update)
- MCFG_SCREEN_PALETTE("palette")
-
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_sorcerer)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(50);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(200));
+ screen.set_size(64*8, 30*8);
+ screen.set_visarea(0, 64*8-1, 0, 30*8-1);
+ screen.set_screen_update(FUNC(sorcerer_state::screen_update));
+ screen.set_palette("palette");
+
+ GFXDECODE(config, "gfxdecode", "palette", gfx_sorcerer);
PALETTE(config, "palette", palette_device::MONOCHROME);
/* sound hardware */
SPEAKER(config, "mono").front_center();
- WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.05); // cass1 speaker
- WAVE(config, "wave2", "cassette2").add_route(ALL_OUTPUTS, "mono", 0.05); // cass2 speaker
+ WAVE(config, "wave", m_cassette1).add_route(ALL_OUTPUTS, "mono", 0.05); // cass1 speaker
+ WAVE(config, "wave2", m_cassette2).add_route(ALL_OUTPUTS, "mono", 0.05); // cass2 speaker
AY31015(config, m_uart);
- m_uart->set_tx_clock(ES_UART_CLOCK);
- m_uart->set_rx_clock(ES_UART_CLOCK);
m_uart->set_auto_rdav(true);
+ CLOCK(config, m_uart_clock, ES_UART_CLOCK);
+ m_uart_clock->signal_handler().set(m_uart, FUNC(ay31015_device::write_tcp));
+ m_uart_clock->signal_handler().append(m_uart, FUNC(ay31015_device::write_rcp));
+
RS232_PORT(config, "rs232", default_rs232_devices, "null_modem").set_option_device_input_defaults("terminal", DEVICE_INPUT_DEFAULTS_NAME(terminal));
/* printer */
- MCFG_DEVICE_ADD("centronics", CENTRONICS, centronics_devices, "covox")
-
/* The use of the parallel port as a general purpose port is not emulated.
Currently the only use is to read the printer status in the Centronics CENDRV bios routine. */
- MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE("cent_status_in", input_buffer_device, write_bit7))
+ CENTRONICS(config, m_centronics, centronics_devices, "covox");
+ m_centronics->busy_handler().set("cent_status_in", FUNC(input_buffer_device::write_bit7));
- MCFG_DEVICE_ADD("cent_status_in", INPUT_BUFFER, 0)
+ INPUT_BUFFER(config, "cent_status_in");
/* quickload */
- MCFG_SNAPSHOT_ADD("snapshot", sorcerer_state, sorcerer, "snp", 2)
- MCFG_QUICKLOAD_ADD("quickload", sorcerer_state, sorcerer, "bin", 3)
+ MCFG_SNAPSHOT_ADD("snapshot", sorcerer_state, sorcerer, "snp", attotime::from_seconds(2))
+ MCFG_QUICKLOAD_ADD("quickload", sorcerer_state, sorcerer, "bin", attotime::from_seconds(3))
- MCFG_CASSETTE_ADD( "cassette" )
- MCFG_CASSETTE_FORMATS(sorcerer_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
- MCFG_CASSETTE_INTERFACE("sorcerer_cass")
+ CASSETTE(config, m_cassette1);
+ m_cassette1->set_formats(sorcerer_cassette_formats);
+ m_cassette1->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
+ m_cassette1->set_interface("sorcerer_cass");
- MCFG_CASSETTE_ADD( "cassette2" )
- MCFG_CASSETTE_FORMATS(sorcerer_cassette_formats)
- MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)
- MCFG_CASSETTE_INTERFACE("sorcerer_cass")
+ CASSETTE(config, m_cassette2);
+ m_cassette2->set_formats(sorcerer_cassette_formats);
+ m_cassette2->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED);
+ m_cassette2->set_interface("sorcerer_cass");
/* cartridge */
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "sorcerer_cart")
- MCFG_GENERIC_EXTENSIONS("bin,rom")
+ GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "sorcerer_cart", "bin,rom");
/* software lists */
- MCFG_SOFTWARE_LIST_ADD("cart_list","sorcerer_cart")
- MCFG_SOFTWARE_LIST_ADD("cass_list","sorcerer_cass")
+ SOFTWARE_LIST(config, "cart_list").set_original("sorcerer_cart");
+ SOFTWARE_LIST(config, "cass_list").set_original("sorcerer_cass");
// internal ram
RAM(config, RAM_TAG).set_default_size("48K").set_extra_options("8K,16K,32K");
@@ -476,29 +476,27 @@ static void floppies(device_slot_interface &device)
device.option_add("525qd", FLOPPY_525_QD);
}
-MACHINE_CONFIG_START(sorcerer_state::sorcererd)
+void sorcerer_state::sorcererd(machine_config &config)
+{
sorcerer(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(sorcererd_mem)
- MCFG_DEVICE_IO_MAP(sorcererd_io)
+ m_maincpu->set_addrmap(AS_PROGRAM, &sorcerer_state::sorcererd_mem);
+ m_maincpu->set_addrmap(AS_IO, &sorcerer_state::sorcererd_io);
MCFG_MACHINE_START_OVERRIDE(sorcerer_state, sorcererd )
MICROPOLIS(config, m_fdc, 0);
m_fdc->set_default_drive_tags();
- MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(sorcerer_floppy_interface)
+ legacy_floppy_image_device::add_4drives(config, &sorcerer_floppy_interface);
FD1793(config, m_fdc2, 8_MHz_XTAL / 8); // confirmed clock
m_fdc2->set_force_ready(true); // should be able to get rid of this when fdc issue is fixed
m_fdc2->intrq_wr_callback().set(FUNC(sorcerer_state::intrq_w));
m_fdc2->drq_wr_callback().set(FUNC(sorcerer_state::drq_w));
- MCFG_FLOPPY_DRIVE_ADD("fdc2:0", floppies, "525qd", floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_SOUND(true)
- MCFG_FLOPPY_DRIVE_ADD("fdc2:1", floppies, "525qd", floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_SOUND(true)
+ FLOPPY_CONNECTOR(config, "fdc2:0", floppies, "525qd", floppy_image_device::default_floppy_formats).enable_sound(true);
+ FLOPPY_CONNECTOR(config, "fdc2:1", floppies, "525qd", floppy_image_device::default_floppy_formats).enable_sound(true);
- MCFG_SOFTWARE_LIST_ADD("flop_list","sorcerer_flop")
-MACHINE_CONFIG_END
+ SOFTWARE_LIST(config, "flop_list").set_original("sorcerer_flop");
+}
void sorcerer_state::init_sorcerer()