Previous 15994 Revisions Next

r14954 Tuesday 17th April, 2012 at 14:05:33 UTC by Curt Coder
[C64] Added support for the 4040+Fast Hack'em cartridge. [Curt Coder]
[hash]c64_cart.xml c64_flop.xml
[src/mess]mess.mak
[src/mess/machine]c64_ps64.h c64_stardos.c c64_sw8k.c* c64_sw8k.h* c64_tdos.c* c64_tdos.h* cbmipt.c cbmipt.h

hash/c64_cart.xml
r14953r14954
6262   List of mostly undumped cartridges:
6363   http://www.retroport.de/C64_C128_Hardware.html
6464   http://members.optusnet.com.au/spacetaxi64/DRIVERS/DRIVERS.htm
65   http://members.optusnet.com.au/spacetaxi64/SPEED-UP-CARTS/SPEED-C64-CPU.htm
6566
6667-->
6768<softwarelist name="c64_cart" description="Commodore 64 cartridges">
r14953r14954
7071      <description>VizaWrite 64</description>
7172      <year>1984</year>
7273      <publisher>Viza Software</publisher>
73      <!--
74      |===========================|
75      |=|      LS10    LS122  C   |
76      |=|                  R      |
77      |=|                         |
78      |=|                         |
79      |=|      ROM0  ROM2  ROM1   |
80      |=|                         |
81      |=|                         |
82      |=|                         |
83      |===========================|
8474
85      ROM0    - Mitsubishi M5L2764K 8Kx8 EPROM "U"
86      ROM1    - Mitsubishi M5L2764K 8Kx8 EPROM "3"
87      ROM2    - Mitsubishi M5L2764K 8Kx8 EPROM "2" (located on solder side)
88      R       - 56K
89      C       - 47uF
90
91      data and address lines are scrambled:
92      data = BITSWAP8(7,6,0,5,1,4,2,3)
93      address = BITSWAP16(15,14,13,12,7,8,6,9,5,11,4,3,2,10,1,0)
94      GAME:after reset GND for 1.1844s (74LS122 tW=0.45*R*C) then goes to Vcc
95      EXROM:GND
96      -->
9775      <part name="cart" interface="c64_cart">
9876         <feature name="slot" value="vizawrite" />
9977         <feature name="game" value="0" />
r14953r14954
11492      <description>Triton QD TDOS 1.2</description>
11593      <year>198?</year>
11694      <publisher>Radofin</publisher>
117      <!--
118      XM-2206-A (top)
119      XM-2205-A (bottom)
120                  |===========================|
121                  |            CN4            |
122                  |                           |
123                  |      ULA                  |
124                  |                           |
125                  |      6.5MHz               |
126                  |                           |
127                  |      SSDA                 |
128                  |                 LS175     |
129                  |                 LS367     |
130                  |            CN3            |
131                  |=========|||||||||=========|
132                            |||||||||
133              |=============|||||||||============|
134              |                CN2               |
135              |       LS00     LS02     LS138    |
136      |=======|                                  |
137      |=|             LS245        ROM           |
138      |=|                                        |
139      |=|                                        |
140      |=|                                     CN1|
141      |=|                                        |
142      |=|                                        |
143      |=|                                        |
144      |=|                             SW1        |
145      |==========================================|
14695
147      ROM    - Hitachi HN482764G 8Kx8 EPROM "TDOS 1.2"
148      ULA    - Ferranti ULA5RB073E1 XZ-2085-1
149      SSDA   - Motorola MC68A52P SSDA
150      CN1    - C64 expansion connector (pass-thru)
151      CN2,3  - 19x1 flat ribbon cable to other PCB
152      CN4    - 9 wires to 3" drive
153      SW1    - cartridge on/off switch
154      -->
15596      <part name="cart" interface="c64_cart">
15697         <feature name="slot" value="tdos" />
15798         <feature name="game" value="1" />
r14953r14954
215156      <description>Fast Load Cartridge v2</description>
216157      <year>1984</year>
217158      <publisher>Epyx</publisher>
218      <!--
219      -->
159
220160      <part name="cart" interface="c64_cart">
221161         <feature name="slot" value="epyxfastload" />
222162         <feature name="game" value="1" />
r14953r14954
232172      <description>Fast Load Cartridge v1</description>
233173      <year>1984</year>
234174      <publisher>Epyx</publisher>
235      <!--
236      -->
175
237176      <part name="cart" interface="c64_cart">
238177         <feature name="slot" value="epyxfastload" />
239178         <feature name="game" value="1" />
r14953r14954
412351      <description>Print Technik-Help</description>
413352      <year>19??</year>
414353      <publisher>&lt;unknown&gt;</publisher>
415      <!--
416      -->
354
417355      <part name="cart" interface="c64_cart">
418356         <feature name="game" value="1" />
419357         <feature name="exrom" value="0" />
r14953r14954
447385      </part>
448386   </software>
449387
450   <software name="4040fast" supported="no">
388   <software name="4040fast">
451389      <description>4040 + Fast Hack'Em</description>
452390      <year>1990</year>
453391      <publisher>Basement Boys Software</publisher>
454      <!--
455      |===========================|
456      |=|                         |
457      |=|                     SW1 |
458      |=|         ROM0            |
459      |=|                         |
460      |=|                         |
461      |=|         ROM1            |
462      |=|                         |
463      |=|                         |
464      |===========================|
465392
466      ROM0,1  - National Semiconductor NMC27C64Q 8Kx8 EPROM
467      SW1     - ROM selection switch
468      EXROM:GND
469      GAME:Vcc
470      -->
471393      <part name="cart" interface="c64_cart">
472         <feature name="slot" value="4040_fast_hack_em" />
394         <feature name="slot" value="sw8k" />
473395         <feature name="game" value="1" />
474396         <feature name="exrom" value="0" />
475397
r14953r14954
519441      </part>
520442   </software>
521443
522   <software name="xl80" supported="no">
444   <software name="xl80">
523445      <description>XL 80</description>
524446      <year>1984</year>
525447      <publisher>Data 20</publisher>
r14953r14954
750672      <description>Super Explode! v5.0</description>
751673      <year>1989</year>
752674      <publisher>The Soft Group</publisher>
753      <!--
754      Bankswitch register at $DF00, then executes code from the I/O2 area:
755675
756      0193: lda  #$80
757      0195: sta  $DF00
758      0198: jsr  $DF15
759      -->
760676      <part name="cart" interface="c64_cart">
761677         <feature name="slot" value="super_explode" />
762678         <feature name="game" value="1" />
r14953r14954
903819      <description>Stardos</description>
904820      <year>1986</year>
905821      <publisher>Starpoint Software</publisher>
906      <!--
907      |===========================|
908      |=|                         |
909      |=|   LS30                  |
910      |=|               LS157     |
911      |=|          LS00           |
912      |=|   ROM                   |
913      |=|          7407           |
914      |=|                         |
915      |=|                      SW1|
916      |===========================|
917822
918      ROM     - Toshiba TMM271128D-25 16Kx8 EPROM
919      -->
920823      <part name="cart" interface="c64_cart">
921824         <feature name="slot" value="stardos" />
922825         <feature name="game" value="1" />
r14953r14954
1056959      <description>Grappler CD</description>
1057960      <year>1984</year>
1058961      <publisher>Orange Micro</publisher>
1059      <!--
1060      -->
962
1061963      <part name="cart" interface="c64_cart">
1062964         <feature name="slot" value="grappler" />
1063965         <feature name="game" value="1" />
r14953r14954
12071109
12081110   <software name="flash8" supported="no">
12091111      <description>Flash 8</description>
1210      <year>19??</year>
1211      <publisher>&lt;unknown&gt;</publisher>
1112      <year>1992</year>
1113      <publisher>Elektronik-Technik-Peters</publisher>
12121114      <part name="cart" interface="c64_cart">
12131115         <feature name="slot" value="flash8" />
12141116         <feature name="exrom" value="0" />
hash/c64_flop.xml
r14953r14954
313313
314314      <part name="flop" interface="floppy_5_25">
315315         <dataarea name="flop" size="333744">
316            <rom name="basic-kaantaja[amersoft_1984].nbz" size="333744" crc="68ffade3" sha1="951e63d05c0911abcc247ff8327b7239fc0c9e86" offset="0" />
316            <rom name="basic-kaantaja[amersoft_1984].g64" size="333744" crc="68ffade3" sha1="951e63d05c0911abcc247ff8327b7239fc0c9e86" offset="0" />
317317         </dataarea>
318318      </part>
319319   </software>
320320
321   <software name="sfxse">
322      <description>SFX Sound Expander Test/Demo Disk</description>
323      <year>1985</year>
324      <publisher>Commodore</publisher>
325      <sharedfeat name="requirement" value="c64_cart:sfxse"/>
326   
327      <part name="flop1" interface="floppy_5_25">
328         <dataarea name="flop" size="174848">
329            <rom name="sfx.d64" size="174848" crc="23238762" sha1="a7c6c027af8d9d18a0a4e9d751ffec28cc863bf6" offset="0" status="baddump" />
330         </dataarea>
331      </part>
332   </software>
333
321334   <software name="sprbas64">
322335      <description>SuperBase 64 (Fin)</description>
323336      <year>1983</year>
r14953r14954
325338
326339      <part name="flop" interface="floppy_5_25">
327340         <dataarea name="flop" size="333744">
328            <rom name="superbase_64[precision_1983](finnish).nbz" size="333744" crc="83eb8f50" sha1="2cff03d08f15f8d66fad9d20233fc4d87f71395c" offset="0" />
341            <rom name="superbase_64[precision_1983](finnish).g64" size="333744" crc="83eb8f50" sha1="2cff03d08f15f8d66fad9d20233fc4d87f71395c" offset="0" />
329342         </dataarea>
330343      </part>
331344   </software>
src/mess/machine/c64_tdos.c
r0r14954
1/**********************************************************************
2
3    Triton QD TDOS cartridge emulation
4
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7
8**********************************************************************/
9
10/*
11
12    PCB Layout
13    ----------
14
15   XM-2206-A (top)
16   XM-2205-A (bottom)
17
18               |===========================|
19               |            CN4            |
20               |                           |
21               |      ULA                  |
22               |                           |
23               |      6.5MHz               |
24               |                           |
25               |      SSDA                 |
26               |                 LS175     |
27               |                 LS367     |
28               |            CN3            |
29               |=========|||||||||=========|
30                         |||||||||
31           |=============|||||||||============|
32           |                CN2               |
33           |       LS00     LS02     LS138    |
34   |=======|                                  |
35   |=|             LS245        ROM           |
36   |=|                                        |
37   |=|                                        |
38   |=|                                     CN1|
39   |=|                                        |
40   |=|                                        |
41   |=|                                        |
42   |=|                             SW1        |
43   |==========================================|
44
45   ROM    - Hitachi HN482764G 8Kx8 EPROM "TDOS 1.2"
46   ULA    - Ferranti ULA5RB073E1 XZ-2085-1 custom (?)
47   SSDA   - Motorola MC68A52P SSDA
48   CN1    - C64 expansion connector (pass-thru)
49   CN2,3  - 19x1 flat ribbon cable to other PCB
50   CN4    - 9 wires to 3" drive
51   SW1    - cartridge on/off switch
52
53*/
54
55#include "c64_tdos.h"
56
57
58
59//**************************************************************************
60//  MACROS/CONSTANTS
61//**************************************************************************
62
63#define MC68A52P_TAG      "mc6852"
64
65
66
67//**************************************************************************
68//  DEVICE DEFINITIONS
69//**************************************************************************
70
71const device_type C64_TDOS = &device_creator<c64_tdos_cartridge_device>;
72
73
74//-------------------------------------------------
75//  MC6852_INTERFACE( ssda_intf )
76//-------------------------------------------------
77
78static MC6852_INTERFACE( ssda_intf )
79{
80   0,
81   0,
82   DEVCB_NULL,
83   DEVCB_NULL,
84   DEVCB_NULL,
85   DEVCB_NULL,
86   DEVCB_NULL,
87   DEVCB_NULL,
88   DEVCB_NULL
89};
90
91
92//-------------------------------------------------
93//  floppy_interface tdos_floppy_interface
94//-------------------------------------------------
95
96static const floppy_interface tdos_floppy_interface =
97{
98   DEVCB_NULL,
99   DEVCB_NULL,
100   DEVCB_NULL,
101   DEVCB_NULL,
102   DEVCB_NULL,
103   FLOPPY_STANDARD_5_25_DSHD,
104   LEGACY_FLOPPY_OPTIONS_NAME(default),
105   "floppy_2_8",
106   NULL
107};
108
109
110//-------------------------------------------------
111//  C64_EXPANSION_INTERFACE( expansion_intf )
112//-------------------------------------------------
113
114READ8_MEMBER( c64_tdos_cartridge_device::dma_cd_r )
115{
116   return m_slot->dma_cd_r(offset);
117}
118
119WRITE8_MEMBER( c64_tdos_cartridge_device::dma_cd_w )
120{
121   m_slot->dma_cd_w(offset, data);
122}
123
124WRITE_LINE_MEMBER( c64_tdos_cartridge_device::irq_w )
125{
126   m_slot->irq_w(state);
127}
128
129WRITE_LINE_MEMBER( c64_tdos_cartridge_device::nmi_w )
130{
131   m_slot->nmi_w(state);
132}
133
134WRITE_LINE_MEMBER( c64_tdos_cartridge_device::dma_w )
135{
136   m_slot->dma_w(state);
137}
138
139WRITE_LINE_MEMBER( c64_tdos_cartridge_device::reset_w )
140{
141   m_slot->reset_w(state);
142}
143
144static C64_EXPANSION_INTERFACE( expansion_intf )
145{
146   DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, c64_tdos_cartridge_device, dma_cd_r),
147   DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, c64_tdos_cartridge_device, dma_cd_w),
148   DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c64_tdos_cartridge_device, irq_w),
149   DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c64_tdos_cartridge_device, nmi_w),
150   DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c64_tdos_cartridge_device, dma_w),
151   DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c64_tdos_cartridge_device, reset_w)
152};
153
154
155//-------------------------------------------------
156//  MACHINE_CONFIG_FRAGMENT( c64_multiscreen )
157//-------------------------------------------------
158
159static MACHINE_CONFIG_FRAGMENT( c64_tdos )
160   MCFG_MC6852_ADD(MC68A52P_TAG, XTAL_6_5MHz, ssda_intf)
161   MCFG_LEGACY_FLOPPY_DRIVE_ADD(FLOPPY_0, tdos_floppy_interface)
162
163   MCFG_C64_EXPANSION_SLOT_ADD(C64_EXPANSION_SLOT_TAG, 0, expansion_intf, c64_expansion_cards, NULL, NULL)
164MACHINE_CONFIG_END
165
166
167//-------------------------------------------------
168//  machine_config_additions - device-specific
169//  machine configurations
170//-------------------------------------------------
171
172machine_config_constructor c64_tdos_cartridge_device::device_mconfig_additions() const
173{
174   return MACHINE_CONFIG_NAME( c64_tdos );
175}
176
177
178
179//**************************************************************************
180//  LIVE DEVICE
181//**************************************************************************
182
183//-------------------------------------------------
184//  c64_tdos_cartridge_device - constructor
185//-------------------------------------------------
186
187c64_tdos_cartridge_device::c64_tdos_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
188   device_t(mconfig, C64_TDOS, "C64 TDOS cartridge", tag, owner, clock),
189   device_c64_expansion_card_interface(mconfig, *this),
190   m_ssda(*this, MC68A52P_TAG),
191    m_exp(*this, C64_EXPANSION_SLOT_TAG)   
192{
193}
194
195
196//-------------------------------------------------
197//  device_start - device-specific startup
198//-------------------------------------------------
199
200void c64_tdos_cartridge_device::device_start()
201{
202}
203
204
205//-------------------------------------------------
206//  device_reset - device-specific reset
207//-------------------------------------------------
208
209void c64_tdos_cartridge_device::device_reset()
210{
211}
212
213
214//-------------------------------------------------
215//  c64_cd_r - cartridge data read
216//-------------------------------------------------
217
218UINT8 c64_tdos_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
219{
220   UINT8 data = m_exp->cd_r(space, offset, roml, romh, io1, io2);
221
222   // TODO
223
224   return data;
225}
226
227
228//-------------------------------------------------
229//  c64_cd_w - cartridge data write
230//-------------------------------------------------
231
232void c64_tdos_cartridge_device::c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2)
233{
234   // TODO
235   m_exp->cd_w(space, offset, data, roml, romh, io1, io2);
236}
237
238
239//-------------------------------------------------
240//  c64_game_r - GAME read
241//-------------------------------------------------
242
243int c64_tdos_cartridge_device::c64_game_r(offs_t offset, int ba, int rw, int hiram)
244{
245   return m_exp->game_r(offset, ba, rw, hiram);
246}
247
248
249//-------------------------------------------------
250//  c64_exrom_r - EXROM read
251//-------------------------------------------------
252
253int c64_tdos_cartridge_device::c64_exrom_r(offs_t offset, int ba, int rw, int hiram)
254{
255   return m_exp->exrom_r(offset, ba, rw, hiram);
256}
src/mess/machine/c64_tdos.h
r0r14954
1/**********************************************************************
2
3    Triton QD TDOS 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 __TDOS__
13#define __TDOS__
14
15
16#include "emu.h"
17#include "imagedev/flopdrv.h"
18#include "machine/c64exp.h"
19#include "machine/cbmipt.h"
20#include "machine/mc6852.h"
21
22
23
24//**************************************************************************
25//  TYPE DEFINITIONS
26//**************************************************************************
27
28// ======================> c64_tdos_cartridge_device
29
30class c64_tdos_cartridge_device : public device_t,
31                          public device_c64_expansion_card_interface
32{
33public:
34   // construction/destruction
35   c64_tdos_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
40   // not really public
41   DECLARE_READ8_MEMBER( dma_cd_r );
42   DECLARE_WRITE8_MEMBER( dma_cd_w );
43   DECLARE_WRITE_LINE_MEMBER( irq_w );
44   DECLARE_WRITE_LINE_MEMBER( nmi_w );
45   DECLARE_WRITE_LINE_MEMBER( dma_w );
46   DECLARE_WRITE_LINE_MEMBER( reset_w );
47
48protected:
49   // device-level overrides
50   virtual void device_config_complete() { m_shortname = "c64_tdos"; }
51   virtual void device_start();
52   virtual void device_reset();
53
54   // device_c64_expansion_card_interface overrides
55   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
56   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
57   virtual int c64_game_r(offs_t offset, int ba, int rw, int hiram);
58   virtual int c64_exrom_r(offs_t offset, int ba, int rw, int hiram);
59
60private:
61   required_device<mc6852_device> m_ssda;
62   required_device<c64_expansion_slot_device> m_exp;
63};
64
65
66// device type definition
67extern const device_type C64_TDOS;
68
69
70#endif
src/mess/machine/cbmipt.c
r14953r14954
11881188   SLOT_INTERFACE("struct_basic", C64_STRUCTURED_BASIC)
11891189   SLOT_INTERFACE("super_explode", C64_SUPER_EXPLODE)
11901190   SLOT_INTERFACE("super_games", C64_SUPER_GAMES)
1191   SLOT_INTERFACE("sw8k", C64_SW8K)
11911192   SLOT_INTERFACE("system3", C64_SYSTEM3)
1193   SLOT_INTERFACE("tdos", C64_TDOS)
11921194   SLOT_INTERFACE("vizawrite", C64_VW64)
11931195   SLOT_INTERFACE("warp_speed", C64_WARP_SPEED)
11941196   SLOT_INTERFACE("westermann", C64_WESTERMANN)
src/mess/machine/cbmipt.h
r14953r14954
4848#include "machine/c64_structured_basic.h"
4949#include "machine/c64_super_explode.h"
5050#include "machine/c64_super_games.h"
51#include "machine/c64_sw8k.h"
5152#include "machine/c64_system3.h"
53#include "machine/c64_tdos.h"
5254#include "machine/c64_vw64.h"
5355#include "machine/c64_warp_speed.h"
5456#include "machine/c64_westermann.h"
src/mess/machine/c64_stardos.c
r14953r14954
77 
88**********************************************************************/
99 
10/*
11 
12   PCB Layout
13   ----------
14 
15   |===========================|
16   |=|                         |
17   |=|   LS30                  |
18   |=|               LS157     |
19   |=|          LS00           |
20   |=|   ROM                   |
21   |=|          7407           |
22   |=|                         |
23   |=|                      SW1|
24   |===========================|
25 
26   ROM     - Toshiba TMM271128D-25 16Kx8 EPROM
27 
28*/
29 
1030#include "c64_stardos.h"
1131 
1232 
src/mess/machine/c64_sw8k.c
r0r14954
1/**********************************************************************
2
3    C64 switchable 8K cartridge emulation
4
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7
8**********************************************************************/
9
10/*
11
12   4040 + Fast Hack'em
13
14   PCB Layout
15   ----------
16
17   |===========================|
18   |=|                         |
19   |=|                     SW1 |
20   |=|         ROM0            |
21   |=|                         |
22   |=|                         |
23   |=|         ROM1            |
24   |=|                         |
25   |=|                         |
26   |===========================|
27
28   ROM0,1  - National Semiconductor NMC27C64Q 8Kx8 EPROM
29   SW1     - ROM selection switch
30
31*/
32
33#include "c64_sw8k.h"
34
35
36
37//**************************************************************************
38//  DEVICE DEFINITIONS
39//**************************************************************************
40
41const device_type C64_SW8K = &device_creator<c64_switchable_8k_cartridge_device>;
42
43
44//-------------------------------------------------
45//  INPUT_PORTS( c64_easyflash )
46//-------------------------------------------------
47
48static INPUT_PORTS_START( c64_switchable_8k )
49   PORT_START("SW")
50   PORT_DIPNAME( 0x01, 0x00, "ROM Select" )
51   PORT_DIPSETTING(    0x00, "ROM 0" )
52   PORT_DIPSETTING(    0x01, "ROM 1" )
53INPUT_PORTS_END
54
55
56//-------------------------------------------------
57//  input_ports - device-specific input ports
58//-------------------------------------------------
59
60ioport_constructor c64_switchable_8k_cartridge_device::device_input_ports() const
61{
62   return INPUT_PORTS_NAME( c64_switchable_8k );
63}
64
65
66
67//**************************************************************************
68//  LIVE DEVICE
69//**************************************************************************
70
71//-------------------------------------------------
72//  c64_switchable_8k_cartridge_device - constructor
73//-------------------------------------------------
74
75c64_switchable_8k_cartridge_device::c64_switchable_8k_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
76   device_t(mconfig, C64_SW8K, "C64 Switchable 8K cartridge", tag, owner, clock),
77   device_c64_expansion_card_interface(mconfig, *this)
78{
79}
80
81
82//-------------------------------------------------
83//  device_start - device-specific startup
84//-------------------------------------------------
85
86void c64_switchable_8k_cartridge_device::device_start()
87{
88}
89
90
91//-------------------------------------------------
92//  device_reset - device-specific reset
93//-------------------------------------------------
94
95void c64_switchable_8k_cartridge_device::device_reset()
96{
97   m_bank = input_port_read(*this, "SW");
98}
99
100
101//-------------------------------------------------
102//  c64_cd_r - cartridge data read
103//-------------------------------------------------
104
105UINT8 c64_switchable_8k_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
106{
107   UINT8 data = 0;
108
109   if (!roml)
110   {
111      offs_t addr = (m_bank << 13) | (offset & 0x1fff);
112      data = m_roml[addr];
113   }
114
115   return data;
116}
src/mess/machine/c64_sw8k.h
r0r14954
1/**********************************************************************
2
3    C64 switchable 8K 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 __C64_SW8K__
13#define __C64_SW8K__
14
15
16#include "emu.h"
17#include "machine/c64exp.h"
18
19
20
21//**************************************************************************
22//  TYPE DEFINITIONS
23//**************************************************************************
24
25// ======================> c64_switchable_8k_cartridge_device
26
27class c64_switchable_8k_cartridge_device : public device_t,
28                                    public device_c64_expansion_card_interface
29{
30public:
31   // construction/destruction
32   c64_switchable_8k_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
33
34   // optional information overrides
35   virtual ioport_constructor device_input_ports() const;
36
37protected:
38   // device-level overrides
39    virtual void device_config_complete() { m_shortname = "c64_sw8k"; }
40   virtual void device_start();
41   virtual void device_reset();
42
43   // device_c64_expansion_card_interface overrides
44   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
45
46private:
47   int m_bank;
48};
49
50
51// device type definition
52extern const device_type C64_SW8K;
53
54
55#endif
src/mess/machine/c64_ps64.h
r14953r14954
2323//  TYPE DEFINITIONS
2424//**************************************************************************
2525
26// ======================> c64_รง_cartridge_device
26// ======================> c64_ps64_cartridge_device
2727
2828class c64_ps64_cartridge_device : public device_t,
2929                           public device_c64_expansion_card_interface
src/mess/mess.mak
r14953r14954
822822   $(MESS_MACHINE)/c64_structured_basic.o   \
823823   $(MESS_MACHINE)/c64_super_explode.o   \
824824   $(MESS_MACHINE)/c64_super_games.o   \
825   $(MESS_MACHINE)/c64_sw8k.o   \
825826   $(MESS_MACHINE)/c64_system3.o   \
827   $(MESS_MACHINE)/c64_tdos.o   \
826828   $(MESS_MACHINE)/c64_vw64.o   \
827829   $(MESS_MACHINE)/c64_warp_speed.o   \
828830   $(MESS_MACHINE)/c64_westermann.o   \

Previous 15994 Revisions Next


© 1998-2018 The MESS Team