Previous 199869 Revisions Next

r22753 Friday 10th May, 2013 at 22:38:58 UTC by Carl
(mess) slotify pc joystick [Carl]
(mess) asst128 toggles tc in the dor (nw)
--
The asst128 still doesn't boot though it does run the boot sector now.  It seems to skip every other cylinder.
[src/mess/drivers]amstr_pc.c pc.c
[src/mess/includes]pc.h
[src/mess/machine]isa_sblaster.c isa_ssi2001.c isa_stereo_fx.c pc.c pc_joy.c pc_joy.h

trunk/src/mess/drivers/amstr_pc.c
r22752r22753
8787   AM_RANGE(0x0078, 0x0079) AM_READWRITE8(pc1640_mouse_x_r, pc1640_mouse_x_w, 0xffff)
8888   AM_RANGE(0x007a, 0x007b) AM_READWRITE8(pc1640_mouse_y_r, pc1640_mouse_y_w, 0xffff)
8989   AM_RANGE(0x0080, 0x0087) AM_READWRITE8(pc_page_r, pc_page_w, 0xffff)
90   AM_RANGE(0x0200, 0x0207) AM_DEVREADWRITE8("joy", pc_joy_device, joy_port_r, joy_port_w, 0xffff)
90   AM_RANGE(0x0200, 0x0207) AM_DEVREADWRITE8("pc_joy", pc_joy_device, joy_port_r, joy_port_w, 0xffff)
9191   AM_RANGE(0x0278, 0x027b) AM_READ8(pc200_port278_r, 0xffff) AM_DEVWRITE8_LEGACY("lpt_2", pc_lpt_w, 0x00ff)
9292   AM_RANGE(0x02e8, 0x02ef) AM_DEVREADWRITE8("ins8250_3", ins8250_device, ins8250_r, ins8250_w, 0xffff)
9393   AM_RANGE(0x02f8, 0x02ff) AM_DEVREADWRITE8("ins8250_1", ins8250_device, ins8250_r, ins8250_w, 0xffff)
r22752r22753
115115   AM_RANGE(0x0078, 0x0079) AM_READWRITE8(pc1640_mouse_x_r, pc1640_mouse_x_w, 0xffff)
116116   AM_RANGE(0x007a, 0x007b) AM_READWRITE8(pc1640_mouse_y_r, pc1640_mouse_y_w, 0xffff)
117117   AM_RANGE(0x0080, 0x0087) AM_READWRITE8(pc_page_r, pc_page_w, 0xffff)
118   AM_RANGE(0x0200, 0x0207) AM_DEVREADWRITE8("joy", pc_joy_device, joy_port_r, joy_port_w, 0xffff)
118   AM_RANGE(0x0200, 0x0207) AM_DEVREADWRITE8("pc_joy", pc_joy_device, joy_port_r, joy_port_w, 0xffff)
119119   AM_RANGE(0x0278, 0x027b) AM_READ8(pc200_port278_r, 0xffff) AM_DEVWRITE8_LEGACY("lpt_2", pc_lpt_w, 0x00ff)
120120   AM_RANGE(0x02e8, 0x02ef) AM_DEVREADWRITE8("ins8250_3", ins8250_device, ins8250_r,  ins8250_w, 0xffff)
121121   AM_RANGE(0x02f8, 0x02ff) AM_DEVREADWRITE8("ins8250_1", ins8250_device, ins8250_r, ins8250_w, 0xffff)
r22752r22753
297297
298298   MCFG_PC_FDC_XT_ADD("fdc")
299299
300   MCFG_PC_JOY_ADD("joy")
300   MCFG_PC_JOY_ADD("pc_joy")
301301
302302   MCFG_FLOPPY_DRIVE_ADD("fdc:0", ibmpc_floppies, "525dd", 0, ibmpc_floppy_formats)
303303   MCFG_FLOPPY_DRIVE_ADD("fdc:1", ibmpc_floppies, "525dd", 0, ibmpc_floppy_formats)
r22752r22753
370370
371371   MCFG_PC_FDC_XT_ADD("fdc")
372372
373   MCFG_PC_JOY_ADD("joy")
373   MCFG_PC_JOY_ADD("pc_joy")
374374
375375   MCFG_FLOPPY_DRIVE_ADD("fdc:0", ibmpc_floppies, "525dd", 0, ibmpc_floppy_formats)
376376   MCFG_FLOPPY_DRIVE_ADD("fdc:1", ibmpc_floppies, "525dd", 0, ibmpc_floppy_formats)
trunk/src/mess/drivers/pc.c
r22752r22753
194194   AM_RANGE(0x0060, 0x0063) AM_DEVREADWRITE("ppi8255", i8255_device, read, write)
195195   AM_RANGE(0x0080, 0x0087) AM_READWRITE(pc_page_r,            pc_page_w)
196196   AM_RANGE(0x00a0, 0x00a0) AM_WRITE(pc_nmi_enable_w )
197   AM_RANGE(0x0200, 0x0207) AM_DEVREADWRITE("joy", pc_joy_device, joy_port_r, joy_port_w)
197   AM_RANGE(0x0200, 0x0207) AM_DEVREADWRITE("pc_joy", pc_joy_device, joy_port_r, joy_port_w)
198198   AM_RANGE(0x0240, 0x0257) AM_READWRITE(pc_rtc_r,             pc_rtc_w)
199199   AM_RANGE(0x0278, 0x027b) AM_DEVREADWRITE_LEGACY("lpt_2", pc_lpt_r, pc_lpt_w)
200200   AM_RANGE(0x02e8, 0x02ef) AM_DEVREADWRITE("ins8250_3", ins8250_device, ins8250_r, ins8250_w)
r22752r22753
220220   AM_RANGE(0x0070, 0x007f) AM_RAM // needed for Poisk-2
221221   AM_RANGE(0x0080, 0x0087) AM_READWRITE8(pc_page_r,               pc_page_w, 0xffff)
222222   AM_RANGE(0x00a0, 0x00a1) AM_WRITE8(pc_nmi_enable_w, 0x00ff )
223   AM_RANGE(0x0200, 0x0207) AM_DEVREADWRITE8("joy", pc_joy_device, joy_port_r, joy_port_w, 0xffff)
223   AM_RANGE(0x0200, 0x0207) AM_DEVREADWRITE8("pc_joy", pc_joy_device, joy_port_r, joy_port_w, 0xffff)
224224   AM_RANGE(0x0240, 0x0257) AM_READWRITE8(pc_rtc_r,                pc_rtc_w, 0xffff)
225225   AM_RANGE(0x0278, 0x027b) AM_DEVREADWRITE8_LEGACY("lpt_2", pc_lpt_r, pc_lpt_w, 0xffff)
226226   AM_RANGE(0x02e8, 0x02ef) AM_DEVREADWRITE8("ins8250_3", ins8250_device, ins8250_r, ins8250_w, 0xffff)
r22752r22753
274274   AM_RANGE(0x03f8, 0x03ff) AM_DEVREADWRITE8("ins8250_0", ins8250_device, ins8250_r, ins8250_w, 0xffff)
275275ADDRESS_MAP_END
276276
277static ADDRESS_MAP_START(asst128_io, AS_IO, 16, pc_state)
278   ADDRESS_MAP_UNMAP_HIGH
279   AM_RANGE(0x0000, 0x000f) AM_DEVREADWRITE8("dma8237", am9517a_device, read, write, 0xffff)
280   AM_RANGE(0x0020, 0x0021) AM_DEVREADWRITE8_LEGACY("pic8259", pic8259_r, pic8259_w, 0xffff)
281   AM_RANGE(0x0040, 0x0043) AM_DEVREADWRITE8_LEGACY("pit8253", pit8253_r, pit8253_w, 0xffff)
282   AM_RANGE(0x0060, 0x0063) AM_DEVREADWRITE8("ppi8255", i8255_device, read, write, 0xffff)
283   AM_RANGE(0x0080, 0x0087) AM_READWRITE8(pc_page_r,               pc_page_w, 0xffff)
284   AM_RANGE(0x00a0, 0x00a1) AM_WRITE8( pc_nmi_enable_w, 0x00ff )
285//  AM_RANGE(0x0200, 0x0207) AM_READWRITE8_LEGACY(pc_JOY_r, pc_JOY_w, 0xffff)
286   AM_RANGE(0x0240, 0x0257) AM_READWRITE8(pc_rtc_r,                pc_rtc_w, 0xffff)
287//  AM_RANGE(0x02e8, 0x02ef) AM_DEVREADWRITE8("ins8250_3", ins8250_device, ins8250_r, ins8250_w, 0xffff)
288   AM_RANGE(0x02f8, 0x02ff) AM_DEVREADWRITE8("ins8250_1", ins8250_device, ins8250_r, ins8250_w, 0xffff)
289   AM_RANGE(0x0340, 0x0357) AM_NOP /* anonymous bios should not recogniced realtimeclock */
290   AM_RANGE(0x0378, 0x037f) AM_DEVREADWRITE8_LEGACY("lpt_0", pc_lpt_r, pc_lpt_w, 0xffff)
291//  AM_RANGE(0x03e8, 0x03ef) AM_DEVREADWRITE8("ins8250_2", ins8250_device, ins8250_r, ins8250_w, 0xffff)
292   AM_RANGE(0x03f2, 0x03f3) AM_WRITE8(asst128_fdc_dor_w, 0xffff)
293   AM_RANGE(0x03f4, 0x03f5) AM_DEVICE8("fdc:upd765", upd765a_device, map, 0xffff)
294   AM_RANGE(0x03f8, 0x03ff) AM_DEVREADWRITE8("ins8250_0", ins8250_device, ins8250_r, ins8250_w, 0xffff)
295ADDRESS_MAP_END
277296
278297static ADDRESS_MAP_START( ibm5550_map, AS_PROGRAM, 16, pc_state )
279298   ADDRESS_MAP_UNMAP_HIGH
r22752r22753
295314   AM_RANGE(0x0060, 0x0063) AM_DEVREADWRITE8("ppi8255", i8255_device, read, write, 0xffff)
296315   AM_RANGE(0x0080, 0x0087) AM_READWRITE8(pc_page_r,               pc_page_w, 0xffff)
297316   AM_RANGE(0x00a0, 0x00a1) AM_READWRITE8(unk_r, pc_nmi_enable_w, 0x00ff )
298   AM_RANGE(0x0200, 0x0207) AM_DEVREADWRITE8("joy", pc_joy_device, joy_port_r, joy_port_w, 0xffff)
317   AM_RANGE(0x0200, 0x0207) AM_DEVREADWRITE8("pc_joy", pc_joy_device, joy_port_r, joy_port_w, 0xffff)
299318   AM_RANGE(0x0240, 0x0257) AM_READWRITE8(pc_rtc_r,                pc_rtc_w, 0xffff)
300319   AM_RANGE(0x0278, 0x027b) AM_DEVREADWRITE8_LEGACY("lpt_2", pc_lpt_r, pc_lpt_w, 0xffff)
301320   AM_RANGE(0x02e8, 0x02ef) AM_DEVREADWRITE8("ins8250_3", ins8250_device, ins8250_r, ins8250_w, 0xffff)
r22752r22753
326345   AM_RANGE(0x0040, 0x0043) AM_DEVREADWRITE_LEGACY("pit8253", pit8253_r, pit8253_w)
327346   AM_RANGE(0x0060, 0x0063) AM_READWRITE(europc_pio_r,          europc_pio_w)
328347   AM_RANGE(0x0080, 0x0087) AM_READWRITE(pc_page_r,            pc_page_w)
329   AM_RANGE(0x0200, 0x0207) AM_DEVREADWRITE("joy", pc_joy_device, joy_port_r, joy_port_w)
348   AM_RANGE(0x0200, 0x0207) AM_DEVREADWRITE("pc_joy", pc_joy_device, joy_port_r, joy_port_w)
330349   AM_RANGE(0x0250, 0x025f) AM_READWRITE(europc_jim_r,          europc_jim_w)
331350   AM_RANGE(0x0278, 0x027b) AM_DEVREADWRITE_LEGACY("lpt_2", pc_lpt_r, pc_lpt_w)
332351   AM_RANGE(0x02e0, 0x02e0) AM_READ(europc_jim2_r)
r22752r22753
361380   AM_RANGE(0x0060, 0x0063) AM_READWRITE(tandy1000_pio_r,           tandy1000_pio_w)
362381   AM_RANGE(0x0080, 0x0087) AM_READWRITE(pc_page_r,                pc_page_w)
363382   AM_RANGE(0x00c0, 0x00c0) AM_DEVWRITE("sn76496", ncr7496_device, write)
364   AM_RANGE(0x0200, 0x0207) AM_DEVREADWRITE("joy", pc_joy_device, joy_port_r, joy_port_w)
383   AM_RANGE(0x0200, 0x0207) AM_DEVREADWRITE("pc_joy", pc_joy_device, joy_port_r, joy_port_w)
365384   AM_RANGE(0x02f8, 0x02ff) AM_DEVREADWRITE("ins8250_1", ins8250_device, ins8250_r, ins8250_w)
366385   AM_RANGE(0x0378, 0x037f) AM_READWRITE(pc_t1t_p37x_r,         pc_t1t_p37x_w)
367386   AM_RANGE(0x03bc, 0x03be) AM_DEVREADWRITE_LEGACY("lpt_0", pc_lpt_r, pc_lpt_w)
r22752r22753
391410   AM_RANGE(0x0060, 0x0063) AM_READWRITE8(tandy1000_pio_r,          tandy1000_pio_w, 0xffff)
392411   AM_RANGE(0x0080, 0x0087) AM_READWRITE8(pc_page_r,               pc_page_w, 0xffff)
393412   AM_RANGE(0x00c0, 0x00c1) AM_DEVWRITE8("sn76496",    ncr7496_device, write, 0xffff)
394   AM_RANGE(0x0200, 0x0207) AM_DEVREADWRITE8("joy", pc_joy_device, joy_port_r, joy_port_w, 0xffff)
413   AM_RANGE(0x0200, 0x0207) AM_DEVREADWRITE8("pc_joy", pc_joy_device, joy_port_r, joy_port_w, 0xffff)
395414   AM_RANGE(0x02f8, 0x02ff) AM_DEVREADWRITE8("ins8250_1", ins8250_device, ins8250_r, ins8250_w, 0xffff)
396415   AM_RANGE(0x0378, 0x037f) AM_READWRITE8(pc_t1t_p37x_r,            pc_t1t_p37x_w, 0xffff)
397416   AM_RANGE(0x03bc, 0x03bf) AM_DEVREADWRITE8_LEGACY("lpt_0", pc_lpt_r, pc_lpt_w, 0xffff)
r22752r22753
423442   AM_RANGE(0x0060, 0x0063) AM_READWRITE8(tandy1000_pio_r,         tandy1000_pio_w, 0xffff)
424443   AM_RANGE(0x0080, 0x0087) AM_READWRITE8(pc_page_r,               pc_page_w, 0xffff)
425444   AM_RANGE(0x00c0, 0x00c1) AM_DEVWRITE8("sn76496", ncr7496_device, write, 0xffff)
426   AM_RANGE(0x0200, 0x0207) AM_DEVREADWRITE8("joy", pc_joy_device, joy_port_r, joy_port_w, 0xffff)
445   AM_RANGE(0x0200, 0x0207) AM_DEVREADWRITE8("pc_joy", pc_joy_device, joy_port_r, joy_port_w, 0xffff)
427446   AM_RANGE(0x02f8, 0x02ff) AM_DEVREADWRITE8("ins8250_1", ins8250_device, ins8250_r, ins8250_w, 0xffff)
428447   AM_RANGE(0x0378, 0x037f) AM_READWRITE8(pc_t1t_p37x_r,           pc_t1t_p37x_w, 0xffff)
429448   AM_RANGE(0x03bc, 0x03bf) AM_DEVREADWRITE8_LEGACY("lpt_0", pc_lpt_r, pc_lpt_w, 0xffff)
r22752r22753
455474   AM_RANGE(0x00c0, 0x00c0) AM_DEVWRITE("sn76496", sn76496_device, write)
456475   AM_RANGE(0x00f2, 0x00f2) AM_WRITE(pcjr_fdc_dor_w)
457476   AM_RANGE(0x00f4, 0x00f5) AM_DEVICE("upd765", upd765a_device, map)
458   AM_RANGE(0x0200, 0x0207) AM_DEVREADWRITE("joy", pc_joy_device, joy_port_r, joy_port_w)
477   AM_RANGE(0x0200, 0x0207) AM_DEVREADWRITE("pc_joy", pc_joy_device, joy_port_r, joy_port_w)
459478   AM_RANGE(0x02f8, 0x02ff) AM_DEVREADWRITE("ins8250_1", ins8250_device, ins8250_r, ins8250_w)
460479   AM_RANGE(0x0378, 0x037f) AM_READWRITE(pc_t1t_p37x_r,         pc_t1t_p37x_w)
461480   AM_RANGE(0x03bc, 0x03be) AM_DEVREADWRITE_LEGACY("lpt_0", pc_lpt_r, pc_lpt_w)
r22752r22753
9941013   MCFG_PC_LPT_ADD("lpt_0", pc_lpt_config)
9951014   MCFG_PC_LPT_ADD("lpt_1", pc_lpt_config)
9961015   MCFG_PC_LPT_ADD("lpt_2", pc_lpt_config)
997   MCFG_PC_JOY_ADD("joy")
1016   MCFG_PC_JOY_ADD("pc_joy")
9981017
9991018   MCFG_PC_FDC_XT_ADD("fdc")
10001019
r22752r22753
10601079   MCFG_RS232_PORT_ADD( "serport1", ibm5150_serport_config[1], ibm5150_com, NULL, NULL )
10611080   MCFG_RS232_PORT_ADD( "serport2", ibm5150_serport_config[2], ibm5150_com, NULL, NULL )
10621081   MCFG_RS232_PORT_ADD( "serport3", ibm5150_serport_config[3], ibm5150_com, NULL, NULL )
1063   MCFG_PC_JOY_ADD("joy")
1082   MCFG_PC_JOY_ADD("pc_joy")
10641083
10651084   /* video hardware */
10661085   MCFG_FRAGMENT_ADD( pcvideo_aga )
r22752r22753
11271146   MCFG_PC_LPT_ADD("lpt_0", pc_lpt_config)
11281147   MCFG_PC_LPT_ADD("lpt_1", pc_lpt_config)
11291148   MCFG_PC_LPT_ADD("lpt_2", pc_lpt_config)
1130   MCFG_PC_JOY_ADD("joy")
1149   MCFG_PC_JOY_ADD("pc_joy")
11311150
11321151   MCFG_PC_FDC_XT_ADD("fdc")
11331152
r22752r22753
11811200   MCFG_PC_LPT_ADD("lpt_0", pc_lpt_config)
11821201   MCFG_PC_LPT_ADD("lpt_1", pc_lpt_config)
11831202   MCFG_PC_LPT_ADD("lpt_2", pc_lpt_config)
1184   MCFG_PC_JOY_ADD("joy")
1203   MCFG_PC_JOY_ADD("pc_joy")
11851204
11861205   MCFG_PC_FDC_XT_ADD("fdc")
11871206   MCFG_FLOPPY_DRIVE_ADD("fdc:0", ibmpc_floppies, "35dd", 0, pc_state::floppy_formats)
r22752r22753
12301249   MCFG_PC_LPT_ADD("lpt_0", pc_lpt_config)
12311250   MCFG_PC_LPT_ADD("lpt_1", pc_lpt_config)
12321251   MCFG_PC_LPT_ADD("lpt_2", pc_lpt_config)
1233   MCFG_PC_JOY_ADD("joy")
1252   MCFG_PC_JOY_ADD("pc_joy")
12341253
12351254   MCFG_PC_FDC_XT_ADD("fdc")
12361255   MCFG_FLOPPY_DRIVE_ADD("fdc:0", ibmpc_floppies, "35dd", 0, pc_state::floppy_formats)
r22752r22753
12991318   MCFG_PC_LPT_ADD("lpt_0", pc_lpt_config)
13001319   MCFG_PC_LPT_ADD("lpt_1", pc_lpt_config)
13011320   MCFG_PC_LPT_ADD("lpt_2", pc_lpt_config)
1302   MCFG_PC_JOY_ADD("joy")
1321   MCFG_PC_JOY_ADD("pc_joy")
13031322
13041323   /* cassette */
13051324   MCFG_CASSETTE_ADD( "cassette", ibm5150_cassette_interface )
r22752r22753
14991518   MCFG_RAM_DEFAULT_SIZE("640K")
15001519MACHINE_CONFIG_END
15011520
1521static MACHINE_CONFIG_DERIVED( asst128, iskr1031 )
1522   MCFG_CPU_REPLACE("maincpu", I8086, 4772720)
1523   MCFG_CPU_PROGRAM_MAP(iskr1031_map)
1524   MCFG_CPU_IO_MAP(asst128_io)
1525MACHINE_CONFIG_END
15021526
15031527static MACHINE_CONFIG_START( iskr3104, pc_state )
15041528   /* basic machine hardware */
r22752r22753
15421566   MCFG_PC_LPT_ADD("lpt_0", pc_lpt_config)
15431567   MCFG_PC_LPT_ADD("lpt_1", pc_lpt_config)
15441568   MCFG_PC_LPT_ADD("lpt_2", pc_lpt_config)
1545   MCFG_PC_JOY_ADD("joy")
1569   MCFG_PC_JOY_ADD("pc_joy")
15461570
15471571   MCFG_PC_FDC_XT_ADD("fdc")
15481572
r22752r22753
15981622   MCFG_PC_LPT_ADD("lpt_0", pc_lpt_config)
15991623   MCFG_PC_LPT_ADD("lpt_1", pc_lpt_config)
16001624   MCFG_PC_LPT_ADD("lpt_2", pc_lpt_config)
1601   MCFG_PC_JOY_ADD("joy")
1625   MCFG_PC_JOY_ADD("pc_joy")
16021626
16031627   MCFG_PC_FDC_XT_ADD("fdc")
16041628
r22752r22753
16531677   MCFG_PC_LPT_ADD("lpt_0", pc_lpt_config)
16541678   MCFG_PC_LPT_ADD("lpt_1", pc_lpt_config)
16551679   MCFG_PC_LPT_ADD("lpt_2", pc_lpt_config)
1656   MCFG_PC_JOY_ADD("joy")
1680   MCFG_PC_JOY_ADD("pc_joy")
16571681
16581682   MCFG_PC_FDC_XT_ADD("fdc")
16591683
r22752r22753
17081732   MCFG_PC_LPT_ADD("lpt_0", pc_lpt_config)
17091733   MCFG_PC_LPT_ADD("lpt_1", pc_lpt_config)
17101734   MCFG_PC_LPT_ADD("lpt_2", pc_lpt_config)
1711   MCFG_PC_JOY_ADD("joy")
1735   MCFG_PC_JOY_ADD("pc_joy")
17121736
17131737   MCFG_PC_FDC_XT_ADD("fdc")
17141738
r22752r22753
17631787   MCFG_PC_LPT_ADD("lpt_0", pc_lpt_config)
17641788   MCFG_PC_LPT_ADD("lpt_1", pc_lpt_config)
17651789   MCFG_PC_LPT_ADD("lpt_2", pc_lpt_config)
1766   MCFG_PC_JOY_ADD("joy")
1790   MCFG_PC_JOY_ADD("pc_joy")
17671791
17681792   MCFG_PC_FDC_XT_ADD("fdc")
17691793
r22752r22753
23662390COMP( 1989, iskr1031,   ibm5150,    0,          iskr1031,   pccga, pc_state,      pccga,      "Schetmash", "Iskra 1031", GAME_NOT_WORKING)
23672391COMP( 1989, iskr1030m,  ibm5150,    0,          iskr1031,   pccga, pc_state,      pccga,      "Schetmash", "Iskra 1030M", GAME_NOT_WORKING)
23682392COMP( 1992, iskr3104,   ibm5150,    0,          iskr3104,   pcega, pc_state,      pccga,      "Schetmash", "Iskra 3104", GAME_NOT_WORKING)
2369COMP( 198?, asst128,    ibm5150,    0,          iskr1031,   pccga, pc_state,      pccga,      "Schetmash", "Assistent 128", GAME_NOT_WORKING)
2393COMP( 198?, asst128,    ibm5150,    0,          asst128,    pccga, pc_state,      pccga,      "Schetmash", "Assistent 128", GAME_NOT_WORKING)
23702394COMP( 1987, ec1840,     ibm5150,    0,          iskr1031,   pccga, pc_state,      pccga,      "<unknown>", "EC-1840", GAME_NOT_WORKING)
23712395COMP( 1987, ec1841,     ibm5150,    0,          ec1841,     pccga, pc_state,      pccga,      "<unknown>", "EC-1841", GAME_NOT_WORKING)
23722396COMP( 1989, ec1845,     ibm5150,    0,          iskr1031,   pccga, pc_state,      pccga,      "<unknown>", "EC-1845", GAME_NOT_WORKING)
trunk/src/mess/machine/pc.c
r22752r22753
13221322   return data;
13231323}
13241324
1325WRITE8_MEMBER(pc_state::asst128_fdc_dor_w)
1326{
1327   pc_fdc_xt_device *fdc = machine().device<pc_fdc_xt_device>("fdc");
13251328
1329   fdc->tc_w((data & 0x80) == 0x80);
1330   fdc->dor_w(space, offset, data, mem_mask);
1331}
1332
13261333/**********************************************************
13271334 *
13281335 * Initialization code
trunk/src/mess/machine/isa_sblaster.c
r22752r22753
107107   MCFG_SOUND_ADD("sbdacr", DAC, 0)
108108   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.00)
109109
110   MCFG_PC_JOY_ADD("joy")
110   MCFG_PC_JOY_ADD("pc_joy")
111111   MCFG_SERIAL_PORT_ADD("mdin", midiin_intf, midiin_slot, "midiin", NULL)
112112   MCFG_SERIAL_PORT_ADD("mdout", midiout_intf, midiout_slot, "midiout", NULL)
113113MACHINE_CONFIG_END
r22752r22753
125125   MCFG_SOUND_ADD("sbdacr", DAC, 0)
126126   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.00)
127127
128   MCFG_PC_JOY_ADD("joy")
128   MCFG_PC_JOY_ADD("pc_joy")
129129   MCFG_SERIAL_PORT_ADD("mdin", midiin_intf, midiin_slot, "midiin", NULL)
130130   MCFG_SERIAL_PORT_ADD("mdout", midiout_intf, midiout_slot, "midiout", NULL)
131131MACHINE_CONFIG_END
r22752r22753
143143   MCFG_SOUND_ADD("sbdacr", DAC, 0)
144144   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.00)
145145
146   MCFG_PC_JOY_ADD("joy")
146   MCFG_PC_JOY_ADD("pc_joy")
147147   MCFG_SERIAL_PORT_ADD("mdin", midiin_intf, midiin_slot, "midiin", NULL)
148148   MCFG_SERIAL_PORT_ADD("mdout", midiout_intf, midiout_slot, "midiout", NULL)
149149MACHINE_CONFIG_END
r22752r22753
11221122   device_serial_interface(mconfig, *this),
11231123   m_dacl(*this, "sbdacl"),
11241124   m_dacr(*this, "sbdacr"),
1125   m_joy(*this, "joy"),
1125   m_joy(*this, "pc_joy"),
11261126   m_mdout(*this, "mdout")
11271127{
11281128}
r22752r22753
11641164
11651165void sb8_device::device_start()
11661166{
1167   m_isa->install_device(                   0x0200, 0x0207, 0, 0, read8_delegate(FUNC(pc_joy_device::joy_port_r), subdevice<pc_joy_device>("joy")), write8_delegate(FUNC(pc_joy_device::joy_port_w), subdevice<pc_joy_device>("joy")));
1167   m_isa->install_device(                   0x0200, 0x0207, 0, 0, read8_delegate(FUNC(pc_joy_device::joy_port_r), subdevice<pc_joy_device>("pc_joy")), write8_delegate(FUNC(pc_joy_device::joy_port_w), subdevice<pc_joy_device>("pc_joy")));
11681168   m_isa->install_device(                   0x0226, 0x0227, 0, 0, read8_delegate(FUNC(sb_device::dsp_reset_r), this), write8_delegate(FUNC(sb_device::dsp_reset_w), this));
11691169   m_isa->install_device(                   0x022a, 0x022b, 0, 0, read8_delegate(FUNC(sb_device::dsp_data_r), this), write8_delegate(FUNC(sb_device::dsp_data_w), this) );
11701170   m_isa->install_device(                   0x022c, 0x022d, 0, 0, read8_delegate(FUNC(sb_device::dsp_wbuf_status_r), this), write8_delegate(FUNC(sb_device::dsp_cmd_w), this) );
r22752r22753
12221222
12231223void sb16_device::device_start()
12241224{
1225   m_isa->install_device(                   0x0200, 0x0207, 0, 0, read8_delegate(FUNC(pc_joy_device::joy_port_r), subdevice<pc_joy_device>("joy")), write8_delegate(FUNC(pc_joy_device::joy_port_w), subdevice<pc_joy_device>("joy")));
1225   m_isa->install_device(                   0x0200, 0x0207, 0, 0, read8_delegate(FUNC(pc_joy_device::joy_port_r), subdevice<pc_joy_device>("pc_joy")), write8_delegate(FUNC(pc_joy_device::joy_port_w), subdevice<pc_joy_device>("pc_joy")));
12261226   m_isa->install_device(                   0x0224, 0x0225, 0, 0, read8_delegate(FUNC(sb16_device::mixer_r), this), write8_delegate(FUNC(sb16_device::mixer_w), this));
12271227   m_isa->install_device(                   0x0226, 0x0227, 0, 0, read8_delegate(FUNC(sb_device::dsp_reset_r), this), write8_delegate(FUNC(sb_device::dsp_reset_w), this));
12281228   m_isa->install_device(                   0x022a, 0x022b, 0, 0, read8_delegate(FUNC(sb_device::dsp_data_r), this), write8_delegate(FUNC(sb_device::dsp_data_w), this) );
trunk/src/mess/machine/isa_ssi2001.c
r22752r22753
88   MCFG_SPEAKER_STANDARD_MONO("mono")
99   MCFG_SOUND_ADD("sid6581", MOS6581, XTAL_14_31818MHz/16)
1010   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
11   MCFG_PC_JOY_ADD("joy")
11   MCFG_PC_JOY_ADD("pc_joy")
1212MACHINE_CONFIG_END
1313
1414machine_config_constructor ssi2001_device::device_mconfig_additions() const
r22752r22753
1919ssi2001_device::ssi2001_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
2020   device_t(mconfig, ISA8_SSI2001, "Innovation SSI-2001 Audio Adapter", tag, owner, clock, "ssi2001", __FILE__),
2121   device_isa8_card_interface(mconfig, *this),
22   m_joy(*this, "joy"),
22   m_joy(*this, "pc_joy"),
2323   m_sid(*this, "sid6581")
2424{
2525}
r22752r22753
2727void ssi2001_device::device_start()
2828{
2929   set_isa_device();
30   m_isa->install_device(0x0200, 0x0207, 0, 0, read8_delegate(FUNC(pc_joy_device::joy_port_r), subdevice<pc_joy_device>("joy")), write8_delegate(FUNC(pc_joy_device::joy_port_w), subdevice<pc_joy_device>("joy")));
30   m_isa->install_device(0x0200, 0x0207, 0, 0, read8_delegate(FUNC(pc_joy_device::joy_port_r), subdevice<pc_joy_device>("pc_joy")), write8_delegate(FUNC(pc_joy_device::joy_port_w), subdevice<pc_joy_device>("pc_joy")));
3131   m_isa->install_device(0x0280, 0x029F, 0, 0, read8_delegate(FUNC(mos6581_device::read), subdevice<mos6581_device>("sid6581")), write8_delegate(FUNC(mos6581_device::write), subdevice<mos6581_device>("sid6581")));
3232}
3333
trunk/src/mess/machine/isa_stereo_fx.c
r22752r22753
123123   MCFG_SOUND_ADD("dacr", DAC, 0)
124124   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.00)
125125
126   MCFG_PC_JOY_ADD("joy")
126   MCFG_PC_JOY_ADD("pc_joy")
127127MACHINE_CONFIG_END
128128
129129const rom_entry *stereo_fx_device::device_rom_region() const
r22752r22753
195195   device_isa8_card_interface(mconfig, *this),
196196   m_dacl(*this, "dacl"),
197197   m_dacr(*this, "dacr"),
198   m_joy(*this, "joy"),
198   m_joy(*this, "pc_joy"),
199199   m_cpu(*this, "stereo_fx_cpu")
200200{
201201   m_t1 = 0;
r22752r22753
204204void stereo_fx_device::device_start()
205205{
206206   set_isa_device();
207   m_isa->install_device(0x0200, 0x0207, 0, 0, read8_delegate(FUNC(pc_joy_device::joy_port_r), subdevice<pc_joy_device>("joy")), write8_delegate(FUNC(pc_joy_device::joy_port_w), subdevice<pc_joy_device>("joy")));
207   m_isa->install_device(0x0200, 0x0207, 0, 0, read8_delegate(FUNC(pc_joy_device::joy_port_r), subdevice<pc_joy_device>("pc_joy")), write8_delegate(FUNC(pc_joy_device::joy_port_w), subdevice<pc_joy_device>("pc_joy")));
208208   m_isa->install_device(0x0226, 0x0227, 0, 0, read8_delegate(FUNC(stereo_fx_device::invalid_r), this), write8_delegate(FUNC(stereo_fx_device::dsp_reset_w), this));
209209   m_isa->install_device(0x022a, 0x022b, 0, 0, read8_delegate(FUNC(stereo_fx_device::dsp_data_r), this), write8_delegate(FUNC(stereo_fx_device::invalid_w), this) );
210210   m_isa->install_device(0x022c, 0x022d, 0, 0, read8_delegate(FUNC(stereo_fx_device::dsp_wbuf_status_r), this), write8_delegate(FUNC(stereo_fx_device::dsp_cmd_w), this) );
trunk/src/mess/machine/pc_joy.c
r22752r22753
66 *
77 *************************************************************************/
88
9#include "emu.h"
109#include "pc_joy.h"
1110
11const device_type PC_JOY = &device_creator<pc_joy_device>;
12
13pc_joy_device::pc_joy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
14   device_t(mconfig, PC_JOY, "PC joystick port", tag, owner, clock, "pc_joy", __FILE__),
15   device_slot_interface(mconfig, *this)
16{
17}
18
1219READ8_MEMBER ( pc_joy_device::joy_port_r )
1320{
14   UINT8 data = 0xf;
15   int delta;
16   attotime new_time = machine().time();
17   delta = ((new_time - m_stime) * 256 * 1000).seconds;
21   int delta = ((machine().time() - m_stime) * 256 * 1000).seconds;
1822
19   data = m_btn->read() ^ 0xf0;
23   if(!m_dev)
24      return 0xf0;
2025
21   /* timer overflow? Nope, otherwise some HWs can't verify the port properly */
22   //if ((new_time - JOY_time) > attotime::from_msec(10))
23   //{
24   //}
25   //else
26   return (m_dev->btn() << 4) | (m_dev->y2(delta) << 3) | (m_dev->x2(delta) << 2) | (m_dev->y1(delta) << 1) | m_dev->x1(delta);
27}
2628
27   if (m_x1->read() < delta) data &= ~0x01;
28   if (m_y1->read() < delta) data &= ~0x02;
29   if (m_x2->read() < delta) data &= ~0x04;
30   if (m_y2->read() < delta) data &= ~0x08;
31   return data;
29WRITE8_MEMBER ( pc_joy_device::joy_port_w )
30{
31   m_stime = machine().time();
32   m_dev->port_write();
3233}
3334
35void pc_joy_device::device_config_complete()
36{
37   m_dev = dynamic_cast<device_pc_joy_interface *>(get_card_device());
38}
3439
40device_pc_joy_interface::device_pc_joy_interface(const machine_config &mconfig, device_t &device) :
41   device_slot_card_interface(mconfig, device)
42{
43}
3544
36WRITE8_MEMBER ( pc_joy_device::joy_port_w )
45device_pc_joy_interface::~device_pc_joy_interface()
3746{
38   m_stime = machine().time();
3947}
4048
4149static INPUT_PORTS_START( pc_joystick )
4250   PORT_START("btn")
43   PORT_BIT ( 0xf, 0xf,     IPT_UNUSED )
44   PORT_BIT( 0x0010, 0x0000, IPT_BUTTON1) PORT_NAME("Joystick 1 Button 1")
45   PORT_BIT( 0x0020, 0x0000, IPT_BUTTON2) PORT_NAME("Joystick 1 Button 2")
46   PORT_BIT( 0x0040, 0x0000, IPT_BUTTON1) PORT_NAME("Joystick 2 Button 1") PORT_CODE(JOYCODE_BUTTON1) PORT_PLAYER(2)
47   PORT_BIT( 0x0080, 0x0000, IPT_BUTTON2) PORT_NAME("Joystick 2 Button 2") PORT_CODE(JOYCODE_BUTTON2) PORT_PLAYER(2)
51   PORT_BIT( 0x1, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_NAME("Joystick 1 Button 1")
52   PORT_BIT( 0x2, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_NAME("Joystick 1 Button 2")
53   PORT_BIT( 0x4, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_NAME("Joystick 2 Button 1") PORT_CODE(JOYCODE_BUTTON1) PORT_PLAYER(2)
54   PORT_BIT( 0x8, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_NAME("Joystick 2 Button 2") PORT_CODE(JOYCODE_BUTTON2) PORT_PLAYER(2)
4855
4956   PORT_START("x1")
5057   PORT_BIT(0xff,0x80,IPT_AD_STICK_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_MINMAX(1,0xff) PORT_CODE_DEC(KEYCODE_LEFT) PORT_CODE_INC(KEYCODE_RIGHT) PORT_CODE_DEC(JOYCODE_X_LEFT_SWITCH) PORT_CODE_INC(JOYCODE_X_RIGHT_SWITCH)
r22752r22753
5966   PORT_BIT(0xff,0x80,IPT_AD_STICK_Y) PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_MINMAX(1,0xff) PORT_CODE_DEC(JOYCODE_Y_UP_SWITCH) PORT_CODE_INC(JOYCODE_Y_DOWN_SWITCH) PORT_PLAYER(2)
6067INPUT_PORTS_END
6168
62const device_type PC_JOY = &device_creator<pc_joy_device>;
69ioport_constructor pc_basic_joy_device::device_input_ports() const
70{
71   return INPUT_PORTS_NAME( pc_joystick );
72}
6373
64pc_joy_device::pc_joy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
65   : device_t(mconfig, PC_JOY, "PC joystick", tag, owner, clock),
74const device_type PC_BASIC_JOY = &device_creator<pc_basic_joy_device>;
75
76pc_basic_joy_device::pc_basic_joy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
77   device_t(mconfig, PC_BASIC_JOY, "PC basic joystick", tag, owner, clock, "basic_joy", __FILE__),
78   device_pc_joy_interface(mconfig, *this),
6679   m_btn(*this, "btn"),
6780   m_x1(*this, "x1"),
6881   m_y1(*this, "y1"),
r22752r22753
7184{
7285}
7386
74ioport_constructor pc_joy_device::device_input_ports() const
75{
76   return INPUT_PORTS_NAME( pc_joystick );
77}
87SLOT_INTERFACE_START(pc_joysticks)
88   SLOT_INTERFACE("basic_joy", PC_BASIC_JOY)
89SLOT_INTERFACE_END
trunk/src/mess/machine/pc_joy.h
r22752r22753
1212#include "emu.h"
1313
1414#define MCFG_PC_JOY_ADD(_tag) \
15   MCFG_DEVICE_ADD(_tag, PC_JOY, 0)
15   MCFG_DEVICE_ADD(_tag, PC_JOY, 0) \
16   MCFG_DEVICE_SLOT_INTERFACE(pc_joysticks, "basic_joy", NULL, false)
1617
17class pc_joy_device : public device_t
18SLOT_INTERFACE_EXTERN(pc_joysticks);
19
20class device_pc_joy_interface: public device_slot_card_interface
1821{
1922public:
23   device_pc_joy_interface(const machine_config &mconfig, device_t &device);
24   virtual ~device_pc_joy_interface();
25
26   virtual bool x1(int delta) { return false; }
27   virtual bool x2(int delta) { return false; }
28   virtual bool y1(int delta) { return false; }
29   virtual bool y2(int delta) { return false; }
30   virtual UINT8 btn() { return 0xf; }
31   virtual void port_write() { }
32};
33
34class pc_joy_device :  public device_t,
35                     public device_slot_interface
36{
37public:
2038   pc_joy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
21   virtual ioport_constructor device_input_ports() const;
2239
2340   DECLARE_READ8_MEMBER(joy_port_r);
2441   DECLARE_WRITE8_MEMBER(joy_port_w);
2542protected:
43   virtual void device_start() { m_stime = machine().time(); }
44   virtual void device_config_complete();
45private:
46   attotime m_stime;
47   device_pc_joy_interface *m_dev;
48};
49
50extern const device_type PC_JOY;
51
52class pc_basic_joy_device : public device_t,
53                     public device_pc_joy_interface
54{
55public:
56   pc_basic_joy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
57   virtual ioport_constructor device_input_ports() const;
58
59   virtual bool x1(int delta) { return (m_x1->read() > delta); }
60   virtual bool x2(int delta) { return (m_x2->read() > delta); }
61   virtual bool y1(int delta) { return (m_y1->read() > delta); }
62   virtual bool y2(int delta) { return (m_y2->read() > delta); }
63   virtual UINT8 btn() { return m_btn->read(); }
64
65protected:
2666   virtual void device_start() {}
2767
2868private:
r22752r22753
3171   required_ioport m_y1;
3272   required_ioport m_x2;
3373   required_ioport m_y2;
34
35   attotime m_stime;
3674};
3775
38extern const device_type PC_JOY;
3976#endif /* PC_JOY_H */
trunk/src/mess/includes/pc.h
r22752r22753
141141   DECLARE_WRITE8_MEMBER(pcjr_fdc_dor_w);
142142   DECLARE_READ8_MEMBER(pcjx_port_1ff_r);
143143   DECLARE_WRITE8_MEMBER(pcjx_port_1ff_w);
144   DECLARE_WRITE8_MEMBER(asst128_fdc_dor_w);
144145   void pcjx_set_bank(int unk1, int unk2, int unk3);
145146
146147   void fdc_interrupt(bool state);

Previous 199869 Revisions Next


© 1997-2024 The MAME Team