2017-09-25 04:31:20 -04:00
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
#include <string.h>
|
|
|
|
|
#include <wchar.h>
|
2017-10-17 01:59:09 -04:00
|
|
|
#include "../86box.h"
|
2017-09-02 20:39:57 +02:00
|
|
|
#include "../dma.h"
|
|
|
|
|
#include "../pic.h"
|
|
|
|
|
#include "../pit.h"
|
2017-09-04 01:52:29 -04:00
|
|
|
#include "../lpt.h"
|
2017-09-02 20:39:57 +02:00
|
|
|
#include "../serial.h"
|
2017-09-04 01:52:29 -04:00
|
|
|
#include "../floppy/floppy.h"
|
|
|
|
|
#include "../floppy/fdd.h"
|
|
|
|
|
#include "../floppy/fdc.h"
|
2017-10-07 22:18:30 -04:00
|
|
|
#include "machine.h"
|
2017-09-02 20:39:57 +02:00
|
|
|
|
2017-09-04 01:52:29 -04:00
|
|
|
|
2017-10-07 22:18:30 -04:00
|
|
|
void
|
|
|
|
|
machine_common_init(machine_t *model)
|
2017-09-02 20:39:57 +02:00
|
|
|
{
|
2017-10-07 22:18:30 -04:00
|
|
|
/* System devices first. */
|
|
|
|
|
dma_init();
|
|
|
|
|
pic_init();
|
|
|
|
|
pit_init();
|
2017-09-02 20:39:57 +02:00
|
|
|
|
2017-10-07 22:18:30 -04:00
|
|
|
if (lpt_enabled)
|
|
|
|
|
lpt_init();
|
2017-09-02 20:39:57 +02:00
|
|
|
|
2017-10-07 22:18:30 -04:00
|
|
|
if (serial_enabled[0])
|
|
|
|
|
serial_setup(1, SERIAL1_ADDR, SERIAL1_IRQ);
|
2017-09-02 20:39:57 +02:00
|
|
|
|
2017-10-07 22:18:30 -04:00
|
|
|
if (serial_enabled[1])
|
|
|
|
|
serial_setup(2, SERIAL2_ADDR, SERIAL2_IRQ);
|
2017-10-07 00:46:54 -04:00
|
|
|
|
2017-10-07 22:18:30 -04:00
|
|
|
fdc_add();
|
2017-09-02 20:39:57 +02:00
|
|
|
}
|