Previous 15994 Revisions Next

r15020 Tuesday 24th April, 2012 at 06:47:27 UTC by Miodrag Milanović
Source cleanup (nw)
[hash]c64_flop.xml
[src/lib/formats]ap2_dsk.c
[src/mess/devices]appldriv.c
[src/mess/drivers]a2600.c abc80x.c adam.c elwro800.c vt520.c x68k.c
[src/mess/includes]abc80x.h apple2gs.h cosmicos.h dgn_beta.h fm7.h gba.h osborne1.h sage2.h tmc2000e.h
[src/mess/machine]a2cffa.c a2scsi.c a2ssc.c a2ssc.h a2swyft.c a2thunderclock.c a2videoterm.c abc80kb.c abc80kb.h apple2.c c64_cpm.c c64_currah_speech.c c64_currah_speech.h c64_dqbb.h c64_easy_calc_result.c c64_ide64.c c64_ide64.h c64_ocean.c c64_ps64.c c64_ps64.h c64_stardos.c c64_sw8k.c c64_sw8k.h c64_tdos.c c64_tdos.h c64exp.c c65.c isa_ibm_mfc.h sms.c vic20_megacart.c z80ne.c

hash/c64_flop.xml
r15019r15020
323323      <year>1985</year>
324324      <publisher>Commodore</publisher>
325325      <sharedfeat name="requirement" value="c64_cart:sfxse"/>
326   
326
327327      <part name="flop1" interface="floppy_5_25">
328328         <dataarea name="flop" size="174848">
329329            <rom name="sfx.d64" size="174848" crc="23238762" sha1="a7c6c027af8d9d18a0a4e9d751ffec28cc863bf6" offset="0" status="baddump" />
r15019r15020
350350      <year>1989</year>
351351      <publisher>Koulun erityispalvelu</publisher>
352352      <sharedfeat name="requirement" value="c64_cart:ps64"/>
353   
353
354354      <part name="flop1" interface="floppy_5_25">
355355         <dataarea name="flop" size="174848">
356356            <rom name="kats-1.d64" size="174848" crc="076e961a" sha1="011922880a227d388a77b5c179d7540d6118469d" offset="0" />
r15019r15020
363363      <year>1989</year>
364364      <publisher>Koulun erityispalvelu</publisher>
365365      <sharedfeat name="requirement" value="c64_cart:ps64"/>
366   
366
367367      <part name="flop1" interface="floppy_5_25">
368368         <dataarea name="flop" size="174848">
369369            <rom name="kats-2.d64" size="174848" crc="44a5f655" sha1="eecb240de09b8adfaac68190e490984ea7e62304" offset="0" />
r15019r15020
376376      <year>1986</year>
377377      <publisher>Koulun erityispalvelu</publisher>
378378      <sharedfeat name="requirement" value="c64_cart:ps64"/>
379   
379
380380      <part name="flop1" interface="floppy_5_25">
381381         <dataarea name="flop" size="174848">
382382            <rom name="kertolasku.d64" size="174848" crc="78f4ad0d" sha1="4ef1552535c26bf6c884f463d69f6e11fe152a9c" offset="0" />
r15019r15020
389389      <year>1988</year>
390390      <publisher>Koulun erityispalvelu</publisher>
391391      <sharedfeat name="requirement" value="c64_cart:ps64"/>
392   
392
393393      <part name="flop1" interface="floppy_5_25">
394394         <dataarea name="flop" size="174848">
395395            <rom name="lrs-harjoitus.d64" size="174848" crc="ed5ce5ae" sha1="ca4eabc7d41db9f56e434ba8f38d7f24ad2fe5b7" offset="0" />
r15019r15020
402402      <year>1985</year>
403403      <publisher>Koulun erityispalvelu</publisher>
404404      <sharedfeat name="requirement" value="c64_cart:ps64"/>
405   
405
406406      <part name="flop1" interface="floppy_5_25">
407407         <dataarea name="flop" size="174848">
408408            <rom name="opin_kirjoittamaan.d64" size="174848" crc="6125f441" sha1="e1d908644529eb3c0e4fef4be7b394a697d6bb9a" offset="0" />
409409         </dataarea>
410410      </part>
411   </software>   
411   </software>
412412
413413   <software name="opinluk1">
414414      <description>Opin lukemaan 1 (Fin)</description>
415415      <year>1985</year>
416416      <publisher>Koulun erityispalvelu</publisher>
417417      <sharedfeat name="requirement" value="c64_cart:ps64"/>
418   
418
419419      <part name="flop1" interface="floppy_5_25">
420420         <dataarea name="flop" size="174848">
421421            <rom name="opin_lukemaan_1.d64" size="174848" crc="70b4d79e" sha1="0f7ba68acfdca1b3fb8fc137b5b2c2292b6fc397" offset="0" />
r15019r15020
428428      <year>1985</year>
429429      <publisher>Koulun erityispalvelu</publisher>
430430      <sharedfeat name="requirement" value="c64_cart:ps64"/>
431   
431
432432      <part name="flop1" interface="floppy_5_25">
433433         <dataarea name="flop" size="174848">
434434            <rom name="opin_lukemaan_2.d64" size="174848" crc="58cb5f41" sha1="5cc321cb82f144b3faa88dbcb9b591657cdc66cf" offset="0" />
r15019r15020
441441      <year>1986</year>
442442      <publisher>Koulun erityispalvelu</publisher>
443443      <sharedfeat name="requirement" value="c64_cart:ps64"/>
444   
444
445445      <part name="flop1" interface="floppy_5_25">
446446         <dataarea name="flop" size="174848">
447447            <rom name="ps-english.d64" size="174848" crc="18d66daa" sha1="35d9871fb337ada74f0788d4910dfba08d1d4c15" offset="0" />
r15019r15020
454454      <year>1989</year>
455455      <publisher>Koulun erityispalvelu</publisher>
456456      <sharedfeat name="requirement" value="c64_cart:ps64"/>
457   
457
458458      <part name="flop1" interface="floppy_5_25">
459459         <dataarea name="flop" size="174848">
460460            <rom name="ps-memory.d64" size="174848" crc="08a635cd" sha1="cd797378c35272ca65f35784fda7f4e42029d8ea" offset="0" />
r15019r15020
467467      <year>1986</year>
468468      <publisher>Koulun erityispalvelu</publisher>
469469      <sharedfeat name="requirement" value="c64_cart:ps64"/>
470   
470
471471      <part name="flop1" interface="floppy_5_25">
472472         <dataarea name="flop" size="174848">
473473            <rom name="puhuva_venttipeli.d64" size="174848" crc="16661038" sha1="69c67d4e3c2f15285549df4cb19caae44ed2dc2a" offset="0" />
r15019r15020
480480      <year>1986</year>
481481      <publisher>Koulun erityispalvelu</publisher>
482482      <sharedfeat name="requirement" value="c64_cart:ps64"/>
483   
483
484484      <part name="flop1" interface="floppy_5_25">
485485         <dataarea name="flop" size="174848">
486486            <rom name="vahennyslasku.d64" size="174848" crc="e03d35ae" sha1="2fa26e548c577b647f3e23a93851c7cf4dc257ce" offset="0" />
r15019r15020
493493      <year>198?</year>
494494      <publisher>Koulun erityispalvelu</publisher>
495495      <sharedfeat name="requirement" value="c64_cart:ps64"/>
496   
496
497497      <part name="flop1" interface="floppy_5_25">
498498         <dataarea name="flop" size="174848">
499499            <rom name="valm-harj1.d64" size="174848" crc="190cf6d4" sha1="7ca9176a83c48f5b9aebbc3e38e9a847da9ffc3c" offset="0" />
r15019r15020
506506      <year>198?</year>
507507      <publisher>Koulun erityispalvelu</publisher>
508508      <sharedfeat name="requirement" value="c64_cart:ps64"/>
509   
509
510510      <part name="flop1" interface="floppy_5_25">
511511         <dataarea name="flop" size="174848">
512512            <rom name="yhteenlasku.d64" size="174848" crc="c02a0821" sha1="17e03cd9d81ee2bf328e802354c149945a319450" offset="0" />
src/lib/formats/ap2_dsk.c
r15019r15020
613613
614614bool a2_16sect_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
615615{
616/*      TODO: rewrite me properly
617      UINT8 sector_data[(256)*16];
618      memset(sector_data, 0, sizeof(sector_data));
616/*      TODO: rewrite me properly
617        UINT8 sector_data[(256)*16];
618        memset(sector_data, 0, sizeof(sector_data));
619619
620      desc_s sectors[16];
621      int format = 0;
622      int pos_data = 0;
620        desc_s sectors[16];
621        int format = 0;
622        int pos_data = 0;
623623
624      int head_count = 1;
624        int head_count = 1;
625625
626      for(int track=0; track < 35; track++) {
627            for(int head=0; head < head_count; head++) {
628                  for(int si=0; si<16; si++) {
629                        UINT8 *data = sector_data + (256)*si;
630                        sectors[si].data = data;
631                        sectors[si].size = 256;
632                        sectors[si].sector_id = si;
633                        sectors[si].sector_info = format;
634                        io_generic_read(io, data, pos_data, 256);
635                        pos_data += 256;
636                  }
637                  generate_track(mac_gcr, track, head, sectors, 16, 3104*16, image);
638            }
639      }
640      return true;*/
626        for(int track=0; track < 35; track++) {
627                for(int head=0; head < head_count; head++) {
628                        for(int si=0; si<16; si++) {
629                                UINT8 *data = sector_data + (256)*si;
630                                sectors[si].data = data;
631                                sectors[si].size = 256;
632                                sectors[si].sector_id = si;
633                                sectors[si].sector_info = format;
634                                io_generic_read(io, data, pos_data, 256);
635                                pos_data += 256;
636                        }
637                        generate_track(mac_gcr, track, head, sectors, 16, 3104*16, image);
638                }
639        }
640        return true;*/
641641      return false; // I hope that throws an error...
642642}
643643
src/mess/devices/appldriv.c
r15019r15020
1111#include "formats/ap2_dsk.h"
1212
1313// our parent's device is the Disk II card (Apple II) or main driver (Mac, IIgs)
14// either way, get the drive from there.                         
14// either way, get the drive from there.
1515#define PARENT_FLOPPY_0 "^floppy0"
1616#define PARENT_FLOPPY_1 "^floppy1"
1717#define PARENT_FLOPPY_2 "^floppy2"
src/mess/machine/c64_cpm.c
r15019r15020
9090            device_set_input_line(m_maincpu, INPUT_LINE_RESET, CLEAR_LINE);
9191            m_maincpu->set_state(Z80_PC, 0);
9292           m_reset = 0;
93        }     
93        }
9494   }
9595   else
9696   {
r15019r15020
9999   }
100100 
101101/*
102   // NOTE: the following is how it actually works once the Z80 core has been rewritten
102    // NOTE: the following is how it actually works once the Z80 core has been rewritten
103103 
104   // C64 DMA
105   m_slot->dma_w(m_enabled ? ASSERT_LINE : CLEAR_LINE);
104    // C64 DMA
105    m_slot->dma_w(m_enabled ? ASSERT_LINE : CLEAR_LINE);
106106 
107   // Z80 BUSRQ
108   int busrq = !(m_enabled & !m_ba) ? CLEAR_LINE : ASSERT_LINE;
109   m_maincpu->set_input_line(Z80_INPUT_LINE_BUSRQ, busrq);
107    // Z80 BUSRQ
108    int busrq = !(m_enabled & !m_ba) ? CLEAR_LINE : ASSERT_LINE;
109    m_maincpu->set_input_line(Z80_INPUT_LINE_BUSRQ, busrq);
110110 
111   // Z80 WAIT
112   m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, m_enabled ? CLEAR_LINE : ASSERT_LINE);
111    // Z80 WAIT
112    m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, m_enabled ? CLEAR_LINE : ASSERT_LINE);
113113*/
114114}
115115 
src/mess/machine/c64_tdos.c
r15019r15020
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}
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
r15019r15020
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
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/c64_ocean.c
r15019r15020
99 
1010/*
1111 
12   Chase H.Q. 2: Special Criminal Investigation
12    Chase H.Q. 2: Special Criminal Investigation
1313 
14   PCB Layout
15   ----------
14    PCB Layout
15    ----------
1616 
17   |===========================|
18   |=|                   LS02  |
19   |=|                         |
20   |=|                         |
21   |=|    ROM0   ROM1          |
22   |=|                   LS273 |
23   |=|                         |
24   |=|                         |
25   |=|                         |
26   |===========================|
17    |===========================|
18    |=|                   LS02  |
19    |=|                         |
20    |=|                         |
21    |=|    ROM0   ROM1          |
22    |=|                   LS273 |
23    |=|                         |
24    |=|                         |
25    |=|                         |
26    |===========================|
2727 
28   ROM0,1 - 28-pin ROM (Toshiba TC531000 pinout, markings scratched off)
28    ROM0,1 - 28-pin ROM (Toshiba TC531000 pinout, markings scratched off)
2929 
3030*/
3131 
src/mess/machine/z80ne.c
r15019r15020
704704}
705705
706706READ8_DEVICE_HANDLER(lx390_reset_bank)
707{   
707{
708708   z80ne_state *state = device->machine().driver_data<z80ne_state>();
709709   offs_t pc;
710710
src/mess/machine/abc80kb.c
r15019r15020
1/**********************************************************************
2
3    Luxor ABC-80 keyboard emulation
4
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7
8**********************************************************************/
9
10/*
11
12PCB Layout
13----------
14
15KTC 65-01870-001 (dated 1978)
16PCB-002B
17
18    |---------------|
19|---|      CN1      |---------------------------------------------------|
20|                                                                       |
21|   LS06    LS04    LS04                        LS06    LS00    LS123   |
22|   LS74                    PROM        MCU             4051    900C    |
23|                                                                       |
24|                                                                       |
25|                                                                       |
26|                                                                       |
27|                                                                       |
28|                                                                       |
29|                                                                       |
30|                                                                       |
31|-----------------------------------------------------------------------|
32
33Notes:
34    All IC's shown.
35
36    MCU         - General Instruments 30293B-013 20-04592-013 (?)
37    PROM        - Synertek N82S141N 512x8 bipolar PROM "053"
38    900C        - Ferranti Interdesign 900C custom (?)
39    CN1         - keyboard data connector
40
41*/
42
43/*
44
45PCB Layout
46----------
47
48KTC A65-01870-001 (dated 1983)
49PCB-201C
50
51    |---------------|
52|---|      CN1      |---------------------------------------------------|
53|                                                                       |
54|   LS06    LS04    LS04                                LS00    LS123   |
55|                                       MCU             4051    900C    |
56|                                                                       |
57|                                                                       |
58|                                                                       |
59|                                                                       |
60|                                                                       |
61|                                                                       |
62|                                                                       |
63|                                                                       |
64|-----------------------------------------------------------------------|
65
66Notes:
67    All IC's shown.
68
69    MCU         - General Instruments 30293B-047 20-04592-047 (?)
70    900C        - Ferranti Interdesign 900C custom (?)
71    CN1         - keyboard data connector
72
73*/
74
75#include "abc80kb.h"
76
77
78
79//**************************************************************************
80//  MACROS / CONSTANTS
81//**************************************************************************
82
83#define I8048_TAG       "i8048"
84
85
86
87//**************************************************************************
88//  DEVICE DEFINITIONS
89//**************************************************************************
90
91const device_type ABC80_KEYBOARD = &device_creator<abc80_keyboard_device>;
92
93
94//-------------------------------------------------
95//  device_config_complete - perform any
96//  operations now that the configuration is
97//  complete
98//-------------------------------------------------
99
100void abc80_keyboard_device::device_config_complete()
101{
102    // inherit a copy of the static data
103    const abc80_keyboard_interface *intf = reinterpret_cast<const abc80_keyboard_interface *>(static_config());
104    if (intf != NULL)
105        *static_cast<abc80_keyboard_interface *>(this) = *intf;
106
107    // or initialize to defaults if none provided
108    else
109    {
110        memset(&m_out_keydown_cb, 0, sizeof(m_out_keydown_cb));
111    }
112
113    m_shortname = "abc80kb";
114}
115
116
117//-------------------------------------------------
118//  ROM( abc80_keyboard )
119//-------------------------------------------------
120
121ROM_START( abc80_keyboard )
122    ROM_REGION( 0x400, I8048_TAG, 0 )
123    ROM_LOAD( "053.z5", 0x0000, 0x0400, NO_DUMP )
124ROM_END
125
126
127//-------------------------------------------------
128//  rom_region - device-specific ROM region
129//-------------------------------------------------
130
131const rom_entry *abc80_keyboard_device::device_rom_region() const
132{
133   return ROM_NAME( abc80_keyboard );
134}
135
136
137//-------------------------------------------------
138//  ADDRESS_MAP( abc80_keyboard_io )
139//-------------------------------------------------
140
141static ADDRESS_MAP_START( abc80_keyboard_io, AS_IO, 8, abc80_keyboard_device )
142ADDRESS_MAP_END
143
144
145//-------------------------------------------------
146//  MACHINE_DRIVER( abc80_keyboard )
147//-------------------------------------------------
148
149static MACHINE_CONFIG_FRAGMENT( abc80_keyboard )
150    MCFG_CPU_ADD(I8048_TAG, I8048, XTAL_5_9904MHz)
151    MCFG_CPU_IO_MAP(abc80_keyboard_io)
152MACHINE_CONFIG_END
153
154
155//-------------------------------------------------
156//  machine_config_additions - device-specific
157//  machine configurations
158//-------------------------------------------------
159
160machine_config_constructor abc80_keyboard_device::device_mconfig_additions() const
161{
162   return MACHINE_CONFIG_NAME( abc80_keyboard );
163}
164
165
166//-------------------------------------------------
167//  INPUT_PORTS( abc80_keyboard )
168//-------------------------------------------------
169
170INPUT_PORTS_START( abc80_keyboard )
171INPUT_PORTS_END
172
173
174//-------------------------------------------------
175//  input_ports - device-specific input ports
176//-------------------------------------------------
177
178ioport_constructor abc80_keyboard_device::device_input_ports() const
179{
180   return INPUT_PORTS_NAME( abc80_keyboard );
181}
182
183
184
185//**************************************************************************
186//  LIVE DEVICE
187//**************************************************************************
188
189//-------------------------------------------------
190//  abc80_keyboard_device - constructor
191//-------------------------------------------------
192
193abc80_keyboard_device::abc80_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
194    : device_t(mconfig, ABC80_KEYBOARD, "ABC-80 Keyboard", tag, owner, clock),
195      m_maincpu(*this, I8048_TAG)
196{
197}
198
199
200//-------------------------------------------------
201//  device_start - device-specific startup
202//-------------------------------------------------
203
204void abc80_keyboard_device::device_start()
205{
206    // resolve callbacks
207    m_out_keydown_func.resolve(m_out_keydown_cb, *this);
208}
209
210
211//-------------------------------------------------
212//  device_reset - device-specific reset
213//-------------------------------------------------
214
215void abc80_keyboard_device::device_reset()
216{
217}
218
219
220//-------------------------------------------------
221//  data_r - keyboard data read
222//-------------------------------------------------
223
224READ8_MEMBER( abc80_keyboard_device::data_r )
225{
226    return 0;
227}
1/**********************************************************************
2 
3    Luxor ABC-80 keyboard emulation
4 
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7 
8**********************************************************************/
9 
10/*
11 
12PCB Layout
13----------
14 
15KTC 65-01870-001 (dated 1978)
16PCB-002B
17 
18    |---------------|
19|---|      CN1      |---------------------------------------------------|
20|                                                                       |
21|   LS06    LS04    LS04                        LS06    LS00    LS123   |
22|   LS74                    PROM        MCU             4051    900C    |
23|                                                                       |
24|                                                                       |
25|                                                                       |
26|                                                                       |
27|                                                                       |
28|                                                                       |
29|                                                                       |
30|                                                                       |
31|-----------------------------------------------------------------------|
32 
33Notes:
34    All IC's shown.
35 
36    MCU         - General Instruments 30293B-013 20-04592-013 (?)
37    PROM        - Synertek N82S141N 512x8 bipolar PROM "053"
38    900C        - Ferranti Interdesign 900C custom (?)
39    CN1         - keyboard data connector
40 
41*/
42 
43/*
44 
45PCB Layout
46----------
47 
48KTC A65-01870-001 (dated 1983)
49PCB-201C
50 
51    |---------------|
52|---|      CN1      |---------------------------------------------------|
53|                                                                       |
54|   LS06    LS04    LS04                                LS00    LS123   |
55|                                       MCU             4051    900C    |
56|                                                                       |
57|                                                                       |
58|                                                                       |
59|                                                                       |
60|                                                                       |
61|                                                                       |
62|                                                                       |
63|                                                                       |
64|-----------------------------------------------------------------------|
65 
66Notes:
67    All IC's shown.
68 
69    MCU         - General Instruments 30293B-047 20-04592-047 (?)
70    900C        - Ferranti Interdesign 900C custom (?)
71    CN1         - keyboard data connector
72 
73*/
74 
75#include "abc80kb.h"
76 
77 
78 
79//**************************************************************************
80//  MACROS / CONSTANTS
81//**************************************************************************
82 
83#define I8048_TAG       "i8048"
84 
85 
86 
87//**************************************************************************
88//  DEVICE DEFINITIONS
89//**************************************************************************
90 
91const device_type ABC80_KEYBOARD = &device_creator<abc80_keyboard_device>;
92 
93 
94//-------------------------------------------------
95//  device_config_complete - perform any
96//  operations now that the configuration is
97//  complete
98//-------------------------------------------------
99 
100void abc80_keyboard_device::device_config_complete()
101{
102    // inherit a copy of the static data
103    const abc80_keyboard_interface *intf = reinterpret_cast<const abc80_keyboard_interface *>(static_config());
104    if (intf != NULL)
105        *static_cast<abc80_keyboard_interface *>(this) = *intf;
106 
107    // or initialize to defaults if none provided
108    else
109    {
110        memset(&m_out_keydown_cb, 0, sizeof(m_out_keydown_cb));
111    }
112 
113    m_shortname = "abc80kb";
114}
115 
116 
117//-------------------------------------------------
118//  ROM( abc80_keyboard )
119//-------------------------------------------------
120 
121ROM_START( abc80_keyboard )
122    ROM_REGION( 0x400, I8048_TAG, 0 )
123    ROM_LOAD( "053.z5", 0x0000, 0x0400, NO_DUMP )
124ROM_END
125 
126 
127//-------------------------------------------------
128//  rom_region - device-specific ROM region
129//-------------------------------------------------
130 
131const rom_entry *abc80_keyboard_device::device_rom_region() const
132{
133   return ROM_NAME( abc80_keyboard );
134}
135 
136 
137//-------------------------------------------------
138//  ADDRESS_MAP( abc80_keyboard_io )
139//-------------------------------------------------
140 
141static ADDRESS_MAP_START( abc80_keyboard_io, AS_IO, 8, abc80_keyboard_device )
142ADDRESS_MAP_END
143 
144 
145//-------------------------------------------------
146//  MACHINE_DRIVER( abc80_keyboard )
147//-------------------------------------------------
148 
149static MACHINE_CONFIG_FRAGMENT( abc80_keyboard )
150    MCFG_CPU_ADD(I8048_TAG, I8048, XTAL_5_9904MHz)
151    MCFG_CPU_IO_MAP(abc80_keyboard_io)
152MACHINE_CONFIG_END
153 
154 
155//-------------------------------------------------
156//  machine_config_additions - device-specific
157//  machine configurations
158//-------------------------------------------------
159 
160machine_config_constructor abc80_keyboard_device::device_mconfig_additions() const
161{
162   return MACHINE_CONFIG_NAME( abc80_keyboard );
163}
164 
165 
166//-------------------------------------------------
167//  INPUT_PORTS( abc80_keyboard )
168//-------------------------------------------------
169 
170INPUT_PORTS_START( abc80_keyboard )
171INPUT_PORTS_END
172 
173 
174//-------------------------------------------------
175//  input_ports - device-specific input ports
176//-------------------------------------------------
177 
178ioport_constructor abc80_keyboard_device::device_input_ports() const
179{
180   return INPUT_PORTS_NAME( abc80_keyboard );
181}
182 
183 
184 
185//**************************************************************************
186//  LIVE DEVICE
187//**************************************************************************
188 
189//-------------------------------------------------
190//  abc80_keyboard_device - constructor
191//-------------------------------------------------
192 
193abc80_keyboard_device::abc80_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
194    : device_t(mconfig, ABC80_KEYBOARD, "ABC-80 Keyboard", tag, owner, clock),
195      m_maincpu(*this, I8048_TAG)
196{
197}
198 
199 
200//-------------------------------------------------
201//  device_start - device-specific startup
202//-------------------------------------------------
203 
204void abc80_keyboard_device::device_start()
205{
206    // resolve callbacks
207    m_out_keydown_func.resolve(m_out_keydown_cb, *this);
208}
209 
210 
211//-------------------------------------------------
212//  device_reset - device-specific reset
213//-------------------------------------------------
214 
215void abc80_keyboard_device::device_reset()
216{
217}
218 
219 
220//-------------------------------------------------
221//  data_r - keyboard data read
222//-------------------------------------------------
223 
224READ8_MEMBER( abc80_keyboard_device::data_r )
225{
226    return 0;
227}
src/mess/machine/abc80kb.h
r15019r15020
1/**********************************************************************
2
3    Luxor ABC-80 keyboard 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 __ABC80_KEYBOARD__
13#define __ABC80_KEYBOARD__
14
15
16#include "emu.h"
17#include "cpu/mcs48/mcs48.h"
18
19
20
21//**************************************************************************
22//  MACROS / CONSTANTS
23//**************************************************************************
24
25#define ABC80_KEYBOARD_TAG   "abc80kb"
26
27
28
29//**************************************************************************
30//  INTERFACE CONFIGURATION MACROS
31//**************************************************************************
32
33#define MCFG_ABC80_KEYBOARD_ADD(_config) \
34    MCFG_DEVICE_ADD(ABC80_KEYBOARD_TAG, ABC80_KEYBOARD, 0) \
35   MCFG_DEVICE_CONFIG(_config)
36
37
38#define ABC80_KEYBOARD_INTERFACE(_name) \
39   const abc80_keyboard_interface (_name) =
40
41
42
43//**************************************************************************
44//  TYPE DEFINITIONS
45//**************************************************************************
46
47// ======================> abc80_keyboard_interface
48
49struct abc80_keyboard_interface
50{
51   devcb_write_line   m_out_keydown_cb;
52};
53
54
55// ======================> abc80_keyboard_device
56
57class abc80_keyboard_device :  public device_t,
58                        public abc80_keyboard_interface
59{
60public:
61    // construction/destruction
62    abc80_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
63
64   // optional information overrides
65   virtual const rom_entry *device_rom_region() const;
66   virtual machine_config_constructor device_mconfig_additions() const;
67   virtual ioport_constructor device_input_ports() const;
68
69   DECLARE_READ8_MEMBER( data_r );
70
71protected:
72    // device-level overrides
73   virtual void device_config_complete();
74    virtual void device_start();
75   virtual void device_reset();
76
77private:
78   devcb_resolved_write_line   m_out_keydown_func;
79
80   required_device<cpu_device> m_maincpu;
81};
82
83
84// device type definition
85extern const device_type ABC80_KEYBOARD;
86
87
88
89#endif
1/**********************************************************************
2 
3    Luxor ABC-80 keyboard 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 __ABC80_KEYBOARD__
13#define __ABC80_KEYBOARD__
14 
15 
16#include "emu.h"
17#include "cpu/mcs48/mcs48.h"
18 
19 
20 
21//**************************************************************************
22//  MACROS / CONSTANTS
23//**************************************************************************
24 
25#define ABC80_KEYBOARD_TAG   "abc80kb"
26 
27 
28 
29//**************************************************************************
30//  INTERFACE CONFIGURATION MACROS
31//**************************************************************************
32 
33#define MCFG_ABC80_KEYBOARD_ADD(_config) \
34    MCFG_DEVICE_ADD(ABC80_KEYBOARD_TAG, ABC80_KEYBOARD, 0) \
35   MCFG_DEVICE_CONFIG(_config)
36 
37 
38#define ABC80_KEYBOARD_INTERFACE(_name) \
39   const abc80_keyboard_interface (_name) =
40 
41 
42 
43//**************************************************************************
44//  TYPE DEFINITIONS
45//**************************************************************************
46 
47// ======================> abc80_keyboard_interface
48 
49struct abc80_keyboard_interface
50{
51   devcb_write_line   m_out_keydown_cb;
52};
53 
54 
55// ======================> abc80_keyboard_device
56 
57class abc80_keyboard_device :  public device_t,
58                        public abc80_keyboard_interface
59{
60public:
61    // construction/destruction
62    abc80_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
63 
64   // optional information overrides
65   virtual const rom_entry *device_rom_region() const;
66   virtual machine_config_constructor device_mconfig_additions() const;
67   virtual ioport_constructor device_input_ports() const;
68 
69   DECLARE_READ8_MEMBER( data_r );
70 
71protected:
72    // device-level overrides
73   virtual void device_config_complete();
74    virtual void device_start();
75   virtual void device_reset();
76 
77private:
78   devcb_resolved_write_line   m_out_keydown_func;
79 
80   required_device<cpu_device> m_maincpu;
81};
82 
83 
84// device type definition
85extern const device_type ABC80_KEYBOARD;
86 
87 
88 
89#endif
src/mess/machine/a2ssc.c
r15019r15020
3131
3232ROM_START( ssc )
3333   ROM_REGION(0x000800, SSC_ROM_REGION, 0)
34    ROM_LOAD( "341-0065-a.bin", 0x000000, 0x000800, CRC(b7539d4c) SHA1(6dab633470c6bc4cb3e81d09fda46597caf8ee57) )
34    ROM_LOAD( "341-0065-a.bin", 0x000000, 0x000800, CRC(b7539d4c) SHA1(6dab633470c6bc4cb3e81d09fda46597caf8ee57) )
3535ROM_END
3636
3737static INPUT_PORTS_START( ssc )
r15019r15020
188188        case 0xa:
189189        case 0xb:
190190            return m_acia->read(space, offset-8);
191       
191
192192    }
193193
194194    return 0;
r15019r15020
208208        case 0xb:
209209            m_acia->write(space, offset-8, data);
210210            break;
211       
211
212212    }
213213}
214214
src/mess/machine/a2ssc.h
r15019r15020
3535    virtual void device_start();
3636    virtual void device_reset();
3737
38    virtual UINT8 read_c0nx(address_space &space, UINT8 offset);
38    virtual UINT8 read_c0nx(address_space &space, UINT8 offset);
3939    virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data);
4040    virtual UINT8 read_cnxx(address_space &space, UINT8 offset);
4141    virtual UINT8 read_c800(address_space &space, UINT16 offset);
src/mess/machine/a2scsi.c
r15019r15020
1010
1111    Notes:
1212
13    C0n0-C0n7 = NCR5380 registers in normal order
13    C0n0-C0n7 = NCR5380 registers in normal order
1414    C0n9 = DIP switches
1515    C0na = RAM and ROM bank switching
1616    C0nb = reset 5380
src/mess/machine/c64_ide64.c
r15019r15020
1/**********************************************************************
2
3    IDE64 v4.1 cartridge 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   - flash write
15   - FT245
16
17*/
18
19#include "c64_ide64.h"
20
21
22
23//**************************************************************************
24//  MACROS/CONSTANTS
25//**************************************************************************
26
27#define AT29C010A_TAG      "u3"
28#define DS1302_TAG         "u4"
29#define FT245R_TAG         "u21"
30
31
32
33//**************************************************************************
34//  DEVICE DEFINITIONS
35//**************************************************************************
36
37const device_type C64_IDE64 = &device_creator<c64_ide64_cartridge_device>;
38
39
40//-------------------------------------------------
41//  MACHINE_CONFIG_FRAGMENT( c64_ide64 )
42//-------------------------------------------------
43
44static MACHINE_CONFIG_FRAGMENT( c64_ide64 )
45   MCFG_ATMEL_29C010_ADD(AT29C010A_TAG)
46   MCFG_DS1302_ADD(DS1302_TAG)
47   // TODO FT245R
48   // TODO CompactFlash
49   
50   MCFG_IDE_CONTROLLER_ADD("ide", NULL, ide_image_devices, "hdd", "hdd")
51MACHINE_CONFIG_END
52
53
54//-------------------------------------------------
55//  machine_config_additions - device-specific
56//  machine configurations
57//-------------------------------------------------
58
59machine_config_constructor c64_ide64_cartridge_device::device_mconfig_additions() const
60{
61   return MACHINE_CONFIG_NAME( c64_ide64 );
62}
63
64
65//-------------------------------------------------
66//  INPUT_PORTS( c64_ide64 )
67//-------------------------------------------------
68
69static INPUT_PORTS_START( c64_ide64 )
70   PORT_START("JP1")
71   PORT_DIPNAME( 0x01, 0x01, "Flash ROM Write Protect" )
72   PORT_DIPSETTING(    0x00, "Disabled" )
73   PORT_DIPSETTING(    0x01, "Enabled" )
74INPUT_PORTS_END
75
76
77//-------------------------------------------------
78//  input_ports - device-specific input ports
79//-------------------------------------------------
80
81ioport_constructor c64_ide64_cartridge_device::device_input_ports() const
82{
83   return INPUT_PORTS_NAME( c64_ide64 );
84}
85
86
87
88//**************************************************************************
89//  LIVE DEVICE
90//**************************************************************************
91
92//-------------------------------------------------
93//  c64_ide64_cartridge_device - constructor
94//-------------------------------------------------
95
96c64_ide64_cartridge_device::c64_ide64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
97   device_t(mconfig, C64_IDE64, "C64 IDE64 cartridge", tag, owner, clock),
98   device_c64_expansion_card_interface(mconfig, *this),
99   m_flash_rom(*this, AT29C010A_TAG),
100   m_rtc(*this, DS1302_TAG),
101   m_ide(*this, "ide")
102{
103}
104
105
106//-------------------------------------------------
107//  device_start - device-specific startup
108//-------------------------------------------------
109
110void c64_ide64_cartridge_device::device_start()
111{
112   // allocate memory
113   c64_ram_pointer(machine(), 0x8000);
114
115   // state saving
116   save_item(NAME(m_bank));
117   save_item(NAME(m_ide_data));
118   save_item(NAME(m_enable));
119   save_item(NAME(m_rtc_ce));
120}
121
122
123//-------------------------------------------------
124//  device_reset - device-specific reset
125//-------------------------------------------------
126
127void c64_ide64_cartridge_device::device_reset()
128{
129   m_bank = 0;
130   m_game = 1;
131   m_exrom = 1;
132   m_enable = 1;
133   m_rtc_ce = 0;
134
135   m_wp = input_port_read(*this, "JP1");
136}
137
138
139//-------------------------------------------------
140//  c64_cd_r - cartridge data read
141//-------------------------------------------------
142
143UINT8 c64_ide64_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
144{
145   if (!m_enable) return 0;
146
147   UINT8 data = 0;
148   int rom_oe = 1, ram_oe = 1;
149
150   if (!m_game && m_exrom)
151   {
152      if (offset >= 0x1000 && offset < 0x8000)
153      {
154         ram_oe = 0;
155      }
156      else if (offset >= 0xa000 && offset < 0xc000)
157      {
158         rom_oe = 0;
159      }
160      else if (offset >= 0xc000 && offset < 0xd000)
161      {
162         ram_oe = 0;
163      }
164      else if (!romh)
165      {
166         rom_oe = 0;
167      }
168   }
169   else
170   {
171      if (!roml || !romh)
172      {
173         rom_oe = 0;
174      }
175      else if (!io1)
176      {
177         // 0x20-0x2f   IDE
178         // 0x30-0x37   I/O
179         // 0x5d-0x5e   FT245
180         // 0x5f-0x5f   DS1302
181         // 0x60-0xff   ROM
182
183         UINT8 io1_offset = offset & 0xff;
184
185         if (io1_offset >= 0x20 && io1_offset < 0x30)
186         {
187            m_ide_data = ide_bus_r(m_ide, BIT(offset, 3), offset & 0x07);
188
189            data = m_ide_data & 0xff;
190         }
191         else if (io1_offset == 0x31)
192         {
193            data = m_ide_data >> 8;
194         }
195         else if (io1_offset == 0x32)
196         {
197            /*
198           
199                bit     description
200           
201                0       GAME
202                1       EXROM
203                2       A14
204                3       A15
205                4       A16
206                5       v4.x
207                6       
208                7       
209           
210            */
211
212            data = 0x20 | (m_bank << 2) | (m_exrom << 1) | m_game;
213         }
214         else if ((io1_offset == 0x5f) && m_rtc_ce)
215         {
216            m_rtc->ds1302_clk_w(0, 0);
217
218            m_rtc->ds1302_dat_w(0, BIT(data, 0));
219
220            m_rtc->ds1302_clk_w(0, 1);
221         }
222         else if (io1_offset >= 0x60)
223         {
224            rom_oe = 0;
225         }
226      }
227   }
228
229   if (!rom_oe)
230   {
231      offs_t addr = (m_bank << 14) | (offset & 0x3fff);
232      data = m_flash_rom->read(addr);
233   }
234   else if (!ram_oe)
235   {
236      data = m_ram[offset & 0x7fff];
237   }
238
239   return data;
240}
241
242
243//-------------------------------------------------
244//  c64_cd_w - cartridge data write
245//-------------------------------------------------
246
247void c64_ide64_cartridge_device::c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2)
248{
249   if (!m_enable) return;
250
251   if (!m_game && m_exrom)
252   {
253      if (offset >= 0x1000 && offset < 0x8000)
254      {
255         m_ram[offset & 0x7fff] = data;
256      }
257      else if (offset >= 0xc000 && offset < 0xd000)
258      {
259         m_ram[offset & 0x7fff] = data;
260      }
261   }
262   else
263   {
264      if ((offset >= 0x8000 && offset < 0xc000) && !m_wp)
265      {
266         offs_t addr = (m_bank << 14) | (offset & 0x3fff);
267         m_flash_rom->write(addr, data);
268      }
269      else if (!io1)
270      {
271         // 0x20-0x2f   IDE
272         // 0x30-0x37   I/O
273         // 0x5d-0x5e   FT245
274         // 0x5f-0x5f   DS1302
275         // 0x60-0xff   ROM
276
277         UINT8 io1_offset = offset & 0xff;
278
279         if (io1_offset >= 0x20 && io1_offset < 0x30)
280         {
281            m_ide_data = (m_ide_data & 0xff00) | data;
282
283            ide_bus_w(m_ide, BIT(offset, 3), offset & 0x07, m_ide_data);
284         }
285         else if (io1_offset == 0x31)
286         {
287            m_ide_data = (data << 8) | (m_ide_data & 0xff);
288         }
289         else if ((io1_offset == 0x5f) && m_rtc_ce)
290         {
291            m_rtc->ds1302_clk_w(0, 0);
292
293            data = m_rtc->ds1302_read(0);
294           
295            m_rtc->ds1302_clk_w(0, 1);
296         }
297         else if (io1_offset >= 0x60 && io1_offset < 0x68)
298         {
299            m_bank = offset & 0x07;
300         }
301         else if (io1_offset >= 0xfb)
302         {
303            /*
304           
305                bit     description
306           
307                0       disable cartridge
308                1       RTC CE
309                2       
310                3       
311                4       
312                5       
313                6       
314                7       
315           
316            */
317
318            m_enable = !BIT(data, 0);
319            m_rtc_ce = BIT(data, 1);
320
321            m_game = BIT(offset, 0);
322            m_exrom = BIT(offset, 1);
323         }
324         else if (io1_offset >= 0xfc)
325         {
326            m_game = BIT(offset, 0);
327            m_exrom = BIT(offset, 1);
328         }
329      }
330   }
331}
1/**********************************************************************
2 
3    IDE64 v4.1 cartridge 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    - flash write
15    - FT245
16 
17*/
18 
19#include "c64_ide64.h"
20 
21 
22 
23//**************************************************************************
24//  MACROS/CONSTANTS
25//**************************************************************************
26 
27#define AT29C010A_TAG      "u3"
28#define DS1302_TAG         "u4"
29#define FT245R_TAG         "u21"
30 
31 
32 
33//**************************************************************************
34//  DEVICE DEFINITIONS
35//**************************************************************************
36 
37const device_type C64_IDE64 = &device_creator<c64_ide64_cartridge_device>;
38 
39 
40//-------------------------------------------------
41//  MACHINE_CONFIG_FRAGMENT( c64_ide64 )
42//-------------------------------------------------
43 
44static MACHINE_CONFIG_FRAGMENT( c64_ide64 )
45   MCFG_ATMEL_29C010_ADD(AT29C010A_TAG)
46   MCFG_DS1302_ADD(DS1302_TAG)
47   // TODO FT245R
48   // TODO CompactFlash
49 
50   MCFG_IDE_CONTROLLER_ADD("ide", NULL, ide_image_devices, "hdd", "hdd")
51MACHINE_CONFIG_END
52 
53 
54//-------------------------------------------------
55//  machine_config_additions - device-specific
56//  machine configurations
57//-------------------------------------------------
58 
59machine_config_constructor c64_ide64_cartridge_device::device_mconfig_additions() const
60{
61   return MACHINE_CONFIG_NAME( c64_ide64 );
62}
63 
64 
65//-------------------------------------------------
66//  INPUT_PORTS( c64_ide64 )
67//-------------------------------------------------
68 
69static INPUT_PORTS_START( c64_ide64 )
70   PORT_START("JP1")
71   PORT_DIPNAME( 0x01, 0x01, "Flash ROM Write Protect" )
72   PORT_DIPSETTING(    0x00, "Disabled" )
73   PORT_DIPSETTING(    0x01, "Enabled" )
74INPUT_PORTS_END
75 
76 
77//-------------------------------------------------
78//  input_ports - device-specific input ports
79//-------------------------------------------------
80 
81ioport_constructor c64_ide64_cartridge_device::device_input_ports() const
82{
83   return INPUT_PORTS_NAME( c64_ide64 );
84}
85 
86 
87 
88//**************************************************************************
89//  LIVE DEVICE
90//**************************************************************************
91 
92//-------------------------------------------------
93//  c64_ide64_cartridge_device - constructor
94//-------------------------------------------------
95 
96c64_ide64_cartridge_device::c64_ide64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
97   device_t(mconfig, C64_IDE64, "C64 IDE64 cartridge", tag, owner, clock),
98   device_c64_expansion_card_interface(mconfig, *this),
99   m_flash_rom(*this, AT29C010A_TAG),
100   m_rtc(*this, DS1302_TAG),
101   m_ide(*this, "ide")
102{
103}
104 
105 
106//-------------------------------------------------
107//  device_start - device-specific startup
108//-------------------------------------------------
109 
110void c64_ide64_cartridge_device::device_start()
111{
112   // allocate memory
113   c64_ram_pointer(machine(), 0x8000);
114 
115   // state saving
116   save_item(NAME(m_bank));
117   save_item(NAME(m_ide_data));
118   save_item(NAME(m_enable));
119   save_item(NAME(m_rtc_ce));
120}
121 
122 
123//-------------------------------------------------
124//  device_reset - device-specific reset
125//-------------------------------------------------
126 
127void c64_ide64_cartridge_device::device_reset()
128{
129   m_bank = 0;
130   m_game = 1;
131   m_exrom = 1;
132   m_enable = 1;
133   m_rtc_ce = 0;
134 
135   m_wp = input_port_read(*this, "JP1");
136}
137 
138 
139//-------------------------------------------------
140//  c64_cd_r - cartridge data read
141//-------------------------------------------------
142 
143UINT8 c64_ide64_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
144{
145   if (!m_enable) return 0;
146 
147   UINT8 data = 0;
148   int rom_oe = 1, ram_oe = 1;
149 
150   if (!m_game && m_exrom)
151   {
152      if (offset >= 0x1000 && offset < 0x8000)
153      {
154         ram_oe = 0;
155      }
156      else if (offset >= 0xa000 && offset < 0xc000)
157      {
158         rom_oe = 0;
159      }
160      else if (offset >= 0xc000 && offset < 0xd000)
161      {
162         ram_oe = 0;
163      }
164      else if (!romh)
165      {
166         rom_oe = 0;
167      }
168   }
169   else
170   {
171      if (!roml || !romh)
172      {
173         rom_oe = 0;
174      }
175      else if (!io1)
176      {
177         // 0x20-0x2f    IDE
178         // 0x30-0x37    I/O
179         // 0x5d-0x5e    FT245
180         // 0x5f-0x5f    DS1302
181         // 0x60-0xff    ROM
182 
183         UINT8 io1_offset = offset & 0xff;
184 
185         if (io1_offset >= 0x20 && io1_offset < 0x30)
186         {
187            m_ide_data = ide_bus_r(m_ide, BIT(offset, 3), offset & 0x07);
188 
189            data = m_ide_data & 0xff;
190         }
191         else if (io1_offset == 0x31)
192         {
193            data = m_ide_data >> 8;
194         }
195         else if (io1_offset == 0x32)
196         {
197            /*
198 
199                    bit     description
200 
201                    0       GAME
202                    1       EXROM
203                    2       A14
204                    3       A15
205                    4       A16
206                    5       v4.x
207                    6
208                    7
209 
210                */
211 
212            data = 0x20 | (m_bank << 2) | (m_exrom << 1) | m_game;
213         }
214         else if ((io1_offset == 0x5f) && m_rtc_ce)
215         {
216            m_rtc->ds1302_clk_w(0, 0);
217 
218            m_rtc->ds1302_dat_w(0, BIT(data, 0));
219 
220            m_rtc->ds1302_clk_w(0, 1);
221         }
222         else if (io1_offset >= 0x60)
223         {
224            rom_oe = 0;
225         }
226      }
227   }
228 
229   if (!rom_oe)
230   {
231      offs_t addr = (m_bank << 14) | (offset & 0x3fff);
232      data = m_flash_rom->read(addr);
233   }
234   else if (!ram_oe)
235   {
236      data = m_ram[offset & 0x7fff];
237   }
238 
239   return data;
240}
241 
242 
243//-------------------------------------------------
244//  c64_cd_w - cartridge data write
245//-------------------------------------------------
246 
247void c64_ide64_cartridge_device::c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2)
248{
249   if (!m_enable) return;
250 
251   if (!m_game && m_exrom)
252   {
253      if (offset >= 0x1000 && offset < 0x8000)
254      {
255         m_ram[offset & 0x7fff] = data;
256      }
257      else if (offset >= 0xc000 && offset < 0xd000)
258      {
259         m_ram[offset & 0x7fff] = data;
260      }
261   }
262   else
263   {
264      if ((offset >= 0x8000 && offset < 0xc000) && !m_wp)
265      {
266         offs_t addr = (m_bank << 14) | (offset & 0x3fff);
267         m_flash_rom->write(addr, data);
268      }
269      else if (!io1)
270      {
271         // 0x20-0x2f    IDE
272         // 0x30-0x37    I/O
273         // 0x5d-0x5e    FT245
274         // 0x5f-0x5f    DS1302
275         // 0x60-0xff    ROM
276 
277         UINT8 io1_offset = offset & 0xff;
278 
279         if (io1_offset >= 0x20 && io1_offset < 0x30)
280         {
281            m_ide_data = (m_ide_data & 0xff00) | data;
282 
283            ide_bus_w(m_ide, BIT(offset, 3), offset & 0x07, m_ide_data);
284         }
285         else if (io1_offset == 0x31)
286         {
287            m_ide_data = (data << 8) | (m_ide_data & 0xff);
288         }
289         else if ((io1_offset == 0x5f) && m_rtc_ce)
290         {
291            m_rtc->ds1302_clk_w(0, 0);
292 
293            data = m_rtc->ds1302_read(0);
294 
295            m_rtc->ds1302_clk_w(0, 1);
296         }
297         else if (io1_offset >= 0x60 && io1_offset < 0x68)
298         {
299            m_bank = offset & 0x07;
300         }
301         else if (io1_offset >= 0xfb)
302         {
303            /*
304 
305                    bit     description
306 
307                    0       disable cartridge
308                    1       RTC CE
309                    2
310                    3
311                    4
312                    5
313                    6
314                    7
315 
316                */
317 
318            m_enable = !BIT(data, 0);
319            m_rtc_ce = BIT(data, 1);
320 
321            m_game = BIT(offset, 0);
322            m_exrom = BIT(offset, 1);
323         }
324         else if (io1_offset >= 0xfc)
325         {
326            m_game = BIT(offset, 0);
327            m_exrom = BIT(offset, 1);
328         }
329      }
330   }
331}
src/mess/machine/c64_ide64.h
r15019r15020
1/**********************************************************************
2
3    IDE64 v4.1 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 __IDE64__
13#define __IDE64__
14
15
16#include "emu.h"
17#include "machine/c64exp.h"
18#include "machine/ds1302.h"
19#include "machine/idectrl.h"
20#include "machine/intelfsh.h"
21#include "imagedev/harddriv.h"
22
23
24
25//**************************************************************************
26//  TYPE DEFINITIONS
27//**************************************************************************
28
29// ======================> c64_ide64_cartridge_device
30
31class c64_ide64_cartridge_device : public device_t,
32                           public device_c64_expansion_card_interface
33{
34public:
35   // construction/destruction
36   c64_ide64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
37
38   // optional information overrides
39   virtual machine_config_constructor device_mconfig_additions() const;
40   virtual ioport_constructor device_input_ports() const;
41
42protected:
43   // device-level overrides
44   virtual void device_config_complete() { m_shortname = "c64_ide64"; }
45   virtual void device_start();
46   virtual void device_reset();
47
48   // device_c64_expansion_card_interface overrides
49   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
50   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
51
52private:
53   required_device<atmel_29c010_device> m_flash_rom;
54   required_device<ds1302_device> m_rtc;
55   required_device<device_t> m_ide;
56
57   UINT8 m_bank;
58   UINT8 m_ide_data;
59   int m_wp;
60   int m_enable;
61   int m_rtc_ce;
62};
63
64
65// device type definition
66extern const device_type C64_IDE64;
67
68
69#endif
1/**********************************************************************
2 
3    IDE64 v4.1 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 __IDE64__
13#define __IDE64__
14 
15 
16#include "emu.h"
17#include "machine/c64exp.h"
18#include "machine/ds1302.h"
19#include "machine/idectrl.h"
20#include "machine/intelfsh.h"
21#include "imagedev/harddriv.h"
22 
23 
24 
25//**************************************************************************
26//  TYPE DEFINITIONS
27//**************************************************************************
28 
29// ======================> c64_ide64_cartridge_device
30 
31class c64_ide64_cartridge_device : public device_t,
32                           public device_c64_expansion_card_interface
33{
34public:
35   // construction/destruction
36   c64_ide64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
37 
38   // optional information overrides
39   virtual machine_config_constructor device_mconfig_additions() const;
40   virtual ioport_constructor device_input_ports() const;
41 
42protected:
43   // device-level overrides
44   virtual void device_config_complete() { m_shortname = "c64_ide64"; }
45   virtual void device_start();
46   virtual void device_reset();
47 
48   // device_c64_expansion_card_interface overrides
49   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
50   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
51 
52private:
53   required_device<atmel_29c010_device> m_flash_rom;
54   required_device<ds1302_device> m_rtc;
55   required_device<device_t> m_ide;
56 
57   UINT8 m_bank;
58   UINT8 m_ide_data;
59   int m_wp;
60   int m_enable;
61   int m_rtc_ce;
62};
63 
64 
65// device type definition
66extern const device_type C64_IDE64;
67 
68 
69#endif
src/mess/machine/vic20_megacart.c
r15019r15020
5050vic20_megacart_device::vic20_megacart_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
5151    : device_t(mconfig, VIC20_MEGACART, "Mega-Cart", tag, owner, clock),
5252     device_vic20_expansion_card_interface(mconfig, *this),
53       device_nvram_interface(mconfig, *this),
53     device_nvram_interface(mconfig, *this),
5454     m_nvram_en(0)
5555{
5656}
src/mess/machine/c64_stardos.c
r15019r15020
99 
1010/*
1111 
12   PCB Layout
13   ----------
12    PCB Layout
13    ----------
1414 
15   |===========================|
16   |=|                         |
17   |=|   LS30                  |
18   |=|               LS157     |
19   |=|          LS00           |
20   |=|   ROM                   |
21   |=|          7407           |
22   |=|                         |
23   |=|                      SW1|
24   |===========================|
15    |===========================|
16    |=|                         |
17    |=|   LS30                  |
18    |=|               LS157     |
19    |=|          LS00           |
20    |=|   ROM                   |
21    |=|          7407           |
22    |=|                         |
23    |=|                      SW1|
24    |===========================|
2525 
26   ROM     - Toshiba TMM271128D-25 16Kx8 EPROM
26    ROM     - Toshiba TMM271128D-25 16Kx8 EPROM
2727 
2828*/
2929 
src/mess/machine/c65.c
r15019r15020
846846   {
847847   /* bankswitching faulty when doing actual page */
848848      if (value & 0x20)
849         state->membank("bank3")->set_base(state->m_interface);
849         state->membank("bank3")->set_base(state->m_basic);
850850      else
851851         state->membank("bank3")->set_base(state->m_memory + 0xc000);
852852   }
src/mess/machine/a2cffa.c
r15019r15020
226226{
227227   if (!m_writeprotect)
228228   {
229//      printf("Write %02x to EEPROM at %x (PC=%x)\n", data, offset, cpu_get_pc(&space.device()));
229//      printf("Write %02x to EEPROM at %x (PC=%x)\n", data, offset, cpu_get_pc(&space.device()));
230230      m_eeprom[offset + 0x800] = data;
231231   }
232232}
src/mess/machine/c64_currah_speech.c
r15019r15020
1/**********************************************************************
2
3    Currah Speech 64 cartridge emulation
4
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7
8**********************************************************************/
9
10/*
11
12PCB Layout
13----------
14
15|===========================|
16|=|                         |
17|=|         VLSI            |
18|=|                         |
19|=|                         |
20|=|         ROM             |
21|=|                         |
22|=|                         |
23|=|         SP0256          |
24|===========================|
25
26Notes:
27    All IC's shown.
28
29   VLSI   - General Instruments LA05-164 custom
30   ROM    - General Instruments R09864CS-2030 8Kx8 ROM "778R01"
31   SP0256 - General Instruments SP0256A-AL2 Speech Synthesizer
32
33
34LA05-164 Pinout
35---------------
36            _____   _____
37DOTCLK   1 |*    \_/     | 28  +5V
38   CA7   2 |             | 27  CD7
39   CA6   3 |             | 26  CA8
40   CA5   4 |             | 25  CA9
41   CA4   5 |             | 24  CA11
42   CA3   6 |             | 23  BA
43   CA2   7 |  LA05-164   | 22  CA10
44   CA1   8 |             | 21  SP0256 _ALD
45   CA0   9 |             | 20  SP0256 OSC1
46        10 |             | 19  SP0256 SBY
47_GA+EX  11 |             | 18  CA15
48  I/O1  12 |             | 17  CA12
49 _CR/W  13 |             | 16  CA13
50   GND  14 |_____________| 15  CA14
51
52Notes:
53   _GA+EX  - _GAME and _EXROM tied together
54
55*/
56
57/*
58
59   BASIC Commands
60   --------------
61
62   INIT      Initialize the cartridge
63   BYE         Disable the cartridge
64   KON 0      Enable keyvoices, low voice
65   KON 1      Enable keyvoices, high voice
66   KOFF      Disable keyvoices
67   SAY 0/1 ""   Say words
68
69*/
70
71#include "c64_currah_speech.h"
72
73
74
75//**************************************************************************
76//  MACROS/CONSTANTS
77//**************************************************************************
78
79#define SP0256_TAG      "sp0256"
80
81
82
83//**************************************************************************
84//  DEVICE DEFINITIONS
85//**************************************************************************
86
87const device_type C64_CURRAH_SPEECH = &device_creator<c64_currah_speech_cartridge_device>;
88
89
90//-------------------------------------------------
91//  ROM( c64_currah_speech )
92//-------------------------------------------------
93
94ROM_START( c64_currah_speech )
95   ROM_REGION( 0x10000, SP0256_TAG, 0 )
96   ROM_LOAD( "sp0256a-al2", 0x1000, 0x0800, CRC(b504ac15) SHA1(e60fcb5fa16ff3f3b69d36c7a6e955744d3feafc) )
97ROM_END
98
99
100//-------------------------------------------------
101//  rom_region - device-specific ROM region
102//-------------------------------------------------
103
104const rom_entry *c64_currah_speech_cartridge_device::device_rom_region() const
105{
106   return ROM_NAME( c64_currah_speech );
107}
108
109
110//-------------------------------------------------
111//  sp0256_interface sp0256_intf
112//-------------------------------------------------
113
114static sp0256_interface sp0256_intf =
115{
116   DEVCB_NULL,
117   DEVCB_NULL
118};
119
120
121//-------------------------------------------------
122//  MACHINE_CONFIG_FRAGMENT( c64_currah_speech )
123//-------------------------------------------------
124
125static MACHINE_CONFIG_FRAGMENT( c64_currah_speech )
126   MCFG_SPEAKER_STANDARD_MONO("mono")
127   MCFG_SOUND_ADD(SP0256_TAG, SP0256, 4000000) // ???
128   MCFG_SOUND_CONFIG(sp0256_intf)
129   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
130MACHINE_CONFIG_END
131
132
133//-------------------------------------------------
134//  machine_config_additions - device-specific
135//  machine configurations
136//-------------------------------------------------
137
138machine_config_constructor c64_currah_speech_cartridge_device::device_mconfig_additions() const
139{
140   return MACHINE_CONFIG_NAME( c64_currah_speech );
141}
142
143
144
145//**************************************************************************
146//  INLINE HELPERS
147//**************************************************************************
148
149//-------------------------------------------------
150//  set_osc1 -
151//-------------------------------------------------
152
153void c64_currah_speech_cartridge_device::set_osc1(int voice, int intonation)
154{
155   int dotclock = m_slot->dotclock();
156
157   // TODO intonation and correct dividers
158   sp0256_set_clock(m_nsp, dotclock / (2 << voice));
159}
160
161
162
163//**************************************************************************
164//  LIVE DEVICE
165//**************************************************************************
166
167//-------------------------------------------------
168//  c64_currah_speech_cartridge_device - constructor
169//-------------------------------------------------
170
171c64_currah_speech_cartridge_device::c64_currah_speech_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
172   device_t(mconfig, C64_CURRAH_SPEECH, "C64 Currah Speech", tag, owner, clock),
173   device_c64_expansion_card_interface(mconfig, *this),
174   m_nsp(*this, SP0256_TAG)
175{
176}
177
178
179//-------------------------------------------------
180//  device_start - device-specific startup
181//-------------------------------------------------
182
183void c64_currah_speech_cartridge_device::device_start()
184{
185}
186
187
188//-------------------------------------------------
189//  device_reset - device-specific reset
190//-------------------------------------------------
191
192void c64_currah_speech_cartridge_device::device_reset()
193{
194   m_game = 1;
195   m_exrom = 1;
196}
197
198
199//-------------------------------------------------
200//  c64_cd_r - cartridge data read
201//-------------------------------------------------
202
203UINT8 c64_currah_speech_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
204{
205   UINT8 data = 0;
206
207   if (!romh)
208   {
209      data = m_romh[offset & 0x1fff];
210   }
211   else if (!io1)
212   {
213      /*
214     
215          bit     description
216     
217          0       
218          1       
219          2       
220          3       
221          4       
222          5       
223          6       
224          7       SBY
225     
226      */
227
228      data = sp0256_sby_r(m_nsp) << 7;
229   }
230   
231   if (!space.debugger_access() && (offset == 0xa7f0))
232   {
233      m_game = !m_game;
234      m_exrom = !m_exrom;
235   }
236
237   return data;
238}
239
240
241//-------------------------------------------------
242//  c64_cd_w - cartridge data write
243//-------------------------------------------------
244
245void c64_currah_speech_cartridge_device::c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2)
246{
247   if (!io1)
248   {
249      /*
250     
251          bit     description
252     
253          0       A1
254          1       A2
255          2       A3
256          3       A4
257          4       A5
258          5       A6
259          6       
260          7       intonation
261     
262      */
263
264      int voice = BIT(offset, 0);
265      int intonation = BIT(data, 7);
266
267      set_osc1(voice, intonation);
268
269      sp0256_ALD_w(m_nsp, 0, data & 0x3f);
270   }
271}
1/**********************************************************************
2 
3    Currah Speech 64 cartridge emulation
4 
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7 
8**********************************************************************/
9 
10/*
11 
12PCB Layout
13----------
14 
15|===========================|
16|=|                         |
17|=|         VLSI            |
18|=|                         |
19|=|                         |
20|=|         ROM             |
21|=|                         |
22|=|                         |
23|=|         SP0256          |
24|===========================|
25 
26Notes:
27    All IC's shown.
28 
29    VLSI   - General Instruments LA05-164 custom
30    ROM    - General Instruments R09864CS-2030 8Kx8 ROM "778R01"
31    SP0256 - General Instruments SP0256A-AL2 Speech Synthesizer
32 
33 
34LA05-164 Pinout
35---------------
36            _____   _____
37DOTCLK   1 |*    \_/     | 28  +5V
38   CA7   2 |             | 27  CD7
39   CA6   3 |             | 26  CA8
40   CA5   4 |             | 25  CA9
41   CA4   5 |             | 24  CA11
42   CA3   6 |             | 23  BA
43   CA2   7 |  LA05-164   | 22  CA10
44   CA1   8 |             | 21  SP0256 _ALD
45   CA0   9 |             | 20  SP0256 OSC1
46        10 |             | 19  SP0256 SBY
47_GA+EX  11 |             | 18  CA15
48  I/O1  12 |             | 17  CA12
49 _CR/W  13 |             | 16  CA13
50   GND  14 |_____________| 15  CA14
51 
52Notes:
53    _GA+EX  - _GAME and _EXROM tied together
54 
55*/
56 
57/*
58 
59    BASIC Commands
60    --------------
61 
62    INIT        Initialize the cartridge
63    BYE         Disable the cartridge
64    KON 0       Enable keyvoices, low voice
65    KON 1       Enable keyvoices, high voice
66    KOFF        Disable keyvoices
67    SAY 0/1 ""  Say words
68 
69*/
70 
71#include "c64_currah_speech.h"
72 
73 
74 
75//**************************************************************************
76//  MACROS/CONSTANTS
77//**************************************************************************
78 
79#define SP0256_TAG      "sp0256"
80 
81 
82 
83//**************************************************************************
84//  DEVICE DEFINITIONS
85//**************************************************************************
86 
87const device_type C64_CURRAH_SPEECH = &device_creator<c64_currah_speech_cartridge_device>;
88 
89 
90//-------------------------------------------------
91//  ROM( c64_currah_speech )
92//-------------------------------------------------
93 
94ROM_START( c64_currah_speech )
95   ROM_REGION( 0x10000, SP0256_TAG, 0 )
96   ROM_LOAD( "sp0256a-al2", 0x1000, 0x0800, CRC(b504ac15) SHA1(e60fcb5fa16ff3f3b69d36c7a6e955744d3feafc) )
97ROM_END
98 
99 
100//-------------------------------------------------
101//  rom_region - device-specific ROM region
102//-------------------------------------------------
103 
104const rom_entry *c64_currah_speech_cartridge_device::device_rom_region() const
105{
106   return ROM_NAME( c64_currah_speech );
107}
108 
109 
110//-------------------------------------------------
111//  sp0256_interface sp0256_intf
112//-------------------------------------------------
113 
114static sp0256_interface sp0256_intf =
115{
116   DEVCB_NULL,
117   DEVCB_NULL
118};
119 
120 
121//-------------------------------------------------
122//  MACHINE_CONFIG_FRAGMENT( c64_currah_speech )
123//-------------------------------------------------
124 
125static MACHINE_CONFIG_FRAGMENT( c64_currah_speech )
126   MCFG_SPEAKER_STANDARD_MONO("mono")
127   MCFG_SOUND_ADD(SP0256_TAG, SP0256, 4000000) // ???
128   MCFG_SOUND_CONFIG(sp0256_intf)
129   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
130MACHINE_CONFIG_END
131 
132 
133//-------------------------------------------------
134//  machine_config_additions - device-specific
135//  machine configurations
136//-------------------------------------------------
137 
138machine_config_constructor c64_currah_speech_cartridge_device::device_mconfig_additions() const
139{
140   return MACHINE_CONFIG_NAME( c64_currah_speech );
141}
142 
143 
144 
145//**************************************************************************
146//  INLINE HELPERS
147//**************************************************************************
148 
149//-------------------------------------------------
150//  set_osc1 -
151//-------------------------------------------------
152 
153void c64_currah_speech_cartridge_device::set_osc1(int voice, int intonation)
154{
155   int dotclock = m_slot->dotclock();
156 
157   // TODO intonation and correct dividers
158   sp0256_set_clock(m_nsp, dotclock / (2 << voice));
159}
160 
161 
162 
163//**************************************************************************
164//  LIVE DEVICE
165//**************************************************************************
166 
167//-------------------------------------------------
168//  c64_currah_speech_cartridge_device - constructor
169//-------------------------------------------------
170 
171c64_currah_speech_cartridge_device::c64_currah_speech_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
172   device_t(mconfig, C64_CURRAH_SPEECH, "C64 Currah Speech", tag, owner, clock),
173   device_c64_expansion_card_interface(mconfig, *this),
174   m_nsp(*this, SP0256_TAG)
175{
176}
177 
178 
179//-------------------------------------------------
180//  device_start - device-specific startup
181//-------------------------------------------------
182 
183void c64_currah_speech_cartridge_device::device_start()
184{
185}
186 
187 
188//-------------------------------------------------
189//  device_reset - device-specific reset
190//-------------------------------------------------
191 
192void c64_currah_speech_cartridge_device::device_reset()
193{
194   m_game = 1;
195   m_exrom = 1;
196}
197 
198 
199//-------------------------------------------------
200//  c64_cd_r - cartridge data read
201//-------------------------------------------------
202 
203UINT8 c64_currah_speech_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
204{
205   UINT8 data = 0;
206 
207   if (!romh)
208   {
209      data = m_romh[offset & 0x1fff];
210   }
211   else if (!io1)
212   {
213      /*
214 
215            bit     description
216 
217            0
218            1
219            2
220            3
221            4
222            5
223            6
224            7       SBY
225 
226        */
227 
228      data = sp0256_sby_r(m_nsp) << 7;
229   }
230 
231   if (!space.debugger_access() && (offset == 0xa7f0))
232   {
233      m_game = !m_game;
234      m_exrom = !m_exrom;
235   }
236 
237   return data;
238}
239 
240 
241//-------------------------------------------------
242//  c64_cd_w - cartridge data write
243//-------------------------------------------------
244 
245void c64_currah_speech_cartridge_device::c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2)
246{
247   if (!io1)
248   {
249      /*
250 
251            bit     description
252 
253            0       A1
254            1       A2
255            2       A3
256            3       A4
257            4       A5
258            5       A6
259            6
260            7       intonation
261 
262        */
263 
264      int voice = BIT(offset, 0);
265      int intonation = BIT(data, 7);
266 
267      set_osc1(voice, intonation);
268 
269      sp0256_ALD_w(m_nsp, 0, data & 0x3f);
270   }
271}
src/mess/machine/c64_currah_speech.h
r15019r15020
1/**********************************************************************
2
3    Currah Speech 64 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 __CURRAH_SPEECH_64__
13#define __CURRAH_SPEECH_64__
14
15
16#include "emu.h"
17#include "machine/c64exp.h"
18#include "sound/sp0256.h"
19
20
21
22//**************************************************************************
23//  TYPE DEFINITIONS
24//**************************************************************************
25
26// ======================> c64_currah_speech_cartridge_device
27
28class c64_currah_speech_cartridge_device : public device_t,
29                                  public device_c64_expansion_card_interface
30{
31public:
32   // construction/destruction
33   c64_currah_speech_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
34
35   // optional information overrides
36   virtual const rom_entry *device_rom_region() const;
37   virtual machine_config_constructor device_mconfig_additions() const;
38
39protected:
40   // device-level overrides
41    virtual void device_config_complete() { m_shortname = "c64_cs"; }
42   virtual void device_start();
43   virtual void device_reset();
44
45   // device_c64_expansion_card_interface overrides
46   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
47   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
48
49private:
50   inline void set_osc1(int voice, int intonation);
51
52   required_device<device_t> m_nsp;
53};
54
55
56// device type definition
57extern const device_type C64_CURRAH_SPEECH;
58
59
60#endif
1/**********************************************************************
2 
3    Currah Speech 64 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 __CURRAH_SPEECH_64__
13#define __CURRAH_SPEECH_64__
14 
15 
16#include "emu.h"
17#include "machine/c64exp.h"
18#include "sound/sp0256.h"
19 
20 
21 
22//**************************************************************************
23//  TYPE DEFINITIONS
24//**************************************************************************
25 
26// ======================> c64_currah_speech_cartridge_device
27 
28class c64_currah_speech_cartridge_device : public device_t,
29                                  public device_c64_expansion_card_interface
30{
31public:
32   // construction/destruction
33   c64_currah_speech_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
34 
35   // optional information overrides
36   virtual const rom_entry *device_rom_region() const;
37   virtual machine_config_constructor device_mconfig_additions() const;
38 
39protected:
40   // device-level overrides
41    virtual void device_config_complete() { m_shortname = "c64_cs"; }
42   virtual void device_start();
43   virtual void device_reset();
44 
45   // device_c64_expansion_card_interface overrides
46   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
47   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
48 
49private:
50   inline void set_osc1(int voice, int intonation);
51 
52   required_device<device_t> m_nsp;
53};
54 
55 
56// device type definition
57extern const device_type C64_CURRAH_SPEECH;
58 
59 
60#endif
src/mess/machine/a2swyft.c
r15019r15020
2525
2626ROM_START( swyft )
2727   ROM_REGION(0x4000, SWYFT_ROM_REGION, 0)
28    ROM_LOAD( "swyftcard rom.bin", 0x000000, 0x004000, CRC(5d6673e9) SHA1(1554bd03c536789f0ff7d1ef6c992265e311935d) )
28    ROM_LOAD( "swyftcard rom.bin", 0x000000, 0x004000, CRC(5d6673e9) SHA1(1554bd03c536789f0ff7d1ef6c992265e311935d) )
2929ROM_END
3030
3131//-------------------------------------------------
src/mess/machine/c64_sw8k.c
r15019r15020
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}
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
r15019r15020
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
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/a2thunderclock.c
r15019r15020
11/*********************************************************************
22
33    a2thunderclock.c
4
4
55    Implemention of the Thunderware Thunderclock Plus.
6 
7 
6
7
88    PCB Layout: (B1/B2 are batteries)
99     _______________________________________________________________
1010    |                                                               |
r15019r15020
2020    |______________________________________                        _|
2121                                           |                      |
2222                                           |______________________|
23
23
2424*********************************************************************/
2525
2626#include "a2thunderclock.h"
r15019r15020
5050
5151ROM_START( thunderclock )
5252   ROM_REGION(0x800, THUNDERCLOCK_ROM_REGION, 0)
53    ROM_LOAD( "thunderclock plus rom.bin", 0x0000, 0x0800, CRC(1b99c4e3) SHA1(60f434f5325899d7ea257a6e56e6f53eae65146a) )
53    ROM_LOAD( "thunderclock plus rom.bin", 0x0000, 0x0800, CRC(1b99c4e3) SHA1(60f434f5325899d7ea257a6e56e6f53eae65146a) )
5454ROM_END
5555
5656/***************************************************************************
src/mess/machine/sms.c
r15019r15020
13661366static void setup_rom( address_space *space )
13671367{
13681368   sms_state *state = space->machine().driver_data<sms_state>();
1369   
1369
13701370   /* 1. set up bank pointers to point to nothing */
13711371   state->membank("bank1")->set_base(state->m_banking_none);
13721372   state->membank("bank2")->set_base(state->m_banking_none);
src/mess/machine/a2videoterm.c
r15019r15020
33    a2videoterm.c
44
55    Implementation of the Videx VideoTerm 80-column card
6
6
77    Notes (from Videoterm user's manual, which contains
88           schematics and firmware source listings).
9
9
1010    C0nX: C0n0 is 6845 register address,
1111          C0n1 is 6845 register data.
12
12
1313          Bits 2 & 3 on any access to C0nX set the VRAM page at CC00.
14
14
1515    C800-CBFF: ROM
1616    CC00-CDFF: VRAM window
17
17
1818    TODO:
1919    Cursor is probably not completely right.
2020    Add font ROM select.
21
21
2222*********************************************************************/
2323
2424#include "a2videoterm.h"
r15019r15020
6868
6969ROM_START( a2videoterm )
7070   ROM_REGION(0x400, VIDEOTERM_ROM_REGION, 0)
71    ROM_LOAD( "videx videoterm rom 2.4.bin", 0x000000, 0x000400, CRC(bbe3bb28) SHA1(bb653836e84850ce3197f461d4e19355f738cfbf) )
71    ROM_LOAD( "videx videoterm rom 2.4.bin", 0x000000, 0x000400, CRC(bbe3bb28) SHA1(bb653836e84850ce3197f461d4e19355f738cfbf) )
7272
7373   ROM_REGION(0x5000, VIDEOTERM_GFX_REGION, 0)
74    ROM_LOAD( "videx videoterm character rom normal.bin", 0x000000, 0x000800, CRC(87f89f08) SHA1(410b54f33d13c82e3857f1be906d93a8c5b8d321) )
75    ROM_LOAD( "videx videoterm character rom normal uppercase.bin", 0x000800, 0x000800, CRC(3d94a7a4) SHA1(5518254f24bc945aab13bc71ecc9526d6dd8e033) )
76    ROM_LOAD( "videx videoterm character rom apl.bin", 0x001000, 0x000800, CRC(1adb704e) SHA1(a95df910eca33188cacee333b1325aa47edbcc25) )
77    ROM_LOAD( "videx videoterm character rom epson.bin", 0x001800, 0x000800, CRC(0c6ef8d0) SHA1(db72c0c120086f1aa4a87120c5d7993c4a9d3a18) )
78    ROM_LOAD( "videx videoterm character rom french.bin", 0x002000, 0x000800, CRC(266aa837) SHA1(2c6b4e9d342dbb2de8e278740f11925a9d8c6616) )
79    ROM_LOAD( "videx videoterm character rom german.bin", 0x002800, 0x000800, CRC(df7324fa) SHA1(0ce58d2ffadbebc8db9f85bbb9a08a4f142af682) )
80    ROM_LOAD( "videx videoterm character rom katakana.bin", 0x003000, 0x000800, CRC(b728690e) SHA1(e018fa66b0ff560313bb35757c9ce7adecae0c3a) )
81    ROM_LOAD( "videx videoterm character rom spanish.bin", 0x003800, 0x000800, CRC(439eac08) SHA1(d6f9f8eb7702440d9ae39129ea4f480b80fc4608) )
82    ROM_LOAD( "videx videoterm character rom super and subscript.bin", 0x004000, 0x000800, CRC(08b7c538) SHA1(7f4029d97be05680fe695debe07cea07666419e0) )
83    ROM_LOAD( "videx videoterm character rom symbol.bin", 0x004800, 0x000800, CRC(82bce582) SHA1(29dfa8c5257dbf25651c6bffa9cdb453482aa70e) )
74    ROM_LOAD( "videx videoterm character rom normal.bin", 0x000000, 0x000800, CRC(87f89f08) SHA1(410b54f33d13c82e3857f1be906d93a8c5b8d321) )
75    ROM_LOAD( "videx videoterm character rom normal uppercase.bin", 0x000800, 0x000800, CRC(3d94a7a4) SHA1(5518254f24bc945aab13bc71ecc9526d6dd8e033) )
76    ROM_LOAD( "videx videoterm character rom apl.bin", 0x001000, 0x000800, CRC(1adb704e) SHA1(a95df910eca33188cacee333b1325aa47edbcc25) )
77    ROM_LOAD( "videx videoterm character rom epson.bin", 0x001800, 0x000800, CRC(0c6ef8d0) SHA1(db72c0c120086f1aa4a87120c5d7993c4a9d3a18) )
78    ROM_LOAD( "videx videoterm character rom french.bin", 0x002000, 0x000800, CRC(266aa837) SHA1(2c6b4e9d342dbb2de8e278740f11925a9d8c6616) )
79    ROM_LOAD( "videx videoterm character rom german.bin", 0x002800, 0x000800, CRC(df7324fa) SHA1(0ce58d2ffadbebc8db9f85bbb9a08a4f142af682) )
80    ROM_LOAD( "videx videoterm character rom katakana.bin", 0x003000, 0x000800, CRC(b728690e) SHA1(e018fa66b0ff560313bb35757c9ce7adecae0c3a) )
81    ROM_LOAD( "videx videoterm character rom spanish.bin", 0x003800, 0x000800, CRC(439eac08) SHA1(d6f9f8eb7702440d9ae39129ea4f480b80fc4608) )
82    ROM_LOAD( "videx videoterm character rom super and subscript.bin", 0x004000, 0x000800, CRC(08b7c538) SHA1(7f4029d97be05680fe695debe07cea07666419e0) )
83    ROM_LOAD( "videx videoterm character rom symbol.bin", 0x004800, 0x000800, CRC(82bce582) SHA1(29dfa8c5257dbf25651c6bffa9cdb453482aa70e) )
8484ROM_END
8585
8686/***************************************************************************
src/mess/machine/c64_easy_calc_result.c
r15019r15020
99 
1010/*
1111 
12   PCB Layout
13   ----------
12    PCB Layout
13    ----------
1414 
15   |===========================|
16   |=|                         |
17   |=|     ROM0        LS73    |
18   |=|                         |
19   |=|                         |
20   |=|                         |
21   |=|                         |
22   |=|     ROM1        LS00    |
23   |=|                         |
24   |===========================|
15    |===========================|
16    |=|                         |
17    |=|     ROM0        LS73    |
18    |=|                         |
19    |=|                         |
20    |=|                         |
21    |=|                         |
22    |=|     ROM1        LS00    |
23    |=|                         |
24    |===========================|
2525 
26   ROM0  - Hitachi HN61364P 8Kx8 EPROM "CR2001"
27   ROM1  - Hitachi HN613128P 16Kx8 EPROM "CR3001"
26    ROM0  - Hitachi HN61364P 8Kx8 EPROM "CR2001"
27    ROM1  - Hitachi HN613128P 16Kx8 EPROM "CR3001"
2828 
2929*/
3030 
src/mess/machine/c64_dqbb.h
r15019r15020
2727 
2828class c64_dqbb_cartridge_device : public device_t,
2929                          public device_c64_expansion_card_interface,
30                             public device_nvram_interface
30                          public device_nvram_interface
3131{
3232public:
3333   // construction/destruction
src/mess/machine/c64exp.c
r15019r15020
7070   if (m_roml == NULL)
7171   {
7272      m_roml = auto_alloc_array(machine, UINT8, size);
73     
73
7474      m_roml_mask = size - 1;
7575   }
7676
src/mess/machine/c64_ps64.c
r15019r15020
1/**********************************************************************
2
3    PS-64 speech 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   |===========================|
16   |=|                         |
17   |=|                      SW1|
18   |=|       SC02              |
19   |=|                         |
20   |=|                      CN1|
21   |=|       ROM        LF347  |
22   |=|                         |
23   |=|                         |
24   |===========================|
25
26   SC02  - Votrax SSI-263AP Speech Synthesizer
27   ROM   - Hynix Semiconductor HY27C64D-20 8Kx8 EPROM
28   LF347 - National Instruments LF347N JFET Operational Amplifier
29   SW1   - Module on/off switch
30   CN1   - connector to C64 video/audio port
31
32*/
33
34/*
35
36   TODO:
37
38   - Votrax SC02 emulation
39   - route sound to SID audio input
40   - on/off switch
41
42*/
43
44#include "c64_ps64.h"
45
46
47
48//**************************************************************************
49//  MACROS/CONSTANTS
50//**************************************************************************
51
52#define SSI263_TAG      "ssi263"
53
54
55
56//**************************************************************************
57//  DEVICE DEFINITIONS
58//**************************************************************************
59
60const device_type C64_PS64 = &device_creator<c64_ps64_cartridge_device>;
61
62
63//-------------------------------------------------
64//  votrax_sc02_interface votrax_intf
65//-------------------------------------------------
66/*
67static struct votrax_sc02_interface votrax_intf =
68{
69   DEVCB_NULL
70};
71*/
72
73//-------------------------------------------------
74//  MACHINE_CONFIG_FRAGMENT( c64_ps64 )
75//-------------------------------------------------
76
77static MACHINE_CONFIG_FRAGMENT( c64_ps64 )
78   //MCFG_SPEAKER_STANDARD_MONO("mono")
79   //MCFG_VOTRAX_SC02_ADD(SSI263_TAG, 2000000, votrax_intf)
80   //MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
81MACHINE_CONFIG_END
82
83
84//-------------------------------------------------
85//  machine_config_additions - device-specific
86//  machine configurations
87//-------------------------------------------------
88
89machine_config_constructor c64_ps64_cartridge_device::device_mconfig_additions() const
90{
91   return MACHINE_CONFIG_NAME( c64_ps64 );
92}
93
94
95
96//**************************************************************************
97//  LIVE DEVICE
98//**************************************************************************
99
100//-------------------------------------------------
101//  c64_ps64_cartridge_device - constructor
102//-------------------------------------------------
103
104c64_ps64_cartridge_device::c64_ps64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
105   device_t(mconfig, C64_PS64, "C64 PS-64", tag, owner, clock),
106   device_c64_expansion_card_interface(mconfig, *this)
107{
108}
109
110
111//-------------------------------------------------
112//  device_start - device-specific startup
113//-------------------------------------------------
114
115void c64_ps64_cartridge_device::device_start()
116{
117}
118
119
120//-------------------------------------------------
121//  device_reset - device-specific reset
122//-------------------------------------------------
123
124void c64_ps64_cartridge_device::device_reset()
125{
126}
127
128
129//-------------------------------------------------
130//  c64_cd_r - cartridge data read
131//-------------------------------------------------
132
133UINT8 c64_ps64_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
134{
135   UINT8 data = 0;
136
137   if (!roml)
138   {
139      data = m_roml[offset & 0x1fff];
140   }
141   else if (!io1)
142   {
143      //sc02->read(offset & 0x07);
144   }
145
146   return data;
147}
148
149
150//-------------------------------------------------
151//  c64_cd_w - cartridge data write
152//-------------------------------------------------
153
154void c64_ps64_cartridge_device::c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2)
155{
156   if (!io1)
157   {
158      // sc02->write(offset & 0x07, data);
159   }
160}
1/**********************************************************************
2 
3    PS-64 speech 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    |===========================|
16    |=|                         |
17    |=|                      SW1|
18    |=|       SC02              |
19    |=|                         |
20    |=|                      CN1|
21    |=|       ROM        LF347  |
22    |=|                         |
23    |=|                         |
24    |===========================|
25 
26    SC02  - Votrax SSI-263AP Speech Synthesizer
27    ROM   - Hynix Semiconductor HY27C64D-20 8Kx8 EPROM
28    LF347 - National Instruments LF347N JFET Operational Amplifier
29    SW1   - Module on/off switch
30    CN1   - connector to C64 video/audio port
31 
32*/
33 
34/*
35 
36    TODO:
37 
38    - Votrax SC02 emulation
39    - route sound to SID audio input
40    - on/off switch
41 
42*/
43 
44#include "c64_ps64.h"
45 
46 
47 
48//**************************************************************************
49//  MACROS/CONSTANTS
50//**************************************************************************
51 
52#define SSI263_TAG      "ssi263"
53 
54 
55 
56//**************************************************************************
57//  DEVICE DEFINITIONS
58//**************************************************************************
59 
60const device_type C64_PS64 = &device_creator<c64_ps64_cartridge_device>;
61 
62 
63//-------------------------------------------------
64//  votrax_sc02_interface votrax_intf
65//-------------------------------------------------
66/*
67static struct votrax_sc02_interface votrax_intf =
68{
69    DEVCB_NULL
70};
71*/
72 
73//-------------------------------------------------
74//  MACHINE_CONFIG_FRAGMENT( c64_ps64 )
75//-------------------------------------------------
76 
77static MACHINE_CONFIG_FRAGMENT( c64_ps64 )
78   //MCFG_SPEAKER_STANDARD_MONO("mono")
79   //MCFG_VOTRAX_SC02_ADD(SSI263_TAG, 2000000, votrax_intf)
80   //MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
81MACHINE_CONFIG_END
82 
83 
84//-------------------------------------------------
85//  machine_config_additions - device-specific
86//  machine configurations
87//-------------------------------------------------
88 
89machine_config_constructor c64_ps64_cartridge_device::device_mconfig_additions() const
90{
91   return MACHINE_CONFIG_NAME( c64_ps64 );
92}
93 
94 
95 
96//**************************************************************************
97//  LIVE DEVICE
98//**************************************************************************
99 
100//-------------------------------------------------
101//  c64_ps64_cartridge_device - constructor
102//-------------------------------------------------
103 
104c64_ps64_cartridge_device::c64_ps64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
105   device_t(mconfig, C64_PS64, "C64 PS-64", tag, owner, clock),
106   device_c64_expansion_card_interface(mconfig, *this)
107{
108}
109 
110 
111//-------------------------------------------------
112//  device_start - device-specific startup
113//-------------------------------------------------
114 
115void c64_ps64_cartridge_device::device_start()
116{
117}
118 
119 
120//-------------------------------------------------
121//  device_reset - device-specific reset
122//-------------------------------------------------
123 
124void c64_ps64_cartridge_device::device_reset()
125{
126}
127 
128 
129//-------------------------------------------------
130//  c64_cd_r - cartridge data read
131//-------------------------------------------------
132 
133UINT8 c64_ps64_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
134{
135   UINT8 data = 0;
136 
137   if (!roml)
138   {
139      data = m_roml[offset & 0x1fff];
140   }
141   else if (!io1)
142   {
143      //sc02->read(offset & 0x07);
144   }
145 
146   return data;
147}
148 
149 
150//-------------------------------------------------
151//  c64_cd_w - cartridge data write
152//-------------------------------------------------
153 
154void c64_ps64_cartridge_device::c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2)
155{
156   if (!io1)
157   {
158      // sc02->write(offset & 0x07, data);
159   }
160}
src/mess/machine/c64_ps64.h
r15019r15020
1/**********************************************************************
2
3    PS-64 speech 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 __PS64__
13#define __PS64__
14
15
16#include "emu.h"
17#include "machine/c64exp.h"
18#include "sound/votrax.h"
19
20
21
22//**************************************************************************
23//  TYPE DEFINITIONS
24//**************************************************************************
25
26// ======================> c64_ps64_cartridge_device
27
28class c64_ps64_cartridge_device : public device_t,
29                           public device_c64_expansion_card_interface
30{
31public:
32   // construction/destruction
33   c64_ps64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
34
35   // optional information overrides
36   virtual machine_config_constructor device_mconfig_additions() const;
37
38protected:
39   // device-level overrides
40    virtual void device_config_complete() { m_shortname = "c64_ps64"; }
41   virtual void device_start();
42   virtual void device_reset();
43
44   // device_c64_expansion_card_interface overrides
45   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
46   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
47};
48
49
50// device type definition
51extern const device_type C64_PS64;
52
53
54#endif
1/**********************************************************************
2 
3    PS-64 speech 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 __PS64__
13#define __PS64__
14 
15 
16#include "emu.h"
17#include "machine/c64exp.h"
18#include "sound/votrax.h"
19 
20 
21 
22//**************************************************************************
23//  TYPE DEFINITIONS
24//**************************************************************************
25 
26// ======================> c64_ps64_cartridge_device
27 
28class c64_ps64_cartridge_device : public device_t,
29                           public device_c64_expansion_card_interface
30{
31public:
32   // construction/destruction
33   c64_ps64_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
34 
35   // optional information overrides
36   virtual machine_config_constructor device_mconfig_additions() const;
37 
38protected:
39   // device-level overrides
40    virtual void device_config_complete() { m_shortname = "c64_ps64"; }
41   virtual void device_start();
42   virtual void device_reset();
43 
44   // device_c64_expansion_card_interface overrides
45   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
46   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
47};
48 
49 
50// device type definition
51extern const device_type C64_PS64;
52 
53 
54#endif
src/mess/machine/apple2.c
r15019r15020
448448   {
449449      if (!space.debugger_access())
450450      {
451//         printf("slotram_r: taking cnxx_slot to -1\n");
451//          printf("slotram_r: taking cnxx_slot to -1\n");
452452         state->m_a2_cnxx_slot = -1;
453453         apple2_update_memory(space.machine());
454454      }
r15019r15020
473473   {
474474      if (slotdevice->take_c800())
475475      {
476//         printf("c1xx_r: taking cnxx_slot to %d\n", slotnum);
476//          printf("c1xx_r: taking cnxx_slot to %d\n", slotnum);
477477         state->m_a2_cnxx_slot = slotnum;
478478         apple2_update_memory(space->machine());
479479      }
r15019r15020
532532   {
533533      if (slotdevice->take_c800())
534534      {
535//         printf("c3xx_r: taking cnxx_slot to %d\n", slotnum);
535//          printf("c3xx_r: taking cnxx_slot to %d\n", slotnum);
536536         state->m_a2_cnxx_slot = slotnum;
537537         apple2_update_memory(space->machine());
538538      }
r15019r15020
568568   {
569569      if (slotdevice->take_c800())
570570      {
571//         printf("c3xx_w: taking cnxx_slot to %d\n", slotnum);
571//          printf("c3xx_w: taking cnxx_slot to %d\n", slotnum);
572572         state->m_a2_cnxx_slot = slotnum;
573573         apple2_update_memory(space->machine());
574574      }
r15019r15020
595595   {
596596      if (slotdevice->take_c800())
597597      {
598//         printf("c4xx_r: taking cnxx_slot to %d\n", slotnum);
598//          printf("c4xx_r: taking cnxx_slot to %d\n", slotnum);
599599         state->m_a2_cnxx_slot = slotnum;
600600         apple2_update_memory(space->machine());
601601      }
r15019r15020
631631   {
632632      if (slotdevice->take_c800())
633633      {
634//         printf("c4xx_w: taking cnxx_slot to %d\n", slotnum);
634//          printf("c4xx_w: taking cnxx_slot to %d\n", slotnum);
635635         state->m_a2_cnxx_slot = slotnum;
636636         apple2_update_memory(space->machine());
637637      }
r15019r15020
650650   if (!space->debugger_access())
651651   {
652652        apple2_state *state = space->machine().driver_data<apple2_state>();
653//      printf("cfff_r: taking cnxx_slot to -1\n");
653//      printf("cfff_r: taking cnxx_slot to -1\n");
654654      state->m_a2_cnxx_slot = -1;
655655      apple2_update_memory(space->machine());
656656   }
r15019r15020
663663   if (!space->debugger_access())
664664   {
665665        apple2_state *state = space->machine().driver_data<apple2_state>();
666//      printf("cfff_w: taking cnxx_slot to -1\n");
666//      printf("cfff_w: taking cnxx_slot to -1\n");
667667        state->m_a2_cnxx_slot = -1;
668668        apple2_update_memory(space->machine());
669669    }
src/mess/machine/isa_ibm_mfc.h
r15019r15020
5454      DECLARE_WRITE_LINE_MEMBER( d8253_clk0_out );
5555      DECLARE_WRITE_LINE_MEMBER( d8253_clk1_out );
5656      DECLARE_WRITE_LINE_MEMBER( d8253_clk2_out );
57     
57
5858      DECLARE_WRITE_LINE_MEMBER( ibm_mfc_ym_irq );
5959
6060      void                     set_z80_interrupt(int src, int state);
src/mess/includes/gba.h
r15019r15020
141141      m_gba_pram(*this, "gba_pram"),
142142      m_gba_vram(*this, "gba_vram"),
143143      m_gba_oam(*this, "gba_oam") { }
144   
144
145145   required_shared_ptr<UINT32> m_gba_pram;
146146   required_shared_ptr<UINT32> m_gba_vram;
147147   required_shared_ptr<UINT32> m_gba_oam;
148   
148
149149   virtual void video_start();
150150
151151   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
r15019r15020
221221   int m_bios_protected;
222222
223223   int m_flash_battery_load;
224   
224
225225   DIRECT_UPDATE_MEMBER(gba_direct);
226226   DECLARE_READ32_MEMBER(gba_io_r);
227227   DECLARE_WRITE32_MEMBER(gba_io_w);
src/mess/includes/fm7.h
r15019r15020
109109
110110   optional_shared_ptr<UINT8> m_shared_ram;
111111   optional_shared_ptr<UINT8> m_boot_ram;
112   
112
113113   UINT8 m_irq_flags;
114114   UINT8 m_irq_mask;
115115   emu_timer* m_timer;
src/mess/includes/dgn_beta.h
r15019r15020
9191
9292   required_device<mc6845_device> m_mc6845;
9393   required_shared_ptr<UINT8> m_videoram;
94   
94
9595   UINT8 *m_system_rom;
9696   int m_LogDatWrites;
9797   int m_Keyboard[NoKeyrows];
src/mess/includes/apple2gs.h
r15019r15020
115115   bitmap_ind16 *m_legacy_gfx;
116116    bool m_is_rom3;
117117    UINT8 m_echo_bank;
118   
118
119119   DECLARE_DIRECT_UPDATE_MEMBER(apple2gs_opbase);
120120};
121121
src/mess/includes/abc80x.h
r15019r15020
114114
115115   // video state
116116   optional_shared_ptr<UINT8> m_video_ram;             // HR video RAM
117   optional_shared_ptr<UINT8> m_char_ram;             // character RAM
117   optional_shared_ptr<UINT8> m_char_ram;            // character RAM
118118   const UINT8 *m_char_rom;      // character generator ROM
119119   const UINT8 *m_fgctl_prom;      // foreground control PROM
120120   UINT8 m_hrs;               // HR picture start scanline
r15019r15020
142142   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
143143
144144   void hr_update(bitmap_rgb32 &bitmap, const rectangle &cliprect);
145   
145
146146   DECLARE_DIRECT_UPDATE_MEMBER(abc800m_direct_update_handler);
147147};
148148
r15019r15020
159159   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
160160
161161   void hr_update(bitmap_ind16 &bitmap, const rectangle &cliprect);
162   
162
163163   DECLARE_DIRECT_UPDATE_MEMBER(abc800c_direct_update_handler);
164164};
165165
r15019r15020
188188   DECLARE_READ8_MEMBER( pling_r );
189189   DECLARE_WRITE_LINE_MEMBER( lrs_w );
190190   DECLARE_WRITE_LINE_MEMBER( mux80_40_w );
191   DECLARE_WRITE_LINE_MEMBER( vs_w );   
191   DECLARE_WRITE_LINE_MEMBER( vs_w );
192192   DECLARE_DIRECT_UPDATE_MEMBER(abc802_direct_update_handler);
193193
194194   // cpu state
src/mess/includes/tmc2000e.h
r15019r15020
6060
6161   /* video state */
6262   int m_cdp1864_efx;      /* EFx */
63   required_shared_ptr<UINT8> m_colorram;       /* color memory */
63   required_shared_ptr<UINT8> m_colorram;      /* color memory */
6464   UINT8 m_color;
6565
6666   /* keyboard state */
src/mess/includes/osborne1.h
r15019r15020
5757   DECLARE_WRITE8_MEMBER(video_pia_port_b_w);
5858   DECLARE_WRITE_LINE_MEMBER(video_pia_irq_a_func);
5959   DECLARE_DIRECT_UPDATE_MEMBER(osborne1_opbase);
60   
60
6161   bool m_bank2_enabled;
6262   bool m_bank3_enabled;
6363   UINT8   *m_bank4_ptr;
src/mess/includes/sage2.h
r15019r15020
7474   DECLARE_WRITE_LINE_MEMBER( ack_w );
7575 
7676   DECLARE_WRITE8_MEMBER(kbd_put);
77   
77
7878   DECLARE_DIRECT_UPDATE_MEMBER(sage2_direct_update_handler);
7979 
8080   int m_reset;
src/mess/includes/cosmicos.h
r15019r15020
9292   DECLARE_INPUT_CHANGED_MEMBER( memory_protect );
9393   DECLARE_INPUT_CHANGED_MEMBER( memory_disable );
9494   DECLARE_DIRECT_UPDATE_MEMBER(cosmicos_direct_update_handler);
95   
95
9696   void set_cdp1802_mode(int mode);
9797   void clear_input_data();
9898   void set_ram_mode();
src/mess/drivers/vt520.c
r15019r15020
5151static MACHINE_RESET(vt520)
5252{
5353   vt520_state *state = machine.driver_data<vt520_state>();
54   address_space *space = machine.device("maincpu")->memory().space(AS_PROGRAM);   
54   address_space *space = machine.device("maincpu")->memory().space(AS_PROGRAM);
5555   UINT8 *rom = state->memregion("maincpu")->base();
5656   space->unmap_write(0x0000, 0xffff);
5757   state->membank("bank1")->set_base(rom + 0x70000);
src/mess/drivers/adam.c
r15019r15020
770770      if(!(data & 0x10)) m_ddp0->go_reverse();
771771      m_ddp0->change_state(BIT(data, 1) ? CASSETTE_MOTOR_DISABLED : CASSETTE_MOTOR_ENABLED, CASSETTE_MASK_MOTOR); // motor control
772772   }
773   
773
774774   if(m_ddp1->exists())
775775   {
776776      m_ddp1->set_speed(BIT(data, 0) ? (double) 80/1.875 : 20/1.875); // speed select
r15019r15020
804804        4
805805
806806    */
807   
807
808808   UINT8 data = 0;
809   
809
810810   if (m_reset)
811811      data |= M6801_MODE_6;
812812   else
r15019r15020
842842      m_ddp0->set_channel(!BIT(data, 2)); // Track select
843843      if (!m_wr0) m_ddp0->output(BIT(data, 0) ? 1.0 : -1.0); // write data
844844   }
845   
845
846846   if(m_ddp1->exists())
847847   {
848848      m_ddp1->set_channel(!BIT(data, 2));
r15019r15020
883883      data |= 1 << 5; // cassette in place
884884      data |= (m_ddp0->input() < 0) << 7; // read data
885885   }
886   
886
887887   // drive 1
888888   if(m_ddp1->exists())
889889   {
890890      data |= ((m_ddp1->get_state() & CASSETTE_MASK_UISTATE) != CASSETTE_STOPPED) << 4; // motion sense
891891      data |= (m_ddp1->input() < 0) << 7; // read data
892892   }
893   
893
894894   // read data 0 (always 1)
895895   data |= 0x40;
896     
896
897897   return data;
898898}
899899
src/mess/drivers/a2600.c
r15019r15020
6868   int m_FETimer;
6969
7070   direct_update_delegate m_FE_old_opbase_handler;
71   
71
7272   DECLARE_DIRECT_UPDATE_MEMBER(modeF6_opbase);
7373   DECLARE_DIRECT_UPDATE_MEMBER(modeSS_opbase);
7474   DECLARE_DIRECT_UPDATE_MEMBER(modeDPC_opbase_handler);
75   DECLARE_DIRECT_UPDATE_MEMBER(modeFE_opbase_handler);   
75   DECLARE_DIRECT_UPDATE_MEMBER(modeFE_opbase_handler);
7676   DECLARE_READ8_MEMBER(modeF8_switch_r);
7777   DECLARE_READ8_MEMBER(modeFA_switch_r);
7878   DECLARE_READ8_MEMBER(modeF6_switch_r);
src/mess/drivers/abc80x.c
r15019r15020
15101510//-------------------------------------------------
15111511
15121512DIRECT_UPDATE_MEMBER(abc806_state::abc806_direct_update_handler)
1513{   
1513{
15141514   if (address >= 0x7800 && address < 0x8000)
15151515   {
15161516      direct.explicit_configure(0x7800, 0x7fff, 0x7ff, memregion(Z80_TAG)->base() + 0x7800);
src/mess/drivers/x68k.c
r15019r15020
27032703   unsigned char* rom = machine.root_device().memregion("maincpu")->base();
27042704   unsigned char* user2 = machine.root_device().memregion("user2")->base();
27052705   //FIXME
2706//   state->m_gvram = auto_alloc_array(machine, UINT16, 0x080000/sizeof(UINT16));
2707//   state->m_tvram = auto_alloc_array(machine, UINT16, 0x080000/sizeof(UINT16));
2706//  state->m_gvram = auto_alloc_array(machine, UINT16, 0x080000/sizeof(UINT16));
2707//  state->m_tvram = auto_alloc_array(machine, UINT16, 0x080000/sizeof(UINT16));
27082708   state->m_sram = auto_alloc_array(machine, UINT16, 0x4000/sizeof(UINT16));
27092709
27102710   state->m_spritereg = auto_alloc_array_clear(machine, UINT16, 0x8000/sizeof(UINT16));
src/mess/drivers/elwro800.c
r15019r15020
4444   /* NR signal */
4545   UINT8 m_NR;
4646   UINT8 m_df_on_databus;
47   
47
4848   DECLARE_DIRECT_UPDATE_MEMBER(elwro800_direct_handler);
4949   DECLARE_WRITE8_MEMBER(elwro800jr_fdc_control_w);
5050   DECLARE_READ8_MEMBER(elwro800jr_io_r);

Previous 15994 Revisions Next


© 1998-2018 The MESS Team