Previous 15994 Revisions Next

r14458 Tuesday 14th February, 2012 at 17:54:47 UTC by Curt Coder
[C64] Added support for the following cartridge types: Dela EP256, Dela EP64, Rex EP256, Ross, Structured Basic. [Curt Coder]
[hash]c64_cart.xml
[src/mess]mess.mak mess_dev.lst
[src/mess/machine]c64_dela_ep256.c* c64_dela_ep256.h* c64_dela_ep64.c* c64_dela_ep64.h* c64_dela_ep7x8.c c64_dela_ep7x8.h c64_ieee488.c c64_ieee488.h c64_rex_ep256.c* c64_rex_ep256.h* c64_ross.c* c64_ross.h* c64_structured_basic.c* c64_structured_basic.h* cbmipt.c cbmipt.h

hash/c64_cart.xml
r14457r14458
10651065      </part>
10661066   </software>
10671067
1068   <software name="epbnk256" supported="no">
1068   <software name="rexep256">
10691069      <description>Eprom Bank 256k (Ger)</description>
10701070      <year>198?</year>
10711071      <publisher>Rex Datentechnik</publisher>
r14457r14458
12321232      </part>
12331233   </software>
12341234
1235   <software name="cbmieee">
1236      <description>Commodore IEEE-488</description>
1237      <year>19??</year>
1238      <publisher>Commodore</publisher>
1239      <part name="cart" interface="c64_cart">
1240         <feature name="slot" value="ieee488" />
1241         <feature name="exrom" value="0" />
1242         <feature name="game" value="1" />
1243         <dataarea name="roml" size="0x2000">
1244            <rom name="commodore ieee-488 cartridge.bin" size="0x1000" crc="e894e448" sha1="c62b88b73d79b485ebb250d56065dfa54b8baf4c" offset="0x0000" />
1245         </dataarea>
1246      </part>
1247   </software>
1248
12351249   <software name="tforieee" supported="no">
12361250      <description>Technofor IEEE Interface</description>
12371251      <year>1984</year>
r14457r14458
12601274      </part>
12611275   </software>
12621276
1277   <software name="ep7x8">
1278      <description>7x8K-EPROM-Bank (Ger)</description>
1279      <year>19??</year>
1280      <publisher>Dela Elektronik</publisher>
1281      <part name="cart" interface="c64_cart">
1282         <feature name="slot" value="ep7x8" />
1283         <feature name="exrom" value="0" />
1284         <feature name="game" value="1" />
1285         <dataarea name="roml" size="0x2000">
1286            <rom name="dela_7x8k-eprom-bank.bin" size="0x2000" crc="546d7ea8" sha1="6ab7a279144bcaaa20e7b2d12d67d3ed5cc3f6b6" offset="0x0000" />
1287         </dataarea>
1288      </part>
1289   </software>
1290
12631291   <software name="c64link">
12641292      <description>C64-Link</description>
12651293      <year>1982</year>
r14457r14458
44104438      </part>
44114439   </software>
44124440
4413   <software name="256eprom">
4441   <software name="delep256">
44144442      <description>256k Eprom System r.5</description>
4415      <year>19??</year>
4443      <year>198?</year>
44164444      <publisher>Dela Elektronik</publisher>
44174445      <part name="cart" interface="c64_cart">
44184446         <feature name="slot" value="dela_ep256" />
r14457r14458
44244452      </part>
44254453   </software>
44264454
4455   <software name="ep64">
4456      <description>64k Eprom System</description>
4457      <year>198?</year>
4458      <publisher>Dela Elektronik</publisher>
4459      <part name="cart" interface="c64_cart">
4460         <feature name="slot" value="ep64" />
4461         <feature name="exrom" value="0" />
4462         <feature name="game" value="1" />
4463         <dataarea name="roml" size="0x2000">
4464            <rom name="dela-ep64.bin" size="0x2000" crc="9c431173" sha1="a28a4d902f7e03bc7e3ee638620d5467c0dd2ddd" offset="0x0000" />
4465         </dataarea>
4466      </part>
4467   </software>
4468
44274469   <software name="64doctor">
44284470      <description>64 Doctor</description>
44294471      <year>1988</year>
r14457r14458
50275069         </dataarea>
50285070      </part>
50295071   </software>
5072   
5073   <software name="subasram">
5074      <description>Super Basic Ram</description>
5075      <year>1983</year>
5076      <publisher>MadMax</publisher>
5077      <part name="cart" interface="c64_cart">
5078         <feature name="game" value="1" />
5079         <feature name="exrom" value="0" />
5080         <dataarea name="roml" size="0x2000">
5081            <rom name="super_basic_ram.bin" size="0x2000" crc="f92fe027" sha1="b0fd39d030244a1932031f1bb8f67cbf375b0b15" offset="0x0000" />
5082         </dataarea>
5083      </part>
5084   </software>
50305085
50315086   <software name="speeddos">
50325087      <description>Speed DOS Copy ROM</description>
r14457r14458
56365691      </part>
56375692   </software>
56385693
5639   <software name="formel64">
5694   <software name="formel64" supported="no">
56405695      <description>Formel 64</description>
56415696      <year>1986</year>
56425697      <publisher>Grewe Computertechnik</publisher>
r14457r14458
56515706      </part>
56525707   </software>
56535708
5654   <software name="magicfor" cloneof="formel64">
5709   <software name="magicfor" cloneof="formel64" supported="no">
56555710      <description>Magic Formel</description>
56565711      <year>1986</year>
56575712      <publisher>Grewe Computertechnik</publisher>
r14457r14458
56665721      </part>
56675722   </software>
56685723
5669   <software name="magicf20" cloneof="formel64">
5724   <software name="magicf20" cloneof="formel64" supported="no">
56705725      <description>Magic Formel 2.0</description>
56715726      <year>1987</year>
56725727      <publisher>Grewe Computertechnik</publisher>
src/mess/machine/cbmipt.c
r14457r14458
11431143SLOT_INTERFACE_END
11441144
11451145SLOT_INTERFACE_START( c64_expansion_cards )
1146   SLOT_INTERFACE("ep7x8", C64_DELA_EP7X8)
11471146   SLOT_INTERFACE("georam", C64_GEORAM)
1148   SLOT_INTERFACE("ieee488", C64_IEEE488)
11491147   SLOT_INTERFACE("xl80", C64_XL80)
11501148   
1151   // the following should not be visible in the UI
1149   // the following need ROMs from the software list
1150   SLOT_INTERFACE("ieee488", C64_IEEE488)
11521151   SLOT_INTERFACE("standard", C64_STD)
11531152   SLOT_INTERFACE("comal80", C64_COMAL80)
1153   SLOT_INTERFACE("dela_ep256", C64_DELA_EP256)
1154   SLOT_INTERFACE("ep64", C64_DELA_EP64)
1155   SLOT_INTERFACE("ep7x8", C64_DELA_EP7X8)
11541156   SLOT_INTERFACE("dinamic", C64_DINAMIC)
11551157   SLOT_INTERFACE("easycalcres", C64_EASY_CALC_RESULT)
11561158   SLOT_INTERFACE("epyxfastload", C64_EPYX_FAST_LOAD)
r14457r14458
11621164   SLOT_INTERFACE("ocean", C64_OCEAN)
11631165   SLOT_INTERFACE("pagefox", C64_PAGEFOX)
11641166   SLOT_INTERFACE("rex", C64_REX)
1167   SLOT_INTERFACE("rex_ep256", C64_REX_EP256)
1168   SLOT_INTERFACE("ross", C64_ROSS)
11651169   SLOT_INTERFACE("silverrock", C64_SILVERROCK)
11661170   SLOT_INTERFACE("simons_basic", C64_SIMONS_BASIC)
1171   SLOT_INTERFACE("struct_basic", C64_STRUCTURED_BASIC)
11671172   SLOT_INTERFACE("super_explode", C64_SUPER_EXPLODE)
11681173   SLOT_INTERFACE("super_games", C64_SUPER_GAMES)
11691174   SLOT_INTERFACE("system3", C64_SYSTEM3)
src/mess/machine/cbmipt.h
r14457r14458
44#define CBMIPT_H_
55
66#include "machine/c64_comal80.h"
7#include "machine/c64_dela_ep256.h"
8#include "machine/c64_dela_ep64.h"
79#include "machine/c64_dela_ep7x8.h"
810#include "machine/c64_dinamic.h"
911#include "machine/c64_easy_calc_result.h"
r14457r14458
1820#include "machine/c64_ocean.h"
1921#include "machine/c64_pagefox.h"
2022#include "machine/c64_rex.h"
23#include "machine/c64_rex_ep256.h"
24#include "machine/c64_ross.h"
2125#include "machine/c64_silverrock.h"
2226#include "machine/c64_simons_basic.h"
2327#include "machine/c64_std.h"
28#include "machine/c64_structured_basic.h"
2429#include "machine/c64_super_explode.h"
2530#include "machine/c64_super_games.h"
2631#include "machine/c64_system3.h"
src/mess/machine/c64_ieee488.c
r14457r14458
2727 
2828 
2929//-------------------------------------------------
30//  ROM( c64_ieee488 )
31//-------------------------------------------------
32 
33ROM_START( c64_ieee488 )
34   ROM_REGION( 0x1000, "roml", 0 )
35   ROM_LOAD( "commodore ieee-488 cartridge.u3", 0x0000, 0x1000, CRC(e894e448) SHA1(c62b88b73d79b485ebb250d56065dfa54b8baf4c) )
36ROM_END
37 
38 
39//-------------------------------------------------
40//  rom_region - device-specific ROM region
41//-------------------------------------------------
42 
43const rom_entry *c64_ieee488_device::device_rom_region() const
44{
45   return ROM_NAME( c64_ieee488 );
46}
47 
48 
49//-------------------------------------------------
5030//  tpi6525_interface tpi_intf
5131//-------------------------------------------------
5232 
r14457r14458
268248 
269249void c64_ieee488_device::device_start()
270250{
271   m_roml = subregion("roml")->base();
272251}
273252 
274253 
src/mess/machine/c64_ieee488.h
r14457r14458
3030// ======================> c64_ieee488_device
3131 
3232class c64_ieee488_device : public device_t,
33                   public device_c64_expansion_card_interface
33                      public device_c64_expansion_card_interface
3434{
3535public:
3636   // construction/destruction
3737   c64_ieee488_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
3838 
3939   // optional information overrides
40   virtual const rom_entry *device_rom_region() const;
4140   virtual machine_config_constructor device_mconfig_additions() const;
4241 
4342   // not really public
r14457r14458
5251   
5352protected:
5453   // device-level overrides
55    virtual void device_config_complete() { m_shortname = "c64_ieee"; }
5654   virtual void device_start();
5755   virtual void device_reset();
5856 
src/mess/machine/c64_ross.c
r0r14458
1/**********************************************************************
2 
3    Ross cartridge emulation
4 
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7 
8**********************************************************************/
9 
10#include "c64_ross.h"
11 
12 
13 
14//**************************************************************************
15//  DEVICE DEFINITIONS
16//**************************************************************************
17 
18const device_type C64_ROSS = &device_creator<c64_ross_cartridge_device>;
19 
20 
21 
22//**************************************************************************
23//  LIVE DEVICE
24//**************************************************************************
25 
26//-------------------------------------------------
27//  c64_ross_cartridge_device - constructor
28//-------------------------------------------------
29 
30c64_ross_cartridge_device::c64_ross_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
31   device_t(mconfig, C64_ROSS, "C64 Ross 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_ross_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_ross_cartridge_device::device_reset()
53{
54   m_exrom = 0;
55   m_game = 0;
56 
57   m_bank = 0;
58}
59 
60 
61//-------------------------------------------------
62//  c64_cd_r - cartridge data read
63//-------------------------------------------------
64 
65UINT8 c64_ross_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
66{
67   UINT8 data = 0;
68   
69   if (!roml || !romh)
70   {
71      offs_t addr = (m_bank << 14) | (offset & 0x3fff);
72       
73      data = m_roml[addr & m_roml_mask];
74   }
75 
76   return data;
77}
78 
79 
80//-------------------------------------------------
81//  c64_cd_w - cartridge data write
82//-------------------------------------------------
83 
84void c64_ross_cartridge_device::c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2)
85{
86   if (!io1)
87   {
88      m_bank = 1;
89   }
90   else if (!io2)
91   {
92      m_exrom = 1;
93      m_game = 1;
94   }
95}
src/mess/machine/c64_ross.h
r0r14458
1/**********************************************************************
2 
3    Ross 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 __ROSS__
13#define __ROSS__
14 
15#define ADDRESS_MAP_MODERN
16 
17#include "emu.h"
18#include "imagedev/cartslot.h"
19#include "machine/c64exp.h"
20 
21 
22 
23//**************************************************************************
24//  TYPE DEFINITIONS
25//**************************************************************************
26 
27// ======================> c64_ross_cartridge_device
28 
29class c64_ross_cartridge_device : public device_t,
30                          public device_c64_expansion_card_interface
31{
32public:
33   // construction/destruction
34   c64_ross_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   UINT8 m_bank;
47};
48 
49 
50// device type definition
51extern const device_type C64_ROSS;
52 
53 
54 
55#endif
src/mess/machine/c64_dela_ep64.c
r0r14458
1/**********************************************************************
2 
3    Dela 64KB EPROM cartridge emulation
4 
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7 
8**********************************************************************/
9 
10#include "c64_dela_ep64.h"
11 
12 
13 
14//**************************************************************************
15//  DEVICE DEFINITIONS
16//**************************************************************************
17 
18const device_type C64_DELA_EP64 = &device_creator<c64_dela_ep64_cartridge_device>;
19 
20 
21//-------------------------------------------------
22//  ROM( c64_dela_ep64 )
23//-------------------------------------------------
24 
25ROM_START( c64_dela_ep64 )
26   ROM_REGION( 0x10000, "rom", 0 )
27   ROM_CART_LOAD( "rom1", 0x0000, 0x08000, ROM_MIRROR )
28   ROM_CART_LOAD( "rom2", 0x8000, 0x08000, ROM_MIRROR )
29ROM_END
30 
31 
32//-------------------------------------------------
33//  rom_region - device-specific ROM region
34//-------------------------------------------------
35 
36const rom_entry *c64_dela_ep64_cartridge_device::device_rom_region() const
37{
38   return ROM_NAME( c64_dela_ep64 );
39}
40 
41 
42//-------------------------------------------------
43//  MACHINE_CONFIG_FRAGMENT( c64_dela_ep64 )
44//-------------------------------------------------
45 
46static MACHINE_CONFIG_FRAGMENT( c64_dela_ep64 )
47   MCFG_CARTSLOT_ADD("rom1")
48   MCFG_CARTSLOT_EXTENSION_LIST("rom,bin")
49   MCFG_CARTSLOT_ADD("rom2")
50   MCFG_CARTSLOT_EXTENSION_LIST("rom,bin")
51MACHINE_CONFIG_END
52 
53 
54//-------------------------------------------------
55//  machine_config_additions - device-specific
56//  machine configurations
57//-------------------------------------------------
58 
59machine_config_constructor c64_dela_ep64_cartridge_device::device_mconfig_additions() const
60{
61   return MACHINE_CONFIG_NAME( c64_dela_ep64 );
62}
63 
64 
65//**************************************************************************
66//  LIVE DEVICE
67//**************************************************************************
68 
69//-------------------------------------------------
70//  c64_dela_ep64_cartridge_device - constructor
71//-------------------------------------------------
72 
73c64_dela_ep64_cartridge_device::c64_dela_ep64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
74   device_t(mconfig, C64_DELA_EP64, "C64 Rex 64KB EPROM cartridge", tag, owner, clock),
75   device_c64_expansion_card_interface(mconfig, *this)
76{
77}
78 
79 
80//-------------------------------------------------
81//  device_start - device-specific startup
82//-------------------------------------------------
83 
84void c64_dela_ep64_cartridge_device::device_start()
85{
86   m_rom = subregion("rom")->base();
87   
88   // state saving
89   save_item(NAME(m_bank));
90   save_item(NAME(m_reset));
91   save_item(NAME(m_rom0_ce));
92   save_item(NAME(m_rom1_ce));
93   save_item(NAME(m_rom2_ce));
94}
95 
96 
97//-------------------------------------------------
98//  device_reset - device-specific reset
99//-------------------------------------------------
100 
101void c64_dela_ep64_cartridge_device::device_reset()
102{
103   m_exrom = 0;
104 
105   m_reset = 1;
106}
107 
108 
109//-------------------------------------------------
110//  c64_cd_r - cartridge data read
111//-------------------------------------------------
112 
113UINT8 c64_dela_ep64_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
114{
115   UINT8 data = 0;
116   
117   if (!roml)
118   {
119      if (m_reset)
120      {
121         data = m_roml[offset & 0x1fff];
122      }
123      else
124      {
125         offs_t addr = (m_bank << 13) | (offset & 0x1fff);
126         
127         if (!m_rom0_ce) data |= m_roml[offset & 0x1fff];
128         if (!m_rom1_ce) data |= m_rom[0x0000 + addr];
129         if (!m_rom2_ce) data |= m_rom[0x8000 + addr];
130      }
131   }
132 
133   return data;
134}
135 
136 
137//-------------------------------------------------
138//  c64_cd_w - cartridge data write
139//-------------------------------------------------
140 
141void c64_dela_ep64_cartridge_device::c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2)
142{
143   if (!io1)
144   {
145      /*
146       
147         bit      description
148         
149         0      IC6 _CE
150         1      IC5 _CE
151         2       
152         3      IC4 _CE
153         4      A13
154         5      A14
155         6       
156         7      EXROM
157       
158      */
159       
160      m_reset = 0;
161       
162      m_rom0_ce = BIT(data, 3);
163      m_rom1_ce = BIT(data, 1);
164      m_rom2_ce = BIT(data, 0);
165 
166      m_bank = (data >> 4) & 0x03;
167       
168      m_exrom = BIT(data, 7);
169   }
170}
src/mess/machine/c64_dela_ep64.h
r0r14458
1/**********************************************************************
2 
3    Dela 64KB EPROM 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 __DELA_EP64__
13#define __DELA_EP64__
14 
15#define ADDRESS_MAP_MODERN
16 
17#include "emu.h"
18#include "imagedev/cartslot.h"
19#include "machine/c64exp.h"
20 
21 
22 
23//**************************************************************************
24//  TYPE DEFINITIONS
25//**************************************************************************
26 
27// ======================> c64_dela_ep64_cartridge_device
28 
29class c64_dela_ep64_cartridge_device : public device_t,
30                              public device_c64_expansion_card_interface
31{
32public:
33   // construction/destruction
34   c64_dela_ep64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
35 
36   // optional information overrides
37   virtual const rom_entry *device_rom_region() const;
38   virtual machine_config_constructor device_mconfig_additions() const;
39 
40protected:
41   // device-level overrides
42   virtual void device_config_complete() { m_shortname = "ep64"; }
43   virtual void device_start();
44   virtual void device_reset();
45 
46   // device_c64_expansion_card_interface overrides
47   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
48   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
49   
50private:
51   UINT8 *m_rom;
52 
53   UINT8 m_bank;
54   int m_reset;
55   int m_rom0_ce;
56   int m_rom1_ce;
57   int m_rom2_ce;
58};
59 
60 
61// device type definition
62extern const device_type C64_DELA_EP64;
63 
64 
65 
66#endif
src/mess/machine/c64_dela_ep256.c
r0r14458
1/**********************************************************************
2 
3    Dela 256KB EPROM cartridge emulation
4 
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7 
8**********************************************************************/
9 
10#include "c64_dela_ep256.h"
11 
12 
13 
14//**************************************************************************
15//  DEVICE DEFINITIONS
16//**************************************************************************
17 
18const device_type C64_DELA_EP256 = &device_creator<c64_dela_ep256_cartridge_device>;
19 
20 
21//-------------------------------------------------
22//  ROM( c64_dela_ep256 )
23//-------------------------------------------------
24 
25ROM_START( c64_dela_ep256 )
26   ROM_REGION( 0x40000, "rom", 0 )
27   ROM_CART_LOAD( "rom1", 0x00000, 0x08000, ROM_MIRROR )
28   ROM_CART_LOAD( "rom2", 0x08000, 0x08000, ROM_MIRROR )
29   ROM_CART_LOAD( "rom3", 0x10000, 0x08000, ROM_MIRROR )
30   ROM_CART_LOAD( "rom4", 0x18000, 0x08000, ROM_MIRROR )
31   ROM_CART_LOAD( "rom5", 0x20000, 0x08000, ROM_MIRROR )
32   ROM_CART_LOAD( "rom6", 0x28000, 0x08000, ROM_MIRROR )
33   ROM_CART_LOAD( "rom7", 0x30000, 0x08000, ROM_MIRROR )
34   ROM_CART_LOAD( "rom8", 0x38000, 0x08000, ROM_MIRROR )
35ROM_END
36 
37 
38//-------------------------------------------------
39//  rom_region - device-specific ROM region
40//-------------------------------------------------
41 
42const rom_entry *c64_dela_ep256_cartridge_device::device_rom_region() const
43{
44   return ROM_NAME( c64_dela_ep256 );
45}
46 
47 
48//-------------------------------------------------
49//  MACHINE_CONFIG_FRAGMENT( c64_dela_ep256 )
50//-------------------------------------------------
51 
52static MACHINE_CONFIG_FRAGMENT( c64_dela_ep256 )
53   MCFG_CARTSLOT_ADD("rom1")
54   MCFG_CARTSLOT_EXTENSION_LIST("rom,bin")
55   MCFG_CARTSLOT_ADD("rom2")
56   MCFG_CARTSLOT_EXTENSION_LIST("rom,bin")
57   MCFG_CARTSLOT_ADD("rom3")
58   MCFG_CARTSLOT_EXTENSION_LIST("rom,bin")
59   MCFG_CARTSLOT_ADD("rom4")
60   MCFG_CARTSLOT_EXTENSION_LIST("rom,bin")
61   MCFG_CARTSLOT_ADD("rom5")
62   MCFG_CARTSLOT_EXTENSION_LIST("rom,bin")
63   MCFG_CARTSLOT_ADD("rom6")
64   MCFG_CARTSLOT_EXTENSION_LIST("rom,bin")
65   MCFG_CARTSLOT_ADD("rom7")
66   MCFG_CARTSLOT_EXTENSION_LIST("rom,bin")
67   MCFG_CARTSLOT_ADD("rom8")
68   MCFG_CARTSLOT_EXTENSION_LIST("rom,bin")
69MACHINE_CONFIG_END
70 
71 
72//-------------------------------------------------
73//  machine_config_additions - device-specific
74//  machine configurations
75//-------------------------------------------------
76 
77machine_config_constructor c64_dela_ep256_cartridge_device::device_mconfig_additions() const
78{
79   return MACHINE_CONFIG_NAME( c64_dela_ep256 );
80}
81 
82 
83 
84//**************************************************************************
85//  LIVE DEVICE
86//**************************************************************************
87 
88//-------------------------------------------------
89//  c64_dela_ep256_cartridge_device - constructor
90//-------------------------------------------------
91 
92c64_dela_ep256_cartridge_device::c64_dela_ep256_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
93   device_t(mconfig, C64_DELA_EP256, "C64 Rex 256KB EPROM cartridge", tag, owner, clock),
94   device_c64_expansion_card_interface(mconfig, *this)
95{
96}
97 
98 
99//-------------------------------------------------
100//  device_start - device-specific startup
101//-------------------------------------------------
102 
103void c64_dela_ep256_cartridge_device::device_start()
104{
105   m_rom = subregion("rom")->base();
106   
107   // state saving
108   save_item(NAME(m_bank));
109   save_item(NAME(m_reset));
110}
111 
112 
113//-------------------------------------------------
114//  device_reset - device-specific reset
115//-------------------------------------------------
116 
117void c64_dela_ep256_cartridge_device::device_reset()
118{
119   m_reset = 1;
120   m_bank = 0;
121   m_exrom = 0;
122}
123 
124 
125//-------------------------------------------------
126//  c64_cd_r - cartridge data read
127//-------------------------------------------------
128 
129UINT8 c64_dela_ep256_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
130{
131   UINT8 data = 0;
132   
133   if (!roml)
134   {
135      if (m_reset)
136      {
137         data = m_roml[offset & 0x1fff];
138      }
139      else
140      {
141         offs_t addr = (m_bank << 13) | (offset & 0x1fff);
142         data = m_rom[addr];
143      }
144   }
145 
146   return data;
147}
148 
149 
150//-------------------------------------------------
151//  c64_cd_w - cartridge data write
152//-------------------------------------------------
153 
154void c64_dela_ep256_cartridge_device::c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2)
155{
156   if (!io2 && ((offset & 0xf0) == 0xa0))
157   {
158      /*
159       
160         bit      description
161         
162         0      socket selection bit 0
163         1      socket selection bit 1
164         2      socket selection bit 2
165         3
166         4      bank selection bit 0
167         5      bank selection bit 1
168         6       
169         7      EXROM
170       
171      */
172       
173      m_reset = 0;
174       
175      m_bank = ((data & 0x07) << 2) | ((data >> 4) & 0x03);
176       
177      m_exrom = BIT(data, 7);
178   }
179}
src/mess/machine/c64_dela_ep256.h
r0r14458
1/**********************************************************************
2 
3    Dela 256KB EPROM 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 __DELA_EP256__
13#define __DELA_EP256__
14 
15#define ADDRESS_MAP_MODERN
16 
17#include "emu.h"
18#include "imagedev/cartslot.h"
19#include "machine/c64exp.h"
20 
21 
22 
23//**************************************************************************
24//  TYPE DEFINITIONS
25//**************************************************************************
26 
27// ======================> c64_dela_ep256_cartridge_device
28 
29class c64_dela_ep256_cartridge_device : public device_t,
30                               public device_c64_expansion_card_interface
31{
32public:
33   // construction/destruction
34   c64_dela_ep256_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
35 
36   // optional information overrides
37   virtual const rom_entry *device_rom_region() const;
38   virtual machine_config_constructor device_mconfig_additions() const;
39 
40protected:
41   // device-level overrides
42   virtual void device_config_complete() { m_shortname = "delep256"; }
43   virtual void device_start();
44   virtual void device_reset();
45 
46   // device_c64_expansion_card_interface overrides
47   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
48   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
49   
50private:
51   UINT8 *m_rom;
52 
53   UINT8 m_bank;
54   int m_reset;
55};
56 
57 
58// device type definition
59extern const device_type C64_DELA_EP256;
60 
61 
62 
63#endif
src/mess/machine/c64_rex_ep256.c
r0r14458
1/**********************************************************************
2 
3    Rex Datentechnik 256KB EPROM cartridge emulation
4 
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7 
8**********************************************************************/
9 
10#include "c64_rex_ep256.h"
11 
12 
13 
14//**************************************************************************
15//  DEVICE DEFINITIONS
16//**************************************************************************
17 
18const device_type C64_REX_EP256 = &device_creator<c64_rex_ep256_cartridge_device>;
19 
20 
21//-------------------------------------------------
22//  ROM( c64_rex_ep256 )
23//-------------------------------------------------
24 
25ROM_START( c64_rex_ep256 )
26   ROM_REGION( 0x40000, "rom", 0 )
27   ROM_CART_LOAD( "rom1", 0x00000, 0x08000, ROM_MIRROR )
28   ROM_CART_LOAD( "rom2", 0x08000, 0x08000, ROM_MIRROR )
29   ROM_CART_LOAD( "rom3", 0x10000, 0x08000, ROM_MIRROR )
30   ROM_CART_LOAD( "rom4", 0x18000, 0x08000, ROM_MIRROR )
31   ROM_CART_LOAD( "rom5", 0x20000, 0x08000, ROM_MIRROR )
32   ROM_CART_LOAD( "rom6", 0x28000, 0x08000, ROM_MIRROR )
33   ROM_CART_LOAD( "rom7", 0x30000, 0x08000, ROM_MIRROR )
34   ROM_CART_LOAD( "rom8", 0x38000, 0x08000, ROM_MIRROR )
35ROM_END
36 
37 
38//-------------------------------------------------
39//  rom_region - device-specific ROM region
40//-------------------------------------------------
41 
42const rom_entry *c64_rex_ep256_cartridge_device::device_rom_region() const
43{
44   return ROM_NAME( c64_rex_ep256 );
45}
46 
47 
48//-------------------------------------------------
49//  MACHINE_CONFIG_FRAGMENT( c64_rex_ep256 )
50//-------------------------------------------------
51 
52static MACHINE_CONFIG_FRAGMENT( c64_rex_ep256 )
53   MCFG_CARTSLOT_ADD("rom1")
54   MCFG_CARTSLOT_EXTENSION_LIST("rom,bin")
55   MCFG_CARTSLOT_ADD("rom2")
56   MCFG_CARTSLOT_EXTENSION_LIST("rom,bin")
57   MCFG_CARTSLOT_ADD("rom3")
58   MCFG_CARTSLOT_EXTENSION_LIST("rom,bin")
59   MCFG_CARTSLOT_ADD("rom4")
60   MCFG_CARTSLOT_EXTENSION_LIST("rom,bin")
61   MCFG_CARTSLOT_ADD("rom5")
62   MCFG_CARTSLOT_EXTENSION_LIST("rom,bin")
63   MCFG_CARTSLOT_ADD("rom6")
64   MCFG_CARTSLOT_EXTENSION_LIST("rom,bin")
65   MCFG_CARTSLOT_ADD("rom7")
66   MCFG_CARTSLOT_EXTENSION_LIST("rom,bin")
67   MCFG_CARTSLOT_ADD("rom8")
68   MCFG_CARTSLOT_EXTENSION_LIST("rom,bin")
69MACHINE_CONFIG_END
70 
71 
72//-------------------------------------------------
73//  machine_config_additions - device-specific
74//  machine configurations
75//-------------------------------------------------
76 
77machine_config_constructor c64_rex_ep256_cartridge_device::device_mconfig_additions() const
78{
79   return MACHINE_CONFIG_NAME( c64_rex_ep256 );
80}
81 
82 
83 
84//**************************************************************************
85//  LIVE DEVICE
86//**************************************************************************
87 
88//-------------------------------------------------
89//  c64_rex_ep256_cartridge_device - constructor
90//-------------------------------------------------
91 
92c64_rex_ep256_cartridge_device::c64_rex_ep256_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
93   device_t(mconfig, C64_REX_EP256, "C64 Rex 256KB EPROM cartridge", tag, owner, clock),
94   device_c64_expansion_card_interface(mconfig, *this)
95{
96}
97 
98 
99//-------------------------------------------------
100//  device_start - device-specific startup
101//-------------------------------------------------
102 
103void c64_rex_ep256_cartridge_device::device_start()
104{
105   m_rom = subregion("rom")->base();
106   
107   // state saving
108   save_item(NAME(m_bank));
109   save_item(NAME(m_reset));
110}
111 
112 
113//-------------------------------------------------
114//  device_reset - device-specific reset
115//-------------------------------------------------
116 
117void c64_rex_ep256_cartridge_device::device_reset()
118{
119   m_exrom = 0;
120   m_reset = 1;
121   m_bank = 0;
122}
123 
124 
125//-------------------------------------------------
126//  c64_cd_r - cartridge data read
127//-------------------------------------------------
128 
129UINT8 c64_rex_ep256_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
130{
131   UINT8 data = 0;
132   
133   if (!roml)
134   {
135      if (m_reset)
136      {
137         data = m_roml[offset & 0x1fff];
138      }
139      else
140      {
141         offs_t addr = (m_bank << 13) | (offset & 0x1fff);
142         data = m_rom[addr];
143      }
144   }
145   else if (!io2)
146   {
147      if ((offset & 0xf0) == 0xc0)
148      {
149         m_exrom = 1;
150      }
151      else if ((offset & 0xf0) == 0xe0)
152      {
153         m_exrom = 0;
154      }
155   }
156 
157   return data;
158}
159 
160 
161//-------------------------------------------------
162//  c64_cd_w - cartridge data write
163//-------------------------------------------------
164 
165void c64_rex_ep256_cartridge_device::c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2)
166{
167   if (!io2 && ((offset & 0xf0) == 0xa0))
168   {
169      /*
170       
171         bit      description
172         
173         0      socket selection bit 0
174         1      socket selection bit 1
175         2      socket selection bit 2
176         3
177         4
178         5      bank selection bit 0
179         6      bank selection bit 1
180         7
181       
182      */
183       
184      m_reset = 0;
185       
186      m_bank = ((data & 0x07) << 2) | ((data >> 5) & 0x03);
187   }
188}
src/mess/machine/c64_rex_ep256.h
r0r14458
1/**********************************************************************
2 
3    Rex Datentechnik 256KB EPROM 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 __REX_EP256__
13#define __REX_EP256__
14 
15#define ADDRESS_MAP_MODERN
16 
17#include "emu.h"
18#include "imagedev/cartslot.h"
19#include "machine/c64exp.h"
20 
21 
22 
23//**************************************************************************
24//  TYPE DEFINITIONS
25//**************************************************************************
26 
27// ======================> c64_rex_ep256_cartridge_device
28 
29class c64_rex_ep256_cartridge_device : public device_t,
30                              public device_c64_expansion_card_interface
31{
32public:
33   // construction/destruction
34   c64_rex_ep256_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
35 
36   // optional information overrides
37   virtual const rom_entry *device_rom_region() const;
38   virtual machine_config_constructor device_mconfig_additions() const;
39 
40protected:
41   // device-level overrides
42   virtual void device_config_complete() { m_shortname = "rexep256"; }
43   virtual void device_start();
44   virtual void device_reset();
45 
46   // device_c64_expansion_card_interface overrides
47   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
48   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
49   
50private:
51   UINT8 *m_rom;
52 
53   UINT8 m_bank;
54   int m_reset;
55};
56 
57 
58// device type definition
59extern const device_type C64_REX_EP256;
60 
61 
62 
63#endif
src/mess/machine/c64_dela_ep7x8.c
r14457r14458
2323//-------------------------------------------------
2424 
2525ROM_START( c64_dela_ep7x8 )
26   ROM_REGION( 0x10000, "roml", 0 )
27   ROM_LOAD( "dela_7x8k-eprom-bank.bin", 0x0000, 0x2000, CRC(546d7ea8) SHA1(6ab7a279144bcaaa20e7b2d12d67d3ed5cc3f6b6) )
26   ROM_REGION( 0x10000, "rom", 0 )
2827   ROM_CART_LOAD( "rom1", 0x2000, 0x2000, ROM_MIRROR )
2928   ROM_CART_LOAD( "rom2", 0x4000, 0x2000, ROM_MIRROR )
3029   ROM_CART_LOAD( "rom3", 0x6000, 0x2000, ROM_MIRROR )
r14457r14458
9998 
10099void c64_dela_ep7x8_cartridge_device::device_start()
101100{
102   m_roml = subregion("roml")->base();
101   m_rom = subregion("rom")->base();
103102   
104103   // state saving
105104   save_item(NAME(m_bank));
r14457r14458
129128   {
130129      offs_t addr = offset & 0x1fff;
131130       
132      if (!BIT(m_bank, 0)) data |= m_roml[0x0000 + addr];
133      if (!BIT(m_bank, 1)) data |= m_roml[0x2000 + addr];
134      if (!BIT(m_bank, 2)) data |= m_roml[0x4000 + addr];
135      if (!BIT(m_bank, 3)) data |= m_roml[0x6000 + addr];
136      if (!BIT(m_bank, 4)) data |= m_roml[0x8000 + addr];
137      if (!BIT(m_bank, 5)) data |= m_roml[0xa000 + addr];
138      if (!BIT(m_bank, 6)) data |= m_roml[0xc000 + addr];
139      if (!BIT(m_bank, 7)) data |= m_roml[0xe000 + addr];
131      if (!BIT(m_bank, 0)) data |= m_roml[addr];
132      if (!BIT(m_bank, 1)) data |= m_rom[0x2000 + addr];
133      if (!BIT(m_bank, 2)) data |= m_rom[0x4000 + addr];
134      if (!BIT(m_bank, 3)) data |= m_rom[0x6000 + addr];
135      if (!BIT(m_bank, 4)) data |= m_rom[0x8000 + addr];
136      if (!BIT(m_bank, 5)) data |= m_rom[0xa000 + addr];
137      if (!BIT(m_bank, 6)) data |= m_rom[0xc000 + addr];
138      if (!BIT(m_bank, 7)) data |= m_rom[0xe000 + addr];
140139   }
141140 
142141   return data;
r14457r14458
153152   {
154153      m_bank = data;
155154       
156      if (data == 0xff)
157      {
158         m_exrom = 1;
159      }
160      else
161      {
162         m_exrom = 0;
163      }
155      m_exrom = (data == 0xff);
164156   }
165157}
src/mess/machine/c64_dela_ep7x8.h
r14457r14458
4848   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
4949   
5050private:
51   UINT8 *m_rom;
52   
5153   UINT8 m_bank;
5254};
5355 
src/mess/machine/c64_structured_basic.c
r0r14458
1/**********************************************************************
2 
3    Structured Basic cartridge emulation
4 
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7 
8**********************************************************************/
9 
10#include "c64_structured_basic.h"
11 
12 
13 
14//**************************************************************************
15//  DEVICE DEFINITIONS
16//**************************************************************************
17 
18const device_type C64_STRUCTURED_BASIC = &device_creator<c64_structured_basic_cartridge_device>;
19 
20 
21 
22//**************************************************************************
23//  LIVE DEVICE
24//**************************************************************************
25 
26//-------------------------------------------------
27//  c64_structured_basic_cartridge_device - constructor
28//-------------------------------------------------
29 
30c64_structured_basic_cartridge_device::c64_structured_basic_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
31   device_t(mconfig, C64_STRUCTURED_BASIC, "C64 Structured Basic 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_structured_basic_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_structured_basic_cartridge_device::device_reset()
53{
54   m_exrom = 0;
55 
56   m_bank = 0;
57}
58 
59 
60//-------------------------------------------------
61//  c64_cd_r - cartridge data read
62//-------------------------------------------------
63 
64UINT8 c64_structured_basic_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
65{
66   UINT8 data = 0;
67   
68   if (!roml)
69   {
70      offs_t addr = (m_bank << 13) | (offset & 0x1fff);
71       
72      data = m_roml[addr];
73   }
74 
75   return data;
76}
77 
78 
79//-------------------------------------------------
80//  c64_cd_w - cartridge data write
81//-------------------------------------------------
82 
83void c64_structured_basic_cartridge_device::c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2)
84{
85   if (!io1)
86   {
87      switch (data & 0x03)
88      {
89      case 0:
90      case 1:
91         m_exrom = 0;
92         m_bank = 0;
93         break;
94       
95      case 2:
96         m_exrom = 0;
97         m_bank = 1;
98         break;
99 
100      case 3:
101         m_exrom = 1;
102         m_bank = 0;
103         break;
104      }
105   }
106}
src/mess/machine/c64_structured_basic.h
r0r14458
1/**********************************************************************
2 
3    Structured Basic 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 __STRUCTURED_BASIC__
13#define __STRUCTURED_BASIC__
14 
15#define ADDRESS_MAP_MODERN
16 
17#include "emu.h"
18#include "imagedev/cartslot.h"
19#include "machine/c64exp.h"
20 
21 
22 
23//**************************************************************************
24//  TYPE DEFINITIONS
25//**************************************************************************
26 
27// ======================> c64_structured_basic_cartridge_device
28 
29class c64_structured_basic_cartridge_device : public device_t,
30                                   public device_c64_expansion_card_interface
31{
32public:
33   // construction/destruction
34   c64_structured_basic_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   UINT8 m_bank;
47};
48 
49 
50// device type definition
51extern const device_type C64_STRUCTURED_BASIC;
52 
53 
54 
55#endif
src/mess/mess_dev.lst
r14457r14458
150150VICTOR9K_KEYBOARD
151151TANDY2K_KEYBOARD
152152WANGPC_KEYBOARD
153C64_IEEE488
154C64_DELA_EP7X8
src/mess/mess.mak
r14457r14458
754754   $(MESS_MACHINE)/c64exp.o   \
755755   $(MESS_MACHINE)/c64user.o   \
756756   $(MESS_MACHINE)/c64_comal80.o   \
757   $(MESS_MACHINE)/c64_dela_ep256.o   \
758   $(MESS_MACHINE)/c64_dela_ep64.o   \
757759   $(MESS_MACHINE)/c64_dela_ep7x8.o   \
758760   $(MESS_MACHINE)/c64_dinamic.o   \
759761   $(MESS_MACHINE)/c64_easy_calc_result.o   \
r14457r14458
768770   $(MESS_MACHINE)/c64_ocean.o   \
769771   $(MESS_MACHINE)/c64_pagefox.o   \
770772   $(MESS_MACHINE)/c64_rex.o   \
773   $(MESS_MACHINE)/c64_rex_ep256.o   \
774   $(MESS_MACHINE)/c64_ross.o   \
771775   $(MESS_MACHINE)/c64_silverrock.o   \
772776   $(MESS_MACHINE)/c64_simons_basic.o   \
773777   $(MESS_MACHINE)/c64_std.o   \
778   $(MESS_MACHINE)/c64_structured_basic.o   \
774779   $(MESS_MACHINE)/c64_super_explode.o   \
775780   $(MESS_MACHINE)/c64_super_games.o   \
776781   $(MESS_MACHINE)/c64_system3.o   \

Previous 15994 Revisions Next


© 1998-2018 The MESS Team