Previous 199869 Revisions Next

r19358 Thursday 6th December, 2012 at 08:53:34 UTC by Curt Coder
(MESS) Cleanup. (nw)
[src/mess/machine]c1551.c c1551.h c64_16kb.c vic1110.c vic1110.h vp570.c vp570.h vp585.c vp585.h vp590.c vp590.h

trunk/src/mess/machine/vic1110.h
r19357r19358
4242   // device_vic20_expansion_card_interface overrides
4343   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);
45
46private:
47   required_ioport m_sw;
4548};
4649
4750
trunk/src/mess/machine/c64_16kb.c
r19357r19358
121121
122122void c64_16kb_cartridge_device::device_reset()
123123{
124   UINT8 mode = device().ioport("SW1")->read();
124   UINT8 mode = ioport("SW1")->read();
125125
126126   m_exrom = BIT(mode, 0);
127127   m_game = BIT(mode, 1);
trunk/src/mess/machine/vp570.c
r19357r19358
6262
6363vp570_device::vp570_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
6464   device_t(mconfig, VP570, "VP570", tag, owner, clock),
65   device_vip_expansion_card_interface(mconfig, *this)
65   device_vip_expansion_card_interface(mconfig, *this),
66   m_ram(*this, "ram"),
67   m_base(*this, "BASE"),
68   m_sw1(*this, "SW1")
6669{
6770}
6871
r19357r19358
7376
7477void vp570_device::device_start()
7578{
76   m_ram = auto_alloc_array(machine(), UINT8, 0x1000);
79   m_ram.allocate(0x1000);
7780}
7881
7982
r19357r19358
8588{
8689   UINT8 data = 0xff;
8790
88   offs_t base = ioport("BASE")->read() << 12;
91   offs_t base = m_base->read() << 12;
8992
9093   if (offset >= base && offset < base + 0x1000)
9194   {
r19357r19358
104107
105108void vp570_device::vip_program_w(address_space &space, offs_t offset, UINT8 data, int cdef, int *minh)
106109{
107   offs_t base = ioport("BASE")->read() << 12;
110   offs_t base = m_base->read() << 12;
108111
109112   if (offset >= base && offset < base + 0x1000)
110113   {
111114      *minh = 1;
112115
113      if (ioport("SW1")->read())
116      if (m_sw1->read())
114117      {
115118         m_ram[offset & 0xfff] = data;
116119      }
trunk/src/mess/machine/vp570.h
r19357r19358
4343   virtual void vip_program_w(address_space &space, offs_t offset, UINT8 data, int cdef, int *minh);
4444
4545private:
46   UINT8 *m_ram;
46   optional_shared_ptr<UINT8> m_ram;
47   required_ioport m_base;
48   required_ioport m_sw1;
4749};
4850
4951
trunk/src/mess/machine/vp590.c
r19357r19358
150150vp590_device::vp590_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
151151   device_t(mconfig, VP590, "VP590", tag, owner, clock),
152152   device_vip_expansion_card_interface(mconfig, *this),
153   m_cgc(*this, CDP1862_TAG)
153   m_cgc(*this, CDP1862_TAG),
154   m_color_ram(*this, "color_ram"),
155   m_j1(*this, "J1"),
156   m_j2(*this, "J2")
154157{
155158}
156159
r19357r19358
162165void vp590_device::device_start()
163166{
164167   // allocate memory
165   m_color_ram = auto_alloc_array(machine(), UINT8, COLOR_RAM_SIZE);
168   m_color_ram.allocate(COLOR_RAM_SIZE);
166169
167170   // state saving
168   save_pointer(NAME(m_color_ram), COLOR_RAM_SIZE);
171   save_item(NAME(m_a12));
169172   save_item(NAME(m_color));
170173   save_item(NAME(m_keylatch));
171174}
r19357r19358
255258
256259int vp590_device::vip_ef3_r()
257260{
258   return BIT(ioport("J1")->read(), m_keylatch) ? CLEAR_LINE : ASSERT_LINE;
261   return BIT(m_j1->read(), m_keylatch) ? CLEAR_LINE : ASSERT_LINE;
259262}
260263
261264
r19357r19358
265268
266269int vp590_device::vip_ef4_r()
267270{
268   return BIT(ioport("J2")->read(), m_keylatch) ? CLEAR_LINE : ASSERT_LINE;
271   return BIT(m_j2->read(), m_keylatch) ? CLEAR_LINE : ASSERT_LINE;
269272}
trunk/src/mess/machine/vp590.h
r19357r19358
5656
5757private:
5858   required_device<cdp1862_device> m_cgc;
59   optional_shared_ptr<UINT8> m_color_ram;
60   required_ioport m_j1;
61   required_ioport m_j2;
5962
6063   int m_a12;
61   UINT8 *m_color_ram;
6264   UINT8 m_color;
63
6465   UINT8 m_keylatch;
6566};
6667
trunk/src/mess/machine/c1551.c
r19357r19358
195195   UINT8 data = 0;
196196
197197   // JP1
198   data |= ioport("JP1")->read() << 5;
198   data |= m_jp1->read() << 5;
199199
200200   // SYNC detect line
201201   data |= m_ga->sync_r() << 6;
r19357r19358
463463     m_pla(*this, PLA_TAG),
464464     m_image(*this, FLOPPY_0),
465465     m_exp(*this, PLUS4_EXPANSION_SLOT_TAG),
466     m_jp1(*this, "JP1"),
466467     m_tcbm_data(0xff),
467468     m_status(1),
468469     m_dav(1),
trunk/src/mess/machine/c1551.h
r19357r19358
9191   required_device<pls100_device> m_pla;
9292   required_device<legacy_floppy_image_device> m_image;
9393   required_device<plus4_expansion_slot_device> m_exp;
94   required_ioport m_jp1;
9495
9596   // TCBM bus
9697   UINT8 m_tcbm_data;                  // data
trunk/src/mess/machine/vp585.c
r19357r19358
8282
8383vp585_device::vp585_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
8484   device_t(mconfig, VP585, "VP585", tag, owner, clock),
85   device_vip_expansion_card_interface(mconfig, *this)
85   device_vip_expansion_card_interface(mconfig, *this),
86   m_j1(*this, "J1"),
87   m_j2(*this, "J2")
8688{
8789}
8890
r19357r19358
117119
118120int vp585_device::vip_ef3_r()
119121{
120   return BIT(ioport("J1")->read(), m_keylatch) ? CLEAR_LINE : ASSERT_LINE;
122   return BIT(m_j1->read(), m_keylatch) ? CLEAR_LINE : ASSERT_LINE;
121123}
122124
123125
r19357r19358
127129
128130int vp585_device::vip_ef4_r()
129131{
130   return BIT(ioport("J2")->read(), m_keylatch) ? CLEAR_LINE : ASSERT_LINE;
132   return BIT(m_j2->read(), m_keylatch) ? CLEAR_LINE : ASSERT_LINE;
131133}
trunk/src/mess/machine/vp585.h
r19357r19358
4444   virtual int vip_ef4_r();
4545
4646private:
47   required_ioport m_j1;
48   required_ioport m_j2;
49
4750   UINT8 m_keylatch;
4851};
4952
trunk/src/mess/machine/vic1110.c
r19357r19358
6868
6969vic1110_device::vic1110_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
7070    : device_t(mconfig, VIC1110, "VIC1110", tag, owner, clock),
71     device_vic20_expansion_card_interface(mconfig, *this)
71     device_vic20_expansion_card_interface(mconfig, *this),
72     m_sw(*this, "SW")
7273{
7374}
7475
r19357r19358
8081void vic1110_device::device_start()
8182{
8283   // allocate memory
83   m_ram = auto_alloc_array(machine(), UINT8, 0x2000);
84   vic20_ram_pointer(machine(), 0x2000);
8485}
8586
8687
r19357r19358
9091
9192UINT8 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)
9293{
93   UINT8 sw = ioport("SW")->read();
94   UINT8 sw = m_sw->read();
9495
9596   if ((!blk1 && (sw == BLK1)) || (!blk2 && (sw == BLK2)) || (!blk3 && (sw == BLK3)) || (!blk5 && (sw == BLK5)))
9697   {
r19357r19358
107108
108109void vic1110_device::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)
109110{
110   UINT8 sw = ioport("SW")->read();
111   UINT8 sw = m_sw->read();
111112
112113   if ((!blk1 && (sw == BLK1)) || (!blk2 && (sw == BLK2)) || (!blk3 && (sw == BLK3)) || (!blk5 && (sw == BLK5)))
113114   {

Previous 199869 Revisions Next


© 1997-2024 The MAME Team