2017-09-25 04:31:20 -04:00
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
#include <string.h>
|
|
|
|
|
#include <wchar.h>
|
2017-09-02 20:39:57 +02:00
|
|
|
#include "../ibm.h"
|
|
|
|
|
#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-09-02 20:39:57 +02:00
|
|
|
#include "machine_common.h"
|
|
|
|
|
|
2017-09-04 01:52:29 -04:00
|
|
|
|
2017-09-02 20:39:57 +02:00
|
|
|
void machine_common_init(void)
|
|
|
|
|
{
|
|
|
|
|
/* System devices first. */
|
|
|
|
|
dma_init();
|
|
|
|
|
pic_init();
|
|
|
|
|
pit_init();
|
|
|
|
|
|
|
|
|
|
if (lpt_enabled)
|
|
|
|
|
{
|
|
|
|
|
lpt_init();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (serial_enabled[0])
|
|
|
|
|
{
|
|
|
|
|
serial_setup(1, SERIAL1_ADDR, SERIAL1_IRQ);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (serial_enabled[1])
|
|
|
|
|
{
|
|
|
|
|
serial_setup(2, SERIAL2_ADDR, SERIAL2_IRQ);
|
|
|
|
|
}
|
2017-10-07 00:46:54 -04:00
|
|
|
|
|
|
|
|
fdc_add();
|
2017-09-02 20:39:57 +02:00
|
|
|
}
|