Previous 199869 Revisions Next

r31238 Wednesday 9th July, 2014 at 02:10:41 UTC by Barry Rodewald
amstrad: added the ability for expansion devices to contain ROMs (as some do).
        added ROMs for DK'Tronics Speech Synthesiser, and both RS232
        interfaces (plus one alternate for the Amstrad interface).
        split Amstrad and Pace serial interfaces into separate devices as
        they have different sized ROM areas. [Barry Rodewald]
[src/emu/bus/cpc]cpc_rs232.c cpc_rs232.h cpc_ssa1.c
[src/mess/drivers]amstrad.c
[src/mess/machine]amstrad.c

trunk/src/emu/bus/cpc/cpc_ssa1.c
r31237r31238
8686   ROM_LOAD( "sp0256-al2.bin",   0x1000, 0x0800, CRC(b504ac15) SHA1(e60fcb5fa16ff3f3b69d36c7a6e955744d3feafc) )
8787ROM_END
8888
89// Available in ROM and cassette versions.  For now, we'll let the user choose to load the software via ROM (using a ROM box slot device) or cassette.
89// Available in ROM and cassette versions.  We'll add the ROM for convenience.
9090ROM_START( cpc_dkspeech )
9191   ROM_REGION( 0x10000, "sp0256", 0 )
9292   ROM_LOAD( "sp0256-al2.bin",   0x1000, 0x0800, CRC(b504ac15) SHA1(e60fcb5fa16ff3f3b69d36c7a6e955744d3feafc) )
93
94   ROM_REGION( 0x4000, "exp_rom", 0 )
95   ROM_LOAD( "dkspeech.rom",   0x0000, 0x4000, CRC(4957c2f5) SHA1(bf28e07d5fada3678faab77f582b802164e82f62) )
9396ROM_END
9497
9598//-------------------------------------------------
trunk/src/emu/bus/cpc/cpc_rs232.c
r31237r31238
1212//**************************************************************************
1313
1414const device_type CPC_RS232 = &device_creator<cpc_rs232_device>;
15const device_type CPC_RS232_AMS = &device_creator<cpc_ams_rs232_device>;
1516
1617// device machine config
1718static MACHINE_CONFIG_FRAGMENT( cpc_rs232 )
r31237r31238
4445
4546MACHINE_CONFIG_END
4647
48ROM_START( cpc_rs232 )
49   ROM_REGION( 0x8000, "exp_rom", 0 )
50   ROM_LOAD( "comstar1.rom",   0x0000, 0x4000, CRC(ddcade50) SHA1(d09ee0bd51a8e1cafc5107a75fed839dda3d21e5) )
51   ROM_LOAD( "comstar2.rom",   0x4000, 0x4000, CRC(664e788c) SHA1(13d033f2d1cad70140deb903d787ba514f236a59) )
52ROM_END
53
54ROM_START( cpc_rs232_ams )
55   ROM_REGION( 0x4000, "exp_rom", 0 )
56   ROM_SYSTEM_BIOS( 0, "amstrad", "Amstrad RS232C interface (v1)" )
57   ROMX_LOAD( "rs232101.rom",   0x0000, 0x2000, CRC(c6eb52b2) SHA1(8a7e0a1183fdde8d07bc8827a3e159ca3022f93b), ROM_BIOS(1) )
58   ROM_SYSTEM_BIOS( 1, "mercitel", "Amstrad RS232C interface (v1) + Mercitel (v1.4)" )
59   ROMX_LOAD( "rs232mercitel14.rom",   0x0000, 0x4000, CRC(8ffb114b) SHA1(145233fe8d4db9f5265eeac767d8ee8d45d14755), ROM_BIOS(2) )
60ROM_END
61
4762machine_config_constructor cpc_rs232_device::device_mconfig_additions() const
4863{
4964   return MACHINE_CONFIG_NAME( cpc_rs232 );
5065}
5166
67const rom_entry *cpc_rs232_device::device_rom_region() const
68{
69   return ROM_NAME( cpc_rs232 );
70}
5271
72const rom_entry *cpc_ams_rs232_device::device_rom_region() const
73{
74   return ROM_NAME( cpc_rs232_ams );
75}
76
77
5378//**************************************************************************
5479//  LIVE DEVICE
5580//**************************************************************************
5681
5782cpc_rs232_device::cpc_rs232_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
58   device_t(mconfig, CPC_RS232, "Amstrad/Pace RS232C interface", tag, owner, clock, "cpc_ser", __FILE__),
83   device_t(mconfig, CPC_RS232, "Pace RS232C interface", tag, owner, clock, "cpc_ser", __FILE__),
5984   device_cpc_expansion_card_interface(mconfig, *this),
6085   m_pit(*this,"pit"),
6186   m_dart(*this,"dart"),
r31237r31238
6388{
6489}
6590
91cpc_rs232_device::cpc_rs232_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
92   device_t(mconfig, type, name, tag, owner, clock, shortname, source),
93   device_cpc_expansion_card_interface(mconfig, *this),
94   m_pit(*this,"pit"),
95   m_dart(*this,"dart"),
96   m_rs232(*this,"rs232")
97{
98}
99
100cpc_ams_rs232_device::cpc_ams_rs232_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
101   cpc_rs232_device(mconfig, CPC_RS232_AMS, "Amstrad RS232C interface", tag, owner, clock, "cpc_serams", __FILE__)
102{
103}
104
105
66106//-------------------------------------------------
67107//  device_start - device-specific startup
68108//-------------------------------------------------
trunk/src/emu/bus/cpc/cpc_rs232.h
r31237r31238
1919public:
2020   // construction/destruction
2121   cpc_rs232_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
22   cpc_rs232_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
2223
23   // optional information overrides
24         // optional information overrides
2425   virtual machine_config_constructor device_mconfig_additions() const;
2526
2627   DECLARE_WRITE_LINE_MEMBER(pit_out0_w);
r31237r31238
3940   // device-level overrides
4041   virtual void device_start();
4142   virtual void device_reset();
43   virtual const rom_entry *device_rom_region() const;
4244
4345private:
4446   cpc_expansion_slot_device *m_slot;
4547};
4648
49class cpc_ams_rs232_device : public cpc_rs232_device
50{
51public:
52   // construction/destruction
53   cpc_ams_rs232_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
54
55protected:
56   virtual const rom_entry *device_rom_region() const;
57};
58
4759// device type definition
4860extern const device_type CPC_RS232;
61extern const device_type CPC_RS232_AMS;
4962
5063#endif /* CPC_RS232_H_ */
trunk/src/mess/machine/amstrad.c
r31237r31238
28642864   }
28652865
28662866   /* enumerate expansion ROMs */
2867   // TODO: get ROMs from expansion devices (that aren't ROMboxes)
28682867
2868   /* find any expansion devices that have a 'exp_rom' region */
2869   cpc_expansion_slot_device* exp_port = m_exp;
2870
2871   while(exp_port != NULL)
2872   {
2873      device_t* temp;
2874
2875      temp = dynamic_cast<device_t*>(exp_port->get_card_device());
2876      if(temp != NULL)
2877      {
2878         if(temp->memregion("exp_rom")->base() != NULL)
2879         {
2880            int num = temp->memregion("exp_rom")->bytes() / 0x4000;
2881            for(i=0;i<num;i++)
2882            {
2883               m_Amstrad_ROM_Table[m_rom_count] = temp->memregion("exp_rom")->base()+0x4000*i;
2884               NEXT_ROM_SLOT
2885            }
2886         }
2887      }
2888      exp_port = temp->subdevice<cpc_expansion_slot_device>("exp");
2889   }
2890
2891
28692892   /* add ROMs from ROMbox expansion */
28702893   romexp = get_expansion_device(machine(),"rom");
28712894   if(romexp)
trunk/src/mess/drivers/amstrad.c
r31237r31238
814814   SLOT_INTERFACE("multiface2", CPC_MFACE2)
815815   SLOT_INTERFACE("pds", CPC_PDS)
816816   SLOT_INTERFACE("rs232", CPC_RS232)
817   SLOT_INTERFACE("amsrs232", CPC_RS232_AMS)
817818SLOT_INTERFACE_END
818819
819820SLOT_INTERFACE_START(cpcplus_exp_cards)
r31237r31238
822823   SLOT_INTERFACE("rom", CPC_ROM)
823824   SLOT_INTERFACE("pds", CPC_PDS)
824825   SLOT_INTERFACE("rs232", CPC_RS232)
826   SLOT_INTERFACE("amsrs232", CPC_RS232_AMS)
825827SLOT_INTERFACE_END
826828
827829static MACHINE_CONFIG_START( amstrad_nofdc, amstrad_state )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team