Previous 199869 Revisions Next

r31779 Tuesday 26th August, 2014 at 05:58:29 UTC by Fabio Priuli
(MESS) a7800: added Yamaha 2151 emulation to the XM
expansion board, thanks to info from tep392. nw.

Also removed from the softlist the Donkey Kong XM Enhanced
version which had been hacked to work on ProSystem emulator
and fails to save hiscores with correct HSC emulation
(it remains available the correct version which saves fine both
in MESS and in the real hardware).
[hash]a7800.xml
[src/emu/bus/a7800]xboard.c xboard.h

trunk/src/emu/bus/a7800/xboard.c
r31778r31779
3737 
3838 TODO:
3939  - verify what happens when 2 POKEYs are present
40  - understand why high score in XM is not written to NVRAM
41  - add Yamaha YM2151 when more clear specs are available
4240
4341***********************************************************************************************************/
4442
r31778r31779
7371
7472
7573a78_xm_device::a78_xm_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
76               : a78_xboard_device(mconfig, A78_XM, "Atari 7800 XM expansion module", tag, owner, clock, "a78_xm", __FILE__)
74               : a78_xboard_device(mconfig, A78_XM, "Atari 7800 XM expansion module", tag, owner, clock, "a78_xm", __FILE__),
75                  m_ym(*this, "xm_ym2151")
7776{
7877}
7978
r31778r31779
9089   m_ram_bank = 0;
9190}
9291
92void a78_xm_device::device_start()
93{
94   save_item(NAME(m_reg));
95   save_item(NAME(m_ram_bank));
96   save_item(NAME(m_ym_enabled));
97}
9398
99void a78_xm_device::device_reset()
100{
101   m_reg = 0;
102   m_ram_bank = 0;
103   m_ym_enabled = 0;
104}
105
106
94107static MACHINE_CONFIG_FRAGMENT( a78_xb )
95108   MCFG_A78_CARTRIDGE_ADD("xb_slot", a7800_cart, NULL)
96109
r31778r31779
100113   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "xb_speaker", 1.00)
101114MACHINE_CONFIG_END
102115
116static MACHINE_CONFIG_FRAGMENT( a78_xm )
117   MCFG_A78_CARTRIDGE_ADD("xb_slot", a7800_cart, NULL)
118
119   MCFG_SPEAKER_STANDARD_MONO("xb_speaker")
120
121   MCFG_SOUND_ADD("xb_pokey", POKEY, XTAL_14_31818MHz/8)
122   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "xb_speaker", 1.00)
123
124   MCFG_SOUND_ADD("xm_ym2151", YM2151, XTAL_14_31818MHz/8)
125   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "xb_speaker", 1.00)
126MACHINE_CONFIG_END
127
103128machine_config_constructor a78_xboard_device::device_mconfig_additions() const
104129{
105130   return MACHINE_CONFIG_NAME( a78_xb );
106131}
107132
133machine_config_constructor a78_xm_device::device_mconfig_additions() const
134{
135   return MACHINE_CONFIG_NAME( a78_xm );
136}
108137
109138/*-------------------------------------------------
110139 mapper specific handlers
r31778r31779
177206   return m_rom[offset];
178207}
179208
209READ8_MEMBER(a78_xm_device::read_04xx)
210{
211   if (BIT(m_reg, 4) && offset >= 0x50 && offset < 0x60)
212      return m_pokey->read(space, offset & 0x0f);
213   else if (m_ym_enabled && offset >= 0x60 && offset <= 0x61)
214      return m_ym->read(space, offset & 1);
215   else if (BIT(m_reg, 4) && offset >= 0x60 && offset < 0x70)
216      return m_xbslot->read_04xx(space, offset - 0x10);   // access second POKEY
217   else
218      return 0xff;
219}
220
221WRITE8_MEMBER(a78_xm_device::write_04xx)
222{
223   if (BIT(m_reg, 4) && offset >= 0x50 && offset < 0x60)
224      m_pokey->write(space, offset & 0x0f, data);
225   else if (m_ym_enabled && offset >= 0x60 && offset <= 0x61)
226      m_ym->write(space, offset & 1, data);
227   else if (BIT(m_reg, 4) && offset >= 0x60 && offset < 0x70)
228      m_xbslot->write_04xx(space, offset - 0x10, data);   // access second POKEY
229   else if (offset >= 0x70 && offset < 0x80)
230   {
231      if (data == 0x84)
232         m_ym_enabled = 1;
233      m_reg = data;
234      m_ram_bank = m_reg & 7;
235   }
236}
237
trunk/src/emu/bus/a7800/xboard.h
r31778r31779
44#include "a78_slot.h"
55#include "rom.h"
66#include "sound/pokey.h"
7#include "sound/2151intf.h"
78
89
910// ======================> a78_xboard_device
r31778r31779
4142   // construction/destruction
4243   a78_xm_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
4344   
45   // device-level overrides
46   virtual void device_start();
47   virtual machine_config_constructor device_mconfig_additions() const;
48   virtual void device_reset();
49   
4450   // reading and writing
51   virtual DECLARE_READ8_MEMBER(read_04xx);
52   virtual DECLARE_WRITE8_MEMBER(write_04xx);
4553   virtual DECLARE_READ8_MEMBER(read_10xx);
4654   virtual DECLARE_WRITE8_MEMBER(write_10xx);
4755   virtual DECLARE_READ8_MEMBER(read_30xx);
56   
57protected:
58   required_device<ym2151_device> m_ym;
59   int m_ym_enabled;
4860};
4961
5062
trunk/hash/a7800.xml
r31778r31779
24362436
24372437   <!-- XM board enhanced -->
24382438
2439   <!-- these should require an XM board? but the emulation seems to be built into the base driver?-->
2440   <!-- these have had the header stripped vs the .a78 files offered
2441      there was also a 'binary' with size 0x24000, CRC fd503bd4 -->
24422439   <software name="dkongxm">
2443      <description>Donkey Kong (homebrew, XM enhanced, HSC support) (Demo)</description>
2440      <description>Donkey Kong (PAL, Demo, XM enhanced)</description>
24442441      <year>2012</year>
2445      <publisher>&lt;homebrew&gt;</publisher> <!-- TEP392  -->
2442      <publisher>&lt;homebrew&gt;</publisher>
2443      <info name="programmer" value="TEP392" />
24462444      <sharedfeat name="compatibility" value="PAL"/>
24472445      <part name="cart" interface="a7800_cart">
24482446         <feature name="pcb_type" value="TYPE-XM" />
24492447         <feature name="slot" value="a78_xmc" />
24502448         <dataarea name="rom" size="0x24000">
2451            <rom name="dkxm_final_demo_pal_hsc.a78" size="0x24000" crc="6510b674" sha1="65b723b470d287af51e9888813149c43fb11ac26" offset="0" />
2452         </dataarea>
2453      </part>
2454   </software>
2455
2456   <software name="dkongxmu" cloneof="dkongxm" >
2457      <description>Donkey Kong (homebrew, XM enhanced, HSC support) (Demo) (NTSC)</description>
2458      <year>2012</year>
2459      <publisher>&lt;homebrew&gt;</publisher> <!-- TEP392  -->
2460      <sharedfeat name="compatibility" value="NTSC"/>
2461      <part name="cart" interface="a7800_cart">
2462         <feature name="pcb_type" value="TYPE-XM" />
2463         <feature name="slot" value="a78_xmc" />
2464         <dataarea name="rom" size="0x24000">
2465            <rom name="dkxm_final_demo_ntsc_hsc.a78" size="0x24000" crc="2c67fea7" sha1="7825c1946e3c7492fa9bbfae33029cd68c0d1135" offset="0" />
2466         </dataarea>
2467      </part>
2468   </software>
2469
2470   <software name="dkongxmn" cloneof="dkongxm">
2471      <description>Donkey Kong (homebrew, XM enhanced) (Demo)</description>
2472      <year>2012</year>
2473      <publisher>&lt;homebrew&gt;</publisher> <!-- TEP392  -->
2474      <sharedfeat name="compatibility" value="PAL"/>
2475      <part name="cart" interface="a7800_cart">
2476         <feature name="pcb_type" value="TYPE-XM" />
2477         <feature name="slot" value="a78_xmc" />
2478         <dataarea name="rom" size="0x24000">
24792449            <rom name="dkxm_final_demo_pal.a78" size="0x24000" crc="d362712e" sha1="118c462d6698bd23c378785f80062fdd7d65ca00" offset="0" />
24802450         </dataarea>
24812451      </part>
24822452   </software>
24832453
24842454   <software name="dkongxmnu" cloneof="dkongxm" >
2485      <description>Donkey Kong (homebrew, XM enhanced) (Demo) (NTSC)</description>
2455      <description>Donkey Kong (NTSC, Demo, XM enhanced)</description>
24862456      <year>2012</year>
2487      <publisher>&lt;homebrew&gt;</publisher> <!-- TEP392  -->
2457      <publisher>&lt;homebrew&gt;</publisher>
2458      <info name="programmer" value="TEP392" />
24882459      <sharedfeat name="compatibility" value="NTSC"/>
24892460      <part name="cart" interface="a7800_cart">
24902461         <feature name="pcb_type" value="TYPE-XM" />

Previous 199869 Revisions Next


© 1997-2024 The MAME Team