src/mess/machine/a2sam.c
| r0 | r15266 | |
| 1 | /********************************************************************* |
| 2 | |
| 3 | a2sam.c |
| 4 | |
| 5 | Implementation of the S.A.M. "Software Automated Mouth" card |
| 6 | |
| 7 | *********************************************************************/ |
| 8 | |
| 9 | #include "a2sam.h" |
| 10 | #include "includes/apple2.h" |
| 11 | #include "sound/dac.h" |
| 12 | |
| 13 | /*************************************************************************** |
| 14 | PARAMETERS |
| 15 | ***************************************************************************/ |
| 16 | |
| 17 | //************************************************************************** |
| 18 | // GLOBAL VARIABLES |
| 19 | //************************************************************************** |
| 20 | |
| 21 | const device_type A2BUS_SAM = &device_creator<a2bus_sam_device>; |
| 22 | |
| 23 | #define DAC_TAG "dac" |
| 24 | |
| 25 | MACHINE_CONFIG_FRAGMENT( a2sam ) |
| 26 | MCFG_SPEAKER_STANDARD_MONO("samspkr") |
| 27 | MCFG_SOUND_ADD(DAC_TAG, DAC, 0) |
| 28 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "samspkr", 1.00) |
| 29 | MACHINE_CONFIG_END |
| 30 | |
| 31 | /*************************************************************************** |
| 32 | FUNCTION PROTOTYPES |
| 33 | ***************************************************************************/ |
| 34 | |
| 35 | //------------------------------------------------- |
| 36 | // machine_config_additions - device-specific |
| 37 | // machine configurations |
| 38 | //------------------------------------------------- |
| 39 | |
| 40 | machine_config_constructor a2bus_sam_device::device_mconfig_additions() const |
| 41 | { |
| 42 | return MACHINE_CONFIG_NAME( a2sam ); |
| 43 | } |
| 44 | |
| 45 | //************************************************************************** |
| 46 | // LIVE DEVICE |
| 47 | //************************************************************************** |
| 48 | |
| 49 | a2bus_sam_device::a2bus_sam_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock) : |
| 50 | device_t(mconfig, type, name, tag, owner, clock), |
| 51 | device_a2bus_card_interface(mconfig, *this), |
| 52 | m_dac(*this, DAC_TAG) |
| 53 | { |
| 54 | m_shortname = "a2sam"; |
| 55 | } |
| 56 | |
| 57 | a2bus_sam_device::a2bus_sam_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
| 58 | device_t(mconfig, A2BUS_SAM, "Don't Ask Software SAM", tag, owner, clock), |
| 59 | device_a2bus_card_interface(mconfig, *this), |
| 60 | m_dac(*this, DAC_TAG) |
| 61 | { |
| 62 | m_shortname = "a2sam"; |
| 63 | } |
| 64 | |
| 65 | //------------------------------------------------- |
| 66 | // device_start - device-specific startup |
| 67 | //------------------------------------------------- |
| 68 | |
| 69 | void a2bus_sam_device::device_start() |
| 70 | { |
| 71 | // set_a2bus_device makes m_slot valid |
| 72 | set_a2bus_device(); |
| 73 | } |
| 74 | |
| 75 | void a2bus_sam_device::device_reset() |
| 76 | { |
| 77 | } |
| 78 | |
| 79 | void a2bus_sam_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data) |
| 80 | { |
| 81 | dac_data_w(m_dac, data); |
| 82 | } |
| 83 | |
| 84 | bool a2bus_sam_device::take_c800() |
| 85 | { |
| 86 | return false; |
| 87 | } |
| 88 | |
src/mess/machine/a2sam.h
| r0 | r15266 | |
| 1 | /********************************************************************* |
| 2 | |
| 3 | a2sam.h |
| 4 | |
| 5 | Implementation of the S.A.M. "Software Automated Mouth" card |
| 6 | |
| 7 | *********************************************************************/ |
| 8 | |
| 9 | #ifndef __A2BUS_SAM__ |
| 10 | #define __A2BUS_SAM__ |
| 11 | |
| 12 | #include "emu.h" |
| 13 | #include "machine/a2bus.h" |
| 14 | |
| 15 | //************************************************************************** |
| 16 | // TYPE DEFINITIONS |
| 17 | //************************************************************************** |
| 18 | |
| 19 | class a2bus_sam_device: |
| 20 | public device_t, |
| 21 | public device_a2bus_card_interface |
| 22 | { |
| 23 | public: |
| 24 | // construction/destruction |
| 25 | a2bus_sam_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock); |
| 26 | a2bus_sam_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 27 | |
| 28 | // optional information overrides |
| 29 | virtual machine_config_constructor device_mconfig_additions() const; |
| 30 | |
| 31 | required_device<device_t> m_dac; |
| 32 | |
| 33 | protected: |
| 34 | virtual void device_start(); |
| 35 | virtual void device_reset(); |
| 36 | |
| 37 | // overrides of standard a2bus slot functions |
| 38 | virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data); |
| 39 | virtual bool take_c800(); |
| 40 | }; |
| 41 | |
| 42 | // device type definition |
| 43 | extern const device_type A2BUS_SAM; |
| 44 | |
| 45 | #endif /* __A2BUS_SAM__ */ |
| 46 | |
src/mess/drivers/apple2.c
| r15265 | r15266 | |
| 205 | 205 | #include "machine/a2ssc.h" |
| 206 | 206 | #include "machine/a2swyft.h" |
| 207 | 207 | #include "machine/a2themill.h" |
| 208 | #include "machine/a2sam.h" |
| 208 | 209 | |
| 209 | 210 | /*************************************************************************** |
| 210 | 211 | PARAMETERS |
| r15265 | r15266 | |
| 621 | 622 | SLOT_INTERFACE("ssc", A2BUS_SSC) /* Apple Super Serial Card */ |
| 622 | 623 | SLOT_INTERFACE("swyft", A2BUS_SWYFT) /* IAI SwyftCard */ |
| 623 | 624 | SLOT_INTERFACE("themill", A2BUS_THEMILL) /* Stellation Two The Mill (6809 card) */ |
| 625 | SLOT_INTERFACE("sam", A2BUS_SAM) /* SAM Software Automated Mouth (8-bit DAC + speaker) */ |
| 624 | 626 | // SLOT_INTERFACE("scsi", A2BUS_SCSI) /* Apple II SCSI Card */ |
| 625 | 627 | SLOT_INTERFACE_END |
| 626 | 628 | |
| r15265 | r15266 | |
| 723 | 725 | |
| 724 | 726 | MACHINE_CONFIG_END |
| 725 | 727 | |
| 728 | static MACHINE_CONFIG_DERIVED( tk2000, apple2_common ) |
| 729 | MCFG_VIDEO_START(apple2e) |
| 730 | /* internal ram */ |
| 731 | MCFG_RAM_ADD(RAM_TAG) |
| 732 | MCFG_RAM_DEFAULT_SIZE("64K") |
| 733 | MCFG_RAM_DEFAULT_VALUE(0x00) |
| 734 | MCFG_CASSETTE_ADD( CASSETTE_TAG, apple2_cassette_interface ) |
| 735 | |
| 736 | // TK2000 doesn't have slots, and it doesn't emulate a language card |
| 737 | // C05A maps RAM from C100-FFFF, C05B maps ROM |
| 738 | MCFG_A2BUS_SLOT_REMOVE("sl0") |
| 739 | MCFG_A2BUS_SLOT_REMOVE("sl1") |
| 740 | MCFG_A2BUS_SLOT_REMOVE("sl2") |
| 741 | MCFG_A2BUS_SLOT_REMOVE("sl3") |
| 742 | MCFG_A2BUS_SLOT_REMOVE("sl4") |
| 743 | MCFG_A2BUS_SLOT_REMOVE("sl5") |
| 744 | MCFG_A2BUS_SLOT_REMOVE("sl6") |
| 745 | MCFG_A2BUS_SLOT_REMOVE("sl7") |
| 746 | MACHINE_CONFIG_END |
| 747 | |
| 726 | 748 | static MACHINE_CONFIG_DERIVED( mprof3, apple2e ) |
| 727 | 749 | |
| 728 | 750 | /* internal ram */ |
| r15265 | r15266 | |
| 949 | 971 | ROM_LOAD ( "a2c.128", 0x0000, 0x4000, CRC(f0edaa1b) SHA1(1a9b8aca5e32bb702ddb7791daddd60a89655729)) |
| 950 | 972 | ROM_END |
| 951 | 973 | |
| 974 | ROM_START(tk2000) |
| 975 | ROM_REGION(0x2000,"gfx1",0) |
| 976 | ROM_LOAD ( "341-0265-a.chr", 0x0000, 0x1000,CRC(2651014d) SHA1(b2b5d87f52693817fc747df087a4aa1ddcdb1f10)) |
| 977 | ROM_LOAD ( "341-0265-a.chr", 0x1000, 0x1000,CRC(2651014d) SHA1(b2b5d87f52693817fc747df087a4aa1ddcdb1f10)) |
| 978 | |
| 979 | ROM_REGION(0x4000,"maincpu",0) |
| 980 | ROM_LOAD( "tk2000.rom", 0x000000, 0x004000, CRC(dfdbacc3) SHA1(bb37844c31616046630868a4399ee3d55d6df277) ) |
| 981 | ROM_END |
| 982 | |
| 952 | 983 | ROM_START(prav8c) |
| 953 | 984 | ROM_REGION(0x2000,"gfx1",0) |
| 954 | 985 | ROM_LOAD ( "charrom.d20", 0x0000, 0x2000,CRC(935212cc) SHA1(934603a441c631bd841ea0d2ff39525474461e47)) |
| r15265 | r15266 | |
| 1036 | 1067 | COMP( 1985, apple2ee, apple2e, 0, apple2ee, apple2e, 0, "Apple Computer", "Apple //e (enhanced)", GAME_SUPPORTS_SAVE ) |
| 1037 | 1068 | COMP( 1987, apple2ep, apple2e, 0, apple2ep, apple2ep, 0, "Apple Computer", "Apple //e (Platinum)", GAME_SUPPORTS_SAVE ) |
| 1038 | 1069 | COMP( 1984, apple2c, 0, apple2, apple2c, apple2e, 0, "Apple Computer", "Apple //c" , GAME_SUPPORTS_SAVE ) |
| 1070 | COMP( 1984, tk2000, apple2c, 0, tk2000, apple2e, 0, "Microdigital", "TK2000" , GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) |
| 1039 | 1071 | COMP( 1989, prav8c, apple2c, 0, apple2c, apple2e, 0, "Pravetz", "Pravetz 8C", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) |
| 1040 | 1072 | COMP( 1983, las3000, apple2, 0, apple2p, apple2p, 0, "Video Technology", "Laser 3000", GAME_NOT_WORKING ) |
| 1041 | 1073 | COMP( 1987, laser128, apple2c, 0, apple2c, apple2e, 0, "Video Technology", "Laser 128 (rev 4)", GAME_NOT_WORKING ) |