Previous 199869 Revisions Next

r20541 Sunday 27th January, 2013 at 17:26:22 UTC by Curt Coder
(MESS) Tagmap lookup cleanup. (nw)
[src/mess/drivers]pc1512.c pecom.c tmc600.c
[src/mess/includes]pc1512.h
[src/mess/machine]c64_4cga.c c64_4cga.h c64_4dxh.c c64_4dxh.h c64_4ksa.c c64_4ksa.h c64_4tba.c c64_4tba.h c64_sfx_sound_expander.c c64_sfx_sound_expander.h comx_joy.c comx_joy.h pc1512kb.c pc1512kb.h
[src/mess/video]pc1512.c pc1640.c pecom.c

trunk/src/mess/machine/c64_4tba.c
r20540r20541
6565
6666c64_4tba_device::c64_4tba_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
6767   device_t(mconfig, C64_4TBA, "C64 Tie Break Adapter", tag, owner, clock),
68   device_c64_user_port_interface(mconfig, *this)
68   device_c64_user_port_interface(mconfig, *this),
69   m_pb(*this, "PB"),
70   m_pa2(*this, "PA2")
6971{
7072}
7173
r20540r20541
8587
8688UINT8 c64_4tba_device::c64_pb_r(address_space &space, offs_t offset)
8789{
88   return ioport("PB")->read();
90   return m_pb->read();
8991}
9092
9193
r20540r20541
9597
9698int c64_4tba_device::c64_pa2_r()
9799{
98   return BIT(ioport("PA2")->read(), 0);
100   return BIT(m_pa2->read(), 0);
99101}
100102
101103
trunk/src/mess/machine/c64_4tba.h
r20540r20541
4545   virtual UINT8 c64_pb_r(address_space &space, offs_t offset);
4646   virtual int c64_pa2_r();
4747   virtual void c64_cnt1_w(int level);
48
49private:
50   required_ioport m_pb;
51   required_ioport m_pa2;
4852};
4953
5054
trunk/src/mess/machine/c64_sfx_sound_expander.c
r20540r20541
216216   device_t(mconfig, C64_SFX_SOUND_EXPANDER, "C64 SFX Sound Expander cartridge", tag, owner, clock),
217217   device_c64_expansion_card_interface(mconfig, *this),
218218   m_opl(*this, YM3526_TAG),
219   m_exp(*this, C64_EXPANSION_SLOT_TAG)
219   m_exp(*this, C64_EXPANSION_SLOT_TAG),
220   m_kb0(*this, "KB0"),
221   m_kb1(*this, "KB1"),
222   m_kb2(*this, "KB2"),
223   m_kb3(*this, "KB3"),
224   m_kb4(*this, "KB4"),
225   m_kb5(*this, "KB5"),
226   m_kb6(*this, "KB6"),
227   m_kb7(*this, "KB7")
220228{
221229}
222230
r20540r20541
253261      {
254262         switch (offset & 0x07)
255263         {
256         case 0: data = ioport("KB0")->read(); break;
257         case 1: data = ioport("KB1")->read(); break;
258         case 2: data = ioport("KB2")->read(); break;
259         case 3: data = ioport("KB3")->read(); break;
260         case 4: data = ioport("KB4")->read(); break;
261         case 5: data = ioport("KB5")->read(); break;
262         case 6: data = ioport("KB6")->read(); break;
263         case 7: data = ioport("KB7")->read(); break;
264         case 0: data = m_kb0->read(); break;
265         case 1: data = m_kb1->read(); break;
266         case 2: data = m_kb2->read(); break;
267         case 3: data = m_kb3->read(); break;
268         case 4: data = m_kb4->read(); break;
269         case 5: data = m_kb5->read(); break;
270         case 6: data = m_kb6->read(); break;
271         case 7: data = m_kb7->read(); break;
264272         }
265273      }
266274      else if (BIT(offset, 5))
trunk/src/mess/machine/c64_sfx_sound_expander.h
r20540r20541
5959private:
6060   required_device<ym3526_device> m_opl;
6161   required_device<c64_expansion_slot_device> m_exp;
62   required_ioport m_kb0;
63   required_ioport m_kb1;
64   required_ioport m_kb2;
65   required_ioport m_kb3;
66   required_ioport m_kb4;
67   required_ioport m_kb5;
68   required_ioport m_kb6;
69   required_ioport m_kb7;
6270};
6371
6472
trunk/src/mess/machine/c64_4cga.c
r20540r20541
6565c64_4cga_device::c64_4cga_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
6666   device_t(mconfig, C64_4CGA, "C64 Protovision 4 Player Interface", tag, owner, clock),
6767   device_c64_user_port_interface(mconfig, *this),
68   m_fire(*this, "FIRE"),
69   m_joy3(*this, "JOY3"),
70   m_joy4(*this, "JOY4"),
6871   m_port(0)
6972{
7073}
r20540r20541
8790
8891UINT8 c64_4cga_device::c64_pb_r(address_space &space, offs_t offset)
8992{
90   UINT8 data = ioport("FIRE")->read();
93   UINT8 data = m_fire->read();
9194
9295   if (m_port)
9396   {
94      data &= ioport("JOY3")->read();
97      data &= m_joy3->read();
9598   }
9699   else
97100   {
98      data &= ioport("JOY4")->read();
101      data &= m_joy4->read();
99102   }
100103
101104   return data;
trunk/src/mess/machine/c64_4cga.h
r20540r20541
4444   virtual void c64_pb_w(address_space &space, offs_t offset, UINT8 data);
4545
4646private:
47   required_ioport m_fire;
48   required_ioport m_joy3;
49   required_ioport m_joy4;
50
4751   int m_port;
4852};
4953
trunk/src/mess/machine/c64_4ksa.c
r20540r20541
6565
6666c64_4ksa_device::c64_4ksa_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
6767   device_t(mconfig, C64_4KSA, "C64 Kingsoft 4-Player Adapter", tag, owner, clock),
68   device_c64_user_port_interface(mconfig, *this)
68   device_c64_user_port_interface(mconfig, *this),
69   m_pb(*this, "PB"),
70   m_pa2(*this, "PA2")
6971{
7072}
7173
r20540r20541
8587
8688UINT8 c64_4ksa_device::c64_pb_r(address_space &space, offs_t offset)
8789{
88   return ioport("PB")->read();
90   return m_pb->read();
8991}
9092
9193
r20540r20541
9597
9698int c64_4ksa_device::c64_pa2_r()
9799{
98   return BIT(ioport("PA2")->read(), 0);
100   return BIT(m_pa2->read(), 0);
99101}
100102
101103
trunk/src/mess/machine/c64_4ksa.h
r20540r20541
4545   virtual UINT8 c64_pb_r(address_space &space, offs_t offset);
4646   virtual int c64_pa2_r();
4747   virtual void c64_cnt1_w(int level);
48
49private:
50   required_ioport m_pb;
51   required_ioport m_pa2;
4852};
4953
5054
trunk/src/mess/machine/c64_4dxh.c
r20540r20541
6565
6666c64_4dxh_device::c64_4dxh_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
6767   device_t(mconfig, C64_4DXH, "C64 DXH 4-Player Adapter", tag, owner, clock),
68   device_c64_user_port_interface(mconfig, *this)
68   device_c64_user_port_interface(mconfig, *this),
69   m_pb(*this, "PB"),
70   m_pa2(*this, "PA2")
6971{
7072}
7173
r20540r20541
8587
8688UINT8 c64_4dxh_device::c64_pb_r(address_space &space, offs_t offset)
8789{
88   return ioport("PB")->read();
90   return m_pb->read();
8991}
9092
9193
r20540r20541
9597
9698int c64_4dxh_device::c64_pa2_r()
9799{
98   return BIT(ioport("PA2")->read(), 0);
100   return BIT(m_pa2->read(), 0);
99101}
100102
101103
trunk/src/mess/machine/c64_4dxh.h
r20540r20541
4545   virtual UINT8 c64_pb_r(address_space &space, offs_t offset);
4646   virtual int c64_pa2_r();
4747   virtual void c64_cnt1_w(int level);
48
49private:
50   required_ioport m_pb;
51   required_ioport m_pa2;
4852};
4953
5054
trunk/src/mess/machine/pc1512kb.c
r20540r20541
260260pc1512_keyboard_device::pc1512_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
261261   : device_t(mconfig, PC1512_KEYBOARD, "Amstrad PC1512 Keyboard", tag, owner, clock),
262262      m_maincpu(*this, I8048_TAG),
263      m_y1(*this, "Y1"),
264      m_y2(*this, "Y2"),
265      m_y3(*this, "Y3"),
266      m_y4(*this, "Y4"),
267      m_y5(*this, "Y5"),
268      m_y6(*this, "Y6"),
269      m_y7(*this, "Y7"),
270      m_y8(*this, "Y8"),
271      m_y9(*this, "Y9"),
272      m_y10(*this, "Y10"),
273      m_y11(*this, "Y11"),
274      m_com(*this, "COM"),
263275      m_data_in(1),
264276      m_clock_in(1),
265277      m_kb_y(0xffff),
r20540r20541
391403
392404   UINT8 data = 0xff;
393405
394   if (!BIT(m_kb_y, 0)) data &= ioport("Y1")->read();
395   if (!BIT(m_kb_y, 1)) data &= ioport("Y2")->read();
396   if (!BIT(m_kb_y, 2)) data &= ioport("Y3")->read();
397   if (!BIT(m_kb_y, 3)) data &= ioport("Y4")->read();
398   if (!BIT(m_kb_y, 4)) data &= ioport("Y5")->read();
399   if (!BIT(m_kb_y, 5)) data &= ioport("Y6")->read();
400   if (!BIT(m_kb_y, 6)) data &= ioport("Y7")->read();
401   if (!BIT(m_kb_y, 7)) data &= ioport("Y8")->read();
402   if (!BIT(m_kb_y, 8)) data &= ioport("Y9")->read();
403   if (!BIT(m_kb_y, 9)) data &= ioport("Y10")->read();
404   if (!BIT(m_kb_y, 10)) data &= ioport("Y11")->read();
405   if (!m_joy_com) data &= ioport("COM")->read();
406   if (!BIT(m_kb_y, 0)) data &= m_y1->read();
407   if (!BIT(m_kb_y, 1)) data &= m_y2->read();
408   if (!BIT(m_kb_y, 2)) data &= m_y3->read();
409   if (!BIT(m_kb_y, 3)) data &= m_y4->read();
410   if (!BIT(m_kb_y, 4)) data &= m_y5->read();
411   if (!BIT(m_kb_y, 5)) data &= m_y6->read();
412   if (!BIT(m_kb_y, 6)) data &= m_y7->read();
413   if (!BIT(m_kb_y, 7)) data &= m_y8->read();
414   if (!BIT(m_kb_y, 8)) data &= m_y9->read();
415   if (!BIT(m_kb_y, 9)) data &= m_y10->read();
416   if (!BIT(m_kb_y, 10)) data &= m_y11->read();
417   if (!m_joy_com) data &= m_com->read();
406418
407419   return data;
408420}
trunk/src/mess/machine/pc1512kb.h
r20540r20541
9191   devcb_resolved_write_line   m_out_clock_func;
9292
9393   required_device<cpu_device> m_maincpu;
94   required_ioport m_y1;
95   required_ioport m_y2;
96   required_ioport m_y3;
97   required_ioport m_y4;
98   required_ioport m_y5;
99   required_ioport m_y6;
100   required_ioport m_y7;
101   required_ioport m_y8;
102   required_ioport m_y9;
103   required_ioport m_y10;
104   required_ioport m_y11;
105   required_ioport m_com;
94106
95107   int m_data_in;
96108   int m_clock_in;
trunk/src/mess/machine/comx_joy.c
r20540r20541
6969
7070comx_joy_device::comx_joy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
7171   device_t(mconfig, COMX_JOY, "COMX JoyCard", tag, owner, clock),
72   device_comx_expansion_card_interface(mconfig, *this)
72   device_comx_expansion_card_interface(mconfig, *this),
73   m_joy1(*this, "JOY1"),
74   m_joy2(*this, "JOY2")
7375{
7476}
7577
r20540r20541
102104
103105   if (offset == 2)
104106   {
105      data = ioport("JOY1")->read();
107      data = m_joy1->read();
106108   }
107109   else if (offset == 4)
108110   {
109      data = ioport("JOY2")->read();
111      data = m_joy2->read();
110112   }
111113
112114   return data;
trunk/src/mess/machine/comx_joy.h
r20540r20541
4242
4343   // device_comx_expansion_card_interface overrides
4444   virtual UINT8 comx_io_r(address_space &space, offs_t offset);
45
46private:
47   required_ioport m_joy1;
48   required_ioport m_joy2;
4549};
4650
4751
trunk/src/mess/includes/pc1512.h
r20540r20541
5757         m_floppy0(*this, PC_FDC_XT_TAG ":0:525dd" ),
5858         m_floppy1(*this, PC_FDC_XT_TAG ":1:525dd" ),
5959         m_bus(*this, ISA_BUS_TAG),
60         m_char_rom(*this, AMS40041_TAG),
6061         m_video_ram(*this, "video_ram"),
62          m_lk(*this, "LK"),
6163         m_pit1(0),
6264         m_pit2(0),
6365         m_status1(0),
r20540r20541
9395   required_device<floppy_image_device> m_floppy0;
9496   optional_device<floppy_image_device> m_floppy1;
9597   required_device<isa8_device> m_bus;
98   optional_memory_region m_char_rom;
9699   optional_shared_ptr<UINT8> m_video_ram;
100   required_ioport m_lk;
97101
98102   virtual void machine_start();
99103   virtual void machine_reset();
r20540r20541
196200   UINT8 m_printer_control;
197201
198202   // video state
199   const UINT8 *m_char_rom;
200203   int m_toggle;
201204   int m_lpen;
202205   int m_blink;
r20540r20541
210213
211214   // sound state
212215   int m_speaker_drive;
213   UINT32 screen_update_pc1512(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
214216};
215217
216218class pc1640_state : public pc1512_state
r20540r20541
218220public:
219221   pc1640_state(const machine_config &mconfig, device_type type, const char *tag)
220222      : pc1512_state(mconfig, type, tag),
221         m_opt(0)
223        m_sw(*this, "SW"),
224        m_opt(0)
222225   { }
223226
224227   virtual void machine_start();
r20540r20541
236239   DECLARE_READ8_MEMBER( printer_r );
237240   DECLARE_READ8_MEMBER( io_unmapped_r );
238241
242   required_ioport m_sw;
243
239244   // video state
240245   int m_opt;
241246   UINT8 m_egc_ctrl;
trunk/src/mess/video/pecom.c
r20540r20541
7474   // every other PRD triggers a DMAOUT request
7575   if (m_dma)
7676   {
77      machine().device(CDP1802_TAG)->execute().set_input_line(COSMAC_INPUT_LINE_DMAOUT, HOLD_LINE);
77      m_cdp1802->set_input_line(COSMAC_INPUT_LINE_DMAOUT, HOLD_LINE);
7878   }
7979
8080   m_dma = !m_dma;
trunk/src/mess/video/pc1512.c
r20540r20541
390390
391391offs_t pc1512_state::get_char_rom_offset()
392392{
393   return ((ioport("LK")->read() >> 5) & 0x03) << 11;
393   return ((m_lk->read() >> 5) & 0x03) << 11;
394394}
395395
396396void pc1512_state::draw_alpha(bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT16 ma, UINT8 ra, UINT16 y, UINT8 x_count, INT8 cursor_x, void *param)
r20540r20541
421421      }
422422
423423      offs_t addr = char_rom_offset | (code << 3) | (ra & 0x07);
424      UINT8 data = m_char_rom[addr & 0x1fff];
424      UINT8 data = m_char_rom->base()[addr & 0x1fff];
425425
426426      if ((column == cursor_x) && m_cursor)
427427      {
r20540r20541
548548
549549void pc1512_state::video_start()
550550{
551   // find memory regions
552   m_char_rom = memregion(AMS40041_TAG)->base();
553
554551   // allocate memory
555552   m_video_ram.allocate(0x10000);
556553}
trunk/src/mess/video/pc1640.c
r20540r20541
128128      */
129129
130130      // switch sense
131      data |= BIT(ioport("SW")->read(), ((m_egc_ctrl >> 2) & 0x03) ^ 0x03);
131      data |= BIT(m_sw->read(), ((m_egc_ctrl >> 2) & 0x03) ^ 0x03);
132132      break;
133133
134134   case 0x15: // Sequencer Data Register
r20540r20541
364364
365365
366366//-------------------------------------------------
367//  VIDEO_START( pc1640 )
367//  VIDEO_START( pc1640 )s
368368//-------------------------------------------------
369369
370370void pc1640_state::video_start()
r20540r20541
380380
381381UINT32 pc1640_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
382382{
383   return false;
383   return 0;
384384}
385385
386386
trunk/src/mess/drivers/tmc600.c
r20540r20541
206206
207207READ_LINE_MEMBER( tmc600_state::ef3_r )
208208{
209   UINT8 keydata[8] = { m_y0->read(), m_y1->read(), m_y2->read(), m_y3->read(),
210                   m_y4->read(), m_y5->read(), m_y6->read(), m_y7->read() };
209   ioport_port* portnames[8] = { m_y0, m_y1, m_y2, m_y3, m_y4, m_y5, m_y6, m_y7 };
211210
212   UINT8 data = ~keydata[m_keylatch / 8];
211   UINT8 data = ~portnames[m_keylatch / 8]->read();
213212
214213   return BIT(data, m_keylatch % 8);
215214}
trunk/src/mess/drivers/pc1512.c
r20540r20541
319319
320320      */
321321
322      data |= ioport("LK")->read() & 0x07;
322      data |= m_lk->read() & 0x07;
323323
324324      data |= m_centronics->fault_r() << 3;
325325      data |= m_centronics->vcc_r() << 4;
r20540r20541
404404      */
405405      data = m_printer_control;
406406      data |= m_opt << 5;
407      data |= (ioport("SW")->read() & 0x60) << 1;
407      data |= (m_sw->read() & 0x60) << 1;
408408      break;
409409
410410   default:
r20540r20541
489489   }
490490   else if (!BIT(offset, 7))
491491   {
492      UINT16 sw = ioport("SW")->read();
492      UINT16 sw = m_sw->read();
493493
494494      if (!BIT(offset, 14))
495495      {
r20540r20541
10841084FLOPPY_FORMATS_END
10851085
10861086static SLOT_INTERFACE_START( ibmpc_floppies )
1087      SLOT_INTERFACE( "525dd", FLOPPY_525_DD )
1087   SLOT_INTERFACE( "525dd", FLOPPY_525_DD )
10881088SLOT_INTERFACE_END
10891089
10901090
trunk/src/mess/drivers/pecom.c
r20540r20541
4949
5050INPUT_CHANGED_MEMBER(pecom_state::ef_w)
5151{
52   machine().device(CDP1802_TAG)->execute().set_input_line((int)(FPTR)param, newval);
52   m_cdp1802->set_input_line((int)(FPTR)param, newval);
5353}
5454
5555static INPUT_PORTS_START( pecom )
r20540r20541
198198
199199/* ROM definition */
200200ROM_START( pecom64 )
201      ROM_REGION( 0x10000, CDP1802_TAG, ROMREGION_ERASEFF )
202      ROM_SYSTEM_BIOS(0, "ver4", "version 4")
203      ROMX_LOAD( "pecom64-1.bin", 0x8000, 0x4000, CRC(9a433b47) SHA1(dadb8c399e0a25a2693e10e42a2d7fc2ea9ad427), ROM_BIOS(1) )
204      ROMX_LOAD( "pecom64-2.bin", 0xc000, 0x4000, CRC(2116cadc) SHA1(03f11055cd221d438a40a41874af8fba0fa116d9), ROM_BIOS(1) )
205      ROM_SYSTEM_BIOS(1, "ver1", "version 1")
206      ROMX_LOAD( "170887-rom1.bin", 0x8000, 0x4000, CRC(43710fb4) SHA1(f84f75061c9ac3e34af93141ecabd3c955881aa2), ROM_BIOS(2) )
207      ROMX_LOAD( "170887-rom2.bin", 0xc000, 0x4000, CRC(d0d34f08) SHA1(7baab17d1e68771b8dcef97d0fffc655beabef28), ROM_BIOS(2) )
201   ROM_REGION( 0x10000, CDP1802_TAG, ROMREGION_ERASEFF )
202   ROM_SYSTEM_BIOS(0, "ver4", "version 4")
203   ROMX_LOAD( "pecom64-1.bin", 0x8000, 0x4000, CRC(9a433b47) SHA1(dadb8c399e0a25a2693e10e42a2d7fc2ea9ad427), ROM_BIOS(1) )
204   ROMX_LOAD( "pecom64-2.bin", 0xc000, 0x4000, CRC(2116cadc) SHA1(03f11055cd221d438a40a41874af8fba0fa116d9), ROM_BIOS(1) )
205   ROM_SYSTEM_BIOS(1, "ver1", "version 1")
206   ROMX_LOAD( "170887-rom1.bin", 0x8000, 0x4000, CRC(43710fb4) SHA1(f84f75061c9ac3e34af93141ecabd3c955881aa2), ROM_BIOS(2) )
207   ROMX_LOAD( "170887-rom2.bin", 0xc000, 0x4000, CRC(d0d34f08) SHA1(7baab17d1e68771b8dcef97d0fffc655beabef28), ROM_BIOS(2) )
208208ROM_END
209209
210210/* Driver */

Previous 199869 Revisions Next


© 1997-2024 The MAME Team