Previous 15994 Revisions Next

r2497 Monday 28th April, 2008 at 21:05:07 UTC by Wilbert Pol
[PC FAMILY] Moved ppi code from machine/ibmpc.c to machine/pc.c.
[IBMPCJR] Added keyboard support.
[src/mess/drivers]pc.c
[src/mess/includes]ibmpc.h pc.h
[src/mess/machine]ibmpc.c pc.c

src/mess/includes/ibmpc.h
r2496r2497
77#ifndef IBMPC_H_
88#define IBMPC_H_
99
10#include "machine/8255ppi.h"
1110
12
1311/*----------- defined in machine/ibmpc.c -----------*/
1412
15extern const ppi8255_interface pc_ppi8255_interface;
16
1713READ8_HANDLER( pc_rtc_r );
1814WRITE8_HANDLER( pc_rtc_w );
1915
src/mess/includes/pc.h
r2496r2497
88#define PC_H_
99
1010#include "machine/ins8250.h"
11#include "machine/8255ppi.h"
1112
1213/*----------- defined in machine/pc.c -----------*/
1314
r2496r2497
1718extern const struct pic8259_interface pc_pic8259_master_config;
1819extern const struct pic8259_interface pc_pic8259_slave_config;
1920extern const ins8250_interface ibmpc_com_interface[4];
21extern const ppi8255_interface pc_ppi8255_interface;
22extern const ppi8255_interface pcjr_ppi8255_interface;
2023
2124void mess_init_pc_common(UINT32 flags, void (*set_keyb_int_func)(int), void (*set_hdc_int_func)(int,int));
2225
2326WRITE8_HANDLER( pc_nmi_enable_w );
27READ8_HANDLER( pcjr_nmi_enable_r );
2428
2529READ8_HANDLER( pc_page_r );
2630WRITE8_HANDLER( pc_page_w );
r2496r2497
3438DRIVER_INIT( pc1640 );
3539DRIVER_INIT( pc_vga );
3640DRIVER_INIT( t1000hx );
41DRIVER_INIT( pcjr );
3742
3843MACHINE_START( pc );
3944MACHINE_RESET( pc );
45MACHINE_RESET( pcjr );
4046
4147INTERRUPT_GEN( pc_frame_interrupt );
4248INTERRUPT_GEN( pc_vga_frame_interrupt );
src/mess/machine/ibmpc.c
r2496r2497
7373*/
7474
7575
76/*************************************************************************
77 *
78 *      PIO
79 *      parallel input output
80 *
81 *************************************************************************/
82static  READ8_HANDLER  ( pc_ppi_porta_r );
83static  READ8_HANDLER  ( pc_ppi_portb_r );
84static  READ8_HANDLER  ( pc_ppi_portc_r );
85static WRITE8_HANDLER ( pc_ppi_porta_w );
86static WRITE8_HANDLER ( pc_ppi_portb_w );
87static WRITE8_HANDLER ( pc_ppi_portc_w );
88
89/* PC-XT has a 8255 which is connected to keyboard and other
90status information */
91const ppi8255_interface pc_ppi8255_interface =
92{
93   pc_ppi_porta_r,
94   pc_ppi_portb_r,
95   pc_ppi_portc_r,
96   pc_ppi_porta_w,
97   pc_ppi_portb_w,
98   pc_ppi_portc_w
99};
100
101static struct {
102   int portc_switch_high;
103   int speaker;
104   int keyboard_disabled;
105   UINT8   portb;
106} pc_ppi={ 0 };
107
108 READ8_HANDLER (pc_ppi_porta_r)
109{
110   int data;
111
112   /* KB port A */
113   if (pc_ppi.keyboard_disabled)
114   {
115      /*   0  0 - no floppy drives
116       *   1  Not used
117       * 2-3  The number of memory banks on the system board
118       * 4-5  Display mode
119       *       11 = monochrome
120       *      10 - color 80x25
121       *      01 - color 40x25
122       * 6-7  The number of floppy disk drives
123       */
124      data = input_port_read_indexed(machine, 1);
125   }
126   else
127   {
128      data = pc_keyb_read();
129   }
130    PIO_LOG(1,"PIO_A_r",("$%02x\n", data));
131    return data;
132}
133
134 READ8_HANDLER (pc_ppi_portb_r )
135{
136   int data;
137
138   data = 0xff;
139   PIO_LOG(1,"PIO_B_r",("$%02x\n", data));
140   return data;
141}
142
143 READ8_HANDLER ( pc_ppi_portc_r )
144{
145   int timer2_output = pit8253_get_output( device_list_find_by_tag( machine->config->devicelist, PIT8253, "pit8253" ), 2 );
146   int data=0xff;
147
148   data&=~0x80; // no parity error
149   data&=~0x40; // no error on expansion board
150   /* KB port C: equipment flags */
151//   if (pc_port[0x61] & 0x08)
152   if (pc_ppi.portc_switch_high)
153   {
154      /* read hi nibble of S2 */
155      data = (data&0xf0)|((input_port_read_indexed(machine, 1) >> 4) & 0x0f);
156      PIO_LOG(1,"PIO_C_r (hi)",("$%02x\n", data));
157   }
158   else
159   {
160      /* read lo nibble of S2 */
161      data = (data&0xf0)|(input_port_read_indexed(machine, 1) & 0x0f);
162      PIO_LOG(1,"PIO_C_r (lo)",("$%02x\n", data));
163   }
164
165   if ( ! ( pc_ppi.portb & 0x08 ) ) {
166      double tap_val = cassette_input( image_from_devtype_and_index( IO_CASSETTE, 0 ) );
167
168      if ( tap_val < 0 ) {
169         data &= ~0x10;
170      } else {
171         data |= 0x10;
172      }
173   } else {
174      if ( pc_ppi.portb & 0x01 ) {
175         data = ( data & ~0x10 ) | ( timer2_output ? 0x10 : 0x00 );
176      }
177   }
178   data = ( data & ~0x20 ) | ( timer2_output ? 0x20 : 0x00 );
179
180   return data;
181}
182
183WRITE8_HANDLER ( pc_ppi_porta_w )
184{
185   /* KB controller port A */
186   PIO_LOG(1,"PIO_A_w",("$%02x\n", data));
187}
188
189WRITE8_HANDLER ( pc_ppi_portb_w )
190{
191   /* KB controller port B */
192   pc_ppi.portb = data;
193   pc_ppi.portc_switch_high = data & 0x08;
194   pc_ppi.keyboard_disabled = data & 0x80;
195   pit8253_gate_w( device_list_find_by_tag( machine->config->devicelist, PIT8253, "pit8253" ), 2, data & 1);
196   pc_sh_speaker(machine, data & 0x03);
197   pc_keyb_set_clock(data & 0x40);
198
199   cassette_change_state( image_from_devtype_and_index( IO_CASSETTE, 0 ), ( data & 0x08 ) ? CASSETTE_MOTOR_DISABLED : CASSETTE_MOTOR_ENABLED, CASSETTE_MASK_MOTOR);
200
201   if (data & 0x80)
202      pc_keyb_clear();
203}
204
205WRITE8_HANDLER ( pc_ppi_portc_w )
206{
207   /* KB controller port C */
208   PIO_LOG(1,"PIO_C_w",("$%02x\n", data));
209}
210
21176// damned old checkit doesn't test at standard adresses
21277// will do more when I have a program supporting it
21378static struct {
src/mess/machine/pc.c
r2496r2497
4343#include "includes/europc.h"
4444#include "includes/ibmpc.h"
4545#include "machine/pcshare.h"
46#include "devices/cassette.h"
4647#include "audio/pc.h"
4748
4849#include "machine/8237dma.h"
4950
5051
52#define VERBOSE_PIO 0   /* PIO (keyboard controller) */
53
54#define PIO_LOG(N,M,A) \
55   if(VERBOSE_PIO>=N){ if( M )logerror("%11.6f: %-24s",attotime_to_double(timer_get_time()),(char*)M ); logerror A; }
56
5157static struct {
5258   const device_config   *pic8259_master;
5359   const device_config   *pic8259_slave;
r2496r2497
7278
7379WRITE8_HANDLER(pc_page_w)
7480{
75   switch(offset % 4) {
81   switch(offset % 4)
82   {
7683   case 1:
7784      dma_offset[0][2] = data;
7885      break;
r2496r2497
111118}
112119
113120
114static DMA8237_CHANNEL_READ( pc_dma8237_fdc_dack_r ) {
121static DMA8237_CHANNEL_READ( pc_dma8237_fdc_dack_r )
122{
115123   return pc_fdc_dack_r();
116124}
117125
118126
119static DMA8237_CHANNEL_READ( pc_dma8237_hdc_dack_r ) {
127static DMA8237_CHANNEL_READ( pc_dma8237_hdc_dack_r )
128{
120129   return pc_hdc_dack_r();
121130}
122131
123132
124static DMA8237_CHANNEL_WRITE( pc_dma8237_fdc_dack_w ) {
133static DMA8237_CHANNEL_WRITE( pc_dma8237_fdc_dack_w )
134{
125135   pc_fdc_dack_w( data );
126136}
127137
128138
129static DMA8237_CHANNEL_WRITE( pc_dma8237_hdc_dack_w ) {
139static DMA8237_CHANNEL_WRITE( pc_dma8237_hdc_dack_w )
140{
130141   pc_hdc_dack_w( data );
131142}
132143
133144
134static DMA8237_OUT_EOP( pc_dma8237_out_eop ) {
145static DMA8237_OUT_EOP( pc_dma8237_out_eop )
146{
135147   pc_fdc_set_tc_state( state );
136148}
137149
r2496r2497
158170
159171static emu_timer   *pc_int_delay_timer;
160172
161static TIMER_CALLBACK( pc_delayed_pic8259_irq ) {
173static TIMER_CALLBACK( pc_delayed_pic8259_irq )
174{
162175   cpunum_set_input_line(pc_devices.pic8259_master->machine, 0, 0, param ? HOLD_LINE : CLEAR_LINE);
163176}
164177
165static PIC8259_SET_INT_LINE( pc_pic8259_master_set_int_line ) {
178static PIC8259_SET_INT_LINE( pc_pic8259_master_set_int_line )
179{
166180   timer_adjust_oneshot( pc_int_delay_timer, ATTOTIME_IN_CYCLES(1,0), interrupt );
167181//   cpunum_set_input_line(device->machine, 0, 0, interrupt ? HOLD_LINE : CLEAR_LINE);
168182}
169183
170184
171static PIC8259_SET_INT_LINE( pc_pic8259_slave_set_int_line ) {
185static PIC8259_SET_INT_LINE( pc_pic8259_slave_set_int_line )
186{
172187   pic8259_set_irq_line( pc_devices.pic8259_master, 2, interrupt);
173188}
174189
175190
176const struct pic8259_interface pc_pic8259_master_config = {
191const struct pic8259_interface pc_pic8259_master_config =
192{
177193   pc_pic8259_master_set_int_line
178194};
179195
180196
181const struct pic8259_interface pc_pic8259_slave_config = {
197const struct pic8259_interface pc_pic8259_slave_config =
198{
182199   pc_pic8259_slave_set_int_line
183200};
184201
r2496r2497
312329 *
313330 **********************************************************/
314331
315static const PC_LPT_CONFIG lpt_config[3]={
332static const PC_LPT_CONFIG lpt_config[3]=
333{
316334   {
317335      1,
318336      LPT_UNIDIRECTIONAL,
r2496r2497
330348   }
331349};
332350
333static const CENTRONICS_CONFIG cent_config[3]={
351static const CENTRONICS_CONFIG cent_config[3]=
352{
334353   {
335354      PRINTER_IBM,
336355      pc_lpt_handshake_in
r2496r2497
355374
356375static UINT8   nmi_enabled;
357376
358WRITE8_HANDLER( pc_nmi_enable_w ) {
377WRITE8_HANDLER( pc_nmi_enable_w )
378{
359379   logerror( "%08X: changing NMI state to %s\n", activecpu_get_pc(), data & 0x80 ? "enabled" : "disabled" );
360380
361381   nmi_enabled = data & 0x80;
362382}
363383
384/*************************************************************
385 *
386 * NMI handling and
387 * PCJR raw keybaord handling
388 *
389 *************************************************************/
390
391static struct {
392   UINT8      transferring;
393   UINT8      latch;
394   UINT32      raw_keyb_data;
395   int         signal_count;
396   emu_timer   *keyb_signal_timer;
397} pcjr_keyb;
398
399
400READ8_HANDLER( pcjr_nmi_enable_r )
401{
402   pcjr_keyb.latch = 0;
403
404   return nmi_enabled;
405}
406
407
408static TIMER_CALLBACK( pcjr_keyb_signal_callback )
409{
410      pcjr_keyb.raw_keyb_data = pcjr_keyb.raw_keyb_data >> 1;
411      pcjr_keyb.signal_count--;
412
413      if ( pcjr_keyb.signal_count <= 0 )
414      {
415         timer_adjust_periodic( pcjr_keyb.keyb_signal_timer, attotime_never, 0, attotime_never );
416         pcjr_keyb.transferring = 0;
417      }
418}
419
420
421static void pcjr_set_keyb_int(int state)
422{
423   if ( state )
424   {
425      UINT8   data = pc_keyb_read();
426      UINT8   parity = 0;
427      int      i;
428
429      /* Calculate the raw data */
430      for( i = 0; i < 8; i++ )
431      {
432         if ( ( 1 << i ) & data )
433         {
434            parity ^= 1;
435         }
436      }
437      pcjr_keyb.raw_keyb_data = 0;
438      pcjr_keyb.raw_keyb_data = ( pcjr_keyb.raw_keyb_data << 2 ) | ( parity ? 1 : 2 );
439      for( i = 0; i < 8; i++ )
440      {
441         pcjr_keyb.raw_keyb_data = ( pcjr_keyb.raw_keyb_data << 2 ) | ( ( data & 0x80 ) ? 1 : 2 );
442         data <<= 1;
443      }
444      /* Insert start bit */
445      pcjr_keyb.raw_keyb_data = ( pcjr_keyb.raw_keyb_data << 2 ) | 1;
446      pcjr_keyb.signal_count = 20 + 22;
447
448      /* we are now transferring a byte of keyboard data */
449      pcjr_keyb.transferring = 1;
450
451      /* Set timer */
452      timer_adjust_periodic( pcjr_keyb.keyb_signal_timer, ATTOTIME_IN_USEC(220), 0, ATTOTIME_IN_USEC(220) );
453
454      /* Trigger NMI */
455      if ( ! pcjr_keyb.latch )
456      {
457         pcjr_keyb.latch = 1;
458         if ( nmi_enabled & 0x80 )
459         {
460            cpunum_set_input_line( Machine, 0, INPUT_LINE_NMI, PULSE_LINE );
461         }
462      }
463   }
464}
465
466
467static void pcjr_keyb_init(void)
468{
469   pcjr_keyb.transferring = 0;
470   pcjr_keyb.latch = 0;
471   pcjr_keyb.raw_keyb_data = 0;
472   pcjr_keyb.keyb_signal_timer = timer_alloc( pcjr_keyb_signal_callback, NULL );
473   pc_keyb_set_clock( 1 );
474}
475
476
477
364478/**********************************************************
365479 *
480 * PPI8255 interface
481 *
482 **********************************************************/
483
484static struct {
485   int portc_switch_high;
486   int speaker;
487   int keyboard_disabled;
488   UINT8   portb;
489} pc_ppi={ 0 };
490
491
492static READ8_HANDLER (pc_ppi_porta_r)
493{
494   int data;
495
496   /* KB port A */
497   if (pc_ppi.keyboard_disabled)
498   {
499      /*   0  0 - no floppy drives
500       *   1  Not used
501       * 2-3  The number of memory banks on the system board
502       * 4-5  Display mode
503       *       11 = monochrome
504       *      10 - color 80x25
505       *      01 - color 40x25
506       * 6-7  The number of floppy disk drives
507       */
508      data = input_port_read_indexed(machine, 1);
509   }
510   else
511   {
512      data = pc_keyb_read();
513   }
514    PIO_LOG(1,"PIO_A_r",("$%02x\n", data));
515    return data;
516}
517
518
519static READ8_HANDLER (pc_ppi_portb_r )
520{
521   int data;
522
523   data = 0xff;
524   PIO_LOG(1,"PIO_B_r",("$%02x\n", data));
525   return data;
526}
527
528
529static READ8_HANDLER ( pc_ppi_portc_r )
530{
531   int timer2_output = pit8253_get_output( device_list_find_by_tag( machine->config->devicelist, PIT8253, "pit8253" ), 2 );
532   int data=0xff;
533
534   data&=~0x80; // no parity error
535   data&=~0x40; // no error on expansion board
536   /* KB port C: equipment flags */
537//   if (pc_port[0x61] & 0x08)
538   if (pc_ppi.portc_switch_high)
539   {
540      /* read hi nibble of S2 */
541      data = (data&0xf0)|((input_port_read_indexed(machine, 1) >> 4) & 0x0f);
542      PIO_LOG(1,"PIO_C_r (hi)",("$%02x\n", data));
543   }
544   else
545   {
546      /* read lo nibble of S2 */
547      data = (data&0xf0)|(input_port_read_indexed(machine, 1) & 0x0f);
548      PIO_LOG(1,"PIO_C_r (lo)",("$%02x\n", data));
549   }
550
551   if ( ! ( pc_ppi.portb & 0x08 ) )
552   {
553      double tap_val = cassette_input( image_from_devtype_and_index( IO_CASSETTE, 0 ) );
554
555      if ( tap_val < 0 )
556      {
557         data &= ~0x10;
558      }
559      else
560      {
561         data |= 0x10;
562      }
563   }
564   else
565   {
566      if ( pc_ppi.portb & 0x01 )
567      {
568         data = ( data & ~0x10 ) | ( timer2_output ? 0x10 : 0x00 );
569      }
570   }
571   data = ( data & ~0x20 ) | ( timer2_output ? 0x20 : 0x00 );
572
573   return data;
574}
575
576
577static WRITE8_HANDLER ( pc_ppi_porta_w )
578{
579   /* KB controller port A */
580   PIO_LOG(1,"PIO_A_w",("$%02x\n", data));
581}
582
583
584static WRITE8_HANDLER ( pc_ppi_portb_w )
585{
586   /* KB controller port B */
587   pc_ppi.portb = data;
588   pc_ppi.portc_switch_high = data & 0x08;
589   pc_ppi.keyboard_disabled = data & 0x80;
590   pit8253_gate_w( device_list_find_by_tag( machine->config->devicelist, PIT8253, "pit8253" ), 2, data & 1);
591   pc_sh_speaker(machine, data & 0x03);
592   pc_keyb_set_clock(data & 0x40);
593
594   cassette_change_state( image_from_devtype_and_index( IO_CASSETTE, 0 ), ( data & 0x08 ) ? CASSETTE_MOTOR_DISABLED : CASSETTE_MOTOR_ENABLED, CASSETTE_MASK_MOTOR);
595
596   if (data & 0x80)
597      pc_keyb_clear();
598}
599
600
601static WRITE8_HANDLER ( pc_ppi_portc_w )
602{
603   /* KB controller port C */
604   PIO_LOG(1,"PIO_C_w",("$%02x\n", data));
605}
606
607
608/* PC-XT has a 8255 which is connected to keyboard and other
609status information */
610const ppi8255_interface pc_ppi8255_interface =
611{
612   pc_ppi_porta_r,
613   pc_ppi_portb_r,
614   pc_ppi_portc_r,
615   pc_ppi_porta_w,
616   pc_ppi_portb_w,
617   pc_ppi_portc_w
618};
619
620
621static WRITE8_HANDLER ( pcjr_ppi_portb_w )
622{
623   /* KB controller port B */
624   pc_ppi.portb = data;
625   pc_ppi.portc_switch_high = data & 0x08;
626   pit8253_gate_w( device_list_find_by_tag( machine->config->devicelist, PIT8253, "pit8253" ), 2, data & 1);
627   pc_sh_speaker(machine, data & 0x03);
628
629   cassette_change_state( image_from_devtype_and_index( IO_CASSETTE, 0 ), ( data & 0x08 ) ? CASSETTE_MOTOR_DISABLED : CASSETTE_MOTOR_ENABLED, CASSETTE_MASK_MOTOR);
630}
631
632
633/*
634 * On a PCJR none of the port A bits are connected.
635 */
636static READ8_HANDLER (pcjr_ppi_porta_r )
637{
638   int data;
639
640   data = 0xff;
641   PIO_LOG(1,"PIO_A_r",("$%02x\n", data));
642   return data;
643}
644
645
646/*
647 * Port C connections on a PCJR (notes from schematics):
648 * PC0 - KYBD LATCH
649 * PC1 - MODEM CD INSTALLED
650 * PC2 - DISKETTE CD INSTALLED
651 * PC3 - ATR CD IN
652 * PC4 - cassette audio
653 * PC5 - OUT2 from 8253
654 * PC6 - KYBD IN
655 * PC7 - (keyboard) CABLE CONNECTED
656 */
657static READ8_HANDLER ( pcjr_ppi_portc_r )
658{
659   int timer2_output = pit8253_get_output( device_list_find_by_tag( machine->config->devicelist, PIT8253, "pit8253" ), 2 );
660   int data=0xff;
661
662   data&=~0x80;
663   data = ( data & ~0x01 ) | ( pcjr_keyb.latch ? 0x01: 0x00 );
664   if ( ! ( pc_ppi.portb & 0x08 ) )
665   {
666      double tap_val = cassette_input( image_from_devtype_and_index( IO_CASSETTE, 0 ) );
667
668      if ( tap_val < 0 )
669      {
670         data &= ~0x10;
671      }
672      else
673      {
674         data |= 0x10;
675      }
676   }
677   else
678   {
679      if ( pc_ppi.portb & 0x01 )
680      {
681         data = ( data & ~0x10 ) | ( timer2_output ? 0x10 : 0x00 );
682      }
683   }
684   data = ( data & ~0x20 ) | ( timer2_output ? 0x20 : 0x00 );
685   data = ( data & ~0x40 ) | ( ( pcjr_keyb.raw_keyb_data & 0x01 ) ? 0x40 : 0x00 );
686
687   return data;
688}
689
690
691const ppi8255_interface pcjr_ppi8255_interface =
692{
693   pcjr_ppi_porta_r,
694   pc_ppi_portb_r,
695   pcjr_ppi_portc_r,
696   pc_ppi_porta_w,
697   pcjr_ppi_portb_w,
698   pc_ppi_portc_w
699};
700
701
702/**********************************************************
703 *
366704 * NEC uPD765 floppy interface
367705 *
368706 **********************************************************/
r2496r2497
470808
471809DRIVER_INIT( t1000hx )
472810{
473   UINT8 *gfx = &memory_region(REGION_GFX1)[0x1000];
474   int i;
475    /* just a plain bit pattern for graphics data generation */
476    for (i = 0; i < 256; i++)
477      gfx[i] = i;
478811   mess_init_pc_common(PCCOMMON_KEYBOARD_PC, pc_set_keyb_int, pc_set_irq_line);
479812   pc_turbo_setup(0, 3, 0x02, 4.77/12, 1);
480813}
r2496r2497
520853}
521854
522855
856DRIVER_INIT( pcjr )
857{
858   mess_init_pc_common(PCCOMMON_KEYBOARD_PC, pcjr_set_keyb_int, pc_set_irq_line);
859}
523860
861
862
524863static void pc_map_vga_memory(offs_t begin, offs_t end, read8_machine_func rh, write8_machine_func wh)
525864{
526865   int buswidth;
r2496r2497
596935}
597936
598937
599MACHINE_START( pc ) {
938MACHINE_START( pc )
939{
600940   pc_fdc_init( &fdc_interface_nc );
601941}
602942
r2496r2497
615955}
616956
617957
958MACHINE_RESET( pcjr )
959{
960   MACHINE_RESET_CALL( pc );
961   pcjr_keyb_init();
962}
963
964
618965/**************************************************************************
619966 *
620967 *      Interrupt handlers.
r2496r2497
634981
635982INTERRUPT_GEN( pcjr_frame_interrupt )
636983{
637   pc_keyboard();
984   if ( pcjr_keyb.transferring == 0 )
985   {
986      pc_keyboard();
987   }
638988}
639989
src/mess/drivers/pc.c
r2496r2497
297297   AM_RANGE(0x0040, 0x0043) AM_DEVREADWRITE(PIT8253, "pit8253", pit8253_r, pit8253_w)
298298   AM_RANGE(0x0060, 0x0063) AM_DEVREADWRITE(PPI8255, "ppi8255", ppi8255_r, ppi8255_w)
299299   AM_RANGE(0x0080, 0x0087) AM_READWRITE(pc_page_r,            pc_page_w)
300   AM_RANGE(0x00a0, 0x00a0) AM_WRITE( pc_nmi_enable_w )
300   AM_RANGE(0x00a0, 0x00a0) AM_READWRITE( pcjr_nmi_enable_r, pc_nmi_enable_w )
301301   AM_RANGE(0x00c0, 0x00c0) AM_WRITE(                        SN76496_0_w)
302302   AM_RANGE(0x00f0, 0x00f7) AM_READWRITE(pc_fdc_r,               pcjr_fdc_w)
303303   AM_RANGE(0x0200, 0x0207) AM_READWRITE(pc_JOY_r,               pc_JOY_w)
r2496r2497
17341734   MDRV_CPU_PC(tandy1000, ibmpcjr, I8088, 4900000, pcjr_frame_interrupt)   /* TODO: Get correct cpu frequency, probably XTAL_14_31818MHz/3 */
17351735
17361736   MDRV_MACHINE_START(pc)
1737   MDRV_MACHINE_RESET(pc)
1737   MDRV_MACHINE_RESET(pcjr)
17381738
17391739   MDRV_DEVICE_ADD( "pit8253", PIT8253 )
17401740   MDRV_DEVICE_CONFIG( pcjr_pit8253_config )
r2496r2497
17491749   MDRV_DEVICE_CONFIG( pc_pic8259_slave_config )
17501750
17511751   MDRV_DEVICE_ADD( "ppi8255", PPI8255 )
1752   MDRV_DEVICE_CONFIG( pc_ppi8255_interface )
1752   MDRV_DEVICE_CONFIG( pcjr_ppi8255_interface )
17531753
17541754   MDRV_DEVICE_ADD( "ins8250_0", INS8250 )         /* TODO: Verify model */
17551755   MDRV_DEVICE_CONFIG( ibmpc_com_interface[0] )
r2496r2497
22232223COMP(  1988,   europc,      ibm5150,   0,      europc,     europc,      europc,     ibmpc,   "Schneider Rdf. AG",  "EURO PC", 0)
22242224
22252225// pcjr (better graphics, better sound)
2226COMP(  1983,   ibmpcjr,   ibm5150,   0,      ibmpcjr,    tandy1t,   t1000hx,    ibmpc,   "International Business Machines",  "IBM PC Jr", GAME_NOT_WORKING|GAME_IMPERFECT_COLORS )
2226COMP(  1983,   ibmpcjr,   ibm5150,   0,      ibmpcjr,    tandy1t,   pcjr,       ibmpc,   "International Business Machines",  "IBM PC Jr", GAME_NOT_WORKING|GAME_IMPERFECT_COLORS )
22272227COMP(  1987,   t1000hx,   ibm5150,   0,      t1000hx,    tandy1t,   t1000hx,   ibmpc,   "Tandy Radio Shack",  "Tandy 1000HX", 0)
22282228COMP(  1987,   t1000sx,   ibm5150,   0,      t1000hx,    tandy1t,   t1000hx,   ibmpc,   "Tandy Radio Shack",  "Tandy 1000SX", 0)
22292229

Previous 15994 Revisions Next


© 1998-2018 The MESS Team