2020-04-23 02:23:59 +02:00
|
|
|
/*
|
2023-01-06 15:36:05 -05:00
|
|
|
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
|
|
|
|
* running old operating systems and software designed for IBM
|
|
|
|
|
* PC systems and compatibles from 1981 through fairly recent
|
|
|
|
|
* system designs based on the PCI bus.
|
2020-04-23 02:23:59 +02:00
|
|
|
*
|
2023-01-06 15:36:05 -05:00
|
|
|
* This file is part of the 86Box distribution.
|
2020-04-23 02:23:59 +02:00
|
|
|
*
|
2023-01-06 15:36:05 -05:00
|
|
|
* Definitions for the Distributed DMA emulation.
|
2020-04-23 02:23:59 +02:00
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
*
|
2023-01-06 15:36:05 -05:00
|
|
|
* Authors: Miran Grca, <mgrca8@gmail.com>
|
2020-04-23 02:23:59 +02:00
|
|
|
*
|
2023-01-06 15:36:05 -05:00
|
|
|
* Copyright 2020 Miran Grca.
|
2020-04-23 02:23:59 +02:00
|
|
|
*/
|
|
|
|
|
#ifndef DDMA_H
|
2022-09-18 17:15:38 -04:00
|
|
|
#define DDMA_H
|
2020-04-23 02:23:59 +02:00
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
2023-06-28 13:46:28 -04:00
|
|
|
typedef struct ddma_channel_t {
|
2022-09-18 17:15:38 -04:00
|
|
|
uint16_t io_base;
|
2023-06-26 12:47:04 -04:00
|
|
|
int channel;
|
|
|
|
|
int enable;
|
2020-04-23 02:23:59 +02:00
|
|
|
} ddma_channel_t;
|
|
|
|
|
|
2023-06-28 13:46:28 -04:00
|
|
|
typedef struct ddma_t {
|
2022-09-18 17:15:38 -04:00
|
|
|
ddma_channel_t channels[8];
|
2020-04-23 02:23:59 +02:00
|
|
|
} ddma_t;
|
|
|
|
|
|
|
|
|
|
/* Global variables. */
|
2022-09-18 17:15:38 -04:00
|
|
|
extern const device_t ddma_device;
|
2020-04-23 02:23:59 +02:00
|
|
|
|
|
|
|
|
/* Functions. */
|
2022-09-18 17:15:38 -04:00
|
|
|
extern void ddma_update_io_mapping(ddma_t *dev, int ch, uint8_t base_l, uint8_t base_h, int enable);
|
2020-04-23 02:23:59 +02:00
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
2022-09-18 17:15:38 -04:00
|
|
|
#endif /*DDMA_H*/
|