Previous 15994 Revisions Next

r14280 Tuesday 31st January, 2012 at 08:40:26 UTC by Miodrag Milanović
Source cleanup (nw)
[src/mess/drivers]a7000.c abc1600.c apf.c bullet.c chesstrv.c fmtowns.c ibmpc.c kyocera.c next.c osbexec.c pasopia.c pc1512.c pcfx.c rm380z.c sage2.c sm1800.c tiki100.c vic20.c wangpc.c x1twin.c
[src/mess/includes]atarist.h bullet.h c64.h gamecom.h gb.h gba.h lynx.h next.h osborne1.h pc1512.h pokemini.h radio86.h rm380z.h sage2.h samcoupe.h vic20.h wangpc.h wswan.h zx.h
[src/mess/machine]aim65.c c64user.h ecb_grip.c ecbbus.h isa.c isa.h isa_finalchs.c isa_ide.c isa_ide.h isa_mpu401.c isa_sblaster.c lynx.c mb8795.c n82077aa.c n82077aa.h ncr5390.c ncr5390.h nes.c nextkbd.c nextmo.c pc.c rm380z.c upd765.c vic1010.c vic1010.h vic1110.c vic1110.h vic1111.h vic1112.c vic1112.h vic1210.c vic1210.h vic20exp.c vic20exp.h vic20std.c vic20std.h wangpc_lores.c wangpcbus.c wangpckb.c wangpckb.h
[src/mess/machine/ti99]tn_ide.c videowrp.c
[src/mess/video]a7800.c arcadia.c fmtowns.c galaxy.c intv.c isa_vga.h mikromik.c pc8401a.c rm380z.c spectrum.c tms3556.c tms3556.h vic6567.h wswan.c

src/mess/machine/wangpc_lores.c
r14279r14280
3737
3838void wangpc_lores_video_device::crtc_update_row(mc6845_device *device, bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT16 ma, UINT8 ra, UINT16 y, UINT8 x_count, INT8 cursor_x, void *param)
3939{
40/*   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
41   for (int column = 0; column < x_count; column++)
42   {
43      UINT8 code = m_video_ram[((ma + column) & 0x7ff)];
44      UINT16 addr = (code << 3) | (ra & 0x07);
45      UINT8 data = m_char_rom[addr & 0x7ff];
40/*  const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
41    for (int column = 0; column < x_count; column++)
42    {
43        UINT8 code = m_video_ram[((ma + column) & 0x7ff)];
44        UINT16 addr = (code << 3) | (ra & 0x07);
45        UINT8 data = m_char_rom[addr & 0x7ff];
4646
47      if (column == cursor_x)
48      {
49         data = 0xff;
50      }
47        if (column == cursor_x)
48        {
49            data = 0xff;
50        }
5151
52      for (int bit = 0; bit < 8; bit++)
53      {
54         int x = (column * 8) + bit;
55         int color = BIT(data, 7) ? 7 : 0;
52        for (int bit = 0; bit < 8; bit++)
53        {
54            int x = (column * 8) + bit;
55            int color = BIT(data, 7) ? 7 : 0;
5656
57         bitmap.pix32(y, x) = palette[color];
57            bitmap.pix32(y, x) = palette[color];
5858
59         data <<= 1;
60      }
61   }*/
59            data <<= 1;
60        }
61    }*/
6262}
6363
6464static MC6845_UPDATE_ROW( wangpc_lores_video_update_row )
r14279r14280
168168UINT16 wangpc_lores_video_device::wangpcbus_mrdc_r(address_space &space, offs_t offset, UINT16 mem_mask)
169169{
170170   UINT16 data = 0xffff;
171   
171
172172   if (BIT(m_option, 0) && (offset >= 0xe0000/2) && (offset < 0xf0000/2))
173173   {
174174      data = m_video_ram[offset];
175175   }
176   
176
177177   return data;
178178}
179179
r14279r14280
221221         break;
222222      }
223223   }
224   
224
225225   return data;
226226}
227227
r14279r14280
235235   if (sad(offset))
236236   {
237237      logerror("Lores write %04x %04x\n", offset << 1, mem_mask);
238     
238
239239      switch (offset & 0x7f)
240240      {
241241      case 0x00/2:
r14279r14280
256256      case 0x20/2:
257257         m_scroll = data;
258258         break;
259         
259
260260      case 0x70/2:
261261         m_irq3 = CLEAR_LINE;
262262         m_bus->irq3_w(m_irq3);
src/mess/machine/vic20exp.c
r14279r14280
9191       memset(&m_out_nmi_cb, 0, sizeof(m_out_nmi_cb));
9292       memset(&m_out_res_cb, 0, sizeof(m_out_res_cb));
9393   }
94   
94
9595   // set brief and instance name
96   update_names();   
96   update_names();
9797}
9898
9999
r14279r14280
146146      {
147147         size = get_software_region_length("blk1");
148148         if (size) memcpy(m_cart->vic20_blk1_pointer(), get_software_region("blk1"), size);
149         
149
150150         size = get_software_region_length("blk2");
151151         if (size) memcpy(m_cart->vic20_blk2_pointer(), get_software_region("blk2"), size);
152         
152
153153         size = get_software_region_length("blk3");
154154         if (size) memcpy(m_cart->vic20_blk3_pointer(), get_software_region("blk3"), size);
155         
155
156156         size = get_software_region_length("blk5");
157157         if (size) memcpy(m_cart->vic20_blk5_pointer(), get_software_region("blk5"), size);
158158      }
r14279r14280
191191UINT8* vic20_expansion_slot_device::blk1_pointer()
192192{
193193   UINT8 *ptr = NULL;
194   
194
195195   if (m_cart != NULL)
196196   {
197197      ptr = m_cart->vic20_blk1_pointer();
r14279r14280
208208UINT8* vic20_expansion_slot_device::blk2_pointer()
209209{
210210   UINT8 *ptr = NULL;
211   
211
212212   if (m_cart != NULL)
213213   {
214214      ptr = m_cart->vic20_blk2_pointer();
r14279r14280
225225UINT8* vic20_expansion_slot_device::blk3_pointer()
226226{
227227   UINT8 *ptr = NULL;
228   
228
229229   if (m_cart != NULL)
230230   {
231231      ptr = m_cart->vic20_blk3_pointer();
r14279r14280
242242UINT8* vic20_expansion_slot_device::blk5_pointer()
243243{
244244   UINT8 *ptr = NULL;
245   
245
246246   if (m_cart != NULL)
247247   {
248248      ptr = m_cart->vic20_blk5_pointer();
src/mess/machine/vic20exp.h
r14279r14280
207207   virtual UINT32 vic20_screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { return false; }
208208
209209   virtual UINT8* get_cart_base() { return NULL; }
210   
210
211211protected:
212212   vic20_expansion_slot_device *m_slot;
213213};
src/mess/machine/nes.c
r14279r14280
312312         state->m_chr_map[i].origin = i * 0x400; // for save state uses!
313313         state->m_chr_map[i].access = &state->m_vram[state->m_chr_map[i].origin];
314314      }
315   }   
316   
315   }
316
317317   state->m_irq_timer = machine.scheduler().timer_alloc(FUNC(nes_irq_callback));
318318   nes_state_register(machine);
319319}
r14279r14280
13441344         fatalerror("No PRG entry for this software! Please check if the xml list got corrupted");
13451345      if (prg_size < 0x8000)
13461346         fatalerror("PRG entry is too small! Please check if the xml list got corrupted");
1347     
1347
13481348      // Allocate class pointers for PRG/VROM/VRAM/WRAM and copy data there from the temp copies
13491349      state->m_prg = auto_alloc_array(image.device().machine(), UINT8, prg_size);
1350     
1350
13511351      if (chr_size)
13521352         state->m_vrom = auto_alloc_array(image.device().machine(), UINT8, chr_size);
13531353
r14279r14280
16761676DRIVER_INIT( famicom )
16771677{
16781678   nes_state *state = machine.driver_data<nes_state>();
1679   
1679
16801680   /* clear some of the variables we don't use */
16811681   state->m_trainer = 0;
16821682   state->m_battery = 0;
src/mess/machine/nextkbd.c
r14279r14280
101101
102102READ32_MEMBER( nextkbd_device::ctrl_r )
103103{
104   //   logerror("nextkbd: ctrl_r %08x @ %08x\n", control, mem_mask);
104   //  logerror("nextkbd: ctrl_r %08x @ %08x\n", control, mem_mask);
105105   return control;
106106}
107107
r14279r14280
131131   }
132132   if(diff & FLAG_INT)
133133      int_change_cb(control & FLAG_INT);
134   //   logerror("nextkbd: ctrl_w %08x @ %08x\n", data, mem_mask);
134   //  logerror("nextkbd: ctrl_w %08x @ %08x\n", data, mem_mask);
135135}
136136
137137WRITE32_MEMBER( nextkbd_device::ctrl2_w )
138138{
139   //   logerror("nextkbd: ctrl2_w %08x @ %08x\n", data, mem_mask);
139   //  logerror("nextkbd: ctrl2_w %08x @ %08x\n", data, mem_mask);
140140}
141141
142142WRITE32_MEMBER( nextkbd_device::data_w )
src/mess/machine/isa_sblaster.c
r14279r14280
533533void sb8_device::dack_w(int line, UINT8 data)
534534{
535535//    printf("dack_w: line %x data %02x\n", line, data);
536//   if(data != 0x80)
537//      printf("%02x\n",data);
536//  if(data != 0x80)
537//      printf("%02x\n",data);
538538
539539    // set the transfer over timer on the 1st byte
540540    if (m_dsp.dma_transferred == 0)
src/mess/machine/vic1010.c
r14279r14280
109109UINT8 vic1010_device::vic20_ram1_r(address_space &space, offs_t offset)
110110{
111111   UINT8 data = 0;
112   
112
113113   for (int i = 0; i < MAX_SLOTS; i++)
114114   {
115115      data |= m_expansion_slot[i]->ram1_r(space, offset);
116116   }
117   
117
118118   return data;
119119}
120120
r14279r14280
139139UINT8 vic1010_device::vic20_ram2_r(address_space &space, offs_t offset)
140140{
141141   UINT8 data = 0;
142   
142
143143   for (int i = 0; i < MAX_SLOTS; i++)
144144   {
145145      data |= m_expansion_slot[i]->ram2_r(space, offset);
146146   }
147   
147
148148   return data;
149149}
150150
r14279r14280
169169UINT8 vic1010_device::vic20_ram3_r(address_space &space, offs_t offset)
170170{
171171   UINT8 data = 0;
172   
172
173173   for (int i = 0; i < MAX_SLOTS; i++)
174174   {
175175      data |= m_expansion_slot[i]->ram3_r(space, offset);
176176   }
177   
177
178178   return data;
179179}
180180
r14279r14280
199199UINT8 vic1010_device::vic20_blk1_r(address_space &space, offs_t offset)
200200{
201201   UINT8 data = 0;
202   
202
203203   for (int i = 0; i < MAX_SLOTS; i++)
204204   {
205205      data |= m_expansion_slot[i]->blk1_r(space, offset);
206206   }
207   
207
208208   return data;
209209}
210210
r14279r14280
229229UINT8 vic1010_device::vic20_blk2_r(address_space &space, offs_t offset)
230230{
231231   UINT8 data = 0;
232   
232
233233   for (int i = 0; i < MAX_SLOTS; i++)
234234   {
235235      data |= m_expansion_slot[i]->blk2_r(space, offset);
236236   }
237   
237
238238   return data;
239239}
240240
r14279r14280
259259UINT8 vic1010_device::vic20_blk3_r(address_space &space, offs_t offset)
260260{
261261   UINT8 data = 0;
262   
262
263263   for (int i = 0; i < MAX_SLOTS; i++)
264264   {
265265      data |= m_expansion_slot[i]->blk3_r(space, offset);
266266   }
267   
267
268268   return data;
269269}
270270
r14279r14280
289289UINT8 vic1010_device::vic20_blk5_r(address_space &space, offs_t offset)
290290{
291291   UINT8 data = 0;
292   
292
293293   for (int i = 0; i < MAX_SLOTS; i++)
294294   {
295295      data |= m_expansion_slot[i]->blk5_r(space, offset);
296296   }
297   
297
298298   return data;
299299}
300300
src/mess/machine/vic1010.h
r14279r14280
4040public:
4141    // construction/destruction
4242    vic1010_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
43   
43
4444   // not really public
4545   DECLARE_WRITE_LINE_MEMBER( irq_w );
4646   DECLARE_WRITE_LINE_MEMBER( nmi_w );
r14279r14280
4949protected:
5050    // device-level overrides
5151    virtual void device_start();
52   
52
5353   // optional information overrides
5454   virtual machine_config_constructor device_mconfig_additions() const;
5555
r14279r14280
6868   virtual void vic20_blk3_w(address_space &space, offs_t offset, UINT8 data);
6969   virtual UINT8 vic20_blk5_r(address_space &space, offs_t offset);
7070   virtual void vic20_blk5_w(address_space &space, offs_t offset, UINT8 data);
71   
71
7272private:
7373   vic20_expansion_slot_device *m_expansion_slot[MAX_SLOTS];
7474};
src/mess/machine/pc.c
r14279r14280
10951095   mess_init_pc_common(machine, PCCOMMON_KEYBOARD_PC, pc_set_keyb_int, pc_set_irq_line);
10961096
10971097   pc_vga_init(machine, input_port_0_r, NULL);
1098   pc_vga_io_init(machine, machine.device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine.device("maincpu")->memory().space(AS_IO), 0x0000);   
1098   pc_vga_io_init(machine, machine.device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine.device("maincpu")->memory().space(AS_IO), 0x0000);
10991099}
11001100
11011101static IRQ_CALLBACK(pc_irq_callback)
src/mess/machine/vic1110.c
r14279r14280
4545   PORT_DIPSETTING(    BLK5, "$A000-B3FFF" )
4646INPUT_PORTS_END
4747
48   
48
4949//-------------------------------------------------
5050//  input_ports - device-specific input ports
5151//-------------------------------------------------
r14279r14280
9191UINT8 vic1110_device::vic20_blk1_r(address_space &space, offs_t offset)
9292{
9393   UINT8 data = 0;
94   
94
9595   if (input_port_read(*this, "SW") == BLK1)
9696   {
9797      data = m_ram[offset & 0x1fff];
9898   }
99   
99
100100   return data;
101101}
102102
r14279r14280
121121UINT8 vic1110_device::vic20_blk2_r(address_space &space, offs_t offset)
122122{
123123   UINT8 data = 0;
124   
124
125125   if (input_port_read(*this, "SW") == BLK2)
126126   {
127127      data = m_ram[offset & 0x1fff];
128128   }
129   
129
130130   return data;
131131}
132132
r14279r14280
151151UINT8 vic1110_device::vic20_blk3_r(address_space &space, offs_t offset)
152152{
153153   UINT8 data = 0;
154   
154
155155   if (input_port_read(*this, "SW") == BLK3)
156156   {
157157      data = m_ram[offset & 0x1fff];
158158   }
159   
159
160160   return data;
161161}
162162
r14279r14280
181181UINT8 vic1110_device::vic20_blk5_r(address_space &space, offs_t offset)
182182{
183183   UINT8 data = 0;
184   
184
185185   if (input_port_read(*this, "SW") == BLK5)
186186   {
187187      data = m_ram[offset & 0x1fff];
188188   }
189   
189
190190   return data;
191191}
192192
src/mess/machine/vic1110.h
r14279r14280
3434
3535   // optional information overrides
3636   virtual ioport_constructor device_input_ports() const;
37   
37
3838protected:
3939    // device-level overrides
4040    virtual void device_start();
41   
41
4242   // device_vic20_expansion_card_interface overrides
4343   virtual UINT8 vic20_blk1_r(address_space &space, offs_t offset);
4444   virtual void vic20_blk1_w(address_space &space, offs_t offset, UINT8 data);
src/mess/machine/mb8795.c
r14279r14280
7070
7171   set_promisc(true);
7272
73   start_send();   
73   start_send();
7474}
7575
7676void mb8795_device::recv_cb(UINT8 *buf, int len)
r14279r14280
8787
8888READ8_MEMBER(mb8795_device::txstat_r)
8989{
90   //   fprintf(stderr, "mb8795: txstat_r %02x (%08x)\n", txstat, cpu_get_pc(&space.device()));
90   //  fprintf(stderr, "mb8795: txstat_r %02x (%08x)\n", txstat, cpu_get_pc(&space.device()));
9191   return txstat;
9292}
9393
r14279r14280
208208   drq_tx = false;
209209   if(!drq_tx_cb.isnull())
210210      drq_tx_cb(drq_tx);
211   
211
212212   if(eof) {
213213      fprintf(stderr, "mb8795: send packet, dest=%02x.%02x.%02x.%02x.%02x.%02x len=%04x\n",
214214            txbuf[0], txbuf[1], txbuf[2], txbuf[3], txbuf[4], txbuf[5],
r14279r14280
283283bool mb8795_device::recv_is_broadcast()
284284{
285285   return
286      rxbuf[0] == 0xff &&
287      rxbuf[1] == 0xff &&
288      rxbuf[2] == 0xff &&
289      rxbuf[3] == 0xff &&
290      rxbuf[4] == 0xff &&
286      rxbuf[0] == 0xff &&
287      rxbuf[1] == 0xff &&
288      rxbuf[2] == 0xff &&
289      rxbuf[3] == 0xff &&
290      rxbuf[4] == 0xff &&
291291      rxbuf[5] == 0xff;
292292}
293293
r14279r14280
305305bool mb8795_device::recv_is_local_multicast()
306306{
307307   return
308      (rxbuf[0] & 0x01) &&
308      (rxbuf[0] & 0x01) &&
309309      (rxbuf[0] & 0xfe) == mac[0] &&
310310      rxbuf[1] == mac[1] &&
311311      rxbuf[2] == mac[2];
src/mess/machine/upd765.c
r14279r14280
693693READ_LINE_DEVICE_HANDLER( upd765_int_r )
694694{
695695   upd765_t *fdc = get_safe_token(device);
696   
696
697697   return (fdc->upd765_flags & UPD765_INT) ? 1 : 0;
698698}
699699
700700READ_LINE_DEVICE_HANDLER( upd765_drq_r )
701701{
702702   upd765_t *fdc = get_safe_token(device);
703   
703
704704   return (fdc->upd765_flags & UPD765_DMA_DRQ) ? 1 : 0;
705705}
706706
src/mess/machine/wangpckb.c
r14279r14280
2727 
2828    CPU         - Intel P8051AH "20-8051-225"
2929    PSG         - Texas Instruments SN76496N
30   XR          - Exar Semiconductor XR22-908-03B? (hard to read)
30    XR          - Exar Semiconductor XR22-908-03B? (hard to read)
3131    CN1         - 1x6 pin PCB header
3232    SW1         - 8-way DIP switch
3333    SW2         - 8-way DIP switch
r14279r14280
391391   int bit = get_in_data_bit();
392392   receive_register_update_bit(bit);
393393   /*
394   if (start bit)
395   {
396      m_maincpu->set_input_line(MCS51_RX_LINE, ASSERT_LINE);
397   }
398   */
394    if (start bit)
395    {
396        m_maincpu->set_input_line(MCS51_RX_LINE, ASSERT_LINE);
397    }
398    */
399399   if (is_receive_register_full())
400400   {
401401      receive_register_extract();
402402   }
403   
403
404404   // transmit
405405   if (!is_transmit_register_empty())
406406   {
r14279r14280
426426int wangpc_keyboard_device::mcs51_rx_callback(device_t *device)
427427{
428428   wangpc_keyboard_device *kb = static_cast<wangpc_keyboard_device *>(device->owner());
429   
429
430430   return kb->get_received_char();
431431}
432432 
r14279r14280
438438void wangpc_keyboard_device::mcs51_tx_callback(device_t *device, int data)
439439{
440440   wangpc_keyboard_device *kb = static_cast<wangpc_keyboard_device *>(device->owner());
441   
441
442442   kb->transmit_register_setup(data);
443443}
444444 
r14279r14280
482482WRITE8_MEMBER( wangpc_keyboard_device::kb_p2_w )
483483{
484484   /*
485   
486      bit      description
487       
488      P2.0   row 0
489      P2.1   row 1
490      P2.2   row 2
491      P2.3   row 3
492      P2.4
493      P2.5
494      P2.6   chip enable for something
495      P2.7
496485 
497   */
486        bit     description
498487 
488        P2.0    row 0
489        P2.1    row 1
490        P2.2    row 2
491        P2.3    row 3
492        P2.4
493        P2.5
494        P2.6    chip enable for something
495        P2.7
496 
497    */
498 
499499   m_y = data;
500500}
501501 
r14279r14280
507507WRITE8_MEMBER( wangpc_keyboard_device::kb_p3_w )
508508{
509509   /*
510   
511      bit      description
512       
513      P3.0   
514      P3.1   
515      P3.2
516      P3.3   chip enable for something
517      P3.4
518      P3.5
519      P3.6
520      P3.7
521510 
522   */
511        bit     description
512 
513        P3.0
514        P3.1
515        P3.2
516        P3.3    chip enable for something
517        P3.4
518        P3.5
519        P3.6
520        P3.7
521 
522    */
523523}
src/mess/machine/isa_ide.c
r14279r14280
9999//-------------------------------------------------
100100
101101void isa16_ide_device::device_reset()
102{   
102{
103103   m_is_primary = (input_port_read(*this, "DSW") & 1) ? false : true;
104   if (m_is_primary) {   
104   if (m_is_primary) {
105105      m_isa->install16_device(subdevice("ide"), 0x01f0, 0x01f7, 0, 0, FUNC(ide16_r), FUNC(ide16_w) );
106106   } else {
107107      m_isa->install16_device(subdevice("ide"), 0x0170, 0x0177, 0, 0, FUNC(ide16_r), FUNC(ide16_w) );
src/mess/machine/wangpckb.h
r14279r14280
5959   virtual const rom_entry *device_rom_region() const;
6060   virtual machine_config_constructor device_mconfig_additions() const;
6161   virtual ioport_constructor device_input_ports() const;
62   
62
6363   // not really public
6464   DECLARE_READ8_MEMBER( kb_p1_r );
6565   DECLARE_WRITE8_MEMBER( kb_p2_w );
6666   DECLARE_WRITE8_MEMBER( kb_p3_w );
67   
67
6868   static int mcs51_rx_callback(device_t *device);
6969   static void mcs51_tx_callback(device_t *device, int data);
70   
70
7171protected:
7272    // device-level overrides
7373   virtual void device_config_complete() { m_shortname = "wangpckb"; }
7474    virtual void device_start();
7575   virtual void device_reset();
7676   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
77   
77
7878   // device_serial_interface overrides
7979   virtual void input_callback(UINT8 state);
8080 
8181private:
8282   required_device<cpu_device> m_maincpu;
83   
83
8484   UINT8 m_y;
8585};
8686 
src/mess/machine/isa_ide.h
r14279r14280
2222
2323      // optional information overrides
2424      virtual machine_config_constructor device_mconfig_additions() const;
25      virtual ioport_constructor device_input_ports() const;     
26     
25      virtual ioport_constructor device_input_ports() const;
26
2727      bool is_primary() { return m_is_primary; }
2828protected:
2929        // device-level overrides
src/mess/machine/rm380z.c
r14279r14280
3434   switch ( offset )
3535   {
3636   case 0xFC:      // PORT0
37      //printf("FBFCw[%2.2x] FBFD [%2.2x] FBFE [%2.2x] PC [%4.4x] writenum [%4.4x]\n",data,m_fbfd,m_fbfe,cpu_get_pc(machine().device("maincpu")),writenum);
37      //printf("FBFCw[%2.2x] FBFD [%2.2x] FBFE [%2.2x] PC [%4.4x] writenum [%4.4x]\n",data,m_fbfd,m_fbfe,cpu_get_pc(machine().device("maincpu")),writenum);
3838      m_port0 = data;
3939      if (data&0x01)
4040      {
r14279r14280
4848      break;
4949
5050   case 0xFD:      // screen line counter (?)
51      //printf("FBFC [%2.2x] FBFDw[%2.2x] FBFE [%2.2x] PC [%4.4x] writenum [%4.4x]\n",m_port0,data,m_fbfe,cpu_get_pc(machine().device("maincpu")),writenum);
52     
51      //printf("FBFC [%2.2x] FBFDw[%2.2x] FBFE [%2.2x] PC [%4.4x] writenum [%4.4x]\n",m_port0,data,m_fbfe,cpu_get_pc(machine().device("maincpu")),writenum);
52
5353      m_old_old_fbfd=m_old_fbfd;
5454      m_old_fbfd=m_fbfd;
5555      m_fbfd=data;
r14279r14280
5757      writenum++;
5858
5959      check_scroll_register();
60     
60
6161      break;
6262
6363   case 0xFE:      // line on screen to write to divided by 2
64      //printf("FBFC [%2.2x] FBFD [%2.2x] FBFEw[%2.2x] PC [%4.4x] writenum [%4.4x]\n",m_port0,m_fbfd,data,cpu_get_pc(machine().device("maincpu")),writenum);
64      //printf("FBFC [%2.2x] FBFD [%2.2x] FBFEw[%2.2x] PC [%4.4x] writenum [%4.4x]\n",m_port0,m_fbfd,data,cpu_get_pc(machine().device("maincpu")),writenum);
6565      m_fbfe=data;
6666      break;
6767
r14279r14280
6969      //printf("write of [%x] to FBFF\n",data);
7070      //logerror("%s: Write %02X to user I/O port\n", machine().describe_context(), data );
7171      break;
72     
72
7373   default:
7474      printf("unknown port [%2.2x] write of [%2.2x]\n",offset,data);
7575   }
r14279r14280
102102   case 0xFF:      // user port
103103      //printf("%s: Read from user port\n", machine().describe_context());
104104      break;
105     
105
106106   default:
107107      printf("read from unknown port [%2.2x]\n",offset);
108108   }
r14279r14280
183183   }
184184
185185   // line blanking
186   if ((state->m_rasterlineCtr%LINE_SUBDIVISION)>80)
186   if ((state->m_rasterlineCtr%LINE_SUBDIVISION)>80)
187187   {
188188      state->m_port1|=0x80;
189189   }
r14279r14280
270270   memset(m_vramattribs,0,RM380Z_SCREENSIZE);
271271   memset(m_vramchars,0,RM380Z_SCREENSIZE);
272272   memset(m_vram,0,RM380Z_SCREENSIZE);
273   
273
274274   config_memory_map();
275275   machine().scheduler().timer_pulse(attotime::from_hz(TIMER_SPEED), FUNC(static_vblank_timer));
276276   wd17xx_reset(machine().device("wd1771"));
src/mess/machine/ti99/videowrp.c
r14279r14280
245245   video->cpu = device->machine().device("maincpu");
246246   video->space = device->machine().device("maincpu")->memory().space(AS_PROGRAM);
247247   video->chip = conf->chip;
248   
248
249249   if (video->chip == TI_V9938)
250250   {
251251      astring temp(device->tag(), "_v9938");
r14279r14280
263263   const ti99_video_config* conf = (const ti99_video_config*)get_config(device);
264264   if (conf->chip!=TI_TMS991X)
265265   {
266//      running_machine &machine = device->machine();
267//      int memsize = (input_port_read(machine, "V9938-MEM")==0)? 0x20000 : 0x30000;
266//      running_machine &machine = device->machine();
267//      int memsize = (input_port_read(machine, "V9938-MEM")==0)? 0x20000 : 0x30000;
268268//
269//      v9938_init(machine, 0, *machine.primary_screen, machine.primary_screen->default_bitmap(),
270//         MODEL_V9938, memsize, conf->callback);
271//      v9938_reset(0);
269//      v9938_init(machine, 0, *machine.primary_screen, machine.primary_screen->default_bitmap(),
270//          MODEL_V9938, memsize, conf->callback);
271//      v9938_reset(0);
272272   }
273273}
274274
src/mess/machine/ti99/tn_ide.c
r14279r14280
391391MACHINE_CONFIG_FRAGMENT( tn_ide )
392392   MCFG_RTC65271_ADD( "ide_rtc", clock_interrupt_callback )
393393   MCFG_IDE_CONTROLLER_ADD( "ide", ide_interrupt_callback )
394   MCFG_IDE_CONTROLLER_REGIONS(":peribox:idehd0:drive", NULL)   
394   MCFG_IDE_CONTROLLER_REGIONS(":peribox:idehd0:drive", NULL)
395395MACHINE_CONFIG_END
396396
397397static const char DEVTEMPLATE_SOURCE[] = __FILE__;
src/mess/machine/vic1111.h
r14279r14280
3535protected:
3636    // device-level overrides
3737    virtual void device_start();
38   
38
3939   // device_vic20_expansion_card_interface overrides
4040   virtual UINT8 vic20_blk1_r(address_space &space, offs_t offset);
4141   virtual void vic20_blk1_w(address_space &space, offs_t offset, UINT8 data);
src/mess/machine/ecbbus.h
r14279r14280
115115
116116   DECLARE_WRITE_LINE_MEMBER( int_w );
117117   DECLARE_WRITE_LINE_MEMBER( nmi_w );
118   
118
119119   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
120120
121121protected:
src/mess/machine/aim65.c
r14279r14280
170170WRITE8_MEMBER( aim65_state::aim65_pb_w )
171171{
172172/*
173   d7 = cass out (both decks)
174   d5 = cass2 motor
175   d4 = cass1 motor
176   d2 = tty out (not emulated)
177   d0/1 = printer data (not emulated)
173    d7 = cass out (both decks)
174    d5 = cass2 motor
175    d4 = cass1 motor
176    d2 = tty out (not emulated)
177    d0/1 = printer data (not emulated)
178178*/
179179
180180   UINT8 bits = data ^ m_pb_save;
r14279r14280
207207READ8_MEMBER( aim65_state::aim65_pb_r )
208208{
209209/*
210   d7 = cassette in (deck 1)
211   d6 = tty in (not emulated)
212   d3 = kb/tty switch
210    d7 = cassette in (deck 1)
211    d6 = tty in (not emulated)
212    d3 = kb/tty switch
213213*/
214214
215215   UINT8 data = input_port_read(machine(), "switches");
r14279r14280
260260
261261/* Part of aim65_pb_w
262262
263   data &= 0x03;
263    data &= 0x03;
264264
265   if (m_flag_b == 0)
266   {
267      printerRAM[(m_printer_y * 20) + m_printer_x ] |= (data << 8);
268      m_flag_b = 1;
269   }
265    if (m_flag_b == 0)
266    {
267        printerRAM[(m_printer_y * 20) + m_printer_x ] |= (data << 8);
268        m_flag_b = 1;
269    }
270270*/
271271
272272
273273/* Items for driver state
274274
275   emu_timer *m_print_timer;
276   int m_printer_x;
277   int m_printer_y;
278   bool m_printer_dir;
279   bool m_flag_a;
280   bool m_flag_b;
281   bool m_printer_level;
282   UINT16 *m_printerRAM;
275    emu_timer *m_print_timer;
276    int m_printer_x;
277    int m_printer_y;
278    bool m_printer_dir;
279    bool m_flag_a;
280    bool m_flag_b;
281    bool m_printer_level;
282    UINT16 *m_printerRAM;
283283*/
284284
285285
r14279r14280
296296
297297
298298/* From Machine Config
299   MCFG_VIDEO_START(aim65)
300   MCFG_VIDEO_UPDATE(aim65)
299    MCFG_VIDEO_START(aim65)
300    MCFG_VIDEO_UPDATE(aim65)
301301*/
302302
303303
src/mess/machine/vic1210.c
r14279r14280
11/**********************************************************************
22
33    Commodore VIC-1210 3K RAM Expansion Cartridge emulation
4   Commodore VIC-1211A Super Expander with 3K RAM Cartridge emulation
4    Commodore VIC-1211A Super Expander with 3K RAM Cartridge emulation
55
66    Copyright MESS Team.
77    Visit http://mamedev.org for licensing and usage restrictions.
src/mess/machine/vic1112.c
r14279r14280
8181
8282        bit     description
8383
84        PB0     
85        PB1     
86        PB2     
84        PB0
85        PB1
86        PB2
8787        PB3     _EOI
8888        PB4     _DAV IN
8989        PB5     _NRFD IN
r14279r14280
112112        PB0     _DAV OUT
113113        PB1     _NRFD OUT
114114        PB2     _NDAC OUT
115        PB3     
116        PB4     
117        PB5     
118        PB6     
119        PB7     
115        PB3
116        PB4
117        PB5
118        PB6
119        PB7
120120
121121    */
122122
r14279r14280
226226{
227227   // find memory regions
228228   m_rom = subregion("blk5")->base();
229   
229
230230   // state saving
231231   save_item(NAME(m_via0_irq));
232232   save_item(NAME(m_via1_irq));
r14279r14280
251251UINT8 vic1112_device::vic20_io2_r(address_space &space, offs_t offset)
252252{
253253   UINT8 data = 0;
254   
254
255255   if (offset & 0x10)
256256   {
257257      data = m_via1->read(space, offset & 0x0f);
r14279r14280
260260   {
261261      data = m_via0->read(space, offset & 0x0f);
262262   }
263   
263
264264   return data;
265265}
266266
r14279r14280
289289UINT8 vic1112_device::vic20_blk5_r(address_space &space, offs_t offset)
290290{
291291   UINT8 data = 0;
292   
292
293293   if (offset & 0x1000)
294294   {
295295      data = m_rom[offset & 0x7ff];
296296   }
297   
297
298298   return data;
299299}
src/mess/machine/vic1210.h
r14279r14280
11/**********************************************************************
22
33    Commodore VIC-1210 3K RAM Expansion Cartridge emulation
4   Commodore VIC-1211A Super Expander with 3K RAM Cartridge emulation
4    Commodore VIC-1211A Super Expander with 3K RAM Cartridge emulation
55
66    Copyright MESS Team.
77    Visit http://mamedev.org for licensing and usage restrictions.
r14279r14280
3333    // construction/destruction
3434   vic1210_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock);
3535    vic1210_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
36   
36
3737protected:
3838    // device-level overrides
3939    virtual void device_start();
40   
40
4141   // device_vic20_expansion_card_interface overrides
4242   virtual UINT8 vic20_ram1_r(address_space &space, offs_t offset);
4343   virtual void vic20_ram1_w(address_space &space, offs_t offset, UINT8 data);
r14279r14280
6565
6666   // optional information overrides
6767   virtual const rom_entry *device_rom_region() const;
68   
68
6969   // device_vic20_expansion_card_interface overrides
7070   virtual UINT8 vic20_blk5_r(address_space &space, offs_t offset);
7171
src/mess/machine/vic1112.h
r14279r14280
4747   DECLARE_READ8_MEMBER( via0_pb_r );
4848   DECLARE_WRITE8_MEMBER( via0_pb_w );
4949   DECLARE_WRITE_LINE_MEMBER( via1_irq_w );
50   
50
5151protected:
5252    // device-level overrides
5353    virtual void device_start();
5454   virtual void device_reset();
5555    virtual void device_config_complete() { m_shortname = "vic1112"; }
56   
56
5757   // device_vic20_expansion_card_interface overrides
5858   virtual UINT8 vic20_io2_r(address_space &space, offs_t offset);
5959   virtual void vic20_io2_w(address_space &space, offs_t offset, UINT8 data);
src/mess/machine/ncr5390.c
r14279r14280
108108   default:
109109      logerror("ncr5390: device_timer unexpected param %d\n", param);
110110      exit(0);
111   }   
111   }
112112}
113113
114114void ncr5390_device::delay(int cycles, int param)
src/mess/machine/n82077aa.c
r14279r14280
119119         if(fi.dev && (diff & (0x10 << i)))
120120            fi.dev->mon_w(!(dor & (0x10 << i)));
121121      }
122           
122
123123}
124124
125125READ8_MEMBER(n82077aa_device::tdr_r)
r14279r14280
154154      if(flopi[i].main_state == RECALIBRATE)
155155         msr |= 1<<i;
156156
157   //   fprintf(stderr, "msr_r %02x (%08x)\n", msr, cpu_get_pc(&space.device()));
157   //  fprintf(stderr, "msr_r %02x (%08x)\n", msr, cpu_get_pc(&space.device()));
158158   return msr;
159159}
160160
r14279r14280
177177      break;
178178   default:
179179      fprintf(stderr, "fifo_r in phase %d\n", main_phase);
180      //      exit(1);
180      //      exit(1);
181181   }
182182
183183   fprintf(stderr, "fifo_r %02x (%08x)\n", r, cpu_get_pc(&space.device()));
r14279r14280
195195         break;
196196      if(cmd == C_INVALID) {
197197         fprintf(stderr, "Invalid on %02x\n", command[0]);
198         //         exit(1);
198         //          exit(1);
199199         command_pos = 0;
200200         return;
201201      }
r14279r14280
282282   cur_live.data_bit_context = false;
283283   cur_live.byte_counter = 0;
284284   cur_live.pll.reset(cur_live.tm);
285   //   cur_live.pll.set_clock(attotime::from_hz(rates[dsr & 3]*2));
285   //  cur_live.pll.set_clock(attotime::from_hz(rates[dsr & 3]*2));
286286   cur_live.pll.set_clock(attotime::from_hz(rates[dsr & 3]));
287287   checkpoint_live = cur_live;
288288   fi.live = true;
r14279r14280
336336
337337void n82077aa_device::live_abort()
338338{
339     
339
340340   if(!cur_live.tm.is_never() && cur_live.tm > machine().time()) {
341341      rollback();
342342      live_run(machine().time());
r14279r14280
515515      }
516516
517517      case SEARCH_ADDRESS_MARK_DATA_FAILED:
518         //         status |= S_RNF;
518         //          status |= S_RNF;
519519         cur_live.state = IDLE;
520520         return;
521521
r14279r14280
542542      }
543543
544544      case READ_SECTOR_DATA_BYTE:
545         //         fprintf(stderr, "databyte = %02x\n", cur_live.data_reg);
545         //          fprintf(stderr, "databyte = %02x\n", cur_live.data_reg);
546546         fifo_push(cur_live.data_reg);
547547         cur_live.state = READ_SECTOR_DATA;
548548         checkpoint();
r14279r14280
594594      return C_SENSE_INTERRUPT_STATUS;
595595
596596   case 0x0f:
597     
597
598598   case 0x12:
599599      return command_pos == 2 ? C_PERPENDICULAR : C_INCOMPLETE;
600600
r14279r14280
727727            command_end(fi, 0);
728728            return;
729729         }
730         fi.sub_state = SEEK_MOVE;         
730         fi.sub_state = SEEK_MOVE;
731731         break;
732732      }
733733      }
r14279r14280
738738{
739739   fi.main_state = READ_DATA;
740740   fi.sub_state = HEAD_LOAD_DONE;
741   
741
742742   fprintf(stderr, "Read data%s%s%s\n",
743743         command[0] & 0x80 ? " mt" : "",
744744         command[0] & 0x40 ? " mfm" : "",
r14279r14280
964964            cur_live.idbuf[0], cur_live.idbuf[1], cur_live.idbuf[2], cur_live.idbuf[3],
965965            command[2], command[3], command[4], command[5]);
966966   return
967      cur_live.idbuf[0] == command[2] &&
968      cur_live.idbuf[1] == command[3] &&
969      cur_live.idbuf[2] == command[4] &&
967      cur_live.idbuf[0] == command[2] &&
968      cur_live.idbuf[1] == command[3] &&
969      cur_live.idbuf[2] == command[4] &&
970970      cur_live.idbuf[3] == command[5];
971971}
972972
src/mess/machine/ncr5390.h
r14279r14280
1414   ncr5390_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
1515   void set_cb(line_cb_t irq_cb, line_cb_t drq_cb);
1616   void set_slots(const SCSIConfigTable &slots);
17   
17
1818   DECLARE_ADDRESS_MAP(map, 8);
1919
2020   DECLARE_READ8_MEMBER(tcount_lo_r);
src/mess/machine/nextmo.c
r14279r14280
8989      sector_pos = 0;
9090      if(!drq_cb.isnull())
9191         drq_cb(true);
92   }     
92   }
9393}
9494
9595UINT8 nextmo_device::dma_r()
src/mess/machine/n82077aa.h
r14279r14280
7979      SEARCH_ADDRESS_MARK_DATA_FAILED,
8080      READ_SECTOR_DATA,
8181      READ_SECTOR_DATA_BYTE,
82     
82
8383   };
8484
8585   struct pll_t {
src/mess/machine/isa_mpu401.c
r14279r14280
11/***************************************************************************
22
3   MPU-401 MIDI device interface
3    MPU-401 MIDI device interface
44
5   TODO:
6   - skeleton, doesn't do anything
5    TODO:
6    - skeleton, doesn't do anything
77
88***************************************************************************/
99
src/mess/machine/vic20std.c
r14279r14280
5050UINT8 vic20_standard_cartridge_device::vic20_blk1_r(address_space &space, offs_t offset)
5151{
5252   UINT8 data = 0;
53   
53
5454   if (m_blk1 != NULL)
5555   {
5656      data = m_blk1[offset & 0x1fff];
5757   }
58   
58
5959   return data;
6060}
6161
r14279r14280
6767UINT8 vic20_standard_cartridge_device::vic20_blk2_r(address_space &space, offs_t offset)
6868{
6969   UINT8 data = 0;
70   
70
7171   if (m_blk2 != NULL)
7272   {
7373      data = m_blk2[offset & 0x1fff];
7474   }
75   
75
7676   return data;
7777}
7878
r14279r14280
8484UINT8 vic20_standard_cartridge_device::vic20_blk3_r(address_space &space, offs_t offset)
8585{
8686   UINT8 data = 0;
87   
87
8888   if (m_blk3 != NULL)
8989   {
9090      data = m_blk3[offset & 0x1fff];
9191   }
92   
92
9393   return data;
9494}
9595
r14279r14280
101101UINT8 vic20_standard_cartridge_device::vic20_blk5_r(address_space &space, offs_t offset)
102102{
103103   UINT8 data = 0;
104   
104
105105   if (m_blk5 != NULL)
106106   {
107107      data = m_blk5[offset & 0x1fff];
108108   }
109   
109
110110   return data;
111111}
112112
r14279r14280
121121   {
122122      m_blk1 = auto_alloc_array(machine(), UINT8, 0x2000);
123123   }
124   
124
125125   return m_blk1;
126126}
127127
r14279r14280
136136   {
137137      m_blk2 = auto_alloc_array(machine(), UINT8, 0x2000);
138138   }
139   
139
140140   return m_blk2;
141141}
142142
r14279r14280
151151   {
152152      m_blk3 = auto_alloc_array(machine(), UINT8, 0x2000);
153153   }
154   
154
155155   return m_blk3;
156156}
157157
r14279r14280
166166   {
167167      m_blk5 = auto_alloc_array(machine(), UINT8, 0x2000);
168168   }
169   
169
170170   return m_blk5;
171171}
src/mess/machine/c64user.h
r14279r14280
138138
139139   // reset
140140   virtual void c64_reset_w(int level) { };
141   
141
142142protected:
143143   c64_user_port_device *m_slot;
144144};
src/mess/machine/vic20std.h
r14279r14280
3131public:
3232    // construction/destruction
3333    vic20_standard_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
34   
34
3535protected:
3636    // device-level overrides
3737    virtual void device_start();
38   
38
3939   // device_vic20_expansion_card_interface overrides
4040   virtual UINT8 vic20_blk1_r(address_space &space, offs_t offset);
4141   virtual UINT8 vic20_blk2_r(address_space &space, offs_t offset);
src/mess/machine/lynx.c
r14279r14280
701701   lynx_blit_8color_rle_line,
702702   lynx_blit_16color_rle_line
703703   };
704   
704
705705   int i; int colors;
706706
707707   state->m_blitter.memory_accesses = 0;
r14279r14280
709709
710710   // these might be never set by the state->m_blitter hardware
711711   state->m_sprite_collide  = 0;
712   
712
713713   //state->m_blitter.busy = 1; // blitter working (there's a bug somewhere that's causing slowdown when this is enabled)
714714
715715   // Last SCB is indicated by zero in the high byte of SCBNEXT
r14279r14280
800800         lynx_blit_lines(state);
801801      }
802802   }
803   
803
804804   if (0) // turned off for now as it cuases slowdown in some games due to a bug somewhere
805805   {
806806      if (state->m_blitter.memory_accesses != 0)
r14279r14280
13161316   UINT16 j; // clipping needed!
13171317   UINT8 byte;
13181318   UINT16 *line;
1319   
1320   
1321   // calculate y: first three lines are vblank, 
1319
1320
1321   // calculate y: first three lines are vblank,
13221322   y = 101-state->m_timer[2].counter;
13231323   // Documentation states lower two bits of buffer address are ignored (thus 0xfffc mask)
13241324   j = (state->m_mikey.disp_addr & 0xfffc) + y * 160 / 2;
r14279r14280
14271427      }
14281428      lynx_timer_count_down( machine, 2 );
14291429      break;
1430   case 2:   
1430   case 2:
14311431      copybitmap(state->m_bitmap, state->m_bitmap_temp, 0, 0, 0, 0, machine.primary_screen->cliprect());
14321432      lynx_timer_count_down( machine, 4 );
14331433      break;
r14279r14280
15541554{
15551555   //logerror("timer %d write %x %.2x\n", which, offset, data);
15561556   attotime t;
1557   
1557
15581558   if ( state->m_timer[which].timer_active && ((state->m_timer[which].cntrl1 & 0x07) != 0x07))
15591559   {
15601560      state->m_timer[which].counter = (UINT8) (state->m_timer[which].timer->remaining().as_ticks(1000000>>(state->m_timer[which].cntrl1 & 0x07)));
r14279r14280
19401940*/
19411941
19421942   lynx_uart_reset(state);
1943   
1943
19441944   // hack to allow current object loading to work
19451945#if 0
19461946   lynx_timer_write( state, 0, 0, 160 ); // set backup value (hpos) = 160
r14279r14280
19591959{
19601960   lynx_state *state = machine.driver_data<lynx_state>();
19611961   state->m_bitmap_temp.allocate(160,102,0,0);
1962   
1962
19631963   int i;
19641964   state->save_item(NAME(state->m_memory_config));
19651965   state->save_pointer(NAME(state->m_mem_fe00), state->m_mem_fe00_size);
src/mess/machine/isa.c
r14279r14280
290290         } else {
291291            // we handle just misalligned by 2
292292            m_maincpu->memory().space(AS_IO)->install_readwrite_handler(start-2, end, mask, mirror, rhandler, whandler, 0xffff0000);
293         }     
293         }
294294         break;
295295      default:
296296         fatalerror("ISA8: Bus width %d not supported", buswidth);
src/mess/machine/isa.h
r14279r14280
158158   void install_bank(offs_t start, offs_t end, offs_t mask, offs_t mirror, const char *tag, UINT8 *data);
159159   void install_rom(device_t *dev, offs_t start, offs_t end, offs_t mask, offs_t mirror, const char *tag, const char *region);
160160   void install_memory(offs_t start, offs_t end, offs_t mask, offs_t mirror, read8_space_func rhandler, const char* rhandler_name, write8_space_func whandler, const char *whandler_name);
161   
161
162162   void unmap_bank(offs_t start, offs_t end, offs_t mask, offs_t mirror);
163163   void unmap_rom(offs_t start, offs_t end, offs_t mask, offs_t mirror);
164164
src/mess/machine/wangpcbus.c
r14279r14280
144144void wangpcbus_device::add_wangpcbus_card(device_wangpcbus_card_interface *card, int sid)
145145{
146146   m_device_list.append(*card);
147   
147
148148   card->m_bus = this;
149149   card->m_sid = sid;
150150}
r14279r14280
242242{
243243   UINT8 retVal = 0xff;
244244   device_wangpcbus_card_interface *entry = m_device_list.first();
245   
245
246246   while (entry)
247247   {
248      if (entry->wangpcbus_have_dack(line))
248      if (entry->wangpcbus_have_dack(line))
249249      {
250250         retVal = entry->wangpcbus_dack_r(line);
251251         break;
252252      }
253     
253
254254      entry = entry->next();
255255   }
256   
256
257257   return retVal;
258258}
259259 
r14279r14280
265265void wangpcbus_device::dack_w(int line,UINT8 data)
266266{
267267   device_wangpcbus_card_interface *entry = m_device_list.first();
268   
268
269269   while (entry)
270270   {
271271      if (entry->wangpcbus_have_dack(line))
272272      {
273273         entry->wangpcbus_dack_w(line,data);
274274      }
275     
275
276276      entry = entry->next();
277277   }
278278}
r14279r14280
285285void wangpcbus_device::tc_w(int state)
286286{
287287   device_wangpcbus_card_interface *entry = m_device_list.first();
288   
288
289289   while (entry)
290290   {
291291      entry->wangpcbus_tc_w(state);
src/mess/machine/ecb_grip.c
r14279r14280
249249static MC6845_UPDATE_ROW( grip5_update_row )
250250{
251251    grip5_state *state = device->machine().driver_data<grip5_state>();
252   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
252    const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
253253    int column, bit;
254254
255255    for (column = 0; column < x_count; column++)
src/mess/machine/isa_finalchs.c
r14279r14280
11/***************************************************************************
22
3   Final Chess Card by TASC
3    Final Chess Card by TASC
44
5   TODO:
6   - skeleton, just boots the CPU
5    TODO:
6    - skeleton, just boots the CPU
77
88***************************************************************************/
99
src/mess/video/wswan.c
r14279r14280
610610{
611611   machine().primary_screen->register_screen_bitmap(m_bitmap);
612612}
613   
613
614614UINT32 wswan_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
615615{
616616   copybitmap(bitmap, m_bitmap, 0, 0, 0, 0, cliprect);
src/mess/video/pc8401a.c
r14279r14280
2121
2222UINT32 pc8500_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
2323{
24//   m_lcdc->screen_update(screen, bitmap, cliprect);
24//  m_lcdc->screen_update(screen, bitmap, cliprect);
2525
2626   /*
2727    if (strcmp(screen.tag(), SCREEN_TAG) == 0)
src/mess/video/rm380z.c
r14279r14280
1818{
1919   int mx=3;
2020   if (y==6) mx=4;
21   
21
2222   for (int r=y;r<(y+mx);r++)
2323   {
2424      for (int c=x;c<(x+3);c++)
r14279r14280
3333   for (int c=0;c<0x3f;c++)
3434   {
3535      if (c&0x01) put_point(c,0,0,1);
36      else             put_point(c,0,0,0);
36      else            put_point(c,0,0,0);
3737
3838      if (c&0x02) put_point(c,3,0,1);
39      else             put_point(c,3,0,0);
39      else            put_point(c,3,0,0);
4040
4141      if (c&0x04) put_point(c,0,3,1);
42      else             put_point(c,0,3,0);
42      else            put_point(c,0,3,0);
4343
4444      if (c&0x08) put_point(c,3,3,1);
45      else             put_point(c,3,3,0);
45      else            put_point(c,3,3,0);
4646
4747      if (c&0x10) put_point(c,0,6,1);
48      else             put_point(c,0,6,0);
48      else            put_point(c,0,6,0);
4949
5050      if (c&0x20) put_point(c,3,6,1);
51      else             put_point(c,3,6,0);
51      else            put_point(c,3,6,0);
5252   }
5353}
5454
r14279r14280
5959      // 80 cols
6060      m_videomode=RM380Z_VIDEOMODE_80COL;
6161   }
62   else
62   else
6363   {
6464      // 40 cols
6565      m_videomode=RM380Z_VIDEOMODE_40COL;
r14279r14280
8383{
8484   UINT8 ch1=m_vramchars[pos];
8585   UINT8 ch2=m_vramattribs[pos];
86   
86
8787   // "special" (unknown) cases first
8888   if ((ch1==0x80)&&(ch2==0x04))
8989   {
r14279r14280
147147      {
148148         int sourceaddr=(row*lineWidth)+c;
149149         int destaddr=((row-1)*lineWidth)+c;
150         
150
151151         state->m_vram[destaddr]=state->m_vram[sourceaddr];
152152         state->m_vramchars[destaddr]=state->m_vramchars[sourceaddr];
153153         state->m_vramattribs[destaddr]=state->m_vramattribs[sourceaddr];
154154      }
155155   }
156   
156
157157   // the last line is filled with spaces
158158
159159   for (int c=0;c<lineWidth;c++)
r14279r14280
161161      state->m_vram[((RM380Z_SCREENROWS-1)*lineWidth)+c]=0x20;
162162      state->m_vramchars[((RM380Z_SCREENROWS-1)*lineWidth)+c]=0x20;
163163      state->m_vramattribs[((RM380Z_SCREENROWS-1)*lineWidth)+c]=0x00;
164   }   
164   }
165165}
166166
167167void rm380z_state::check_scroll_register()
168168{
169169   UINT8 r[3];
170   
170
171171   r[0]=m_old_old_fbfd;
172172   r[1]=m_old_fbfd;
173173   r[2]=m_fbfd;
r14279r14280
175175   if ( ((r[1]&0x20)==0) && ((r[2]&0x20)==0) )
176176   {
177177      // it's a scroll command
178     
178
179179      if (r[2]>r[1])
180180      {
181181         scroll_videoram();
r14279r14280
185185         // wrap-scroll
186186         scroll_videoram();
187187      }
188     
188
189189   }
190190}
191191
r14279r14280
202202   rm380z_state *state = machine().driver_data<rm380z_state>();
203203
204204   //printf("vramw [%2.2x][%2.2x] port0 [%2.2x] fbfd [%2.2x] fbfe [%2.2x] PC [%4.4x]\n",offset,data,state->m_port0,m_fbfd,m_fbfe,cpu_get_pc(machine().device("maincpu")));
205   
205
206206   int lineWidth=0x80;
207207   if (m_videomode==RM380Z_VIDEOMODE_40COL)
208208   {
209209      lineWidth=0x40;
210210   }
211   
211
212212   int rowadder=(m_fbfe&0x0f)*2;
213213   if (m_videomode==RM380Z_VIDEOMODE_40COL) rowadder=0; // FBFE register is not used in VDU-40
214214
r14279r14280
243243   //bool attrDim=false;
244244   bool attrRev=false;
245245   bool attrUnder=false;
246   
246
247247   if (attribs&0x02) attrUnder=true;
248248   //if (attribs&0x04) attrDim=true;
249249   if (attribs&0x08) attrRev=true;
250   
250
251251   if ((charnum>0)&&(charnum<=0x7f))
252252   {
253253      // normal chars (base set)
r14279r14280
256256      {
257257         int basex=RM380Z_CHDIMX*(charnum/RM380Z_NCY);
258258         int basey=RM380Z_CHDIMY*(charnum%RM380Z_NCY);
259         
259
260260         for (int r=0;r<RM380Z_CHDIMY;r++)
261261         {
262262            for (int c=0;c<RM380Z_CHDIMX;c++)
263263            {
264264               UINT8 chval=(chsb[((basey+r)*(RM380Z_CHDIMX*RM380Z_NCX))+(basex+c)])==0xff?0:1;
265               
265
266266               if (attrRev)
267267               {
268268                  if (chval==0) chval=1;
269269                  else chval=0;
270270               }
271               
272               if (attrUnder)
271
272               if (attrUnder)
273273               {
274274                  if (r==(RM380Z_CHDIMY-1))
275275                  {
r14279r14280
282282               *dest=chval;
283283            }
284284         }
285         
285
286286         // last pixel of underline
287         if (attrUnder&&(!attrRev))
287         if (attrUnder&&(!attrRev))
288288         {
289289            UINT16 *dest=&bitmap.pix16((y*(RM380Z_CHDIMY+1))+(RM380Z_CHDIMY-1),(x*(RM380Z_CHDIMX+1))+RM380Z_CHDIMX);
290290            *dest=attrRev?0:1;
291291         }
292         
292
293293         // if reversed, print another column of pixels on the right
294294         if (attrRev)
295295         {
r14279r14280
304304      {
305305         int basex=RM380Z_CHDIMX*(charnum/RM380Z_NCY);
306306         int basey=RM380Z_CHDIMY*(charnum%RM380Z_NCY);
307         
307
308308         for (int r=0;r<RM380Z_CHDIMY;r++)
309309         {
310310            for (int c=0;c<(RM380Z_CHDIMX*2);c+=2)
311311            {
312312               UINT8 chval=(chsb[((basey+r)*(RM380Z_CHDIMX*RM380Z_NCX))+(basex+(c/2))])==0xff?0:1;
313                 
313
314314               if (attrRev)
315315               {
316316                  if (chval==0) chval=1;
317317                  else chval=0;
318318               }
319319
320               if (attrUnder)
320               if (attrUnder)
321321               {
322322                  if (r==(RM380Z_CHDIMY-1))
323323                  {
r14279r14280
328328
329329               UINT16 *dest=&bitmap.pix16( (y*(RM380Z_CHDIMY+1))+r,((x*(RM380Z_CHDIMX+1))*2)+c);
330330               UINT16 *dest2=&bitmap.pix16( (y*(RM380Z_CHDIMY+1))+r,((x*(RM380Z_CHDIMX+1))*2)+c+1);
331               *dest=chval;
331               *dest=chval;
332332               *dest2=chval;
333333            }
334334         }
335335
336336         // last 2 pixels of underline
337         if (attrUnder)
337         if (attrUnder)
338338         {
339339            UINT16 *dest=&bitmap.pix16( (y*(RM380Z_CHDIMY+1))+RM380Z_CHDIMY-1 , ((x*(RM380Z_CHDIMX+1))*2)+(RM380Z_CHDIMX*2));
340340            UINT16 *dest2=&bitmap.pix16( (y*(RM380Z_CHDIMY+1))+RM380Z_CHDIMY-1 , ((x*(RM380Z_CHDIMX+1))*2)+(RM380Z_CHDIMX*2)+1);
341            *dest=attrRev?0:1;
341            *dest=attrRev?0:1;
342342            *dest2=attrRev?0:1;
343343         }
344     
344
345345         // if reversed, print another 2 columns of pixels on the right
346346         if (attrRev)
347347         {
r14279r14280
349349            {
350350               UINT16 *dest=&bitmap.pix16( (y*(RM380Z_CHDIMY+1))+r,((x*(RM380Z_CHDIMX+1))*2)+((RM380Z_CHDIMX)*2));
351351               UINT16 *dest2=&bitmap.pix16( (y*(RM380Z_CHDIMY+1))+r,((x*(RM380Z_CHDIMX+1))*2)+((RM380Z_CHDIMX)*2)+1);
352               *dest=1;
352               *dest=1;
353353               *dest2=1;
354354            }
355355         }
r14279r14280
391391
392392   int lineWidth=0x80;
393393   int ncols=80;
394   
394
395395   if (m_videomode==RM380Z_VIDEOMODE_40COL)
396396   {
397397      lineWidth=0x40;
r14279r14280
407407      {
408408         UINT8 curch,attribs;
409409         decode_videoram_char((row*lineWidth)+col,curch,attribs);
410         putChar(curch,attribs,col,row,bitmap,pChar,m_videomode);         
411         //putChar(0x44,0x00,10,10,bitmap,pChar,m_videomode);         
410         putChar(curch,attribs,col,row,bitmap,pChar,m_videomode);
411         //putChar(0x44,0x00,10,10,bitmap,pChar,m_videomode);
412412      }
413413   }
414414}
src/mess/video/arcadia.c
r14279r14280
498498         {
499499            case 0xc0: graphics=TRUE;break;
500500            case 0x40: graphics=FALSE;break;
501//        case 0x80:
502//        alien invaders shields are empty 0x80
503//           popmessage(5, "graphics code 0x80 used");
501//        case 0x80:
502//        alien invaders shields are empty 0x80
503//            popmessage(5, "graphics code 0x80 used");
504504         }
505505      }
506506      if (graphics)
src/mess/video/spectrum.c
r14279r14280
7676      }
7777
7878      /* Empty event buffer for undisplayed frames noting the last border
79          colour (in case colours are not changed in the next frame). */
79           colour (in case colours are not changed in the next frame). */
8080      NumItems = spectrum_EventList_NumEvents(screen.machine());
8181      if (NumItems)
8282      {
src/mess/video/mikromik.c
r14279r14280
100100{
101101   // find memory regions
102102   m_char_rom = machine().region("chargen")->base();
103   
103
104104   machine().primary_screen->register_screen_bitmap(m_bitmap);
105105}
106106
src/mess/video/fmtowns.c
r14279r14280
265265         else
266266            return 0x00;
267267      case 0x06:
268//         if(m_video.towns_vblank_flag != 0)
269//            return 0x10;
270//         else
271//            return 0x00;
268//          if(m_video.towns_vblank_flag != 0)
269//              return 0x10;
270//          else
271//              return 0x00;
272272      case 0x16:  // Kanji character data
273273         return ROM[(m_video.towns_kanji_offset << 1) + 0x180000];
274274      case 0x17:  // Kanji character data
src/mess/video/a7800.c
r14279r14280
7474   state->m_maria_bcntl = 0;
7575   state->m_maria_kangaroo = 0;
7676   state->m_maria_rm = 0;
77   
77
7878   machine.primary_screen->register_screen_bitmap(state->m_bitmap);
7979}
8080
src/mess/video/intv.c
r14279r14280
4040   //int i,j,k;
4141
4242   state->m_tms9927_num_rows = 25;
43   
43
4444   machine.primary_screen->register_screen_bitmap(state->m_bitmap);
4545
4646#if 0
src/mess/video/isa_vga.h
r14279r14280
1919public:
2020        // construction/destruction
2121        isa8_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
22     
22
2323      // optional information overrides
2424      virtual machine_config_constructor device_mconfig_additions() const;
2525      virtual const rom_entry *device_rom_region() const;
src/mess/video/vic6567.h
r14279r14280
3535   devcb_read8         in_button_cb;
3636
3737   devcb_read8         in_dma_read_cb;
38   devcb_read8          in_dma_read_color_cb;
38   devcb_read8       in_dma_read_color_cb;
3939   devcb_write_line   out_irq_cb;
4040
4141   devcb_read8         in_rdy_cb;
src/mess/video/tms3556.c
r14279r14280
115115   save_item(NAME(m_cg_flag));
116116   save_item(NAME(m_char_line_counter));
117117   save_item(NAME(m_dbl_h_phase));
118   
118
119119   machine().primary_screen->register_screen_bitmap(m_bitmap);
120120}
121121
src/mess/video/tms3556.h
r14279r14280
5757   DECLARE_WRITE8_MEMBER( reg_w );
5858
5959   void interrupt(running_machine &machine);
60   
60
6161   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
6262
6363protected:
src/mess/video/galaxy.c
r14279r14280
117117
118118   state->m_gal_video_timer = machine.scheduler().timer_alloc(FUNC(gal_video));
119119   state->m_gal_video_timer->adjust(attotime::zero, 0, attotime::never);
120   
120
121121   machine.primary_screen->register_screen_bitmap(state->m_bitmap);
122122}
123123
src/mess/includes/gba.h
r14279r14280
138138public:
139139   gba_state(const machine_config &mconfig, device_type type, const char *tag)
140140      : driver_device(mconfig, type, tag) { }
141     
141
142142   virtual void video_start();
143   
143
144144   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
145145
146146   bitmap_ind16 m_bitmap;
src/mess/includes/wswan.h
r14279r14280
129129      : driver_device(mconfig, type, tag),
130130   m_maincpu(*this, "maincpu")
131131   { }
132   
132
133133   virtual void video_start();
134   
134
135135   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
136136
137137   required_device<cpu_device> m_maincpu;
src/mess/includes/zx.h
r14279r14280
2323      : driver_device(mconfig, type, tag) { }
2424
2525   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
26   
26
2727   bitmap_ind16 m_bitmap;
2828
2929   DECLARE_READ8_MEMBER(zx_ram_r);
src/mess/includes/rm380z.h
r14279r14280
7070
7171   int m_rasterlineCtr;
7272   emu_timer* m_vblankTimer;
73   
73
7474   int m_old_fbfd;
7575   int m_old_old_fbfd;
76   
76
7777   int m_videomode;
7878   int m_old_videomode;
79   
79
8080   required_device<cpu_device> m_maincpu;
8181   required_device<ram_device> m_messram;
8282   optional_device<device_t> m_fdc;
src/mess/includes/pc1512.h
r14279r14280
100100   virtual void machine_reset();
101101
102102   virtual void video_start();
103   
103
104104   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
105105
106106   void update_speaker();
src/mess/includes/pokemini.h
r14279r14280
6161   bitmap_ind16 m_bitmap;
6262   virtual void video_start();
6363   virtual void machine_start();
64   
64
6565   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
6666};
6767
src/mess/includes/gb.h
r14279r14280
179179   UINT8 m_mmm01_bank_mask;
180180   gb_lcd_t m_lcd;
181181   void (*update_scanline)( running_machine &machine );
182   
182
183183   bitmap_ind16 m_bitmap;
184184};
185185
src/mess/includes/gamecom.h
r14279r14280
237237   bitmap_ind16 m_bitmap;
238238   void gamecom_set_mmu(UINT8 mmu, UINT8 data);
239239   void handle_stylus_press(int column);
240   
240
241241   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
242242};
243243
src/mess/includes/radio86.h
r14279r14280
1818      : driver_device(mconfig, type, tag) { }
1919
2020   virtual void video_start();
21   
21
2222   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
23   
23
2424   bitmap_ind16 m_bitmap;
2525
2626   UINT8 m_tape_value;
src/mess/includes/next.h
r14279r14280
109109   static const floppy_format_type floppy_formats[];
110110   static const cdrom_interface cdrom_intf;
111111   static const harddisk_interface harddisk_intf;
112   
112
113113protected:
114114   struct dma_slot {
115115      UINT32 start, limit, chain_start, chain_limit, current;
src/mess/includes/vic20.h
r14279r14280
5151   required_device<cassette_image_device> m_cassette;
5252   required_device<ram_device> m_ram;
5353   required_device<timer_device> m_cassette_timer;
54   
54
5555   virtual void machine_start();
5656
5757   DECLARE_READ8_MEMBER( via0_pa_r );
src/mess/includes/lynx.h
r14279r14280
4545   int everon;
4646   int memory_accesses;
4747   attotime time;
48   
48
4949   int no_collide;
5050   int vstretch;
5151   int lefthanded;
src/mess/includes/atarist.h
r14279r14280
101101   void machine_start();
102102
103103   void video_start();
104   
104
105105   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
106106
107107   // video
r14279r14280
271271   emu_timer *m_mouse_timer;
272272   emu_timer *m_glue_timer;
273273   emu_timer *m_shifter_timer;
274   
274
275275   bitmap_rgb32 m_bitmap;
276276
277277   floppy_image_device *floppy_devices[2];
src/mess/includes/wangpc.h
r14279r14280
6363        m_ds1(1),
6464        m_ds2(1)
6565   { }
66   
66
6767   required_device<cpu_device> m_maincpu;
6868   required_device<i8237_device> m_dmac;
6969   required_device<device_t> m_pic;
r14279r14280
8080 
8181   virtual void machine_start();
8282   virtual void machine_reset();
83   
83
8484   void check_level1_interrupts();
8585   void check_level2_interrupts();
8686   void update_fdc_drq();
8787   void update_fdc_tc();
88   
88
8989   DECLARE_WRITE8_MEMBER( fdc_ctrl_w );
9090   DECLARE_READ8_MEMBER( deselect_drive1_r );
9191   DECLARE_WRITE8_MEMBER( deselect_drive1_w );
r14279r14280
124124   DECLARE_READ8_MEMBER( led_off_r );
125125   DECLARE_WRITE8_MEMBER( parity_nmi_clr_w );
126126   DECLARE_READ8_MEMBER( option_id_r );
127   
127
128128   DECLARE_WRITE_LINE_MEMBER( hrq_w );
129129   DECLARE_WRITE_LINE_MEMBER( eop_w );
130130   DECLARE_READ8_MEMBER( memr_r );
r14279r14280
152152   DECLARE_WRITE_LINE_MEMBER( ack_w );
153153   DECLARE_WRITE_LINE_MEMBER( busy_w );
154154   DECLARE_WRITE_LINE_MEMBER( bus_irq2_w );
155   
155
156156   UINT8 m_dma_page[3];
157157   int m_dma_channel;
158   
158
159159   int m_timer2_irq;
160160   int m_ecpi_irq;
161161   int m_acknlg;
r14279r14280
165165   int m_uart_dr;
166166   int m_uart_tbre;
167167   int m_fpu_irq;
168   
168
169169   int m_fdc_tc_enable;
170170   int m_fdc_dma_enable;
171171   int m_fdc_drq;
src/mess/includes/bullet.h
r14279r14280
118118   DECLARE_READ8_MEMBER( hwsts_r );
119119   DECLARE_READ8_MEMBER( scsi_r );
120120   DECLARE_WRITE8_MEMBER( scsi_w );
121   
121
122122   DECLARE_READ8_MEMBER( dma_mreq_r );
123123   DECLARE_WRITE8_MEMBER( dma_mreq_w );
124124   DECLARE_READ8_MEMBER( pio_pa_r );
125125   DECLARE_WRITE8_MEMBER( pio_pa_w );
126126   DECLARE_WRITE_LINE_MEMBER( cstrb_w );
127127   DECLARE_WRITE_LINE_MEMBER( req_w );
128   
128
129129   void update_dma_rdy();
130130
131131   int m_rome;
src/mess/includes/osborne1.h
r14279r14280
3131   m_beep(*this, BEEPER_TAG),
3232   m_ram(*this, RAM_TAG)
3333   { }
34   
34
3535   virtual void video_start();
36   
36
3737   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
3838
3939   bitmap_ind16 m_bitmap;
src/mess/includes/samcoupe.h
r14279r14280
3838         : driver_device(mconfig, type, tag) { }
3939
4040   virtual void video_start();
41   
41
4242   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
43   
43
4444   bitmap_ind16 m_bitmap;
4545
4646   emu_timer *m_video_update_timer;
src/mess/includes/c64.h
r14279r14280
5151   DECLARE_READ8_MEMBER( c64_dma_read_color );
5252   DECLARE_WRITE_LINE_MEMBER( c64_vic_interrupt );
5353   DECLARE_READ8_MEMBER( c64_rdy_cb );
54   
54
5555   int m_old_level;
5656   int m_old_data;
5757   int m_old_exrom;
src/mess/includes/sage2.h
r14279r14280
5959   required_device<ieee488_device> m_ieee488;
6060 
6161   virtual void machine_reset();
62   
62
6363   void update_fdc_int();
6464 
6565   DECLARE_READ8_MEMBER( mmu_r );
r14279r14280
7171   DECLARE_WRITE8_MEMBER( ppi1_pc_w );
7272   DECLARE_WRITE_LINE_MEMBER( fdc_int_w );
7373   DECLARE_WRITE_LINE_MEMBER( ack_w );
74     
74
7575   DECLARE_WRITE8_MEMBER(kbd_put);
76   
76
7777   int m_reset;
7878 
7979   // floppy state
src/mess/drivers/osbexec.c
r14279r14280
4343   required_device<device_t>   m_speaker;
4444
4545   virtual void video_start();
46   
46
4747   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
48   
48
4949   bitmap_ind16 m_bitmap;
5050
5151   memory_region   *m_fontram_region;
src/mess/drivers/rm380z.c
r14279r14280
9494   AM_RANGE(0xc4, 0xc4) AM_WRITE(disk_0_control)
9595   AM_RANGE(0xc5, 0xff) AM_READWRITE(rm380z_porthi_r, rm380z_porthi_w)
9696ADDRESS_MAP_END
97
97
9898static GENERIC_TERMINAL_INTERFACE( terminal_intf )
9999{
100100   DEVCB_DRIVER_MEMBER(rm380z_state, keyboard_put)
101101};
102102
103103INPUT_PORTS_START( rm380z )
104//   PORT_START("additional_chars")
105//   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Escape") PORT_CODE(KEYCODE_ESC) PORT_CODE(KEYCODE_ESC)
104//  PORT_START("additional_chars")
105//  PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Escape") PORT_CODE(KEYCODE_ESC) PORT_CODE(KEYCODE_ESC)
106106INPUT_PORTS_END
107107
108108//
r14279r14280
164164/* ROM definition */
165165ROM_START( rm380z )
166166   ROM_REGION( 0x10000, RM380Z_MAINCPU_TAG, 0 )
167//   ROM_LOAD( "cos34e-m.bin", 0x0000, 0x1000, CRC(20e2ddf4) SHA1(3177b28793d5a348c94fd0ae6393d74e2e9a8662))
167//  ROM_LOAD( "cos34e-m.bin", 0x0000, 0x1000, CRC(20e2ddf4) SHA1(3177b28793d5a348c94fd0ae6393d74e2e9a8662))
168168   // I'm not sure of how those roms have been dumped. I don't know if those are good dumps or not.
169169   ROM_LOAD( "cos40b-m.bin", 0x0000, 0x1000, BAD_DUMP CRC(1f0b3a5c) SHA1(0b29cb2a3b7eaa3770b34f08c4fd42844f42700f))
170170   ROM_LOAD( "cos40b-m_f600-f9ff.bin", 0x1000, 0x400, BAD_DUMP CRC(e3397d9d) SHA1(490a0c834b0da392daf782edc7d51ca8f0668b1a))
src/mess/drivers/pc1512.c
r14279r14280
986986   { DEVCB_DRIVER_LINE_MEMBER(pc1512_state, dack0_w),
987987     DEVCB_DRIVER_LINE_MEMBER(pc1512_state, dack1_w),
988988     DEVCB_DRIVER_LINE_MEMBER(pc1512_state, dack2_w),
989     DEVCB_DRIVER_LINE_MEMBER(pc1512_state, dack3_w) }   
989     DEVCB_DRIVER_LINE_MEMBER(pc1512_state, dack3_w) }
990990};
991991
992992
src/mess/drivers/vic20.c
r14279r14280
212212   PORT_MODIFY( "ROW0" )
213213   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH2)      PORT_CHAR(':') PORT_CHAR('*')
214214   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS)         PORT_CHAR('-')
215   
215
216216   PORT_MODIFY( "ROW1" )
217217   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE)      PORT_CHAR('@')
218   
218
219219   PORT_MODIFY( "ROW2" )
220220   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE)         PORT_CHAR(0x00C4)
221   
221
222222   PORT_MODIFY( "ROW5" )
223223   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH)      PORT_CHAR(';') PORT_CHAR('+')
224224   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COLON)         PORT_CHAR(0x00D6)
225   
225
226226   PORT_MODIFY( "ROW6" )
227227   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE)      PORT_CHAR(0x00C5)
228   
228
229229   PORT_MODIFY( "ROW7" )
230230   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS)         PORT_CHAR('=')
231231INPUT_PORTS_END
r14279r14280
255255        PA6     CASS SWITCH
256256        PA7     SERIAL ATN OUT
257257
258   */
258    */
259259
260260   UINT8 data = 0xfc;
261261
r14279r14280
292292        PA6     CASS SWITCH
293293        PA7     SERIAL ATN OUT
294294
295   */
295    */
296296
297297   // serial attention out
298298   m_iec->atn_w(!BIT(data, 7));
r14279r14280
313313        PB6     USER PORT K
314314        PB7     USER PORT L
315315
316   */
316    */
317317
318318   return 0;
319319}
r14279r14280
333333        PB6     USER PORT K
334334        PB7     USER PORT L
335335
336   */
336    */
337337}
338338
339339WRITE_LINE_MEMBER( vic20_state::via0_ca2_w )
r14279r14280
387387        PA6     ROW 6
388388        PA7     ROW 7
389389
390   */
390    */
391391
392392   UINT8 data = 0xff;
393393
r14279r14280
418418        PB6     COL 6
419419        PB7     COL 7, JOY 3
420420
421   */
421    */
422422
423423   UINT8 data = 0xff;
424424
r14279r14280
443443        PB6     COL 6
444444        PB7     COL 7, JOY 3
445445
446   */
446    */
447447
448448   // cassette write
449449   m_cassette->output(BIT(data, 3) ? -(0x5a9e >> 1) : +(0x5a9e >> 1));
r14279r14280
629629   MCFG_CASSETTE_ADD(CASSETTE_TAG, cbm_cassette_interface )
630630
631631   MCFG_CBM_IEC_ADD(cbm_iec_intf, "c1541")
632   
632
633633   MCFG_VIC20_EXPANSION_SLOT_ADD(VIC20_EXPANSION_SLOT_TAG, expansion_intf, vic20_expansion_cards, NULL, NULL)
634634
635635   // software lists
r14279r14280
669669   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
670670   MCFG_SOUND_ADD("dac", DAC, 0)
671671   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
672   
672
673673   // software lists
674674   MCFG_SOFTWARE_LIST_FILTER("cart_list", "NTSC")
675675   MCFG_SOFTWARE_LIST_FILTER("disk_list", "NTSC")
r14279r14280
703703   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
704704   MCFG_SOUND_ADD("dac", DAC, 0)
705705   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
706   
706
707707   // software lists
708708   MCFG_SOFTWARE_LIST_FILTER("cart_list", "PAL")
709709   MCFG_SOFTWARE_LIST_FILTER("disk_list", "PAL")
r14279r14280
714714//**************************************************************************
715715//  ROM DEFINITIONS
716716//**************************************************************************
717   
717
718718//-------------------------------------------------
719719//  ROM( vic1001 )
720720//-------------------------------------------------
src/mess/drivers/a7000.c
r14279r14280
5656   void vidc20_dynamic_screen_change();
5757   virtual void machine_reset();
5858   virtual void machine_start();
59   
59
6060   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
6161};
6262
src/mess/drivers/fmtowns.c
r14279r14280
230230      case 0x05:
231231         logerror("SYS: port 0x25 read\n");
232232         return 0x00;
233/*      case 0x06:
234         count = (m_towns_freerun_counter->time_elapsed() * ATTOSECONDS_TO_HZ(ATTOSECONDS_IN_USEC(1))).as_double();
235         return count & 0xff;
236      case 0x07:
237         count = (m_towns_freerun_counter->time_elapsed() * ATTOSECONDS_TO_HZ(ATTOSECONDS_IN_USEC(1))).as_double();
238         return (count >> 8) & 0xff;
233/*      case 0x06:
234            count = (m_towns_freerun_counter->time_elapsed() * ATTOSECONDS_TO_HZ(ATTOSECONDS_IN_USEC(1))).as_double();
235            return count & 0xff;
236        case 0x07:
237            count = (m_towns_freerun_counter->time_elapsed() * ATTOSECONDS_TO_HZ(ATTOSECONDS_IN_USEC(1))).as_double();
238            return (count >> 8) & 0xff;
239239*/      case 0x06:
240240         //logerror("SYS: (0x26) timer read\n");
241241         return m_freerun_timer;
src/mess/drivers/wangpc.c
r14279r14280
11/*
22 
3   Wang Professional Computer
3    Wang Professional Computer
44 
5   http://www.seasip.info/VintagePC/wangpc.html
6   
7   chdman -createblankhd q540.chd 512 8 17 512
8   
5    http://www.seasip.info/VintagePC/wangpc.html
6 
7    chdman -createblankhd q540.chd 512 8 17 512
8 
99*/
1010 
1111#include "includes/wangpc.h"
r14279r14280
3030WRITE8_MEMBER( wangpc_state::fdc_ctrl_w )
3131{
3232   /*
33       
34      bit      description
35       
36      0      Enable /EOP
37      1      Disable /DREQ2
38      2      Clear drive 1 door disturbed interrupt
39      3      Clear drive 2 door disturbed interrupt
40      4       
41      5       
42      6       
43      7       
44       
45   */
46   
33 
34        bit     description
35 
36        0       Enable /EOP
37        1       Disable /DREQ2
38        2       Clear drive 1 door disturbed interrupt
39        3       Clear drive 2 door disturbed interrupt
40        4
41        5
42        6
43        7
44 
45    */
46 
4747   m_fdc_tc_enable = BIT(data, 0);
4848   m_fdc_dma_enable = BIT(data, 1);
4949 
r14279r14280
5555READ8_MEMBER( wangpc_state::deselect_drive1_r )
5656{
5757   m_ds1 = 1;
58   
58
5959   return 0;
6060}
6161 
r14279r14280
6969READ8_MEMBER( wangpc_state::select_drive1_r )
7070{
7171   m_ds1 = 0;
72   
72
7373   return 0;
7474}
7575 
r14279r14280
8383READ8_MEMBER( wangpc_state::deselect_drive2_r )
8484{
8585   m_ds2 = 1;
86   
86
8787   return 0;
8888}
8989 
r14279r14280
9797READ8_MEMBER( wangpc_state::select_drive2_r )
9898{
9999   m_ds2 = 0;
100   
100
101101   return 0;
102102}
103103 
r14279r14280
111111READ8_MEMBER( wangpc_state::motor1_off_r )
112112{
113113   floppy_mon_w(m_floppy0, 1);
114   
114
115115   return 0;
116116}
117117 
r14279r14280
125125READ8_MEMBER( wangpc_state::motor1_on_r )
126126{
127127   floppy_mon_w(m_floppy0, 0);
128   
128
129129   return 0;
130130}
131131 
r14279r14280
139139READ8_MEMBER( wangpc_state::motor2_off_r )
140140{
141141   floppy_mon_w(m_floppy1, 1);
142   
142
143143   return 0;
144144}
145145 
r14279r14280
153153READ8_MEMBER( wangpc_state::motor2_on_r )
154154{
155155   floppy_mon_w(m_floppy1, 0);
156   
156
157157   return 0;
158158}
159159 
r14279r14280
168168{
169169   upd765_reset_w(m_fdc, 1);
170170   upd765_reset_w(m_fdc, 0);
171   
171
172172   return 0;
173173}
174174 
r14279r14280
214214READ8_MEMBER( wangpc_state::status_r )
215215{
216216   /*
217       
218      bit      description
219       
220      0      Memory Parity Flag
221      1      I/O Error Flag
222      2      Unassigned
223      3      FDC Interrupt Flag
224      4      Door disturbed on drive 1
225      5      Door disturbed on drive 2
226      6      Door open on drive 1
227      7      Door open on drive 2
228       
229   */
230   
217 
218        bit     description
219 
220        0       Memory Parity Flag
221        1       I/O Error Flag
222        2       Unassigned
223        3       FDC Interrupt Flag
224        4       Door disturbed on drive 1
225        5       Door disturbed on drive 2
226        6       Door open on drive 1
227        7       Door open on drive 2
228 
229    */
230 
231231   UINT8 data = 0x03;
232   
232
233233   // FDC interrupt
234234   data |= upd765_int_r(m_fdc) << 3;
235   
235
236236   return data;
237237}
238238 
r14279r14280
276276READ8_MEMBER( wangpc_state::led_on_r )
277277{
278278   output_set_led_value(LED_DIAGNOSTIC, 1);
279   
279
280280   return 0;
281281}
282282 
r14279r14280
309309{
310310   m_uart_dr = 0;
311311   check_level2_interrupts();
312   
312
313313   return m_uart->read(space, 0);
314314}
315315 
r14279r14280
322322{
323323   m_uart_tbre = 0;
324324   check_level2_interrupts();
325   
325
326326   m_uart->write(space, 0, data);
327327}
328328 
r14279r14280
335335{
336336   m_dav = 1;
337337   check_level1_interrupts();
338   
338
339339   return centronics_data_r(m_centronics, 0);
340340}
341341 
r14279r14280
348348{
349349   m_acknlg = 1;
350350   check_level1_interrupts();
351   
351
352352   centronics_data_w(m_centronics, 0, data);
353   
353
354354   centronics_strobe_w(m_centronics, 0);
355355   centronics_strobe_w(m_centronics, 1);
356356}
r14279r14280
364364{
365365   m_busy = 1;
366366   check_level1_interrupts();
367   
367
368368   return 0;
369369}
370370 
r14279r14280
387387READ8_MEMBER( wangpc_state::led_off_r )
388388{
389389   output_set_led_value(LED_DIAGNOSTIC, 0);
390   
390
391391   return 0;
392392}
393393 
r14279r14280
408408READ8_MEMBER( wangpc_state::option_id_r )
409409{
410410   /*
411       
412      bit      description
413       
414      0       
415      1       
416      2       
417      3       
418      4       
419      5       
420      6       
421      7      FDC Interrupt Flag
422       
423   */
424   
411 
412        bit     description
413 
414        0
415        1
416        2
417        3
418        4
419        5
420        6
421        7       FDC Interrupt Flag
422 
423    */
424 
425425   UINT8 data = 0;
426   
426
427427   // FDC interrupt
428428   data |= upd765_int_r(m_fdc) << 7;
429   
429
430430   return data;
431431}
432432 
r14279r14280
441441//-------------------------------------------------
442442 
443443static ADDRESS_MAP_START( wangpc_mem, AS_PROGRAM, 16, wangpc_state )
444//   AM_RANGE(0x00000, 0xfffff) AM_READWRITE(mrdc_r, amwc_c)
444//  AM_RANGE(0x00000, 0xfffff) AM_READWRITE(mrdc_r, amwc_c)
445445   AM_RANGE(0x00000, 0x1ffff) AM_RAM
446446   AM_RANGE(0xfc000, 0xfffff) AM_ROM AM_REGION(I8086_TAG, 0)
447447ADDRESS_MAP_END
r14279r14280
468468   AM_RANGE(0x1020, 0x1027) AM_DEVREADWRITE8(I8255A_TAG, i8255_device, read, write, 0x00ff)
469469   AM_RANGE(0x1040, 0x1047) AM_DEVREADWRITE8_LEGACY(I8253_TAG, pit8253_r, pit8253_w, 0x00ff)
470470   AM_RANGE(0x1060, 0x1063) AM_DEVREADWRITE8_LEGACY(I8259A_TAG, pic8259_r, pic8259_w, 0x00ff)
471//   AM_RANGE(0x1080, 0x1087) AM_DEVREAD8(SCN2661_TAG, scn2661_device, read, 0x00ff)
472//   AM_RANGE(0x1088, 0x108f) AM_DEVWRITE8(SCN2661_TAG, scn2661_device, write, 0x00ff)
471//  AM_RANGE(0x1080, 0x1087) AM_DEVREAD8(SCN2661_TAG, scn2661_device, read, 0x00ff)
472//  AM_RANGE(0x1088, 0x108f) AM_DEVWRITE8(SCN2661_TAG, scn2661_device, write, 0x00ff)
473473   AM_RANGE(0x10a0, 0x10bf) AM_DEVREADWRITE8_LEGACY(AM9517A_TAG, i8237_r, i8237_w, 0x00ff)
474474   AM_RANGE(0x10c2, 0x10c7) AM_WRITE8(dma_page_w, 0x00ff)
475475   AM_RANGE(0x10e0, 0x10e1) AM_READWRITE8(status_r, timer0_irq_clr_w, 0x00ff)
r14279r14280
496496 
497497static INPUT_PORTS_START( wangpc )
498498   // keyboard defined in machine/wangpckb.c
499   
499
500500   PORT_START("SW")
501501   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )   PORT_DIPLOCATION("SW:1")
502502   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
r14279r14280
540540WRITE_LINE_MEMBER( wangpc_state::eop_w )
541541{
542542   m_dma_eop = !state;
543   
543
544544   update_fdc_tc();
545545   check_level2_interrupts();
546546}
r14279r14280
645645void wangpc_state::check_level1_interrupts()
646646{
647647   int state = !m_timer2_irq | !m_ecpi_irq | !m_acknlg | !m_dav | !m_busy;
648   
648
649649   pic8259_ir1_w(m_pic, state);
650650}
651651 
652652void wangpc_state::check_level2_interrupts()
653653{
654654   int state = !m_dma_eop | m_uart_dr | m_uart_tbre | upd765_int_r(m_fdc) | m_fpu_irq;
655   
655
656656   pic8259_ir2_w(m_pic, state);
657657}
658658 
r14279r14280
678678READ8_MEMBER( wangpc_state::ppi_pa_r )
679679{
680680   /*
681       
682      bit      description
683       
684      0      /POWER ON
685      1      /SMART
686      2      /DATA AVAILABLE
687      3      SLCT
688      4      BUSY
689      5      /FAULT
690      6      PE
691      7      ACKNOWLEDGE
692       
693   */
694   
681 
682        bit     description
683 
684        0       /POWER ON
685        1       /SMART
686        2       /DATA AVAILABLE
687        3       SLCT
688        4       BUSY
689        5       /FAULT
690        6       PE
691        7       ACKNOWLEDGE
692 
693    */
694 
695695   UINT8 data = 0x08 | 0x02 | 0x01;
696   
696
697697   data |= m_dav << 2;
698698   data |= centronics_busy_r(m_centronics) << 4;
699699   data |= centronics_fault_r(m_centronics) << 5;
700700   data |= centronics_pe_r(m_centronics) << 6;
701701   data |= m_acknlg << 7;
702   
702
703703   return data;
704704}
705705 
706706READ8_MEMBER( wangpc_state::ppi_pb_r )
707707{
708708   /*
709       
710      bit      description
711       
712      0      /TIMER 2 INTERRUPT
713      1      /SERIAL INTERRUPT
714      2      /PARALLEL PORT INTERRUPT
715      3      /DMA INTERRUPT
716      4      KBD INTERRUPT TRANSMIT
717      5      KBD INTERRUPT RECEIVE
718      6      FLOPPY DISK INTERRUPT
719      7      8087 INTERRUPT
720       
721   */
722   
709 
710        bit     description
711 
712        0       /TIMER 2 INTERRUPT
713        1       /SERIAL INTERRUPT
714        2       /PARALLEL PORT INTERRUPT
715        3       /DMA INTERRUPT
716        4       KBD INTERRUPT TRANSMIT
717        5       KBD INTERRUPT RECEIVE
718        6       FLOPPY DISK INTERRUPT
719        7       8087 INTERRUPT
720 
721    */
722 
723723   UINT8 data = 0;
724   
724
725725   // timer 2 interrupt
726726   data |= m_timer2_irq;
727   
727
728728   // serial interrupt
729729   data |= m_ecpi_irq << 1;
730   
730
731731   // parallel port interrupt
732732   data |= m_acknlg << 2;
733   
733
734734   // DMA interrupt
735735   data |= m_dma_eop << 3;
736     
736
737737   // keyboard interrupt
738738   data |= m_uart_tbre << 4;
739739   data |= m_uart_dr << 5;
740   
740
741741   // FDC interrupt
742742   data |= upd765_int_r(m_fdc) << 6;
743   
743
744744   // 8087 interrupt
745745   data |= m_fpu_irq << 7;
746   
746
747747   return data;
748748}
749749 
750750READ8_MEMBER( wangpc_state::ppi_pc_r )
751751{
752752   /*
753       
754      bit      description
755       
756      0       
757      1       
758      2       
759      3       
760      4      SW1
761      5      SW2
762      6      SW3
763      7      SW4
764       
765   */
766   
753 
754        bit     description
755 
756        0
757        1
758        2
759        3
760        4       SW1
761        5       SW2
762        6       SW3
763        7       SW4
764 
765    */
766 
767767   return input_port_read(machine(), "SW") << 4;
768768}
769769 
770770WRITE8_MEMBER( wangpc_state::ppi_pc_w )
771771{
772772   /*
773       
774      bit      description
775       
776      0      /USR0 (pin 14)
777      1      /USR1 (pin 36)
778      2      /RESET (pin 31)
779      3      Unassigned
780      4       
781      5       
782      6       
783      7       
784       
785   */
786   
773 
774        bit     description
775 
776        0       /USR0 (pin 14)
777        1       /USR1 (pin 36)
778        2       /RESET (pin 31)
779        3       Unassigned
780        4
781        5
782        6
783        7
784 
785    */
786 
787787   centronics_autofeed_w(m_centronics, BIT(data, 0));
788788   centronics_init_w(m_centronics, BIT(data, 2));
789789}
r14279r14280
840840{
841841   if (state)
842842   {
843      m_uart_dr = 1;     
843      m_uart_dr = 1;
844844      check_level2_interrupts();
845845   }
846846}
r14279r14280
908908 
909909   if (!state->m_ds1) return state->m_floppy0;
910910   if (!state->m_ds2) return state->m_floppy1;
911   
911
912912   return NULL;
913913}
914914 
r14279r14280
998998{
999999   // register CPU IRQ callback
10001000   device_set_irq_callback(m_maincpu, wangpc_irq_callback);
1001   
1001
10021002   // connect serial keyboard
10031003   m_uart->connect(m_kb);
10041004}
r14279r14280
10321032   MCFG_CPU_ADD(I8086_TAG, I8086, 8000000)
10331033   MCFG_CPU_PROGRAM_MAP(wangpc_mem)
10341034   MCFG_CPU_IO_MAP(wangpc_io)
1035   
1035
10361036   // devices
10371037   MCFG_I8237_ADD(AM9517A_TAG, 4000000, dmac_intf)
10381038   MCFG_PIC8259_ADD(I8259A_TAG, pic_intf)
r14279r14280
10441044   MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(floppy_intf)
10451045   MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_intf)
10461046   MCFG_WANGPC_KEYBOARD_ADD(kb_intf)
1047   
1047
10481048   // bus
10491049   MCFG_WANGPC_BUS_ADD(bus_intf)
10501050   MCFG_WANGPC_BUS_SLOT_ADD("slot1", 1, wangpc_cards, NULL, NULL)
r14279r14280
10631063//**************************************************************************
10641064//  ROM DEFINITIONS
10651065//**************************************************************************
1066   
1066
10671067//-------------------------------------------------
10681068//  ROM( wangpc )
10691069//-------------------------------------------------
src/mess/drivers/bullet.c
r14279r14280
4848
4949    TODO:
5050
51   - revision F boot ROM dump
51    - revision F boot ROM dump
5252    - wmb_org.imd does not load
5353    - z80dart wait/ready
5454    - floppy type dips
r14279r14280
101101READ8_MEMBER( bullet_state::mreq_r )
102102{
103103   UINT8 data = 0;
104   
104
105105   if (!m_brom && !BIT(offset, 5))
106106   {
107107      data = machine().region(Z80_TAG)->base()[offset & 0x1f];
r14279r14280
117117         data = m_ram->pointer()[offset];
118118      }
119119   }
120   
120
121121   return data;
122122}
123123
r14279r14280
326326READ8_MEMBER( bulletf_state::mreq_r )
327327{
328328   UINT8 data = 0;
329   
329
330330   if (!m_rome && !BIT(offset, 5))
331331   {
332332      data = machine().region(Z80_TAG)->base()[offset & 0x1f];
r14279r14280
349349         data = m_ram->pointer()[offset];
350350      }
351351   }
352   
352
353353   return data;
354354}
355355
r14279r14280
389389        bit     signal
390390
391391        0       device select (0=FDC, 1=SCSI)
392        1       
393        2       
394        3       
395        4       DMB4      Source bank
392        1
393        2
394        3
395        4       DMB4        Source bank
396396        5
397        6      DMB6      Destination bank
397        6       DMB6        Destination bank
398398        7
399399
400400    */
401   
401
402402   m_rome = 1;
403   
403
404404   m_xdma0 = data;
405405}
406406
r14279r14280
420420        2       Unit select number
421421        3       Unit select number
422422        4       Select side 2
423        5      Disable 3 & 5 inch spindle motors
424        6      Set for 1 MHz controller operation, reset for 2 MHz controller operation
425        7      Set to select single density
423        5       Disable 3 & 5 inch spindle motors
424        6       Set for 1 MHz controller operation, reset for 2 MHz controller operation
425        7       Set to select single density
426426
427427    */
428428
429429   // floppy drive select
430430   wd17xx_set_drive(m_fdc, data & 0x0f);
431   
431
432432   // floppy side select
433433   wd17xx_set_side(m_fdc, BIT(data, 4));
434434
r14279r14280
437437   floppy_mon_w(m_floppy1, BIT(data, 5));
438438   floppy_drive_set_ready_state(m_floppy0, BIT(data, 5), 1);
439439   floppy_drive_set_ready_state(m_floppy1, BIT(data, 5), 1);
440   
440
441441   // FDC clock
442442   m_fdc->set_unscaled_clock(BIT(data, 6) ? XTAL_16MHz/16 : XTAL_16MHz/8);
443443
r14279r14280
457457        bit     signal
458458
459459        0       Select active bank (0=bank 0, 1=bank 1)
460        1       
461        2       
462        3       
460        1
461        2
462        3
463463        4       Select system space overlay (0=no overlay, 1=overlay)
464464        5
465465        6
466466        7
467467
468468    */
469   
469
470470   m_mbank = data;
471471}
472472
r14279r14280
478478READ8_MEMBER( bulletf_state::scsi_r )
479479{
480480   UINT8 data = scsi_data_r(m_scsibus, 0);
481   
481
482482   scsi_ack_w(m_scsibus, 0);
483   
483
484484   m_wack = 0;
485485   update_dma_rdy();
486   
486
487487   return data;
488488}
489489
r14279r14280
495495WRITE8_MEMBER( bulletf_state::scsi_w )
496496{
497497   scsi_data_w(m_scsibus, 0, data);
498   
498
499499   scsi_ack_w(m_scsibus, 0);
500500
501501   m_wack = 0;
r14279r14280
513513
514514        bit     signal
515515
516        0       CBUSY   Centronics busy
517        1       SW2      DIP switch 2
518        2       SW3      DIP switch 3
519        3       FD2S   *Floppy disk two sided
520        4       HLDST   Floppy disk head load status
521        5      XDCG   *Floppy disk exchange (8-inch only)
522        6      FDIRQ   FDC interrupt request line
523        7      FDDRQ   FDC data request line
516        0       CBUSY   Centronics busy
517        1       SW2     DIP switch 2
518        2       SW3     DIP switch 3
519        3       FD2S    *Floppy disk two sided
520        4       HLDST   Floppy disk head load status
521        5       XDCG    *Floppy disk exchange (8-inch only)
522        6       FDIRQ   FDC interrupt request line
523        7       FDDRQ   FDC data request line
524524
525525    */
526   
526
527527   UINT8 data = 0x10;
528   
528
529529   // centronics busy
530530   data |= centronics_busy_r(m_centronics);
531531
r14279r14280
914914
915915        bit     signal
916916
917        0       
918        1       
919        2       
917        0
918        1
919        2
920920        3       BUSY
921921        4       MSG
922922        5       C/D
r14279r14280
945945        0       ATN
946946        1       RST
947947        2       SEL
948        3       
949        4       
950        5       
951        6       
952        7       
948        3
949        4
950        5
951        6
952        7
953953
954954    */
955   
955
956956   //scsi_atn_w(m_scsibus, !BIT(data, 0));
957957   scsi_rst_w(m_scsibus, !BIT(data, 1));
958958   scsi_sel_w(m_scsibus, !BIT(data, 2));
src/mess/drivers/kyocera.c
r14279r14280
233233    m_uart->pi_w(BIT(data, 2));
234234    m_uart->cls1_w(BIT(data, 3));
235235    m_uart->cls2_w(BIT(data, 4));
236   
236
237237   m_uart->crl_w(1);
238238}
239239
r14279r14280
988988   {
989989      speaker_level_w(m_speaker, state);
990990   }
991   
991
992992   m_uart->trc_w(state);
993993   m_uart->rrc_w(state);
994994}
src/mess/drivers/tiki100.c
r14279r14280
1212
1313    TODO:
1414
15   - floppy broken
15    - floppy broken
1616    - palette RAM should be written during HBLANK
1717    - double sided disks have t0s0,t0s1,t1s0,t1s1... format
1818    - DART clocks
r14279r14280
653653   /* internal ram */
654654   MCFG_RAM_ADD(RAM_TAG)
655655   MCFG_RAM_DEFAULT_SIZE("64K")
656   
656
657657   // software list
658658   MCFG_SOFTWARE_LIST_ADD("flop_list", "tiki100")
659659MACHINE_CONFIG_END
r14279r14280
663663ROM_START( kontiki )
664664   ROM_REGION( 0x10000, Z80_TAG, ROMREGION_ERASEFF )
665665   ROM_LOAD( "tikirom-1.30.u10",  0x0000, 0x2000, CRC(c482dcaf) SHA1(d140706bb7fc8b1fbb37180d98921f5bdda73cf9) )
666   
666
667667   ROM_REGION( 0x100, "proms", 0 )
668668   ROM_LOAD( "63ls140.u4", 0x000, 0x100, NO_DUMP )
669669ROM_END
src/mess/drivers/abc1600.c
r14279r14280
985985        4       SEGD4
986986        5       SEGD5
987987        6       SEGD6
988        7     
988        7       
989989
990990    */
991991
r14279r14280
10181018
10191019        8       X19
10201020        9       X20
1021        10      X20
1022        11      X20
1023        12      X20
1024        13      X20
1021        10      X20
1022        11      X20
1023        12      X20
1024        13      X20
10251025        14      _WP
10261026        15      NONX
10271027
r14279r14280
10361036   UINT16 pgd = m_page_ram[pga];
10371037
10381038   UINT8 data = 0;
1039   
1039
10401040   if (A0)
10411041   {
10421042      data = pgd & 0xff;
r14279r14280
10441044   else
10451045   {
10461046      int x20 = BIT(pgd, 9);
1047     
1047
10481048      data = (pgd >> 8) | x20 << 2 | x20 << 3 | x20 << 4 | x20 << 5;
10491049   }
1050   
1050
10511051   return data;
10521052}
10531053
src/mess/drivers/sage2.c
r14279r14280
1212
1313/*
1414
15   TODO:
15    TODO:
1616
17   - floppy loading
18   - PROM test fails
19   - i8251 test fails on boot
20   
21      001BD8: move.b  D6, $c071.w
22      001BDC: moveq   #$e, D7
23      001BDE: dbra    D7, $1bde
24      001BE2: btst    #$2, $c073.w
25      001BE8: bne     $1bec
26     
27   - TMS9914 IEEE-488 controller
28   - board 2 (4x 2651 USART)
29   - Winchester controller
17    - floppy loading
18    - PROM test fails
19    - i8251 test fails on boot
3020
21        001BD8: move.b  D6, $c071.w
22        001BDC: moveq   #$e, D7
23        001BDE: dbra    D7, $1bde
24        001BE2: btst    #$2, $c073.w
25        001BE8: bne     $1bec
26
27    - TMS9914 IEEE-488 controller
28    - board 2 (4x 2651 USART)
29    - Winchester controller
30
3131*/
3232
3333#include "includes/sage2.h"
r14279r14280
4545READ8_MEMBER( sage2_state::mmu_r )
4646{
4747   UINT8 data = 0xff;
48   
48
4949   if (m_reset || (offset >= 0xfe0000))
5050   {
5151      data = machine().region(M68000_TAG)->base()[offset & 0x1fff];
r14279r14280
5454   {
5555      data = m_ram->pointer()[offset];
5656   }
57   
57
5858   return data;
5959}
6060
r14279r14280
9494   AM_RANGE(0xffc052, 0xffc053) AM_DEVREADWRITE8_LEGACY(UPD765_TAG, upd765_data_r, upd765_data_w, 0x00ff)
9595   AM_RANGE(0xffc060, 0xffc067) AM_DEVREADWRITE8(I8255A_0_TAG, i8255_device, read, write, 0x00ff) // i8255, Printer
9696   AM_RANGE(0xffc070, 0xffc071) AM_DEVREAD8(I8251_0_TAG, i8251_device, data_r, 0x00ff) AM_DEVWRITE8_LEGACY(TERMINAL_TAG, terminal_write, 0x00ff)
97//   AM_RANGE(0xffc070, 0xffc071) AM_DEVREADWRITE8(I8251_0_TAG, i8251_device, data_r, data_w, 0x00ff)
97//  AM_RANGE(0xffc070, 0xffc071) AM_DEVREADWRITE8(I8251_0_TAG, i8251_device, data_r, data_w, 0x00ff)
9898   AM_RANGE(0xffc072, 0xffc073) AM_DEVREADWRITE8(I8251_0_TAG, i8251_device, status_r, control_w, 0x00ff)
9999   AM_RANGE(0xffc080, 0xffc087) AM_MIRROR(0x78) AM_DEVREADWRITE8_LEGACY(I8253_0_TAG, pit8253_r, pit8253_w, 0x00ff)
100//   AM_RANGE(0xffc400, 0xffc407) AM_DEVREADWRITE8(S2651_0_TAG, s2651_device, read, write, 0x00ff)
101//   AM_RANGE(0xffc440, 0xffc447) AM_DEVREADWRITE8(S2651_1_TAG, s2651_device, read, write, 0x00ff)
102//   AM_RANGE(0xffc480, 0xffc487) AM_DEVREADWRITE8(S2651_2_TAG, s2651_device, read, write, 0x00ff)
103//   AM_RANGE(0xffc4c0, 0xffc4c7) AM_DEVREADWRITE8(S2651_3_TAG, s2651_device, read, write, 0x00ff)
100//  AM_RANGE(0xffc400, 0xffc407) AM_DEVREADWRITE8(S2651_0_TAG, s2651_device, read, write, 0x00ff)
101//  AM_RANGE(0xffc440, 0xffc447) AM_DEVREADWRITE8(S2651_1_TAG, s2651_device, read, write, 0x00ff)
102//  AM_RANGE(0xffc480, 0xffc487) AM_DEVREADWRITE8(S2651_2_TAG, s2651_device, read, write, 0x00ff)
103//  AM_RANGE(0xffc4c0, 0xffc4c7) AM_DEVREADWRITE8(S2651_3_TAG, s2651_device, read, write, 0x00ff)
104104//  AM_RANGE(0xffc500, 0xffc7ff) // Winchester drive ports
105105ADDRESS_MAP_END
106106
r14279r14280
196196//-------------------------------------------------
197197
198198/*
199   
200   IR0      U74 OUT2
201   IR1      RX2I+
202   IR2      TX1I+
203   IR3      TX2I+
204   IR4      MI-
205   IR5      CNI+
206   IR6      U74 OUT0
207   IR7      SI+
208   
199
200    IR0     U74 OUT2
201    IR1     RX2I+
202    IR2     TX1I+
203    IR3     TX2I+
204    IR4     MI-
205    IR5     CNI+
206    IR6     U74 OUT0
207    IR7     SI+
208
209209*/
210210
211211static const struct pic8259_interface pic_intf =
r14279r14280
232232        PC3     SL0-
233233        PC4     SL1-
234234        PC5     MOT-
235        PC6      PCRMP-
236        PC7      FRES+
235        PC6     PCRMP-
236        PC7     FRES+
237237
238238    */
239   
239
240240   // floppy terminal count
241241   upd765_tc_w(m_fdc, BIT(data, 0));
242   
242
243243   // floppy ready
244244   upd765_ready_w(m_fdc, BIT(data, 1));
245   
245
246246   // floppy interrupt enable
247247   m_fdie = BIT(data, 2);
248248   update_fdc_int();
249   
249
250250   // drive select
251251   m_sl0 = BIT(data, 3);
252252   m_sl1 = BIT(data, 4);
253   
253
254254   // floppy motor
255255   floppy_mon_w(m_floppy0, BIT(data, 5));
256256   floppy_mon_w(m_floppy1, BIT(data, 5));
257   
257
258258   // FDC reset
259259   upd765_reset_w(m_fdc, BIT(data, 7));
260260}
r14279r14280
286286        PB3     CD-
287287        PB4     BUSY
288288        PB5     PAPER
289        PB6      SEL
290        PB7      FAULT-
289        PB6     SEL
290        PB7     FAULT-
291291
292292    */
293   
293
294294   UINT8 data = 0;
295   
295
296296   // floppy interrupt
297297   data = upd765_int_r(m_fdc);
298   
298
299299   // floppy write protected
300300   if (!m_sl0) data |= floppy_wpt_r(m_floppy0) << 1;
301301   if (!m_sl1) data |= floppy_wpt_r(m_floppy1) << 1;
302   
302
303303   // RS-232 ring indicator
304   
304
305305   // RS-232 carrier detect
306   
306
307307   // centronics
308308   data |= centronics_busy_r(m_centronics) << 4;
309309   data |= centronics_pe_r(m_centronics) << 5;
r14279r14280
325325        PC3     LEDR+
326326        PC4     STROBE-
327327        PC5     PRIME-
328        PC6      U38 CL-
329        PC7      RMI-
328        PC6     U38 CL-
329        PC7     RMI-
330330
331331    */
332   
332
333333   if (!BIT(data, 0))
334334   {
335335      // clear parity error interrupt
336336      m_maincpu->set_input_line(M68K_IRQ_7, CLEAR_LINE);
337337   }
338   
338
339339   // s? interrupt
340340   pic8259_ir7_w(m_pic, BIT(data, 2));
341   
341
342342   // processor LED
343343   output_set_led_value(0, BIT(data, 3));
344   
344
345345   // centronics
346346   centronics_strobe_w(m_centronics, BIT(data, 4));
347347   centronics_prime_w(m_centronics, BIT(data, 5));
348   
348
349349   if (!BIT(data, 6))
350350   {
351351      // clear ACK interrupt
352352      pic8259_ir5_w(m_pic, CLEAR_LINE);
353353   }
354   
354
355355   if (!BIT(data, 7))
356356   {
357357      // clear modem interrupt
r14279r14280
500500
501501   if (!state->m_sl0) return state->m_floppy0;
502502   if (!state->m_sl1) return state->m_floppy1;
503   
503
504504   return NULL;
505505}
506506
r14279r14280
655655   {
656656      state->m_reset = 0;
657657   }
658   
658
659659   return address;
660660}
661661
r14279r14280
663663{
664664   address_space *program = machine.device<cpu_device>(M68000_TAG)->space(AS_PROGRAM);
665665   program->set_direct_update_handler(direct_update_delegate(FUNC(sage2_direct_update_handler), &machine));
666   
666
667667   // patch out i8251 test
668668   machine.region(M68000_TAG)->base()[0x1be8] = 0xd6;
669669   machine.region(M68000_TAG)->base()[0x1be9] = 0x4e;
src/mess/drivers/sm1800.c
r14279r14280
8181void sm1800_state::video_start()
8282{
8383   machine().primary_screen->register_screen_bitmap(m_bitmap);
84   
84
8585}
8686
8787static SCREEN_UPDATE_IND16( sm1800 )
src/mess/drivers/next.c
r14279r14280
252252
253253void next_state::dma_drq_w(int slot, bool state)
254254{
255   //   fprintf(stderr, "DMA drq_w %d, %d\n", slot, state);
255   //  fprintf(stderr, "DMA drq_w %d, %d\n", slot, state);
256256   dma_slot &ds = dma_slots[slot];
257257   ds.drq = state;
258258   if(state && (ds.state & DMA_ENABLE)) {
r14279r14280
480480   }
481481   if(data & DMA_SETENABLE) {
482482      ds.state |= DMA_ENABLE;
483      //      fprintf(stderr, "dma slot %d drq=%s\n", slot, ds.drq ? "on" : "off");
483      //      fprintf(stderr, "dma slot %d drq=%s\n", slot, ds.drq ? "on" : "off");
484484      if(ds.drq)
485485         dma_drq_w(slot, ds.drq);
486486   }
src/mess/drivers/x1twin.c
r14279r14280
590590
591591   MCFG_MB8877_ADD("fdc",x1_mb8877a_interface)
592592
593    MCFG_CARTSLOT_ADD("cart")
593   MCFG_CARTSLOT_ADD("cart")
594594   MCFG_CARTSLOT_EXTENSION_LIST("rom")
595595   MCFG_CARTSLOT_NOT_MANDATORY
596596
src/mess/drivers/pasopia.c
r14279r14280
6161   UINT16 m_vram_addr;
6262   UINT8 m_vram_latch;
6363   UINT8 m_attr_latch;
64//   UINT8 m_gfx_mode;
64//  UINT8 m_gfx_mode;
6565   bool m_video_wl;
6666   bool m_ram_bank;
6767   UINT8 *m_p_vram;
src/mess/drivers/apf.c
r14279r14280
724724
725725   MCFG_DEVICE_REMOVE( "pia_1" )
726726
727//   MCFG_DEVICE_REMOVE( WAVE_TAG )
727//  MCFG_DEVICE_REMOVE( WAVE_TAG )
728728   MCFG_DEVICE_REMOVE( CASSETTE_TAG )
729729   MCFG_LEGACY_FLOPPY_2_DRIVES_REMOVE()
730730
src/mess/drivers/ibmpc.c
r14279r14280
321321DEVICE_INPUT_DEFAULTS_END
322322
323323//static DEVICE_INPUT_DEFAULTS_START(ega)
324//   DEVICE_INPUT_DEFAULTS("DSW0",0x30, 0x00)
324//  DEVICE_INPUT_DEFAULTS("DSW0",0x30, 0x00)
325325//DEVICE_INPUT_DEFAULTS_END
326326
327327static SLOT_INTERFACE_START(ibm_isa8_cards)
328328   SLOT_INTERFACE("cga", ISA8_CGA)
329//   SLOT_INTERFACE("ega", ISA8_EGA)
329//  SLOT_INTERFACE("ega", ISA8_EGA)
330330   SLOT_INTERFACE("mda", ISA8_MDA)
331331   SLOT_INTERFACE("com", ISA8_COM)
332332   SLOT_INTERFACE("fdc", ISA8_FDC)
src/mess/drivers/pcfx.c
r14279r14280
2020      : driver_device(mconfig, type, tag) { }
2121
2222   virtual void machine_reset();
23   
23
2424   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
2525};
2626
src/mess/drivers/chesstrv.c
r14279r14280
197197/*
198198static TIMER_DEVICE_CALLBACK( borisdpl_timer_interrupt )
199199{
200   cputag_set_input_line_and_vector(timer.machine(), "maincpu", F8_INPUT_LINE_INT_REQ, HOLD_LINE, 0x20);
200    cputag_set_input_line_and_vector(timer.machine(), "maincpu", F8_INPUT_LINE_INT_REQ, HOLD_LINE, 0x20);
201201}
202202*/
203203
r14279r14280
227227
228228   /* video hardware */
229229   MCFG_DEFAULT_LAYOUT( layout_borisdpl )
230   
230
231231   //MCFG_TIMER_ADD_PERIODIC("timer_interrupt", borisdpl_timer_interrupt, attotime::from_hz(40))
232232MACHINE_CONFIG_END
233233

Previous 15994 Revisions Next


© 1998-2018 The MESS Team