summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/thomson.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/thomson.cpp')
-rw-r--r--src/mame/drivers/thomson.cpp90
1 files changed, 43 insertions, 47 deletions
diff --git a/src/mame/drivers/thomson.cpp b/src/mame/drivers/thomson.cpp
index ee0bcb3e5f0..a096c39acf7 100644
--- a/src/mame/drivers/thomson.cpp
+++ b/src/mame/drivers/thomson.cpp
@@ -300,7 +300,7 @@ T9000 (1980)
Early TO7 prototype.
The hardware seems to be the exactly same. Only the BIOS is different.
It has some bug that were corrected later for the TO7.
-Actually, the two computers are undistinguishable, except for the different
+Actually, the two computers are indistinguishable, except for the different
startup screen, and a couple BIOS addresses.
They can run the same software and accept the same devices and extensions.
@@ -309,7 +309,7 @@ They can run the same software and accept the same devices and extensions.
/* ------------ address maps ------------ */
-void thomson_state::to7(address_map &map)
+void thomson_state::to7_map(address_map &map)
{
map(0x0000, 0x3fff).bankr(THOM_CART_BANK).w(FUNC(thomson_state::to7_cartridge_w)); /* 4 * 16 KB */
@@ -625,22 +625,21 @@ MACHINE_CONFIG_START(thomson_state::to7_base)
MCFG_MACHINE_RESET_OVERRIDE( thomson_state, to7 )
/* cpu */
- MCFG_DEVICE_ADD("maincpu", MC6809E, 16_MHz_XTAL / 16)
- MCFG_DEVICE_PROGRAM_MAP(to7)
+ MC6809E(config, m_maincpu, 16_MHz_XTAL / 16);
+ m_maincpu->set_addrmap(AS_PROGRAM, &thomson_state::to7_map);
INPUT_MERGER_ANY_HIGH(config, "mainirq").output_handler().set_inputline(m_maincpu, M6809_IRQ_LINE);
INPUT_MERGER_ANY_HIGH(config, "mainfirq").output_handler().set_inputline(m_maincpu, M6809_FIRQ_LINE);
/* video */
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE ( /*50*/ 1./0.019968 )
- MCFG_SCREEN_SIZE ( THOM_TOTAL_WIDTH * 2, THOM_TOTAL_HEIGHT )
- MCFG_SCREEN_VISIBLE_AREA ( 0, THOM_TOTAL_WIDTH * 2 - 1,
- 0, THOM_TOTAL_HEIGHT - 1 )
- MCFG_SCREEN_UPDATE_DRIVER( thomson_state, screen_update_thom )
- MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, thomson_state, thom_vblank))
- MCFG_SCREEN_PALETTE("palette")
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_refresh_hz(/*50*/ 1./0.019968);
+ m_screen->set_size(THOM_TOTAL_WIDTH * 2, THOM_TOTAL_HEIGHT);
+ m_screen->set_visarea(0, THOM_TOTAL_WIDTH * 2 - 1, 0, THOM_TOTAL_HEIGHT - 1);
+ m_screen->set_screen_update(FUNC(thomson_state::screen_update_thom));
+ m_screen->screen_vblank().set(FUNC(thomson_state::thom_vblank));
+ m_screen->set_palette("palette");
PALETTE(config, "palette", FUNC(thomson_state::thom_palette), 4097); // 12-bit color + transparency
MCFG_VIDEO_START_OVERRIDE( thomson_state, thom )
@@ -655,8 +654,7 @@ MACHINE_CONFIG_START(thomson_state::to7_base)
vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
/* speech synthesis */
- MCFG_DEVICE_ADD("mea8000", MEA8000, 3840000)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0)
+ MEA8000(config, m_mea8000, 3840000).add_route(ALL_OUTPUTS, "speaker", 1.0);
/* cassette */
CASSETTE(config, m_cassette);
@@ -665,7 +663,7 @@ MACHINE_CONFIG_START(thomson_state::to7_base)
m_cassette->set_interface("to_cass");
/* floppy */
- MCFG_DEVICE_ADD("mc6843", MC6843, 16_MHz_XTAL / 16 / 2)
+ MC6843(config, m_mc6843, 16_MHz_XTAL / 16 / 2);
LEGACY_FLOPPY(config, m_floppy_image[0], 0, &thomson_floppy_interface);
m_floppy_image[0]->out_idx_cb().set(FUNC(thomson_state::fdc_index_0_w));
@@ -819,7 +817,7 @@ In arabic mode, Ctrl+E / Ctrl+X to start / stop typing in-line latin.
**********************************************************************/
-void thomson_state::to770(address_map &map)
+void thomson_state::to770_map(address_map &map)
{
map(0x0000, 0x3fff).bankr(THOM_CART_BANK).w(FUNC(thomson_state::to7_cartridge_w)); /* 4 * 16 KB */
@@ -924,13 +922,13 @@ INPUT_PORTS_END
/* ------------ driver ------------ */
-MACHINE_CONFIG_START(thomson_state::to770)
+void thomson_state::to770(machine_config &config)
+{
to7(config);
MCFG_MACHINE_START_OVERRIDE( thomson_state, to770 )
MCFG_MACHINE_RESET_OVERRIDE( thomson_state, to770 )
- MCFG_DEVICE_MODIFY( "maincpu" )
- MCFG_DEVICE_PROGRAM_MAP ( to770)
+ m_maincpu->set_addrmap(AS_PROGRAM, &thomson_state::to770_map);
m_pia_sys->readpa_handler().set(FUNC(thomson_state::to770_sys_porta_in));
m_pia_sys->readpb_handler().set_constant(0);
@@ -944,7 +942,7 @@ MACHINE_CONFIG_START(thomson_state::to770)
SOFTWARE_LIST(config, "t770_cart_list").set_original("to770_cart");
SOFTWARE_LIST(config.replace(), "to7_cart_list").set_compatible("to7_cart");
-MACHINE_CONFIG_END
+}
void thomson_state::to770a(machine_config &config)
{
@@ -1017,7 +1015,7 @@ Differences include:
**********************************************************************/
-void thomson_state::mo5(address_map &map)
+void thomson_state::mo5_map(address_map &map)
{
map(0x0000, 0x1fff).bankr(THOM_VRAM_BANK).w(FUNC(thomson_state::to770_vram_w));
@@ -1118,8 +1116,7 @@ MACHINE_CONFIG_START(thomson_state::mo5)
MCFG_MACHINE_START_OVERRIDE( thomson_state, mo5 )
MCFG_MACHINE_RESET_OVERRIDE( thomson_state, mo5 )
- MCFG_DEVICE_MODIFY( "maincpu" )
- MCFG_DEVICE_PROGRAM_MAP ( mo5)
+ m_maincpu->set_addrmap(AS_PROGRAM, &thomson_state::mo5_map);
m_cassette->set_formats(mo5_cassette_formats);
m_cassette->set_interface("mo_cass");
@@ -1153,9 +1150,10 @@ MACHINE_CONFIG_START(thomson_state::mo5)
m_ram->set_default_size("112K");
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(thomson_state::mo5e)
+void thomson_state::mo5e(machine_config &config)
+{
mo5(config);
-MACHINE_CONFIG_END
+}
COMP( 1984, mo5, 0, 0, mo5, mo5, thomson_state, empty_init, "Thomson", "MO5", 0 )
@@ -1235,7 +1233,7 @@ It was replaced quickly with the improved TO9+.
**********************************************************************/
-void thomson_state::to9(address_map &map)
+void thomson_state::to9_map(address_map &map)
{
map(0x0000, 0x3fff).bankr(THOM_CART_BANK).w(FUNC(thomson_state::to9_cartridge_w));/* 4 * 16 KB */
@@ -1470,14 +1468,14 @@ INPUT_PORTS_END
/* ------------ driver ------------ */
-MACHINE_CONFIG_START(thomson_state::to9)
+void thomson_state::to9(machine_config &config)
+{
to7(config);
MCFG_MACHINE_START_OVERRIDE( thomson_state, to9 )
MCFG_MACHINE_RESET_OVERRIDE( thomson_state, to9 )
- MCFG_DEVICE_MODIFY( "maincpu" )
- MCFG_DEVICE_PROGRAM_MAP ( to9)
+ m_maincpu->set_addrmap(AS_PROGRAM, &thomson_state::to9_map);
m_pia_sys->readpa_handler().set(FUNC(thomson_state::to9_sys_porta_in));
m_pia_sys->readpb_handler().set_constant(0);
@@ -1493,7 +1491,7 @@ MACHINE_CONFIG_START(thomson_state::to9)
/* internal ram */
m_ram->set_default_size("192K").set_extra_options("128K");
-MACHINE_CONFIG_END
+}
COMP( 1985, to9, 0, 0, to9, to9, thomson_state, empty_init, "Thomson", "TO9", MACHINE_IMPERFECT_COLORS )
@@ -1562,7 +1560,7 @@ The TO8D is simply a TO8 with an integrated 3"1/2 floppy drive.
**********************************************************************/
-void thomson_state::to8(address_map &map)
+void thomson_state::to8_map(address_map &map)
{
map(0x0000, 0x3fff).bankr(THOM_CART_BANK).w(FUNC(thomson_state::to8_cartridge_w)); /* 4 * 16 KB */
@@ -1691,15 +1689,15 @@ INPUT_PORTS_END
/* ------------ driver ------------ */
-MACHINE_CONFIG_START(thomson_state::to8)
+void thomson_state::to8(machine_config &config)
+{
to7(config);
MCFG_MACHINE_START_OVERRIDE( thomson_state, to8 )
MCFG_MACHINE_RESET_OVERRIDE( thomson_state, to8 )
- MCFG_DEVICE_MODIFY( "maincpu" )
- MCFG_DEVICE_PROGRAM_MAP ( to8)
+ m_maincpu->set_addrmap(AS_PROGRAM, &thomson_state::to8_map);
- //MCFG_DEVICE_ADD("kbdmcu", MC6804, 11_MHz_XTAL)
+ //MC6804(config, "kbdmcu", 11_MHz_XTAL);
m_pia_sys->readpa_handler().set(FUNC(thomson_state::to8_sys_porta_in));
m_pia_sys->readpb_handler().set_constant(0);
@@ -1722,7 +1720,7 @@ MACHINE_CONFIG_START(thomson_state::to8)
SOFTWARE_LIST(config, "to8_qd_list").set_original("to8_qd");
SOFTWARE_LIST(config.replace(), "to7_cass_list").set_compatible("to7_cass");
SOFTWARE_LIST(config.replace(), "to7_qd_list").set_compatible("to7_qd");
-MACHINE_CONFIG_END
+}
void thomson_state::to8d(machine_config &config)
{
@@ -1772,7 +1770,7 @@ The differences with the TO8 are:
**********************************************************************/
-void thomson_state::to9p(address_map &map)
+void thomson_state::to9p_map(address_map &map)
{
map(0x0000, 0x3fff).bankr(THOM_CART_BANK).w(FUNC(thomson_state::to8_cartridge_w)); /* 4 * 16 KB */
@@ -1853,13 +1851,13 @@ INPUT_PORTS_END
/* ------------ driver ------------ */
-MACHINE_CONFIG_START(thomson_state::to9p)
+void thomson_state::to9p(machine_config &config)
+{
to7(config);
MCFG_MACHINE_START_OVERRIDE( thomson_state, to9p )
MCFG_MACHINE_RESET_OVERRIDE( thomson_state, to9p )
- MCFG_DEVICE_MODIFY( "maincpu" )
- MCFG_DEVICE_PROGRAM_MAP ( to9p)
+ m_maincpu->set_addrmap(AS_PROGRAM, &thomson_state::to9p_map);
m_pia_sys->readpa_handler().set(FUNC(thomson_state::to8_sys_porta_in));
m_pia_sys->readpb_handler().set_constant(0);
@@ -1883,7 +1881,7 @@ MACHINE_CONFIG_START(thomson_state::to9p)
SOFTWARE_LIST(config, "to8_qd_list").set_original("to8_qd");
SOFTWARE_LIST(config.replace(), "to7_cass_list").set_compatible("to7_cass");
SOFTWARE_LIST(config.replace(), "to7_qd_list").set_compatible("to7_qd");
-MACHINE_CONFIG_END
+}
COMP( 1986, to9p, 0, 0, to9p, to9p, thomson_state, empty_init, "Thomson", "TO9+", 0 )
@@ -1947,7 +1945,7 @@ a PC XT.
**********************************************************************/
-void thomson_state::mo6(address_map &map)
+void thomson_state::mo6_map(address_map &map)
{
map(0x0000, 0x1fff).bankr(THOM_VRAM_BANK).w(FUNC(thomson_state::to770_vram_w));
@@ -2201,8 +2199,7 @@ MACHINE_CONFIG_START(thomson_state::mo6)
MCFG_MACHINE_START_OVERRIDE( thomson_state, mo6 )
MCFG_MACHINE_RESET_OVERRIDE( thomson_state, mo6 )
- MCFG_DEVICE_MODIFY( "maincpu" )
- MCFG_DEVICE_PROGRAM_MAP ( mo6)
+ m_maincpu->set_addrmap(AS_PROGRAM, &thomson_state::mo6_map);
m_cassette->set_formats(mo5_cassette_formats);
m_cassette->set_interface("mo_cass");
@@ -2297,7 +2294,7 @@ Here are the differences between the MO6 and MO5NR:
**********************************************************************/
-void thomson_state::mo5nr(address_map &map)
+void thomson_state::mo5nr_map(address_map &map)
{
map(0x0000, 0x1fff).bankr(THOM_VRAM_BANK).w(FUNC(thomson_state::to770_vram_w));
@@ -2467,8 +2464,7 @@ MACHINE_CONFIG_START(thomson_state::mo5nr)
MCFG_MACHINE_START_OVERRIDE( thomson_state, mo5nr )
MCFG_MACHINE_RESET_OVERRIDE( thomson_state, mo5nr )
- MCFG_DEVICE_MODIFY( "maincpu" )
- MCFG_DEVICE_PROGRAM_MAP ( mo5nr)
+ m_maincpu->set_addrmap(AS_PROGRAM, &thomson_state::mo5nr_map);
m_cassette->set_formats(mo5_cassette_formats);
m_cassette->set_interface("mo_cass");