Previous 199869 Revisions Next

r17593 Sunday 2nd September, 2012 at 13:46:14 UTC by Curt Coder
(MESS) Added PET cassette port slot interface to vic20, c64, and plus4. Implemented 1530/1531 datassette as slot devices. Converted MOS6581 interface to devcb. [Curt Coder]
(MESS) vic20: Added floating bus read support to VIC and cartridge interface.
(MESS) vic10: Added floating bus read support to VIC-II and cartridge interface.
(MESS) c64: Added floating bus read support to cartridge interface. [Curt Coder]
(MESS) plus4: Added floating bus read support to TED and cartridge interface. Implemented some Diag264 test cartridge loopback connectors. [Curt Coder]
(MESS) c16: Added PAL/NTSC variants. (nw)
(MESS) v364: Fixed speech ROM mapping. (nw)
(MESS) compis: Separated keyboard to its own file. (nw)
(MESS) huebler: Cleanup. (nw)
[src/emu/sound]mos6560.c mos6560.h sid.c sid.h sid6581.c sid6581.h
[src/mess]mess.lst mess.mak
[src/mess/audio]mos7360.c mos7360.h
[src/mess/drivers]c128.c c64.c c65.c compis.c huebler.c plus4.c vic10.c vic20.c
[src/mess/includes]c128.h c64.h c65.h compis.h huebler.h plus4.h vic10.h vic20.h
[src/mess/machine]c128_comal80.c c128_comal80.h c1551.c c1551.h c2n.c* c2n.h* c64_16kb.c c64_16kb.h c64_comal80.c c64_comal80.h c64_currah_speech.c c64_currah_speech.h c64_dela_ep256.c c64_dela_ep256.h c64_dela_ep64.c c64_dela_ep64.h c64_dela_ep7x8.c c64_dela_ep7x8.h c64_dinamic.c c64_dinamic.h c64_dqbb.c c64_dqbb.h c64_easy_calc_result.c c64_easy_calc_result.h c64_easyflash.c c64_easyflash.h c64_epyx_fast_load.c c64_epyx_fast_load.h c64_exos.c c64_exos.h c64_final.c c64_final.h c64_final3.c c64_final3.h c64_fun_play.c c64_fun_play.h c64_georam.c c64_georam.h c64_ide64.c c64_ide64.h c64_ieee488.c c64_ieee488.h c64_kingsoft.c c64_kingsoft.h c64_mach5.c c64_mach5.h c64_magic_desk.c c64_magic_desk.h c64_magic_formel.c c64_magic_formel.h c64_mikro_assembler.c c64_mikro_assembler.h c64_multiscreen.c c64_multiscreen.h c64_neoram.c c64_neoram.h c64_ocean.c c64_ocean.h c64_pagefox.c c64_pagefox.h c64_prophet64.c c64_prophet64.h c64_ps64.c c64_ps64.h c64_rex.c c64_rex.h c64_rex_ep256.c c64_rex_ep256.h c64_ross.c c64_ross.h c64_sfx_sound_expander.c c64_sfx_sound_expander.h c64_silverrock.c c64_silverrock.h c64_simons_basic.c c64_simons_basic.h c64_stardos.c c64_stardos.h c64_std.c c64_std.h c64_structured_basic.c c64_structured_basic.h c64_super_explode.c c64_super_explode.h c64_super_games.c c64_super_games.h c64_sw8k.c c64_sw8k.h c64_system3.c c64_system3.h c64_tdos.c c64_tdos.h c64_vw64.c c64_vw64.h c64_warp_speed.c c64_warp_speed.h c64_westermann.c c64_westermann.h c64_xl80.c c64_xl80.h c64_zaxxon.c c64_zaxxon.h c64exp.c c64exp.h cbmipt.c cbmipt.h compiskb.c* compiskb.h* diag264_lb_iec.c* diag264_lb_iec.h* diag264_lb_tape.c* diag264_lb_tape.h* diag264_lb_user.c* diag264_lb_user.h* petcass.c* petcass.h* plus4_sid.c plus4_sid.h plus4_std.c plus4_std.h plus4exp.c plus4exp.h plus4user.h vcsctrl.c vcsctrl.h vic1010.c vic1010.h vic10exp.c vic10exp.h vic10std.c vic10std.h vic1110.c vic1110.h vic1111.c vic1111.h vic1112.c vic1112.h vic1210.c vic1210.h vic20_megacart.c vic20_megacart.h vic20exp.c vic20exp.h vic20std.c vic20std.h
[src/mess/video]mos6566.c mos6566.h

trunk/src/emu/sound/mos6560.c
r17592r17593
9494   /* DMA */
9595   mos6560_dma_read          dma_read;
9696   mos6560_dma_read_color    dma_read_color;
97   UINT8 last_data;
9798
9899   /* lightpen */
99100   mos6560_lightpen_button_callback lightpen_button_cb;
r17592r17593
215216   for (y = ybegin; y <= yend; y++)
216217   {
217218      code = mos6560->dma_read(device->machine(), (mos6560->chargenaddr + ch * mos6560->charheight + y) & 0x3fff);
219      mos6560->last_data = code;
218220      mos6560->bitmap->pix16(y + yoff, xoff + 0) = color[code >> 7];
219221      mos6560->bitmap->pix16(y + yoff, xoff + 1) = color[(code >> 6) & 1];
220222      mos6560->bitmap->pix16(y + yoff, xoff + 2) = color[(code >> 5) & 1];
r17592r17593
239241   for (y = ybegin; y <= yend; y++)
240242   {
241243      code = mos6560->dma_read(device->machine(), (mos6560->chargenaddr + ch * mos6560->charheight + y) & 0x3fff);
244      mos6560->last_data = code;
242245      mos6560->bitmap->pix16(y + yoff, xoff + 0) =
243246         mos6560->bitmap->pix16(y + yoff, xoff + 1) = color[code >> 6];
244247      mos6560->bitmap->pix16(y + yoff, xoff + 2) =
r17592r17593
299302      for (xoff = mos6560->xpos; (xoff < mos6560->xpos + mos6560->xsize) && (xoff < mos6560->total_xsize); xoff += 8, offs++)
300303      {
301304         ch = mos6560->dma_read(device->machine(), (mos6560->videoaddr + offs) & 0x3fff);
305         mos6560->last_data = ch;
302306         attr = (mos6560->dma_read_color(device->machine(), (mos6560->videoaddr + offs) & 0x3fff)) & 0xf;
303307
304308         if (mos6560->type == MOS6560_ATTACKUFO)
r17592r17593
485489   return val;
486490}
487491
492UINT8 mos6560_bus_r( device_t *device )
493{
494   mos6560_state *mos6560 = get_safe_token(device);
488495
496   return mos6560->last_data;
497}
498
489499/*-------------------------------------------------
490500 mos6560_raster_interrupt_gen
491501-------------------------------------------------*/
r17592r17593
874884   device->save_item(NAME(mos6560->multi));
875885   device->save_item(NAME(mos6560->multiinverted));
876886
887   device->save_item(NAME(mos6560->last_data));
888
877889   device->save_item(NAME(*mos6560->bitmap));
878890
879891   device->save_item(NAME(mos6560->tone1pos));
trunk/src/emu/sound/mos6560.h
r17592r17593
106106WRITE8_DEVICE_HANDLER( mos6560_port_w );
107107READ8_DEVICE_HANDLER( mos6560_port_r );
108108
109UINT8 mos6560_bus_r( device_t *device );
109110void mos6560_raster_interrupt_gen( device_t *device );
110111UINT32 mos6560_video_update( device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect );
111112
trunk/src/emu/sound/sid.c
r17592r17593
336336   data=0xff;
337337   break;
338338    case 0x19:                     /* paddle 1 */
339   if (This->ad_read != NULL)
340       data=This->ad_read (This->device, 0);
339   if (!This->in_potx_func.isnull())
340      data = This->in_potx_func(offset);
341341   else
342342       data=0;
343343   break;
344344    case 0x1a:                     /* paddle 2 */
345   if (This->ad_read != NULL)
346       data=This->ad_read (This->device, 1);
345   if (!This->in_poty_func.isnull())
346      data = This->in_poty_func(offset);
347347   else
348348       data=0;
349349   break;
trunk/src/emu/sound/sid.h
r17592r17593
1717    device_t *device;
1818    sound_stream *mixer_channel; // mame stream/ mixer channel
1919
20    int (*ad_read) (device_t *device, int which);
20   devcb_resolved_read8 in_potx_func;
21   devcb_resolved_read8 in_poty_func;
22
2123    SIDTYPE type;
2224    UINT32 clock;
2325
trunk/src/emu/sound/sid6581.c
r17592r17593
3434   _SID6581 *sid = get_sid(device);
3535   const sid6581_interface *iface = (const sid6581_interface*) device->static_config();
3636
37   // resolve callbacks
38   sid->in_potx_func.resolve(iface->in_potx_cb, *device);
39   sid->in_poty_func.resolve(iface->in_poty_cb, *device);
40
3741   sid->device = device;
3842   sid->mixer_channel = device->machine().sound().stream_alloc(*device, 0, 1,  device->machine().sample_rate(), (void *) sid, sid_update);
3943   sid->PCMfreq = device->machine().sample_rate();
4044   sid->clock = device->clock();
41   sid->ad_read = iface ? iface->ad_read : NULL;
4245   sid->type = sidtype;
4346
4447   sid6581_init(sid);
trunk/src/emu/sound/sid6581.h
r17592r17593
2020   MOS8580
2121} SIDTYPE;
2222
23#define MOS6581_INTERFACE(name) \
24   const sid6581_interface (name) =
2325
2426typedef struct _sid6581_interface sid6581_interface;
2527struct _sid6581_interface
2628{
27   int (*ad_read)(device_t *device, int channel);
28} ;
29   devcb_read8 in_potx_cb;
30   devcb_read8 in_poty_cb;
31};
2932
3033
3134READ8_DEVICE_HANDLER  ( sid6581_r );
trunk/src/mess/audio/mos7360.c
r17592r17593
483483      else
484484         code = m_in_ram_func(m_chargenaddr + ch * 8 + y);
485485
486      m_last_data = code;
487
486488      m_bitmap.pix16(y + yoff, 0 + xoff) = color[code >> 7];
487489      m_bitmap.pix16(y + yoff, 1 + xoff) = color[(code >> 6) & 1];
488490      m_bitmap.pix16(y + yoff, 2 + xoff) = color[(code >> 5) & 1];
r17592r17593
505507      else
506508         code = m_in_ram_func(m_chargenaddr + ch * 8 + y);
507509
510      m_last_data = code;
511
508512      m_bitmap.pix16(y + yoff, 0 + xoff) =
509513         m_bitmap.pix16(y + yoff, 1 + xoff) = m_multi[code >> 6];
510514      m_bitmap.pix16(y + yoff, 2 + xoff) =
r17592r17593
523527   for (y = ybegin; y <= yend; y++)
524528   {
525529      code = m_in_ram_func(m_bitmapaddr + ch * 8 + y);
530     
531      m_last_data = code;
532
526533      m_bitmap.pix16(y + yoff, 0 + xoff) = m_c16_bitmap[code >> 7];
527534      m_bitmap.pix16(y + yoff, 1 + xoff) = m_c16_bitmap[(code >> 6) & 1];
528535      m_bitmap.pix16(y + yoff, 2 + xoff) = m_c16_bitmap[(code >> 5) & 1];
r17592r17593
541548   for (y = ybegin; y <= yend; y++)
542549   {
543550      code = m_in_ram_func(m_bitmapaddr + ch * 8 + y);
551     
552      m_last_data = code;
544553
545554      m_bitmap.pix16(y + yoff, 0 + xoff) =
546555         m_bitmap.pix16(y + yoff, 1 + xoff) = m_bitmapmulti[code >> 6];
r17592r17593
11411150      set_interrupt(2);
11421151   }
11431152}
1153
1154
1155//-------------------------------------------------
1156//  bus_r - data bus read
1157//-------------------------------------------------
1158
1159UINT8 mos7360_device::bus_r()
1160{
1161   return m_last_data;
1162}
trunk/src/mess/audio/mos7360.h
r17592r17593
118118   DECLARE_READ8_MEMBER( read );
119119   DECLARE_WRITE8_MEMBER( write );
120120
121   UINT8 bus_r();
122
121123   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
122124
123125   // horrible crap code
r17592r17593
171173   sound_stream *m_stream;
172174
173175   UINT8 m_reg[0x20];
176   UINT8 m_last_data;
174177
175178   bitmap_ind16 m_bitmap;
176179
trunk/src/mess/machine/c64_super_explode.h
r17592r17593
3939   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
4040
4141   // device_c64_expansion_card_interface overrides
42   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
42   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4343   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4444
4545private:
trunk/src/mess/machine/diag264_lb_tape.c
r0r17593
1/**********************************************************************
2
3    Diag264 Cassette Loop Back Connector emulation
4
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7
8**********************************************************************/
9
10#include "diag264_lb_tape.h"
11
12
13
14//**************************************************************************
15//  DEVICE DEFINITIONS
16//**************************************************************************
17
18const device_type DIAG264_CASSETTE_LOOPBACK = &device_creator<diag264_cassette_loopback_device>;
19
20
21
22//**************************************************************************
23//  LIVE DEVICE
24//**************************************************************************
25
26//-------------------------------------------------
27//  diag264_cassette_loopback_device - constructor
28//-------------------------------------------------
29
30diag264_cassette_loopback_device::diag264_cassette_loopback_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
31   : device_t(mconfig, DIAG264_CASSETTE_LOOPBACK, "Diag264 Cassette Loopback", tag, owner, clock),
32     device_pet_datassette_port_interface(mconfig, *this),
33     m_read(1),
34     m_sense(0)
35{ }
36
37
38//-------------------------------------------------
39//  device_start - device-specific startup
40//-------------------------------------------------
41
42void diag264_cassette_loopback_device::device_start()
43{
44}
45
46
47//-------------------------------------------------
48//  datassette_read - read data
49//-------------------------------------------------
50
51int diag264_cassette_loopback_device::datassette_read()
52{
53   return m_read;
54}
55
56
57//-------------------------------------------------
58//  datassette_write - write data
59//-------------------------------------------------
60
61void diag264_cassette_loopback_device::datassette_write(int state)
62{
63   m_read = state;
64}
65
66
67//-------------------------------------------------
68//  datassette_sense - switch sense
69//-------------------------------------------------
70
71int diag264_cassette_loopback_device::datassette_sense()
72{
73   return m_sense;
74}
75
76
77//-------------------------------------------------
78//  datassette_motor - motor
79//-------------------------------------------------
80
81void diag264_cassette_loopback_device::datassette_motor(int state)
82{
83   m_sense = !state;
84}
trunk/src/mess/machine/diag264_lb_tape.h
r0r17593
1/**********************************************************************
2
3    Diag264 Cassette Loop Back Connector 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 __DIAG264_CASSETTE_LOOPBACK__
13#define __DIAG264_CASSETTE_LOOPBACK__
14
15
16#include "emu.h"
17#include "machine/petcass.h"
18
19
20
21//**************************************************************************
22//  TYPE DEFINITIONS
23//**************************************************************************
24
25// ======================> diag264_cassette_loopback_device
26
27class diag264_cassette_loopback_device :  public device_t,
28                                public device_pet_datassette_port_interface
29{
30
31public:
32    // construction/destruction
33    diag264_cassette_loopback_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
34
35protected:
36    // device-level overrides
37    virtual void device_config_complete() { m_shortname = "diag264_loopback_cassette"; }
38    virtual void device_start();
39
40   // device_pet_datassette_port_interface overrides
41   virtual int datassette_read();
42   virtual void datassette_write(int state);
43   virtual int datassette_sense();
44   virtual void datassette_motor(int state);
45
46private:
47   int m_read;
48   int m_sense;
49};
50
51
52// device type definition
53extern const device_type DIAG264_CASSETTE_LOOPBACK;
54
55
56
57#endif
trunk/src/mess/machine/plus4exp.c
r17592r17593
322322//  cd_r - cartridge data read
323323//-------------------------------------------------
324324
325UINT8 plus4_expansion_slot_device::cd_r(address_space &space, offs_t offset, int ba, int cs0, int c1l, int c2l, int cs1, int c1h, int c2h)
325UINT8 plus4_expansion_slot_device::cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int cs0, int c1l, int c2l, int cs1, int c1h, int c2h)
326326{
327   UINT8 data = 0;
328
329327   if (m_cart != NULL)
330328   {
331      data = m_cart->plus4_cd_r(space, offset, ba, cs0, c1l, c1h, cs1, c2l, c2h);
329      data = m_cart->plus4_cd_r(space, offset, data, ba, cs0, c1l, c1h, cs1, c2l, c2h);
332330   }
333331
334332   return data;
trunk/src/mess/machine/c64_tdos.c
r17592r17593
215215//  c64_cd_r - cartridge data read
216216//-------------------------------------------------
217217
218UINT8 c64_tdos_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
218UINT8 c64_tdos_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
219219{
220   UINT8 data = m_exp->cd_r(space, offset, ba, roml, romh, io1, io2);
220   data = m_exp->cd_r(space, offset, data, ba, roml, romh, io1, io2);
221221
222222   // TODO
223223
trunk/src/mess/machine/plus4exp.h
r17592r17593
9797   virtual ~plus4_expansion_slot_device();
9898
9999   // computer interface
100   UINT8 cd_r(address_space &space, offs_t offset, int ba, int cs0, int c1l, int c2l, int cs1, int c1h, int c2h);
100   UINT8 cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int cs0, int c1l, int c2l, int cs1, int c1h, int c2h);
101101   void cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int cs0, int c1l, int c2l, int cs1, int c1h, int c2h);
102102   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
103103   DECLARE_WRITE_LINE_MEMBER( breset_w );
r17592r17593
163163   virtual UINT8* plus4_nvram_pointer(running_machine &machine, size_t size);
164164
165165   // runtime
166   virtual UINT8 plus4_cd_r(address_space &space, offs_t offset, int ba, int cs0, int c1l, int c2l, int cs1, int c1h, int c2h) { return 0; };
166   virtual UINT8 plus4_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int cs0, int c1l, int c2l, int cs1, int c1h, int c2h) { return data; };
167167   virtual void plus4_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int cs0, int c1l, int c2l, int cs1, int c1h, int c2h) { };
168168   virtual UINT32 plus4_screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { return 0; }
169169   virtual void plus4_breset_w(int state) { };
trunk/src/mess/machine/c64_tdos.h
r17592r17593
5252   virtual void device_reset();
5353
5454   // device_c64_expansion_card_interface overrides
55   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
55   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
5656   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
5757   virtual int c64_game_r(offs_t offset, int ba, int rw, int hiram);
5858   virtual int c64_exrom_r(offs_t offset, int ba, int rw, int hiram);
trunk/src/mess/machine/c64_silverrock.c
r17592r17593
9292//  c64_cd_r - cartridge data read
9393//-------------------------------------------------
9494
95UINT8 c64_silverrock_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
95UINT8 c64_silverrock_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
9696{
97   UINT8 data = 0;
98
9997   if (!roml)
10098   {
10199      offs_t addr = (m_bank << 13) | (offset & 0x1fff);
trunk/src/mess/machine/c64_silverrock.h
r17592r17593
3838   virtual void device_reset();
3939
4040   // device_c64_expansion_card_interface overrides
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4242   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4343
4444private:
trunk/src/mess/machine/c64_kingsoft.c
r17592r17593
5757//  c64_cd_r - cartridge data read
5858//-------------------------------------------------
5959
60UINT8 c64_kingsoft_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
60UINT8 c64_kingsoft_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
6161{
62   UINT8 data = 0;
63
6462   if (!roml)
6563   {
6664      data = m_roml[offset & 0x1fff];
trunk/src/mess/machine/c64_kingsoft.h
r17592r17593
3838   virtual void device_reset();
3939
4040   // device_c64_expansion_card_interface overrides
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4242   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4343   virtual int c64_game_r(offs_t offset, int ba, int rw, int hiram);
4444};
trunk/src/mess/machine/c64_sfx_sound_expander.c
r17592r17593
235235//  c64_cd_r - cartridge data read
236236//-------------------------------------------------
237237
238UINT8 c64_sfx_sound_expander_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
238UINT8 c64_sfx_sound_expander_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
239239{
240   UINT8 data = m_exp->cd_r(space, offset, ba, roml, romh, io1, io2);
240   data = m_exp->cd_r(space, offset, data, ba, roml, romh, io1, io2);
241241
242242   if (!io2)
243243   {
r17592r17593
245245      {
246246         switch (offset & 0x07)
247247         {
248         case 0: data |= ioport("KB0")->read(); break;
249         case 1: data |= ioport("KB1")->read(); break;
250         case 2: data |= ioport("KB2")->read(); break;
251         case 3: data |= ioport("KB3")->read(); break;
252         case 4: data |= ioport("KB4")->read(); break;
253         case 5: data |= ioport("KB5")->read(); break;
254         case 6: data |= ioport("KB6")->read(); break;
255         case 7: data |= ioport("KB7")->read(); break;
248         case 0: data = ioport("KB0")->read(); break;
249         case 1: data = ioport("KB1")->read(); break;
250         case 2: data = ioport("KB2")->read(); break;
251         case 3: data = ioport("KB3")->read(); break;
252         case 4: data = ioport("KB4")->read(); break;
253         case 5: data = ioport("KB5")->read(); break;
254         case 6: data = ioport("KB6")->read(); break;
255         case 7: data = ioport("KB7")->read(); break;
256256         }
257257      }
258258      else if (BIT(offset, 5))
259259      {
260         data |= ym3526_r(m_opl, BIT(offset, 4));
260         data = ym3526_r(m_opl, BIT(offset, 4));
261261      }
262262   }
263263
trunk/src/mess/machine/cbmipt.c
r17592r17593
10951095   PORT_BIT( 0xff,128,IPT_PADDLE) PORT_SENSITIVITY(30) PORT_KEYDELTA(20) PORT_MINMAX(0,255) PORT_CODE_DEC(KEYCODE_END) PORT_CODE_INC(KEYCODE_PGDN) PORT_PLAYER(2) PORT_REVERSE PORT_CONDITION("CTRLSEL", 0xf0, EQUALS, 0x10)
10961096INPUT_PORTS_END
10971097
1098SLOT_INTERFACE_START( cbm_datassette_devices )
1099   SLOT_INTERFACE("c1530", C1530)
1100SLOT_INTERFACE_END
1101
10981102SLOT_INTERFACE_START( cbm_iec_devices )
10991103   SLOT_INTERFACE("c1540", C1540)
11001104   SLOT_INTERFACE("c1541", C1541)
r17592r17593
11121116   SLOT_INTERFACE("interpod", INTERPOD)
11131117   SLOT_INTERFACE("minichief", MINI_CHIEF)
11141118   SLOT_INTERFACE("serialbox", SERIAL_BOX)
1119   SLOT_INTERFACE("diag264", DIAG264_SERIAL_LOOPBACK)
11151120SLOT_INTERFACE_END
11161121
11171122SLOT_INTERFACE_START( sx1541_iec_devices )
11181123   SLOT_INTERFACE("sx1541", SX1541)
11191124SLOT_INTERFACE_END
11201125
1126SLOT_INTERFACE_START( c128dcr_iec_devices )
1127   SLOT_INTERFACE("c1571cr", C1571CR)
1128SLOT_INTERFACE_END
1129
1130SLOT_INTERFACE_START( c128d81_iec_devices )
1131   SLOT_INTERFACE("c1563", C1563)
1132SLOT_INTERFACE_END
1133
11211134SLOT_INTERFACE_START( cbm_ieee488_devices )
11221135   SLOT_INTERFACE("c2040", C2040)
11231136   SLOT_INTERFACE("c3040", C3040)
r17592r17593
12251238   SLOT_INTERFACE_INTERNAL("c128_comal80", C128_COMAL80)
12261239SLOT_INTERFACE_END
12271240
1241SLOT_INTERFACE_START( plus4_datassette_devices )
1242   SLOT_INTERFACE("c1531", C1531)
1243   SLOT_INTERFACE("diag264", DIAG264_CASSETTE_LOOPBACK)
1244SLOT_INTERFACE_END
1245
12281246SLOT_INTERFACE_START( plus4_expansion_cards )
12291247   SLOT_INTERFACE("c1551", C1551)
12301248   SLOT_INTERFACE("sid", PLUS4_SID)
r17592r17593
12341252SLOT_INTERFACE_END
12351253
12361254SLOT_INTERFACE_START( plus4_user_port_cards )
1255   SLOT_INTERFACE("diag264", DIAG264_USER_PORT_LOOPBACK)
12371256SLOT_INTERFACE_END
trunk/src/mess/machine/c64_sfx_sound_expander.h
r17592r17593
5252   virtual void device_reset();
5353
5454   // device_c64_expansion_card_interface overrides
55   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
55   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
5656   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
5757   virtual int c64_game_r(offs_t offset, int ba, int rw, int hiram);
5858   virtual int c64_exrom_r(offs_t offset, int ba, int rw, int hiram);
trunk/src/mess/machine/cbmipt.h
r17592r17593
33#ifndef CBMIPT_H_
44#define CBMIPT_H_
55
6#include "machine/c2n.h"
67#include "machine/c64_4cga.h"
78#include "machine/c64_4dxh.h"
89#include "machine/c64_4ksa.h"
r17592r17593
6869#include "machine/c8280.h"
6970#include "machine/d9060.h"
7071#include "machine/cmdhd.h"
72#include "machine/diag264_lb_iec.h"
73#include "machine/diag264_lb_tape.h"
74#include "machine/diag264_lb_user.h"
7175#include "machine/fd2000.h"
7276#include "machine/interpod.h"
7377#include "machine/plus4_sid.h"
r17592r17593
147151
148152
149153
154SLOT_INTERFACE_EXTERN( cbm_datassette_devices );
150155SLOT_INTERFACE_EXTERN( cbm_iec_devices );
151156SLOT_INTERFACE_EXTERN( sx1541_iec_devices );
157SLOT_INTERFACE_EXTERN( c128dcr_iec_devices );
158SLOT_INTERFACE_EXTERN( c128d81_iec_devices );
152159SLOT_INTERFACE_EXTERN( cbm_ieee488_devices );
153160SLOT_INTERFACE_EXTERN( vic20_control_port_devices );
154161SLOT_INTERFACE_EXTERN( vic20_expansion_cards );
r17592r17593
157164SLOT_INTERFACE_EXTERN( c64_expansion_cards );
158165SLOT_INTERFACE_EXTERN( c64_user_port_cards );
159166SLOT_INTERFACE_EXTERN( c128_expansion_cards );
167SLOT_INTERFACE_EXTERN( plus4_datassette_devices );
160168SLOT_INTERFACE_EXTERN( plus4_expansion_cards );
161169SLOT_INTERFACE_EXTERN( plus4_user_port_cards );
162170
trunk/src/mess/machine/vic20exp.c
r17592r17593
334334//  cd_r - cartridge data read
335335//-------------------------------------------------
336336
337UINT8 vic20_expansion_slot_device::cd_r(address_space &space, offs_t offset, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3)
337UINT8 vic20_expansion_slot_device::cd_r(address_space &space, offs_t offset, UINT8 data, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3)
338338{
339   UINT8 data = 0;
340
341339   if (m_cart != NULL)
342340   {
343      data = m_cart->vic20_cd_r(space, offset, ram1, ram2, ram3, blk1, blk2, blk3, blk5, io2, io3);
341      data = m_cart->vic20_cd_r(space, offset, data, ram1, ram2, ram3, blk1, blk2, blk3, blk5, io2, io3);
344342   }
345343
346344   return data;
trunk/src/mess/machine/c64_ocean.c
r17592r17593
8181//  c64_cd_r - cartridge data read
8282//-------------------------------------------------
8383
84UINT8 c64_ocean_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
84UINT8 c64_ocean_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
8585{
86   UINT8 data = 0;
87
8886   if (!roml)
8987   {
9088      offs_t addr = (m_bank << 13) | (offset & 0x1fff);
trunk/src/mess/machine/vic20exp.h
r17592r17593
9393   virtual ~vic20_expansion_slot_device();
9494
9595   // computer interface
96   UINT8 cd_r(address_space &space, offs_t offset, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3);
96   UINT8 cd_r(address_space &space, offs_t offset, UINT8 data, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3);
9797   void cd_w(address_space &space, offs_t offset, UINT8 data, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3);
9898   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
9999   DECLARE_WRITE_LINE_MEMBER( port_res_w );
r17592r17593
157157   virtual UINT8* vic20_nvram_pointer(running_machine &machine, size_t size);
158158
159159   // runtime
160   virtual UINT8 vic20_cd_r(address_space &space, offs_t offset, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3) { return 0; };
160   virtual UINT8 vic20_cd_r(address_space &space, offs_t offset, UINT8 data, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3) { return data; };
161161   virtual void vic20_cd_w(address_space &space, offs_t offset, UINT8 data, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3) { };
162162   virtual UINT32 vic20_screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { return 0; }
163163   virtual void vic20_res_w(int state) { };
trunk/src/mess/machine/c64_warp_speed.c
r17592r17593
127127//  c64_cd_r - cartridge data read
128128//-------------------------------------------------
129129
130UINT8 c64_warp_speed_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
130UINT8 c64_warp_speed_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
131131{
132   UINT8 data = 0;
133
134132   if (!roml || !romh || !io1 || !io2)
135133   {
136134      offs_t addr = UNSCRAMBLE_ADDRESS(offset & 0x3fff);
trunk/src/mess/machine/c64_ocean.h
r17592r17593
3838   virtual void device_reset();
3939
4040   // device_c64_expansion_card_interface overrides
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4242   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4343
4444private:
trunk/src/mess/machine/c64_warp_speed.h
r17592r17593
4343   virtual void device_reset();
4444
4545   // device_c64_expansion_card_interface overrides
46   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
46   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4747   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4848
4949private:
trunk/src/mess/machine/c64_system3.c
r17592r17593
5959//  c64_cd_r - cartridge data read
6060//-------------------------------------------------
6161
62UINT8 c64_system3_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
62UINT8 c64_system3_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
6363{
64   UINT8 data = 0;
65
6664   if (!roml)
6765   {
6866      offs_t addr = (m_bank << 13) | (offset & 0x1fff);
trunk/src/mess/machine/c64_system3.h
r17592r17593
3838   virtual void device_reset();
3939
4040   // device_c64_expansion_card_interface overrides
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4242   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4343
4444private:
trunk/src/mess/machine/c64_fun_play.c
r17592r17593
5959//  c64_cd_r - cartridge data read
6060//-------------------------------------------------
6161
62UINT8 c64_fun_play_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
62UINT8 c64_fun_play_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
6363{
64   UINT8 data = 0;
65
6664   if (!roml)
6765   {
6866      offs_t addr = (m_bank << 13) | (offset & 0x1fff);
trunk/src/mess/machine/c64_exos.c
r17592r17593
4747//  c64_cd_r - cartridge data read
4848//-------------------------------------------------
4949
50UINT8 c64_exos_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
50UINT8 c64_exos_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
5151{
52   UINT8 data = 0;
53
5452   if (!romh)
5553   {
5654      data = m_romh[offset & 0x1fff];
trunk/src/mess/machine/c64_fun_play.h
r17592r17593
3838   virtual void device_reset();
3939
4040   // device_c64_expansion_card_interface overrides
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4242   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4343
4444private:
trunk/src/mess/machine/c64_exos.h
r17592r17593
3737   virtual void device_start();
3838
3939   // device_c64_expansion_card_interface overrides
40   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
40   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4141   virtual int c64_game_r(offs_t offset, int ba, int rw, int hiram);
4242};
4343
trunk/src/mess/machine/c64_pagefox.c
r17592r17593
8181//  c64_cd_r - cartridge data read
8282//-------------------------------------------------
8383
84UINT8 c64_pagefox_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
84UINT8 c64_pagefox_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
8585{
86   UINT8 data = 0;
87
8886   if (!roml || !romh)
8987   {
9088      if (BIT(m_bank, 3))
trunk/src/mess/machine/c64_xl80.c
r17592r17593
209209//  c64_cd_r - cartridge data read
210210//-------------------------------------------------
211211
212UINT8 c64_xl80_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
212UINT8 c64_xl80_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
213213{
214   UINT8 data = 0;
215
216214   if (!io2 && BIT(offset, 2))
217215   {
218216      if (offset & 0x01)
trunk/src/mess/machine/c64_pagefox.h
r17592r17593
3838   virtual void device_reset();
3939
4040   // device_c64_expansion_card_interface overrides
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4242   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4343
4444private:
trunk/src/mess/machine/diag264_lb_user.c
r0r17593
1/**********************************************************************
2
3    Diag264 User Port Loop Back Connector emulation
4
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7
8**********************************************************************/
9
10#include "diag264_lb_user.h"
11
12
13
14//**************************************************************************
15//  DEVICE DEFINITIONS
16//**************************************************************************
17
18const device_type DIAG264_USER_PORT_LOOPBACK = &device_creator<diag264_user_port_loopback_device>;
19
20
21
22//**************************************************************************
23//  LIVE DEVICE
24//**************************************************************************
25
26//-------------------------------------------------
27//  diag264_user_port_loopback_device - constructor
28//-------------------------------------------------
29
30diag264_user_port_loopback_device::diag264_user_port_loopback_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
31    : device_t(mconfig, DIAG264_USER_PORT_LOOPBACK, "Diag264 User Port Loopback", tag, owner, clock),
32     device_plus4_user_port_interface(mconfig, *this),
33     m_p(0),
34     m_txd(0),
35     m_rts(0),
36     m_dtr(0)
37{
38}
39
40
41//-------------------------------------------------
42//  device_start - device-specific startup
43//-------------------------------------------------
44
45void diag264_user_port_loopback_device::device_start()
46{
47}
trunk/src/mess/machine/c64_xl80.h
r17592r17593
4646   virtual void device_reset();
4747
4848   // device_c64_expansion_card_interface overrides
49   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
49   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
5050   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
5151   virtual int c64_game_r(offs_t offset, int ba, int rw, int hiram) { return 1; }
5252   virtual int c64_exrom_r(offs_t offset, int ba, int rw, int hiram) { return 0; }
trunk/src/mess/machine/diag264_lb_user.h
r0r17593
1/**********************************************************************
2
3    Diag264 User Port Loop Back Connector 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 __DIAG264_USER_PORT_LOOPBACK__
13#define __DIAG264_USER_PORT_LOOPBACK__
14
15
16#include "emu.h"
17#include "machine/plus4user.h"
18
19
20
21//**************************************************************************
22//  TYPE DEFINITIONS
23//**************************************************************************
24
25// ======================> diag264_user_port_loopback_device
26
27class diag264_user_port_loopback_device :  public device_t,
28                                    public device_plus4_user_port_interface
29{
30public:
31    // construction/destruction
32    diag264_user_port_loopback_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
33
34protected:
35    // device-level overrides
36   virtual void device_config_complete() { m_shortname = "diag264_user_port_loopback"; }
37    virtual void device_start();
38
39   // device_plus4_user_port_interface overrides
40    virtual UINT8 plus4_p_r() { logerror("P read %02x\n", ((m_p << 4) & 0xf0) | (m_p >> 4)); return ((m_p << 4) & 0xf0) | (m_p >> 4); }
41    virtual void plus4_p_w(UINT8 data) { logerror("P write %02x\n", data); m_p = data; }
42    virtual int plus4_rxd_r() { return m_txd; }
43    virtual int plus4_dcd_r() { return m_dtr; }
44    virtual int plus4_dsr_r() { return m_rts; }
45    virtual void plus4_txd_w(int state) { m_txd = state; }
46    virtual void plus4_dtr_w(int state) { m_dtr = state; }
47    virtual void plus4_rts_w(int state) { m_rts = state; }
48
49private:
50    UINT8 m_p;
51
52    int m_txd;
53    int m_rts;
54    int m_dtr;
55};
56
57
58// device type definition
59extern const device_type DIAG264_USER_PORT_LOOPBACK;
60
61
62
63#endif
trunk/src/mess/machine/c64_mach5.c
r17592r17593
5757//  c64_cd_r - cartridge data read
5858//-------------------------------------------------
5959
60UINT8 c64_mach5_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
60UINT8 c64_mach5_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
6161{
62   UINT8 data = 0;
63
6462   if (!roml || !io1 || !io2)
6563   {
6664      data = m_roml[offset & 0x1fff];
trunk/src/mess/machine/c64_mach5.h
r17592r17593
3838   virtual void device_reset();
3939
4040   // device_c64_expansion_card_interface overrides
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4242   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4343};
4444
trunk/src/mess/machine/c64_16kb.c
r17592r17593
132132//  c64_cd_r - cartridge data read
133133//-------------------------------------------------
134134
135UINT8 c64_16kb_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
135UINT8 c64_16kb_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
136136{
137   UINT8 data = 0;
138
139137   if (!roml)
140138   {
141139      data = m_roml[offset & 0x1fff];
trunk/src/mess/machine/c64_16kb.h
r17592r17593
4444   virtual void device_reset();
4545
4646   // device_c64_expansion_card_interface overrides
47   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
47   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4848};
4949
5050
trunk/src/mess/machine/c64_neoram.c
r17592r17593
6363//  c64_cd_r - cartridge data read
6464//-------------------------------------------------
6565
66UINT8 c64_neoram_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
66UINT8 c64_neoram_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
6767{
68   UINT8 data = 0;
69
7068   if (!io1)
7169   {
7270      offs_t addr = (m_bank << 8) | (offset & 0xff);
trunk/src/mess/machine/c64_neoram.h
r17592r17593
4444   virtual void nvram_write(emu_file &file) { if (m_nvram != NULL) { file.write(m_nvram, m_nvram_size); } }
4545
4646   // device_c64_expansion_card_interface overrides
47   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
47   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4848   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4949
5050private:
trunk/src/mess/machine/plus4user.h
r17592r17593
104104   virtual int plus4_rxd_r() { return 1; };
105105   virtual int plus4_dcd_r() { return 0; };
106106   virtual int plus4_dsr_r() { return 0; };
107   virtual void plus4_txd_w(int level) { };
108   virtual void plus4_dtr_w(int level) { };
109   virtual void plus4_rts_w(int level) { };
110   virtual void plus4_rxc_w(int level) { };
111   virtual void plus4_atn_w(int level) { };
107   virtual void plus4_txd_w(int state) { };
108   virtual void plus4_dtr_w(int state) { };
109   virtual void plus4_rts_w(int state) { };
110   virtual void plus4_rxc_w(int state) { };
111   virtual void plus4_atn_w(int state) { };
112112
113113   // reset
114   virtual void plus4_breset_w(int level) { };
114   virtual void plus4_breset_w(int state) { };
115115
116116protected:
117117   plus4_user_port_device *m_slot;
trunk/src/mess/machine/c64_simons_basic.c
r17592r17593
5757//  c64_cd_r - cartridge data read
5858//-------------------------------------------------
5959
60UINT8 c64_simons_basic_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
60UINT8 c64_simons_basic_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
6161{
62   UINT8 data = 0;
63
6462   if (!roml)
6563   {
6664      data = m_roml[offset & 0x1fff];
trunk/src/mess/machine/c64_simons_basic.h
r17592r17593
3838   virtual void device_reset();
3939
4040   // device_c64_expansion_card_interface overrides
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4242   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4343};
4444
trunk/src/mess/machine/plus4_sid.c
r17592r17593
6262//  sid6581_interface sid_intf
6363//-------------------------------------------------
6464
65static int paddle_read( device_t *device, int which )
65static MOS6581_INTERFACE( sid_intf )
6666{
67   return 0;
68}
69
70static const sid6581_interface sid_intf =
71{
72   paddle_read
67   DEVCB_NULL,
68   DEVCB_NULL
7369};
7470
7571
r17592r17593
141137//  plus4_cd_r - cartridge data read
142138//-------------------------------------------------
143139
144UINT8 plus4_sid_cartridge_device::plus4_cd_r(address_space &space, offs_t offset, int ba, int cs0, int c1l, int c2l, int cs1, int c1h, int c2h)
140UINT8 plus4_sid_cartridge_device::plus4_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int cs0, int c1l, int c2l, int cs1, int c1h, int c2h)
145141{
146   UINT8 data = 0;
147
148142   if ((offset >= 0xfe80 && offset < 0xfea0) || (offset >= 0xfd40 && offset < 0xfd60))
149143   {
150144      data = sid6581_r(m_sid, offset & 0x1f);
trunk/src/mess/machine/plus4_sid.h
r17592r17593
4646   virtual void device_reset();
4747
4848   // device_plus4_expansion_card_interface overrides
49   virtual UINT8 plus4_cd_r(address_space &space, offs_t offset, int ba, int cs0, int c1l, int c2l, int cs1, int c1h, int c2h);
49   virtual UINT8 plus4_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int cs0, int c1l, int c2l, int cs1, int c1h, int c2h);
5050   virtual void plus4_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int cs0, int c1l, int c2l, int cs1, int c1h, int c2h);
5151   virtual void plus4_breset_w(int state);
5252
trunk/src/mess/machine/c64_final3.c
r17592r17593
105105//  c64_cd_r - cartridge data read
106106//-------------------------------------------------
107107
108UINT8 c64_final3_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
108UINT8 c64_final3_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
109109{
110   UINT8 data = 0;
111
112110   if (!roml || !romh || !io1 || !io2)
113111   {
114112      offs_t addr = (m_bank << 14) | (offset & 0x3fff);
trunk/src/mess/machine/c64_final3.h
r17592r17593
4444   virtual void device_reset();
4545
4646   // device_c64_expansion_card_interface overrides
47   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
47   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4848   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4949
5050private:
trunk/src/mess/machine/c64_westermann.c
r17592r17593
5757//  c64_cd_r - cartridge data read
5858//-------------------------------------------------
5959
60UINT8 c64_westermann_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
60UINT8 c64_westermann_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
6161{
62   UINT8 data = 0;
63
6462   if (!roml)
6563   {
6664      data = m_roml[offset & 0x1fff];
trunk/src/mess/machine/c64_westermann.h
r17592r17593
3838   virtual void device_reset();
3939
4040   // device_c64_expansion_card_interface overrides
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4242};
4343
4444
trunk/src/mess/machine/plus4_std.c
r17592r17593
4747//  plus4_cd_r - cartridge data read
4848//-------------------------------------------------
4949
50UINT8 plus4_standard_cartridge_device::plus4_cd_r(address_space &space, offs_t offset, int ba, int cs0, int c1l, int c2l, int cs1, int c1h, int c2h)
50UINT8 plus4_standard_cartridge_device::plus4_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int cs0, int c1l, int c2l, int cs1, int c1h, int c2h)
5151{
52   UINT8 data = 0;
53
5452   if (!c1l && m_c1l_mask)
5553   {
5654      data = m_c1l[offset & m_c1l_mask];
trunk/src/mess/machine/c64_vw64.c
r17592r17593
111111//  c64_cd_r - cartridge data read
112112//-------------------------------------------------
113113
114UINT8 c64_vizawrite_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
114UINT8 c64_vizawrite_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
115115{
116   UINT8 data = 0;
117
118116   if (!roml)
119117   {
120118      offs_t addr = (m_game << 13) | (offset & 0x1fff);
trunk/src/mess/machine/vic1010.c
r17592r17593
106106//  vic20_cd_r - cartridge data read
107107//-------------------------------------------------
108108
109UINT8 vic1010_device::vic20_cd_r(address_space &space, offs_t offset, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3)
109UINT8 vic1010_device::vic20_cd_r(address_space &space, offs_t offset, UINT8 data, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3)
110110{
111   UINT8 data = 0;
112
113111   for (int i = 0; i < MAX_SLOTS; i++)
114112   {
115      data |= m_expansion_slot[i]->cd_r(space, offset, ram1, ram2, ram3, blk1, blk2, blk3, blk5, io2, io3);
113      UINT8 slot_data = m_expansion_slot[i]->cd_r(space, offset, data, ram1, ram2, ram3, blk1, blk2, blk3, blk5, io2, io3);
114
115      if (data != slot_data)
116      {
117         data = slot_data;
118      }
116119   }
117120
118121   return data;
trunk/src/mess/machine/plus4_std.h
r17592r17593
3838   virtual void device_start();
3939
4040   // device_plus4_expansion_card_interface overrides
41   virtual UINT8 plus4_cd_r(address_space &space, offs_t offset, int ba, int cs0, int c1l, int c2l, int cs1, int c1h, int c2h);
41   virtual UINT8 plus4_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int cs0, int c1l, int c2l, int cs1, int c1h, int c2h);
4242};
4343
4444
trunk/src/mess/machine/c64_vw64.h
r17592r17593
3939   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
4040
4141   // device_c64_expansion_card_interface overrides
42   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
42   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4343   virtual int c64_exrom_r(offs_t offset, int ba, int rw, int hiram) { return 0; }
4444
4545private:
trunk/src/mess/machine/vic1010.h
r17592r17593
5454   virtual machine_config_constructor device_mconfig_additions() const;
5555
5656   // device_vic20_expansion_card_interface overrides
57   virtual UINT8 vic20_cd_r(address_space &space, offs_t offset, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3);
57   virtual UINT8 vic20_cd_r(address_space &space, offs_t offset, UINT8 data, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3);
5858   virtual void vic20_cd_w(address_space &space, offs_t offset, UINT8 data, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3);
5959   virtual UINT32 vic20_screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
6060   virtual void vic20_res_w(int state);
trunk/src/mess/machine/c64_ieee488.c
r17592r17593
277277//  c64_cd_r - cartridge data read
278278//-------------------------------------------------
279279
280UINT8 c64_ieee488_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
280UINT8 c64_ieee488_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
281281{
282   UINT8 data = m_exp->cd_r(space, offset, ba, roml, romh, io1, io2);
282   data = m_exp->cd_r(space, offset, data, ba, roml, romh, io1, io2);
283283
284284   if (!roml)
285285   {
trunk/src/mess/machine/c64_ieee488.h
r17592r17593
5757   virtual void device_reset();
5858
5959   // device_c64_expansion_card_interface overrides
60   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
60   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
6161   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
6262   virtual int c64_game_r(offs_t offset, int ba, int rw, int hiram);
6363
trunk/src/mess/machine/c64_final.c
r17592r17593
9595//  c64_cd_r - cartridge data read
9696//-------------------------------------------------
9797
98UINT8 c64_final_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
98UINT8 c64_final_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
9999{
100   UINT8 data = 0;
101
102100   if (!roml || !romh || !io1 || !io2)
103101   {
104102      data = m_roml[offset & 0x3fff];
trunk/src/mess/machine/c64_multiscreen.c
r17592r17593
208208//  c64_cd_r - cartridge data read
209209//-------------------------------------------------
210210
211UINT8 c64_multiscreen_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
211UINT8 c64_multiscreen_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
212212{
213   UINT8 data = 0;
214
215213   if (!roml)
216214   {
217215      int bank = m_bank & 0x0f;
trunk/src/mess/machine/c64_final.h
r17592r17593
4444   virtual void device_reset();
4545
4646   // device_c64_expansion_card_interface overrides
47   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
47   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4848   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4949};
5050
trunk/src/mess/machine/c64_multiscreen.h
r17592r17593
4444   virtual void device_reset();
4545
4646   // device_c64_expansion_card_interface overrides
47   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
47   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4848   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4949
5050private:
trunk/src/mess/machine/c64_ide64.c
r17592r17593
149149//  c64_cd_r - cartridge data read
150150//-------------------------------------------------
151151
152UINT8 c64_ide64_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
152UINT8 c64_ide64_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
153153{
154   if (!m_enable) return 0;
154   if (!m_enable) return data;
155155
156   UINT8 data = 0;
157156   int rom_oe = 1, ram_oe = 1;
158157
159158   if (!m_game && m_exrom && ba)
trunk/src/mess/machine/c64_ide64.h
r17592r17593
4646   virtual void device_reset();
4747
4848   // device_c64_expansion_card_interface overrides
49   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
49   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
5050   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
5151
5252private:
trunk/src/mess/machine/vcsctrl.c
r17592r17593
7979
8080
8181READ8_MEMBER( vcs_control_port_device::joy_r ) { UINT8 data = 0xff; if (m_device != NULL) data = m_device->vcs_joy_r(); return data; }
82READ8_MEMBER( vcs_control_port_device::pot_x_r ) { UINT8 data = 0xff; if (m_device != NULL) data = m_device->vcs_pot_x_r(); return data; }
83READ8_MEMBER( vcs_control_port_device::pot_y_r ) { UINT8 data = 0xff; if (m_device != NULL) data = m_device->vcs_pot_y_r(); return data; }
82UINT8 vcs_control_port_device::pot_x_r() { UINT8 data = 0xff; if (m_device != NULL) data = m_device->vcs_pot_x_r(); return data; }
83READ8_MEMBER( vcs_control_port_device::pot_x_r ) { return pot_x_r(); }
84UINT8 vcs_control_port_device::pot_y_r() { UINT8 data = 0xff; if (m_device != NULL) data = m_device->vcs_pot_y_r(); return data; }
85READ8_MEMBER( vcs_control_port_device::pot_y_r ) { return pot_y_r(); }
trunk/src/mess/machine/vcsctrl.h
r17592r17593
4747
4848   // computer interface
4949   DECLARE_READ8_MEMBER( joy_r );
50   UINT8 pot_x_r();
5051   DECLARE_READ8_MEMBER( pot_x_r );
52   UINT8 pot_y_r();
5153   DECLARE_READ8_MEMBER( pot_y_r );
5254
5355protected:
trunk/src/mess/machine/vic20_megacart.c
r17592r17593
8080//  vic20_cd_r - cartridge data read
8181//-------------------------------------------------
8282
83UINT8 vic20_megacart_device::vic20_cd_r(address_space &space, offs_t offset, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3)
83UINT8 vic20_megacart_device::vic20_cd_r(address_space &space, offs_t offset, UINT8 data, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3)
8484{
85   UINT8 data = 0;
86
8785   if (!ram1 || !ram2 || !ram3 || !io2 || !io3)
8886   {
8987      if (m_nvram_en)
trunk/src/mess/machine/vic20_megacart.h
r17592r17593
4747   virtual void nvram_write(emu_file &file) { if (m_nvram != NULL) { file.write(m_nvram, m_nvram_size); } }
4848
4949   // device_vic20_expansion_card_interface overrides
50   virtual UINT8 vic20_cd_r(address_space &space, offs_t offset, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3);
50   virtual UINT8 vic20_cd_r(address_space &space, offs_t offset, UINT8 data, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3);
5151   virtual void vic20_cd_w(address_space &space, offs_t offset, UINT8 data, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3);
5252
5353private:
trunk/src/mess/machine/vic1110.c
r17592r17593
8888//  vic20_cd_r - cartridge data read
8989//-------------------------------------------------
9090
91UINT8 vic1110_device::vic20_cd_r(address_space &space, offs_t offset, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3)
91UINT8 vic1110_device::vic20_cd_r(address_space &space, offs_t offset, UINT8 data, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3)
9292{
93   UINT8 data = 0;
9493   UINT8 sw = ioport("SW")->read();
9594
9695   if ((!blk1 && (sw == BLK1)) || (!blk2 && (sw == BLK2)) || (!blk3 && (sw == BLK3)) || (!blk5 && (sw == BLK5)))
trunk/src/mess/machine/vic1110.h
r17592r17593
4040   virtual void device_config_complete() { m_shortname = "vic1110"; }
4141
4242   // device_vic20_expansion_card_interface overrides
43   virtual UINT8 vic20_cd_r(address_space &space, offs_t offset, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3);
43   virtual UINT8 vic20_cd_r(address_space &space, offs_t offset, UINT8 data, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3);
4444   virtual void vic20_cd_w(address_space &space, offs_t offset, UINT8 data, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3);
4545};
4646
trunk/src/mess/machine/c64_stardos.c
r17592r17593
148148//  c64_cd_r - cartridge data read
149149//-------------------------------------------------
150150
151UINT8 c64_stardos_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
151UINT8 c64_stardos_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
152152{
153   UINT8 data = 0;
154
155153   if (!roml || !romh)
156154   {
157155      // TODO BITSWAP8(7,6,5,4,3,1,2,0) ?
trunk/src/mess/machine/c64_stardos.h
r17592r17593
4343   virtual void device_start();
4444
4545   // device_c64_expansion_card_interface overrides
46   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
46   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4747   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4848   virtual int c64_game_r(offs_t offset, int ba, int rw, int hiram);
4949
trunk/src/mess/machine/c64_ross.c
r17592r17593
6262//  c64_cd_r - cartridge data read
6363//-------------------------------------------------
6464
65UINT8 c64_ross_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
65UINT8 c64_ross_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
6666{
67   UINT8 data = 0;
68
6967   if (!roml || !romh)
7068   {
7169      offs_t addr = (m_bank << 14) | (offset & 0x3fff);
trunk/src/mess/machine/c64_ross.h
r17592r17593
3939   virtual void device_reset();
4040
4141   // device_c64_expansion_card_interface overrides
42   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
42   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4343   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4444
4545private:
trunk/src/mess/machine/c64_comal80.c
r17592r17593
5959//  c64_cd_r - cartridge data read
6060//-------------------------------------------------
6161
62UINT8 c64_comal80_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
62UINT8 c64_comal80_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
6363{
64   UINT8 data = 0;
65
6664   if (!roml || !romh)
6765   {
6866      offs_t addr = (m_bank << 14) | (offset & 0x3fff);
trunk/src/mess/machine/c64_comal80.h
r17592r17593
3838   virtual void device_config_complete() { m_shortname = "c64_comal80"; }
3939
4040   // device_c64_expansion_card_interface overrides
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4242   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4343
4444private:
trunk/src/mess/machine/c64_prophet64.c
r17592r17593
5959//  c64_cd_r - cartridge data read
6060//-------------------------------------------------
6161
62UINT8 c64_prophet64_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
62UINT8 c64_prophet64_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
6363{
64   UINT8 data = 0;
65
6664   if (!roml)
6765   {
6866      offs_t addr = (m_bank << 13) | (offset & 0x1fff);
trunk/src/mess/machine/c64_prophet64.h
r17592r17593
3838   virtual void device_reset();
3939
4040   // device_c64_expansion_card_interface overrides
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4242   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4343
4444private:
trunk/src/mess/machine/vic1111.c
r17592r17593
4949//  vic20_cd_r - cartridge data read
5050//-------------------------------------------------
5151
52UINT8 vic1111_device::vic20_cd_r(address_space &space, offs_t offset, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3)
52UINT8 vic1111_device::vic20_cd_r(address_space &space, offs_t offset, UINT8 data, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3)
5353{
54   UINT8 data = 0;
55
5654   if (!blk1 || !blk2)
5755   {
5856      data = m_ram[offset & 0x3fff];
trunk/src/mess/machine/c64_currah_speech.c
r17592r17593
200200//  c64_cd_r - cartridge data read
201201//-------------------------------------------------
202202
203UINT8 c64_currah_speech_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
203UINT8 c64_currah_speech_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
204204{
205   UINT8 data = 0;
206
207205   if (!romh)
208206   {
209207      data = m_romh[offset & 0x1fff];
trunk/src/mess/machine/vic1111.h
r17592r17593
3737   virtual void device_config_complete() { m_shortname = "vic1111"; }
3838
3939   // device_vic20_expansion_card_interface overrides
40   virtual UINT8 vic20_cd_r(address_space &space, offs_t offset, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3);
40   virtual UINT8 vic20_cd_r(address_space &space, offs_t offset, UINT8 data, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3);
4141   virtual void vic20_cd_w(address_space &space, offs_t offset, UINT8 data, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3);
4242};
4343
trunk/src/mess/machine/c64_mikro_assembler.c
r17592r17593
4747//  c64_cd_r - cartridge data read
4848//-------------------------------------------------
4949
50UINT8 c64_mikro_assembler_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
50UINT8 c64_mikro_assembler_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
5151{
52   UINT8 data = 0;
53
5452   if (!roml || !romh || !io1 || !io2)
5553   {
5654      data = m_roml[offset & 0x1fff];
trunk/src/mess/machine/c64_currah_speech.h
r17592r17593
4343   virtual void device_reset();
4444
4545   // device_c64_expansion_card_interface overrides
46   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
46   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4747   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4848
4949private:
trunk/src/mess/machine/c64_mikro_assembler.h
r17592r17593
3737   virtual void device_start();
3838
3939   // device_c64_expansion_card_interface overrides
40   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
40   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4141};
4242
4343
trunk/src/mess/machine/c64_sw8k.c
r17592r17593
102102//  c64_cd_r - cartridge data read
103103//-------------------------------------------------
104104
105UINT8 c64_switchable_8k_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
105UINT8 c64_switchable_8k_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
106106{
107   UINT8 data = 0;
108
109107   if (!roml)
110108   {
111109      offs_t addr = (m_bank << 13) | (offset & 0x1fff);
trunk/src/mess/machine/c64_rex.c
r17592r17593
5757//  c64_cd_r - cartridge data read
5858//-------------------------------------------------
5959
60UINT8 c64_rex_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
60UINT8 c64_rex_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
6161{
62   UINT8 data = 0;
63
6462   if (!roml)
6563   {
6664      data = m_roml[offset & 0x1fff];
trunk/src/mess/machine/c64_sw8k.h
r17592r17593
4141   virtual void device_reset();
4242
4343   // device_c64_expansion_card_interface overrides
44   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
44   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4545
4646private:
4747   int m_bank;
trunk/src/mess/machine/c64_rex.h
r17592r17593
3838   virtual void device_reset();
3939
4040   // device_c64_expansion_card_interface overrides
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4242};
4343
4444
trunk/src/mess/machine/vic10std.c
r17592r17593
4747//  vic10_cd_r - cartridge data read
4848//-------------------------------------------------
4949
50UINT8 vic10_standard_cartridge_device::vic10_cd_r(address_space &space, offs_t offset, int lorom, int uprom, int exram)
50UINT8 vic10_standard_cartridge_device::vic10_cd_r(address_space &space, offs_t offset, UINT8 data, int lorom, int uprom, int exram)
5151{
52   UINT8 data = 0;
53
5452   if (!lorom && (m_lorom != NULL))
5553   {
5654      data = m_lorom[offset & 0x1fff];
trunk/src/mess/machine/vic10std.h
r17592r17593
3737   virtual void device_config_complete() { m_shortname = "vic10_standard"; }
3838
3939   // device_vic10_expansion_card_interface overrides
40   virtual UINT8 vic10_cd_r(address_space &space, offs_t offset, int lorom, int uprom, int exram);
40   virtual UINT8 vic10_cd_r(address_space &space, offs_t offset, UINT8 data, int lorom, int uprom, int exram);
4141   virtual void vic10_cd_w(address_space &space, offs_t offset, UINT8 data, int lorom, int uprom, int exram);
4242};
4343
trunk/src/mess/machine/vic1210.c
r17592r17593
5050//  vic20_cd_r - cartridge data read
5151//-------------------------------------------------
5252
53UINT8 vic1210_device::vic20_cd_r(address_space &space, offs_t offset, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3)
53UINT8 vic1210_device::vic20_cd_r(address_space &space, offs_t offset, UINT8 data, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3)
5454{
55   UINT8 data = 0;
56
5755   if (!ram1 || !ram2 || !ram3)
5856   {
5957      data = m_ram[offset & 0xbff];
trunk/src/mess/machine/vic1112.c
r17592r17593
225225//  vic20_cd_r - cartridge data read
226226//-------------------------------------------------
227227
228UINT8 vic1112_device::vic20_cd_r(address_space &space, offs_t offset, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3)
228UINT8 vic1112_device::vic20_cd_r(address_space &space, offs_t offset, UINT8 data, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3)
229229{
230   UINT8 data = 0;
231
232230   if (!io2)
233231   {
234232      if (offset & 0x10)
trunk/src/mess/machine/vic1210.h
r17592r17593
3838   virtual void device_config_complete() { m_shortname = "vic1210"; }
3939
4040   // device_vic20_expansion_card_interface overrides
41   virtual UINT8 vic20_cd_r(address_space &space, offs_t offset, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3);
41   virtual UINT8 vic20_cd_r(address_space &space, offs_t offset, UINT8 data, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3);
4242   virtual void vic20_cd_w(address_space &space, offs_t offset, UINT8 data, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3);
4343};
4444
trunk/src/mess/machine/vic1112.h
r17592r17593
5353   virtual void device_config_complete() { m_shortname = "vic1112"; }
5454
5555   // device_vic20_expansion_card_interface overrides
56   virtual UINT8 vic20_cd_r(address_space &space, offs_t offset, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3);
56   virtual UINT8 vic20_cd_r(address_space &space, offs_t offset, UINT8 data, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3);
5757   virtual void vic20_cd_w(address_space &space, offs_t offset, UINT8 data, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3);
5858
5959private:
trunk/src/mess/machine/c64_dinamic.c
r17592r17593
5959//  c64_cd_r - cartridge data read
6060//-------------------------------------------------
6161
62UINT8 c64_dinamic_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
62UINT8 c64_dinamic_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
6363{
64   UINT8 data = 0;
65
6664   if (!roml)
6765   {
6866      offs_t addr = (m_bank << 13) | (offset & 0x1fff);
trunk/src/mess/machine/c64_dinamic.h
r17592r17593
3838   virtual void device_config_complete() { m_shortname = "c64_dinamic"; }
3939
4040   // device_c64_expansion_card_interface overrides
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4242
4343private:
4444   UINT8 m_bank;
trunk/src/mess/machine/c64_easyflash.c
r17592r17593
132132//  c64_cd_r - cartridge data read
133133//-------------------------------------------------
134134
135UINT8 c64_easyflash_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
135UINT8 c64_easyflash_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
136136{
137   UINT8 data = 0;
138
139137   if (!roml)
140138   {
141139      offs_t addr = (m_bank << 13) | (offset & 0x1fff);
trunk/src/mess/machine/c64_easyflash.h
r17592r17593
4545   virtual void device_reset();
4646
4747   // device_c64_expansion_card_interface overrides
48   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
48   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4949   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
5050   virtual int c64_exrom_r(offs_t offset, int ba, int rw, int hiram);
5151   virtual int c64_game_r(offs_t offset, int ba, int rw, int hiram);
trunk/src/mess/machine/diag264_lb_iec.c
r0r17593
1/**********************************************************************
2
3    Diag264 Serial Loop Back Connector emulation
4
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7
8**********************************************************************/
9
10#include "diag264_lb_iec.h"
11
12
13
14//**************************************************************************
15//  DEVICE DEFINITIONS
16//**************************************************************************
17
18const device_type DIAG264_SERIAL_LOOPBACK = &device_creator<diag264_serial_loopback_device>;
19
20
21
22//**************************************************************************
23//  LIVE DEVICE
24//**************************************************************************
25
26//-------------------------------------------------
27//  diag264_serial_loopback_device - constructor
28//-------------------------------------------------
29
30diag264_serial_loopback_device::diag264_serial_loopback_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
31    : device_t(mconfig, DIAG264_SERIAL_LOOPBACK, "Diag264 Serial Loopback", tag, owner, clock),
32     device_cbm_iec_interface(mconfig, *this)
33{
34}
35
36
37//-------------------------------------------------
38//  device_start - device-specific startup
39//-------------------------------------------------
40
41void diag264_serial_loopback_device::device_start()
42{
43}
44
45
46//-------------------------------------------------
47//  cbm_iec_atn -
48//-------------------------------------------------
49
50void diag264_serial_loopback_device::cbm_iec_atn(int state)
51{
52   m_bus->clk_w(state);
53}
trunk/src/mess/machine/petcass.c
r0r17593
1/**********************************************************************
2
3    Commodore PET/VIC-20/C64/Plus-4 Datassette Port emulation
4
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7
8**********************************************************************/
9
10#include "machine/petcass.h"
11
12
13
14//**************************************************************************
15//  GLOBAL VARIABLES
16//**************************************************************************
17
18const device_type PET_DATASSETTE_PORT = &device_creator<pet_datassette_port_device>;
19
20
21
22//**************************************************************************
23//  CARD INTERFACE
24//**************************************************************************
25
26//-------------------------------------------------
27//  device_pet_datassette_port_interface - constructor
28//-------------------------------------------------
29
30device_pet_datassette_port_interface::device_pet_datassette_port_interface(const machine_config &mconfig, device_t &device)
31   : device_slot_card_interface(mconfig,device)
32{
33   m_slot = dynamic_cast<pet_datassette_port_device *>(device.owner());
34}
35
36
37//-------------------------------------------------
38//  ~device_pet_datassette_port_interface - destructor
39//-------------------------------------------------
40
41device_pet_datassette_port_interface::~device_pet_datassette_port_interface()
42{
43}
44
45
46
47//**************************************************************************
48//  LIVE DEVICE
49//**************************************************************************
50
51//-------------------------------------------------
52//  pet_datassette_port_device - constructor
53//-------------------------------------------------
54
55pet_datassette_port_device::pet_datassette_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
56        device_t(mconfig, PET_DATASSETTE_PORT, "Datassette Port", tag, owner, clock),
57      device_slot_interface(mconfig, *this)
58{
59}
60
61
62//-------------------------------------------------
63//  pet_datassette_port_device - destructor
64//-------------------------------------------------
65
66pet_datassette_port_device::~pet_datassette_port_device()
67{
68}
69
70
71//-------------------------------------------------
72//  device_config_complete - perform any
73//  operations now that the configuration is
74//  complete
75//-------------------------------------------------
76
77void pet_datassette_port_device::device_config_complete()
78{
79   // inherit a copy of the static data
80   const pet_datassette_port_interface *intf = reinterpret_cast<const pet_datassette_port_interface *>(static_config());
81   if (intf != NULL)
82   {
83      *static_cast<pet_datassette_port_interface *>(this) = *intf;
84   }
85
86   // or initialize to defaults if none provided
87   else
88   {
89       memset(&m_out_read_cb, 0, sizeof(m_out_read_cb));
90   }
91}
92
93
94//-------------------------------------------------
95//  device_start - device-specific startup
96//-------------------------------------------------
97
98void pet_datassette_port_device::device_start()
99{
100   m_cart = dynamic_cast<device_pet_datassette_port_interface *>(get_card_device());
101
102   // resolve callbacks
103   m_out_read_func.resolve(m_out_read_cb, *this);
104}
105
106
107READ_LINE_MEMBER( pet_datassette_port_device::read ) { int state = 1; if (m_cart != NULL) state = m_cart->datassette_read(); return state; }
108WRITE_LINE_MEMBER( pet_datassette_port_device::write ) { if (m_cart != NULL) m_cart->datassette_write(state); }
109READ_LINE_MEMBER( pet_datassette_port_device::sense_r ) { int state = 1; if (m_cart != NULL) state = m_cart->datassette_sense(); return state; }
110WRITE_LINE_MEMBER( pet_datassette_port_device::motor_w ) { if (m_cart != NULL) m_cart->datassette_motor(state); }
111
112WRITE_LINE_MEMBER( pet_datassette_port_device::read_w ) { m_out_read_func(state); }
trunk/src/mess/machine/diag264_lb_iec.h
r0r17593
1/**********************************************************************
2
3    Diag264 Serial Loop Back Connector 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 __DIAG264_SERIAL_LOOPBACK__
13#define __DIAG264_SERIAL_LOOPBACK__
14
15
16#include "emu.h"
17#include "machine/cbmiec.h"
18
19
20
21//**************************************************************************
22//  TYPE DEFINITIONS
23//**************************************************************************
24
25// ======================> diag264_serial_loopback_device
26
27class diag264_serial_loopback_device :  public device_t,
28                                 public device_cbm_iec_interface
29{
30public:
31    // construction/destruction
32    diag264_serial_loopback_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
33
34protected:
35    // device-level overrides
36   virtual void device_config_complete() { m_shortname = "diag264_serial_loopback"; }
37    virtual void device_start();
38
39   // device_cbm_iec_interface overrides
40   virtual void cbm_iec_atn(int state);
41};
42
43
44// device type definition
45extern const device_type DIAG264_SERIAL_LOOPBACK;
46
47
48
49#endif
trunk/src/mess/machine/c64_zaxxon.c
r17592r17593
4949//  c64_cd_r - cartridge data read
5050//-------------------------------------------------
5151
52UINT8 c64_zaxxon_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
52UINT8 c64_zaxxon_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
5353{
54   UINT8 data = 0;
55
5654   if (!roml)
5755   {
5856      data = m_roml[offset & 0xfff];
trunk/src/mess/machine/petcass.h
r0r17593
1/**********************************************************************
2
3    Commodore PET/VIC-20/C64/Plus-4 Datassette Port emulation
4
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7
8**********************************************************************
9
10                    GND       1      A       GND
11                    +5V       2      B       +5V
12                  MOTOR       3      C       MOTOR
13                   READ       4      D       READ
14                  WRITE       5      E       WRITE
15                  SENSE       6      F       SENSE
16
17**********************************************************************/
18
19#pragma once
20
21#ifndef __PET_DATASSETTE_PORT__
22#define __PET_DATASSETTE_PORT__
23
24#include "emu.h"
25
26
27
28//**************************************************************************
29//  CONSTANTS
30//**************************************************************************
31
32#define PET_DATASSETTE_PORT_TAG      "tape"
33
34
35
36//**************************************************************************
37//  INTERFACE CONFIGURATION MACROS
38//**************************************************************************
39
40#define PET_DATASSETTE_PORT_INTERFACE(_name) \
41   const pet_datassette_port_interface (_name) =
42
43
44#define MCFG_PET_DATASSETTE_PORT_ADD(_tag, _config, _slot_intf, _def_slot, _def_inp) \
45    MCFG_DEVICE_ADD(_tag, PET_DATASSETTE_PORT, 0) \
46    MCFG_DEVICE_CONFIG(_config) \
47   MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, _def_inp, false)
48
49
50
51//**************************************************************************
52//  TYPE DEFINITIONS
53//**************************************************************************
54
55// ======================> pet_datassette_port_interface
56
57struct pet_datassette_port_interface
58{
59   devcb_write_line   m_out_read_cb;
60};
61
62
63// ======================> pet_datassette_port_device
64
65class device_pet_datassette_port_interface;
66
67class pet_datassette_port_device : public device_t,
68                             public pet_datassette_port_interface,
69                             public device_slot_interface
70{
71public:
72   // construction/destruction
73   pet_datassette_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
74   virtual ~pet_datassette_port_device();
75
76   // computer interface
77   DECLARE_READ_LINE_MEMBER( read );
78   DECLARE_WRITE_LINE_MEMBER( write );
79   DECLARE_READ_LINE_MEMBER( sense_r );
80   DECLARE_WRITE_LINE_MEMBER( motor_w );
81
82   // device interface
83   DECLARE_WRITE_LINE_MEMBER( read_w );
84
85protected:
86   // device-level overrides
87   virtual void device_config_complete();
88   virtual void device_start();
89
90   devcb_resolved_write_line   m_out_read_func;
91
92   device_pet_datassette_port_interface *m_cart;
93};
94
95
96// ======================> device_pet_datassette_port_interface
97
98// class representing interface-specific live c64_expansion card
99class device_pet_datassette_port_interface : public device_slot_card_interface
100{
101public:
102   // construction/destruction
103   device_pet_datassette_port_interface(const machine_config &mconfig, device_t &device);
104   virtual ~device_pet_datassette_port_interface();
105
106   virtual int datassette_read() { return 1; };
107   virtual void datassette_write(int state) { };
108   virtual int datassette_sense() { return 1; };
109   virtual void datassette_motor(int state) { };
110
111protected:
112   pet_datassette_port_device *m_slot;
113};
114
115
116// device type definition
117extern const device_type PET_DATASSETTE_PORT;
118
119
120
121#endif
trunk/src/mess/machine/c64_zaxxon.h
r17592r17593
3737   virtual void device_start();
3838
3939   // device_c64_expansion_card_interface overrides
40   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
40   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4141
4242private:
4343   int m_bank;
trunk/src/mess/machine/c64_georam.c
r17592r17593
6262//  c64_cd_r - cartridge data read
6363//-------------------------------------------------
6464
65UINT8 c64_georam_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
65UINT8 c64_georam_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
6666{
67   UINT8 data = 0;
68
6967   if (!io1)
7068   {
7169      offs_t addr = (m_bank << 8) | (offset & 0xff);
trunk/src/mess/machine/c64_georam.h
r17592r17593
3838   virtual void device_reset();
3939
4040   // device_c64_expansion_card_interface overrides
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4242   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4343
4444private:
trunk/src/mess/machine/c1551.c
r17592r17593
571571//  plus4_cd_r - cartridge data read
572572//-------------------------------------------------
573573
574UINT8 c1551_device::plus4_cd_r(address_space &space, offs_t offset, int ba, int cs0, int c1l, int c2l, int cs1, int c1h, int c2h)
574UINT8 c1551_device::plus4_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int cs0, int c1l, int c2l, int cs1, int c1h, int c2h)
575575{
576   UINT8 data = m_exp->cd_r(space, offset, ba, cs0, c1l, c2l, cs1, c1h, c2h);
576   data = m_exp->cd_r(space, offset, data, ba, cs0, c1l, c2l, cs1, c1h, c2h);
577577
578578   if (tpi1_selected(offset))
579579   {
trunk/src/mess/machine/c1551.h
r17592r17593
7777   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
7878
7979    // device_plus4_expansion_card_interface overrides
80   virtual UINT8 plus4_cd_r(address_space &space, offs_t offset, int ba, int cs0, int c1l, int c2l, int cs1, int c1h, int c2h);
80   virtual UINT8 plus4_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int cs0, int c1l, int c2l, int cs1, int c1h, int c2h);
8181   virtual void plus4_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int cs0, int c1l, int c2l, int cs1, int c1h, int c2h);
8282   virtual UINT32 plus4_screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
8383   virtual void plus4_breset_w(int state);
trunk/src/mess/machine/c2n.c
r0r17593
1/**********************************************************************
2
3    Commodore C2N/1530/1531 Datassette emulation
4
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7
8**********************************************************************/
9
10#include "c2n.h"
11
12
13
14//**************************************************************************
15//  MACROS / CONSTANTS
16//**************************************************************************
17
18#define CASSETTE_TAG   "cassette"
19
20
21
22//**************************************************************************
23//  DEVICE DEFINITIONS
24//**************************************************************************
25
26const device_type C1530 = &device_creator<c1530_device>;
27const device_type C1531 = &device_creator<c1531_device>;
28
29
30//-------------------------------------------------
31//  MACHINE_CONFIG( c2n )
32//-------------------------------------------------
33
34static MACHINE_CONFIG_FRAGMENT( c2n )
35   MCFG_CASSETTE_ADD(CASSETTE_TAG, cbm_cassette_interface )
36MACHINE_CONFIG_END
37
38
39//-------------------------------------------------
40//  machine_config_additions - device-specific
41//  machine configurations
42//-------------------------------------------------
43
44machine_config_constructor c2n_device::device_mconfig_additions() const
45{
46   return MACHINE_CONFIG_NAME( c2n );
47}
48
49
50
51//**************************************************************************
52//  LIVE DEVICE
53//**************************************************************************
54
55//-------------------------------------------------
56//  c2n_device - constructor
57//-------------------------------------------------
58
59c2n_device::c2n_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock)
60    : device_t(mconfig, type, name, tag, owner, clock),
61     device_pet_datassette_port_interface(mconfig, *this),
62     m_cassette(*this, CASSETTE_TAG)
63{
64}
65
66
67//-------------------------------------------------
68//  c1530_device - constructor
69//-------------------------------------------------
70
71c1530_device::c1530_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
72   : c2n_device(mconfig, C1530, "C1530", tag, owner, clock) { }
73
74
75//-------------------------------------------------
76//  c1531_device - constructor
77//-------------------------------------------------
78
79c1531_device::c1531_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
80   : c2n_device(mconfig, C1531, "C1531", tag, owner, clock) { }
81
82
83//-------------------------------------------------
84//  device_start - device-specific startup
85//-------------------------------------------------
86
87void c2n_device::device_start()
88{
89   // allocate timers
90   m_read_timer = timer_alloc();
91   m_read_timer->adjust(attotime::from_hz(44100), 0, attotime::from_hz(44100));
92}
93
94
95//-------------------------------------------------
96//  device_timer - handler timer events
97//-------------------------------------------------
98
99void c2n_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
100{
101   int input = (m_cassette->input() > +0.0) ? 1 : 0;
102
103   m_slot->read_w(input);
104}
105
106
107//-------------------------------------------------
108//  datassette_read - read data
109//-------------------------------------------------
110
111int c2n_device::datassette_read()
112{
113   return (m_cassette->input() > +0.0) ? 1 : 0;
114}
115
116
117//-------------------------------------------------
118//  datassette_write - write data
119//-------------------------------------------------
120
121void c2n_device::datassette_write(int state)
122{
123   m_cassette->output(state ? -(0x5a9e >> 1) : +(0x5a9e >> 1));
124}
125
126
127//-------------------------------------------------
128//  datassette_sense - switch sense
129//-------------------------------------------------
130
131int c2n_device::datassette_sense()
132{
133   return (m_cassette->get_state() & CASSETTE_MASK_UISTATE) == CASSETTE_STOPPED;
134}
135
136
137//-------------------------------------------------
138//  datassette_motor - motor
139//-------------------------------------------------
140
141void c2n_device::datassette_motor(int state)
142{
143   if (!state)
144   {
145      m_cassette->change_state(CASSETTE_MOTOR_ENABLED, CASSETTE_MASK_MOTOR);
146      m_read_timer->enable(true);
147   }
148   else
149   {
150      m_cassette->change_state(CASSETTE_MOTOR_DISABLED, CASSETTE_MASK_MOTOR);
151      m_read_timer->enable(false);
152   }
153}
trunk/src/mess/machine/c2n.h
r0r17593
1/**********************************************************************
2
3    Commodore C2N/1530/1531 Datassette 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 __C2N__
13#define __C2N__
14
15
16#include "emu.h"
17#include "includes/cbm.h"
18#include "machine/petcass.h"
19
20
21
22//**************************************************************************
23//  TYPE DEFINITIONS
24//**************************************************************************
25
26// ======================> c2n_device
27
28class c2n_device :  public device_t,
29               public device_pet_datassette_port_interface
30{
31
32public:
33    // construction/destruction
34    c2n_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock);
35
36   // optional information overrides
37   virtual machine_config_constructor device_mconfig_additions() const;
38
39protected:
40    // device-level overrides
41    virtual void device_config_complete() { m_shortname = "c2n"; }
42    virtual void device_start();
43   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
44
45   // device_pet_datassette_port_interface overrides
46   virtual int datassette_read();
47   virtual void datassette_write(int state);
48   virtual int datassette_sense();
49   virtual void datassette_motor(int state);
50
51private:
52   required_device<cassette_image_device> m_cassette;
53
54   // timers
55   emu_timer *m_read_timer;
56};
57
58
59// ======================> c1530_device
60
61class c1530_device :  public c2n_device
62{
63public:
64    // construction/destruction
65    c1530_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
66};
67
68
69// ======================> c1531_device
70
71class c1531_device :  public c2n_device
72{
73public:
74    // construction/destruction
75    c1531_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
76};
77
78
79// device type definition
80extern const device_type C1530;
81extern const device_type C1531;
82
83
84
85#endif
trunk/src/mess/machine/vic20std.c
r17592r17593
4747//  vic20_cd_r - cartridge data read
4848//-------------------------------------------------
4949
50UINT8 vic20_standard_cartridge_device::vic20_cd_r(address_space &space, offs_t offset, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3)
50UINT8 vic20_standard_cartridge_device::vic20_cd_r(address_space &space, offs_t offset, UINT8 data, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3)
5151{
52   UINT8 data = 0;
53
5452   if (!blk1 && (m_blk1 != NULL))
5553   {
5654      data = m_blk1[offset & 0x1fff];
trunk/src/mess/machine/vic20std.h
r17592r17593
3737   virtual void device_config_complete() { m_shortname = "vic20_standard"; }
3838
3939   // device_vic20_expansion_card_interface overrides
40   virtual UINT8 vic20_cd_r(address_space &space, offs_t offset, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3);
40   virtual UINT8 vic20_cd_r(address_space &space, offs_t offset, UINT8 data, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3);
4141};
4242
4343
trunk/src/mess/machine/compiskb.c
r0r17593
1/**********************************************************************
2
3    Telenova Compis keyboard emulation
4
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7
8*********************************************************************/
9
10#include "compiskb.h"
11
12
13
14//**************************************************************************
15//  MACROS / CONSTANTS
16//**************************************************************************
17
18#define I8748_TAG      "i8748"
19
20
21
22//**************************************************************************
23//  DEVICE DEFINITIONS
24//**************************************************************************
25
26const device_type COMPIS_KEYBOARD = &device_creator<compis_keyboard_device>;
27
28
29//-------------------------------------------------
30//  device_config_complete - perform any
31//  operations now that the configuration is
32//  complete
33//-------------------------------------------------
34
35void compis_keyboard_device::device_config_complete()
36{
37   // inherit a copy of the static data
38   const compis_keyboard_interface *intf = reinterpret_cast<const compis_keyboard_interface *>(static_config());
39   if (intf != NULL)
40      *static_cast<compis_keyboard_interface *>(this) = *intf;
41
42   // or initialize to defaults if none provided
43   else
44   {
45      memset(&m_out_int_cb, 0, sizeof(m_out_int_cb));
46   }
47
48   m_shortname = "compiskb";
49}
50
51
52//-------------------------------------------------
53//  ROM( compis_keyboard )
54//-------------------------------------------------
55
56ROM_START( compis_keyboard )
57   ROM_REGION( 0x800, I8748_TAG, 0 )
58   ROM_LOAD( "cmpkey13.u1", 0x000, 0x800, CRC(3f87d138) SHA1(c04e2d325b9c04818bc7c47c3bf32b13862b11ec) )
59ROM_END
60
61
62//-------------------------------------------------
63//  rom_region - device-specific ROM region
64//-------------------------------------------------
65
66const rom_entry *compis_keyboard_device::device_rom_region() const
67{
68   return ROM_NAME( compis_keyboard );
69}
70
71
72//-------------------------------------------------
73//  ADDRESS_MAP( compis_keyboard_io )
74//-------------------------------------------------
75
76static ADDRESS_MAP_START( compis_keyboard_io, AS_IO, 8, compis_keyboard_device )
77   AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_NOP
78   AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_NOP
79   AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_NOP
80   AM_RANGE(MCS48_PORT_BUS, MCS48_PORT_BUS) AM_NOP
81ADDRESS_MAP_END
82
83
84//-------------------------------------------------
85//  MACHINE_DRIVER( compis_keyboard )
86//-------------------------------------------------
87
88static MACHINE_CONFIG_FRAGMENT( compis_keyboard )
89   MCFG_CPU_ADD(I8748_TAG, I8748, 4000000)
90   MCFG_CPU_IO_MAP(compis_keyboard_io)
91MACHINE_CONFIG_END
92
93
94//-------------------------------------------------
95//  machine_config_additions - device-specific
96//  machine configurations
97//-------------------------------------------------
98
99machine_config_constructor compis_keyboard_device::device_mconfig_additions() const
100{
101   return MACHINE_CONFIG_NAME( compis_keyboard );
102}
103
104
105//-------------------------------------------------
106//  INPUT_PORTS( compis_keyboard )
107//-------------------------------------------------
108
109INPUT_PORTS_START( compis_keyboard )
110   PORT_START("X0")
111   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
112   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
113   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
114   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
115   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
116   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
117   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
118   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
119
120   PORT_START("X1")
121   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
122   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
123   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
124   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
125   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
126   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
127   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
128   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
129
130   PORT_START("X2")
131   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
132   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
133   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
134   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
135   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
136   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
137   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
138   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
139
140   PORT_START("X3")
141   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
142   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
143   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
144   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
145   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
146   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
147   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
148   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
149
150   PORT_START("X4")
151   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
152   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
153   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
154   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
155   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
156   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
157   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
158   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
159
160   PORT_START("X5")
161   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
162   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
163   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
164   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
165   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
166   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
167   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
168   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
169
170   PORT_START("X6")
171   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
172   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
173   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
174   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
175   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
176   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
177   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
178   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
179
180   PORT_START("X7")
181   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
182   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
183   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
184   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
185   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
186   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
187   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
188   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
189
190   PORT_START("X8")
191   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
192   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
193   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
194   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
195   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
196   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
197   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
198   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
199
200   PORT_START("X9")
201   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
202   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
203   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
204   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
205   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
206   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
207   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
208   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
209
210   PORT_START("XA")
211   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
212   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
213   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
214   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
215   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
216   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
217   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
218   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
219
220   PORT_START("XB")
221   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
222   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
223   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
224   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
225   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
226   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
227   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
228   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
229
230   PORT_START("XC")
231   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
232   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
233   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
234   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
235   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
236   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
237   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
238   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
239
240   PORT_START("XD")
241   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
242   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
243   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
244   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
245   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
246   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
247   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
248   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
249
250   PORT_START("XE")
251   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
252   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
253   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
254   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
255   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
256   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
257   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
258   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
259
260   PORT_START("XF")
261   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
262   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
263   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
264   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
265   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
266   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
267   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
268   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
269INPUT_PORTS_END
270
271
272//-------------------------------------------------
273//  input_ports - device-specific input ports
274//-------------------------------------------------
275
276ioport_constructor compis_keyboard_device::device_input_ports() const
277{
278   return INPUT_PORTS_NAME( compis_keyboard );
279}
280
281
282
283//**************************************************************************
284//  LIVE DEVICE
285//**************************************************************************
286
287//-------------------------------------------------
288//  compis_keyboard_device - constructor
289//-------------------------------------------------
290
291compis_keyboard_device::compis_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
292   : device_t(mconfig, COMPIS_KEYBOARD, "Compis Keyboard", tag, owner, clock),
293     m_maincpu(*this, I8748_TAG),
294     m_so(1)
295{
296}
297
298
299//-------------------------------------------------
300//  device_start - device-specific startup
301//-------------------------------------------------
302
303void compis_keyboard_device::device_start()
304{
305   // resolve callbacks
306    m_out_int_func.resolve(m_out_int_cb, *this);
307}
308
309
310//-------------------------------------------------
311//  device_reset - device-specific reset
312//-------------------------------------------------
313
314void compis_keyboard_device::device_reset()
315{
316}
317
318
319//-------------------------------------------------
320//  dtr_w - data terminal ready write
321//-------------------------------------------------
322
323WRITE_LINE_MEMBER( compis_keyboard_device::dtr_w )
324{
325}
326
327
328//-------------------------------------------------
329//  si_w - serial input write
330//-------------------------------------------------
331
332WRITE_LINE_MEMBER( compis_keyboard_device::si_w )
333{
334   m_maincpu->set_input_line(MCS48_INPUT_IRQ, state ? CLEAR_LINE : ASSERT_LINE);
335}
336
337
338//-------------------------------------------------
339//  so_r - serial output read
340//-------------------------------------------------
341
342READ_LINE_MEMBER( compis_keyboard_device::so_r )
343{
344   return m_so;
345}
trunk/src/mess/machine/compiskb.h
r0r17593
1/**********************************************************************
2
3    Telenova Compis 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 __COMPIS_KEYBOARD__
13#define __COMPIS_KEYBOARD__
14
15#include "emu.h"
16#include "cpu/mcs48/mcs48.h"
17
18
19
20//**************************************************************************
21//  MACROS / CONSTANTS
22//**************************************************************************
23
24#define COMPIS_KEYBOARD_TAG   "compiskb"
25
26
27
28//**************************************************************************
29//  INTERFACE CONFIGURATION MACROS
30//**************************************************************************
31
32#define MCFG_COMPIS_KEYBOARD_ADD() \
33    MCFG_DEVICE_ADD(COMPIS_KEYBOARD_TAG, COMPIS_KEYBOARD, 0)
34
35
36#define COMPIS_KEYBOARD_INTERFACE(_name) \
37   const COMPIS_keyboard_interface (_name) =
38
39
40
41//**************************************************************************
42//  TYPE DEFINITIONS
43//**************************************************************************
44
45// ======================> compis_keyboard_interface
46
47struct compis_keyboard_interface
48{
49   devcb_write_line   m_out_int_cb;
50};
51
52
53// ======================> compis_keyboard_device
54
55class compis_keyboard_device :  public device_t,
56                        public compis_keyboard_interface
57{
58public:
59    // construction/destruction
60    compis_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
61
62   // optional information overrides
63   virtual const rom_entry *device_rom_region() const;
64   virtual machine_config_constructor device_mconfig_additions() const;
65   virtual ioport_constructor device_input_ports() const;
66
67   DECLARE_WRITE_LINE_MEMBER( dtr_w );
68   DECLARE_WRITE_LINE_MEMBER( si_w );
69   DECLARE_READ_LINE_MEMBER( so_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_int_func;
79
80   required_device<cpu_device> m_maincpu;
81
82   int m_so;
83};
84
85
86// device type definition
87extern const device_type COMPIS_KEYBOARD;
88
89
90
91#endif
trunk/src/mess/machine/c64_easy_calc_result.c
r17592r17593
8080//  c64_cd_r - cartridge data read
8181//-------------------------------------------------
8282
83UINT8 c64_easy_calc_result_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
83UINT8 c64_easy_calc_result_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
8484{
85   UINT8 data = 0;
86
8785   if (!roml)
8886   {
8987      data = m_roml[offset & 0x1fff];
trunk/src/mess/machine/c64_easy_calc_result.h
r17592r17593
3838   virtual void device_config_complete() { m_shortname = "c64_easy_calc_result"; }
3939
4040   // device_c64_expansion_card_interface overrides
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4242   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4343
4444private:
trunk/src/mess/machine/c64_magic_desk.c
r17592r17593
5959//  c64_cd_r - cartridge data read
6060//-------------------------------------------------
6161
62UINT8 c64_magic_desk_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
62UINT8 c64_magic_desk_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
6363{
64   UINT8 data = 0;
65
6664   if (!roml)
6765   {
6866      offs_t addr = (m_bank << 13) | (offset & 0x1fff);
trunk/src/mess/machine/c64_std.c
r17592r17593
4747//  c64_cd_r - cartridge data read
4848//-------------------------------------------------
4949
50UINT8 c64_standard_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
50UINT8 c64_standard_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
5151{
52   UINT8 data = 0;
53
5452   if (!roml && m_roml_mask)
5553   {
5654      data = m_roml[offset & 0x1fff];
trunk/src/mess/machine/c64_magic_desk.h
r17592r17593
3838   virtual void device_reset();
3939
4040   // device_c64_expansion_card_interface overrides
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4242   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4343
4444private:
trunk/src/mess/machine/c64_std.h
r17592r17593
3838   virtual void device_start();
3939
4040   // device_c64_expansion_card_interface overrides
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4242};
4343
4444
trunk/src/mess/machine/c64_dela_ep64.c
r17592r17593
110110//  c64_cd_r - cartridge data read
111111//-------------------------------------------------
112112
113UINT8 c64_dela_ep64_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
113UINT8 c64_dela_ep64_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
114114{
115   UINT8 data = 0;
116
117115   if (!roml)
118116   {
119117      if (m_reset)
trunk/src/mess/machine/c64_dela_ep64.h
r17592r17593
4343   virtual void device_reset();
4444
4545   // device_c64_expansion_card_interface overrides
46   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
46   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4747   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4848
4949private:
trunk/src/mess/machine/c64_dqbb.c
r17592r17593
7676//  c64_cd_r - cartridge data read
7777//-------------------------------------------------
7878
79UINT8 c64_dqbb_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
79UINT8 c64_dqbb_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
8080{
81   UINT8 data = 0;
82
8381   if (!m_cs && (!roml || !romh))
8482   {
8583      data = m_nvram[offset & 0x3fff];
trunk/src/mess/machine/c64_dqbb.h
r17592r17593
4545   virtual void nvram_write(emu_file &file) { if (m_nvram != NULL) { file.write(m_nvram, m_nvram_size); } }
4646
4747   // device_c64_expansion_card_interface overrides
48   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
48   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4949   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
5050
5151private:
trunk/src/mess/machine/c64_magic_formel.c
r17592r17593
223223//  c64_cd_r - cartridge data read
224224//-------------------------------------------------
225225
226UINT8 c64_magic_formel_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
226UINT8 c64_magic_formel_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
227227{
228   UINT8 data = 0;
229
230228   if (!romh && !m_rom_oe)
231229   {
232230      UINT8 bank = m_pb7_ff ? m_rom_bank : 0;
trunk/src/mess/machine/c64_dela_ep256.c
r17592r17593
126126//  c64_cd_r - cartridge data read
127127//-------------------------------------------------
128128
129UINT8 c64_dela_ep256_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
129UINT8 c64_dela_ep256_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
130130{
131   UINT8 data = 0;
132
133131   if (!roml)
134132   {
135133      if (m_reset)
trunk/src/mess/machine/c64_magic_formel.h
r17592r17593
5050   virtual void device_reset();
5151
5252   // device_c64_expansion_card_interface overrides
53   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
53   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
5454   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
5555   virtual int c64_game_r(offs_t offset, int ba, int rw, int hiram);
5656
trunk/src/mess/machine/c64_dela_ep256.h
r17592r17593
4343   virtual void device_reset();
4444
4545   // device_c64_expansion_card_interface overrides
46   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
46   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4747   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4848
4949private:
trunk/src/mess/machine/c64exp.c
r17592r17593
359359//  cd_r - cartridge data read
360360//-------------------------------------------------
361361
362UINT8 c64_expansion_slot_device::cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
362UINT8 c64_expansion_slot_device::cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
363363{
364   UINT8 data = 0;
365
366364   if (m_cart != NULL)
367365   {
368      data = m_cart->c64_cd_r(space, offset, ba, roml, romh, io1, io2);
366      data = m_cart->c64_cd_r(space, offset, data, ba, roml, romh, io1, io2);
369367   }
370368
371369   return data;
trunk/src/mess/machine/c64exp.h
r17592r17593
9797   virtual ~c64_expansion_slot_device();
9898
9999   // computer interface
100   UINT8 cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
100   UINT8 cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
101101   void cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
102102   int game_r(offs_t offset, int ba, int rw, int hiram);
103103   int exrom_r(offs_t offset, int ba, int rw, int hiram);
r17592r17593
168168   virtual UINT8* c64_nvram_pointer(running_machine &machine, size_t size);
169169
170170   // runtime
171   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2) { return 0; };
171   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2) { return data; };
172172   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2) { };
173173   virtual int c64_game_r(offs_t offset, int ba, int rw, int hiram) { return m_game; }
174174   virtual int c64_exrom_r(offs_t offset, int ba, int rw, int hiram) { return m_exrom; }
trunk/src/mess/machine/c64_rex_ep256.c
r17592r17593
126126//  c64_cd_r - cartridge data read
127127//-------------------------------------------------
128128
129UINT8 c64_rex_ep256_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
129UINT8 c64_rex_ep256_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
130130{
131   UINT8 data = 0;
132
133131   if (!roml)
134132   {
135133      if (m_reset)
trunk/src/mess/machine/c64_rex_ep256.h
r17592r17593
4343   virtual void device_reset();
4444
4545   // device_c64_expansion_card_interface overrides
46   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
46   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4747   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4848
4949private:
trunk/src/mess/machine/c128_comal80.c
r17592r17593
5959//  c64_cd_r - cartridge data read
6060//-------------------------------------------------
6161
62UINT8 c128_comal80_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
62UINT8 c128_comal80_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
6363{
64   UINT8 data = 0;
65
6664   if (!romh)
6765   {
6866      offs_t addr = (m_bank << 14) | (offset & 0x3fff);
trunk/src/mess/machine/c128_comal80.h
r17592r17593
3838   virtual void device_config_complete() { m_shortname = "c128_comal80"; }
3939
4040   // device_c64_expansion_card_interface overrides
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4242   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4343
4444private:
trunk/src/mess/machine/c64_ps64.c
r17592r17593
130130//  c64_cd_r - cartridge data read
131131//-------------------------------------------------
132132
133UINT8 c64_ps64_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
133UINT8 c64_ps64_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
134134{
135   UINT8 data = 0;
136
137135   if (!roml)
138136   {
139137      data = m_roml[offset & 0x1fff];
trunk/src/mess/machine/c64_ps64.h
r17592r17593
4242   virtual void device_reset();
4343
4444   // device_c64_expansion_card_interface overrides
45   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
45   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4646   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4747};
4848
trunk/src/mess/machine/c64_epyx_fast_load.c
r17592r17593
8080//  c64_cd_r - cartridge data read
8181//-------------------------------------------------
8282
83UINT8 c64_epyx_fast_load_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
83UINT8 c64_epyx_fast_load_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
8484{
85   UINT8 data = 0;
86
8785   if (!roml)
8886   {
8987      m_exrom = 0;
trunk/src/mess/machine/c64_epyx_fast_load.h
r17592r17593
3939   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
4040
4141   // device_c64_expansion_card_interface overrides
42   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
42   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4343   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4444
4545private:
trunk/src/mess/machine/c64_super_games.c
r17592r17593
5959//  c64_cd_r - cartridge data read
6060//-------------------------------------------------
6161
62UINT8 c64_super_games_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
62UINT8 c64_super_games_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
6363{
64   UINT8 data = 0;
65
6664   if (!roml || !romh)
6765   {
6866      offs_t addr = (m_bank << 14) | (offset & 0x3fff);
trunk/src/mess/machine/c64_super_games.h
r17592r17593
3838   virtual void device_reset();
3939
4040   // device_c64_expansion_card_interface overrides
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
41   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4242   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4343
4444private:
trunk/src/mess/machine/vic10exp.c
r17592r17593
299299//  cd_r - cartridge data read
300300//-------------------------------------------------
301301
302UINT8 vic10_expansion_slot_device::cd_r(address_space &space, offs_t offset, int lorom, int uprom, int exram)
302UINT8 vic10_expansion_slot_device::cd_r(address_space &space, offs_t offset, UINT8 data, int lorom, int uprom, int exram)
303303{
304   UINT8 data = 0;
305
306304   if (m_cart != NULL)
307305   {
308      data = m_cart->vic10_cd_r(space, offset, lorom, uprom, exram);
306      data = m_cart->vic10_cd_r(space, offset, data, lorom, uprom, exram);
309307   }
310308
311309   return data;
trunk/src/mess/machine/vic10exp.h
r17592r17593
9595   virtual ~vic10_expansion_slot_device();
9696
9797   // computer interface
98   UINT8 cd_r(address_space &space, offs_t offset, int lorom, int uprom, int exram);
98   UINT8 cd_r(address_space &space, offs_t offset, UINT8 data, int lorom, int uprom, int exram);
9999   void cd_w(address_space &space, offs_t offset, UINT8 data, int lorom, int uprom, int exram);
100100   DECLARE_READ_LINE_MEMBER( p0_r );
101101   DECLARE_WRITE_LINE_MEMBER( p0_w );
r17592r17593
161161   virtual UINT8* vic10_uprom_pointer(running_machine &machine, size_t size);
162162
163163   // runtime
164   virtual UINT8 vic10_cd_r(address_space &space, offs_t offset, int lorom, int uprom, int exram) { return 0; };
164   virtual UINT8 vic10_cd_r(address_space &space, offs_t offset, UINT8 data, int lorom, int uprom, int exram) { return data; };
165165   virtual void vic10_cd_w(address_space &space, offs_t offset, UINT8 data, int lorom, int uprom, int exram) { };
166166   virtual int vic10_p0_r() { return 0; };
167167   virtual void vic10_p0_w(int state) { };
168168   virtual void vic10_sp_w(int state) { };
169169   virtual void vic10_cnt_w(int state) { };
170   virtual UINT32 vic10_screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { return false; }
170   virtual UINT32 vic10_screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { return 0; }
171171   virtual void vic10_res_w(int state) { };
172172
173173   vic10_expansion_slot_device *m_slot;
trunk/src/mess/machine/c64_dela_ep7x8.c
r17592r17593
120120//  c64_cd_r - cartridge data read
121121//-------------------------------------------------
122122
123UINT8 c64_dela_ep7x8_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
123UINT8 c64_dela_ep7x8_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
124124{
125   UINT8 data = 0;
126
127125   if (!roml)
128126   {
129127      offs_t addr = offset & 0x1fff;
trunk/src/mess/machine/c64_dela_ep7x8.h
r17592r17593
4343   virtual void device_reset();
4444
4545   // device_c64_expansion_card_interface overrides
46   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
46   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4747   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4848
4949private:
trunk/src/mess/machine/c64_structured_basic.c
r17592r17593
6161//  c64_cd_r - cartridge data read
6262//-------------------------------------------------
6363
64UINT8 c64_structured_basic_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
64UINT8 c64_structured_basic_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
6565{
66   UINT8 data = 0;
67
6866   if (!roml)
6967   {
7068      offs_t addr = (m_bank << 13) | (offset & 0x1fff);
trunk/src/mess/machine/c64_structured_basic.h
r17592r17593
3939   virtual void device_reset();
4040
4141   // device_c64_expansion_card_interface overrides
42   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2);
42   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4343   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2);
4444
4545private:
trunk/src/mess/machine/c64_super_explode.c
r17592r17593
8585//  c64_cd_r - cartridge data read
8686//-------------------------------------------------
8787
88UINT8 c64_super_explode_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int ba, int roml, int romh, int io1, int io2)
88UINT8 c64_super_explode_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int roml, int romh, int io1, int io2)
8989{
90   UINT8 data = 0;
91
9290   if (!roml)
9391   {
9492      m_exrom = 0;
trunk/src/mess/includes/compis.h
r17592r17593
2323#include "machine/pic8259.h"
2424#include "machine/mm58274c.h"
2525#include "machine/upd765.h"
26#include "machine/compiskb.h"
2627#include "imagedev/flopdrv.h"
2728#include "formats/cpis_dsk.h"
2829
trunk/src/mess/includes/c65.h
r17592r17593
5959   int m_io_dc00_on;
6060   DECLARE_DRIVER_INIT(c65);
6161   DECLARE_DRIVER_INIT(c65pal);
62
63   DECLARE_READ8_MEMBER( sid_potx_r );
64   DECLARE_READ8_MEMBER( sid_poty_r );
6265};
6366
6467
trunk/src/mess/includes/vic20.h
r17592r17593
1313#include "machine/cbmiec.h"
1414#include "machine/cbmipt.h"
1515#include "machine/ieee488.h"
16#include "machine/petcass.h"
1617#include "machine/ram.h"
1718#include "machine/vcsctrl.h"
1819#include "machine/vic20exp.h"
r17592r17593
2627#define M6560_TAG      "ub7"
2728#define M6561_TAG      "ub7"
2829#define IEC_TAG         "iec"
29#define TIMER_C1530_TAG   "c1530"
3030#define SCREEN_TAG      "screen"
3131#define CONTROL1_TAG   "joy1"
3232#define CONTROL2_TAG   "joy2"
r17592r17593
4545        m_joy2(*this, CONTROL2_TAG),
4646        m_exp(*this, VIC20_EXPANSION_SLOT_TAG),
4747        m_user(*this, VIC20_USER_PORT_TAG),
48        m_cassette(*this, CASSETTE_TAG),
49        m_ram(*this, RAM_TAG),
50        m_cassette_timer(*this, TIMER_C1530_TAG)
48        m_cassette(*this, PET_DATASSETTE_PORT_TAG),
49        m_ram(*this, RAM_TAG)
5150   { }
5251
5352   required_device<cpu_device> m_maincpu;
r17592r17593
5958   required_device<vcs_control_port_device> m_joy2;
6059   required_device<vic20_expansion_slot_device> m_exp;
6160   required_device<vic20_user_port_device> m_user;
62   required_device<cassette_image_device> m_cassette;
61   required_device<pet_datassette_port_device> m_cassette;
6362   required_device<ram_device> m_ram;
64   required_device<timer_device> m_cassette_timer;
6563
6664   virtual void machine_start();
6765   virtual void machine_reset();
r17592r17593
7169
7270   DECLARE_READ8_MEMBER( via0_pa_r );
7371   DECLARE_WRITE8_MEMBER( via0_pa_w );
74   DECLARE_WRITE_LINE_MEMBER( via0_ca2_w );
7572
7673   DECLARE_READ8_MEMBER( via1_pa_r );
7774   DECLARE_READ8_MEMBER( via1_pb_r );
trunk/src/mess/includes/plus4.h
r17592r17593
1414#include "machine/cbmiec.h"
1515#include "machine/cbmipt.h"
1616#include "machine/mos6529.h"
17#include "machine/petcass.h"
1718#include "machine/pls100.h"
1819#include "machine/ram.h"
1920
r17592r17593
2526#define T6721_TAG         "t6721"
2627#define PLA_TAG            "u19"
2728#define SCREEN_TAG         "screen"
28#define CASSETTE_TAG      "cassette"
2929
3030class plus4_state : public driver_device
3131{
r17592r17593
4343        m_exp(*this, PLUS4_EXPANSION_SLOT_TAG),
4444        m_user(*this, PLUS4_USER_PORT_TAG),
4545        m_ram(*this, RAM_TAG),
46        m_cassette(*this, CASSETTE_TAG),
46        m_cassette(*this, PET_DATASSETTE_PORT_TAG),
4747        m_function(NULL),
48        m_c2(NULL),
4849        m_addr(0),
4950        m_rom_en(1),
5051        m_ted_irq(CLEAR_LINE),
r17592r17593
6364   required_device<plus4_expansion_slot_device> m_exp;
6465   optional_device<plus4_user_port_device> m_user;
6566   required_device<ram_device> m_ram;
66   required_device<cassette_image_device> m_cassette;
67   required_device<pet_datassette_port_device> m_cassette;
6768
6869   virtual void machine_start();
6970   virtual void machine_reset();
r17592r17593
9596   // memory state
9697   const UINT8 *m_kernal;
9798   const UINT8 *m_function;
99   const UINT8 *m_c2;
98100   UINT8 m_addr;
99101   int m_rom_en;
100102
trunk/src/mess/includes/c128.h
r17592r17593
3232   DECLARE_WRITE_LINE_MEMBER( vic_interrupt );
3333   DECLARE_READ8_MEMBER( vic_rdy_cb );
3434
35   DECLARE_READ8_MEMBER( sid_potx_r );
36   DECLARE_READ8_MEMBER( sid_poty_r );
37
3538   UINT8 *m_c128_basic;
3639   UINT8 *m_c128_kernal;
3740   UINT8 *m_c128_chargen;
trunk/src/mess/includes/c64.h
r17592r17593
1212#include "machine/c64user.h"
1313#include "machine/cbmiec.h"
1414#include "machine/cbmipt.h"
15#include "machine/petcass.h"
1516#include "machine/pls100.h"
1617#include "machine/ram.h"
1718#include "machine/vcsctrl.h"
r17592r17593
2728#define MOS6526_2_TAG   "u2"
2829#define PLA_TAG         "u17"
2930#define SCREEN_TAG      "screen"
30#define TIMER_C1531_TAG   "c1531"
3131#define CONTROL1_TAG   "joy1"
3232#define CONTROL2_TAG   "joy2"
3333
r17592r17593
4848        m_exp(*this, C64_EXPANSION_SLOT_TAG),
4949        m_user(*this, C64_USER_PORT_TAG),
5050        m_ram(*this, RAM_TAG),
51        m_cassette(*this, CASSETTE_TAG),
52        m_cassette_timer(*this, TIMER_C1531_TAG),
51        m_cassette(*this, PET_DATASSETTE_PORT_TAG),
5352        m_loram(1),
5453        m_hiram(1),
5554        m_charen(1),
r17592r17593
7776   required_device<c64_expansion_slot_device> m_exp;
7877   required_device<c64_user_port_device> m_user;
7978   required_device<ram_device> m_ram;
80   optional_device<cassette_image_device> m_cassette;
81   optional_device<timer_device> m_cassette_timer;
79   optional_device<pet_datassette_port_device> m_cassette;
8280
8381   virtual void machine_start();
8482   virtual void machine_reset();
r17592r17593
9795   DECLARE_READ8_MEMBER( vic_lightpen_button_cb );
9896   DECLARE_READ8_MEMBER( vic_rdy_cb );
9997
98   DECLARE_READ8_MEMBER( sid_potx_r );
99   DECLARE_READ8_MEMBER( sid_poty_r );
100
100101   DECLARE_WRITE_LINE_MEMBER( cia1_irq_w );
101102   DECLARE_READ8_MEMBER( cia1_pa_r );
102103   DECLARE_READ8_MEMBER( cia1_pb_r );
r17592r17593
109110   DECLARE_READ8_MEMBER( cpu_r );
110111   DECLARE_WRITE8_MEMBER( cpu_w );
111112
113   DECLARE_WRITE_LINE_MEMBER( tape_read_w );
114
112115   DECLARE_WRITE_LINE_MEMBER( iec_srq_w );
113116
114117   DECLARE_READ8_MEMBER( exp_dma_r );
r17592r17593
179182};
180183
181184
185int c64_paddle_read (device_t *device, int which);
182186
187
183188#endif
trunk/src/mess/includes/vic10.h
r17592r17593
5151   virtual void machine_reset();
5252
5353   void check_interrupts();
54   UINT8 paddle_read(int which);
5455
5556   DECLARE_READ8_MEMBER( read );
5657   DECLARE_WRITE8_MEMBER( write );
r17592r17593
6263   DECLARE_READ8_MEMBER( vic_lightpen_y_cb );
6364   DECLARE_READ8_MEMBER( vic_lightpen_button_cb );
6465   DECLARE_READ8_MEMBER( vic_rdy_cb );
66
67   DECLARE_READ8_MEMBER( sid_potx_r );
68   DECLARE_READ8_MEMBER( sid_poty_r );
69
6570   DECLARE_WRITE_LINE_MEMBER( cia_irq_w );
6671   DECLARE_READ8_MEMBER( cia_pa_r );
6772   DECLARE_READ8_MEMBER( cia_pb_r );
6873   DECLARE_WRITE8_MEMBER( cia_pb_w );
74
6975   DECLARE_READ8_MEMBER( cpu_r );
7076   DECLARE_WRITE8_MEMBER( cpu_w );
77
7178   DECLARE_WRITE_LINE_MEMBER( exp_irq_w );
7279
7380   // video state
trunk/src/mess/includes/huebler.h
r17592r17593
88#define Z80PIO1_TAG      "z80pio1"
99#define Z80PIO2_TAG      "z80pio2"
1010
11#include "emu.h"
12#include "cpu/z80/z80.h"
13#include "cpu/z80/z80daisy.h"
1114#include "imagedev/cassette.h"
15#include "machine/ram.h"
16#include "machine/z80pio.h"
17#include "machine/z80dart.h"
18#include "machine/z80ctc.h"
1219
1320class amu880_state : public driver_device
1421{
r17592r17593
1825        m_cassette(*this, CASSETTE_TAG),
1926        m_key_d6(0),
2027        m_key_d7(0),
21        m_key_a8(1)
22   ,
23      m_video_ram(*this, "video_ram"){ }
28        m_key_a8(1),
29        m_video_ram(*this, "video_ram")
30   { }
2431
2532   required_device<cassette_image_device> m_cassette;
2633
trunk/src/mess/video/mos6566.c
r17592r17593
2222
2323    - cleanup
2424    - light pen
25    - 1:1 sync with CPU
2625    - remove RDY hack
2726    - VIC IIe
2827    - http://hitmen.c02.at/temp/palstuff/
r17592r17593
272271
273272inline UINT8 mos6566_device::read_videoram(offs_t offset)
274273{
275   return space(AS_0)->read_byte(offset & 0x3fff);
274   m_last_data = space(AS_0)->read_byte(offset & 0x3fff);
275   
276   return m_last_data;
276277}
277278
278279inline UINT8 mos6566_device::read_colorram(offs_t offset)
r17592r17593
683684   save_item(NAME(m_cycle));
684685   save_item(NAME(m_raster_x));
685686   save_item(NAME(m_graphic_x));
687   save_item(NAME(m_last_data));
686688
687689   save_item(NAME(m_dy_start));
688690   save_item(NAME(m_dy_stop));
r17592r17593
28162818WRITE_LINE_MEMBER( mos6566_device::lp_w )
28172819{
28182820}
2821
2822
2823//-------------------------------------------------
2824//  bus_r - data bus read
2825//-------------------------------------------------
2826
2827UINT8 mos6566_device::bus_r()
2828{
2829   return m_last_data;
2830}
trunk/src/mess/video/mos6566.h
r17592r17593
295295
296296   DECLARE_WRITE_LINE_MEMBER( lp_w );
297297
298   UINT8 bus_r();
299
298300   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
299301
300302protected:
r17592r17593
367369   UINT8 m_cycle;
368370   UINT16 m_raster_x;
369371   UINT16 m_graphic_x;
372   UINT8 m_last_data;
370373
371374   /* convert multicolor byte to background/foreground for sprite collision */
372375   UINT16 m_expandx[256];
trunk/src/mess/mess.lst
r17592r17593
624624c264
625625plus4n
626626plus4p
627c16
627c16n
628c16p
628629c16h
629630c116
630631c232
trunk/src/mess/drivers/c65.c
r17592r17593
189189 *
190190 *************************************/
191191
192static const sid6581_interface c65_sound_interface =
192READ8_MEMBER( c65_state::sid_potx_r )
193193{
194   c64_paddle_read
194   device_t *sid = machine().device("sid_r");
195
196   return c64_paddle_read(sid, 0);
197}
198
199READ8_MEMBER( c65_state::sid_poty_r )
200{
201   device_t *sid = machine().device("sid_r");
202
203   return c64_paddle_read(sid, 1);
204}
205
206static MOS6581_INTERFACE( c65_sound_interface )
207{
208   DEVCB_DRIVER_MEMBER(c65_state, sid_potx_r),
209   DEVCB_DRIVER_MEMBER(c65_state, sid_poty_r)
195210};
196211
197212
trunk/src/mess/drivers/vic20.c
r17592r17593
123123
124124READ8_MEMBER( vic20_state::read )
125125{
126   UINT8 data = 0;
126   UINT8 data = mos6560_bus_r(m_vic);
127127
128128   int ram1 = 1, ram2 = 1, ram3 = 1;
129129   int blk1 = 1, blk2 = 1, blk3 = 1, blk5 = 1;
r17592r17593
194194      break;
195195   }
196196
197   data |= m_exp->cd_r(space, offset & 0x1fff, ram1, ram2, ram3, blk1, blk2, blk3, blk5, io2, io3);
198
199   return data;
197   return m_exp->cd_r(space, offset & 0x1fff, data, ram1, ram2, ram3, blk1, blk2, blk3, blk5, io2, io3);
200198}
201199
202200
r17592r17593
450448   data |= m_user->joy1_r() << 3;
451449   data |= m_user->joy2_r() << 4;
452450   data |= m_user->light_pen_r() << 5;
453   data |= m_user->cassette_switch_r() << 6;
454451
452   // cassette switch
453   data |= (m_user->cassette_switch_r() && m_cassette->sense_r()) << 6;
454
455455   // joystick
456456   data &= ~(ioport("JOY")->read() & 0x3c);
457457
458   // cassette switch
459   if ((m_cassette->get_state() & CASSETTE_MASK_UISTATE) != CASSETTE_STOPPED)
460      data &= ~0x40;
461
462458   return data;
463459}
464460
r17592r17593
483479   m_iec->atn_w(!BIT(data, 7));
484480}
485481
486WRITE_LINE_MEMBER( vic20_state::via0_ca2_w )
487{
488   if (!state)
489   {
490      m_cassette->change_state(CASSETTE_MOTOR_ENABLED, CASSETTE_MASK_MOTOR);
491      m_cassette_timer->enable(true);
492   }
493   else
494   {
495      m_cassette->change_state(CASSETTE_MOTOR_DISABLED, CASSETTE_MASK_MOTOR);
496      m_cassette_timer->enable(false);
497   }
498}
499
500482static const via6522_interface via0_intf =
501483{
502484   DEVCB_DRIVER_MEMBER(vic20_state, via0_pa_r),
r17592r17593
509491   DEVCB_DEVICE_MEMBER(VIC20_USER_PORT_TAG, vic20_user_port_device, pb_w),
510492   DEVCB_NULL,
511493   DEVCB_DEVICE_LINE_MEMBER(VIC20_USER_PORT_TAG, vic20_user_port_device, cb1_w),
512   DEVCB_DRIVER_LINE_MEMBER(vic20_state, via0_ca2_w), // CASS MOTOR
494   DEVCB_DEVICE_LINE_MEMBER(PET_DATASSETTE_PORT_TAG, pet_datassette_port_device, motor_w),
513495   DEVCB_DEVICE_LINE_MEMBER(VIC20_USER_PORT_TAG, vic20_user_port_device, cb2_w),
514496   DEVCB_CPU_INPUT_LINE(M6502_TAG, INPUT_LINE_NMI)
515497};
r17592r17593
593575    */
594576
595577   // cassette write
596   m_cassette->output(BIT(data, 3) ? -(0x5a9e >> 1) : +(0x5a9e >> 1));
578   m_cassette->write(BIT(data, 3));
597579
598580   // keyboard column
599581   m_key_col = data;
r17592r17593
615597{
616598   DEVCB_DRIVER_MEMBER(vic20_state, via1_pa_r),
617599   DEVCB_DRIVER_MEMBER(vic20_state, via1_pb_r),
618   DEVCB_NULL, // CASS READ
600   DEVCB_DEVICE_LINE_MEMBER(PET_DATASSETTE_PORT_TAG, pet_datassette_port_device, read),
619601   DEVCB_NULL,
620602   DEVCB_NULL,
621603   DEVCB_NULL,
r17592r17593
632614
633615
634616//-------------------------------------------------
635//  TIMER_DEVICE_CALLBACK( cassette_tick )
617//  PET_DATASSETTE_PORT_INTERFACE( datassette_intf )
636618//-------------------------------------------------
637619
638static TIMER_DEVICE_CALLBACK( cassette_tick )
620static PET_DATASSETTE_PORT_INTERFACE( datassette_intf )
639621{
640   vic20_state *state = timer.machine().driver_data<vic20_state>();
641   int data = (state->m_cassette->input() > +0.0) ? 1 : 0;
622   DEVCB_DEVICE_LINE_MEMBER(M6522_1_TAG, via6522_device, write_ca1),
623};
642624
643   state->m_via1->write_ca1(data);
644}
645625
646
647626//-------------------------------------------------
648627//  CBM_IEC_INTERFACE( cbm_iec_intf )
649628//-------------------------------------------------
r17592r17593
808787//-------------------------------------------------
809788
810789static MACHINE_CONFIG_START( vic20_common, vic20_state )
811   MCFG_TIMER_ADD_PERIODIC(TIMER_C1530_TAG, cassette_tick, attotime::from_hz(44100))
812
813790   // devices
814791   MCFG_VIA6522_ADD(M6522_0_TAG, 0, via0_intf)
815792   MCFG_VIA6522_ADD(M6522_1_TAG, 0, via1_intf)
816793
817794   MCFG_QUICKLOAD_ADD("quickload", cbm_vc20, "p00,prg", CBM_QUICKLOAD_DELAY_SECONDS)
818   MCFG_CASSETTE_ADD(CASSETTE_TAG, cbm_cassette_interface )
819795
796   MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT_TAG, datassette_intf, cbm_datassette_devices, "c1530", NULL)
820797   MCFG_CBM_IEC_ADD(cbm_iec_intf, "c1541")
821798
822799   MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vic20_control_port_devices, NULL, NULL)
trunk/src/mess/drivers/plus4.c
r17592r17593
22
33    TODO:
44
5    - cassette
5    - cassette motor is turned on only for a moment while LOADing
6    - c16 function ROM test fails
67    - c1551 won't load anything
78    - clean up keyboard handling
89    - clean up TED
910    - dump PLA
1011    - T6721 speech chip
11    - floating bus read (should return the previous byte read by TED)
12    - SID card (http://solder.dyndns.info/cgi-bin/showdir.pl?dir=files/commodore/plus4/hardware/SID-Card)
1312
1413*/
1514
r17592r17593
167166
168167UINT8 plus4_state::read_memory(address_space &space, offs_t offset, int ba, int scs, int phi2, int user, int _6551, int addr_clk, int keyport, int kernal, int cs0, int cs1)
169168{
170   UINT8 data = 0;
169   UINT8 data = m_ted->bus_r();
171170   int c1l = 1, c1h = 1, c2l = 1, c2h = 1;
172171
173172   //logerror("offset %04x user %u 6551 %u addr_clk %u keyport %u kernal %u cs0 %u cs1 %u m_rom_en %u\n", offset,user,_6551,addr_clk,keyport,kernal,cs0,cs1,m_rom_en);
r17592r17593
182181      {
183182         data = m_spi_user->read(space, 0);
184183      }
185      else
186      {
187         data |= ((m_cassette->get_state() & CASSETTE_MASK_UISTATE) == CASSETTE_STOPPED) << 2;
188      }
184
185      data &= ~0x04;
186      data |= m_cassette->sense_r() << 2;
189187   }
190188   else if (!_6551 && m_acia)
191189   {
r17592r17593
216214
217215      case CS0_C2_LOW:
218216         c2l = 0;
217
218         if (m_c2 != NULL)
219         {
220            data = m_c2[offset & 0x7fff];
221         }
219222         break;
220223      }
221224   }
r17592r17593
246249
247250         case CS1_C2_HIGH:
248251            c2h = 0;
252
253            if (m_c2 != NULL)
254            {
255               data = m_c2[offset & 0x7fff];
256            }
249257            break;
250258         }
251259      }
r17592r17593
259267      data = m_ram->pointer()[offset & m_ram->mask()];
260268   }
261269
262   data |= m_exp->cd_r(space, offset, ba, cs0, c1l, c1h, cs1, c2l, c2h);
263
264   return data;
270   return m_exp->cd_r(space, offset, data, ba, cs0, c1l, c1h, cs1, c2l, c2h);
265271}
266272
267273
r17592r17593
448454        4       CST RD
449455        5
450456        6       IEC CLK IN
451        7       IEC DATA IN, CST SENSE (Plus/4)
457        7       IEC DATA IN, CST SENSE
452458
453459    */
454460
455   UINT8 data = 0xff;
456   UINT8 c16_port7501 = m6510_get_port(m_maincpu);
461    UINT8 data = 0x2f;
457462
458   if (BIT(c16_port7501, 0) || !m_iec->data_r() || ((m_cassette->get_state() & CASSETTE_MASK_UISTATE) != CASSETTE_STOPPED))
459      data &= ~0x80;
463    // cassette read
464    data |= m_cassette->read() << 4;
460465
461   if (BIT(c16_port7501, 1) || !m_iec->clk_r())
462      data &= ~0x40;
466    // serial clock
467    data |= m_iec->clk_r() << 6;
463468
464   if (m_cassette->input() > +0.0)
465      data |=  0x10;
466   else
467      data &= ~0x10;
469    // serial data, cassette sense
470    data |= (m_iec->data_r() && m_cassette->sense_r()) << 7;
468471
469472   return data;
470473}
r17592r17593
486489
487490    */
488491
489   UINT8 data = 0xff;
490   UINT8 c16_port7501 = m6510_get_port(m_maincpu);
492    UINT8 data = 0x2f;
491493
492   if (BIT(c16_port7501, 0) || !m_iec->data_r())
493      data &= ~0x80;
494    // cassette read
495    data |= m_cassette->read() << 4;
494496
495   if (BIT(c16_port7501, 1) || !m_iec->clk_r())
496      data &= ~0x40;
497    // serial clock
498    data |= m_iec->clk_r() << 6;
497499
498   if (m_cassette->input() > +0.0)
499      data |=  0x10;
500   else
501      data &= ~0x10;
500    // serial data
501    data |= m_iec->data_r() << 7;
502502
503503   return data;
504504}
r17592r17593
515515        3       CST MTR
516516        4
517517        5
518        6
518        6       (CST WR)
519519        7
520520
521521    */
522522
523   // serial bus
523   //logerror("%s cpu write %02x\n", machine().describe_context(), data);
524
525   // serial data
524526   m_iec->data_w(!BIT(data, 0));
527
528   // serial clock
525529   m_iec->clk_w(!BIT(data, 1));
530
531   // serial attention
526532   m_iec->atn_w(!BIT(data, 2));
527533
534   // cassette motor
535   m_cassette->motor_w(BIT(data, 3));
536
528537   // cassette write
529   m_cassette->output(!BIT(data, 1) ? -(0x5a9e >> 1) : +(0x5a9e >> 1));
530
531   // cassette motor
532   m_cassette->change_state(BIT(data, 3) ? CASSETTE_MOTOR_DISABLED : CASSETTE_MOTOR_ENABLED, CASSETTE_MASK_MOTOR);
538   m_cassette->write(!BIT(data, 1));
533539}
534540
535541static const m6502_interface cpu_intf =
r17592r17593
630636READ8_MEMBER( plus4_state::ted_ram_r )
631637{
632638   int phi0 = 1, mux = 0, ras = 1, ba = 0;
633   int speech, phi2, user, _6551, addr_clk, keyport, kernal, cs0, cs1;
639   int scs, phi2, user, _6551, addr_clk, keyport, kernal, cs0, cs1;
634640
635   bankswitch(offset, phi0, mux, ras, &speech, &phi2, &user, &_6551, &addr_clk, &keyport, &kernal, &cs0, &cs1);
641   bankswitch(offset, phi0, mux, ras, &scs, &phi2, &user, &_6551, &addr_clk, &keyport, &kernal, &cs0, &cs1);
636642
637   return read_memory(space, offset, ba, speech, phi2, user, _6551, addr_clk, keyport, kernal, 1, 1);
643   return read_memory(space, offset, ba, scs, phi2, user, _6551, addr_clk, keyport, kernal, 1, 1);
638644}
639645
640646READ8_MEMBER( plus4_state::ted_rom_r )
641647{
642648   int phi0 = 1, mux = 0, ras = 1, ba = 0;
643   int speech, phi2, user, _6551, addr_clk, keyport, kernal, cs0, cs1;
649   int scs, phi2, user, _6551, addr_clk, keyport, kernal, cs0, cs1;
644650
645   bankswitch(offset, phi0, mux, ras, &speech, &phi2, &user, &_6551, &addr_clk, &keyport, &kernal, &cs0, &cs1);
651   bankswitch(offset, phi0, mux, ras, &scs, &phi2, &user, &_6551, &addr_clk, &keyport, &kernal, &cs0, &cs1);
646652
647   return read_memory(space, offset, ba, speech, phi2, user, _6551, addr_clk, keyport, kernal, cs0, cs1);
653   return read_memory(space, offset, ba, scs, phi2, user, _6551, addr_clk, keyport, kernal, cs0, cs1);
648654}
649655
650656READ8_MEMBER( plus4_state::ted_k_r )
r17592r17593
767773
768774
769775//-------------------------------------------------
776//  PET_DATASSETTE_PORT_INTERFACE( datassette_intf )
777//-------------------------------------------------
778
779static PET_DATASSETTE_PORT_INTERFACE( datassette_intf )
780{
781   DEVCB_NULL
782};
783
784
785//-------------------------------------------------
770786//  CBM_IEC_INTERFACE( iec_intf )
771787//-------------------------------------------------
772788
r17592r17593
845861      m_function = memregion("function")->base();
846862   }
847863
864   if (memregion("c2") != NULL)
865   {
866      m_c2 = memregion("c2")->base();
867   }
868
848869   // state saving
849870   save_item(NAME(m_addr));
850871   save_item(NAME(m_rom_en));
r17592r17593
915936   MCFG_MOS6529_ADD(MOS6529_USER_TAG, spi_user_intf)
916937   MCFG_MOS6529_ADD(MOS6529_KB_TAG, spi_kb_intf)
917938   MCFG_QUICKLOAD_ADD("quickload", cbm_c16, "p00,prg", CBM_QUICKLOAD_DELAY_SECONDS)
918   MCFG_CASSETTE_ADD( CASSETTE_TAG, cbm_cassette_interface )
939   MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT_TAG, datassette_intf, plus4_datassette_devices, "c1531", NULL)
919940   MCFG_CBM_IEC_ADD(iec_intf, NULL)
920941   MCFG_PLUS4_EXPANSION_SLOT_ADD(PLUS4_EXPANSION_SLOT_TAG, XTAL_14_31818MHz/16, expansion_intf, plus4_expansion_cards, NULL, NULL)
921942   MCFG_PLUS4_USER_PORT_ADD(PLUS4_USER_PORT_TAG, plus4_user_port_cards, NULL, NULL)
r17592r17593
954975   MCFG_MOS6529_ADD(MOS6529_USER_TAG, spi_user_intf)
955976   MCFG_MOS6529_ADD(MOS6529_KB_TAG, spi_kb_intf)
956977   MCFG_QUICKLOAD_ADD("quickload", cbm_c16, "p00,prg", CBM_QUICKLOAD_DELAY_SECONDS)
957   MCFG_CASSETTE_ADD( CASSETTE_TAG, cbm_cassette_interface )
978   MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT_TAG, datassette_intf, plus4_datassette_devices, "c1531", NULL)
958979   MCFG_CBM_IEC_ADD(iec_intf, NULL)
959980   MCFG_PLUS4_EXPANSION_SLOT_ADD(PLUS4_EXPANSION_SLOT_TAG, XTAL_17_73447MHz/20, expansion_intf, plus4_expansion_cards, NULL, NULL)
960981   MCFG_PLUS4_USER_PORT_ADD(PLUS4_USER_PORT_TAG, plus4_user_port_cards, NULL, NULL)
r17592r17593
970991
971992
972993//-------------------------------------------------
973//  MACHINE_CONFIG( c16 )
994//  MACHINE_CONFIG( c16n )
974995//-------------------------------------------------
975996
976static MACHINE_CONFIG_DERIVED( c16, pal )
997static MACHINE_CONFIG_DERIVED( c16n, ntsc )
977998   MCFG_CPU_MODIFY(MOS7501_TAG)
978999   MCFG_CPU_CONFIG(c16_cpu_intf)
9791000
r17592r17593
9911012
9921013
9931014//-------------------------------------------------
1015//  MACHINE_CONFIG( c16p )
1016//-------------------------------------------------
1017
1018static MACHINE_CONFIG_DERIVED( c16p, pal )
1019   MCFG_CPU_MODIFY(MOS7501_TAG)
1020   MCFG_CPU_CONFIG(c16_cpu_intf)
1021
1022   MCFG_DEVICE_REMOVE(MOS6551_TAG)
1023   MCFG_DEVICE_REMOVE(MOS6529_USER_TAG)
1024   MCFG_DEVICE_REMOVE(PLUS4_USER_PORT_TAG)
1025
1026   MCFG_DEVICE_MODIFY(CBM_IEC_TAG)
1027   MCFG_DEVICE_CONFIG(c16_iec_intf)
1028
1029   MCFG_DEVICE_MODIFY(RAM_TAG)
1030   MCFG_RAM_DEFAULT_SIZE("16K")
1031   MCFG_RAM_EXTRA_OPTIONS("64K")
1032MACHINE_CONFIG_END
1033
1034
1035//-------------------------------------------------
9941036//  MACHINE_CONFIG( c232 )
9951037//-------------------------------------------------
9961038
997static MACHINE_CONFIG_DERIVED( c232, c16 )
1039static MACHINE_CONFIG_DERIVED( c232, c16p )
9981040   MCFG_DEVICE_MODIFY(RAM_TAG)
9991041   MCFG_RAM_DEFAULT_SIZE("32K")
10001042MACHINE_CONFIG_END
r17592r17593
10241066   ROM_LOAD( "basic-264.bin", 0x0000, 0x4000, CRC(6a2fc8e3) SHA1(473fce23afa07000cdca899fbcffd6961b36a8a0) )
10251067   ROM_LOAD( "kernal-264.bin", 0x4000, 0x4000, CRC(8f32abe7) SHA1(d481faf5fcbb331878dc7851c642d04f26a32873) )
10261068
1027   ROM_REGION( 0x8000, "function", ROMREGION_ERASE00 )
1069   ROM_REGION( 0x8000, "function", 0 )
1070   ROM_CART_LOAD( "lo", 0x0000, 0x0000, ROM_NOMIRROR )
1071   ROM_CART_LOAD( "hi", 0x4000, 0x0000, ROM_NOMIRROR )
10281072
10291073   ROM_REGION( 0xf5, PLA_TAG, 0 )
10301074   ROM_LOAD( "251641-02", 0x00, 0xf5, NO_DUMP )
r17592r17593
10321076
10331077
10341078//-------------------------------------------------
1079//  ROM( c232 )
1080//-------------------------------------------------
1081
1082ROM_START( c232 )
1083   ROM_REGION( 0x8000, "kernal", 0 )
1084   ROM_LOAD( "318006-01.u4", 0x0000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd) )
1085   ROM_LOAD( "318004-01.u5", 0x4000, 0x4000, CRC(dbdc3319) SHA1(3c77caf72914c1c0a0875b3a7f6935cd30c54201) )
1086
1087   ROM_REGION( 0x8000, "function", 0 )
1088   ROM_CART_LOAD( "lo", 0x0000, 0x0000, ROM_NOMIRROR )
1089   ROM_CART_LOAD( "hi", 0x4000, 0x0000, ROM_NOMIRROR )
1090
1091   ROM_REGION( 0xf5, PLA_TAG, 0 )
1092   ROM_LOAD( "251641-02.u7", 0x00, 0xf5, NO_DUMP )
1093ROM_END
1094
1095
1096//-------------------------------------------------
1097//  ROM( v364 )
1098//-------------------------------------------------
1099
1100ROM_START( v364 )
1101   ROM_REGION( 0x8000, "kernal", 0 )
1102   ROM_LOAD( "318006-01", 0x0000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd) )
1103   ROM_LOAD( "kern364p", 0x4000, 0x4000, CRC(84fd4f7a) SHA1(b9a5b5dacd57ca117ef0b3af29e91998bf4d7e5f) )
1104
1105   ROM_REGION( 0x8000, "function", 0 )
1106   ROM_LOAD( "317053-01", 0x0000, 0x4000, CRC(4fd1d8cb) SHA1(3b69f6e7cb4c18bb08e203fb18b7dabfa853390f) )
1107   ROM_LOAD( "317054-01", 0x4000, 0x4000, CRC(109de2fc) SHA1(0ad7ac2db7da692d972e586ca0dfd747d82c7693) )
1108
1109   ROM_REGION( 0x8000, "c2", 0 )
1110   ROM_LOAD( "spk3cc4.bin", 0x0000, 0x4000, CRC(5227c2ee) SHA1(59af401cbb2194f689898271c6e8aafa28a7af11) )
1111
1112   ROM_REGION( 0xf5, PLA_TAG, 0 )
1113   ROM_LOAD( "251641-02", 0x00, 0xf5, NO_DUMP )
1114ROM_END
1115
1116
1117//-------------------------------------------------
10351118//  ROM( plus4n )
10361119//-------------------------------------------------
10371120
r17592r17593
10821165
10831166
10841167//-------------------------------------------------
1085//  ROM( c16 )
1168//  ROM( c16n )
10861169//-------------------------------------------------
10871170
1088ROM_START( c16 )
1171ROM_START( c16n )
10891172   ROM_REGION( 0x8000, "kernal", 0 )
1090   ROM_LOAD( "318006-01.u3", 0x0000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd) )
1091
10921173   ROM_DEFAULT_BIOS("r5")
1093   ROM_SYSTEM_BIOS( 0, "r3", "Revision 3" )
1094   ROMX_LOAD( "318004-03.u4", 0x4000, 0x4000, CRC(77bab934) SHA1(97814dab9d757fe5a3a61d357a9a81da588a9783), ROM_BIOS(1) )
1095   ROM_SYSTEM_BIOS( 1, "r4", "Revision 4" )
1096   ROMX_LOAD( "318004-04.u4", 0x4000, 0x4000, CRC(be54ed79) SHA1(514ad3c29d01a2c0a3b143d9c1d4143b1912b793), ROM_BIOS(2) )
1097   ROM_SYSTEM_BIOS( 2, "r5", "Revision 5" )
1098   ROMX_LOAD( "318004-05.u4", 0x4000, 0x4000, CRC(71c07bd4) SHA1(7c7e07f016391174a557e790c4ef1cbe33512cdb), ROM_BIOS(3) )
1174   ROM_SYSTEM_BIOS( 0, "r4", "Revision 4" )
1175   ROMX_LOAD( "318005-04.u24", 0x4000, 0x4000, CRC(799a633d) SHA1(5df52c693387c0e2b5d682613a3b5a65477311cf), ROM_BIOS(1) )
1176   ROM_SYSTEM_BIOS( 1, "r5", "Revision 5" )
1177   ROMX_LOAD( "318005-05.u24", 0x4000, 0x4000, CRC(70295038) SHA1(a3d9e5be091b98de39a046ab167fb7632d053682), ROM_BIOS(2) )
1178   ROM_SYSTEM_BIOS( 2, "jiffydos", "JiffyDOS v6.01" )
1179   ROMX_LOAD( "jiffydos plus4.u24", 0x0000, 0x8000, CRC(818d3f45) SHA1(9bc1b1c3da9ca642deae717905f990d8e36e6c3b), ROM_BIOS(3) ) // first half contains R5 kernal
10991180
1181   ROM_LOAD( "318006-01.u23", 0x0000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd) )
1182
11001183   ROM_REGION( 0xf5, PLA_TAG, 0 )
1101   ROM_LOAD( "251641-02.u16", 0x00, 0xf5, NO_DUMP )
1184   ROM_LOAD( "251641-02.u19", 0x00, 0xf5, NO_DUMP )
11021185ROM_END
11031186
11041187
11051188//-------------------------------------------------
1106//  ROM( c116 )
1189//  ROM( c16p )
11071190//-------------------------------------------------
11081191
1109ROM_START( c116 )
1192ROM_START( c16p )
11101193   ROM_REGION( 0x8000, "kernal", 0 )
11111194   ROM_LOAD( "318006-01.u3", 0x0000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd) )
11121195
r17592r17593
11191202   ROMX_LOAD( "318004-05.u4", 0x4000, 0x4000, CRC(71c07bd4) SHA1(7c7e07f016391174a557e790c4ef1cbe33512cdb), ROM_BIOS(3) )
11201203
11211204   ROM_REGION( 0xf5, PLA_TAG, 0 )
1122   ROM_LOAD( "251641-02.u101", 0x00, 0xf5, NO_DUMP )
1205   ROM_LOAD( "251641-02.u16", 0x00, 0xf5, NO_DUMP )
11231206ROM_END
11241207
11251208
r17592r17593
11431226
11441227
11451228//-------------------------------------------------
1146//  ROM( c232 )
1229//  ROM( c116 )
11471230//-------------------------------------------------
11481231
1149ROM_START( c232 )
1232ROM_START( c116 )
11501233   ROM_REGION( 0x8000, "kernal", 0 )
1151   ROM_LOAD( "318006-01.u4", 0x0000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd) )
1152   ROM_LOAD( "318004-01.u5", 0x4000, 0x4000, CRC(dbdc3319) SHA1(3c77caf72914c1c0a0875b3a7f6935cd30c54201) )
1234   ROM_LOAD( "318006-01.u3", 0x0000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd) )
11531235
1154   ROM_REGION( 0x8000, "function", ROMREGION_ERASE00 )
1236   ROM_DEFAULT_BIOS("r5")
1237   ROM_SYSTEM_BIOS( 0, "r3", "Revision 3" )
1238   ROMX_LOAD( "318004-03.u4", 0x4000, 0x4000, CRC(77bab934) SHA1(97814dab9d757fe5a3a61d357a9a81da588a9783), ROM_BIOS(1) )
1239   ROM_SYSTEM_BIOS( 1, "r4", "Revision 4" )
1240   ROMX_LOAD( "318004-04.u4", 0x4000, 0x4000, CRC(be54ed79) SHA1(514ad3c29d01a2c0a3b143d9c1d4143b1912b793), ROM_BIOS(2) )
1241   ROM_SYSTEM_BIOS( 2, "r5", "Revision 5" )
1242   ROMX_LOAD( "318004-05.u4", 0x4000, 0x4000, CRC(71c07bd4) SHA1(7c7e07f016391174a557e790c4ef1cbe33512cdb), ROM_BIOS(3) )
11551243
11561244   ROM_REGION( 0xf5, PLA_TAG, 0 )
1157   ROM_LOAD( "251641-02.u7", 0x00, 0xf5, NO_DUMP )
1245   ROM_LOAD( "251641-02.u101", 0x00, 0xf5, NO_DUMP )
11581246ROM_END
11591247
11601248
1161//-------------------------------------------------
1162//  ROM( v364 )
1163//-------------------------------------------------
11641249
1165ROM_START( v364 )
1166   ROM_REGION( 0x8000, "kernal", 0 )
1167   ROM_LOAD( "318006-01", 0x0000, 0x4000, CRC(74eaae87) SHA1(161c96b4ad20f3a4f2321808e37a5ded26a135dd) )
1168   ROM_LOAD( "kern364p", 0x4000, 0x4000, CRC(84fd4f7a) SHA1(b9a5b5dacd57ca117ef0b3af29e91998bf4d7e5f) )
1169
1170   ROM_REGION( 0x10000, "function", 0 )
1171   ROM_LOAD( "317053-01", 0x0000, 0x4000, CRC(4fd1d8cb) SHA1(3b69f6e7cb4c18bb08e203fb18b7dabfa853390f) )
1172   ROM_LOAD( "317054-01", 0x4000, 0x4000, CRC(109de2fc) SHA1(0ad7ac2db7da692d972e586ca0dfd747d82c7693) )
1173   ROM_LOAD( "spk3cc4.bin", 0x8000, 0x4000, CRC(5227c2ee) SHA1(59af401cbb2194f689898271c6e8aafa28a7af11) )
1174
1175   ROM_REGION( 0xf5, PLA_TAG, 0 )
1176   ROM_LOAD( "251641-02", 0x00, 0xf5, NO_DUMP )
1177ROM_END
1178
1179
1180
11811250//**************************************************************************
11821251//  SYSTEM DRIVERS
11831252//**************************************************************************
11841253
11851254//    YEAR  NAME    PARENT  COMPAT  MACHINE INPUT   INIT                    COMPANY                         FULLNAME                        FLAGS
1186COMP( 1983, c264,   0,      0,      ntsc,   plus4,   driver_device,   0,      "Commodore Business Machines",   "Commodore 264 (Prototype)",   GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
1255COMP( 1984, c264,   0,      0,      ntsc,   plus4,   driver_device,   0,      "Commodore Business Machines",   "Commodore 264 (Prototype)",   GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
1256COMP( 1984, c232,   c264,   0,      c232,   plus4,   driver_device,   0,      "Commodore Business Machines",   "Commodore 232 (Prototype)",   GAME_SUPPORTS_SAVE )
1257COMP( 1984, v364,   c264,   0,      v364,   plus4,   driver_device,   0,      "Commodore Business Machines",   "Commodore V364 (Prototype)",   GAME_SUPPORTS_SAVE )
11871258COMP( 1984, plus4n,   c264,   0,      ntsc,   plus4,   driver_device,   0,      "Commodore Business Machines",   "Plus/4 (NTSC)",            GAME_SUPPORTS_SAVE )
11881259COMP( 1984, plus4p,   c264,   0,      pal,   plus4,   driver_device,   0,      "Commodore Business Machines",   "Plus/4 (PAL)",               GAME_SUPPORTS_SAVE )
1189COMP( 1984, c16,   c264,   0,      c16,   c16,   driver_device,   0,      "Commodore Business Machines",   "Commodore 16",               GAME_SUPPORTS_SAVE )
1190COMP( 1984, c16h,   c264,   0,      c16,   c16,   driver_device,   0,      "Commodore Business Machines",   "Commodore 16 (Hungary)",      GAME_SUPPORTS_SAVE )
1191COMP( 1984, c116,   c264,   0,      c16,   c16,   driver_device,   0,      "Commodore Business Machines",   "Commodore 116",            GAME_SUPPORTS_SAVE )
1192COMP( 1984, c232,   c264,   0,      c232,   plus4,   driver_device,   0,      "Commodore Business Machines",   "Commodore 232 (Prototype)",   GAME_SUPPORTS_SAVE )
1193COMP( 1985, v364,   c264,   0,      v364,   plus4,   driver_device,   0,      "Commodore Business Machines",   "Commodore V364 (Prototype)",   GAME_SUPPORTS_SAVE )
1260COMP( 1984, c16n,   c264,   0,      c16n,   c16,   driver_device,   0,      "Commodore Business Machines",   "Commodore 16 (NTSC)",         GAME_SUPPORTS_SAVE )
1261COMP( 1984, c16p,   c264,   0,      c16p,   c16,   driver_device,   0,      "Commodore Business Machines",   "Commodore 16 (PAL)",         GAME_SUPPORTS_SAVE )
1262COMP( 1984, c16h,   c264,   0,      c16p,   c16,   driver_device,   0,      "Commodore Business Machines",   "Commodore 16 (Hungary)",      GAME_SUPPORTS_SAVE )
1263COMP( 1984, c116,   c264,   0,      c16p,   c16,   driver_device,   0,      "Commodore Business Machines",   "Commodore 116",            GAME_SUPPORTS_SAVE )
trunk/src/mess/drivers/c128.c
r17592r17593
642642 *************************************/
643643
644644
645READ8_MEMBER( c128_state::sid_potx_r )
646{
647   device_t *sid = machine().device("sid6581");
648
649   return c64_paddle_read(sid, 0);
650}
651
652READ8_MEMBER( c128_state::sid_poty_r )
653{
654   device_t *sid = machine().device("sid6581");
655
656   return c64_paddle_read(sid, 1);
657}
658
645659static const sid6581_interface c128_sound_interface =
646660{
647   c64_paddle_read
661   DEVCB_DRIVER_MEMBER(c128_state, sid_potx_r),
662   DEVCB_DRIVER_MEMBER(c128_state, sid_poty_r)
648663};
649664
650665
r17592r17593
656671   DEVCB_HANDLER(c128_m6510_port_write)   /* port_write_func */
657672};
658673
659static SLOT_INTERFACE_START( c128dcr_iec_devices )
660   SLOT_INTERFACE("c1571cr", C1571CR)
661SLOT_INTERFACE_END
662
663static SLOT_INTERFACE_START( c128d81_iec_devices )
664   SLOT_INTERFACE("c1563", C1563)
665SLOT_INTERFACE_END
666
667674static CBM_IEC_INTERFACE( cbm_iec_intf )
668675{
669676   DEVCB_DEVICE_LINE("cia_0", c128_iec_srq_w),
trunk/src/mess/drivers/huebler.c
r17592r17593
1818
1919*/
2020
21
22#include "emu.h"
23#include "cpu/z80/z80.h"
24#include "cpu/z80/z80daisy.h"
25#include "machine/z80pio.h"
26#include "machine/z80dart.h"
27#include "machine/z80ctc.h"
28#include "machine/ram.h"
2921#include "includes/huebler.h"
3022
3123/* Keyboard */
r17592r17593
4133   if (m_key_a8 && !a8)
4234   {
4335      m_key_d7 = m_key_d6;
44      m_key_a4 = !(BIT(data, 1) & BIT(data, 3));
45      m_key_a5 = !(BIT(data, 2) & BIT(data, 3));
36      m_key_a4 = !(BIT(data, 1) && BIT(data, 3));
37      m_key_a5 = !(BIT(data, 2) && BIT(data, 3));
4638   }
4739
4840   m_key_a8 = a8;
trunk/src/mess/drivers/compis.c
r17592r17593
188188//{ 0xff20, 0xffff, compis_null_r },    /* CPU 80186            */
189189ADDRESS_MAP_END
190190
191/* TODO */
192static ADDRESS_MAP_START( keyboard_io, AS_IO, 8, compis_state )
193   AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_NOP
194   AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_NOP
195   AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_NOP
196   AM_RANGE(MCS48_PORT_BUS, MCS48_PORT_BUS) AM_NOP
197ADDRESS_MAP_END
198
199191/* COMPIS Keyboard */
200192
201193/* 2008-05 FP:
r17592r17593
369361   MCFG_CPU_VBLANK_INT("screen", compis_vblank_int)
370362   MCFG_CPU_CONFIG(i86_address_mask)
371363
372   MCFG_CPU_ADD("i8749", I8749, 1000000)
373   MCFG_CPU_IO_MAP(keyboard_io)
374
375364   //MCFG_QUANTUM_TIME(attotime::from_hz(60))
376365
377366   MCFG_MACHINE_START(compis)
r17592r17593
404393   MCFG_MM58274C_ADD("mm58274c", compis_mm58274c_interface)
405394   MCFG_UPD765A_ADD("upd765", compis_fdc_interface)
406395   MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(compis_floppy_interface)
396   MCFG_COMPIS_KEYBOARD_ADD()
407397
408398   /* software lists */
409399   MCFG_SOFTWARE_LIST_ADD("flop_list", "compis")
r17592r17593
417407   MCFG_CPU_VBLANK_INT("screen", compis_vblank_int)
418408   MCFG_CPU_CONFIG(i86_address_mask)
419409
420   MCFG_CPU_ADD("i8749", I8749, 1000000)
421   MCFG_CPU_IO_MAP(keyboard_io)
422
423410   //MCFG_QUANTUM_TIME(attotime::from_hz(60))
424411
425412   MCFG_MACHINE_START(compis)
r17592r17593
448435   MCFG_MM58274C_ADD("mm58274c", compis_mm58274c_interface)
449436   MCFG_UPD765A_ADD("upd765", compis_fdc_interface)
450437   MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(compis_floppy_interface)
438   MCFG_COMPIS_KEYBOARD_ADD()
451439
452440   /* software lists */
453441   MCFG_SOFTWARE_LIST_ADD("flop_list", "compis")
r17592r17593
467455   ROM_LOAD16_BYTE( "sa883003.u36", 0x0001, 0x4000, CRC(7c918f56) SHA1(8ba33d206351c52f44f1aa76cc4d7f292dcef761) )
468456   ROM_LOAD16_BYTE( "sa883003.u39", 0x8000, 0x4000, CRC(3cca66db) SHA1(cac36c9caa2f5bb42d7a6d5b84f419318628935f) )
469457   ROM_LOAD16_BYTE( "sa883003.u35", 0x8001, 0x4000, CRC(43c38e76) SHA1(f32e43604107def2c2259898926d090f2ed62104) )
470
471   ROM_REGION( 0x800, "i8749", 0 )
472   ROM_LOAD( "cmpkey13.u1", 0x0000, 0x0800, CRC(3f87d138) SHA1(c04e2d325b9c04818bc7c47c3bf32b13862b11ec) )
473458ROM_END
474459
475460ROM_START( compis2 )
r17592r17593
483468   ROM_SYSTEM_BIOS( 1, "v303", "Compis II v3.03 (1987-03-09)" )
484469   ROMX_LOAD( "rysa094.u39", 0x0000, 0x8000, CRC(e7302bff) SHA1(44ea20ef4008849af036c1a945bc4f27431048fb), ROM_BIOS(2) | ROM_SKIP(1) )
485470   ROMX_LOAD( "rysa094.u35", 0x0001, 0x8000, CRC(b0694026) SHA1(eb6b2e3cb0f42fd5ffdf44f70e652ecb9714ce30), ROM_BIOS(2) | ROM_SKIP(1) )
486
487   ROM_REGION( 0x800, "i8749", 0 )
488   ROM_LOAD( "cmpkey13.u1", 0x0000, 0x0800, CRC(3f87d138) SHA1(c04e2d325b9c04818bc7c47c3bf32b13862b11ec) )
489471ROM_END
490472
491473/*   YEAR   NAME        PARENT  COMPAT MACHINE  INPUT   INIT     COMPANY     FULLNAME */
trunk/src/mess/drivers/c64.c
r17592r17593
5050{
5151   int restore = BIT(ioport("SPECIAL")->read(), 7);
5252
53   m_maincpu->set_input_line(INPUT_LINE_IRQ0, m_cia1_irq | m_vic_irq | m_exp_irq);
54   m_maincpu->set_input_line(INPUT_LINE_NMI, m_cia2_irq | restore | m_exp_nmi);
53   m_maincpu->set_input_line(INPUT_LINE_IRQ0, m_cia1_irq || m_vic_irq || m_exp_irq);
54   m_maincpu->set_input_line(INPUT_LINE_NMI, m_cia2_irq || restore || m_exp_nmi);
5555
56   mos6526_flag_w(m_cia1, m_cass_rd & m_iec_srq);
56   mos6526_flag_w(m_cia1, m_cass_rd && m_iec_srq);
5757}
5858
5959
r17592r17593
9393{
9494   int io1 = 1, io2 = 1;
9595
96   UINT8 data = 0;
96   UINT8 data = m_vic->bus_r();
9797
9898   if (!casram)
9999   {
r17592r17593
155155      }
156156   }
157157
158   data |= m_exp->cd_r(space, offset, ba, roml, romh, io1, io2);
159
160   return data;
158   return m_exp->cd_r(space, offset, data, ba, roml, romh, io1, io2);
161159}
162160
163161
r17592r17593
249247   int casram, basic, kernal, charom, grw, io, roml, romh;
250248   bankswitch(0xffff, offset, rw, aec, ba, cas, &casram, &basic, &kernal, &charom, &grw, &io, &roml, &romh);
251249
252   return read_memory(space, offset, 0, casram, basic, kernal, charom, io, roml, romh);
250   return read_memory(space, offset, ba, casram, basic, kernal, charom, io, roml, romh);
253251}
254252
255253
r17592r17593
437435//  sid6581_interface sid_intf
438436//-------------------------------------------------
439437
440static int paddle_read( device_t *device, int which )
438READ8_MEMBER( c64_state::sid_potx_r )
441439{
442   running_machine &machine = device->machine();
443   c64_state *state = device->machine().driver_data<c64_state>();
440   UINT8 cia1_pa = mos6526_pa_r(m_cia1, 0);
441   
442   int sela = BIT(cia1_pa, 6);
443   int selb = BIT(cia1_pa, 7);
444444
445   int pot1 = 0xff, pot2 = 0xff, pot3 = 0xff, pot4 = 0xff, temp;
446   UINT8 cia0porta = mos6526_pa_r(state->m_cia1, 0);
447   int controller1 = machine.root_device().ioport("CTRLSEL")->read() & 0x07;
448   int controller2 = machine.root_device().ioport("CTRLSEL")->read() & 0x70;
449   // Notice that only a single input is defined for Mouse & Lightpen in both ports
450   switch (controller1)
451   {
452      case 0x01:
453         if (which)
454            pot2 = machine.root_device().ioport("PADDLE2")->read();
455         else
456            pot1 = machine.root_device().ioport("PADDLE1")->read();
457         break;
445   UINT8 data = 0;
458446
459      case 0x02:
460         if (which)
461            pot2 = machine.root_device().ioport("TRACKY")->read();
462         else
463            pot1 = machine.root_device().ioport("TRACKX")->read();
464         break;
447   if (sela) data = m_joy1->pot_x_r();
448   if (selb) data = m_joy2->pot_x_r();
465449
466      case 0x03:
467         if (which && (machine.root_device().ioport("JOY1_2B")->read() & 0x20))   // Joy1 Button 2
468            pot1 = 0x00;
469         break;
450   return data;
451}
470452
471      case 0x04:
472         if (which)
473            pot2 = machine.root_device().ioport("LIGHTY")->read();
474         else
475            pot1 = machine.root_device().ioport("LIGHTX")->read();
476         break;
453READ8_MEMBER( c64_state::sid_poty_r )
454{
455   UINT8 cia1_pa = mos6526_pa_r(m_cia1, 0);
456   
457   int sela = BIT(cia1_pa, 6);
458   int selb = BIT(cia1_pa, 7);
477459
478      case 0x06:
479         if (which && (machine.root_device().ioport("OTHER")->read() & 0x04))   // Lightpen Signal
480            pot2 = 0x00;
481         break;
460   UINT8 data = 0;
482461
483      case 0x00:
484      case 0x07:
485         break;
462   if (sela) data = m_joy1->pot_y_r();
463   if (selb) data = m_joy2->pot_y_r();
486464
487      default:
488         logerror("Invalid Controller Setting %d\n", controller1);
489         break;
490   }
491
492   switch (controller2)
493   {
494      case 0x10:
495         if (which)
496            pot4 = machine.root_device().ioport("PADDLE4")->read();
497         else
498            pot3 = machine.root_device().ioport("PADDLE3")->read();
499         break;
500
501      case 0x20:
502         if (which)
503            pot4 = machine.root_device().ioport("TRACKY")->read();
504         else
505            pot3 = machine.root_device().ioport("TRACKX")->read();
506         break;
507
508      case 0x30:
509         if (which && (machine.root_device().ioport("JOY2_2B")->read() & 0x20))   // Joy2 Button 2
510            pot4 = 0x00;
511         break;
512
513      case 0x40:
514         if (which)
515            pot4 = machine.root_device().ioport("LIGHTY")->read();
516         else
517            pot3 = machine.root_device().ioport("LIGHTX")->read();
518         break;
519
520      case 0x60:
521         if (which && (machine.root_device().ioport("OTHER")->read() & 0x04))   // Lightpen Signal
522            pot4 = 0x00;
523         break;
524
525      case 0x00:
526      case 0x70:
527         break;
528
529      default:
530         logerror("Invalid Controller Setting %d\n", controller1);
531         break;
532   }
533
534   if (machine.root_device().ioport("CTRLSEL")->read() & 0x80)      // Swap
535   {
536      temp = pot1; pot1 = pot3; pot3 = temp;
537      temp = pot2; pot2 = pot4; pot4 = temp;
538   }
539
540   switch (cia0porta & 0xc0)
541   {
542      case 0x40:
543         return which ? pot2 : pot1;
544
545      case 0x80:
546         return which ? pot4 : pot3;
547
548      case 0xc0:
549         return which ? pot2 : pot1;
550
551      default:
552         return 0;
553   }
465   return data;
554466}
555467
556static const sid6581_interface sid_intf =
468static MOS6581_INTERFACE( sid_intf )
557469{
558   paddle_read
470   DEVCB_DRIVER_MEMBER(c64_state, sid_potx_r),
471   DEVCB_DRIVER_MEMBER(c64_state, sid_poty_r)
559472};
560473
561474
r17592r17593
753666
754667   UINT8 data = 0x07;
755668
756   data |= ((m_cassette->get_state() & CASSETTE_MASK_UISTATE) == CASSETTE_STOPPED) << 4;
669   data |= m_cassette->sense_r() << 4;
757670
758671   return data;
759672}
r17592r17593
781694   m_charen = BIT(data, 2);
782695
783696   // cassette write
784   m_cassette->output(BIT(data, 3) ? -(0x5a9e >> 1) : +(0x5a9e >> 1));
697   m_cassette->write(BIT(data, 3));
785698
786699   // cassette motor
787   if (!BIT(data, 5))
788   {
789      m_cassette->change_state(CASSETTE_MOTOR_ENABLED, CASSETTE_MASK_MOTOR);
790      m_cassette_timer->adjust(attotime::zero, 0, attotime::from_hz(44100));
791   }
792   else
793   {
794      m_cassette->change_state(CASSETTE_MOTOR_DISABLED, CASSETTE_MASK_MOTOR);
795      m_cassette_timer->reset();
796   }
700   m_cassette->motor_w(BIT(data, 5));
797701}
798702
799703static const m6502_interface cpu_intf =
r17592r17593
914818
915819
916820//-------------------------------------------------
917//  TIMER_DEVICE_CALLBACK( cassette_tick )
821//  PET_DATASSETTE_PORT_INTERFACE( datassette_intf )
918822//-------------------------------------------------
919823
920static TIMER_DEVICE_CALLBACK( cassette_tick )
824WRITE_LINE_MEMBER( c64_state::tape_read_w )
921825{
922   c64_state *state = timer.machine().driver_data<c64_state>();
826   m_cass_rd = state;
923827
924   state->m_cass_rd = state->m_cassette->input() > +0.0;
925
926   state->check_interrupts();
828   check_interrupts();
927829}
928830
831static PET_DATASSETTE_PORT_INTERFACE( datassette_intf )
832{
833   DEVCB_DRIVER_LINE_MEMBER(c64_state, tape_read_w),
834};
929835
836
930837//-------------------------------------------------
931838//  CBM_IEC_INTERFACE( iec_intf )
932839//-------------------------------------------------
r17592r17593
11151022   MCFG_MOS6526R1_ADD(MOS6526_1_TAG, VIC6567_CLOCK, cia1_intf)
11161023   MCFG_MOS6526R1_ADD(MOS6526_2_TAG, VIC6567_CLOCK, cia2_intf)
11171024   MCFG_QUICKLOAD_ADD("quickload", cbm_c64, "p00,prg,t64", CBM_QUICKLOAD_DELAY_SECONDS)
1118   MCFG_CASSETTE_ADD(CASSETTE_TAG, cbm_cassette_interface)
1119   MCFG_TIMER_ADD(TIMER_C1531_TAG, cassette_tick)
1025   MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT_TAG, datassette_intf, cbm_datassette_devices, "c1530", NULL)
11201026   MCFG_CBM_IEC_ADD(iec_intf, "c1541")
11211027   MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vic20_control_port_devices, NULL, NULL)
11221028   MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vic20_control_port_devices, NULL, NULL)
r17592r17593
12121118   MCFG_MOS6526R1_ADD(MOS6526_1_TAG, VIC6569_CLOCK, cia1_intf)
12131119   MCFG_MOS6526R1_ADD(MOS6526_2_TAG, VIC6569_CLOCK, cia2_intf)
12141120   MCFG_QUICKLOAD_ADD("quickload", cbm_c64, "p00,prg,t64", CBM_QUICKLOAD_DELAY_SECONDS)
1215   MCFG_CASSETTE_ADD(CASSETTE_TAG, cbm_cassette_interface)
1216   MCFG_TIMER_ADD(TIMER_C1531_TAG, cassette_tick)
1121   MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT_TAG, datassette_intf, cbm_datassette_devices, "c1530", NULL)
12171122   MCFG_CBM_IEC_ADD(iec_intf, "c1541")
12181123   MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vic20_control_port_devices, NULL, NULL)
12191124   MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vic20_control_port_devices, NULL, NULL)
trunk/src/mess/drivers/vic10.c
r17592r17593
3939{
4040   // TODO this is really handled by the PLA
4141
42   UINT8 data = 0;
42   UINT8 data = m_vic->bus_r();
4343   int lorom = 1, uprom = 1, exram = 1;
4444
4545   if (offset < 0x800)
r17592r17593
7575      uprom = 0;
7676   }
7777
78   data |= m_exp->cd_r(space, offset, lorom, uprom, exram);
79
80   return data;
78   return m_exp->cd_r(space, offset, data, lorom, uprom, exram);
8179}
8280
8381
r17592r17593
253251//  sid6581_interface sid_intf
254252//-------------------------------------------------
255253
256static int vic10_paddle_read( device_t *device, int which )
254UINT8 vic10_state::paddle_read(int which)
257255{
258   running_machine &machine = device->machine();
259   vic10_state *state = device->machine().driver_data<vic10_state>();
260
261256   int pot1 = 0xff, pot2 = 0xff, pot3 = 0xff, pot4 = 0xff, temp;
262   UINT8 cia0porta = mos6526_pa_r(state->m_cia, 0);
263   int controller1 = machine.root_device().ioport("CTRLSEL")->read() & 0x07;
264   int controller2 = machine.root_device().ioport("CTRLSEL")->read() & 0x70;
257   UINT8 cia0porta = mos6526_pa_r(m_cia, 0);
258   int controller1 = ioport("CTRLSEL")->read() & 0x07;
259   int controller2 = ioport("CTRLSEL")->read() & 0x70;
265260   // Notice that only a single input is defined for Mouse & Lightpen in both ports
266261   switch (controller1)
267262   {
268263      case 0x01:
269264         if (which)
270            pot2 = machine.root_device().ioport("PADDLE2")->read();
265            pot2 = ioport("PADDLE2")->read();
271266         else
272            pot1 = machine.root_device().ioport("PADDLE1")->read();
267            pot1 = ioport("PADDLE1")->read();
273268         break;
274269
275270      case 0x02:
276271         if (which)
277            pot2 = machine.root_device().ioport("TRACKY")->read();
272            pot2 = ioport("TRACKY")->read();
278273         else
279            pot1 = machine.root_device().ioport("TRACKX")->read();
274            pot1 = ioport("TRACKX")->read();
280275         break;
281276
282277      case 0x03:
283         if (which && (machine.root_device().ioport("JOY1_2B")->read() & 0x20))   // Joy1 Button 2
278         if (which && (ioport("JOY1_2B")->read() & 0x20))   // Joy1 Button 2
284279            pot1 = 0x00;
285280         break;
286281
287282      case 0x04:
288283         if (which)
289            pot2 = machine.root_device().ioport("LIGHTY")->read();
284            pot2 = ioport("LIGHTY")->read();
290285         else
291            pot1 = machine.root_device().ioport("LIGHTX")->read();
286            pot1 = ioport("LIGHTX")->read();
292287         break;
293288
294289      case 0x06:
295         if (which && (machine.root_device().ioport("OTHER")->read() & 0x04))   // Lightpen Signal
290         if (which && (ioport("OTHER")->read() & 0x04))   // Lightpen Signal
296291            pot2 = 0x00;
297292         break;
298293
r17592r17593
309304   {
310305      case 0x10:
311306         if (which)
312            pot4 = machine.root_device().ioport("PADDLE4")->read();
307            pot4 = ioport("PADDLE4")->read();
313308         else
314            pot3 = machine.root_device().ioport("PADDLE3")->read();
309            pot3 = ioport("PADDLE3")->read();
315310         break;
316311
317312      case 0x20:
318313         if (which)
319            pot4 = machine.root_device().ioport("TRACKY")->read();
314            pot4 = ioport("TRACKY")->read();
320315         else
321            pot3 = machine.root_device().ioport("TRACKX")->read();
316            pot3 = ioport("TRACKX")->read();
322317         break;
323318
324319      case 0x30:
325         if (which && (machine.root_device().ioport("JOY2_2B")->read() & 0x20))   // Joy2 Button 2
320         if (which && (ioport("JOY2_2B")->read() & 0x20))   // Joy2 Button 2
326321            pot4 = 0x00;
327322         break;
328323
329324      case 0x40:
330325         if (which)
331            pot4 = machine.root_device().ioport("LIGHTY")->read();
326            pot4 = ioport("LIGHTY")->read();
332327         else
333            pot3 = machine.root_device().ioport("LIGHTX")->read();
328            pot3 = ioport("LIGHTX")->read();
334329         break;
335330
336331      case 0x60:
337         if (which && (machine.root_device().ioport("OTHER")->read() & 0x04))   // Lightpen Signal
332         if (which && (ioport("OTHER")->read() & 0x04))   // Lightpen Signal
338333            pot4 = 0x00;
339334         break;
340335
r17592r17593
347342         break;
348343   }
349344
350   if (machine.root_device().ioport("CTRLSEL")->read() & 0x80)      // Swap
345   if (ioport("CTRLSEL")->read() & 0x80)      // Swap
351346   {
352347      temp = pot1; pot1 = pot3; pot3 = temp;
353348      temp = pot2; pot2 = pot4; pot4 = temp;
r17592r17593
369364   }
370365}
371366
372static const sid6581_interface sid_intf =
367READ8_MEMBER( vic10_state::sid_potx_r )
373368{
374   vic10_paddle_read
369   return paddle_read(0);
370}
371
372READ8_MEMBER( vic10_state::sid_poty_r )
373{
374   return paddle_read(1);
375}
376
377static MOS6581_INTERFACE( sid_intf )
378{
379   DEVCB_DRIVER_MEMBER(vic10_state, sid_potx_r),
380   DEVCB_DRIVER_MEMBER(vic10_state, sid_poty_r)
375381};
376382
377383
trunk/src/mess/mess.mak
r17592r17593
874874   $(MESS_MACHINE)/plus4user.o   \
875875   $(MESS_MACHINE)/plus4_sid.o   \
876876   $(MESS_MACHINE)/plus4_std.o   \
877   $(MESS_MACHINE)/diag264_lb_iec.o   \
878   $(MESS_MACHINE)/diag264_lb_tape.o   \
879   $(MESS_MACHINE)/diag264_lb_user.o   \
877880   $(MESS_DRIVERS)/cbmb.o      \
878881   $(MESS_MACHINE)/cbmb.o      \
879882   $(MESS_VIDEO)/cbmb.o      \
r17592r17593
899902   $(MESS_MACHINE)/cbm.o      \
900903   $(MESS_MACHINE)/cbmipt.o   \
901904   $(MESS_MACHINE)/64h156.o   \
905   $(MESS_MACHINE)/petcass.o   \
906   $(MESS_MACHINE)/c2n.o      \
902907   $(MESS_VIDEO)/vdc8563.o      \
903908   $(MESS_VIDEO)/vic6567.o      \
904909   $(MESS_VIDEO)/vic4567.o      \
r17592r17593
16871692$(MESSOBJ)/telenova.a:         \
16881693   $(MESS_DRIVERS)/compis.o   \
16891694   $(MESS_MACHINE)/compis.o   \
1695   $(MESS_MACHINE)/compiskb.o   \
16901696
16911697$(MESSOBJ)/telercas.a:         \
16921698   $(MESS_DRIVERS)/tmc1800.o   \

Previous 199869 Revisions Next


© 1997-2024 The MAME Team