src/mess/machine/pc.c
| r5292 | r5293 | |
| 1113 | 1113 | pc_get_device |
| 1114 | 1114 | }; |
| 1115 | 1115 | |
| 1116 | |
| 1117 | static const struct pc_fdc_interface pcjr_fdc_interface_nc = |
| 1118 | { |
| 1119 | pc_fdc_interrupt, |
| 1120 | NULL, |
| 1121 | NULL, |
| 1122 | pc_get_device |
| 1123 | }; |
| 1124 | |
| 1125 | |
| 1116 | 1126 | static void pc_set_irq_line(int irq, int state) { |
| 1117 | 1127 | pic8259_set_irq_line(pc_devices.pic8259, irq, state); |
| 1118 | 1128 | } |
| r5292 | r5293 | |
| 1351 | 1361 | } |
| 1352 | 1362 | |
| 1353 | 1363 | |
| 1364 | MACHINE_START( pcjr ) |
| 1365 | { |
| 1366 | pc_fdc_init( machine, &pcjr_fdc_interface_nc ); |
| 1367 | } |
| 1368 | |
| 1369 | |
| 1354 | 1370 | MACHINE_RESET( pcjr ) |
| 1355 | 1371 | { |
| 1356 | | MACHINE_RESET_CALL( pc ); |
| 1372 | const device_config *speaker = devtag_get_device(machine, "speaker"); |
| 1373 | |
| 1374 | pc_devices.maincpu = devtag_get_device(machine, "maincpu" ); |
| 1375 | cpu_set_irq_callback(pc_devices.maincpu, pc_irq_callback); |
| 1376 | |
| 1377 | pc_devices.pic8259 = devtag_get_device(machine, "pic8259"); |
| 1378 | pc_devices.dma8237 = NULL; |
| 1379 | pc_devices.pit8253 = devtag_get_device(machine, "pit8253"); |
| 1380 | pc_devices.u73_q2 = 0; |
| 1381 | pc_devices.out1 = 0; |
| 1382 | pc_mouse_set_serial_port( devtag_get_device(machine, "ins8250_0") ); |
| 1383 | pc_hdc_set_dma8237_device( pc_devices.dma8237 ); |
| 1384 | speaker_level_w( speaker, 0 ); |
| 1385 | |
| 1357 | 1386 | pcjr_keyb_init(machine); |
| 1358 | 1387 | pc_int_delay_timer = timer_alloc(machine, pcjr_delayed_pic8259_irq, NULL ); |
| 1359 | 1388 | } |
src/mess/drivers/pc.c
| r5292 | r5293 | |
| 1908 | 1908 | /* basic machine hardware */ |
| 1909 | 1909 | MDRV_CPU_PC(ibmpcjr, ibmpcjr, I8088, 4900000, pcjr_frame_interrupt) /* TODO: Get correct cpu frequency, probably XTAL_14_31818MHz/3 */ |
| 1910 | 1910 | |
| 1911 | | MDRV_MACHINE_START(pc) |
| 1911 | MDRV_MACHINE_START(pcjr) |
| 1912 | 1912 | MDRV_MACHINE_RESET(pcjr) |
| 1913 | 1913 | |
| 1914 | 1914 | MDRV_PIT8253_ADD( "pit8253", pcjr_pit8253_config ) |
| 1915 | 1915 | |
| 1916 | | MDRV_DMA8237_ADD( "dma8237", ibm5150_dma8237_config ) |
| 1917 | | |
| 1918 | 1916 | MDRV_PIC8259_ADD( "pic8259", pcjr_pic8259_config ) |
| 1919 | 1917 | |
| 1920 | 1918 | MDRV_I8255A_ADD( "ppi8255", pcjr_ppi8255_interface ) |