From 22457cd9cef4d84293ecfaac2d5f7c3d3aa8d728 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Fri, 2 May 2014 17:19:09 +0000 Subject: [PATCH] cassette config moved inline (nw) --- src/emu/bus/a1bus/a1cassette.c | 12 +++------- src/emu/bus/adamnet/ddp.c | 27 +++++++++------------- src/emu/bus/pet/c2n.c | 18 ++++----------- src/emu/imagedev/cassette.c | 34 ++++++--------------------- src/emu/imagedev/cassette.h | 42 +++++++++++++++++++--------------- src/emu/imagedev/flopdrv.h | 30 ------------------------ src/mess/drivers/a2600.c | 18 +++++++-------- src/mess/drivers/a5105.c | 2 +- src/mess/drivers/a6809.c | 2 +- src/mess/drivers/abc80.c | 16 ++----------- src/mess/drivers/abc80x.c | 22 +++++------------- src/mess/drivers/ac1.c | 2 +- src/mess/drivers/ace.c | 18 ++++----------- src/mess/drivers/acrnsys1.c | 2 +- src/mess/drivers/aim65.c | 33 ++++++-------------------- src/mess/drivers/alesis.c | 12 +++------- src/mess/drivers/alphatro.c | 13 ++++------- src/mess/drivers/amstrad.c | 19 ++++++++------- src/mess/drivers/apf.c | 15 ++++-------- src/mess/drivers/apogee.c | 14 ++++-------- src/mess/drivers/apple2.c | 20 +++++++--------- src/mess/drivers/applix.c | 12 +++------- src/mess/drivers/aquarius.c | 11 ++------- src/mess/drivers/asst128.c | 11 ++------- src/mess/drivers/atom.c | 20 ++++++---------- src/mess/drivers/bbc.c | 18 +++++++-------- src/mess/drivers/binbug.c | 4 ++-- src/mess/drivers/bk.c | 15 ++++-------- src/mess/drivers/bmjr.c | 2 +- src/mess/drivers/bml3.c | 2 +- src/mess/drivers/bob85.c | 11 ++------- src/mess/drivers/c80.c | 12 +++------- src/mess/drivers/cd2650.c | 2 +- src/mess/drivers/cgenie.c | 12 +++------- src/mess/drivers/coco12.c | 6 +++-- src/mess/drivers/coco3.c | 5 +++- src/mess/drivers/compis.c | 18 +++------------ src/mess/drivers/comx35.c | 19 ++++----------- src/mess/drivers/cosmicos.c | 11 ++------- src/mess/drivers/cp1.c | 2 +- src/mess/drivers/crvision.c | 31 ++++--------------------- src/mess/drivers/d6800.c | 12 +++------- src/mess/drivers/dai.c | 11 ++------- src/mess/drivers/dolphunk.c | 2 +- src/mess/drivers/dragon.c | 6 ++++- src/mess/drivers/electron.c | 12 +++------- src/mess/drivers/elf.c | 12 +++------- src/mess/drivers/elwro800.c | 12 +++------- src/mess/drivers/ep64.c | 29 ++++++----------------- src/mess/drivers/eti660.c | 11 ++------- src/mess/drivers/exp85.c | 11 ++------- src/mess/drivers/fc100.c | 14 ++++-------- src/mess/drivers/fm7.c | 33 +++++++++++++++----------- src/mess/drivers/galaxy.c | 22 ++++++++---------- src/mess/drivers/h8.c | 14 ++++-------- src/mess/drivers/hec2hrp.c | 33 ++++++++++++++------------ src/mess/drivers/homelab.c | 6 ++--- src/mess/drivers/huebler.c | 12 +++------- src/mess/drivers/hx20.c | 2 +- src/mess/drivers/ibmpcjr.c | 11 ++------- src/mess/drivers/instruct.c | 2 +- src/mess/drivers/interact.c | 20 ++++++++-------- src/mess/drivers/intv.c | 12 +--------- src/mess/drivers/iq151.c | 13 ++++------- src/mess/drivers/jr100.c | 10 ++------ src/mess/drivers/jtc.c | 11 ++------- src/mess/drivers/kc.c | 18 +++++++-------- src/mess/drivers/kim1.c | 14 ++++-------- src/mess/drivers/kyocera.c | 21 ++++++++--------- src/mess/drivers/lc80.c | 14 ++++-------- src/mess/drivers/lola8a.c | 2 +- src/mess/drivers/lviv.c | 15 ++++-------- src/mess/drivers/m5.c | 23 +++---------------- src/mess/drivers/mbee.c | 16 +++++-------- src/mess/drivers/mc10.c | 25 ++++++-------------- src/mess/drivers/mc1000.c | 12 +++------- src/mess/drivers/mc1502.c | 11 ++------- src/mess/drivers/mekd2.c | 2 +- src/mess/drivers/microtan.c | 2 +- src/mess/drivers/mikro80.c | 14 +++--------- src/mess/drivers/mikrosha.c | 16 ++++--------- src/mess/drivers/mkit09.c | 2 +- src/mess/drivers/mpf1.c | 19 +++++---------- src/mess/drivers/msx.c | 24 +++++++++---------- src/mess/drivers/mtx.c | 15 +++--------- src/mess/drivers/mycom.c | 2 +- src/mess/drivers/mz2000.c | 14 ++++-------- src/mess/drivers/mz700.c | 15 ++++-------- src/mess/drivers/mz80.c | 11 ++------- src/mess/drivers/nascom1.c | 2 +- src/mess/drivers/nes.c | 14 ++++-------- src/mess/drivers/newbrain.c | 15 ++++-------- src/mess/drivers/ondra.c | 13 ++++------- src/mess/drivers/orao.c | 15 ++++-------- src/mess/drivers/oric.c | 13 ++++------- src/mess/drivers/orion.c | 26 ++++++++++++--------- src/mess/drivers/osi.c | 6 ++--- src/mess/drivers/partner.c | 14 ++++-------- src/mess/drivers/pc8001.c | 16 ++++--------- src/mess/drivers/pc8801.c | 12 +++------- src/mess/drivers/pcm.c | 2 +- src/mess/drivers/pecom.c | 13 ++++------- src/mess/drivers/pegasus.c | 12 ++-------- src/mess/drivers/pencil2.c | 2 +- src/mess/drivers/phc25.c | 15 ++++-------- src/mess/drivers/phunsy.c | 2 +- src/mess/drivers/pk8000.c | 13 +++-------- src/mess/drivers/pk8020.c | 12 ++-------- src/mess/drivers/pmd85.c | 14 ++++-------- src/mess/drivers/poisk1.c | 11 ++------- src/mess/drivers/poly88.c | 12 +++------- src/mess/drivers/poly880.c | 11 ++------- src/mess/drivers/primo.c | 13 ++++------- src/mess/drivers/pro80.c | 2 +- src/mess/drivers/ptcsol.c | 18 +++++++-------- src/mess/drivers/pv2000.c | 12 ++-------- src/mess/drivers/px4.c | 12 +++------- src/mess/drivers/px8.c | 19 ++------------- src/mess/drivers/radio86.c | 15 ++++-------- src/mess/drivers/ravens.c | 4 ++-- src/mess/drivers/rx78.c | 2 +- src/mess/drivers/samcoupe.c | 14 ++++-------- src/mess/drivers/sg1000.c | 22 +++++++----------- src/mess/drivers/sorcerer.c | 19 ++++++++------- src/mess/drivers/spc1000.c | 12 +++------- src/mess/drivers/special.c | 19 ++++++++------- src/mess/drivers/spectrum.c | 14 ++++-------- src/mess/drivers/super80.c | 17 +++++--------- src/mess/drivers/svi318.c | 18 +++++++-------- src/mess/drivers/tavernie.c | 2 +- src/mess/drivers/tec1.c | 2 +- src/mess/drivers/thomson.c | 27 ++++++---------------- src/mess/drivers/ti99_4p.c | 2 +- src/mess/drivers/ti99_4x.c | 12 +++++----- src/mess/drivers/ti99_8.c | 2 +- src/mess/drivers/tiki100.c | 15 +++--------- src/mess/drivers/tm990189.c | 4 ++-- src/mess/drivers/tmc1800.c | 20 +++++++--------- src/mess/drivers/tmc2000e.c | 11 ++------- src/mess/drivers/tmc600.c | 11 ++------- src/mess/drivers/trs80.c | 15 ++++-------- src/mess/drivers/tutor.c | 2 +- src/mess/drivers/tvc.c | 13 ++++------- src/mess/drivers/ut88.c | 21 +++++++++-------- src/mess/drivers/vc4000.c | 2 +- src/mess/drivers/vector06.c | 11 ++------- src/mess/drivers/vg5k.c | 14 ++++-------- src/mess/drivers/vip.c | 17 +++----------- src/mess/drivers/vtech1.c | 12 +++------- src/mess/drivers/vtech2.c | 12 +++------- src/mess/drivers/x07.c | 13 ++++------- src/mess/drivers/x1.c | 22 ++++-------------- src/mess/drivers/x1twin.c | 13 ++++------- src/mess/drivers/z1013.c | 13 +++-------- src/mess/drivers/z80ne.c | 37 ++++++++++++------------------ src/mess/drivers/z9001.c | 2 +- src/mess/drivers/zx.c | 24 ++++--------------- src/mess/includes/coco.h | 1 - src/mess/includes/sg1000.h | 1 - src/mess/machine/coco.c | 14 ------------ src/mess/machine/genpc.c | 11 ++------- 161 files changed, 661 insertions(+), 1449 deletions(-) diff --git a/src/emu/bus/a1bus/a1cassette.c b/src/emu/bus/a1bus/a1cassette.c index 33f781229a8..08f14adb1fa 100644 --- a/src/emu/bus/a1bus/a1cassette.c +++ b/src/emu/bus/a1bus/a1cassette.c @@ -22,16 +22,10 @@ const device_type A1BUS_CASSETTE = &device_creator; /* sound output */ -static const cassette_interface apple1_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED), - "apple1_cass" -}; - MACHINE_CONFIG_FRAGMENT( cassette ) - MCFG_CASSETTE_ADD("cassette", apple1_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED) + MCFG_CASSETTE_INTERFACE("apple1_cass") MACHINE_CONFIG_END ROM_START( cassette ) diff --git a/src/emu/bus/adamnet/ddp.c b/src/emu/bus/adamnet/ddp.c index 5cc71853953..ccd0fd1acdb 100644 --- a/src/emu/bus/adamnet/ddp.c +++ b/src/emu/bus/adamnet/ddp.c @@ -71,11 +71,6 @@ static ADDRESS_MAP_START( adam_ddp_io, AS_IO, 8, adam_digital_data_pack_device ) AM_RANGE(M6801_PORT4, M6801_PORT4) AM_READ(p4_r) AM_WRITENOP ADDRESS_MAP_END - -//------------------------------------------------- -// cassette_interface adam_cassette_interface -//------------------------------------------------- - static const struct CassetteOptions adam_cassette_options = { 2, /* channels */ @@ -83,15 +78,6 @@ static const struct CassetteOptions adam_cassette_options = 44100 /* sample frequency */ }; -static const cassette_interface adam_cassette_interface = -{ - coleco_adam_cassette_formats, - &adam_cassette_options, - (cassette_state)(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED), - "adam_cass" -}; - - //------------------------------------------------- // MACHINE_DRIVER( adam_ddp ) //------------------------------------------------- @@ -101,8 +87,17 @@ static MACHINE_CONFIG_FRAGMENT( adam_ddp ) MCFG_CPU_PROGRAM_MAP(adam_ddp_mem) MCFG_CPU_IO_MAP(adam_ddp_io) - MCFG_CASSETTE_ADD("cassette", adam_cassette_interface) - MCFG_CASSETTE_ADD("cassette2", adam_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_FORMATS(coleco_adam_cassette_formats) + MCFG_CASSETTE_CREATE_OPTS(&adam_cassette_options) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED) + MCFG_CASSETTE_INTERFACE("adam_cass") + + MCFG_CASSETTE_ADD("cassette2") + MCFG_CASSETTE_FORMATS(coleco_adam_cassette_formats) + MCFG_CASSETTE_CREATE_OPTS(&adam_cassette_options) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED) + MCFG_CASSETTE_INTERFACE("adam_cass") MACHINE_CONFIG_END diff --git a/src/emu/bus/pet/c2n.c b/src/emu/bus/pet/c2n.c index 64b4e40ffed..b2061c47b91 100644 --- a/src/emu/bus/pet/c2n.c +++ b/src/emu/bus/pet/c2n.c @@ -22,25 +22,15 @@ const device_type C1530 = &device_creator; const device_type C1531 = &device_creator; -//------------------------------------------------- -// cassette_interface cbm_cassette_interface -//------------------------------------------------- - -const cassette_interface cbm_cassette_interface = -{ - cbm_cassette_formats, - NULL, - (cassette_state) (CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED), - "cbm_cass" -}; - - //------------------------------------------------- // MACHINE_CONFIG( c2n ) //------------------------------------------------- static MACHINE_CONFIG_FRAGMENT( c2n ) - MCFG_CASSETTE_ADD("cassette", cbm_cassette_interface ) + MCFG_CASSETTE_ADD("cassette" ) + MCFG_CASSETTE_FORMATS(cbm_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED) + MCFG_CASSETTE_INTERFACE("cbm_cass") MACHINE_CONFIG_END diff --git a/src/emu/imagedev/cassette.c b/src/emu/imagedev/cassette.c index f05294ce299..d00089b20f2 100644 --- a/src/emu/imagedev/cassette.c +++ b/src/emu/imagedev/cassette.c @@ -18,16 +18,6 @@ #define VERBOSE 0 #define LOG(x) do { if (VERBOSE) logerror x; } while (0) -/* Default cassette_interface for drivers only wav files */ -const cassette_interface default_cassette_interface = -{ - cassette_default_formats, - NULL, - CASSETTE_PLAY, - "cass" -}; - - // device type definition const device_type CASSETTE = &device_creator; @@ -36,9 +26,13 @@ const device_type CASSETTE = &device_creator; //------------------------------------------------- cassette_image_device::cassette_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : device_t(mconfig, CASSETTE, "Cassette", tag, owner, clock, "cassette_image", __FILE__) - , device_image_interface(mconfig, *this) - , m_state(CASSETTE_STOPPED) + : device_t(mconfig, CASSETTE, "Cassette", tag, owner, clock, "cassette_image", __FILE__), + device_image_interface(mconfig, *this), + m_state(CASSETTE_STOPPED), + m_formats(cassette_default_formats), + m_create_opts(NULL), + m_default_state(CASSETTE_PLAY), + m_interface(NULL) { } @@ -58,20 +52,6 @@ cassette_image_device::~cassette_image_device() void cassette_image_device::device_config_complete() { - // inherit a copy of the static data - const cassette_interface *intf = reinterpret_cast(static_config()); - if (intf != NULL) - *static_cast(this) = *intf; - - // or initialize to defaults if none provided - else - { - memset(&m_formats, 0, sizeof(m_formats)); - memset(&m_create_opts, 0, sizeof(m_create_opts)); - memset(&m_default_state, 0, sizeof(m_default_state)); - memset(&m_interface, 0, sizeof(m_interface)); - } - m_extension_list[0] = '\0'; for (int i = 0; m_formats[i]; i++ ) image_specify_extension( m_extension_list, 256, m_formats[i]->extensions ); diff --git a/src/emu/imagedev/cassette.h b/src/emu/imagedev/cassette.h index 7feb2b3b5ec..66de5f12c5a 100644 --- a/src/emu/imagedev/cassette.h +++ b/src/emu/imagedev/cassette.h @@ -37,20 +37,9 @@ enum cassette_state TYPE DEFINITIONS ***************************************************************************/ -// ======================> cassette_interface - -struct cassette_interface -{ - const struct CassetteFormat* const *m_formats; - const struct CassetteOptions *m_create_opts; - cassette_state m_default_state; - const char * m_interface; -}; - // ======================> cassette_image_device class cassette_image_device : public device_t, - public cassette_interface, public device_image_interface { public: @@ -58,6 +47,11 @@ public: cassette_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); virtual ~cassette_image_device(); + static void static_set_formats(device_t &device, const struct CassetteFormat* const *formats) { downcast(device).m_formats = formats; } + static void static_set_create_opts(device_t &device, const struct CassetteOptions *create_opts) { downcast(device).m_create_opts = create_opts; } + static void static_set_default_state(device_t &device, cassette_state default_state) { downcast(device).m_default_state = default_state; } + static void static_set_interface(device_t &device, const char *_interface) { downcast(device).m_interface = _interface; } + // image-level overrides virtual bool call_load(); virtual bool call_create(int format_type, option_resolution *format_options); @@ -110,6 +104,10 @@ private: double m_speed; // speed multiplier for tape speeds other than standard 1.875ips (used in adam driver) int m_direction; // direction select char m_extension_list[256]; + const struct CassetteFormat* const *m_formats; + const struct CassetteOptions *m_create_opts; + cassette_state m_default_state; + const char * m_interface; }; // device type definition @@ -121,14 +119,22 @@ typedef device_type_iterator<&device_creator, cassette_im /*************************************************************************** DEVICE CONFIGURATION MACROS ***************************************************************************/ -#define MCFG_CASSETTE_ADD(_tag, _config) \ - MCFG_DEVICE_ADD(_tag, CASSETTE, 0) \ - MCFG_DEVICE_CONFIG(_config) +#define MCFG_CASSETTE_ADD(_tag) \ + MCFG_DEVICE_ADD(_tag, CASSETTE, 0) -#define MCFG_CASSETTE_MODIFY(_tag, _config) \ - MCFG_DEVICE_MODIFY(_tag) \ - MCFG_DEVICE_CONFIG(_config) +#define MCFG_CASSETTE_MODIFY(_tag) \ + MCFG_DEVICE_MODIFY(_tag) + +#define MCFG_CASSETTE_FORMATS(_formats) \ + cassette_image_device::static_set_formats(*device, _formats); -extern const cassette_interface default_cassette_interface; +#define MCFG_CASSETTE_CREATE_OPTS(_create_opts) \ + cassette_image_device::static_set_create_opts(*device, _create_opts); + +#define MCFG_CASSETTE_DEFAULT_STATE(_state) \ + cassette_image_device::static_set_default_state(*device, (cassette_state) (_state)); + +#define MCFG_CASSETTE_INTERFACE(_interface) \ + cassette_image_device::static_set_interface(*device, _interface); #endif /* CASSETTE_H */ diff --git a/src/emu/imagedev/flopdrv.h b/src/emu/imagedev/flopdrv.h index 2b197573bc4..edf1bdf3038 100644 --- a/src/emu/imagedev/flopdrv.h +++ b/src/emu/imagedev/flopdrv.h @@ -245,10 +245,6 @@ int floppy_get_count(running_machine &machine); MCFG_DEVICE_ADD(_tag, LEGACY_FLOPPY, 0) \ MCFG_DEVICE_CONFIG(_config) -#define MCFG_LEGACY_FLOPPY_DRIVE_MODIFY(_tag, _config) \ - MCFG_DEVICE_MODIFY(_tag) \ - MCFG_DEVICE_CONFIG(_config) - #define MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(_config) \ MCFG_DEVICE_ADD(FLOPPY_0, LEGACY_FLOPPY, 0) \ MCFG_DEVICE_CONFIG(_config) \ @@ -259,36 +255,10 @@ int floppy_get_count(running_machine &machine); MCFG_DEVICE_ADD(FLOPPY_3, LEGACY_FLOPPY, 0) \ MCFG_DEVICE_CONFIG(_config) -#define MCFG_LEGACY_FLOPPY_4_DRIVES_MODIFY(_config) \ - MCFG_DEVICE_MODIFY(FLOPPY_0) \ - MCFG_DEVICE_CONFIG(_config) \ - MCFG_DEVICE_MODIFY(FLOPPY_1) \ - MCFG_DEVICE_CONFIG(_config) \ - MCFG_DEVICE_MODIFY(FLOPPY_2) \ - MCFG_DEVICE_CONFIG(_config) \ - MCFG_DEVICE_MODIFY(FLOPPY_3) \ - MCFG_DEVICE_CONFIG(_config) - -#define MCFG_LEGACY_FLOPPY_4_DRIVES_REMOVE() \ - MCFG_DEVICE_REMOVE(FLOPPY_0) \ - MCFG_DEVICE_REMOVE(FLOPPY_1) \ - MCFG_DEVICE_REMOVE(FLOPPY_2) \ - MCFG_DEVICE_REMOVE(FLOPPY_3) - #define MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(_config) \ MCFG_DEVICE_ADD(FLOPPY_0, LEGACY_FLOPPY, 0) \ MCFG_DEVICE_CONFIG(_config) \ MCFG_DEVICE_ADD(FLOPPY_1, LEGACY_FLOPPY, 0) \ MCFG_DEVICE_CONFIG(_config) -#define MCFG_LEGACY_FLOPPY_2_DRIVES_MODIFY(_config) \ - MCFG_DEVICE_MODIFY(FLOPPY_0) \ - MCFG_DEVICE_CONFIG(_config) \ - MCFG_DEVICE_MODIFY(FLOPPY_1) \ - MCFG_DEVICE_CONFIG(_config) - -#define MCFG_LEGACY_FLOPPY_2_DRIVES_REMOVE() \ - MCFG_DEVICE_REMOVE(FLOPPY_0) \ - MCFG_DEVICE_REMOVE(FLOPPY_1) - #endif /* __FLOPDRV_H__ */ diff --git a/src/mess/drivers/a2600.c b/src/mess/drivers/a2600.c index 03f87dfa097..6bc798501a3 100644 --- a/src/mess/drivers/a2600.c +++ b/src/mess/drivers/a2600.c @@ -1895,14 +1895,6 @@ static INPUT_PORTS_START( a2600 ) INPUT_PORTS_END -static const cassette_interface a2600_cassette_interface = -{ - a26_cassette_formats, - NULL, - (cassette_state)(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED), - "a2600_cass" -}; - static MACHINE_CONFIG_FRAGMENT(a2600_cartslot) MCFG_CARTSLOT_ADD("cart") MCFG_CARTSLOT_EXTENSION_LIST("bin,a26") @@ -1954,7 +1946,10 @@ static MACHINE_CONFIG_START( a2600, a2600_state ) MCFG_FRAGMENT_ADD(a2600_cartslot) MCFG_SOFTWARE_LIST_FILTER("cart_list", "NTSC") - MCFG_CASSETTE_ADD( "cassette", a2600_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(a26_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED) + MCFG_CASSETTE_INTERFACE("a2600_cass") MACHINE_CONFIG_END @@ -1998,7 +1993,10 @@ static MACHINE_CONFIG_START( a2600p, a2600_state ) MCFG_FRAGMENT_ADD(a2600_cartslot) MCFG_SOFTWARE_LIST_FILTER("cart_list", "PAL") - MCFG_CASSETTE_ADD( "cassette", a2600_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(a26_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED) + MCFG_CASSETTE_INTERFACE("a2600_cass") MACHINE_CONFIG_END diff --git a/src/mess/drivers/a5105.c b/src/mess/drivers/a5105.c index af16d91f305..7ae53571d60 100644 --- a/src/mess/drivers/a5105.c +++ b/src/mess/drivers/a5105.c @@ -598,7 +598,7 @@ static MACHINE_CONFIG_START( a5105, a5105_state ) MCFG_DEVICE_ADD("z80pio", Z80PIO, XTAL_15MHz / 4) MCFG_Z80PIO_OUT_INT_CB(INPUTLINE("maincpu", 0)) - MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) MCFG_UPD765A_ADD("upd765a", true, true) MCFG_FLOPPY_DRIVE_ADD("upd765a:0", a5105_floppies, "525qd", a5105_state::floppy_formats) diff --git a/src/mess/drivers/a6809.c b/src/mess/drivers/a6809.c index ca594096cb4..12012d6ecea 100644 --- a/src/mess/drivers/a6809.c +++ b/src/mess/drivers/a6809.c @@ -257,7 +257,7 @@ static MACHINE_CONFIG_START( a6809, a6809_state ) MCFG_DEVICE_ADD("keyboard", GENERIC_KEYBOARD, 0) MCFG_GENERIC_KEYBOARD_CB(WRITE8(a6809_state, kbd_put)) - MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) MCFG_TIMER_DRIVER_ADD_PERIODIC("a6809_c", a6809_state, a6809_c, attotime::from_hz(4800)) MCFG_TIMER_DRIVER_ADD_PERIODIC("a6809_p", a6809_state, a6809_p, attotime::from_hz(40000)) MACHINE_CONFIG_END diff --git a/src/mess/drivers/abc80.c b/src/mess/drivers/abc80.c index 372ae5845cd..1006959e25f 100644 --- a/src/mess/drivers/abc80.c +++ b/src/mess/drivers/abc80.c @@ -398,19 +398,6 @@ static const z80_daisy_config abc80_daisy_chain[] = }; -//------------------------------------------------- -// cassette_interface abc80_cassette_interface -//------------------------------------------------- - -static const cassette_interface abc80_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED), - NULL -}; - - //------------------------------------------------- // ABC80_KEYBOARD_INTERFACE( kb_intf ) //------------------------------------------------- @@ -546,7 +533,8 @@ static MACHINE_CONFIG_START( abc80, abc80_state ) MCFG_Z80PIO_IN_PB_CB(READ8(abc80_state, pio_pb_r)) MCFG_Z80PIO_OUT_PB_CB(WRITE8(abc80_state, pio_pb_w)) - MCFG_CASSETTE_ADD("cassette", abc80_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED) MCFG_DEVICE_ADD(ABC80_KEYBOARD_TAG, ABC80_KEYBOARD, 0) MCFG_ABC80_KEYBOARD_KEYDOWN_CALLBACK(WRITELINE(abc80_state, keydown_w)) diff --git a/src/mess/drivers/abc80x.c b/src/mess/drivers/abc80x.c index 02fe2cc41ac..386743f909c 100644 --- a/src/mess/drivers/abc80x.c +++ b/src/mess/drivers/abc80x.c @@ -764,19 +764,6 @@ static const z80_daisy_config abc800_daisy_chain[] = }; -//------------------------------------------------- -// cassette_interface cass_intf -//------------------------------------------------- - -static const cassette_interface cass_intf = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED), - NULL -}; - - //************************************************************************** // MACHINE INITIALIZATION //************************************************************************** @@ -1054,7 +1041,8 @@ static MACHINE_CONFIG_START( abc800c, abc800c_state ) MCFG_Z80DART_OUT_TXDB_CB(DEVWRITELINE(ABC_KEYBOARD_PORT_TAG, abc_keyboard_port_device, txd_w)) MCFG_Z80DART_OUT_INT_CB(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0)) - MCFG_CASSETTE_ADD("cassette", cass_intf) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED) MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, NULL) MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, rxa_w)) @@ -1128,7 +1116,8 @@ static MACHINE_CONFIG_START( abc800m, abc800m_state ) MCFG_Z80DART_OUT_TXDB_CB(DEVWRITELINE(ABC_KEYBOARD_PORT_TAG, abc_keyboard_port_device, txd_w)) MCFG_Z80DART_OUT_INT_CB(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0)) - MCFG_CASSETTE_ADD("cassette", cass_intf) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED) MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, NULL) MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, rxa_w)) @@ -1204,7 +1193,8 @@ static MACHINE_CONFIG_START( abc802, abc802_state ) MCFG_Z80DART_OUT_RTSB_CB(WRITELINE(abc802_state, mux80_40_w)) MCFG_Z80DART_OUT_INT_CB(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0)) - MCFG_CASSETTE_ADD("cassette", cass_intf) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED) MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, NULL) MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, rxa_w)) diff --git a/src/mess/drivers/ac1.c b/src/mess/drivers/ac1.c index a2f140d3d09..bbbb57210c7 100644 --- a/src/mess/drivers/ac1.c +++ b/src/mess/drivers/ac1.c @@ -149,7 +149,7 @@ static MACHINE_CONFIG_START( ac1, ac1_state ) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) - MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( ac1_32, ac1 ) diff --git a/src/mess/drivers/ace.c b/src/mess/drivers/ace.c index dd4dbf90c04..12eb777e6ad 100644 --- a/src/mess/drivers/ace.c +++ b/src/mess/drivers/ace.c @@ -530,19 +530,6 @@ UINT32 ace_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, con // DEVICE CONFIGURATION //************************************************************************** -//------------------------------------------------- -// cassette_interface ace_cassette_interface -//------------------------------------------------- - -static const cassette_interface ace_cassette_interface = -{ - ace_cassette_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED), - NULL -}; - - //------------------------------------------------- // ay8910_interface psg_intf //------------------------------------------------- @@ -724,7 +711,10 @@ static MACHINE_CONFIG_START( ace, ace_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) // devices - MCFG_CASSETTE_ADD("cassette", ace_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_FORMATS(ace_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED) + MCFG_SNAPSHOT_ADD("snapshot", ace_state, ace, "ace", 1) MCFG_DEVICE_ADD(I8255_TAG, I8255A, 0) diff --git a/src/mess/drivers/acrnsys1.c b/src/mess/drivers/acrnsys1.c index f08d8ee8e8e..8e239f38cf1 100644 --- a/src/mess/drivers/acrnsys1.c +++ b/src/mess/drivers/acrnsys1.c @@ -258,7 +258,7 @@ static MACHINE_CONFIG_START( acrnsys1, acrnsys1_state ) MCFG_INS8154_OUT_A_CB(WRITE8(acrnsys1_state, ins8154_b1_port_a_w)) MCFG_INS8154_OUT_B_CB(WRITE8(acrnsys1_state, acrnsys1_led_segment_w)) MCFG_DEVICE_ADD("ic8_7445", TTL74145, 0) - MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) MCFG_TIMER_DRIVER_ADD_PERIODIC("acrnsys1_c", acrnsys1_state, acrnsys1_c, attotime::from_hz(4800)) MCFG_TIMER_DRIVER_ADD_PERIODIC("acrnsys1_p", acrnsys1_state, acrnsys1_p, attotime::from_hz(40000)) MACHINE_CONFIG_END diff --git a/src/mess/drivers/aim65.c b/src/mess/drivers/aim65.c index 5bc534029a3..ab738bc8bd7 100644 --- a/src/mess/drivers/aim65.c +++ b/src/mess/drivers/aim65.c @@ -140,30 +140,6 @@ static INPUT_PORTS_START( aim65 ) INPUT_PORTS_END -/*************************************************************************** - DEVICE INTERFACES -***************************************************************************/ - - -// Deck 1 can play and record -static const cassette_interface aim65_1_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED), - NULL -}; - -// Deck 2 can only record -static const cassette_interface aim65_2_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_RECORD | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED), - NULL -}; - - /*************************************************************************** MACHINE DRIVERS ***************************************************************************/ @@ -292,8 +268,13 @@ static MACHINE_CONFIG_START( aim65, aim65_state ) MCFG_PIA_WRITEPA_HANDLER(WRITE8(aim65_state, aim65_pia_a_w)) MCFG_PIA_WRITEPB_HANDLER(WRITE8(aim65_state, aim65_pia_b_w)) - MCFG_CASSETTE_ADD( "cassette", aim65_1_cassette_interface ) - MCFG_CASSETTE_ADD( "cassette2", aim65_2_cassette_interface ) + // Deck 1 can play and record + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED) + + // Deck 2 can only record + MCFG_CASSETTE_ADD( "cassette2" ) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_RECORD | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED) MCFG_CARTSLOT_ADD("z26") MCFG_CARTSLOT_EXTENSION_LIST("z26") diff --git a/src/mess/drivers/alesis.c b/src/mess/drivers/alesis.c index d37282c0893..b13bc16708c 100644 --- a/src/mess/drivers/alesis.c +++ b/src/mess/drivers/alesis.c @@ -243,14 +243,6 @@ static HD44780_PIXEL_UPDATE(sr16_pixel_update) bitmap.pix16(line*9 + y, pos*6 + x) = state; } -static const cassette_interface hr16_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED), - "hr16_cass" -}; - static MACHINE_CONFIG_START( hr16, alesis_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu",I8031, XTAL_12MHz) @@ -270,7 +262,9 @@ static MACHINE_CONFIG_START( hr16, alesis_state ) MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") MCFG_PALETTE_INIT_OWNER(alesis_state, alesis) - MCFG_CASSETTE_ADD( "cassette", hr16_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED) + MCFG_CASSETTE_INTERFACE("hr16_cass") MCFG_HD44780_ADD("hd44780") MCFG_HD44780_LCD_SIZE(2, 16) diff --git a/src/mess/drivers/alphatro.c b/src/mess/drivers/alphatro.c index efdd73a487d..acc2fcc9f88 100644 --- a/src/mess/drivers/alphatro.c +++ b/src/mess/drivers/alphatro.c @@ -444,14 +444,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(alphatro_state::timer_p) } } -static const cassette_interface alphatro_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state) (CASSETTE_PLAY | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED), - "alphatro_cass" -}; - static MACHINE_CONFIG_START( alphatro, alphatro_state ) /* basic machine hardware */ @@ -489,7 +481,10 @@ static MACHINE_CONFIG_START( alphatro, alphatro_state ) MCFG_DEVICE_ADD("usart_clock", CLOCK, 19218) // 19218 to load a real tape, 19222 to load a tape made by this driver MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(alphatro_state, write_usart_clock)) - MCFG_CASSETTE_ADD("cassette", alphatro_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED) + MCFG_CASSETTE_INTERFACE("alphatro_cass") + MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_c", alphatro_state, timer_c, attotime::from_hz(4800)) MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_p", alphatro_state, timer_p, attotime::from_hz(40000)) diff --git a/src/mess/drivers/amstrad.c b/src/mess/drivers/amstrad.c index 5d644e5ae7a..149f4808a1f 100644 --- a/src/mess/drivers/amstrad.c +++ b/src/mess/drivers/amstrad.c @@ -803,14 +803,6 @@ speed of 3.8 MHz */ */ -static const cassette_interface amstrad_cassette_interface = -{ - cdt_cassette_formats, - NULL, - (cassette_state) (CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED), - "cpc_cass" -}; - static SLOT_INTERFACE_START( amstrad_floppies ) SLOT_INTERFACE( "3ssdd", FLOPPY_3_SSDD ) SLOT_INTERFACE_END @@ -898,7 +890,11 @@ static MACHINE_CONFIG_START( amstrad_nofdc, amstrad_state ) /* snapshot */ MCFG_SNAPSHOT_ADD("snapshot", amstrad_state, amstrad, "sna", 0) - MCFG_CASSETTE_ADD( "cassette", amstrad_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(cdt_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED) + MCFG_CASSETTE_INTERFACE("cpc_cass") + MCFG_SOFTWARE_LIST_ADD("cass_list","cpc_cass") MCFG_DEVICE_ADD("exp", CPC_EXPANSION_SLOT, 0) @@ -989,7 +985,10 @@ static MACHINE_CONFIG_START( cpcplus, amstrad_state ) /* snapshot */ MCFG_SNAPSHOT_ADD("snapshot", amstrad_state, amstrad, "sna", 0) - MCFG_CASSETTE_ADD( "cassette", amstrad_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(cdt_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED) + MCFG_CASSETTE_INTERFACE("cpc_cass") MCFG_UPD765A_ADD("upd765", true, true) diff --git a/src/mess/drivers/apf.c b/src/mess/drivers/apf.c index f6e8458d4bc..bc62d422481 100644 --- a/src/mess/drivers/apf.c +++ b/src/mess/drivers/apf.c @@ -476,16 +476,6 @@ static INPUT_PORTS_START( apfimag ) PORT_BIT(0xff, 0xff, IPT_UNUSED) INPUT_PORTS_END - - -static const cassette_interface apf_cassette_interface = -{ - apf_cassette_formats, - NULL, - (cassette_state)(CASSETTE_PLAY), - NULL -}; - static LEGACY_FLOPPY_OPTIONS_START(apfimag) LEGACY_FLOPPY_OPTION(apfimag, "apd", "APF disk image", basicdsk_identify_default, basicdsk_construct_default, NULL, HEADS([1]) @@ -566,7 +556,10 @@ static MACHINE_CONFIG_DERIVED( apfimag, apfm1000 ) MCFG_PIA_READPB_HANDLER(READ8(apf_state, pia1_portb_r)) MCFG_PIA_WRITEPB_HANDLER(WRITE8(apf_state, pia1_portb_w)) - MCFG_CASSETTE_ADD( "cassette", apf_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(apf_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY) + MCFG_FD1771_ADD("fdc", default_wd17xx_interface ) MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(apfimag_floppy_interface) MACHINE_CONFIG_END diff --git a/src/mess/drivers/apogee.c b/src/mess/drivers/apogee.c index fbf599a51df..eb2d43256b0 100644 --- a/src/mess/drivers/apogee.c +++ b/src/mess/drivers/apogee.c @@ -142,14 +142,6 @@ static INPUT_PORTS_START( apogee ) PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Rus/Lat") PORT_CODE(KEYCODE_LALT) PORT_CODE(KEYCODE_RALT) INPUT_PORTS_END -static const cassette_interface apogee_cassette_interface = -{ - rka_cassette_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED), - "apogee_cass" -}; - static const INT16 speaker_levels[] = {-32767, -10922, 10922, 32767}; static const speaker_interface apogee_speaker_interface = @@ -270,7 +262,11 @@ static MACHINE_CONFIG_START( apogee, apogee_state ) MCFG_I8257_OUT_IOW_2_CB(DEVWRITE8("i8275", i8275_device, dack_w)) MCFG_I8257_REVERSE_RW_MODE(1) - MCFG_CASSETTE_ADD( "cassette", apogee_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(rka_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED) + MCFG_CASSETTE_INTERFACE("apogee_cass") + MCFG_SOFTWARE_LIST_ADD("cass_list","apogee") MACHINE_CONFIG_END diff --git a/src/mess/drivers/apple2.c b/src/mess/drivers/apple2.c index 5ca2da586dc..25a21e1923b 100644 --- a/src/mess/drivers/apple2.c +++ b/src/mess/drivers/apple2.c @@ -939,14 +939,6 @@ PALETTE_INIT_MEMBER(apple2_state,apple2) palette.set_pen_colors(0, apple2_palette, ARRAY_LENGTH(apple2_palette)); } -static const cassette_interface apple2_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED), - NULL -}; - static SLOT_INTERFACE_START(apple2_slot0_cards) SLOT_INTERFACE("lang", A2BUS_LANG) /* Apple II Language Card */ SLOT_INTERFACE_END @@ -1064,7 +1056,8 @@ static MACHINE_CONFIG_DERIVED( apple2, apple2_common ) /* At the moment the RAM bank $C000-$FFFF is available only if you choose */ /* default configuration: on real machine is present also in configurations */ /* with less memory, provided that the language card is installed */ - MCFG_CASSETTE_ADD( "cassette", apple2_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( apple2p, apple2_common ) @@ -1079,7 +1072,8 @@ static MACHINE_CONFIG_DERIVED( apple2p, apple2_common ) /* At the moment the RAM bank $C000-$FFFF is available only if you choose */ /* default configuration: on real machine is present also in configurations */ /* with less memory, provided that the language card is installed */ - MCFG_CASSETTE_ADD( "cassette", apple2_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( apple2e, apple2_common ) @@ -1090,7 +1084,8 @@ static MACHINE_CONFIG_DERIVED( apple2e, apple2_common ) MCFG_RAM_DEFAULT_SIZE("128K") MCFG_RAM_EXTRA_OPTIONS("64K") MCFG_RAM_DEFAULT_VALUE(0x00) - MCFG_CASSETTE_ADD( "cassette", apple2_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED) /* keyboard controller */ MCFG_DEVICE_MODIFY("ay3600") @@ -1115,7 +1110,8 @@ static MACHINE_CONFIG_DERIVED( tk2000, apple2_common ) MCFG_RAM_ADD(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("64K") MCFG_RAM_DEFAULT_VALUE(0x00) - MCFG_CASSETTE_ADD( "cassette", apple2_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED) // TK2000 doesn't have slots, and it doesn't emulate a language card // C05A maps RAM from C100-FFFF, C05B maps ROM diff --git a/src/mess/drivers/applix.c b/src/mess/drivers/applix.c index 50cd77fec1c..ffbb0e809ee 100644 --- a/src/mess/drivers/applix.c +++ b/src/mess/drivers/applix.c @@ -831,14 +831,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(applix_state::cass_timer) } } -static const cassette_interface applix_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED), - NULL -}; - static MACHINE_CONFIG_START( applix, applix_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, 7500000) @@ -891,7 +883,9 @@ static MACHINE_CONFIG_START( applix, applix_state ) MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics") - MCFG_CASSETTE_ADD("cassette", applix_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED) + MCFG_WD1772x_ADD("fdc", XTAL_16MHz / 2) //connected to Z80H clock pin MCFG_FLOPPY_DRIVE_ADD("fdc:0", applix_floppies, "35dd", applix_state::floppy_formats) MCFG_FLOPPY_DRIVE_ADD("fdc:1", applix_floppies, "35dd", applix_state::floppy_formats) diff --git a/src/mess/drivers/aquarius.c b/src/mess/drivers/aquarius.c index e1c979290d1..c5e1472404c 100644 --- a/src/mess/drivers/aquarius.c +++ b/src/mess/drivers/aquarius.c @@ -347,14 +347,6 @@ static const ay8910_interface aquarius_ay8910_interface = DEVCB_NULL }; -static const cassette_interface aquarius_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED), - NULL -}; - static MACHINE_CONFIG_START( aquarius, aquarius_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_3_579545MHz) // ??? @@ -386,7 +378,8 @@ static MACHINE_CONFIG_START( aquarius, aquarius_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) /* cassette */ - MCFG_CASSETTE_ADD( "cassette", aquarius_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED) /* cartridge */ MCFG_CARTSLOT_ADD("cart") diff --git a/src/mess/drivers/asst128.c b/src/mess/drivers/asst128.c index ad5eb5719e0..c144e50e2f8 100644 --- a/src/mess/drivers/asst128.c +++ b/src/mess/drivers/asst128.c @@ -90,14 +90,6 @@ FLOPPY_FORMATS_MEMBER( asst128_state::asst128_formats ) FLOPPY_ASST128_FORMAT FLOPPY_FORMATS_END -static const cassette_interface asst128_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED), - NULL -}; - static DEVICE_INPUT_DEFAULTS_START( asst128 ) DEVICE_INPUT_DEFAULTS("DSW0", 0x30, 0x20) DEVICE_INPUT_DEFAULTS_END @@ -112,7 +104,8 @@ static MACHINE_CONFIG_START( asst128, asst128_state ) MCFG_DEVICE_INPUT_DEFAULTS(asst128) MCFG_DEVICE_REMOVE("mb:cassette") - MCFG_CASSETTE_ADD("mb:cassette", asst128_cassette_interface) + MCFG_CASSETTE_ADD("mb:cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED) MCFG_ISA8_SLOT_ADD("mb:isa", "isa_cga", pc_isa8_cards, "cga_mc1502", true) MCFG_ISA8_SLOT_ADD("mb:isa", "isa_lpt", pc_isa8_cards, "lpt", true) diff --git a/src/mess/drivers/atom.c b/src/mess/drivers/atom.c index dee31105a5e..95de26eec8c 100644 --- a/src/mess/drivers/atom.c +++ b/src/mess/drivers/atom.c @@ -602,9 +602,6 @@ static const floppy_interface atom_floppy_interface = "floppy_5_25" }; -/*------------------------------------------------- - cassette_interface atom_cassette_interface --------------------------------------------------*/ TIMER_DEVICE_CALLBACK_MEMBER(atom_state::cassette_output_tick) { @@ -615,14 +612,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(atom_state::cassette_output_tick) m_hz2400 = !m_hz2400; } -static const cassette_interface atom_cassette_interface = -{ - atom_cassette_formats, - NULL, - (cassette_state) (CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED), - NULL -}; - /*------------------------------------------------- mc6847_interface vdg_intf -------------------------------------------------*/ @@ -823,7 +812,10 @@ static MACHINE_CONFIG_START( atom, atom_state ) MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG) - MCFG_CASSETTE_ADD("cassette", atom_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_FORMATS(atom_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED) + MCFG_QUICKLOAD_ADD("quickload", atom_state, atom_atm, "atm", 0) /* cartridge */ @@ -907,7 +899,9 @@ static MACHINE_CONFIG_START( atombb, atom_state ) MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG) - MCFG_CASSETTE_ADD("cassette", atom_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_FORMATS(atom_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED) /* internal ram */ MCFG_RAM_ADD(RAM_TAG) diff --git a/src/mess/drivers/bbc.c b/src/mess/drivers/bbc.c index 3fc41547808..22b2885a519 100644 --- a/src/mess/drivers/bbc.c +++ b/src/mess/drivers/bbc.c @@ -578,14 +578,6 @@ INTERRUPT_GEN_MEMBER(bbc_state::bbcb_vsync) //}; -static const cassette_interface bbc_cassette_interface = -{ - bbc_cassette_formats, - NULL, - (cassette_state)(CASSETTE_PLAY), - "bbc_cass" -}; - WRITE_LINE_MEMBER(bbc_state::bbcb_acia6850_irq_w) { @@ -697,7 +689,10 @@ static MACHINE_CONFIG_START( bbca, bbc_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) /* cassette */ - MCFG_CASSETTE_ADD( "cassette", bbc_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(bbc_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY) + MCFG_CASSETTE_INTERFACE("bbc_cass") /* software lists */ MCFG_SOFTWARE_LIST_ADD("cass_ls_a", "bbca_cass") @@ -930,7 +925,10 @@ static MACHINE_CONFIG_START( bbcm, bbc_state ) MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics") /* cassette */ - MCFG_CASSETTE_ADD( "cassette", bbc_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(bbc_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY) + MCFG_CASSETTE_INTERFACE("bbc_cass") /* cartridges */ MCFG_CARTSLOT_ADD("cart1") diff --git a/src/mess/drivers/binbug.c b/src/mess/drivers/binbug.c index 11aecf18053..f9166a2d0d1 100644 --- a/src/mess/drivers/binbug.c +++ b/src/mess/drivers/binbug.c @@ -313,7 +313,7 @@ static MACHINE_CONFIG_START( binbug, binbug_state ) MCFG_DEVICE_CARD_DEVICE_INPUT_DEFAULTS("keyboard", keyboard) /* Cassette */ - MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) @@ -550,7 +550,7 @@ static MACHINE_CONFIG_START( dg680, dg680_state ) MCFG_GENERIC_KEYBOARD_CB(WRITE8(dg680_state, kbd_put)) /* Cassette */ - MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) diff --git a/src/mess/drivers/bk.c b/src/mess/drivers/bk.c index 10c00eb0ce0..5693a3a988b 100644 --- a/src/mess/drivers/bk.c +++ b/src/mess/drivers/bk.c @@ -155,16 +155,6 @@ static INPUT_PORTS_START( bk0010 ) INPUT_PORTS_END -/* Machine driver */ -static const cassette_interface bk0010_cassette_interface = -{ - /*rk8_cassette_formats*/cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED), - "bk0010_cass" -}; - - static MACHINE_CONFIG_START( bk0010, bk_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", T11, 3000000) @@ -188,7 +178,10 @@ static MACHINE_CONFIG_START( bk0010, bk_state ) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) - MCFG_CASSETTE_ADD( "cassette", bk0010_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED) + MCFG_CASSETTE_INTERFACE("bk0010_cass") + MCFG_SOFTWARE_LIST_ADD("cass_list","bk0010") MACHINE_CONFIG_END diff --git a/src/mess/drivers/bmjr.c b/src/mess/drivers/bmjr.c index 661b3361498..c3ed17b641e 100644 --- a/src/mess/drivers/bmjr.c +++ b/src/mess/drivers/bmjr.c @@ -373,7 +373,7 @@ static MACHINE_CONFIG_START( bmjr, bmjr_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) /* Devices */ - MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) MACHINE_CONFIG_END /* ROM definition */ diff --git a/src/mess/drivers/bml3.c b/src/mess/drivers/bml3.c index c4b22d6ea23..474230353de 100644 --- a/src/mess/drivers/bml3.c +++ b/src/mess/drivers/bml3.c @@ -1009,7 +1009,7 @@ static MACHINE_CONFIG_START( bml3_common, bml3_state ) MCFG_DEVICE_ADD("acia_clock", CLOCK, 9600) // 600 baud x 16(divider) = 9600 MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(bml3_state, write_acia_clock)) - MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) /* Audio */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mess/drivers/bob85.c b/src/mess/drivers/bob85.c index 0f2d70b7c8f..00151e27333 100644 --- a/src/mess/drivers/bob85.c +++ b/src/mess/drivers/bob85.c @@ -186,14 +186,6 @@ void bob85_state::machine_reset() { } -static const cassette_interface bob85_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED), - NULL -}; - WRITE_LINE_MEMBER( bob85_state::sod_w ) { m_cass->output(state ? +1.0 : -1.0); @@ -216,7 +208,8 @@ static MACHINE_CONFIG_START( bob85, bob85_state ) MCFG_DEFAULT_LAYOUT(layout_bob85) // devices - MCFG_CASSETTE_ADD("cassette", bob85_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED) MACHINE_CONFIG_END /* ROM definition */ diff --git a/src/mess/drivers/c80.c b/src/mess/drivers/c80.c index 10d10b46c8d..ccde4c4fdb3 100644 --- a/src/mess/drivers/c80.c +++ b/src/mess/drivers/c80.c @@ -246,14 +246,6 @@ void c80_state::machine_start() /* Machine Driver */ -static const cassette_interface c80_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED ), - NULL -}; - static MACHINE_CONFIG_START( c80, c80_state ) /* basic machine hardware */ MCFG_CPU_ADD(Z80_TAG, Z80, 2500000) /* U880D */ @@ -275,7 +267,9 @@ static MACHINE_CONFIG_START( c80, c80_state ) MCFG_DEVICE_ADD(Z80PIO2_TAG, Z80PIO, 2500000) MCFG_Z80PIO_OUT_INT_CB(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0)) - MCFG_CASSETTE_ADD("cassette", c80_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED ) + MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) diff --git a/src/mess/drivers/cd2650.c b/src/mess/drivers/cd2650.c index 6634f18bd2c..8bb763489ee 100644 --- a/src/mess/drivers/cd2650.c +++ b/src/mess/drivers/cd2650.c @@ -293,7 +293,7 @@ static MACHINE_CONFIG_START( cd2650, cd2650_state ) /* Devices */ MCFG_DEVICE_ADD(KEYBOARD_TAG, GENERIC_KEYBOARD, 0) MCFG_GENERIC_KEYBOARD_CB(WRITE8(cd2650_state, kbd_put)) - MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) MACHINE_CONFIG_END /* ROM definition */ diff --git a/src/mess/drivers/cgenie.c b/src/mess/drivers/cgenie.c index e002e255c0f..28c10c3279b 100644 --- a/src/mess/drivers/cgenie.c +++ b/src/mess/drivers/cgenie.c @@ -482,14 +482,6 @@ static const ay8910_interface cgenie_ay8910_interface = }; -static const cassette_interface cgenie_cassette_interface = -{ - cgenie_cassette_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED), - NULL -}; - // This is currently broken static LEGACY_FLOPPY_OPTIONS_START(cgenie ) LEGACY_FLOPPY_OPTION( cgd, "cgd", "Colour Genie disk image", basicdsk_identify_default, basicdsk_construct_default, NULL, @@ -540,7 +532,9 @@ static MACHINE_CONFIG_START( cgenie_common, cgenie_state ) MCFG_SOUND_CONFIG(cgenie_ay8910_interface) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) - MCFG_CASSETTE_ADD( "cassette", cgenie_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(cgenie_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED) MCFG_FD1793_ADD("wd179x", cgenie_wd17xx_interface ) // TODO confirm type diff --git a/src/mess/drivers/coco12.c b/src/mess/drivers/coco12.c index d15029649d9..4c64822d0de 100644 --- a/src/mess/drivers/coco12.c +++ b/src/mess/drivers/coco12.c @@ -29,7 +29,7 @@ #include "bus/coco/coco_pak.h" #include "bus/coco/coco_fdc.h" #include "bus/coco/coco_multi.h" - +#include "formats/coco_cas.h" //************************************************************************** // ADDRESS MAPS @@ -299,7 +299,9 @@ static MACHINE_CONFIG_START( coco, coco12_state ) MCFG_SAM6883_ADD(SAM_TAG, XTAL_3_579545MHz, coco12_state::sam6883_config) MCFG_SAM6883_RES_CALLBACK(READ8(coco12_state, sam_read)) - MCFG_CASSETTE_ADD("cassette", coco_state::coco_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_FORMATS(coco_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED) MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, "printer") MCFG_RS232_DCD_HANDLER(DEVWRITELINE(PIA1_TAG, pia6821_device, ca1_w)) diff --git a/src/mess/drivers/coco3.c b/src/mess/drivers/coco3.c index 9bcd5a8c8e3..d522cace297 100644 --- a/src/mess/drivers/coco3.c +++ b/src/mess/drivers/coco3.c @@ -13,6 +13,7 @@ #include "includes/coco3.h" #include "cpu/m6809/m6809.h" #include "cpu/m6809/hd6309.h" +#include "formats/coco_cas.h" #include "coco3.lh" @@ -269,7 +270,9 @@ static MACHINE_CONFIG_START( coco3, coco3_state ) MCFG_PIA_IRQA_HANDLER(WRITELINE(coco_state, pia1_firq_a)) MCFG_PIA_IRQB_HANDLER(WRITELINE(coco_state, pia1_firq_b)) - MCFG_CASSETTE_ADD("cassette", coco_state::coco_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_FORMATS(coco_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED) MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, "printer") MCFG_RS232_DCD_HANDLER(DEVWRITELINE(PIA1_TAG, pia6821_device, ca1_w)) diff --git a/src/mess/drivers/compis.c b/src/mess/drivers/compis.c index 1151d88dae6..8bf21a5171c 100644 --- a/src/mess/drivers/compis.c +++ b/src/mess/drivers/compis.c @@ -585,25 +585,11 @@ WRITE8_MEMBER( compis_state::ppi_pc_w ) m_isbx0->opt0_w(BIT(data, 7)); } -//------------------------------------------------- -// cassette_interface compis_cassette_interface -//------------------------------------------------- - TIMER_DEVICE_CALLBACK_MEMBER( compis_state::tape_tick ) { m_maincpu->tmrin0_w(m_cassette->input() > 0.0); } -static const cassette_interface compis_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED), - NULL -}; - - - //************************************************************************** // MACHINE INITIALIZATION //************************************************************************** @@ -709,7 +695,9 @@ static MACHINE_CONFIG_START( compis, compis_state ) MCFG_MM58274C_MODE24(0) // 12 hour MCFG_MM58274C_DAY1(1) // monday - MCFG_CASSETTE_ADD(CASSETTE_TAG, compis_cassette_interface) + MCFG_CASSETTE_ADD(CASSETTE_TAG) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED) + MCFG_TIMER_DRIVER_ADD_PERIODIC("tape", compis_state, tape_tick, attotime::from_hz(44100)) MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, NULL) diff --git a/src/mess/drivers/comx35.c b/src/mess/drivers/comx35.c index f8ff546cbbe..5452582616a 100644 --- a/src/mess/drivers/comx35.c +++ b/src/mess/drivers/comx35.c @@ -514,19 +514,6 @@ WRITE8_MEMBER( comx35_state::sc_w ) } -//------------------------------------------------- -// cassette_interface cassette_intf -//------------------------------------------------- - -static const cassette_interface cassette_intf = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED), - NULL -}; - - //------------------------------------------------- // COMX_EXPANSION_INTERFACE( expansion_intf ) //------------------------------------------------- @@ -634,7 +621,8 @@ static MACHINE_CONFIG_START( pal, comx35_state ) MCFG_CDP1871_D11_CALLBACK(IOPORT("D11")) MCFG_CDP1871_DA_CALLBACK(INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_EF3)) MCFG_QUICKLOAD_ADD("quickload", comx35_state, comx35_comx, "comx", 0) - MCFG_CASSETTE_ADD("cassette", cassette_intf) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED) // expansion bus MCFG_COMX_EXPANSION_SLOT_ADD(EXPANSION_TAG, comx_expansion_cards, "eb") @@ -683,7 +671,8 @@ static MACHINE_CONFIG_START( ntsc, comx35_state ) MCFG_CDP1871_D11_CALLBACK(IOPORT("D11")) MCFG_CDP1871_DA_CALLBACK(INPUTLINE(CDP1802_TAG, COSMAC_INPUT_LINE_EF3)) MCFG_QUICKLOAD_ADD("quickload", comx35_state, comx35_comx, "comx", 0) - MCFG_CASSETTE_ADD("cassette", cassette_intf) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED) // expansion bus MCFG_COMX_EXPANSION_SLOT_ADD(EXPANSION_TAG, comx_expansion_cards, "eb") diff --git a/src/mess/drivers/cosmicos.c b/src/mess/drivers/cosmicos.c index 88751fc09a1..5147b4b7243 100644 --- a/src/mess/drivers/cosmicos.c +++ b/src/mess/drivers/cosmicos.c @@ -500,14 +500,6 @@ QUICKLOAD_LOAD_MEMBER( cosmicos_state, cosmicos ) /* Machine Driver */ -static const cassette_interface cosmicos_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED), - NULL -}; - static MACHINE_CONFIG_START( cosmicos, cosmicos_state ) /* basic machine hardware */ MCFG_CPU_ADD(CDP1802_TAG, CDP1802, XTAL_1_75MHz) @@ -544,7 +536,8 @@ static MACHINE_CONFIG_START( cosmicos, cosmicos_state ) /* devices */ MCFG_QUICKLOAD_ADD("quickload", cosmicos_state, cosmicos, "bin", 0) - MCFG_CASSETTE_ADD("cassette", cosmicos_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED) /* internal ram */ MCFG_RAM_ADD(RAM_TAG) diff --git a/src/mess/drivers/cp1.c b/src/mess/drivers/cp1.c index 2041a337fb1..8450868cd1b 100644 --- a/src/mess/drivers/cp1.c +++ b/src/mess/drivers/cp1.c @@ -307,7 +307,7 @@ static MACHINE_CONFIG_START( cp1, cp1_state ) MCFG_DEFAULT_LAYOUT(layout_cp1) - MCFG_CASSETTE_ADD("cassette", default_cassette_interface) + MCFG_CASSETTE_ADD("cassette") MCFG_QUICKLOAD_ADD("quickload", cp1_state, quickload, "obj", 1) MACHINE_CONFIG_END diff --git a/src/mess/drivers/crvision.c b/src/mess/drivers/crvision.c index 365bd02ad18..b2d71fed116 100644 --- a/src/mess/drivers/crvision.c +++ b/src/mess/drivers/crvision.c @@ -686,30 +686,6 @@ WRITE_LINE_MEMBER( laser2001_state::pia_cb2_w ) } } -/*------------------------------------------------- - cassette_interface crvision_cassette_interface --------------------------------------------------*/ - -static const cassette_interface crvision_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED), - NULL -}; - -/*------------------------------------------------- - cassette_interface lasr2001_cassette_interface --------------------------------------------------*/ - -static const cassette_interface lasr2001_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED), - NULL -}; - /*************************************************************************** MACHINE INITIALIZATION ***************************************************************************/ @@ -873,7 +849,9 @@ static MACHINE_CONFIG_START( creativision, crvision_state ) MCFG_PIA_WRITEPA_HANDLER(WRITE8(crvision_state, pia_pa_w)) MCFG_PIA_WRITEPB_HANDLER(DEVWRITE8(SN76489_TAG, sn76496_base_device, write)) - MCFG_CASSETTE_ADD("cassette", crvision_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED) + MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_printers, "printer") MCFG_CENTRONICS_BUSY_HANDLER(DEVWRITELINE("cent_status_in", input_buffer_device, write_bit7)) @@ -954,7 +932,8 @@ static MACHINE_CONFIG_START( lasr2001, laser2001_state ) MCFG_PIA_CA2_HANDLER(WRITELINE(laser2001_state, pia_ca2_w)) MCFG_PIA_CB2_HANDLER(WRITELINE(laser2001_state, pia_cb2_w)) - MCFG_CASSETTE_ADD("cassette", lasr2001_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED) MCFG_CENTRONICS_ADD("centronics", centronics_printers, "printer") MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(laser2001_state, write_centronics_busy)) diff --git a/src/mess/drivers/d6800.c b/src/mess/drivers/d6800.c index 01cd5df8ba6..d51f52e2ad6 100644 --- a/src/mess/drivers/d6800.c +++ b/src/mess/drivers/d6800.c @@ -337,14 +337,6 @@ void d6800_state::machine_reset() /* Machine Drivers */ -static const cassette_interface d6800_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED), - NULL -}; - QUICKLOAD_LOAD_MEMBER( d6800_state, d6800 ) { address_space &space = m_maincpu->space(AS_PROGRAM); @@ -418,7 +410,9 @@ static MACHINE_CONFIG_START( d6800, d6800_state ) MCFG_PIA_IRQA_HANDLER(DEVWRITELINE("maincpu", m6800_cpu_device, irq_line)) MCFG_PIA_IRQB_HANDLER(DEVWRITELINE("maincpu", m6800_cpu_device, irq_line)) - MCFG_CASSETTE_ADD("cassette", d6800_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED) + MCFG_TIMER_DRIVER_ADD_PERIODIC("d6800_c", d6800_state, d6800_c, attotime::from_hz(4800)) MCFG_TIMER_DRIVER_ADD_PERIODIC("d6800_p", d6800_state, d6800_p, attotime::from_hz(40000)) diff --git a/src/mess/drivers/dai.c b/src/mess/drivers/dai.c index 1078c9a265d..40452cbdf8d 100644 --- a/src/mess/drivers/dai.c +++ b/src/mess/drivers/dai.c @@ -161,14 +161,6 @@ static INPUT_PORTS_START (dai) PORT_BIT(0xcb, IP_ACTIVE_HIGH, IPT_UNUSED) INPUT_PORTS_END -static const cassette_interface dai_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED), - NULL -}; - /* F4 Character Displayer */ static const gfx_layout dai_charlayout = { @@ -230,7 +222,8 @@ static MACHINE_CONFIG_START( dai, dai_state ) MCFG_SOUND_ROUTE(1, "rspeaker", 0.50) /* cassette */ - MCFG_CASSETTE_ADD( "cassette", dai_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED) /* tms5501 */ MCFG_DEVICE_ADD("tms5501", TMS5501, 2000000) diff --git a/src/mess/drivers/dolphunk.c b/src/mess/drivers/dolphunk.c index a829ac92feb..23e454ad5f4 100644 --- a/src/mess/drivers/dolphunk.c +++ b/src/mess/drivers/dolphunk.c @@ -238,7 +238,7 @@ static MACHINE_CONFIG_START( dauphin, dauphin_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) /* cassette */ - MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) MCFG_TIMER_DRIVER_ADD_PERIODIC("dauphin_c", dauphin_state, dauphin_c, attotime::from_hz(4000)) diff --git a/src/mess/drivers/dragon.c b/src/mess/drivers/dragon.c index 62730793b46..1011f5c3fa1 100644 --- a/src/mess/drivers/dragon.c +++ b/src/mess/drivers/dragon.c @@ -9,6 +9,7 @@ #include "includes/dragon.h" #include "includes/dgnalpha.h" #include "imagedev/cassette.h" +#include "formats/coco_cas.h" #include "cpu/m6809/m6809.h" #include "bus/coco/coco_232.h" #include "bus/coco/coco_orch90.h" @@ -155,7 +156,10 @@ static MACHINE_CONFIG_START( dragon_base, dragon_state ) MCFG_SAM6883_ADD(SAM_TAG, XTAL_4_433619MHz, dragon_state::sam6883_config) MCFG_SAM6883_RES_CALLBACK(READ8(dragon_state, sam_read)) - MCFG_CASSETTE_ADD("cassette", dragon_state::coco_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_FORMATS(coco_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED) + MCFG_DEVICE_ADD(PRINTER_TAG, PRINTER, 0) // video hardware diff --git a/src/mess/drivers/electron.c b/src/mess/drivers/electron.c index 745a26abe2d..26365286023 100644 --- a/src/mess/drivers/electron.c +++ b/src/mess/drivers/electron.c @@ -170,14 +170,6 @@ ROM_START(electron) /* 3c000 15 available for cartridges with a language ROM */ ROM_END -static const cassette_interface electron_cassette_interface = -{ - uef_cassette_formats, - NULL, - (cassette_state)(CASSETTE_PLAY), - NULL -}; - static MACHINE_CONFIG_START( electron, electron_state ) MCFG_CPU_ADD( "maincpu", M6502, 2000000 ) MCFG_CPU_PROGRAM_MAP( electron_mem) @@ -199,7 +191,9 @@ static MACHINE_CONFIG_START( electron, electron_state ) MCFG_SOUND_ADD( "beeper", BEEP, 0 ) MCFG_SOUND_ROUTE( ALL_OUTPUTS, "mono", 1.00 ) - MCFG_CASSETTE_ADD( "cassette", electron_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(uef_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY) MCFG_CARTSLOT_ADD("cart") MCFG_CARTSLOT_EXTENSION_LIST("bin") diff --git a/src/mess/drivers/elf.c b/src/mess/drivers/elf.c index a149f737b36..04a98568f2b 100644 --- a/src/mess/drivers/elf.c +++ b/src/mess/drivers/elf.c @@ -215,14 +215,6 @@ void elf2_state::machine_start() /* Machine Driver */ -static const cassette_interface elf_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED), - NULL -}; - QUICKLOAD_LOAD_MEMBER( elf2_state, elf ) { int size = image.length(); @@ -274,7 +266,9 @@ static MACHINE_CONFIG_START( elf2, elf2_state ) MCFG_DEVICE_ADD(DM9368_L_TAG, DM9368, 0) MCFG_OUTPUT_NAME("digit1") - MCFG_CASSETTE_ADD("cassette", elf_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED) + MCFG_QUICKLOAD_ADD("quickload", elf2_state, elf, "bin", 0) /* internal ram */ diff --git a/src/mess/drivers/elwro800.c b/src/mess/drivers/elwro800.c index 4f146b5bea0..92fdcd351d4 100644 --- a/src/mess/drivers/elwro800.c +++ b/src/mess/drivers/elwro800.c @@ -509,14 +509,6 @@ MACHINE_RESET_MEMBER(elwro800_state,elwro800) m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(elwro800_state::elwro800_direct_handler), this)); } -static const cassette_interface elwro800jr_cassette_interface = -{ - tzx_cassette_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED), - NULL -}; - INTERRUPT_GEN_MEMBER(elwro800_state::elwro800jr_interrupt) { device.execute().set_input_line(0, HOLD_LINE); @@ -597,7 +589,9 @@ static MACHINE_CONFIG_START( elwro800, elwro800_state ) MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - MCFG_CASSETTE_ADD( "cassette", elwro800jr_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(tzx_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED) MCFG_FLOPPY_DRIVE_ADD("upd765:0", elwro800jr_floppies, "525hd", floppy_image_device::default_floppy_formats) MCFG_FLOPPY_DRIVE_ADD("upd765:1", elwro800jr_floppies, "525hd", floppy_image_device::default_floppy_formats) diff --git a/src/mess/drivers/ep64.c b/src/mess/drivers/ep64.c index 792323e53b8..69c21ba7643 100644 --- a/src/mess/drivers/ep64.c +++ b/src/mess/drivers/ep64.c @@ -460,26 +460,6 @@ static INPUT_PORTS_START( ep64 ) INPUT_PORTS_END - -//************************************************************************** -// DEVICE CONFIGURATION -//************************************************************************** - - -//------------------------------------------------- -// cassette_interface cass_intf -//------------------------------------------------- - -static const cassette_interface cass_intf = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED), - "ep64_cass" -}; - - - //************************************************************************** // MACHINE INITIALIZATION //************************************************************************** @@ -545,8 +525,13 @@ static MACHINE_CONFIG_START( ep64, ep64_state ) MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, NULL) MCFG_RS232_CTS_HANDLER(DEVWRITELINE(DAVE_TAG, dave_device, int2_w)) - MCFG_CASSETTE_ADD(CASSETTE1_TAG, cass_intf) - MCFG_CASSETTE_ADD(CASSETTE2_TAG, cass_intf) + MCFG_CASSETTE_ADD(CASSETTE1_TAG) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED) + MCFG_CASSETTE_INTERFACE("ep64_cass") + + MCFG_CASSETTE_ADD(CASSETTE2_TAG) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED) + MCFG_CASSETTE_INTERFACE("ep64_cass") // internal RAM MCFG_RAM_ADD(RAM_TAG) diff --git a/src/mess/drivers/eti660.c b/src/mess/drivers/eti660.c index f5c08819723..b6ecf3fda5a 100644 --- a/src/mess/drivers/eti660.c +++ b/src/mess/drivers/eti660.c @@ -198,14 +198,6 @@ WRITE8_MEMBER( eti660_state::pia_pa_w ) /* Machine Drivers */ -static const cassette_interface eti660_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED), - NULL -}; - static MACHINE_CONFIG_START( eti660, eti660_state ) /* basic machine hardware */ MCFG_CPU_ADD(CDP1802_TAG, CDP1802, XTAL_8_867238MHz/5) @@ -233,7 +225,8 @@ static MACHINE_CONFIG_START( eti660, eti660_state ) MCFG_PIA_READPA_HANDLER(READ8(eti660_state, pia_pa_r)) MCFG_PIA_WRITEPA_HANDLER(WRITE8(eti660_state, pia_pa_w)) - MCFG_CASSETTE_ADD("cassette", eti660_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED) /* internal ram */ MCFG_RAM_ADD(RAM_TAG) diff --git a/src/mess/drivers/exp85.c b/src/mess/drivers/exp85.c index 89caf64065e..82d2c679f98 100644 --- a/src/mess/drivers/exp85.c +++ b/src/mess/drivers/exp85.c @@ -175,14 +175,6 @@ void exp85_state::machine_start() /* Machine Driver */ -static const cassette_interface exp85_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED), - NULL -}; - static MACHINE_CONFIG_START( exp85, exp85_state ) /* basic machine hardware */ MCFG_CPU_ADD(I8085A_TAG, I8085A, XTAL_6_144MHz) @@ -202,7 +194,8 @@ static MACHINE_CONFIG_START( exp85, exp85_state ) MCFG_DEVICE_ADD(I8355_TAG, I8355, XTAL_6_144MHz/2) MCFG_I8355_IN_PA_CB(READ8(exp85_state, i8355_a_r)) MCFG_I8355_OUT_PA_CB(WRITE8(exp85_state, i8355_a_w)) - MCFG_CASSETTE_ADD("cassette", exp85_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED) MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, "terminal") MCFG_DEVICE_CARD_DEVICE_INPUT_DEFAULTS("terminal", terminal) diff --git a/src/mess/drivers/fc100.c b/src/mess/drivers/fc100.c index 163d8679bc3..eff0fe9ad0e 100644 --- a/src/mess/drivers/fc100.c +++ b/src/mess/drivers/fc100.c @@ -475,15 +475,6 @@ TIMER_DEVICE_CALLBACK_MEMBER( fc100_state::timer_p) } } -static const cassette_interface fc100_cassette_interface = -{ - fc100_cassette_formats, - NULL, - (cassette_state) (CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED), - NULL -}; - - //******************** MACHINE ****************************** void fc100_state::machine_start() @@ -560,7 +551,10 @@ static MACHINE_CONFIG_START( fc100, fc100_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.50) /* Devices */ - MCFG_CASSETTE_ADD("cassette", fc100_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_FORMATS(fc100_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED) + MCFG_DEVICE_ADD("uart", I8251, 0) MCFG_I8251_TXD_HANDLER(WRITELINE(fc100_state, txdata_callback)) MCFG_DEVICE_ADD("uart_clock", CLOCK, XTAL_4_9152MHz/16/16) // gives 19200 diff --git a/src/mess/drivers/fm7.c b/src/mess/drivers/fm7.c index a79ba357c5c..6684ae14773 100644 --- a/src/mess/drivers/fm7.c +++ b/src/mess/drivers/fm7.c @@ -1991,14 +1991,6 @@ static const ay8910_interface ay8910_config = DEVCB_NULL /* portB write */ }; -static const cassette_interface fm7_cassette_interface = -{ - fm7_cassette_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED), - "fm7_cass" -}; - static const floppy_interface fm7_floppy_interface = { FLOPPY_STANDARD_5_25_DSHD, @@ -2041,7 +2033,10 @@ static MACHINE_CONFIG_START( fm7, fm7_state ) MCFG_PALETTE_ADD("palette", 8) MCFG_PALETTE_INIT_OWNER(fm7_state, fm7) - MCFG_CASSETTE_ADD("cassette", fm7_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_FORMATS(fm7_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED) + MCFG_CASSETTE_INTERFACE("fm7_cass") MCFG_MB8877_ADD("fdc",fm7_mb8877a_interface) @@ -2092,7 +2087,10 @@ static MACHINE_CONFIG_START( fm8, fm7_state ) MCFG_PALETTE_ADD("palette", 8) MCFG_PALETTE_INIT_OWNER(fm7_state, fm7) - MCFG_CASSETTE_ADD("cassette", fm7_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_FORMATS(fm7_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED) + MCFG_CASSETTE_INTERFACE("fm7_cass") MCFG_MB8877_ADD("fdc",fm7_mb8877a_interface) @@ -2144,7 +2142,10 @@ static MACHINE_CONFIG_START( fm77av, fm7_state ) MCFG_PALETTE_ADD("palette", 8 + 4096) MCFG_PALETTE_INIT_OWNER(fm7_state, fm7) - MCFG_CASSETTE_ADD("cassette", fm7_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_FORMATS(fm7_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED) + MCFG_CASSETTE_INTERFACE("fm7_cass") MCFG_MB8877_ADD("fdc",fm7_mb8877a_interface) @@ -2199,7 +2200,10 @@ static MACHINE_CONFIG_START( fm11, fm7_state ) MCFG_PALETTE_ADD("palette", 8) MCFG_PALETTE_INIT_OWNER(fm7_state, fm7) - MCFG_CASSETTE_ADD("cassette", fm7_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_FORMATS(fm7_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED) + MCFG_CASSETTE_INTERFACE("fm7_cass") MCFG_MB8877_ADD("fdc",fm7_mb8877a_interface) @@ -2247,7 +2251,10 @@ static MACHINE_CONFIG_START( fm16beta, fm7_state ) MCFG_PALETTE_ADD("palette", 8) MCFG_PALETTE_INIT_OWNER(fm7_state, fm7) - MCFG_CASSETTE_ADD("cassette", fm7_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_FORMATS(fm7_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED) + MCFG_CASSETTE_INTERFACE("fm7_cass") MCFG_MB8877_ADD("fdc",fm7_mb8877a_interface) diff --git a/src/mess/drivers/galaxy.c b/src/mess/drivers/galaxy.c index 6e70f6b047b..095aa88f956 100644 --- a/src/mess/drivers/galaxy.c +++ b/src/mess/drivers/galaxy.c @@ -153,16 +153,6 @@ static const ay8910_interface galaxy_ay_interface = #define XTAL 6144000 - -static const cassette_interface galaxy_cassette_interface = -{ - gtp_cassette_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED), - "galaxy_cass" -}; - - /* F4 Character Displayer */ static const gfx_layout galaxy_charlayout = { @@ -211,7 +201,11 @@ static MACHINE_CONFIG_START( galaxy, galaxy_state ) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) - MCFG_CASSETTE_ADD( "cassette", galaxy_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(gtp_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED) + MCFG_CASSETTE_INTERFACE("galaxy_cass") + MCFG_SOFTWARE_LIST_ADD("cass_list","galaxy") /* internal ram */ @@ -252,7 +246,11 @@ static MACHINE_CONFIG_START( galaxyp, galaxy_state ) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) - MCFG_CASSETTE_ADD( "cassette", galaxy_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(gtp_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED) + MCFG_CASSETTE_INTERFACE("galaxy_cass") + MCFG_SOFTWARE_LIST_ADD("cass_list","galaxy") /* internal ram */ diff --git a/src/mess/drivers/h8.c b/src/mess/drivers/h8.c index 277fe2a5b8d..96ee2ef2797 100644 --- a/src/mess/drivers/h8.c +++ b/src/mess/drivers/h8.c @@ -305,15 +305,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(h8_state::h8_p) } } -static const cassette_interface h8_cassette_interface = -{ - cassette_default_formats, - NULL, - //(cassette_state) (CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED), - (cassette_state) (CASSETTE_PLAY | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED), - "h8_cass" -}; - static MACHINE_CONFIG_START( h8, h8_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", I8080, H8_CLOCK) @@ -339,7 +330,10 @@ static MACHINE_CONFIG_START( h8, h8_state ) MCFG_DEVICE_ADD("cassette_clock", CLOCK, 4800) MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(h8_state, write_cassette_clock)) - MCFG_CASSETTE_ADD("cassette", h8_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED) + MCFG_CASSETTE_INTERFACE("h8_cass") + MCFG_TIMER_DRIVER_ADD_PERIODIC("h8_c", h8_state, h8_c, attotime::from_hz(4800)) MCFG_TIMER_DRIVER_ADD_PERIODIC("h8_p", h8_state, h8_p, attotime::from_hz(40000)) MCFG_TIMER_DRIVER_ADD_PERIODIC("h8_timer", h8_state, h8_irq_pulse, attotime::from_hz(H8_IRQ_PULSE)) diff --git a/src/mess/drivers/hec2hrp.c b/src/mess/drivers/hec2hrp.c index ed9d2e93096..2c94abe48cc 100644 --- a/src/mess/drivers/hec2hrp.c +++ b/src/mess/drivers/hec2hrp.c @@ -379,15 +379,6 @@ MACHINE_RESET_MEMBER(hec2hrp_state,hec2mdhrx) hector_reset(1, 0); } -/* Cassette definition */ -static const cassette_interface hector_cassette_interface = -{ - hector_cassette_formats, - NULL, - (cassette_state)(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED), - NULL -}; - /* Discrete Sound */ static DISCRETE_SOUND_START( hec2hrp ) DISCRETE_INPUT_LOGIC(NODE_01) @@ -450,7 +441,9 @@ static MACHINE_CONFIG_START( hec2hr, hec2hrp_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) /* Gestion cassette*/ - MCFG_CASSETTE_ADD( "cassette", hector_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(hector_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED) /* printer */ MCFG_DEVICE_ADD("printer", PRINTER, 0) @@ -494,7 +487,9 @@ static MACHINE_CONFIG_START( hec2hrp, hec2hrp_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) /* Gestion cassette*/ - MCFG_CASSETTE_ADD( "cassette", hector_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(hector_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED) /* printer */ MCFG_DEVICE_ADD("printer", PRINTER, 0) @@ -552,7 +547,9 @@ static MACHINE_CONFIG_START( hec2mx40, hec2hrp_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) /* Gestion cassette*/ - MCFG_CASSETTE_ADD( "cassette", hector_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(hector_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED) /* printer */ MCFG_DEVICE_ADD("printer", PRINTER, 0) @@ -605,7 +602,9 @@ static MACHINE_CONFIG_START( hec2hrx, hec2hrp_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) // Gestion cassette - MCFG_CASSETTE_ADD( "cassette", hector_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(hector_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED) /* printer */ MCFG_DEVICE_ADD("printer", PRINTER, 0) @@ -654,7 +653,9 @@ static MACHINE_CONFIG_START( hec2mdhrx, hec2hrp_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) // Gestion cassette - MCFG_CASSETTE_ADD( "cassette", hector_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(hector_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED) /* printer */ MCFG_DEVICE_ADD("printer", PRINTER, 0) @@ -708,7 +709,9 @@ static MACHINE_CONFIG_START( hec2mx80, hec2hrp_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) /* Gestion cassette*/ - MCFG_CASSETTE_ADD( "cassette", hector_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(hector_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED) /* printer */ MCFG_DEVICE_ADD("printer", PRINTER, 0) diff --git a/src/mess/drivers/homelab.c b/src/mess/drivers/homelab.c index 1fc86a2cc8b..096708667a6 100644 --- a/src/mess/drivers/homelab.c +++ b/src/mess/drivers/homelab.c @@ -756,7 +756,7 @@ static MACHINE_CONFIG_START( homelab, homelab_state ) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) - MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) MCFG_QUICKLOAD_ADD("quickload", homelab_state, homelab, "htp", 2) MACHINE_CONFIG_END @@ -787,7 +787,7 @@ static MACHINE_CONFIG_START( homelab3, homelab_state ) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) - MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) MCFG_QUICKLOAD_ADD("quickload", homelab_state, homelab, "htp", 2) MACHINE_CONFIG_END @@ -822,7 +822,7 @@ static MACHINE_CONFIG_START( brailab4, homelab_state ) MCFG_DEVICE_ADD("mea8000", MEA8000, 0) MCFG_MEA8000_DAC("speech") - MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) MCFG_QUICKLOAD_ADD("quickload", homelab_state, homelab, "htp", 18) MACHINE_CONFIG_END diff --git a/src/mess/drivers/huebler.c b/src/mess/drivers/huebler.c index 9e5a1044b0f..b6b9f2eb022 100644 --- a/src/mess/drivers/huebler.c +++ b/src/mess/drivers/huebler.c @@ -306,14 +306,6 @@ void amu880_state::machine_start() /* Machine Driver */ -static const cassette_interface amu880_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED), - NULL -}; - /* F4 Character Displayer */ static const gfx_layout amu880_charlayout = { @@ -367,7 +359,9 @@ static MACHINE_CONFIG_START( amu880, amu880_state ) MCFG_Z80DART_OUT_TXDA_CB(WRITELINE(amu880_state, cassette_w)) MCFG_Z80DART_OUT_INT_CB(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0)) - MCFG_CASSETTE_ADD("cassette", amu880_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED) + MCFG_TIMER_DRIVER_ADD_PERIODIC("tape", amu880_state, tape_tick, attotime::from_hz(44100)) /* internal ram */ diff --git a/src/mess/drivers/hx20.c b/src/mess/drivers/hx20.c index 7908efa8399..d4abbca6920 100644 --- a/src/mess/drivers/hx20.c +++ b/src/mess/drivers/hx20.c @@ -853,7 +853,7 @@ static MACHINE_CONFIG_START( hx20, hx20_state ) MCFG_MC146818_ADD(MC146818_TAG, XTAL_4_194304Mhz) MCFG_MC146818_IRQ_HANDLER(WRITELINE(hx20_state, rtc_irq_w)) MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, NULL) - MCFG_CASSETTE_ADD(CASSETTE_TAG, default_cassette_interface) + MCFG_CASSETTE_ADD(CASSETTE_TAG) MCFG_EPSON_SIO_ADD("sio", "tf20") MCFG_EPSON_SIO_RX(WRITELINE(hx20_state, sio_rx_w)) MCFG_EPSON_SIO_PIN(WRITELINE(hx20_state, sio_pin_w)) diff --git a/src/mess/drivers/ibmpcjr.c b/src/mess/drivers/ibmpcjr.c index a253595f08c..ded9b8b53b0 100644 --- a/src/mess/drivers/ibmpcjr.c +++ b/src/mess/drivers/ibmpcjr.c @@ -547,14 +547,6 @@ static GFXDECODE_START( pcjr ) GFXDECODE_ENTRY( "gfx1", 0x0000, pc_8_charlayout, 3, 1 ) GFXDECODE_END -static const cassette_interface pcjr_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED), - NULL -}; - const ins8250_interface pcjr_com_interface = { DEVCB_DEVICE_LINE_MEMBER("serport", rs232_port_device, write_txd), @@ -657,7 +649,8 @@ static MACHINE_CONFIG_START( ibmpcjr, pcjr_state) MCFG_PC_JOY_ADD("pc_joy") /* cassette */ - MCFG_CASSETTE_ADD( "cassette", pcjr_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED) MCFG_UPD765A_ADD("fdc", false, false) diff --git a/src/mess/drivers/instruct.c b/src/mess/drivers/instruct.c index 20ec1feae02..3dad503aae1 100644 --- a/src/mess/drivers/instruct.c +++ b/src/mess/drivers/instruct.c @@ -416,7 +416,7 @@ static MACHINE_CONFIG_START( instruct, instruct_state ) MCFG_QUICKLOAD_ADD("quickload", instruct_state, instruct, "pgm", 1) /* cassette */ - MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) diff --git a/src/mess/drivers/interact.c b/src/mess/drivers/interact.c index 23318eff8ff..2fcb9e52c3d 100644 --- a/src/mess/drivers/interact.c +++ b/src/mess/drivers/interact.c @@ -97,15 +97,6 @@ static ADDRESS_MAP_START(interact_mem, AS_PROGRAM, 8, interact_state ) ADDRESS_MAP_END -/* Cassette definition */ -static const cassette_interface interact_cassette_interface = -{ - hector_cassette_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MASK_SPEAKER), - "interact_cass" -}; - /* Discrete Sound */ static DISCRETE_SOUND_START( hec2hrp ) DISCRETE_INPUT_LOGIC(NODE_01) @@ -165,7 +156,11 @@ static MACHINE_CONFIG_START( interact, interact_state ) MCFG_SOUND_CONFIG_DISCRETE( hec2hrp ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_CASSETTE_ADD( "cassette", interact_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(hector_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MASK_SPEAKER) + MCFG_CASSETTE_INTERFACE("interact_cass") + MCFG_SOFTWARE_LIST_ADD("cass_list","interact") /* printer */ @@ -208,7 +203,10 @@ static MACHINE_CONFIG_START( hector1, interact_state ) MCFG_SOUND_CONFIG_DISCRETE( hec2hrp ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - MCFG_CASSETTE_ADD( "cassette", interact_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(hector_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MASK_SPEAKER) + MCFG_CASSETTE_INTERFACE("interact_cass") /* printer */ MCFG_DEVICE_ADD("printer", PRINTER, 0) diff --git a/src/mess/drivers/intv.c b/src/mess/drivers/intv.c index 9266f2fc54c..13f87f9d723 100644 --- a/src/mess/drivers/intv.c +++ b/src/mess/drivers/intv.c @@ -137,16 +137,6 @@ static const ay8910_interface intv_ay8914_ecs_interface = DEVCB_NULL }; -/* -static const cassette_interface ecs_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED), - NULL -}; -*/ - /* graphics output */ static const gfx_layout intvkbd_charlayout = @@ -855,7 +845,7 @@ static MACHINE_CONFIG_DERIVED( intvecs, intv ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.33) /* cassette */ - //MCFG_CASSETTE_ADD( "cassette", ecs_cassette_interface ) + //MCFG_CASSETTE_ADD( "cassette" ) MACHINE_CONFIG_END diff --git a/src/mess/drivers/iq151.c b/src/mess/drivers/iq151.c index 712579d4c2d..09e22589fd4 100644 --- a/src/mess/drivers/iq151.c +++ b/src/mess/drivers/iq151.c @@ -361,14 +361,6 @@ UINT32 iq151_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, c return 0; } -static const cassette_interface iq151_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED), - "iq151_cass" -}; - static SLOT_INTERFACE_START(iq151_cart) SLOT_INTERFACE("video32", IQ151_VIDEO32) // video32 SLOT_INTERFACE("video64", IQ151_VIDEO64) // video64 @@ -416,7 +408,10 @@ static MACHINE_CONFIG_START( iq151, iq151_state ) MCFG_I8255_IN_PORTC_CB(READ8(iq151_state, ppi_portc_r)) MCFG_I8255_OUT_PORTC_CB(WRITE8(iq151_state, ppi_portc_w)) - MCFG_CASSETTE_ADD( "cassette", iq151_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED) + MCFG_CASSETTE_INTERFACE("iq151_cass") + MCFG_TIMER_DRIVER_ADD_PERIODIC("cassette_timer", iq151_state, cassette_timer, attotime::from_hz(2000)) /* cartridge */ diff --git a/src/mess/drivers/jr100.c b/src/mess/drivers/jr100.c index fc4960fd34c..9347346ac76 100644 --- a/src/mess/drivers/jr100.c +++ b/src/mess/drivers/jr100.c @@ -293,13 +293,6 @@ WRITE_LINE_MEMBER(jr100_state::jr100_via_write_cb2) { m_cassette->output(state ? -1.0 : +1.0); } -static const cassette_interface jr100_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED), - NULL -}; TIMER_DEVICE_CALLBACK_MEMBER(jr100_state::sound_tick) { @@ -402,7 +395,8 @@ static MACHINE_CONFIG_START( jr100, jr100_state ) MCFG_SOUND_ADD("beeper", BEEP, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS,"mono",0.50) - MCFG_CASSETTE_ADD( "cassette", jr100_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED) MCFG_TIMER_DRIVER_ADD_PERIODIC("sound_tick", jr100_state, sound_tick, attotime::from_hz(XTAL_14_31818MHz / 16)) diff --git a/src/mess/drivers/jtc.c b/src/mess/drivers/jtc.c index 2bfabe69ead..11753f321e7 100644 --- a/src/mess/drivers/jtc.c +++ b/src/mess/drivers/jtc.c @@ -681,14 +681,6 @@ void jtc_state::machine_start() /* Machine Driver */ -static const cassette_interface jtc_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED), - NULL -}; - /* F4 Character Displayer */ static const gfx_layout jtces23_charlayout = { @@ -739,7 +731,8 @@ static MACHINE_CONFIG_START( basic, jtc_state ) MCFG_SOUND_ROUTE(1, "mono", 0.25) /* cassette */ - MCFG_CASSETTE_ADD("cassette", jtc_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED) /* printer */ MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_printers, "printer") diff --git a/src/mess/drivers/kc.c b/src/mess/drivers/kc.c index 1481b4162d2..d291c77980e 100644 --- a/src/mess/drivers/kc.c +++ b/src/mess/drivers/kc.c @@ -87,14 +87,6 @@ extern SLOT_INTERFACE_START(kc85_exp) SLOT_INTERFACE_END -static const cassette_interface kc_cassette_interface = -{ - kc_cassette_formats, - NULL, - CASSETTE_PLAY, - "kc_cass" -}; - static MACHINE_CONFIG_START( kc85_3, kc_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, KC85_3_CLOCK) @@ -141,7 +133,10 @@ static MACHINE_CONFIG_START( kc85_3, kc_state ) /* devices */ MCFG_QUICKLOAD_ADD("quickload", kc_state, kc, "kcc", 2) - MCFG_CASSETTE_ADD( "cassette", kc_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(kc_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY) + MCFG_CASSETTE_INTERFACE("kc_cass") /* cartridge slot */ MCFG_DEVICE_ADD("m8", KCCART_SLOT, 0) @@ -222,7 +217,10 @@ static MACHINE_CONFIG_START( kc85_4, kc85_4_state ) /* devices */ MCFG_QUICKLOAD_ADD("quickload", kc_state, kc, "kcc", 2) - MCFG_CASSETTE_ADD( "cassette", kc_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(kc_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY) + MCFG_CASSETTE_INTERFACE("kc_cass") /* cartridge slot */ MCFG_DEVICE_ADD("m8", KCCART_SLOT, 0) diff --git a/src/mess/drivers/kim1.c b/src/mess/drivers/kim1.c index 7b1537da12b..de24b86d026 100644 --- a/src/mess/drivers/kim1.c +++ b/src/mess/drivers/kim1.c @@ -313,15 +313,6 @@ void kim1_state::machine_reset() } -static const cassette_interface kim1_cassette_interface = -{ - kim1_cassette_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED), - NULL -}; - - static MACHINE_CONFIG_START( kim1, kim1_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, 1000000) /* 1 MHz */ @@ -346,7 +337,10 @@ static MACHINE_CONFIG_START( kim1, kim1_state ) MCFG_DEVICE_ADD("miot_u3", MOS6530, 1000000) - MCFG_CASSETTE_ADD( "cassette", kim1_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(kim1_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED) + MCFG_TIMER_DRIVER_ADD_PERIODIC("led_timer", kim1_state, kim1_update_leds, attotime::from_hz(60)) MCFG_TIMER_DRIVER_ADD_PERIODIC("cassette_timer", kim1_state, kim1_cassette_input, attotime::from_hz(44100)) MACHINE_CONFIG_END diff --git a/src/mess/drivers/kyocera.c b/src/mess/drivers/kyocera.c index b3061ef4169..e4ad85d3eb5 100644 --- a/src/mess/drivers/kyocera.c +++ b/src/mess/drivers/kyocera.c @@ -1309,14 +1309,6 @@ void tandy200_state::machine_start() save_item(NAME(m_tp)); } -static const cassette_interface kc85_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED), - NULL -}; - WRITE_LINE_MEMBER( kc85_state::kc85_sod_w ) { m_cassette->output(state ? +1.0 : -1.0); @@ -1378,7 +1370,8 @@ static MACHINE_CONFIG_START( kc85, kc85_state ) MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(kc85_state, write_centronics_busy)) MCFG_CENTRONICS_SELECT_HANDLER(WRITELINE(kc85_state, write_centronics_select)) - MCFG_CASSETTE_ADD("cassette", kc85_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED) /* option ROM cartridge */ MCFG_CARTSLOT_ADD("cart") @@ -1429,7 +1422,8 @@ static MACHINE_CONFIG_START( pc8201, pc8201_state ) MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(kc85_state, write_centronics_busy)) MCFG_CENTRONICS_SELECT_HANDLER(WRITELINE(kc85_state, write_centronics_select)) - MCFG_CASSETTE_ADD("cassette", kc85_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED) /* option ROM cartridge */ MCFG_CARTSLOT_ADD("cart") @@ -1489,7 +1483,9 @@ static MACHINE_CONFIG_START( trsm100, trsm100_state ) MCFG_RS232_RXD_HANDLER(DEVWRITELINE(IM6402_TAG, im6402_device, write_rri)) MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_printers, "printer") - MCFG_CASSETTE_ADD("cassette", kc85_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED) + // MCFG_MC14412_ADD(MC14412_TAG, XTAL_1MHz) /* option ROM cartridge */ @@ -1558,7 +1554,8 @@ static MACHINE_CONFIG_START( tandy200, tandy200_state ) MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG) - MCFG_CASSETTE_ADD("cassette", kc85_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED) /* option ROM cartridge */ MCFG_CARTSLOT_ADD("cart") diff --git a/src/mess/drivers/lc80.c b/src/mess/drivers/lc80.c index 414bf632a6c..fc370411d16 100644 --- a/src/mess/drivers/lc80.c +++ b/src/mess/drivers/lc80.c @@ -321,14 +321,6 @@ void lc80_state::machine_start() /* Machine Driver */ -static const cassette_interface lc80_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED), - NULL -}; - static MACHINE_CONFIG_START( lc80, lc80_state ) /* basic machine hardware */ MCFG_CPU_ADD(Z80_TAG, Z80, 900000) /* UD880D */ @@ -360,7 +352,8 @@ static MACHINE_CONFIG_START( lc80, lc80_state ) MCFG_Z80PIO_OUT_INT_CB(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0)) MCFG_Z80PIO_IN_PB_CB(READ8(lc80_state, pio2_pb_r)) - MCFG_CASSETTE_ADD("cassette", lc80_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED) MCFG_RAM_ADD(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("1K") @@ -398,7 +391,8 @@ static MACHINE_CONFIG_START( lc80_2, lc80_state ) MCFG_Z80PIO_OUT_INT_CB(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0)) MCFG_Z80PIO_IN_PB_CB(READ8(lc80_state, pio2_pb_r)) - MCFG_CASSETTE_ADD("cassette", lc80_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED) /* internal ram */ MCFG_RAM_ADD(RAM_TAG) diff --git a/src/mess/drivers/lola8a.c b/src/mess/drivers/lola8a.c index f3aae30c631..ae3417b45e5 100644 --- a/src/mess/drivers/lola8a.c +++ b/src/mess/drivers/lola8a.c @@ -298,7 +298,7 @@ static MACHINE_CONFIG_START( lola8a, lola8a_state ) MCFG_PALETTE_INIT_OWNER(lola8a_state, lola8a) /* Cassette */ - MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) MACHINE_CONFIG_END diff --git a/src/mess/drivers/lviv.c b/src/mess/drivers/lviv.c index 14c0194de35..b1368f650f9 100644 --- a/src/mess/drivers/lviv.c +++ b/src/mess/drivers/lviv.c @@ -415,15 +415,6 @@ static INPUT_PORTS_START (lviv) INPUT_PORTS_END -static const cassette_interface lviv_cassette_interface = -{ - lviv_lvt_format, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED), - "lviv_cass" -}; - - /* machine definition */ static MACHINE_CONFIG_START( lviv, lviv_state ) /* basic machine hardware */ @@ -471,7 +462,11 @@ static MACHINE_CONFIG_START( lviv, lviv_state ) /* snapshot */ MCFG_SNAPSHOT_ADD("snapshot", lviv_state, lviv, "sav", 0) - MCFG_CASSETTE_ADD( "cassette", lviv_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(lviv_lvt_format) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED) + MCFG_CASSETTE_INTERFACE("lviv_cass") + MCFG_SOFTWARE_LIST_ADD("cass_list","lviv") /* internal ram */ diff --git a/src/mess/drivers/m5.c b/src/mess/drivers/m5.c index e846ccb5ae1..08dd899b9bb 100644 --- a/src/mess/drivers/m5.c +++ b/src/mess/drivers/m5.c @@ -395,25 +395,6 @@ static INPUT_PORTS_START( m5 ) PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Reset") PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC)) /* 1st line, 1st key from right! */ INPUT_PORTS_END - - -//************************************************************************** -// DEVICE CONFIGURATION -//************************************************************************** - -//------------------------------------------------- -// cassette_interface cassette_intf -//------------------------------------------------- - -static const cassette_interface cassette_intf = -{ - sordm5_cassette_formats, - NULL, - (cassette_state)(CASSETTE_PLAY), - NULL -}; - - //------------------------------------------------- // TMS9928a_interface vdp_intf //------------------------------------------------- @@ -615,7 +596,9 @@ static MACHINE_CONFIG_START( m5, m5_state ) MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG) - MCFG_CASSETTE_ADD("cassette", cassette_intf) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_FORMATS(sordm5_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY) MCFG_DEVICE_ADD(I8255A_TAG, I8255, 0) MCFG_I8255_IN_PORTA_CB(READ8(m5_state, ppi_pa_r)) diff --git a/src/mess/drivers/mbee.c b/src/mess/drivers/mbee.c index a9f0607047f..bf713df5aca 100644 --- a/src/mess/drivers/mbee.c +++ b/src/mess/drivers/mbee.c @@ -654,14 +654,6 @@ static SLOT_INTERFACE_START( mbee_floppies ) SLOT_INTERFACE_END -static const cassette_interface mbee_cassette_interface = -{ - mbee_cassette_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED), - NULL -}; - static MACHINE_CONFIG_START( mbee, mbee_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_12MHz / 6) /* 2 MHz */ @@ -711,7 +703,9 @@ static MACHINE_CONFIG_START( mbee, mbee_state ) MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics") - MCFG_CASSETTE_ADD( "cassette", mbee_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(mbee_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED) MACHINE_CONFIG_END @@ -767,7 +761,9 @@ static MACHINE_CONFIG_START( mbeeic, mbee_state ) MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics") - MCFG_CASSETTE_ADD( "cassette", mbee_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(mbee_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( mbeepc, mbeeic ) diff --git a/src/mess/drivers/mc10.c b/src/mess/drivers/mc10.c index bb09d505161..c833ed01f69 100644 --- a/src/mess/drivers/mc10.c +++ b/src/mess/drivers/mc10.c @@ -477,22 +477,6 @@ INPUT_PORTS_END MACHINE DRIVERS ***************************************************************************/ -static const cassette_interface mc10_cassette_interface = -{ - coco_cassette_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED), - NULL -}; - -static const cassette_interface alice32_cassette_interface = -{ - alice32_cassette_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED), - "alice32_cass" -}; - static const mc6847_interface mc10_mc6847_intf = { "screen", @@ -515,7 +499,9 @@ static MACHINE_CONFIG_START( mc10, mc10_state ) MCFG_SOUND_ADD("dac", DAC, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) - MCFG_CASSETTE_ADD("cassette", mc10_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_FORMATS(coco_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED) /* printer */ MCFG_DEVICE_ADD("printer", PRINTER, 0) @@ -550,7 +536,10 @@ static MACHINE_CONFIG_START( alice32, mc10_state ) MCFG_SOUND_ADD("dac", DAC, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) - MCFG_CASSETTE_ADD("cassette", alice32_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_FORMATS(alice32_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED) + MCFG_CASSETTE_INTERFACE("alice32_cass") /* printer */ MCFG_DEVICE_ADD("printer", PRINTER, 0) diff --git a/src/mess/drivers/mc1000.c b/src/mess/drivers/mc1000.c index 7643549ec6e..a4e0efc0b56 100644 --- a/src/mess/drivers/mc1000.c +++ b/src/mess/drivers/mc1000.c @@ -424,14 +424,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(mc1000_state::ne555_tick) m_maincpu->set_input_line(INPUT_LINE_IRQ0, param); } -static const cassette_interface mc1000_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED), - NULL -}; - static const mc6847_interface mc1000_mc6847_intf = { SCREEN_TAG, @@ -466,7 +458,9 @@ static MACHINE_CONFIG_START( mc1000, mc1000_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) /* devices */ - MCFG_CASSETTE_ADD("cassette", mc1000_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED) + MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_printers, "printer") MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(mc1000_state, write_centronics_busy)) diff --git a/src/mess/drivers/mc1502.c b/src/mess/drivers/mc1502.c index 3de8cb266c9..a96b14ffc57 100644 --- a/src/mess/drivers/mc1502.c +++ b/src/mess/drivers/mc1502.c @@ -31,14 +31,6 @@ * onboard devices: */ -static const cassette_interface mc1502_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED), - NULL -}; - // Timer /* check if any keys are pressed, raise IRQ1 if so */ @@ -313,7 +305,8 @@ static MACHINE_CONFIG_START( mc1502, mc1502_state ) MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics") - MCFG_CASSETTE_ADD( "cassette", mc1502_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED) MCFG_SOFTWARE_LIST_ADD("flop_list","mc1502_flop") // MCFG_SOFTWARE_LIST_ADD("cass_list","mc1502_cass") diff --git a/src/mess/drivers/mekd2.c b/src/mess/drivers/mekd2.c index da01f1891cc..44c43f7cddb 100644 --- a/src/mess/drivers/mekd2.c +++ b/src/mess/drivers/mekd2.c @@ -374,7 +374,7 @@ static MACHINE_CONFIG_START( mekd2, mekd2_state ) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) - MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) /* Cartslot ?? does not come with one.. */ MCFG_CARTSLOT_ADD("cart") diff --git a/src/mess/drivers/microtan.c b/src/mess/drivers/microtan.c index 707ae1c52a2..1b7128c9bfa 100644 --- a/src/mess/drivers/microtan.c +++ b/src/mess/drivers/microtan.c @@ -252,7 +252,7 @@ static MACHINE_CONFIG_START( microtan, microtan_state ) MCFG_QUICKLOAD_ADD("quickload", microtan_state, microtan, "hex", 0.5) /* cassette */ - MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) /* acia */ MCFG_DEVICE_ADD("acia", MOS6551, 0) diff --git a/src/mess/drivers/mikro80.c b/src/mess/drivers/mikro80.c index f9f2b07dcf5..0b5ab473f50 100644 --- a/src/mess/drivers/mikro80.c +++ b/src/mess/drivers/mikro80.c @@ -138,16 +138,6 @@ static INPUT_PORTS_START( mikro80 ) PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) INPUT_PORTS_END -/* Machine driver */ -static const cassette_interface mikro80_cassette_interface = -{ - rk8_cassette_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED), - NULL -}; - - /* F4 Character Displayer */ static const gfx_layout mikro80_charlayout = { @@ -194,7 +184,9 @@ static MACHINE_CONFIG_START( mikro80, mikro80_state ) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) - MCFG_CASSETTE_ADD( "cassette", mikro80_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(rk8_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( radio99, mikro80 ) diff --git a/src/mess/drivers/mikrosha.c b/src/mess/drivers/mikrosha.c index 5480c6b4d57..ab8bb394308 100644 --- a/src/mess/drivers/mikrosha.c +++ b/src/mess/drivers/mikrosha.c @@ -139,16 +139,6 @@ static INPUT_PORTS_START( mikrosha ) PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) INPUT_PORTS_END -/* Machine driver */ -static const cassette_interface mikrosha_cassette_interface = -{ - rkm_cassette_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED), - "mikrosha_cass" -}; - - WRITE_LINE_MEMBER(mikrosha_state::mikrosha_pit_out2) { } @@ -243,7 +233,11 @@ static MACHINE_CONFIG_START( mikrosha, mikrosha_state ) MCFG_I8257_OUT_IOW_2_CB(DEVWRITE8("i8275", i8275_device, dack_w)) MCFG_I8257_REVERSE_RW_MODE(1) - MCFG_CASSETTE_ADD( "cassette", mikrosha_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(rkm_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED) + MCFG_CASSETTE_INTERFACE("mikrosha_cass") + MCFG_SOFTWARE_LIST_ADD("cass_list","mikrosha") MACHINE_CONFIG_END diff --git a/src/mess/drivers/mkit09.c b/src/mess/drivers/mkit09.c index 773392850aa..67980f8a51b 100644 --- a/src/mess/drivers/mkit09.c +++ b/src/mess/drivers/mkit09.c @@ -197,7 +197,7 @@ static MACHINE_CONFIG_START( mkit09, mkit09_state ) MCFG_PIA_IRQA_HANDLER(DEVWRITELINE("maincpu", m6809e_device, irq_line)) MCFG_PIA_IRQB_HANDLER(DEVWRITELINE("maincpu", m6809e_device, irq_line)) - MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) MACHINE_CONFIG_END /* ROM definition */ diff --git a/src/mess/drivers/mpf1.c b/src/mess/drivers/mpf1.c index 86d1c4969f1..d4231678325 100644 --- a/src/mess/drivers/mpf1.c +++ b/src/mess/drivers/mpf1.c @@ -273,16 +273,6 @@ static const z80_daisy_config mpf1_daisy_chain[] = { NULL } }; -/* Cassette Interface */ - -static const cassette_interface mpf1_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED), - NULL -}; - /* Machine Initialization */ TIMER_DEVICE_CALLBACK_MEMBER(mpf1_state::check_halt_callback) @@ -330,7 +320,8 @@ static MACHINE_CONFIG_START( mpf1, mpf1_state ) MCFG_I8255_OUT_PORTB_CB(WRITE8(mpf1_state, ppi_pb_w)) MCFG_I8255_OUT_PORTC_CB(WRITE8(mpf1_state, ppi_pc_w)) - MCFG_CASSETTE_ADD("cassette", mpf1_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED) /* video hardware */ MCFG_DEFAULT_LAYOUT(layout_mpf1) @@ -362,7 +353,8 @@ static MACHINE_CONFIG_START( mpf1b, mpf1_state ) MCFG_I8255_OUT_PORTB_CB(WRITE8(mpf1_state, ppi_pb_w)) MCFG_I8255_OUT_PORTC_CB(WRITE8(mpf1_state, ppi_pc_w)) - MCFG_CASSETTE_ADD("cassette", mpf1_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED) /* video hardware */ MCFG_DEFAULT_LAYOUT(layout_mpf1b) @@ -400,7 +392,8 @@ static MACHINE_CONFIG_START( mpf1p, mpf1_state ) MCFG_I8255_OUT_PORTB_CB(WRITE8(mpf1_state, ppi_pb_w)) MCFG_I8255_OUT_PORTC_CB(WRITE8(mpf1_state, ppi_pc_w)) - MCFG_CASSETTE_ADD("cassette", mpf1_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mess/drivers/msx.c b/src/mess/drivers/msx.c index 307962cfcd1..579a4c50b81 100644 --- a/src/mess/drivers/msx.c +++ b/src/mess/drivers/msx.c @@ -1062,15 +1062,6 @@ static const ay8910_interface msx_ay8910_interface = #define MSX_VISIBLE_XBORDER_PIXELS 8 #define MSX_VISIBLE_YBORDER_PIXELS 24 -static const cassette_interface msx_cassette_interface = -{ - fmsx_cassette_formats, - NULL, - (cassette_state)(CASSETTE_PLAY), - "msx_cass" -}; - - static MACHINE_CONFIG_FRAGMENT( msx_cartslot_1 ) MCFG_CARTSLOT_ADD("cart1") MCFG_CARTSLOT_EXTENSION_LIST("mx1,rom") @@ -1224,7 +1215,10 @@ static MACHINE_CONFIG_START( msx, msx_state ) MCFG_OUTPUT_LATCH_BIT1_HANDLER(DEVWRITELINE("centronics", centronics_device, write_strobe)) /* cassette */ - MCFG_CASSETTE_ADD( "cassette", msx_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(fmsx_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY) + MCFG_CASSETTE_INTERFACE("msx_cass") /* Software lists */ MCFG_SOFTWARE_LIST_ADD("cass_list","msx1_cass") @@ -1313,7 +1307,10 @@ static MACHINE_CONFIG_START( msx2, msx_state ) MCFG_OUTPUT_LATCH_BIT1_HANDLER(DEVWRITELINE("centronics", centronics_device, write_strobe)) /* cassette */ - MCFG_CASSETTE_ADD( "cassette", msx_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(fmsx_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY) + MCFG_CASSETTE_INTERFACE("msx_cass") /* real time clock */ MCFG_DEVICE_ADD("rtc", RP5C01, XTAL_32_768kHz) @@ -1378,7 +1375,10 @@ static MACHINE_CONFIG_START( msx2p, msx_state ) MCFG_OUTPUT_LATCH_BIT1_HANDLER(DEVWRITELINE("centronics", centronics_device, write_strobe)) /* cassette */ - MCFG_CASSETTE_ADD( "cassette", msx_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(fmsx_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY) + MCFG_CASSETTE_INTERFACE("msx_cass") /* real time clock */ MCFG_DEVICE_ADD("rtc", RP5C01, XTAL_32_768kHz) diff --git a/src/mess/drivers/mtx.c b/src/mess/drivers/mtx.c index 64322b69584..0cd675516e4 100644 --- a/src/mess/drivers/mtx.c +++ b/src/mess/drivers/mtx.c @@ -256,9 +256,6 @@ static const z80_daisy_config rs128_daisy_chain[] = { NULL } }; -/*------------------------------------------------- - cassette_interface mtx_cassette_interface --------------------------------------------------*/ TIMER_DEVICE_CALLBACK_MEMBER(mtx_state::cassette_tick) { @@ -267,14 +264,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(mtx_state::cassette_tick) m_z80ctc->trg3(data); } -static const cassette_interface mtx_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED), - NULL -}; - /*------------------------------------------------- mtx_tms9928a_interface -------------------------------------------------*/ @@ -332,7 +321,9 @@ static MACHINE_CONFIG_START( mtx512, mtx_state ) MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics") MCFG_SNAPSHOT_ADD("snapshot", mtx_state, mtx, "mtx", 1) - MCFG_CASSETTE_ADD("cassette", mtx_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED) + MCFG_TIMER_DRIVER_ADD_PERIODIC("cassette_timer", mtx_state, cassette_tick, attotime::from_hz(44100)) /* internal ram */ diff --git a/src/mess/drivers/mycom.c b/src/mess/drivers/mycom.c index e275b06e37b..7d1e135b62e 100644 --- a/src/mess/drivers/mycom.c +++ b/src/mess/drivers/mycom.c @@ -549,7 +549,7 @@ static MACHINE_CONFIG_START( mycom, mycom_state ) /* Devices */ MCFG_MSM5832_ADD("rtc", XTAL_32_768kHz) - MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) MCFG_FD1771x_ADD("fdc", XTAL_16MHz / 16) MCFG_FLOPPY_DRIVE_ADD("fdc:0", mycom_floppies, "525sd", floppy_image_device::default_floppy_formats) MCFG_FLOPPY_DRIVE_ADD("fdc:1", mycom_floppies, "525sd", floppy_image_device::default_floppy_formats) diff --git a/src/mess/drivers/mz2000.c b/src/mess/drivers/mz2000.c index 3596d51789c..25be5339e17 100644 --- a/src/mess/drivers/mz2000.c +++ b/src/mess/drivers/mz2000.c @@ -802,14 +802,6 @@ static const floppy_interface mz2000_floppy_interface = NULL }; -static const cassette_interface mz2000_cassette_interface = -{ - mz700_cassette_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED), - "mz_cass" -}; - static MACHINE_CONFIG_START( mz2000, mz2000_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu",Z80, MASTER_CLOCK) @@ -839,7 +831,11 @@ static MACHINE_CONFIG_START( mz2000, mz2000_state ) MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(mz2000_floppy_interface) MCFG_SOFTWARE_LIST_ADD("flop_list","mz2000_flop") - MCFG_CASSETTE_ADD( "cassette", mz2000_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(mz700_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED) + MCFG_CASSETTE_INTERFACE("mz_cass") + MCFG_SOFTWARE_LIST_ADD("cass_list","mz2000_cass") /* video hardware */ diff --git a/src/mess/drivers/mz700.c b/src/mess/drivers/mz700.c index 21e25afa6f8..f29e57bda44 100644 --- a/src/mess/drivers/mz700.c +++ b/src/mess/drivers/mz700.c @@ -317,15 +317,6 @@ GFXDECODE_END MACHINE DRIVERS ***************************************************************************/ -static const cassette_interface mz700_cassette_interface = -{ - mz700_cassette_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED), - "mz_cass" -}; - - static MACHINE_CONFIG_START( mz700, mz_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_17_73447MHz/5) @@ -372,7 +363,11 @@ static MACHINE_CONFIG_START( mz700, mz_state ) MCFG_DEVICE_ADD("ls145", TTL74145, 0) - MCFG_CASSETTE_ADD( "cassette", mz700_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(mz700_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED) + MCFG_CASSETTE_INTERFACE("mz_cass") + MCFG_SOFTWARE_LIST_ADD("cass_list","mz700_cass") /* internal ram */ diff --git a/src/mess/drivers/mz80.c b/src/mess/drivers/mz80.c index c535241aac7..32ce5014b1a 100644 --- a/src/mess/drivers/mz80.c +++ b/src/mess/drivers/mz80.c @@ -260,14 +260,6 @@ static GFXDECODE_START( mz80kj ) GFXDECODE_ENTRY( "chargen", 0x0000, mz80kj_charlayout, 0, 1 ) GFXDECODE_END -static const cassette_interface mz80k_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED), - NULL -}; - TIMER_DEVICE_CALLBACK_MEMBER(mz80_state::ne555_tempo_callback) { m_mz80k_tempo_strobe ^= 1; @@ -316,7 +308,8 @@ static MACHINE_CONFIG_START( mz80k, mz80_state ) MCFG_PIT8253_OUT2_HANDLER(WRITELINE(mz80_state, pit_out2_changed)) MCFG_TIMER_DRIVER_ADD_PERIODIC("tempo", mz80_state, ne555_tempo_callback, attotime::from_hz(34)) - MCFG_CASSETTE_ADD( "cassette", mz80k_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( mz80kj, mz80k ) diff --git a/src/mess/drivers/nascom1.c b/src/mess/drivers/nascom1.c index 4feb2945fa7..539a09577bf 100644 --- a/src/mess/drivers/nascom1.c +++ b/src/mess/drivers/nascom1.c @@ -287,7 +287,7 @@ static MACHINE_CONFIG_START( nascom1, nascom1_state ) /* devices */ MCFG_SNAPSHOT_ADD("snapshot", nascom1_state, nascom1, "nas", 0.5) - MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) /* internal ram */ MCFG_RAM_ADD(RAM_TAG) diff --git a/src/mess/drivers/nes.c b/src/mess/drivers/nes.c index 5d221204e34..7e263c472b5 100644 --- a/src/mess/drivers/nes.c +++ b/src/mess/drivers/nes.c @@ -654,15 +654,6 @@ static const floppy_interface nes_floppy_interface = }; -static const cassette_interface fc_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED), - "fc_cass" -}; - - static MACHINE_CONFIG_START( nes, nes_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", N2A03, NTSC_CLOCK) @@ -755,7 +746,10 @@ static MACHINE_CONFIG_DERIVED( famicom, nes ) MCFG_LEGACY_FLOPPY_DRIVE_ADD(FLOPPY_0, nes_floppy_interface) MCFG_SOFTWARE_LIST_ADD("flop_list", "famicom_flop") - MCFG_CASSETTE_ADD( "tape", fc_cassette_interface ) + MCFG_CASSETTE_ADD( "tape" ) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED) + MCFG_CASSETTE_INTERFACE("fc_cass") + MCFG_SOFTWARE_LIST_ADD("cass_list", "famicom_cass") MACHINE_CONFIG_END diff --git a/src/mess/drivers/newbrain.c b/src/mess/drivers/newbrain.c index 145d1069eb1..87641f6c55a 100644 --- a/src/mess/drivers/newbrain.c +++ b/src/mess/drivers/newbrain.c @@ -1295,14 +1295,6 @@ INTERRUPT_GEN_MEMBER(newbrain_state::newbrain_interrupt) /* Machine Drivers */ -static const cassette_interface newbrain_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED), - NULL -}; - /* F4 Character Displayer */ static const gfx_layout newbrain_charlayout = { @@ -1340,8 +1332,11 @@ static MACHINE_CONFIG_START( newbrain_a, newbrain_state ) MCFG_FRAGMENT_ADD(newbrain_video) // devices - MCFG_CASSETTE_ADD("cassette", newbrain_cassette_interface) - MCFG_CASSETTE_ADD("cassette2", newbrain_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED) + + MCFG_CASSETTE_ADD("cassette2") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED) // internal ram MCFG_RAM_ADD(RAM_TAG) diff --git a/src/mess/drivers/ondra.c b/src/mess/drivers/ondra.c index 50cca61c3f4..fe88d3e595b 100644 --- a/src/mess/drivers/ondra.c +++ b/src/mess/drivers/ondra.c @@ -110,14 +110,6 @@ INTERRUPT_GEN_MEMBER(ondra_state::ondra_interrupt) device.execute().set_input_line(0, HOLD_LINE); } -static const cassette_interface ondra_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED), - "ondra_cass" -}; - /* Machine driver */ static MACHINE_CONFIG_START( ondra, ondra_state ) /* basic machine hardware */ @@ -144,7 +136,10 @@ static MACHINE_CONFIG_START( ondra, ondra_state ) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) - MCFG_CASSETTE_ADD( "cassette", ondra_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED) + MCFG_CASSETTE_INTERFACE("ondra_cass") + MCFG_SOFTWARE_LIST_ADD("cass_list","ondra") /* internal ram */ diff --git a/src/mess/drivers/orao.c b/src/mess/drivers/orao.c index 7e37f317d7f..92055df0489 100644 --- a/src/mess/drivers/orao.c +++ b/src/mess/drivers/orao.c @@ -162,15 +162,6 @@ static INPUT_PORTS_START( orao ) INPUT_PORTS_END /* Machine driver */ -static const cassette_interface orao_cassette_interface = -{ - orao_cassette_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED), - "orao_cass" -}; - - static MACHINE_CONFIG_START( orao, orao_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, 1000000) @@ -195,7 +186,11 @@ static MACHINE_CONFIG_START( orao, orao_state ) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) - MCFG_CASSETTE_ADD( "cassette", orao_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette") + MCFG_CASSETTE_FORMATS(orao_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED) + MCFG_CASSETTE_INTERFACE("orao_cass") + MCFG_SOFTWARE_LIST_ADD("cass_list","orao") MACHINE_CONFIG_END diff --git a/src/mess/drivers/oric.c b/src/mess/drivers/oric.c index 194eef573ab..6ee1f730fad 100644 --- a/src/mess/drivers/oric.c +++ b/src/mess/drivers/oric.c @@ -778,14 +778,6 @@ static const ay8910_interface oric_ay_interface = }; -static const cassette_interface oric_cassette_interface = -{ - oric_cassette_formats, - NULL, - (cassette_state)(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED), - NULL -}; - static MACHINE_CONFIG_START( oric, oric_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6502, XTAL_12MHz/12) @@ -815,7 +807,10 @@ static MACHINE_CONFIG_START( oric, oric_state ) MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics") /* cassette */ - MCFG_CASSETTE_ADD( "cassette", oric_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(oric_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED) + MCFG_TIMER_DRIVER_ADD_PERIODIC("tape_timer", oric_state, update_tape, attotime::from_hz(4800)) /* via */ diff --git a/src/mess/drivers/orion.c b/src/mess/drivers/orion.c index d9df5c0d261..2a21555cebb 100644 --- a/src/mess/drivers/orion.c +++ b/src/mess/drivers/orion.c @@ -73,14 +73,6 @@ static ADDRESS_MAP_START( orionpro_io , AS_IO, 8, orion_state ) AM_RANGE( 0x0000, 0xffff) AM_READWRITE(orionpro_io_r, orionpro_io_w ) ADDRESS_MAP_END -static const cassette_interface orion_cassette_interface = -{ - rko_cassette_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED), - "orion_cass" -}; - FLOPPY_FORMATS_MEMBER( orion_state::orion_floppy_formats ) FLOPPY_SMX_FORMAT FLOPPY_FORMATS_END @@ -127,7 +119,11 @@ static MACHINE_CONFIG_START( orion128, orion_state ) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) - MCFG_CASSETTE_ADD( "cassette", orion_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(rko_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED) + MCFG_CASSETTE_INTERFACE("orion_cass") + MCFG_SOFTWARE_LIST_ADD("cass_list","orion_cass") MCFG_FD1793x_ADD("fd1793", XTAL_8MHz / 8) @@ -209,7 +205,11 @@ static MACHINE_CONFIG_START( orionz80, orion_state ) MCFG_SOUND_CONFIG(orionz80_ay_interface) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) - MCFG_CASSETTE_ADD( "cassette", orion_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(rko_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED) + MCFG_CASSETTE_INTERFACE("orion_cass") + MCFG_SOFTWARE_LIST_ADD("cass_list","orion_cass") MCFG_FD1793x_ADD("fd1793", XTAL_8MHz / 8) @@ -281,7 +281,11 @@ static MACHINE_CONFIG_START( orionpro, orion_state ) MCFG_SOUND_CONFIG(orionz80_ay_interface) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) - MCFG_CASSETTE_ADD( "cassette", orion_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(rko_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED) + MCFG_CASSETTE_INTERFACE("orion_cass") + MCFG_SOFTWARE_LIST_ADD("cass_list","orion_cass") MCFG_FD1793x_ADD("fd1793", XTAL_8MHz / 8) diff --git a/src/mess/drivers/osi.c b/src/mess/drivers/osi.c index 563d53efc85..d57fdd35da0 100644 --- a/src/mess/drivers/osi.c +++ b/src/mess/drivers/osi.c @@ -745,7 +745,7 @@ static MACHINE_CONFIG_START( osi600, sb2m600_state ) MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(sb2m600_state, write_cassette_clock)) /* cassette */ - MCFG_CASSETTE_ADD("cassette", default_cassette_interface) + MCFG_CASSETTE_ADD("cassette") /* internal ram */ MCFG_RAM_ADD(RAM_TAG) @@ -770,7 +770,7 @@ static MACHINE_CONFIG_START( uk101, uk101_state ) MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(sb2m600_state, write_cassette_clock)) /* cassette */ - MCFG_CASSETTE_ADD("cassette", default_cassette_interface) + MCFG_CASSETTE_ADD("cassette") /* internal ram */ MCFG_RAM_ADD(RAM_TAG) @@ -807,7 +807,7 @@ static MACHINE_CONFIG_START( c1p, c1p_state ) MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(sb2m600_state, write_cassette_clock)) /* cassette */ - MCFG_CASSETTE_ADD("cassette", default_cassette_interface) + MCFG_CASSETTE_ADD("cassette") /* internal ram */ MCFG_RAM_ADD(RAM_TAG) diff --git a/src/mess/drivers/partner.c b/src/mess/drivers/partner.c index 332ba876811..0104900bb59 100644 --- a/src/mess/drivers/partner.c +++ b/src/mess/drivers/partner.c @@ -134,14 +134,6 @@ static INPUT_PORTS_START( partner ) INPUT_PORTS_END /* Machine driver */ -static const cassette_interface partner_cassette_interface = -{ - rkp_cassette_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED), - "partner_cass" -}; - FLOPPY_FORMATS_MEMBER( partner_state::floppy_formats ) FLOPPY_SMX_FORMAT FLOPPY_FORMATS_END @@ -211,7 +203,11 @@ static MACHINE_CONFIG_START( partner, partner_state ) MCFG_I8257_OUT_IOW_2_CB(DEVWRITE8("i8275", i8275_device, dack_w)) MCFG_I8257_REVERSE_RW_MODE(1) - MCFG_CASSETTE_ADD( "cassette", partner_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(rkp_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED) + MCFG_CASSETTE_INTERFACE("partner_cass") + MCFG_SOFTWARE_LIST_ADD("cass_list","partner_cass") MCFG_FD1793x_ADD("wd1793", XTAL_16MHz / 16) diff --git a/src/mess/drivers/pc8001.c b/src/mess/drivers/pc8001.c index c37726cc92b..2c827fea88a 100644 --- a/src/mess/drivers/pc8001.c +++ b/src/mess/drivers/pc8001.c @@ -471,16 +471,6 @@ void pc8001_state::machine_start() save_item(NAME(m_color)); } -/* Cassette Configuration */ - -static const cassette_interface pc8001_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED), - NULL -}; - /* Machine Drivers */ static MACHINE_CONFIG_START( pc8001, pc8001_state ) @@ -524,7 +514,8 @@ static MACHINE_CONFIG_START( pc8001, pc8001_state ) MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG) - MCFG_CASSETTE_ADD("cassette", pc8001_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED) MCFG_RAM_ADD(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("16K") @@ -570,7 +561,8 @@ static MACHINE_CONFIG_START( pc8001mk2, pc8001mk2_state ) MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG) - MCFG_CASSETTE_ADD("cassette", pc8001_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED) MCFG_RAM_ADD(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("64K") diff --git a/src/mess/drivers/pc8801.c b/src/mess/drivers/pc8801.c index fabd01e9ed1..713dc8be82b 100644 --- a/src/mess/drivers/pc8801.c +++ b/src/mess/drivers/pc8801.c @@ -2591,14 +2591,6 @@ WRITE_LINE_MEMBER( pc8801_state::rxrdy_w ) // ... } -static const cassette_interface pc8801_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED), - NULL -}; - static MACHINE_CONFIG_START( pc8801, pc8801_state ) /* main CPU */ MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK) /* 4 MHz */ @@ -2635,7 +2627,9 @@ static MACHINE_CONFIG_START( pc8801, pc8801_state ) #endif MCFG_UPD1990A_ADD(UPD1990A_TAG, XTAL_32_768kHz, NULL, NULL) //MCFG_CENTRONICS_ADD("centronics", centronics_printers, "printer") - MCFG_CASSETTE_ADD("cassette", pc8801_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED) + MCFG_SOFTWARE_LIST_ADD("tape_list","pc8801_cass") MCFG_DEVICE_ADD(I8251_TAG, I8251, 0) diff --git a/src/mess/drivers/pcm.c b/src/mess/drivers/pcm.c index 0f4574e4700..9e4bbd6b652 100644 --- a/src/mess/drivers/pcm.c +++ b/src/mess/drivers/pcm.c @@ -278,7 +278,7 @@ static MACHINE_CONFIG_START( pcm, pcm_state ) /* Devices */ MCFG_K7659_KEYBOARD_ADD() - MCFG_CASSETTE_ADD("cassette", default_cassette_interface) + MCFG_CASSETTE_ADD("cassette") MCFG_DEVICE_ADD("z80pio_u", Z80PIO, XTAL_10MHz/4) MCFG_Z80PIO_OUT_INT_CB(INPUTLINE("maincpu", INPUT_LINE_IRQ0)) diff --git a/src/mess/drivers/pecom.c b/src/mess/drivers/pecom.c index 5e25acc6c61..cfb9aedff9a 100644 --- a/src/mess/drivers/pecom.c +++ b/src/mess/drivers/pecom.c @@ -166,14 +166,6 @@ static INPUT_PORTS_START( pecom ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Break") PORT_CODE(KEYCODE_MINUS) PORT_CHANGED_MEMBER(DEVICE_SELF, pecom_state, ef_w, (void*)COSMAC_INPUT_LINE_EF4) INPUT_PORTS_END -static const cassette_interface pecom_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED), - "pecom_cass" -}; - /* Machine driver */ static MACHINE_CONFIG_START( pecom64, pecom_state ) /* basic machine hardware */ @@ -190,7 +182,10 @@ static MACHINE_CONFIG_START( pecom64, pecom_state ) MCFG_FRAGMENT_ADD(pecom_video) // devices - MCFG_CASSETTE_ADD( "cassette", pecom_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED) + MCFG_CASSETTE_INTERFACE("pecom_cass") + MCFG_SOFTWARE_LIST_ADD("cass_list","pecom_cass") /* internal ram */ diff --git a/src/mess/drivers/pegasus.c b/src/mess/drivers/pegasus.c index fa2bdfa4613..9e9eea371fd 100644 --- a/src/mess/drivers/pegasus.c +++ b/src/mess/drivers/pegasus.c @@ -278,15 +278,6 @@ static INPUT_PORTS_START( pegasus ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("{ }") PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('{') PORT_CHAR('}') INPUT_PORTS_END -static const cassette_interface pegasus_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED|CASSETTE_MOTOR_ENABLED), - NULL -}; - - void pegasus_state::video_start() { m_p_chargen = memregion("chargen")->base(); @@ -516,7 +507,8 @@ static MACHINE_CONFIG_START( pegasus, pegasus_state ) MCFG_CARTSLOT_ADD("cart5") MCFG_CARTSLOT_EXTENSION_LIST("bin") MCFG_CARTSLOT_LOAD(pegasus_state,pegasus_cart_5) - MCFG_CASSETTE_ADD( "cassette", pegasus_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED|CASSETTE_MOTOR_ENABLED) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( pegasusm, pegasus ) diff --git a/src/mess/drivers/pencil2.c b/src/mess/drivers/pencil2.c index 395dfa90dbe..8b577bf15a6 100644 --- a/src/mess/drivers/pencil2.c +++ b/src/mess/drivers/pencil2.c @@ -307,7 +307,7 @@ static MACHINE_CONFIG_START( pencil2, pencil2_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) /* cassette */ - MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) /* cartridge */ // MCFG_CARTSLOT_ADD("cart") diff --git a/src/mess/drivers/phc25.c b/src/mess/drivers/phc25.c index 9dd9b9c4105..d892fac2c3c 100644 --- a/src/mess/drivers/phc25.c +++ b/src/mess/drivers/phc25.c @@ -351,16 +351,6 @@ static const ay8910_interface ay8910_intf = DEVCB_NULL }; -/* Cassette Configuration */ - -static const cassette_interface phc25_cassette_interface = -{ - phc25_cassette_formats, - NULL, - (cassette_state)(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED), - NULL -}; - /* Machine Driver */ static MACHINE_CONFIG_START( phc25, phc25_state ) @@ -378,7 +368,10 @@ static MACHINE_CONFIG_START( phc25, phc25_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15) /* devices */ - MCFG_CASSETTE_ADD("cassette", phc25_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_FORMATS(phc25_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED) + MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_printers, "printer") MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(phc25_state, write_centronics_busy)) diff --git a/src/mess/drivers/phunsy.c b/src/mess/drivers/phunsy.c index 3671e578e18..bdc7fe39949 100644 --- a/src/mess/drivers/phunsy.c +++ b/src/mess/drivers/phunsy.c @@ -363,7 +363,7 @@ static MACHINE_CONFIG_START( phunsy, phunsy_state ) /* Devices */ MCFG_DEVICE_ADD(KEYBOARD_TAG, GENERIC_KEYBOARD, 0) MCFG_GENERIC_KEYBOARD_CB(WRITE8(phunsy_state, kbd_put)) - MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) /* quickload */ MCFG_QUICKLOAD_ADD("quickload", phunsy_state, phunsy, "bin", 2) diff --git a/src/mess/drivers/pk8000.c b/src/mess/drivers/pk8000.c index 625518dbaee..bd4512f9784 100644 --- a/src/mess/drivers/pk8000.c +++ b/src/mess/drivers/pk8000.c @@ -343,15 +343,6 @@ UINT32 pk8000_state::screen_update_pk8000(screen_device &screen, bitmap_ind16 &b return pk8000_video_update(screen, bitmap, cliprect, m_ram->pointer()); } -/* Machine driver */ -static const cassette_interface pk8000_cassette_interface = -{ - fmsx_cassette_formats, - NULL, - (cassette_state)(CASSETTE_PLAY), - NULL -}; - static MACHINE_CONFIG_START( pk8000, pk8000_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu",I8080, 1780000) @@ -389,7 +380,9 @@ static MACHINE_CONFIG_START( pk8000, pk8000_state ) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) - MCFG_CASSETTE_ADD( "cassette", pk8000_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(fmsx_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY) /* internal ram */ MCFG_RAM_ADD(RAM_TAG) diff --git a/src/mess/drivers/pk8020.c b/src/mess/drivers/pk8020.c index 3ccd9239008..58340173c42 100644 --- a/src/mess/drivers/pk8020.c +++ b/src/mess/drivers/pk8020.c @@ -139,15 +139,6 @@ static INPUT_PORTS_START( pk8020 ) PORT_BIT(0xFF, IP_ACTIVE_HIGH, IPT_UNUSED) INPUT_PORTS_END -/* Machine driver */ -static const cassette_interface pk8020_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_PLAY), - NULL -}; - static LEGACY_FLOPPY_OPTIONS_START(pk8020) LEGACY_FLOPPY_OPTION(pk8020, "kdi", "PK8020 disk image", basicdsk_identify_default, basicdsk_construct_default, NULL, HEADS([2]) @@ -245,7 +236,8 @@ static MACHINE_CONFIG_START( pk8020, pk8020_state ) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) - MCFG_CASSETTE_ADD( "cassette", pk8020_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY) MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(pk8020_floppy_interface) MCFG_SOFTWARE_LIST_ADD("flop_list","korvet_flop") diff --git a/src/mess/drivers/pmd85.c b/src/mess/drivers/pmd85.c index f3e9c06bb2c..b4d40c0077f 100644 --- a/src/mess/drivers/pmd85.c +++ b/src/mess/drivers/pmd85.c @@ -533,15 +533,6 @@ static const struct CassetteOptions pmd85_cassette_options = 7200 /* sample frequency */ }; -static const cassette_interface pmd85_cassette_interface = -{ - pmd85_cassette_formats, - &pmd85_cassette_options, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED), - NULL -}; - - /* machine definition */ static MACHINE_CONFIG_START( pmd85, pmd85_state ) /* basic machine hardware */ @@ -594,7 +585,10 @@ static MACHINE_CONFIG_START( pmd85, pmd85_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) /* cassette */ - MCFG_CASSETTE_ADD( "cassette", pmd85_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(pmd85_cassette_formats) + MCFG_CASSETTE_CREATE_OPTS(&pmd85_cassette_options) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED) /* uart */ MCFG_DEVICE_ADD("uart", I8251, 0) diff --git a/src/mess/drivers/poisk1.c b/src/mess/drivers/poisk1.c index 43bcbe3f5f8..ad4a98cbb95 100644 --- a/src/mess/drivers/poisk1.c +++ b/src/mess/drivers/poisk1.c @@ -169,14 +169,6 @@ WRITE8_MEMBER(p1_state::p1_ppi_w) * **********************************************************/ -static const cassette_interface p1_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED), - NULL -}; - DRIVER_INIT_MEMBER( p1_state, poisk1 ) { address_space &program = m_maincpu->space(AS_PROGRAM); @@ -270,7 +262,8 @@ static MACHINE_CONFIG_START( poisk1, p1_state ) MCFG_ISA8_SLOT_ADD("isa", "isa3", p1_isa8_cards, NULL, false) MCFG_ISA8_SLOT_ADD("isa", "isa4", p1_isa8_cards, NULL, false) - MCFG_CASSETTE_ADD( "cassette", p1_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED) MCFG_SPEAKER_STANDARD_MONO( "mono" ) MCFG_SOUND_ADD( "speaker", SPEAKER_SOUND, 0 ) diff --git a/src/mess/drivers/poly88.c b/src/mess/drivers/poly88.c index b96b591934b..bc1506fbaf4 100644 --- a/src/mess/drivers/poly88.c +++ b/src/mess/drivers/poly88.c @@ -139,14 +139,6 @@ static const struct CassetteOptions poly88_cassette_options = 7200 /* sample frequency */ }; -static const cassette_interface poly88_cassette_interface = -{ - cassette_default_formats, - &poly88_cassette_options, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED), - NULL -}; - /* F4 Character Displayer */ static const gfx_layout poly88_charlayout = { @@ -192,7 +184,9 @@ static MACHINE_CONFIG_START( poly88, poly88_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) /* cassette */ - MCFG_CASSETTE_ADD( "cassette", poly88_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_CREATE_OPTS(&poly88_cassette_options) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED) /* uart */ MCFG_DEVICE_ADD("uart", I8251, 0) diff --git a/src/mess/drivers/poly880.c b/src/mess/drivers/poly880.c index 818cd5bf5c3..f94cdd898ea 100644 --- a/src/mess/drivers/poly880.c +++ b/src/mess/drivers/poly880.c @@ -241,14 +241,6 @@ void poly880_state::machine_start() /* Machine Driver */ -static const cassette_interface poly880_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED), - NULL -}; - static MACHINE_CONFIG_START( poly880, poly880_state ) /* basic machine hardware */ MCFG_CPU_ADD(Z80_TAG, Z80, XTAL_7_3728MHz/8) @@ -274,7 +266,8 @@ static MACHINE_CONFIG_START( poly880, poly880_state ) MCFG_DEVICE_ADD(Z80PIO2_TAG, Z80PIO, XTAL_7_3728MHz/16) MCFG_Z80PIO_OUT_INT_CB(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0)) - MCFG_CASSETTE_ADD("cassette", poly880_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED) /* internal ram */ MCFG_RAM_ADD(RAM_TAG) diff --git a/src/mess/drivers/primo.c b/src/mess/drivers/primo.c index 75612b4b2b4..5efaad632e3 100644 --- a/src/mess/drivers/primo.c +++ b/src/mess/drivers/primo.c @@ -238,14 +238,6 @@ static const struct CassetteOptions primo_cassette_options = { 22050 /* sample frequency */ }; -static const cassette_interface primo_cassette_interface = -{ - primo_ptp_format, - &primo_cassette_options, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED), - NULL -}; - static MACHINE_CONFIG_START( primoa32, primo_state ) /* basic machine hardware */ MCFG_CPU_ADD( "maincpu", Z80, 2500000 ) @@ -276,7 +268,10 @@ static MACHINE_CONFIG_START( primoa32, primo_state ) MCFG_SNAPSHOT_ADD("snapshot", primo_state, primo, "pss", 0) MCFG_QUICKLOAD_ADD("quickload", primo_state, primo, "pp", 0) - MCFG_CASSETTE_ADD( "cassette", primo_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(primo_ptp_format) + MCFG_CASSETTE_CREATE_OPTS(&primo_cassette_options) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED) /* floppy from serial bus */ MCFG_CBM_IEC_ADD(NULL) diff --git a/src/mess/drivers/pro80.c b/src/mess/drivers/pro80.c index 0ccdf78f2da..4e0cabd3121 100644 --- a/src/mess/drivers/pro80.c +++ b/src/mess/drivers/pro80.c @@ -153,7 +153,7 @@ static MACHINE_CONFIG_START( pro80, pro80_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) /* Devices */ - MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) MACHINE_CONFIG_END /* ROM definition */ diff --git a/src/mess/drivers/ptcsol.c b/src/mess/drivers/ptcsol.c index 4fe135988e7..7899b33004a 100644 --- a/src/mess/drivers/ptcsol.c +++ b/src/mess/drivers/ptcsol.c @@ -548,14 +548,6 @@ static INPUT_PORTS_START( sol20 ) INPUT_PORTS_END -static const cassette_interface sol20_cassette_interface = -{ - sol20_cassette_formats,//cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_PLAY | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED), - NULL -}; - /* after the first 4 bytes have been read from ROM, switch the ram back in */ TIMER_CALLBACK_MEMBER(sol20_state::sol20_boot) { @@ -755,8 +747,14 @@ static MACHINE_CONFIG_START( sol20, sol20_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) // cass2 speaker // devices - MCFG_CASSETTE_ADD( "cassette", sol20_cassette_interface ) - MCFG_CASSETTE_ADD( "cassette2", sol20_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(sol20_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED) + + MCFG_CASSETTE_ADD( "cassette2" ) + MCFG_CASSETTE_FORMATS(sol20_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED) + MCFG_DEVICE_ADD( "uart", AY31015, 0 ) MCFG_AY31015_TX_CLOCK(4800.0) MCFG_AY31015_RX_CLOCK(4800.0) diff --git a/src/mess/drivers/pv2000.c b/src/mess/drivers/pv2000.c index 2227b6b00a1..628a7cd9ecc 100644 --- a/src/mess/drivers/pv2000.c +++ b/src/mess/drivers/pv2000.c @@ -383,15 +383,6 @@ DEVICE_IMAGE_LOAD_MEMBER( pv2000_state, pv2000_cart ) return IMAGE_INIT_PASS; } -static const cassette_interface pv2000_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED), - NULL -}; - - /* Machine Drivers */ static MACHINE_CONFIG_START( pv2000, pv2000_state ) @@ -418,7 +409,8 @@ static MACHINE_CONFIG_START( pv2000, pv2000_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) /* cassette */ - MCFG_CASSETTE_ADD( "cassette", pv2000_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED) /* cartridge */ MCFG_CARTSLOT_ADD("cart") diff --git a/src/mess/drivers/px4.c b/src/mess/drivers/px4.c index e5b9f972b55..0c7f949246a 100644 --- a/src/mess/drivers/px4.c +++ b/src/mess/drivers/px4.c @@ -1359,14 +1359,6 @@ PALETTE_INIT_MEMBER(px4_state, px4p) // MACHINE DRIVERS //************************************************************************** -static const cassette_interface px4_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_PLAY | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_DISABLED), - NULL -}; - static MACHINE_CONFIG_START( px4, px4_state ) // basic machine hardware MCFG_CPU_ADD("maincpu", Z80, XTAL_7_3728MHz / 2) // uPD70008 @@ -1406,7 +1398,9 @@ static MACHINE_CONFIG_START( px4, px4_state ) MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics") // external cassette - MCFG_CASSETTE_ADD("extcas", px4_cassette_interface) + MCFG_CASSETTE_ADD("extcas") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_DISABLED) + MCFG_TIMER_DRIVER_ADD("extcas_timer", px4_state, ext_cassette_read) // sio port diff --git a/src/mess/drivers/px8.c b/src/mess/drivers/px8.c index 2c5eec7310b..cbe494cecf8 100644 --- a/src/mess/drivers/px8.c +++ b/src/mess/drivers/px8.c @@ -718,22 +718,6 @@ static GFXDECODE_START( px8 ) GFXDECODE_ENTRY( SED1320_TAG, 0x0000, px8_charlayout, 0, 1 ) GFXDECODE_END -/*************************************************************************** - DEVICE CONFIGURATION -***************************************************************************/ - -/*------------------------------------------------- - cassette_interface px8_cassette_interface --------------------------------------------------*/ - -static const cassette_interface px8_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED), - NULL -}; - /*************************************************************************** MACHINE INITIALIZATION ***************************************************************************/ @@ -811,7 +795,8 @@ static MACHINE_CONFIG_START( px8, px8_state ) /* devices */ MCFG_DEVICE_ADD(I8251_TAG, I8251, 0) - MCFG_CASSETTE_ADD("cassette", px8_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED) /* internal ram */ MCFG_RAM_ADD(RAM_TAG) diff --git a/src/mess/drivers/radio86.c b/src/mess/drivers/radio86.c index d5f5321ded8..42897b3d2fb 100644 --- a/src/mess/drivers/radio86.c +++ b/src/mess/drivers/radio86.c @@ -315,15 +315,6 @@ INPUT_PORTS_START( ms7007 ) PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2_PAD) PORT_CHAR(UCHAR_MAMEKEY(2_PAD)) INPUT_PORTS_END -static const cassette_interface radio86_cassette_interface = -{ - rkr_cassette_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED), - "radio86_cass" -}; - - /* F4 Character Displayer */ static const gfx_layout radio86_charlayout = { @@ -383,7 +374,11 @@ static MACHINE_CONFIG_START( radio86, radio86_state ) MCFG_I8257_OUT_IOW_2_CB(DEVWRITE8("i8275", i8275_device, dack_w)) MCFG_I8257_REVERSE_RW_MODE(1) - MCFG_CASSETTE_ADD( "cassette", radio86_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(rkr_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED) + MCFG_CASSETTE_INTERFACE("radio86_cass") + MCFG_SOFTWARE_LIST_ADD("cass_list","radio86") MACHINE_CONFIG_END diff --git a/src/mess/drivers/ravens.c b/src/mess/drivers/ravens.c index bdf2c366e35..85cb98a5446 100644 --- a/src/mess/drivers/ravens.c +++ b/src/mess/drivers/ravens.c @@ -338,7 +338,7 @@ static MACHINE_CONFIG_START( ravens, ravens_state ) MCFG_QUICKLOAD_ADD("quickload", ravens_state, ravens, "pgm", 1) /* cassette */ - MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) @@ -361,7 +361,7 @@ static MACHINE_CONFIG_START( ravens2, ravens_state ) MCFG_QUICKLOAD_ADD("quickload", ravens_state, ravens, "pgm", 1) /* cassette */ - MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) diff --git a/src/mess/drivers/rx78.c b/src/mess/drivers/rx78.c index e2950bca35e..b2b02ea0ff5 100644 --- a/src/mess/drivers/rx78.c +++ b/src/mess/drivers/rx78.c @@ -486,7 +486,7 @@ static MACHINE_CONFIG_START( rx78, rx78_state ) MCFG_RAM_DEFAULT_SIZE("32k") MCFG_RAM_EXTRA_OPTIONS("16k") - MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mess/drivers/samcoupe.c b/src/mess/drivers/samcoupe.c index 629bd30ab61..05cd93a6d45 100644 --- a/src/mess/drivers/samcoupe.c +++ b/src/mess/drivers/samcoupe.c @@ -516,14 +516,6 @@ PALETTE_INIT_MEMBER(samcoupe_state, samcoupe) MACHINE DRIVERS ***************************************************************************/ -static const cassette_interface samcoupe_cassette_interface = -{ - tzx_cassette_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED), - "samcoupe_cass" -}; - FLOPPY_FORMATS_MEMBER( samcoupe_state::floppy_formats ) FLOPPY_MGT_FORMAT FLOPPY_FORMATS_END @@ -562,7 +554,11 @@ static MACHINE_CONFIG_START( samcoupe, samcoupe_state ) MCFG_CENTRONICS_OUTPUT_LATCH_ADD("lpt2_data_out", "lpt2") MCFG_DEVICE_ADD("sambus_clock", MSM6242, XTAL_32_768kHz) - MCFG_CASSETTE_ADD("cassette", samcoupe_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_FORMATS(tzx_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED) + MCFG_CASSETTE_INTERFACE("samcoupe_cass") + MCFG_SOFTWARE_LIST_ADD("cass_list","samcoupe_cass") MCFG_WD1772x_ADD("wd1772", SAMCOUPE_XTAL_X1/3) diff --git a/src/mess/drivers/sg1000.c b/src/mess/drivers/sg1000.c index 2467d892a00..52a8a525d43 100644 --- a/src/mess/drivers/sg1000.c +++ b/src/mess/drivers/sg1000.c @@ -539,18 +539,6 @@ WRITE8_MEMBER( sc3000_state::ppi_pc_w ) /* TODO printer */ } -/*------------------------------------------------- - cassette_interface sc3000_cassette_interface --------------------------------------------------*/ - -const cassette_interface sc3000_cassette_interface = -{ - sc3000_cassette_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED), - "sc3000_cass" -}; - /*------------------------------------------------- I8255 INTERFACE -------------------------------------------------*/ @@ -811,7 +799,10 @@ static MACHINE_CONFIG_START( sc3000, sc3000_state ) // MCFG_PRINTER_ADD("sp400") /* serial printer */ - MCFG_CASSETTE_ADD("cassette", sc3000_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_FORMATS(sc3000_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED) + MCFG_CASSETTE_INTERFACE("sc3000_cass") /* cartridge */ MCFG_SC3000_CARTRIDGE_ADD(CARTSLOT_TAG, sg1000_cart, NULL) @@ -876,7 +867,10 @@ static MACHINE_CONFIG_START( sf7000, sf7000_state ) MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics") - MCFG_CASSETTE_ADD("cassette", sc3000_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_FORMATS(sc3000_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED) + MCFG_CASSETTE_INTERFACE("sc3000_cass") /* software lists */ MCFG_SOFTWARE_LIST_ADD("flop_list","sf7000") diff --git a/src/mess/drivers/sorcerer.c b/src/mess/drivers/sorcerer.c index 1e877226e87..ae19080fb33 100644 --- a/src/mess/drivers/sorcerer.c +++ b/src/mess/drivers/sorcerer.c @@ -386,14 +386,6 @@ UINT32 sorcerer_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap /**********************************************************************************************************/ -static const cassette_interface sorcerer_cassette_interface = -{ - sorcerer_cassette_formats, - NULL, - (cassette_state)(CASSETTE_PLAY | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED), - "sorcerer_cass" -}; - static const floppy_interface sorcerer_floppy_interface = { FLOPPY_STANDARD_8_SSSD, @@ -446,8 +438,15 @@ static MACHINE_CONFIG_START( sorcerer, sorcerer_state ) MCFG_SNAPSHOT_ADD("snapshot", sorcerer_state, sorcerer, "snp", 2) MCFG_QUICKLOAD_ADD("quickload", sorcerer_state, sorcerer, "bin", 3) - MCFG_CASSETTE_ADD( "cassette", sorcerer_cassette_interface ) - MCFG_CASSETTE_ADD( "cassette2", sorcerer_cassette_interface ) + 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") + + 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") /* cartridge */ MCFG_CARTSLOT_ADD("cart") diff --git a/src/mess/drivers/spc1000.c b/src/mess/drivers/spc1000.c index 03967cde7bc..09f7dd99952 100644 --- a/src/mess/drivers/spc1000.c +++ b/src/mess/drivers/spc1000.c @@ -297,14 +297,6 @@ static const ay8910_interface spc1000_ay_interface = DEVCB_NULL // portB_w }; -static const cassette_interface spc1000_cassette_interface = -{ - spc1000_cassette_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED), - NULL -}; - // irq is inverted in emulation, so we need this trampoline WRITE_LINE_MEMBER( spc1000_state::irq_w ) { @@ -346,7 +338,9 @@ static MACHINE_CONFIG_START( spc1000, spc1000_state ) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) - MCFG_CASSETTE_ADD( "cassette", spc1000_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(spc1000_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED) /* internal ram */ MCFG_RAM_ADD(RAM_TAG) diff --git a/src/mess/drivers/special.c b/src/mess/drivers/special.c index 4349c605e0d..ddd387ace34 100644 --- a/src/mess/drivers/special.c +++ b/src/mess/drivers/special.c @@ -342,14 +342,6 @@ static INPUT_PORTS_START( specimx ) PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) INPUT_PORTS_END -static const cassette_interface special_cassette_interface = -{ - rks_cassette_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED), - "special_cass" -}; - FLOPPY_FORMATS_MEMBER( special_state::specimx_floppy_formats ) FLOPPY_SMX_FORMAT FLOPPY_FORMATS_END @@ -393,7 +385,11 @@ static MACHINE_CONFIG_START( special, special_state ) MCFG_I8255_IN_PORTC_CB(READ8(special_state, specialist_8255_portc_r)) MCFG_I8255_OUT_PORTC_CB(WRITE8(special_state, specialist_8255_portc_w)) - MCFG_CASSETTE_ADD( "cassette", special_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(rks_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED) + MCFG_CASSETTE_INTERFACE("special_cass") + MCFG_SOFTWARE_LIST_ADD("cass_list","special_cass") MACHINE_CONFIG_END @@ -498,7 +494,10 @@ static MACHINE_CONFIG_START( erik, special_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) /* Devices */ - MCFG_CASSETTE_ADD( "cassette", special_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(rks_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED) + MCFG_CASSETTE_INTERFACE("special_cass") MCFG_DEVICE_ADD("ppi8255", I8255, 0) MCFG_I8255_IN_PORTA_CB(READ8(special_state, specialist_8255_porta_r)) diff --git a/src/mess/drivers/spectrum.c b/src/mess/drivers/spectrum.c index d99cdbcbe58..04dfda56b9c 100644 --- a/src/mess/drivers/spectrum.c +++ b/src/mess/drivers/spectrum.c @@ -648,14 +648,6 @@ INTERRUPT_GEN_MEMBER(spectrum_state::spec_interrupt) device.execute().set_input_line(0, HOLD_LINE); } -static const cassette_interface spectrum_cassette_interface = -{ - tzx_cassette_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED), - "spectrum_cass" -}; - DEVICE_IMAGE_LOAD_MEMBER( spectrum_state,spectrum_cart ) { UINT32 filesize; @@ -720,7 +712,11 @@ MACHINE_CONFIG_START( spectrum_common, spectrum_state ) /* devices */ MCFG_SNAPSHOT_ADD("snapshot", spectrum_state, spectrum, "ach,frz,plusd,prg,sem,sit,sna,snp,snx,sp,z80,zx", 0) MCFG_QUICKLOAD_ADD("quickload", spectrum_state, spectrum, "raw,scr", 2) // The delay prevents the screen from being cleared by the RAM test at boot - MCFG_CASSETTE_ADD( "cassette", spectrum_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(tzx_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED) + MCFG_CASSETTE_INTERFACE("spectrum_cass") + MCFG_SOFTWARE_LIST_ADD("cass_list","spectrum_cass") /* cartridge */ diff --git a/src/mess/drivers/super80.c b/src/mess/drivers/super80.c index 620788ea6bc..353ea9003c9 100644 --- a/src/mess/drivers/super80.c +++ b/src/mess/drivers/super80.c @@ -646,15 +646,6 @@ static const z80_daisy_config super80_daisy_chain[] = { NULL } }; -static const cassette_interface super80_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED), - NULL -}; - - //------------------------------------------------- // Z80DMA //------------------------------------------------- @@ -739,7 +730,9 @@ static MACHINE_CONFIG_START( super80, super80_state ) MCFG_QUICKLOAD_ADD("quickload", super80_state, super80, "bin", 3) /* cassette */ - MCFG_CASSETTE_ADD( "cassette", super80_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED) + MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_p", super80_state, timer_p, attotime::from_hz(40000)) // cass read MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_k", super80_state, timer_k, attotime::from_hz(300)) // keyb scan MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_h", super80_state, timer_h, attotime::from_hz(100)) // half-speed @@ -824,7 +817,9 @@ static MACHINE_CONFIG_START( super80v, super80_state ) MCFG_QUICKLOAD_ADD("quickload", super80_state, super80, "bin", 3) /* cassette */ - MCFG_CASSETTE_ADD( "cassette", super80_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED) + MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_p", super80_state, timer_p, attotime::from_hz(40000)) // cass read MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_k", super80_state, timer_k, attotime::from_hz(300)) // keyb scan MACHINE_CONFIG_END diff --git a/src/mess/drivers/svi318.c b/src/mess/drivers/svi318.c index 52ecb012ea3..0af55cfb21d 100644 --- a/src/mess/drivers/svi318.c +++ b/src/mess/drivers/svi318.c @@ -265,14 +265,6 @@ WRITE_LINE_MEMBER(svi318_state::vdp_interrupt) m_maincpu->set_input_line(0, (state ? HOLD_LINE : CLEAR_LINE)); } -static const cassette_interface svi318_cassette_interface = -{ - svi_cassette_formats, - NULL, - (cassette_state)(CASSETTE_PLAY), - "svi318_cass" -}; - static const floppy_interface svi318_floppy_interface = { FLOPPY_STANDARD_5_25_DSHD, @@ -333,7 +325,10 @@ static MACHINE_CONFIG_START( svi318, svi318_state ) MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics") - MCFG_CASSETTE_ADD( "cassette", svi318_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(svi_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY) + MCFG_CASSETTE_INTERFACE("svi318_cass") MCFG_FD1793_ADD("wd179x", svi_wd17xx_interface ) @@ -461,7 +456,10 @@ static MACHINE_CONFIG_START( svi328_806, svi318_state ) MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics") - MCFG_CASSETTE_ADD( "cassette", svi318_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(svi_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY) + MCFG_CASSETTE_INTERFACE("svi318_cass") MCFG_FD1793_ADD("wd179x", svi_wd17xx_interface ) diff --git a/src/mess/drivers/tavernie.c b/src/mess/drivers/tavernie.c index 511201e2ed1..f4146d927da 100644 --- a/src/mess/drivers/tavernie.c +++ b/src/mess/drivers/tavernie.c @@ -319,7 +319,7 @@ static MACHINE_CONFIG_START( cpu09, tavernie_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) /* Devices */ - MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) MCFG_DEVICE_ADD("pia", PIA6821, 0) MCFG_PIA_READPA_HANDLER(READ8(tavernie_state, pa_r)) diff --git a/src/mess/drivers/tec1.c b/src/mess/drivers/tec1.c index 7b36ae9234b..102a2a0602b 100644 --- a/src/mess/drivers/tec1.c +++ b/src/mess/drivers/tec1.c @@ -432,7 +432,7 @@ static MACHINE_CONFIG_START( tecjmon, tec1_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) /* Devices */ - MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) MACHINE_CONFIG_END diff --git a/src/mess/drivers/thomson.c b/src/mess/drivers/thomson.c index d3bd8dbc38d..2378c6262c3 100644 --- a/src/mess/drivers/thomson.c +++ b/src/mess/drivers/thomson.c @@ -592,23 +592,6 @@ static const floppy_interface thomson_floppy_interface = }; -/********************* devices ************************/ -const cassette_interface to7_cassette_interface = -{ - to7_cassette_formats, - NULL, - (cassette_state)(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED), - NULL -}; - -const cassette_interface mo5_cassette_interface = -{ - mo5_cassette_formats, - NULL, - (cassette_state)(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED), - NULL -}; - /* ------------ driver ------------ */ static MACHINE_CONFIG_START( to7, thomson_state ) @@ -645,7 +628,9 @@ static MACHINE_CONFIG_START( to7, thomson_state ) MCFG_SOUND_ROUTE( ALL_OUTPUTS, "mono", 1.) /* speech synthesis */ /* cassette */ - MCFG_CASSETTE_ADD( "cassette", to7_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(to7_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED) /* timer */ MCFG_DEVICE_ADD("mc6846", MC6846, 0) @@ -1098,7 +1083,8 @@ static MACHINE_CONFIG_DERIVED( mo5, to7 ) MCFG_CPU_MODIFY( "maincpu" ) MCFG_CPU_PROGRAM_MAP ( mo5) - MCFG_CASSETTE_MODIFY( "cassette", mo5_cassette_interface ) + MCFG_CASSETTE_MODIFY( "cassette" ) + MCFG_CASSETTE_FORMATS(mo5_cassette_formats) MCFG_DEVICE_REMOVE( "mc6846" ) @@ -2164,7 +2150,8 @@ static MACHINE_CONFIG_DERIVED( mo6, to7 ) MCFG_CPU_MODIFY( "maincpu" ) MCFG_CPU_PROGRAM_MAP ( mo6) - MCFG_CASSETTE_MODIFY( "cassette", mo5_cassette_interface ) + MCFG_CASSETTE_MODIFY( "cassette" ) + MCFG_CASSETTE_FORMATS(mo5_cassette_formats) MCFG_DEVICE_REMOVE( "mc6846" ) diff --git a/src/mess/drivers/ti99_4p.c b/src/mess/drivers/ti99_4p.c index 912cb63b577..73954554e2d 100644 --- a/src/mess/drivers/ti99_4p.c +++ b/src/mess/drivers/ti99_4p.c @@ -899,7 +899,7 @@ static MACHINE_CONFIG_START( ti99_4p_60hz, ti99_4p_state ) // Cassette drives MCFG_SPEAKER_STANDARD_MONO("cass_out") - MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "cass_out", 0.25) diff --git a/src/mess/drivers/ti99_4x.c b/src/mess/drivers/ti99_4x.c index 82b2c66986d..fff2de23de1 100644 --- a/src/mess/drivers/ti99_4x.c +++ b/src/mess/drivers/ti99_4x.c @@ -866,8 +866,8 @@ static MACHINE_CONFIG_START( ti99_4, ti99_4x_state ) /* Cassette drives */ MCFG_SPEAKER_STANDARD_MONO("cass_out") - MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) - MCFG_CASSETTE_ADD( "cassette2", default_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_ADD( "cassette2" ) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "cass_out", 0.25) @@ -965,8 +965,8 @@ static MACHINE_CONFIG_START( ti99_4a, ti99_4x_state ) /* Cassette drives */ MCFG_SPEAKER_STANDARD_MONO("cass_out") - MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) - MCFG_CASSETTE_ADD( "cassette2", default_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_ADD( "cassette2" ) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "cass_out", 0.25) @@ -1095,8 +1095,8 @@ static MACHINE_CONFIG_START( ti99_4ev_60hz, ti99_4x_state ) /* Cassette drives */ MCFG_SPEAKER_STANDARD_MONO("cass_out") - MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) - MCFG_CASSETTE_ADD( "cassette2", default_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_ADD( "cassette2" ) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "cass_out", 0.25) diff --git a/src/mess/drivers/ti99_8.c b/src/mess/drivers/ti99_8.c index cb8f432ecb0..3a57c9a6769 100644 --- a/src/mess/drivers/ti99_8.c +++ b/src/mess/drivers/ti99_8.c @@ -1009,7 +1009,7 @@ static MACHINE_CONFIG_START( ti99_8, ti99_8_state ) /* Cassette drives */ MCFG_SPEAKER_STANDARD_MONO("cass_out") - MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "cass_out", 0.25) diff --git a/src/mess/drivers/tiki100.c b/src/mess/drivers/tiki100.c index 5ae8d18d1d6..98c8dcc4abd 100644 --- a/src/mess/drivers/tiki100.c +++ b/src/mess/drivers/tiki100.c @@ -598,23 +598,12 @@ static const z80_daisy_config tiki100_daisy_chain[] = }; -//------------------------------------------------- -// cassette_interface cassette_intf -//------------------------------------------------- TIMER_DEVICE_CALLBACK_MEMBER( tiki100_state::tape_tick ) { m_pio->port_b_write((m_cassette->input() > 0.0) << 7); } -static const cassette_interface cassette_intf = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED), - NULL -}; - /* Machine Start */ void tiki100_state::machine_start() @@ -716,7 +705,9 @@ static MACHINE_CONFIG_START( tiki100, tiki100_state ) MCFG_DEVICE_ADD("cent_data_in", INPUT_BUFFER, 0) MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG) - MCFG_CASSETTE_ADD(CASSETTE_TAG, cassette_intf) + MCFG_CASSETTE_ADD(CASSETTE_TAG) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED) + MCFG_TIMER_DRIVER_ADD_PERIODIC("tape", tiki100_state, tape_tick, attotime::from_hz(44100)) /* sound hardware */ diff --git a/src/mess/drivers/tm990189.c b/src/mess/drivers/tm990189.c index 1a7c2da3a13..19fc4d324e1 100644 --- a/src/mess/drivers/tm990189.c +++ b/src/mess/drivers/tm990189.c @@ -826,7 +826,7 @@ static MACHINE_CONFIG_START( tm990_189, tm990189_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) /* Devices */ - MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) MCFG_DEVICE_ADD(TMS9901_0_TAG, TMS9901, 2000000) MCFG_TMS9901_P0_HANDLER( WRITELINE( tm990189_state, usr9901_led0_w) ) @@ -887,7 +887,7 @@ static MACHINE_CONFIG_START( tm990_189_v, tm990189_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) /* Devices */ - MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) MCFG_DEVICE_ADD(TMS9901_0_TAG, TMS9901, 2000000) MCFG_TMS9901_P0_HANDLER( WRITELINE( tm990189_state, usr9901_led0_w) ) MCFG_TMS9901_P1_HANDLER( WRITELINE( tm990189_state, usr9901_led1_w) ) diff --git a/src/mess/drivers/tmc1800.c b/src/mess/drivers/tmc1800.c index 9c95988fe5e..9e2906ab171 100644 --- a/src/mess/drivers/tmc1800.c +++ b/src/mess/drivers/tmc1800.c @@ -695,14 +695,6 @@ void nano_state::machine_reset() /* Machine Drivers */ -static const cassette_interface tmc1800_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED), - NULL -}; - QUICKLOAD_LOAD_MEMBER( tmc1800_base_state, tmc1800 ) { UINT8 *ptr = m_rom->base(); @@ -741,7 +733,8 @@ static MACHINE_CONFIG_START( tmc1800, tmc1800_state ) // devices MCFG_QUICKLOAD_ADD("quickload", tmc1800_base_state, tmc1800, "bin", 0) - MCFG_CASSETTE_ADD( "cassette", tmc1800_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED) // internal ram MCFG_RAM_ADD(RAM_TAG) @@ -771,7 +764,8 @@ static MACHINE_CONFIG_START( osc1000b, osc1000b_state ) // devices MCFG_QUICKLOAD_ADD("quickload", tmc1800_base_state, tmc1800, "bin", 0) - MCFG_CASSETTE_ADD( "cassette", tmc1800_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED) // internal ram MCFG_RAM_ADD(RAM_TAG) @@ -796,7 +790,8 @@ static MACHINE_CONFIG_START( tmc2000, tmc2000_state ) // devices MCFG_QUICKLOAD_ADD("quickload", tmc1800_base_state, tmc1800, "bin", 0) - MCFG_CASSETTE_ADD( "cassette", tmc1800_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED) // internal ram MCFG_RAM_ADD(RAM_TAG) @@ -821,7 +816,8 @@ static MACHINE_CONFIG_START( nano, nano_state ) // devices MCFG_QUICKLOAD_ADD("quickload", tmc1800_base_state, tmc1800, "bin", 0) - MCFG_CASSETTE_ADD( "cassette", tmc1800_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED) // internal ram MCFG_RAM_ADD(RAM_TAG) diff --git a/src/mess/drivers/tmc2000e.c b/src/mess/drivers/tmc2000e.c index 03f237c7684..343ee46a335 100644 --- a/src/mess/drivers/tmc2000e.c +++ b/src/mess/drivers/tmc2000e.c @@ -282,14 +282,6 @@ void tmc2000e_state::machine_reset() /* Machine Drivers */ -static const cassette_interface tmc2000_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED), - NULL -}; - static MACHINE_CONFIG_START( tmc2000e, tmc2000e_state ) // basic system hardware MCFG_CPU_ADD(CDP1802_TAG, CDP1802, XTAL_1_75MHz) @@ -313,7 +305,8 @@ static MACHINE_CONFIG_START( tmc2000e, tmc2000e_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) /* devices */ - MCFG_CASSETTE_ADD("cassette", tmc2000_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED) /* internal ram */ MCFG_RAM_ADD(RAM_TAG) diff --git a/src/mess/drivers/tmc600.c b/src/mess/drivers/tmc600.c index ae772dfdf8b..a50d67264e9 100644 --- a/src/mess/drivers/tmc600.c +++ b/src/mess/drivers/tmc600.c @@ -252,14 +252,6 @@ void tmc600_state::machine_start() /* Machine Drivers */ -static const cassette_interface tmc600_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED), - NULL -}; - static MACHINE_CONFIG_START( tmc600, tmc600_state ) // basic system hardware MCFG_CPU_ADD(CDP1802_TAG, CDP1802, 3579545) // ??? @@ -279,7 +271,8 @@ static MACHINE_CONFIG_START( tmc600, tmc600_state ) MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG) - MCFG_CASSETTE_ADD("cassette", tmc600_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED) /* internal ram */ MCFG_RAM_ADD(RAM_TAG) diff --git a/src/mess/drivers/trs80.c b/src/mess/drivers/trs80.c index 24e1599a90d..93fbef23873 100644 --- a/src/mess/drivers/trs80.c +++ b/src/mess/drivers/trs80.c @@ -545,14 +545,6 @@ static GFXDECODE_START(meritum) GFXDECODE_END -static const cassette_interface trs80l2_cassette_interface = -{ - trs80l2_cassette_formats, - NULL, - (cassette_state)(CASSETTE_PLAY), - NULL -}; - static const floppy_interface trs80_floppy_interface = { FLOPPY_STANDARD_5_25_DSHD, @@ -588,7 +580,7 @@ static MACHINE_CONFIG_START( trs80, trs80_state ) // the original model I, MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) /* devices */ - MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( model1, trs80 ) // model I, level II @@ -598,7 +590,10 @@ static MACHINE_CONFIG_DERIVED( model1, trs80 ) // model I, level II MCFG_CPU_PERIODIC_INT_DRIVER(trs80_state, trs80_rtc_interrupt, 40) /* devices */ - MCFG_CASSETTE_MODIFY( "cassette", trs80l2_cassette_interface ) + MCFG_CASSETTE_MODIFY( "cassette" ) + MCFG_CASSETTE_FORMATS(trs80l2_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY) + MCFG_QUICKLOAD_ADD("quickload", trs80_state, trs80_cmd, "cmd", 0.5) MCFG_FD1793_ADD("wd179x", trs80_wd17xx_interface ) // should be FD1771 or FD1791 but inverted data lines are too tricky to fix now MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(trs80_floppy_interface) diff --git a/src/mess/drivers/tutor.c b/src/mess/drivers/tutor.c index fee8b0997b3..c3aa7eea127 100644 --- a/src/mess/drivers/tutor.c +++ b/src/mess/drivers/tutor.c @@ -773,7 +773,7 @@ static MACHINE_CONFIG_START( tutor, tutor_state ) MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics") - MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) /* cartridge */ MCFG_CARTSLOT_ADD("cart") diff --git a/src/mess/drivers/tvc.c b/src/mess/drivers/tvc.c index 89a23b2468d..eb8baf255d1 100644 --- a/src/mess/drivers/tvc.c +++ b/src/mess/drivers/tvc.c @@ -632,14 +632,6 @@ QUICKLOAD_LOAD_MEMBER( tvc_state,tvc64) } -static const cassette_interface tvc_cassette_interface = -{ - tvc64_cassette_formats, - NULL, - (cassette_state)(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED), - "tvc_cass" -}; - extern SLOT_INTERFACE_START(tvc_exp) SLOT_INTERFACE("hbf", TVC_HBF) // Videoton HBF floppy interface SLOT_INTERFACE_END @@ -709,7 +701,10 @@ static MACHINE_CONFIG_START( tvc, tvc_state ) MCFG_TVCEXP_SLOT_OUT_NMI_CB(INPUTLINE("maincpu", INPUT_LINE_NMI)) /* cassette */ - MCFG_CASSETTE_ADD( "cassette", tvc_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(tvc64_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED) + MCFG_CASSETTE_INTERFACE("tvc_cass") /* quickload */ MCFG_QUICKLOAD_ADD("quickload", tvc_state, tvc64, "cas", 6) diff --git a/src/mess/drivers/ut88.c b/src/mess/drivers/ut88.c index 8e5e3695fd8..b79fb2e4472 100644 --- a/src/mess/drivers/ut88.c +++ b/src/mess/drivers/ut88.c @@ -175,14 +175,6 @@ static INPUT_PORTS_START( ut88mini ) PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Backspace") PORT_CODE(KEYCODE_BACKSPACE) INPUT_PORTS_END -static const cassette_interface ut88_cassette_interface = -{ - rku_cassette_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED), - "ut88_cass" -}; - /* Machine driver */ static MACHINE_CONFIG_START( ut88, ut88_state ) /* basic machine hardware */ @@ -217,7 +209,11 @@ static MACHINE_CONFIG_START( ut88, ut88_state ) MCFG_I8255_IN_PORTB_CB(READ8(ut88_state, ut88_8255_portb_r)) MCFG_I8255_IN_PORTC_CB(READ8(ut88_state, ut88_8255_portc_r)) - MCFG_CASSETTE_ADD( "cassette", ut88_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(rku_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED) + MCFG_CASSETTE_INTERFACE("ut88_cass") + MCFG_SOFTWARE_LIST_ADD("cass_list","ut88") MACHINE_CONFIG_END @@ -236,7 +232,12 @@ static MACHINE_CONFIG_START( ut88mini, ut88_state ) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) - MCFG_CASSETTE_ADD( "cassette", ut88_cassette_interface ) + + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(rku_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED) + MCFG_CASSETTE_INTERFACE("ut88_cass") + MCFG_SOFTWARE_LIST_ADD("cass_list","ut88") MACHINE_CONFIG_END diff --git a/src/mess/drivers/vc4000.c b/src/mess/drivers/vc4000.c index 36c3bdf5f0e..1acda2a524f 100644 --- a/src/mess/drivers/vc4000.c +++ b/src/mess/drivers/vc4000.c @@ -450,7 +450,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( elektor, vc4000 ) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(elektor_mem) - MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) MACHINE_CONFIG_END diff --git a/src/mess/drivers/vector06.c b/src/mess/drivers/vector06.c index 6a9dbc54971..e536e9b1844 100644 --- a/src/mess/drivers/vector06.c +++ b/src/mess/drivers/vector06.c @@ -119,14 +119,6 @@ static INPUT_PORTS_START( vector06 ) INPUT_PORTS_END -static const cassette_interface vector_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED), - NULL -}; - static LEGACY_FLOPPY_OPTIONS_START(vector) LEGACY_FLOPPY_OPTION(vector, "fdd", "Vector disk image", basicdsk_identify_default, basicdsk_construct_default, NULL, HEADS([2]) @@ -189,7 +181,8 @@ static MACHINE_CONFIG_START( vector06, vector06_state ) MCFG_I8255_IN_PORTB_CB(READ8(vector06_state, vector06_romdisk_portb_r)) MCFG_I8255_OUT_PORTC_CB(WRITE8(vector06_state, vector06_romdisk_portc_w)) - MCFG_CASSETTE_ADD("cassette", vector_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED) MCFG_FD1793_ADD("wd1793", vector06_wd17xx_interface) MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(vector_floppy_interface) diff --git a/src/mess/drivers/vg5k.c b/src/mess/drivers/vg5k.c index 7459c486e8d..aa8fad02568 100644 --- a/src/mess/drivers/vg5k.c +++ b/src/mess/drivers/vg5k.c @@ -351,15 +351,6 @@ DRIVER_INIT_MEMBER(vg5k_state,vg5k) } -static const cassette_interface vg5k_cassette_interface = -{ - vg5k_cassette_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MASK_SPEAKER), - "vg5k_cass" -}; - - static MACHINE_CONFIG_START( vg5k, vg5k_state ) /* basic machine hardware */ @@ -394,7 +385,10 @@ static MACHINE_CONFIG_START( vg5k, vg5k_state ) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(0, "mono", 0.25) - MCFG_CASSETTE_ADD( "cassette", vg5k_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(vg5k_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MASK_SPEAKER) + MCFG_CASSETTE_INTERFACE("vg5k_cass") /* printer */ MCFG_DEVICE_ADD("printer", PRINTER, 0) diff --git a/src/mess/drivers/vip.c b/src/mess/drivers/vip.c index 3adb4eba173..45bd0cf06cd 100644 --- a/src/mess/drivers/vip.c +++ b/src/mess/drivers/vip.c @@ -558,19 +558,6 @@ static DISCRETE_SOUND_START( vip ) DISCRETE_SOUND_END -//------------------------------------------------- -// cassette_interface vip_cassette_interface -//------------------------------------------------- - -static const cassette_interface vip_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED), - "vip_cass" -}; - - //------------------------------------------------- // VIP_BYTEIO_PORT_INTERFACE( byteio_intf ) //------------------------------------------------- @@ -759,7 +746,9 @@ static MACHINE_CONFIG_START( vip, vip_state ) // devices MCFG_QUICKLOAD_ADD("quickload", vip_state, vip, "bin,c8,c8x", 0) - MCFG_CASSETTE_ADD("cassette", vip_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED) + MCFG_CASSETTE_INTERFACE("vip_cass") // software lists MCFG_SOFTWARE_LIST_ADD("cass_list", "vip") diff --git a/src/mess/drivers/vtech1.c b/src/mess/drivers/vtech1.c index 0246b366058..497b3af1ba6 100644 --- a/src/mess/drivers/vtech1.c +++ b/src/mess/drivers/vtech1.c @@ -887,14 +887,6 @@ static const speaker_interface vtech1_speaker_interface = speaker_levels }; -static const cassette_interface laser_cassette_interface = -{ - vtech1_cassette_formats, - NULL, - (cassette_state)(CASSETTE_PLAY), - NULL -}; - static const mc6847_interface vtech1_mc6847_bw_intf = { "screen", @@ -975,7 +967,9 @@ static MACHINE_CONFIG_START( laser110, vtech1_state ) /* snapshot/quickload */ MCFG_SNAPSHOT_ADD("snapshot", vtech1_state, vtech1, "vz", 1.5) - MCFG_CASSETTE_ADD( "cassette", laser_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(vtech1_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY) /* cartridge */ MCFG_CARTSLOT_ADD("cart") diff --git a/src/mess/drivers/vtech2.c b/src/mess/drivers/vtech2.c index d437a5bfe9f..8ac4736d870 100644 --- a/src/mess/drivers/vtech2.c +++ b/src/mess/drivers/vtech2.c @@ -401,14 +401,6 @@ INTERRUPT_GEN_MEMBER(vtech2_state::vtech2_interrupt) m_maincpu->set_input_line(0, HOLD_LINE); } -static const cassette_interface laser_cassette_interface = -{ - vtech2_cassette_formats, - NULL, - (cassette_state)(CASSETTE_PLAY), - NULL -}; - static const floppy_interface vtech2_floppy_interface = { FLOPPY_STANDARD_5_25_SSDD_40, @@ -447,7 +439,9 @@ static MACHINE_CONFIG_START( laser350, vtech2_state ) MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) - MCFG_CASSETTE_ADD( "cassette", laser_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(vtech2_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY) /* cartridge */ MCFG_CARTSLOT_ADD("cart") diff --git a/src/mess/drivers/x07.c b/src/mess/drivers/x07.c index a39fff34248..128b0b7878a 100644 --- a/src/mess/drivers/x07.c +++ b/src/mess/drivers/x07.c @@ -1457,14 +1457,6 @@ void x07_state::machine_reset() m_maincpu->set_state_int(Z80_PC, 0xc3c3); } -static const cassette_interface x07_cassette_interface = -{ - x07_cassette_formats, - NULL, - (cassette_state)(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED), - "x07_cass" -}; - static MACHINE_CONFIG_START( x07, x07_state ) /* basic machine hardware */ @@ -1519,7 +1511,10 @@ static MACHINE_CONFIG_START( x07, x07_state ) MCFG_CARTSLOT_INTERFACE("x07_card") /* cassette */ - MCFG_CASSETTE_ADD( "cassette", x07_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(x07_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED) + MCFG_CASSETTE_INTERFACE("x07_cass") /* Software lists */ MCFG_SOFTWARE_LIST_ADD("card_list", "x07_card") diff --git a/src/mess/drivers/x1.c b/src/mess/drivers/x1.c index fdc3e534c7d..379cc4eb29d 100644 --- a/src/mess/drivers/x1.c +++ b/src/mess/drivers/x1.c @@ -2259,22 +2259,6 @@ static const ay8910_interface ay8910_config = }; // (ym-2151 handler here) - -/************************************* - * - * Cassette configuration - * - *************************************/ - -static const cassette_interface x1_cassette_interface = -{ - x1_cassette_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED), - "x1_cass" -}; - - /************************************* * * Machine Functions @@ -2543,7 +2527,11 @@ static MACHINE_CONFIG_START( x1, x1_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.25) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.10) - MCFG_CASSETTE_ADD("cassette",x1_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_FORMATS(x1_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED) + MCFG_CASSETTE_INTERFACE("x1_cass") + MCFG_SOFTWARE_LIST_ADD("cass_list","x1_cass") MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(x1_floppy_interface) diff --git a/src/mess/drivers/x1twin.c b/src/mess/drivers/x1twin.c index d0797e0c68e..fcd53de111f 100644 --- a/src/mess/drivers/x1twin.c +++ b/src/mess/drivers/x1twin.c @@ -412,13 +412,6 @@ static const ay8910_interface ay8910_config = DEVCB_NULL }; -static const cassette_interface x1_cassette_interface = -{ - x1_cassette_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED), - "x1_cass" -}; static LEGACY_FLOPPY_OPTIONS_START( x1 ) LEGACY_FLOPPY_OPTION( img2d, "2d", "2D disk image", basicdsk_identify_default, basicdsk_construct_default, NULL, @@ -521,7 +514,11 @@ static MACHINE_CONFIG_START( x1twin, x1twin_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "x1_l", 0.25) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "x1_r", 0.10) - MCFG_CASSETTE_ADD("cassette",x1_cassette_interface) + MCFG_CASSETTE_ADD("cassette") + MCFG_CASSETTE_FORMATS(x1_cassette_formats) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED) + MCFG_CASSETTE_INTERFACE("x1_cass") + MCFG_SOFTWARE_LIST_ADD("cass_list","x1_cass") MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(x1_floppy_interface) diff --git a/src/mess/drivers/z1013.c b/src/mess/drivers/z1013.c index e05d7d3758b..2c282d399c4 100644 --- a/src/mess/drivers/z1013.c +++ b/src/mess/drivers/z1013.c @@ -361,15 +361,6 @@ static GFXDECODE_START( z1013 ) GFXDECODE_ENTRY( "chargen", 0x0000, z1013_charlayout, 0, 1 ) GFXDECODE_END -static const cassette_interface z1013_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED), - NULL -}; - - /* Machine driver */ static MACHINE_CONFIG_START( z1013, z1013_state ) /* basic machine hardware */ @@ -399,7 +390,9 @@ static MACHINE_CONFIG_START( z1013, z1013_state ) MCFG_Z80PIO_IN_PB_CB(READ8(z1013_state, port_b_r)) MCFG_Z80PIO_OUT_PB_CB(WRITE8(z1013_state, port_b_w)) - MCFG_CASSETTE_ADD( "cassette", z1013_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED) + MCFG_SNAPSHOT_ADD("snapshot", z1013_state, z1013, "z80", 0) MACHINE_CONFIG_END diff --git a/src/mess/drivers/z80ne.c b/src/mess/drivers/z80ne.c index c8ccba0da41..97306ee0ca8 100644 --- a/src/mess/drivers/z80ne.c +++ b/src/mess/drivers/z80ne.c @@ -400,22 +400,6 @@ static const UINT32 lx388palette[] = rgb_t(0xff, 0xc4, 0x18) /* ALPHANUMERIC BRIGHT ORANGE */ }; -static const cassette_interface z80ne_cassettea_config = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED), - NULL -}; - -static const cassette_interface z80ne_cassetteb_config = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED), - NULL -}; - static const floppy_interface z80netf_floppy_interface = { FLOPPY_STANDARD_5_25_DSHD, @@ -451,8 +435,11 @@ static MACHINE_CONFIG_START( z80ne, z80ne_state ) MCFG_AY31015_TX_CLOCK(4800.0) MCFG_AY31015_RX_CLOCK(4800.0) - MCFG_CASSETTE_ADD( "cassette", z80ne_cassettea_config ) - MCFG_CASSETTE_ADD( "cassette2", z80ne_cassetteb_config ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED) + + MCFG_CASSETTE_ADD( "cassette2" ) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED) MCFG_DEFAULT_LAYOUT(layout_z80ne) @@ -497,8 +484,11 @@ static MACHINE_CONFIG_START( z80netb, z80ne_state ) MCFG_AY31015_TX_CLOCK(4800.0) MCFG_AY31015_RX_CLOCK(4800.0) - MCFG_CASSETTE_ADD( "cassette", z80ne_cassettea_config ) - MCFG_CASSETTE_ADD( "cassette2", z80ne_cassetteb_config ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED) + + MCFG_CASSETTE_ADD( "cassette2" ) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED) MCFG_DEVICE_ADD("lx388_kr2376", KR2376, 50000) @@ -527,8 +517,11 @@ static MACHINE_CONFIG_START( z80netf, z80ne_state ) MCFG_AY31015_TX_CLOCK(4800.0) MCFG_AY31015_RX_CLOCK(4800.0) - MCFG_CASSETTE_ADD( "cassette", z80ne_cassettea_config ) - MCFG_CASSETTE_ADD( "cassette2", z80ne_cassetteb_config ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED) + + MCFG_CASSETTE_ADD( "cassette2" ) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED) MCFG_DEVICE_ADD("lx388_kr2376", KR2376, 50000) diff --git a/src/mess/drivers/z9001.c b/src/mess/drivers/z9001.c index 40b8d92aa58..e1ccc82c7b8 100644 --- a/src/mess/drivers/z9001.c +++ b/src/mess/drivers/z9001.c @@ -244,7 +244,7 @@ static MACHINE_CONFIG_START( z9001, z9001_state ) MCFG_Z80CTC_ZC0_CB(WRITELINE(z9001_state, cass_w)) MCFG_Z80CTC_ZC2_CB(DEVWRITELINE("z80ctc", z80ctc_device, trg3)) - MCFG_CASSETTE_ADD( "cassette", default_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) MACHINE_CONFIG_END /* ROM definition */ diff --git a/src/mess/drivers/zx.c b/src/mess/drivers/zx.c index 122041693c9..f6ce222a3b9 100644 --- a/src/mess/drivers/zx.c +++ b/src/mess/drivers/zx.c @@ -357,23 +357,6 @@ PALETTE_INIT_MEMBER(zx_state,ts1000) /* Machine Drivers */ -static const cassette_interface zx80_cassette_interface = -{ - zx80_o_format, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED), - NULL -}; - -static const cassette_interface zx81_cassette_interface = -{ - zx81_p_format, - NULL, - (cassette_state)(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED), - NULL -}; - - static MACHINE_CONFIG_START( zx80, zx_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, ZX81_CPU_CLOCK) @@ -402,7 +385,9 @@ static MACHINE_CONFIG_START( zx80, zx_state ) MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) - MCFG_CASSETTE_ADD( "cassette", zx80_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_FORMATS(zx80_o_format) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED) /* internal ram */ MCFG_RAM_ADD(RAM_TAG) @@ -417,7 +402,8 @@ static MACHINE_CONFIG_DERIVED( zx81, zx80 ) MCFG_GFXDECODE_MODIFY("gfxdecode", zx81) - MCFG_CASSETTE_MODIFY( "cassette", zx81_cassette_interface ) + MCFG_CASSETTE_MODIFY( "cassette" ) + MCFG_CASSETTE_FORMATS(zx81_p_format) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( ts1000, zx81 ) diff --git a/src/mess/includes/coco.h b/src/mess/includes/coco.h index 065c628c3e5..7e8ed6ba347 100644 --- a/src/mess/includes/coco.h +++ b/src/mess/includes/coco.h @@ -97,7 +97,6 @@ public: optional_device m_vhd_1; static const cococart_interface cartridge_config; - static const cassette_interface coco_cassette_interface; // driver update handlers DECLARE_INPUT_CHANGED_MEMBER(keyboard_changed); diff --git a/src/mess/includes/sg1000.h b/src/mess/includes/sg1000.h index 863af3e0754..3590d023dad 100644 --- a/src/mess/includes/sg1000.h +++ b/src/mess/includes/sg1000.h @@ -35,7 +35,6 @@ INPUT_PORTS_EXTERN( sk1100 ); -extern const cassette_interface sc3000_cassette_interface; class sg1000_state : public driver_device { diff --git a/src/mess/machine/coco.c b/src/mess/machine/coco.c index 2a9ec8143b5..19fa5fd1b12 100644 --- a/src/mess/machine/coco.c +++ b/src/mess/machine/coco.c @@ -57,7 +57,6 @@ DAC and bitbanger values written should be reflected in the read. #include "includes/coco.h" #include "cpu/m6809/m6809.h" -#include "formats/coco_cas.h" #include "debug/debugcpu.h" @@ -1199,19 +1198,6 @@ const cococart_interface coco_state::cartridge_config = }; -//------------------------------------------------- -// coco_cassette_interface -//------------------------------------------------- - -const cassette_interface coco_state::coco_cassette_interface = -{ - coco_cassette_formats, - NULL, - (cassette_state)(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED), - NULL -}; - - /*************************************************************************** DISASSEMBLY OVERRIDE (OS9 syscalls) diff --git a/src/mess/machine/genpc.c b/src/mess/machine/genpc.c index aacc89b7686..7c5139b4d1d 100644 --- a/src/mess/machine/genpc.c +++ b/src/mess/machine/genpc.c @@ -600,21 +600,14 @@ const device_type IBM5150_MOTHERBOARD = &device_creator; //************************************************************************** // DEVICE CONFIGURATION //************************************************************************** -static const cassette_interface ibm5150_cassette_interface = -{ - cassette_default_formats, - NULL, - (cassette_state)(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED), - NULL -}; - static MACHINE_CONFIG_FRAGMENT( ibm5150_mb_config ) MCFG_FRAGMENT_ADD(ibm5160_mb_config) MCFG_DEVICE_MODIFY("pc_kbdc") MCFG_PC_KBDC_OUT_CLOCK_CB(WRITELINE(ibm5150_mb_device, keyboard_clock_w)) - MCFG_CASSETTE_ADD( "cassette", ibm5150_cassette_interface ) + MCFG_CASSETTE_ADD( "cassette" ) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED) MACHINE_CONFIG_END