r8641 Tuesday 27th July, 2010 at 16:03:42 UTC by Dirk Best
[PX4] Improved error logging.
[TF20] Improved TC handling and added dip switch.
[src/mess/drivers]px4.c
[src/mess/machine]tf20.c tf20.h

src/mess/machine/tf20.c
r8640r8641
7777   /* switch in ram */
7878   memory_install_ram(prg, 0x0000, 0x7fff, 0, 0, messram_get_ptr(tf20->ram));
7979
80   /* clear tc */
81   upd765_tc_w(tf20->upd765a, CLEAR_LINE);
82
8380   return 0xff;
8481}
8582
8683static READ8_HANDLER( tf20_dip_r )
8784{
88   tf20_state *tf20 = get_safe_token(space->cpu->owner());
8985   logerror("%s: tf20_dip_r\n", cpuexec_describe_context(space->machine));
9086
91   /* clear tc */
92   upd765_tc_w(tf20->upd765a, CLEAR_LINE);
87   return input_port_read(space->machine, "tf20_dip");
88}
9389
94   return 0xff;
90static TIMER_CALLBACK( tf20_upd765_tc_reset )
91{
92   upd765_tc_w((device_t *)ptr, CLEAR_LINE);
9593}
9694
9795static READ8_DEVICE_HANDLER( tf20_upd765_tc_r )
9896{
9997   logerror("%s: tf20_upd765_tc_r\n", cpuexec_describe_context(device->machine));
10098
101   /* set tc on read */
99   /* toggle tc on read */
102100   upd765_tc_w(device, ASSERT_LINE);
101   timer_set(device->machine, attotime_zero, device, 0, tf20_upd765_tc_reset);
103102
104103   return 0xff;
105104}
r8640r8641
112111   /* bit 0, motor on signal */
113112   floppy_mon_w(tf20->floppy_0, !BIT(data, 0));
114113   floppy_mon_w(tf20->floppy_1, !BIT(data, 0));
115   floppy_drive_set_ready_state(tf20->floppy_0, BIT(data, 0), 1);
116   floppy_drive_set_ready_state(tf20->floppy_1, BIT(data, 0), 1);
117
118   /* set tc on write */
119   upd765_tc_w(tf20->upd765a, ASSERT_LINE);
120114}
121115
122116static IRQ_CALLBACK( tf20_irq_ack )
r8640r8641
221215ADDRESS_MAP_END
222216
223217
218/***************************************************************************
219    INPUT PORTS
220***************************************************************************/
221
222INPUT_PORTS_START( tf20 )
223   PORT_START("tf20_dip")
224   PORT_DIPNAME(0x0f, 0x0f, "Drive extension")
225   PORT_DIPLOCATION("TF-20 TFX:8,7,6,5")
226   PORT_DIPSETTING(0x0f, "A & B Drive")
227   PORT_DIPSETTING(0x07, "C & D Drive")
228INPUT_PORTS_END
229
230
224231/*****************************************************************************
225232    MACHINE CONFIG
226233*****************************************************************************/
src/mess/machine/tf20.h
r8640r8641
4242READ_LINE_DEVICE_HANDLER( tf20_pinc_w );
4343#endif
4444
45INPUT_PORTS_EXTERN( tf20 );
4546
47
4648/***************************************************************************
4749    DEVICE CONFIGURATION MACROS
4850***************************************************************************/
src/mess/drivers/px4.c
r8640r8641
2222    CONSTANTS
2323***************************************************************************/
2424
25#define VERBOSE 0
26
2527/* interrupt sources */
2628#define INT0_7508   0x01
2729#define INT1_ART   0x02
r8640r8641
137139
138140static WRITE_LINE_DEVICE_HANDLER( px4_sio_txd )
139141{
140   logerror("px4_sio_txd: %d\n", state);
142   if (VERBOSE)
143      logerror("px4_sio_txd: %d\n", state);
141144
142145   if (device != NULL)
143146      tf20_txs_w(device, state);
r8640r8641
145148
146149static READ_LINE_DEVICE_HANDLER( px4_sio_rxd )
147150{
148   logerror("px4_sio_rxd\n");
151   if (VERBOSE)
152      logerror("px4_sio_rxd\n");
149153
150154   if (device != NULL)
151155      return tf20_rxs_r(device);
r8640r8641
155159
156160static READ_LINE_DEVICE_HANDLER( px4_sio_pin )
157161{
158   logerror("px4_sio_pin\n");
162   if (VERBOSE)
163      logerror("px4_sio_pin\n");
159164
160165   if (device != NULL)
161166      return tf20_pins_r(device);
r8640r8641
165170
166171static WRITE_LINE_DEVICE_HANDLER( px4_sio_pout )
167172{
168   logerror("px4_sio_pout: %d\n", state);
173   if (VERBOSE)
174      logerror("px4_sio_pout: %d\n", state);
169175
170176   if (device != NULL)
171177      tf20_pouts_w(device, state);
r8640r8641
180186
181187static WRITE_LINE_DEVICE_HANDLER( px4_rs232c_txd )
182188{
183   logerror("px4_rs232c_txd: %d\n", state);
189   if (VERBOSE)
190      logerror("px4_rs232c_txd: %d\n", state);
184191}
185192
186193#ifdef UNUSED_FUNCTION
187194static READ_LINE_DEVICE_HANDLER( px4_rs232c_rxd )
188195{
189   logerror("px4_rs232c_rxd\n");
196   if (VERBOSE)
197      logerror("px4_rs232c_rxd\n");
190198   return ASSERT_LINE;
191199}
192200#endif
193201
194202static WRITE_LINE_DEVICE_HANDLER( px4_rs232c_rts )
195203{
196   logerror("px4_rs232c_rts: %d\n", state);
204   if (VERBOSE)
205      logerror("px4_rs232c_rts: %d\n", state);
197206}
198207
199208static READ_LINE_DEVICE_HANDLER( px4_rs232c_cts )
200209{
201   logerror("px4_rs232c_cts\n");
210   if (VERBOSE)
211      logerror("px4_rs232c_cts\n");
212
202213   return ASSERT_LINE;
203214}
204215
205216static READ_LINE_DEVICE_HANDLER( px4_rs232c_dsr )
206217{
207   logerror("px4_rs232c_dsr\n");
218   if (VERBOSE)
219      logerror("px4_rs232c_dsr\n");
220
208221   return ASSERT_LINE;
209222}
210223
211224static WRITE_LINE_DEVICE_HANDLER( px4_rs232c_dtr )
212225{
213   logerror("px4_rs232c_dtr: %d\n", state);
226   if (VERBOSE)
227      logerror("px4_rs232c_dtr: %d\n", state);
214228}
215229
216230static READ_LINE_DEVICE_HANDLER( px4_rs232c_dcd )
217231{
218   logerror("px4_rs232c_dcd\n");
232   if (VERBOSE)
233      logerror("px4_rs232c_dcd\n");
234
219235   return ASSERT_LINE;
220236}
221237
r8640r8641
304320static READ8_HANDLER( px4_icrlc_r )
305321{
306322   px4_state *px4 = (px4_state *)space->machine->driver_data;
307   logerror("%s: px4_icrlc_r\n", cpuexec_describe_context(space->machine));
308323
324   if (VERBOSE)
325      logerror("%s: px4_icrlc_r\n", cpuexec_describe_context(space->machine));
326
309327   /* latch value */
310328   px4->frc_latch = px4->frc_value;
311329
r8640r8641
318336   px4_state *px4 = (px4_state *)space->machine->driver_data;
319337   int baud;
320338
321   logerror("%s: px4_ctrl1_w (0x%02x)\n", cpuexec_describe_context(space->machine), data);
339   if (VERBOSE)
340      logerror("%s: px4_ctrl1_w (0x%02x)\n", cpuexec_describe_context(space->machine), data);
322341
323342   /* baudrate generator */
324343   baud = data >> 4;
r8640r8641
337356{
338357   px4_state *px4 = (px4_state *)space->machine->driver_data;
339358
340   logerror("%s: px4_icrhc_r\n", cpuexec_describe_context(space->machine));
359   if (VERBOSE)
360      logerror("%s: px4_icrhc_r\n", cpuexec_describe_context(space->machine));
341361
342362   return (px4->frc_latch >> 8) & 0xff;
343363}
r8640r8641
347367{
348368   px4_state *px4 = (px4_state *)space->machine->driver_data;
349369
350   logerror("%s: px4_cmdr_w (0x%02x)\n", cpuexec_describe_context(space->machine), data);
370   if (VERBOSE)
371      logerror("%s: px4_cmdr_w (0x%02x)\n", cpuexec_describe_context(space->machine), data);
351372
352373   /* clear overflow interrupt? */
353374   if (BIT(data, 2))
r8640r8641
362383{
363384   px4_state *px4 = (px4_state *)space->machine->driver_data;
364385
365   logerror("%s: px4_icrlb_r\n", cpuexec_describe_context(space->machine));
386   if (VERBOSE)
387      logerror("%s: px4_icrlb_r\n", cpuexec_describe_context(space->machine));
366388
367389   return px4->icrb & 0xff;
368390}
r8640r8641
372394{
373395   px4_state *px4 = (px4_state *)space->machine->driver_data;
374396
375   logerror("%s: px4_ctrl2_w (0x%02x)\n", cpuexec_describe_context(space->machine), data);
397   if (VERBOSE)
398      logerror("%s: px4_ctrl2_w (0x%02x)\n", cpuexec_describe_context(space->machine), data);
376399
377400   /* bit 0, MIC, cassette output */
378401   cassette_output(px4->ext_cas, BIT(data, 0) ? -1.0 : +1.0);
r8640r8641
394417static READ8_HANDLER( px4_icrhb_r )
395418{
396419   px4_state *px4 = (px4_state *)space->machine->driver_data;
397   logerror("%s: px4_icrhb_r\n", cpuexec_describe_context(space->machine));
398420
421   if (VERBOSE)
422      logerror("%s: px4_icrhb_r\n", cpuexec_describe_context(space->machine));
423
399424   /* clear icf interrupt */
400425   px4->isr &= ~INT2_ICF;
401426   gapnit_interrupt(space->machine);
r8640r8641
407432static READ8_HANDLER( px4_isr_r )
408433{
409434   px4_state *px4 = (px4_state *)space->machine->driver_data;
410   logerror("%s: px4_isr_r\n", cpuexec_describe_context(space->machine));
411435
436   if (VERBOSE)
437      logerror("%s: px4_isr_r\n", cpuexec_describe_context(space->machine));
438
412439   return px4->isr;
413440}
414441
r8640r8641
416443static WRITE8_HANDLER( px4_ier_w )
417444{
418445   px4_state *px4 = (px4_state *)space->machine->driver_data;
419   logerror("%s: px4_ier_w (0x%02x)\n", cpuexec_describe_context(space->machine), data);
420446
447   if (VERBOSE)
448      logerror("%s: px4_ier_w (0x%02x)\n", cpuexec_describe_context(space->machine), data);
449
421450   px4->ier = data;
422451   gapnit_interrupt(space->machine);
423452}
r8640r8641
428457   px4_state *px4 = (px4_state *)space->machine->driver_data;
429458   UINT8 result = 0;
430459
431   logerror("%s: px4_str_r\n", cpuexec_describe_context(space->machine));
460   if (VERBOSE)
461      logerror("%s: px4_str_r\n", cpuexec_describe_context(space->machine));
432462
433463   result |= cassette_input(px4->ext_cas) > 0 ? 1 : 0;
434464   result |= 1 << 1;   /* BCRD, barcode reader input */
r8640r8641
472502   px4_state *px4 = (px4_state *)space->machine->driver_data;
473503   const address_space *space_program = cputag_get_address_space(space->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
474504
475   logerror("%s: px4_bankr_w (0x%02x)\n", cpuexec_describe_context(space->machine), data);
505   if (VERBOSE)
506      logerror("%s: px4_bankr_w (0x%02x)\n", cpuexec_describe_context(space->machine), data);
476507
477508   px4->bankr = data;
478509
r8640r8641
502533   case 0x0e: install_rom_capsule(space_program, 0x8000, "capsule2"); break;
503534
504535   default:
505      logerror("invalid bank switch value: 0x%02x\n", data >> 4);
536      if (VERBOSE)
537         logerror("invalid bank switch value: 0x%02x\n", data >> 4);
506538
507539   }
508540}
r8640r8641
511543static READ8_HANDLER( px4_sior_r )
512544{
513545   px4_state *px4 = (px4_state *)space->machine->driver_data;
514   logerror("%s: px4_sior_r\n", cpuexec_describe_context(space->machine));
515   logerror("sior = 0x%02x\n", px4->sior);
516546
547   if (VERBOSE)
548      logerror("%s: px4_sior_r 0x%02x\n", cpuexec_describe_context(space->machine), px4->sior);
549
517550   return px4->sior;
518551}
519552
r8640r8641
521554static WRITE8_HANDLER( px4_sior_w )
522555{
523556   px4_state *px4 = (px4_state *)space->machine->driver_data;
524   logerror("%s: px4_sior_w (0x%02x)\n", cpuexec_describe_context(space->machine), data);
525557
558   if (VERBOSE)
559      logerror("%s: px4_sior_w (0x%02x)\n", cpuexec_describe_context(space->machine), data);
560
526561   px4->sior = data;
527562
528563   switch (data)
529564   {
530   case 0x01: logerror("7508 cmd: Power OFF\n"); break;
565   case 0x01:
531566
567      if (VERBOSE)
568         logerror("7508 cmd: Power OFF\n");
569
570      break;
571
532572   case 0x02:
533      logerror("7508 cmd: Read Status\n");
534573
574      if (VERBOSE)
575         logerror("7508 cmd: Read Status\n");
576
535577      if (px4->interrupt_status != 0)
536578      {
537         logerror("> 7508 has interrupts pending: 0x%02x\n", px4->interrupt_status);
579         if (VERBOSE)
580            logerror("> 7508 has interrupts pending: 0x%02x\n", px4->interrupt_status);
538581
539582         /* signal the interrupt(s) */
540583         px4->sior = 0xc1 | px4->interrupt_status;
r8640r8641
553596
554597      break;
555598
556   case 0x03: logerror("7508 cmd: KB Reset\n"); break;
557   case 0x04: logerror("7508 cmd: KB Repeat Timer 1 Set\n"); break;
558   case 0x14: logerror("7508 cmd: KB Repeat Timer 2 Set\n"); break;
559   case 0x24: logerror("7508 cmd: KB Repeat Timer 1 Read\n"); break;
560   case 0x34: logerror("7508 cmd: KB Repeat Timer 2 Read\n"); break;
561   case 0x05: logerror("7508 cmd: KB Repeat OFF\n"); break;
562   case 0x15: logerror("7508 cmd: KB Repeat ON\n"); break;
599   case 0x03: if (VERBOSE) logerror("7508 cmd: KB Reset\n"); break;
600   case 0x04: if (VERBOSE) logerror("7508 cmd: KB Repeat Timer 1 Set\n"); break;
601   case 0x14: if (VERBOSE) logerror("7508 cmd: KB Repeat Timer 2 Set\n"); break;
602   case 0x24: if (VERBOSE) logerror("7508 cmd: KB Repeat Timer 1 Read\n"); break;
603   case 0x34: if (VERBOSE) logerror("7508 cmd: KB Repeat Timer 2 Read\n"); break;
604   case 0x05: if (VERBOSE) logerror("7508 cmd: KB Repeat OFF\n"); break;
605   case 0x15: if (VERBOSE) logerror("7508 cmd: KB Repeat ON\n"); break;
563606
564607   case 0x06:
565      logerror("7508 cmd: KB Interrupt OFF\n");
608
609      if (VERBOSE)
610         logerror("7508 cmd: KB Interrupt OFF\n");
611
566612      px4->key_int_enabled = FALSE;
567613      break;
568614
569615   case 0x16:
570      logerror("7508 cmd: KB Interrupt ON\n");
616
617      if (VERBOSE)
618         logerror("7508 cmd: KB Interrupt ON\n");
619
571620      px4->key_int_enabled = TRUE;
572621      break;
573622
574   case 0x07: logerror("7508 cmd: Clock Read\n"); break;
575   case 0x17: logerror("7508 cmd: Clock Write\n"); break;
623   case 0x07: if (VERBOSE) logerror("7508 cmd: Clock Read\n"); break;
624   case 0x17: if (VERBOSE) logerror("7508 cmd: Clock Write\n"); break;
576625
577626   case 0x08:
578      logerror("7508 cmd: Power Switch Read\n");
579627
628      if (VERBOSE)
629         logerror("7508 cmd: Power Switch Read\n");
630
580631      /* indicate that the power switch is in the "ON" position */
581632      px4->sior = 0x01;
582633      break;
583634
584   case 0x09: logerror("7508 cmd: Alarm Read\n"); break;
585   case 0x19: logerror("7508 cmd: Alarm Set\n"); break;
586   case 0x29: logerror("7508 cmd: Alarm OFF\n"); break;
587   case 0x39: logerror("7508 cmd: Alarm ON\n"); break;
635   case 0x09: if (VERBOSE) logerror("7508 cmd: Alarm Read\n"); break;
636   case 0x19: if (VERBOSE) logerror("7508 cmd: Alarm Set\n"); break;
637   case 0x29: if (VERBOSE) logerror("7508 cmd: Alarm OFF\n"); break;
638   case 0x39: if (VERBOSE) logerror("7508 cmd: Alarm ON\n"); break;
588639
589640   case 0x0a:
590      logerror("7508 cmd: DIP Switch Read\n");
641
642      if (VERBOSE)
643         logerror("7508 cmd: DIP Switch Read\n");
591644      px4->sior = input_port_read(space->machine, "dips");
592645      break;
593646
594   case 0x0b: logerror("7508 cmd: Stop Key Interrupt disable\n"); break;
595   case 0x1b: logerror("7508 cmd: Stop Key Interrupt enable\n"); break;
596   case 0x0c: logerror("7508 cmd: 7 chr. Buffer\n"); break;
597   case 0x1c: logerror("7508 cmd: 1 chr. Buffer\n"); break;
647   case 0x0b: if (VERBOSE) logerror("7508 cmd: Stop Key Interrupt disable\n"); break;
648   case 0x1b: if (VERBOSE) logerror("7508 cmd: Stop Key Interrupt enable\n"); break;
649   case 0x0c: if (VERBOSE) logerror("7508 cmd: 7 chr. Buffer\n"); break;
650   case 0x1c: if (VERBOSE) logerror("7508 cmd: 1 chr. Buffer\n"); break;
598651
599652   case 0x0d:
600      logerror("7508 cmd: 1 sec. Interrupt OFF\n");
653
654      if (VERBOSE)
655         logerror("7508 cmd: 1 sec. Interrupt OFF\n");
656
601657      px4->one_sec_int_enabled = FALSE;
602658      break;
603659
604660   case 0x1d:
605      logerror("7508 cmd: 1 sec. Interrupt ON\n");
661
662      if (VERBOSE)
663         logerror("7508 cmd: 1 sec. Interrupt ON\n");
664
606665      px4->one_sec_int_enabled = TRUE;
607666      break;
608667
609668   case 0x0e:
610      logerror("7508 cmd: KB Clear\n");
669
670      if (VERBOSE)
671         logerror("7508 cmd: KB Clear\n");
672
611673      px4->sior = 0xbf;
612674      break;
613675
614   case 0x0f: logerror("7508 cmd: System Reset\n"); break;
676   case 0x0f: if (VERBOSE) logerror("7508 cmd: System Reset\n"); break;
615677   }
616678}
617679
r8640r8641
624686static WRITE8_HANDLER( px4_vadr_w )
625687{
626688   px4_state *px4 = (px4_state *)space->machine->driver_data;
627   logerror("%s: px4_vadr_w (0x%02x)\n", cpuexec_describe_context(space->machine), data);
628689
690   if (VERBOSE)
691      logerror("%s: px4_vadr_w (0x%02x)\n", cpuexec_describe_context(space->machine), data);
692
629693   px4->vadr = data;
630694}
631695
r8640r8641
633697static WRITE8_HANDLER( px4_yoff_w )
634698{
635699   px4_state *px4 = (px4_state *)space->machine->driver_data;
636   logerror("%s: px4_yoff_w (0x%02x)\n", cpuexec_describe_context(space->machine), data);
637700
701   if (VERBOSE)
702      logerror("%s: px4_yoff_w (0x%02x)\n", cpuexec_describe_context(space->machine), data);
703
638704   px4->yoff = data;
639705}
640706
641707/* frame register */
642708static WRITE8_HANDLER( px4_fr_w )
643709{
644   logerror("%s: px4_fr_w (0x%02x)\n", cpuexec_describe_context(space->machine), data);
710   if (VERBOSE)
711      logerror("%s: px4_fr_w (0x%02x)\n", cpuexec_describe_context(space->machine), data);
645712}
646713
647714/* speed-up register */
648715static WRITE8_HANDLER( px4_spur_w )
649716{
650   logerror("%s: px4_spur_w (0x%02x)\n", cpuexec_describe_context(space->machine), data);
717   if (VERBOSE)
718      logerror("%s: px4_spur_w (0x%02x)\n", cpuexec_describe_context(space->machine), data);
651719}
652720
653721
r8640r8641
678746/* cartridge interface */
679747static READ8_HANDLER( px4_ctgif_r )
680748{
681   logerror("%s: px4_ctgif_r @ 0x%02x\n", cpuexec_describe_context(space->machine), offset);
749   if (VERBOSE)
750      logerror("%s: px4_ctgif_r @ 0x%02x\n", cpuexec_describe_context(space->machine), offset);
751
682752   return 0xff;
683753}
684754
685755/* cartridge interface */
686756static WRITE8_HANDLER( px4_ctgif_w )
687757{
688   logerror("%s: px4_ctgif_w (0x%02x @ 0x%02x)\n", cpuexec_describe_context(space->machine), data, offset);
758   if (VERBOSE)
759      logerror("%s: px4_ctgif_w (0x%02x @ 0x%02x)\n", cpuexec_describe_context(space->machine), data, offset);
689760}
690761
691762/* art data input register */
692763static READ8_HANDLER( px4_artdir_r )
693764{
694765   px4_state *px4 = (px4_state *)space->machine->driver_data;
695   logerror("%s: px4_artdir_r\n", cpuexec_describe_context(space->machine));
696766
767   if (VERBOSE)
768      logerror("%s: px4_artdir_r\n", cpuexec_describe_context(space->machine));
769
697770   return px4->artdir;
698771}
699772
r8640r8641
701774static WRITE8_HANDLER( px4_artdor_w )
702775{
703776   px4_state *px4 = (px4_state *)space->machine->driver_data;
704   logerror("%s: px4_artdor_w (0x%02x)\n", cpuexec_describe_context(space->machine), data);
705777
778   if (VERBOSE)
779      logerror("%s: px4_artdor_w (0x%02x)\n", cpuexec_describe_context(space->machine), data);
780
706781   /* clear ready */
707782   px4->artsr &= ~ART_TXRDY;
708783
r8640r8641
715790   px4_state *px4 = (px4_state *)space->machine->driver_data;
716791   UINT8 result = 0;
717792
718   logerror("%s: px4_artsr_r\n", cpuexec_describe_context(space->machine));
793   if (VERBOSE)
794      logerror("%s: px4_artsr_r\n", cpuexec_describe_context(space->machine));
719795
720796   result |= px4_rs232c_dsr(px4->rs232c_device) << 7;
721797
r8640r8641
726802static WRITE8_HANDLER( px4_artmr_w )
727803{
728804   px4_state *px4 = (px4_state *)space->machine->driver_data;
729   logerror("%s: px4_artmr_w (0x%02x)\n", cpuexec_describe_context(space->machine), data);
730805
806   if (VERBOSE)
807      logerror("%s: px4_artmr_w (0x%02x)\n", cpuexec_describe_context(space->machine), data);
808
731809   px4->artmr = data;
732810}
733811
r8640r8641
737815   px4_state *px4 = (px4_state *)space->machine->driver_data;
738816   UINT8 result = 0;
739817
740   logerror("%s: px4_iostr_r\n", cpuexec_describe_context(space->machine));
818   if (VERBOSE)
819      logerror("%s: px4_iostr_r\n", cpuexec_describe_context(space->machine));
741820
742821   result |= centronics_busy_r(px4->printer) << 0;
743822   result |= !centronics_pe_r(px4->printer) << 1;
r8640r8641
755834static WRITE8_HANDLER( px4_artcr_w )
756835{
757836   px4_state *px4 = (px4_state *)space->machine->driver_data;
758   logerror("%s: px4_artcr_w (0x%02x)\n", cpuexec_describe_context(space->machine), data);
759837
838   if (VERBOSE)
839      logerror("%s: px4_artcr_w (0x%02x)\n", cpuexec_describe_context(space->machine), data);
840
760841   px4->artcr = data;
761842
762843   /* bit 0, txe - transmit enable */
r8640r8641
787868static WRITE8_HANDLER( px4_swr_w )
788869{
789870   px4_state *px4 = (px4_state *)space->machine->driver_data;
790   logerror("%s: px4_swr_w (0x%02x)\n", cpuexec_describe_context(space->machine), data);
791871
872   if (VERBOSE)
873      logerror("%s: px4_swr_w (0x%02x)\n", cpuexec_describe_context(space->machine), data);
874
792875   px4->swr = data;
793876}
794877
r8640r8641
797880{
798881   px4_state *px4 = (px4_state *)space->machine->driver_data;
799882
800   logerror("%s: px4_ioctlr_w (0x%02x)\n", cpuexec_describe_context(space->machine), data);
883   if (VERBOSE)
884      logerror("%s: px4_ioctlr_w (0x%02x)\n", cpuexec_describe_context(space->machine), data);
801885
802886   centronics_strobe_w(px4->printer, !BIT(data, 0));
803887   centronics_prime_w(px4->printer, BIT(data, 1));
r8640r8641
851935         if ((scancode & 0xa0) == 0xa0)
852936            scancode |= down;
853937
854         logerror("upd7508: key callback, key=0x%02x\n", scancode);
938         if (VERBOSE)
939            logerror("upd7508: key callback, key=0x%02x\n", scancode);
855940
856941         break;
857942      }
r8640r8641
863948
864949      if (px4->key_int_enabled)
865950      {
866         logerror("upd7508: key interrupt\n");
951         if (VERBOSE)
952            logerror("upd7508: key interrupt\n");
953
867954         px4->isr |= INT0_7508;
868955         gapnit_interrupt(field->port->machine);
869956      }
r8640r8641
11001187   PORT_START("dips")
11011188
11021189   PORT_DIPNAME(0x0f, 0x0f, "Character set")
1103   PORT_DIPLOCATION("DIP:8,7,6,5")
1190   PORT_DIPLOCATION("PX-4 DIP:8,7,6,5")
11041191   PORT_DIPSETTING(0x0f, "ASCII")
11051192   PORT_DIPSETTING(0x0e, "France")
11061193   PORT_DIPSETTING(0x0d, "Germany")
r8640r8641
11351222/* US ASCII keyboard */
11361223static INPUT_PORTS_START( px4_h450a )
11371224   PORT_INCLUDE(px4_dips)
1225   PORT_INCLUDE(tf20)
11381226
11391227   PORT_START("keyboard_0")
11401228   PORT_BIT(0x00000001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED(key_callback, (void *)0) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(ESC))   // 00
r8640r8641
12351323/* item keyboard */
12361324static INPUT_PORTS_START( px4_h421a )
12371325   PORT_INCLUDE(px4_dips)
1326   PORT_INCLUDE(tf20)
12381327INPUT_PORTS_END
12391328
12401329
r8640r8641
13111400   MDRV_CARTSLOT_NOT_MANDATORY
13121401
13131402   /* tf20 floppy drive */
1314//  MDRV_TF20_ADD("floppy")
1403  MDRV_TF20_ADD("floppy")
13151404MACHINE_DRIVER_END
13161405
13171406static MACHINE_DRIVER_START( px4p )

Previous 509070 RevisionsNext 50


© 1998-2010 The MESS Team