Previous 15994 Revisions Next

r14587 Thursday 23rd February, 2012 at 14:40:48 UTC by Curt Coder
[C64] Added support for the Final Cartridge and Prophet-64 cartridges. [Curt Coder]
[hash]c64_cart.xml
[src/mess]mess.mak
[src/mess/machine]c64_dqbb.c* c64_dqbb.h* c64_final.c* c64_final.h* c64_prophet64.c* c64_prophet64.h* c64_sfx_sound_expander.c* c64_sfx_sound_expander.h* cbmipt.c cbmipt.h

hash/c64_cart.xml
r14586r14587
57745774      <year>1986</year>
57755775      <publisher>Riska H&amp;P</publisher>
57765776      <part name="cart" interface="c64_cart">
5777         <feature name="slot" value="final_cartridge" />
5777         <feature name="slot" value="final" />
57785778         <feature name="exrom" value="1" />
57795779         <feature name="game" value="1" />
57805780         <dataarea name="roml" size="0x4000">
r14586r14587
57885788      <year>198?</year>
57895789      <publisher>Riska H&amp;P</publisher>
57905790      <part name="cart" interface="c64_cart">
5791         <feature name="slot" value="final_cartridge" />
5791         <feature name="slot" value="final_proto" />
57925792         <feature name="exrom" value="1" />
57935793         <feature name="game" value="1" />
57945794         <dataarea name="rom" size="0x6000">
r14586r14587
58035803      <year>1986</year>
58045804      <publisher>Riska H&amp;P</publisher>
58055805      <part name="cart" interface="c64_cart">
5806         <feature name="slot" value="final_cartridge" />
5806         <feature name="slot" value="final" />
58075807         <feature name="exrom" value="1" />
58085808         <feature name="game" value="1" />
58095809         <dataarea name="roml" size="0x4000">
r14586r14587
58175817      <year>1986</year>
58185818      <publisher>Riska H&amp;P</publisher>
58195819      <part name="cart" interface="c64_cart">
5820         <feature name="slot" value="final_cartridge" />
5820         <feature name="slot" value="final" />
58215821         <feature name="exrom" value="1" />
58225822         <feature name="game" value="1" />
58235823         <dataarea name="roml" size="0x4000">
r14586r14587
58315831      <year>1986</year>
58325832      <publisher>Riska H&amp;P</publisher>
58335833      <part name="cart" interface="c64_cart">
5834         <feature name="slot" value="final_cartridge" />
5834         <feature name="slot" value="final" />
58355835         <feature name="exrom" value="1" />
58365836         <feature name="game" value="1" />
58375837         <dataarea name="roml" size="0x4000">
r14586r14587
58455845      <year>1986</year>
58465846      <publisher>&lt;unknown&gt;</publisher>
58475847      <part name="cart" interface="c64_cart">
5848         <feature name="slot" value="final_cartridge" />
5848         <feature name="slot" value="final" />
58495849         <feature name="exrom" value="1" />
58505850         <feature name="game" value="1" />
58515851         <dataarea name="roml" size="0x4000">
r14586r14587
58595859      <year>1986</year>
58605860      <publisher>Eurosystems</publisher>
58615861      <part name="cart" interface="c64_cart">
5862         <feature name="slot" value="final_cartridge" />
5862         <feature name="slot" value="final" />
58635863         <feature name="exrom" value="1" />
58645864         <feature name="game" value="1" />
58655865         <dataarea name="roml" size="0x4000">
r14586r14587
58735873      <year>1986</year>
58745874      <publisher>Riska H&amp;P</publisher>
58755875      <part name="cart" interface="c64_cart">
5876         <feature name="slot" value="final_cartridge" />
5876         <feature name="slot" value="final_plus" />
58775877         <feature name="exrom" value="1" />
58785878         <feature name="game" value="1" />
58795879         <dataarea name="roml" size="0x8000">
r14586r14587
58875887      <year>1986</year>
58885888      <publisher>Riska H&amp;P</publisher>
58895889      <part name="cart" interface="c64_cart">
5890         <feature name="slot" value="final_cartridge" />
5890         <feature name="slot" value="final_plus" />
58915891         <feature name="exrom" value="1" />
58925892         <feature name="game" value="1" />
58935893         <dataarea name="roml" size="0x8000">
r14586r14587
59015901      <year>1986</year>
59025902      <publisher>Riska H&amp;P</publisher>
59035903      <part name="cart" interface="c64_cart">
5904         <feature name="slot" value="final_cartridge" />
5904         <feature name="slot" value="final_plus" />
59055905         <feature name="exrom" value="1" />
59065906         <feature name="game" value="1" />
59075907         <dataarea name="roml" size="0x8000">
r14586r14587
59155915      <year>1987</year>
59165916      <publisher>Riska H&amp;P</publisher>
59175917      <part name="cart" interface="c64_cart">
5918         <feature name="slot" value="final_cartridge_2" />
5918         <feature name="slot" value="final" />
59195919         <feature name="exrom" value="1" />
59205920         <feature name="game" value="1" />
59215921         <dataarea name="roml" size="0x4000">
r14586r14587
59295929      <year>1986</year>
59305930      <publisher>Micro-Luc</publisher>
59315931      <part name="cart" interface="c64_cart">
5932         <feature name="slot" value="final_cartridge_2" />
5932         <feature name="slot" value="final" />
59335933         <feature name="exrom" value="1" />
59345934         <feature name="game" value="1" />
59355935         <dataarea name="roml" size="0x4000">
r14586r14587
59435943      <year>1988</year>
59445944      <publisher>Riska H&amp;P</publisher>
59455945      <part name="cart" interface="c64_cart">
5946         <feature name="slot" value="final_cartridge_3" />
5946         <feature name="slot" value="final3" />
59475947         <feature name="exrom" value="1" />
59485948         <feature name="game" value="1" />
59495949         <dataarea name="roml" size="0x10000">
r14586r14587
59575957      <year>1988</year>
59585958      <publisher>Riska H&amp;P</publisher>
59595959      <part name="cart" interface="c64_cart">
5960         <feature name="slot" value="final_cartridge_3" />
5960         <feature name="slot" value="final3" />
59615961         <feature name="exrom" value="1" />
59625962         <feature name="game" value="1" />
59635963         <dataarea name="roml" size="0x10000">
r14586r14587
59715971      <year>1987</year>
59725972      <publisher>Riska H&amp;P</publisher>
59735973      <part name="cart" interface="c64_cart">
5974         <feature name="slot" value="final_cartridge_3" />
5974         <feature name="slot" value="final3" />
59755975         <feature name="exrom" value="1" />
59765976         <feature name="game" value="1" />
59775977         <dataarea name="roml" size="0x10000">
r14586r14587
59855985      <year>1987</year>
59865986      <publisher>Riska H&amp;P</publisher>
59875987      <part name="cart" interface="c64_cart">
5988         <feature name="slot" value="final_cartridge_3" />
5988         <feature name="slot" value="final3" />
59895989         <feature name="exrom" value="1" />
59905990         <feature name="game" value="1" />
59915991         <dataarea name="roml" size="0x10000">
src/mess/machine/c64_sfx_sound_expander.c
r0r14587
1/**********************************************************************
2 
3    Commodore SFX Sound Expander cartridge emulation
4 
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7 
8**********************************************************************/
9 
10#include "c64_sfx_sound_expander.h"
11 
12#define YM3526_TAG   "ic3"
13 
14//**************************************************************************
15//  DEVICE DEFINITIONS
16//**************************************************************************
17 
18const device_type C64_SFX_SOUND_EXPANDER = &device_creator<c64_sfx_sound_expander_cartridge_device>;
19 
20 
21//-------------------------------------------------
22//  ym3526_interface ym3526_config
23//-------------------------------------------------
24 
25static void irqhandler(device_t *device, int linestate)
26{
27/*   c64_sfx_sound_expander_cartridge_device *me = downcast<c64_sfx_sound_expander_cartridge_device*>(device->owner());
28   
29   me->m_slot->irq_w(linestate);*/
30}
31 
32static const ym3526_interface ym3526_config =
33{
34   irqhandler
35};
36 
37 
38//-------------------------------------------------
39//  C64_EXPANSION_INTERFACE( expansion_intf )
40//-------------------------------------------------
41 
42WRITE_LINE_MEMBER( c64_sfx_sound_expander_cartridge_device::irq_w )
43{
44   m_slot->irq_w(state);
45}
46 
47WRITE_LINE_MEMBER( c64_sfx_sound_expander_cartridge_device::nmi_w )
48{
49   m_slot->nmi_w(state);
50}
51 
52WRITE_LINE_MEMBER( c64_sfx_sound_expander_cartridge_device::dma_w )
53{
54   m_slot->dma_w(state);
55}
56 
57WRITE_LINE_MEMBER( c64_sfx_sound_expander_cartridge_device::reset_w )
58{
59   m_slot->reset_w(state);
60}
61 
62static C64_EXPANSION_INTERFACE( expansion_intf )
63{
64   DEVCB_LINE_MEMBER(c64_sfx_sound_expander_cartridge_device, irq_w),
65   DEVCB_LINE_MEMBER(c64_sfx_sound_expander_cartridge_device, nmi_w),
66   DEVCB_LINE_MEMBER(c64_sfx_sound_expander_cartridge_device, dma_w),
67   DEVCB_LINE_MEMBER(c64_sfx_sound_expander_cartridge_device, reset_w)
68};
69 
70 
71//-------------------------------------------------
72//  MACHINE_CONFIG_FRAGMENT( c64_sfx_sound_expander )
73//-------------------------------------------------
74 
75static MACHINE_CONFIG_FRAGMENT( c64_sfx_sound_expander )
76   MCFG_SPEAKER_STANDARD_MONO("mono")
77   MCFG_SOUND_ADD(YM3526_TAG, YM3526, XTAL_3_579545MHz)
78   MCFG_SOUND_CONFIG(ym3526_config)
79   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
80 
81   MCFG_C64_EXPANSION_SLOT_ADD(C64_EXPANSION_SLOT_TAG, expansion_intf, c64_expansion_cards, NULL, NULL)
82MACHINE_CONFIG_END
83 
84 
85//-------------------------------------------------
86//  machine_config_additions - device-specific
87//  machine configurations
88//-------------------------------------------------
89 
90machine_config_constructor c64_sfx_sound_expander_cartridge_device::device_mconfig_additions() const
91{
92   return MACHINE_CONFIG_NAME( c64_sfx_sound_expander );
93}
94 
95 
96//-------------------------------------------------
97//  INPUT_PORTS( c64_sfx_sound_expander )
98//-------------------------------------------------
99 
100static INPUT_PORTS_START( c64_sfx_sound_expander )
101   PORT_START("KB0")
102   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
103   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
104   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
105   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
106   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
107   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
108   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
109   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
110 
111   PORT_START("KB1")
112   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
113   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
114   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
115   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
116   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
117   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
118   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
119   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
120 
121   PORT_START("KB2")
122   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
123   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
124   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
125   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
126   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
127   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
128   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
129   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
130 
131   PORT_START("KB3")
132   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
133   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
134   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
135   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
136   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
137   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
138   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
139   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
140 
141   PORT_START("KB4")
142   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
143   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
144   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
145   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
146   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
147   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
148   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
149   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
150 
151   PORT_START("KB5")
152   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
153   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
154   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
155   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
156   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
157   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
158   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
159   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
160 
161   PORT_START("KB6")
162   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
163   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
164   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
165   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
166   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
167   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
168   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
169   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
170 
171   PORT_START("KB7")
172   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
173   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
174   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
175   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
176   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
177   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
178   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
179   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
180INPUT_PORTS_END
181 
182 
183//-------------------------------------------------
184//  input_ports - device-specific input ports
185//-------------------------------------------------
186 
187ioport_constructor c64_sfx_sound_expander_cartridge_device::device_input_ports() const
188{
189   return INPUT_PORTS_NAME( c64_sfx_sound_expander );
190}
191 
192 
193 
194//**************************************************************************
195//  LIVE DEVICE
196//**************************************************************************
197 
198//-------------------------------------------------
199//  c64_sfx_sound_expander_cartridge_device - constructor
200//-------------------------------------------------
201 
202c64_sfx_sound_expander_cartridge_device::c64_sfx_sound_expander_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
203   device_t(mconfig, C64_SFX_SOUND_EXPANDER, "C64 Magic Formel cartridge", tag, owner, clock),
204   device_c64_expansion_card_interface(mconfig, *this),
205   m_opl(*this, YM3526_TAG),
206    m_exp(*this, C64_EXPANSION_SLOT_TAG)
207{
208}
209 
210 
211//-------------------------------------------------
212//  device_start - device-specific startup
213//-------------------------------------------------
214 
215void c64_sfx_sound_expander_cartridge_device::device_start()
216{
217}
218 
219 
220//-------------------------------------------------
221//  device_reset - device-specific reset
222//-------------------------------------------------
223 
224void c64_sfx_sound_expander_cartridge_device::device_reset()
225{
226}
227 
228 
229//-------------------------------------------------
230//  c64_cd_r - cartridge data read
231//-------------------------------------------------
232 
233UINT8 c64_sfx_sound_expander_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
234{
235   UINT8 data = m_exp->cd_r(space, offset, roml, romh, io1, io2);
236 
237   if (!io2)
238   {
239      if (BIT(offset, 3))
240      {
241         switch (offset & 0x07)
242         {
243         case 0: data |= input_port_read(*this, "KB0"); break;
244         case 1: data |= input_port_read(*this, "KB1"); break;
245         case 2: data |= input_port_read(*this, "KB2"); break;
246         case 3: data |= input_port_read(*this, "KB3"); break;
247         case 4: data |= input_port_read(*this, "KB4"); break;
248         case 5: data |= input_port_read(*this, "KB5"); break;
249         case 6: data |= input_port_read(*this, "KB6"); break;
250         case 7: data |= input_port_read(*this, "KB7"); break;
251         }
252      }
253      else if (BIT(offset, 5))
254      {
255         data |= ym3526_r(m_opl, BIT(offset, 4));
256      }
257   }
258 
259   return data;
260}
261 
262 
263//-------------------------------------------------
264//  c64_cd_w - cartridge data write
265//-------------------------------------------------
266 
267void c64_sfx_sound_expander_cartridge_device::c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2)
268{
269   if (!io2 && BIT(offset, 5))
270   {
271      ym3526_w(m_opl, BIT(offset, 4), data);
272   }
273 
274   m_exp->cd_w(space, offset, data, roml, romh, io1, io2);
275}
276 
277 
278//-------------------------------------------------
279//  c64_game_r - GAME read
280//-------------------------------------------------
281 
282int c64_sfx_sound_expander_cartridge_device::c64_game_r(offs_t offset, int ba, int rw, int hiram)
283{
284   return m_exp->game_r(offset, ba, rw, hiram);
285}
286 
287 
288//-------------------------------------------------
289//  c64_exrom_r - EXROM read
290//-------------------------------------------------
291 
292int c64_sfx_sound_expander_cartridge_device::c64_exrom_r()
293{
294   return m_exp->exrom_r();
295}
src/mess/machine/cbmipt.c
r14586r14587
11421142SLOT_INTERFACE_END
11431143
11441144SLOT_INTERFACE_START( c64_expansion_cards )
1145   SLOT_INTERFACE("dqbb", C64_DQBB)
1146   SLOT_INTERFACE("easyflash", C64_EASYFLASH)
11451147   SLOT_INTERFACE("georam", C64_GEORAM)
1148   SLOT_INTERFACE("sfxse", C64_SFX_SOUND_EXPANDER)
11461149   SLOT_INTERFACE("xl80", C64_XL80)
1147   SLOT_INTERFACE("easyflash", C64_EASYFLASH)
11481150
11491151   // the following need ROMs from the software list
11501152   SLOT_INTERFACE("ieee488", C64_IEEE488)
r14586r14587
11571159   SLOT_INTERFACE("easycalcres", C64_EASY_CALC_RESULT)
11581160   SLOT_INTERFACE("epyxfastload", C64_EPYX_FAST_LOAD)
11591161   SLOT_INTERFACE("exos", C64_EXOS)
1162   SLOT_INTERFACE("final", C64_FINAL)
11601163   SLOT_INTERFACE("fun_play", C64_FUN_PLAY)
11611164   SLOT_INTERFACE("mach5", C64_MACH5)
11621165   SLOT_INTERFACE("magic_desk", C64_MAGIC_DESK)
r14586r14587
11651168   SLOT_INTERFACE("multiscreen", C64_MULTISCREEN)
11661169   SLOT_INTERFACE("ocean", C64_OCEAN)
11671170   SLOT_INTERFACE("pagefox", C64_PAGEFOX)
1171   SLOT_INTERFACE("prophet64", C64_PROPHET64)
11681172   SLOT_INTERFACE("rex", C64_REX)
11691173   SLOT_INTERFACE("rex_ep256", C64_REX_EP256)
11701174   SLOT_INTERFACE("ross", C64_ROSS)
src/mess/machine/c64_sfx_sound_expander.h
r0r14587
1/**********************************************************************
2 
3    Commodore SFX Sound Expander cartridge emulation
4 
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7 
8**********************************************************************/
9 
10#pragma once
11 
12#ifndef __SFX_SOUND_EXPANDER__
13#define __SFX_SOUND_EXPANDER__
14 
15#define ADDRESS_MAP_MODERN
16 
17#include "emu.h"
18#include "machine/c64exp.h"
19#include "machine/cbmipt.h"
20#include "sound/3526intf.h"
21 
22 
23 
24//**************************************************************************
25//  TYPE DEFINITIONS
26//**************************************************************************
27 
28// ======================> c64_sfx_sound_expander_cartridge_device
29 
30class c64_sfx_sound_expander_cartridge_device : public device_t,
31                                    public device_c64_expansion_card_interface
32{
33public:
34   // construction/destruction
35   c64_sfx_sound_expander_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
36 
37   // optional information overrides
38   virtual machine_config_constructor device_mconfig_additions() const;
39   virtual ioport_constructor device_input_ports() const;
40 
41   // not really public
42   DECLARE_WRITE_LINE_MEMBER( irq_w );
43   DECLARE_WRITE_LINE_MEMBER( nmi_w );
44   DECLARE_WRITE_LINE_MEMBER( dma_w );
45   DECLARE_WRITE_LINE_MEMBER( reset_w );
46   
47protected:
48   // device-level overrides
49   virtual void device_start();
50   virtual void device_reset();
51 
52   // device_c64_expansion_card_interface overrides
53   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
54   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
55   virtual int c64_game_r(offs_t offset, int ba, int rw, int hiram);
56   virtual int c64_exrom_r();
57 
58private:
59   required_device<device_t> m_opl;
60   required_device<c64_expansion_slot_device> m_exp;
61};
62 
63 
64// device type definition
65extern const device_type C64_SFX_SOUND_EXPANDER;
66 
67 
68#endif
src/mess/machine/cbmipt.h
r14586r14587
88#include "machine/c64_dela_ep64.h"
99#include "machine/c64_dela_ep7x8.h"
1010#include "machine/c64_dinamic.h"
11#include "machine/c64_dqbb.h"
1112#include "machine/c64_easy_calc_result.h"
1213#include "machine/c64_easyflash.h"
1314#include "machine/c64_epyx_fast_load.h"
1415#include "machine/c64_exos.h"
16#include "machine/c64_final.h"
1517#include "machine/c64_fun_play.h"
1618#include "machine/c64_georam.h"
1719#include "machine/c64_ieee488.h"
r14586r14587
2224#include "machine/c64_multiscreen.h"
2325#include "machine/c64_ocean.h"
2426#include "machine/c64_pagefox.h"
27#include "machine/c64_prophet64.h"
2528#include "machine/c64_rex.h"
2629#include "machine/c64_rex_ep256.h"
2730#include "machine/c64_ross.h"
31#include "machine/c64_sfx_sound_expander.h"
2832#include "machine/c64_silverrock.h"
2933#include "machine/c64_simons_basic.h"
3034#include "machine/c64_stardos.h"
src/mess/machine/c64_final.c
r0r14587
1/**********************************************************************
2 
3    Final Cartridge emulation
4 
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7 
8**********************************************************************/
9 
10#include "c64_final.h"
11 
12 
13 
14//**************************************************************************
15//  DEVICE DEFINITIONS
16//**************************************************************************
17 
18const device_type C64_FINAL = &device_creator<c64_final_cartridge_device>;
19 
20 
21 
22//**************************************************************************
23//  LIVE DEVICE
24//**************************************************************************
25 
26//-------------------------------------------------
27//  c64_final_cartridge_device - constructor
28//-------------------------------------------------
29 
30c64_final_cartridge_device::c64_final_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
31   device_t(mconfig, C64_FINAL, "C64 Final cartridge", tag, owner, clock),
32   device_c64_expansion_card_interface(mconfig, *this)
33{
34}
35 
36 
37//-------------------------------------------------
38//  device_start - device-specific startup
39//-------------------------------------------------
40 
41void c64_final_cartridge_device::device_start()
42{
43}
44 
45 
46//-------------------------------------------------
47//  device_reset - device-specific reset
48//-------------------------------------------------
49 
50void c64_final_cartridge_device::device_reset()
51{
52   m_exrom = 0;
53   m_game = 0;
54}
55 
56 
57//-------------------------------------------------
58//  c64_cd_r - cartridge data read
59//-------------------------------------------------
60 
61UINT8 c64_final_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
62{
63   UINT8 data = 0;
64 
65   if (!roml || !romh || !io1 || !io2)
66   {
67      data = m_roml[offset & 0x3fff];
68   }
69   
70   if (!io1)
71   {
72      m_game = 1;
73      m_exrom = 1;
74   }
75   else if (!io2)
76   {
77      m_exrom = 0;
78      m_game = 0;
79   }
80 
81   return data;
82}
83 
84 
85//-------------------------------------------------
86//  c64_cd_w - cartridge data write
87//-------------------------------------------------
88 
89void c64_final_cartridge_device::c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2)
90{
91   if (!io1)
92   {
93      m_game = 1;
94      m_exrom = 1;
95   }
96   else if (!io2)
97   {
98      m_exrom = 0;
99      m_game = 0;
100   }
101}
src/mess/machine/c64_final.h
r0r14587
1/**********************************************************************
2 
3    Final Cartridge emulation
4 
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7 
8**********************************************************************/
9 
10#pragma once
11 
12#ifndef __FINAL__
13#define __FINAL__
14 
15#define ADDRESS_MAP_MODERN
16 
17#include "emu.h"
18#include "machine/c64exp.h"
19 
20 
21 
22//**************************************************************************
23//  TYPE DEFINITIONS
24//**************************************************************************
25 
26// ======================> c64_final_cartridge_device
27 
28class c64_final_cartridge_device : public device_t,
29                           public device_c64_expansion_card_interface
30{
31public:
32   // construction/destruction
33   c64_final_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
34 
35protected:
36   // device-level overrides
37   virtual void device_start();
38   virtual void device_reset();
39 
40   // device_c64_expansion_card_interface overrides
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
42   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
43};
44 
45 
46// device type definition
47extern const device_type C64_FINAL;
48 
49 
50#endif
src/mess/machine/c64_prophet64.c
r0r14587
1/**********************************************************************
2 
3    Prophet-64 emulation
4 
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7 
8**********************************************************************/
9 
10#include "c64_prophet64.h"
11 
12 
13 
14//**************************************************************************
15//  DEVICE DEFINITIONS
16//**************************************************************************
17 
18const device_type C64_PROPHET64 = &device_creator<c64_prophet64_cartridge_device>;
19 
20 
21 
22//**************************************************************************
23//  LIVE DEVICE
24//**************************************************************************
25 
26//-------------------------------------------------
27//  c64_prophet64_cartridge_device - constructor
28//-------------------------------------------------
29 
30c64_prophet64_cartridge_device::c64_prophet64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
31   device_t(mconfig, C64_PROPHET64, "C64 Prophet-64 cartridge", tag, owner, clock),
32   device_c64_expansion_card_interface(mconfig, *this)
33{
34}
35 
36 
37//-------------------------------------------------
38//  device_start - device-specific startup
39//-------------------------------------------------
40 
41void c64_prophet64_cartridge_device::device_start()
42{
43   // state saving
44   save_item(NAME(m_bank));
45}
46 
47 
48//-------------------------------------------------
49//  device_reset - device-specific reset
50//-------------------------------------------------
51 
52void c64_prophet64_cartridge_device::device_reset()
53{
54   m_exrom = 0;
55}
56 
57 
58//-------------------------------------------------
59//  c64_cd_r - cartridge data read
60//-------------------------------------------------
61 
62UINT8 c64_prophet64_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
63{
64   UINT8 data = 0;
65 
66   if (!roml)
67   {
68      offs_t addr = (m_bank << 13) | (offset & 0x1fff);
69      data = m_roml[addr];
70   }
71 
72   return data;
73}
74 
75 
76//-------------------------------------------------
77//  c64_cd_w - cartridge data write
78//-------------------------------------------------
79 
80void c64_prophet64_cartridge_device::c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2)
81{
82   if (!io2)
83   {
84      m_bank = data & 0x1f;
85      m_exrom = BIT(data, 5);
86   }
87}
src/mess/machine/c64_prophet64.h
r0r14587
1/**********************************************************************
2 
3    Prophet-64 emulation
4 
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7 
8**********************************************************************/
9 
10#pragma once
11 
12#ifndef __PROPHET64__
13#define __PROPHET64__
14 
15#define ADDRESS_MAP_MODERN
16 
17#include "emu.h"
18#include "machine/c64exp.h"
19 
20 
21 
22//**************************************************************************
23//  TYPE DEFINITIONS
24//**************************************************************************
25 
26// ======================> c64_prophet64_cartridge_device
27 
28class c64_prophet64_cartridge_device : public device_t,
29                              public device_c64_expansion_card_interface
30{
31public:
32   // construction/destruction
33   c64_prophet64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
34 
35protected:
36   // device-level overrides
37   virtual void device_start();
38   virtual void device_reset();
39 
40   // device_c64_expansion_card_interface overrides
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
42   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
43 
44private:
45   UINT8 m_bank;
46};
47 
48 
49// device type definition
50extern const device_type C64_PROPHET64;
51 
52 
53#endif
src/mess/machine/c64_dqbb.c
r0r14587
1/**********************************************************************
2 
3    Brown Boxes Double Quick Brown Box emulation
4 
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7 
8**********************************************************************/
9 
10/*
11 
12   TODO:
13   
14   - NVRAM
15   - 64/128 mode switch
16   - dump of the initial NVRAM contents
17 
18*/
19 
20#include "c64_dqbb.h"
21 
22 
23 
24//**************************************************************************
25//  DEVICE DEFINITIONS
26//**************************************************************************
27 
28const device_type C64_DQBB = &device_creator<c64_dqbb_cartridge_device>;
29 
30 
31 
32//**************************************************************************
33//  LIVE DEVICE
34//**************************************************************************
35 
36//-------------------------------------------------
37//  c64_dqbb_cartridge_device - constructor
38//-------------------------------------------------
39 
40c64_dqbb_cartridge_device::c64_dqbb_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
41   device_t(mconfig, C64_DQBB, "C64 Double Quick Brown Box cartridge", tag, owner, clock),
42   device_c64_expansion_card_interface(mconfig, *this)
43{
44}
45 
46 
47//-------------------------------------------------
48//  device_start - device-specific startup
49//-------------------------------------------------
50 
51void c64_dqbb_cartridge_device::device_start()
52{
53   // allocate memory
54   m_ram = auto_alloc_array(machine(), UINT8, 0x4000);
55 
56   // state saving
57   save_item(NAME(m_cs));
58   save_item(NAME(m_we));
59}
60 
61 
62//-------------------------------------------------
63//  device_reset - device-specific reset
64//-------------------------------------------------
65 
66void c64_dqbb_cartridge_device::device_reset()
67{
68   m_exrom = 0; // TODO 1 in 128 mode
69   m_game = 1;
70   m_cs = 0;
71   m_we = 0;
72}
73 
74 
75//-------------------------------------------------
76//  c64_cd_r - cartridge data read
77//-------------------------------------------------
78 
79UINT8 c64_dqbb_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
80{
81   UINT8 data = 0;
82 
83   if (!m_cs && (!roml || !romh))
84   {
85      data = m_ram[offset & 0x3fff];
86   }
87 
88   return data;
89}
90 
91 
92//-------------------------------------------------
93//  c64_cd_w - cartridge data write
94//-------------------------------------------------
95 
96void c64_dqbb_cartridge_device::c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2)
97{
98   if (!m_cs && m_we && (offset >= 0x8000 && offset < 0xc000))
99   {
100      m_ram[offset & 0x3fff] = data;
101   }
102   else if (!io1)
103   {
104      /*
105       
106         bit      description
107         
108         0
109         1
110         2      GAME
111         3
112         4      WE
113         5
114         6      EXROM
115         7      _CS
116       
117      */
118       
119      m_exrom = !BIT(data, 6);
120      m_game = !BIT(data, 2);
121      m_we = BIT(data, 4);
122      m_cs = BIT(data, 7);
123   }
124}
src/mess/machine/c64_dqbb.h
r0r14587
1/**********************************************************************
2 
3    Brown Boxes Double Quick Brown Box emulation
4 
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7 
8**********************************************************************/
9 
10#pragma once
11 
12#ifndef __DQBB__
13#define __DQBB__
14 
15#define ADDRESS_MAP_MODERN
16 
17#include "emu.h"
18#include "machine/c64exp.h"
19#include "machine/nvram.h"
20 
21 
22 
23//**************************************************************************
24//  TYPE DEFINITIONS
25//**************************************************************************
26 
27// ======================> c64_dqbb_cartridge_device
28 
29class c64_dqbb_cartridge_device : public device_t,
30                          public device_c64_expansion_card_interface
31{
32public:
33   // construction/destruction
34   c64_dqbb_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
35 
36protected:
37   // device-level overrides
38   virtual void device_start();
39   virtual void device_reset();
40 
41   // device_c64_expansion_card_interface overrides
42   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
43   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
44 
45private:
46   int m_cs;
47   int m_we;
48};
49 
50 
51// device type definition
52extern const device_type C64_DQBB;
53 
54 
55#endif
src/mess/mess.mak
r14586r14587
132132SOUNDS += YM2612
133133#SOUNDS += YM3438
134134SOUNDS += YM3812
135#SOUNDS += YM3526
135SOUNDS += YM3526
136136#SOUNDS += Y8950
137137#SOUNDS += YMF262
138138#SOUNDS += YMF271
r14586r14587
771771   $(MESS_MACHINE)/c64_dela_ep64.o   \
772772   $(MESS_MACHINE)/c64_dela_ep7x8.o   \
773773   $(MESS_MACHINE)/c64_dinamic.o   \
774   $(MESS_MACHINE)/c64_dqbb.o   \
774775   $(MESS_MACHINE)/c64_easy_calc_result.o   \
775776   $(MESS_MACHINE)/c64_easyflash.o   \
776777   $(MESS_MACHINE)/c64_epyx_fast_load.o   \
777778   $(MESS_MACHINE)/c64_exos.o   \
779   $(MESS_MACHINE)/c64_final.o   \
778780   $(MESS_MACHINE)/c64_fun_play.o   \
779781   $(MESS_MACHINE)/c64_georam.o   \
780782   $(MESS_MACHINE)/c64_ieee488.o   \
r14586r14587
785787   $(MESS_MACHINE)/c64_multiscreen.o   \
786788   $(MESS_MACHINE)/c64_ocean.o   \
787789   $(MESS_MACHINE)/c64_pagefox.o   \
790   $(MESS_MACHINE)/c64_prophet64.o   \
788791   $(MESS_MACHINE)/c64_rex.o   \
789792   $(MESS_MACHINE)/c64_rex_ep256.o   \
790793   $(MESS_MACHINE)/c64_ross.o   \
794   $(MESS_MACHINE)/c64_sfx_sound_expander.o   \
791795   $(MESS_MACHINE)/c64_silverrock.o   \
792796   $(MESS_MACHINE)/c64_simons_basic.o   \
793797   $(MESS_MACHINE)/c64_stardos.o   \

Previous 15994 Revisions Next


© 1998-2018 The MESS Team