Previous 15994 Revisions Next

r6259 Monday 2nd November, 2009 at 14:01:01 UTC by Curt Coder
[PC88] Removed BASIC dip switch hack.
[src/mess/drivers]pc8801.c
[src/mess/includes]pc8801.h
[src/mess/machine]pc8801.c

src/mess/includes/pc8801.h
r6258r6259
4747
4848WRITE8_HANDLER(pc8801_write_interrupt_level);
4949WRITE8_HANDLER(pc8801_write_interrupt_mask);
50READ8_HANDLER(pc88sr_inport_30);
5150READ8_HANDLER(pc88sr_inport_31);
5251READ8_HANDLER(pc88sr_inport_32);
5352WRITE8_HANDLER(pc88sr_outport_30);
src/mess/machine/pc8801.c
r6258r6259
187187   return r|0xc0;
188188}
189189
190READ8_HANDLER( pc88sr_inport_30 )
191     /* DIP-SW1
192    bit 0: BASIC selection (0 = N-BASIC, 1 = N88-BASIC)
193    bit 1: terminal mode (0 = terminal mode, 1 = BASIC mode)
194    bit 2: startup text width (0 = 80chars/line, 1 = 40chars/line)
195    bit 3: startup text height (0 = 25lines/screen, 1 = 20lines/screen)
196    bit 4: S parameter (0 = enable, 1 = disable)
197    bit 5: operation when recevied DEL code (0 = handle DEL code,
198                         1 = ignore DEL code)
199    bit 6: universal input port 1 (currently always 1)
200    bit 7: universal input port 2 (currently always 1)
201      */
202{
203  int r;
204
205  /* read DIP-SW */
206  r=input_port_read(space->machine, "DSW1")<<1;
207  /* change bit 0 according BASIC mode */
208  if(is_Nbasic) {
209    r&=0xfe;
210  } else {
211    r|=0x01;
212  }
213  /* force set bit 6, 7 */
214  r|=0xc0;
215  return r;
216}
217
218190READ8_HANDLER( pc88sr_inport_31 )
219191     /* DIP-SW2
220192    bit 0: serial parity (0 = enable, 1 = disable)
src/mess/drivers/pc8801.c
r6258r6259
138138   AM_RANGE(0x0f, 0x0f) AM_READ_PORT("KEY15")
139139   AM_RANGE(0x10, 0x10) AM_WRITE(pc88_rtc_w)
140140//   AM_RANGE(0x20, 0x21) AM_NOP                              /* RS-232C and cassette (not yet) */
141   AM_RANGE(0x30, 0x30) AM_READWRITE(pc88sr_inport_30, pc88sr_outport_30)   /* DIP-SW1 */
141   AM_RANGE(0x30, 0x30) AM_READ_PORT("DSW1") AM_WRITE(pc88sr_outport_30)
142142   AM_RANGE(0x31, 0x31) AM_READWRITE(pc88sr_inport_31, pc88sr_outport_31)   /* DIP-SW2 */
143143   AM_RANGE(0x32, 0x32) AM_READWRITE(pc88sr_inport_32, pc88sr_outport_32)
144144   AM_RANGE(0x34, 0x35) AM_WRITE(pc88sr_alu)
r6258r6259
222222- "Help" is mapped to 'F8'
223223 */
224224
225static INPUT_PORTS_START( pc88sr )
225static INPUT_PORTS_START( pc8001 )
226226   PORT_START("KEY0")
227227   PORT_BIT (0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0_PAD)      PORT_CHAR(UCHAR_MAMEKEY(0_PAD))
228228   PORT_BIT (0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1_PAD)      PORT_CHAR(UCHAR_MAMEKEY(1_PAD))
r6258r6259
351351   PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
352352
353353   PORT_START("DSW1")
354   PORT_DIPNAME( 0x01, 0x01, "Terminal mode" )
355   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
354   PORT_DIPNAME( 0x01, 0x00, "BASIC" )
355   PORT_DIPSETTING(    0x01, "N88-BASIC" )
356   PORT_DIPSETTING(    0x00, "N-BASIC" )
357   PORT_DIPNAME( 0x02, 0x02, "Terminal mode" )
358   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
356359   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
357   PORT_DIPNAME( 0x02, 0x00, "Text width" )
358   PORT_DIPSETTING(    0x02, "40 chars/line" )
360   PORT_DIPNAME( 0x04, 0x00, "Text width" )
361   PORT_DIPSETTING(    0x04, "40 chars/line" )
359362   PORT_DIPSETTING(    0x00, "80 chars/line" )
360   PORT_DIPNAME( 0x04, 0x00, "Text height" )
361   PORT_DIPSETTING(    0x04, "20 lines/screen" )
363   PORT_DIPNAME( 0x08, 0x00, "Text height" )
364   PORT_DIPSETTING(    0x08, "20 lines/screen" )
362365   PORT_DIPSETTING(    0x00, "25 lines/screen" )
363   PORT_DIPNAME( 0x08, 0x08, "Enable S parameter" )
364   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
365   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
366   PORT_DIPNAME( 0x10, 0x00, "Enable DEL code" )
366   PORT_DIPNAME( 0x10, 0x10, "Enable S parameter" )
367367   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
368368   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
369   PORT_DIPNAME( 0x20, 0x20, "Memory wait" )
369   PORT_DIPNAME( 0x20, 0x00, "Enable DEL code" )
370370   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
371371   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
372   PORT_DIPNAME( 0x40, 0x40, "Disable CMD SING" )
372   PORT_DIPNAME( 0x40, 0x40, "Memory wait" )
373373   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
374374   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
375   PORT_DIPNAME( 0x80, 0x80, "Disable CMD SING" )
376   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
377   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
375378
376379   PORT_START("DSW2")
377380   PORT_DIPNAME( 0x01, 0x01, "Parity generate" )
r6258r6259
439442   PORT_CONFSETTING(    0x0d, "4.1M (PIO-8234H-2M x 2 + PC-8801-02N x 1)" )
440443INPUT_PORTS_END
441444
445static INPUT_PORTS_START( pc88sr )
446   PORT_INCLUDE( pc8001 )
447
448   PORT_MODIFY("DSW1")
449   PORT_DIPNAME( 0x01, 0x01, "BASIC" )
450   PORT_DIPSETTING(    0x01, "N88-BASIC" )
451   PORT_DIPSETTING(    0x00, "N-BASIC" )
452INPUT_PORTS_END
453
442454/* Graphics Layouts */
443455
444456static const gfx_layout char_layout_40L_h =
r6258r6259
946958/* System Drivers */
947959
948960/*    YEAR  NAME      PARENT    COMPAT  MACHINE   INPUT    INIT  CONFIG  COMPANY FULLNAME */
949COMP( 1979, pc8001,    0,        0,     pc88srl,  pc88sr,  0,    0,   "NEC",  "PC-8001", GAME_NOT_WORKING )
950COMP( 1983, pc8001m2,  0,        0,     pc88srl,  pc88sr,  0,    0,   "NEC",  "PC-8001 Mk2", GAME_NOT_WORKING )   // not sure about this dump
961COMP( 1979, pc8001,    0,        0,     pc88srl,  pc8001,  0,    0,   "NEC",  "PC-8001", GAME_NOT_WORKING )
962COMP( 1983, pc8001m2,  0,        0,     pc88srl,  pc8001,  0,    0,   "NEC",  "PC-8001 Mk2", GAME_NOT_WORKING )   // not sure about this dump
951963
952964COMP( 1981, pc8801,    0,        0,     pc88srl,  pc88sr,  0,    0,   "NEC",  "PC-8801", GAME_NOT_WORKING )
953965COMP( 1983, pc88m2,    pc8801,   0,     pc88srl,  pc88sr,  0,    0,   "NEC",  "PC-8801 MkII", GAME_NOT_WORKING )   // not sure about this dump

Previous 15994 Revisions Next


© 1998-2018 The MESS Team