src/mess/machine/i82371ab.c
| r0 | r6937 | |
| 1 | /***************************************************************************
|
| 2 | |
| 3 | Intel 82371AB PCI IDE ISA Xcelerator (PIIX4)
|
| 4 | |
| 5 | Part of the Intel 430TX chipset
|
| 6 | |
| 7 | - Integrated IDE Controller
|
| 8 | - Enhanced DMA Controller based on two 82C37
|
| 9 | - Interrupt Controller based on two 82C59
|
| 10 | - Timers based on 82C54
|
| 11 | - USB
|
| 12 | - SMBus
|
| 13 | - Real Time Clock based on MC146818
|
| 14 | |
| 15 | ***************************************************************************/
|
| 16 | |
| 17 | #include "driver.h"
|
| 18 | #include "i82371ab.h"
|
| 19 | |
| 20 | |
| 21 | /***************************************************************************
|
| 22 | TYPE DEFINITIONS
|
| 23 | ***************************************************************************/
|
| 24 | |
| 25 | typedef struct _i82371ab_state i82371ab_state;
|
| 26 | struct _i82371ab_state
|
| 27 | {
|
| 28 | UINT32 dummy;
|
| 29 | };
|
| 30 | |
| 31 | |
| 32 | /*****************************************************************************
|
| 33 | INLINE FUNCTIONS
|
| 34 | *****************************************************************************/
|
| 35 | |
| 36 | INLINE i82371ab_state *get_safe_token(const device_config *device)
|
| 37 | {
|
| 38 | assert(device != NULL);
|
| 39 | assert(device->token != NULL);
|
| 40 | assert(device->type == I82371AB);
|
| 41 | |
| 42 | return (i82371ab_state *)device->token;
|
| 43 | }
|
| 44 | |
| 45 | |
| 46 | /***************************************************************************
|
| 47 | PCI INTERFACE
|
| 48 | ***************************************************************************/
|
| 49 | |
| 50 | UINT32 i82371ab_pci_read(const device_config *busdevice, const device_config *device, int function, int offset, UINT32 mem_mask)
|
| 51 | {
|
| 52 | UINT32 result = 0;
|
| 53 | |
| 54 | logerror("i82371ab_pci r function = %d, offset = %02x\n", function, offset);
|
| 55 | |
| 56 | if (function != 0)
|
| 57 | return 0;
|
| 58 | |
| 59 | switch (offset)
|
| 60 | {
|
| 61 | case 0x00:
|
| 62 | result = 0x71108086;
|
| 63 | break;
|
| 64 | case 0x04:
|
| 65 | result = 0x00000000;
|
| 66 | break;
|
| 67 | case 0x08:
|
| 68 | result = 0x06010000;
|
| 69 | break;
|
| 70 | case 0x0c:
|
| 71 | result = 0x00800000;
|
| 72 | break;
|
| 73 | }
|
| 74 | |
| 75 | return result;
|
| 76 | }
|
| 77 | |
| 78 | void i82371ab_pci_write(const device_config *busdevice, const device_config *device, int function, int offset, UINT32 data, UINT32 mem_mask)
|
| 79 | {
|
| 80 | logerror("i82371ab_pci w function = %d, offset = %02x\n", function, offset);
|
| 81 | }
|
| 82 | |
| 83 | |
| 84 | /*****************************************************************************
|
| 85 | DEVICE INTERFACE
|
| 86 | *****************************************************************************/
|
| 87 | |
| 88 | static DEVICE_START( i82371ab )
|
| 89 | {
|
| 90 | i82371ab_state *i82371ab = get_safe_token(device);
|
| 91 | |
| 92 | i82371ab->dummy = 0;
|
| 93 | |
| 94 | /* setup save states */
|
| 95 | }
|
| 96 | |
| 97 | static DEVICE_RESET( i82371ab )
|
| 98 | {
|
| 99 | i82371ab_state *i82371ab = get_safe_token(device);
|
| 100 | |
| 101 | i82371ab->dummy = 0;
|
| 102 | }
|
| 103 | |
| 104 | |
| 105 | /***************************************************************************
|
| 106 | DEVICE GETINFO
|
| 107 | ***************************************************************************/
|
| 108 | |
| 109 | static const char DEVTEMPLATE_SOURCE[] = __FILE__;
|
| 110 | |
| 111 | #define DEVTEMPLATE_ID(p,s) p##i82371ab##s
|
| 112 | #define DEVTEMPLATE_FEATURES DT_HAS_START | DT_HAS_RESET
|
| 113 | #define DEVTEMPLATE_NAME "Intel 82371AB"
|
| 114 | #define DEVTEMPLATE_FAMILY "South Bridge"
|
| 115 | #define DEVTEMPLATE_CLASS DEVICE_CLASS_OTHER
|
| 116 | #define DEVTEMPLATE_VERSION "1.0"
|
| 117 | #define DEVTEMPLATE_CREDITS "Copyright MESS Team"
|
| 118 | #include "devtempl.h"
|
src/mess/machine/i82371ab.h
| r0 | r6937 | |
| 1 | /***************************************************************************
|
| 2 | |
| 3 | Intel 82371AB PCI IDE ISA Xcelerator (PIIX4)
|
| 4 | |
| 5 | Part of the Intel 430TX chipset
|
| 6 | |
| 7 | ***************************************************************************/
|
| 8 | |
| 9 | #ifndef __I82371AB_H__
|
| 10 | #define __I82371AB_H__
|
| 11 | |
| 12 | |
| 13 | /***************************************************************************
|
| 14 | TYPE DEFINITIONS
|
| 15 | ***************************************************************************/
|
| 16 | |
| 17 | typedef struct _i82371ab_config i82371ab_config;
|
| 18 | struct _i82371ab_config
|
| 19 | {
|
| 20 | };
|
| 21 | |
| 22 | |
| 23 | /***************************************************************************
|
| 24 | FUNCTION PROTOTYPES
|
| 25 | ***************************************************************************/
|
| 26 | |
| 27 | DEVICE_GET_INFO( i82371ab );
|
| 28 | |
| 29 | UINT32 i82371ab_pci_read(const device_config *busdevice, const device_config *device, int function, int offset, UINT32 mem_mask);
|
| 30 | void i82371ab_pci_write(const device_config *busdevice, const device_config *device, int function, int offset, UINT32 data, UINT32 mem_mask);
|
| 31 | |
| 32 | |
| 33 | /***************************************************************************
|
| 34 | DEVICE CONFIGURATION MACROS
|
| 35 | ***************************************************************************/
|
| 36 | |
| 37 | #define I82371AB DEVICE_GET_INFO_NAME(i82371ab)
|
| 38 | |
| 39 | #define MDRV_I82371AB_ADD(_tag) \
|
| 40 | MDRV_DEVICE_ADD(_tag, I82371AB, 0)
|
| 41 | |
| 42 | |
| 43 | #endif /* __I82371AB_H__ */
|
src/mess/drivers/at.c
| r6936 | r6937 | |
| 18 | 18 | #include "machine/ins8250.h" |
| 19 | 19 | #include "machine/mc146818.h" |
| 20 | 20 | #include "machine/pic8259.h" |
| 21 | #include "machine/i82371ab.h" |
| 21 | 22 | #include "machine/i82439tx.h" |
| 22 | 23 | |
| 23 | 24 | #include "machine/pit8253.h" |
| r6936 | r6937 | |
| 838 | 839 | MDRV_CPU_PROGRAM_MAP(at586_map) |
| 839 | 840 | MDRV_CPU_IO_MAP(at586_io) |
| 840 | 841 | |
| 842 | MDRV_I82371AB_ADD("i82371ab") |
| 841 | 843 | MDRV_I82439TX_ADD("i82439tx", "maincpu", "user1") |
| 842 | 844 | |
| 843 | 845 | MDRV_PCI_BUS_ADD("pcibus", 0) |
| 844 | 846 | MDRV_PCI_BUS_DEVICE(0, "i82439tx", i82439tx_pci_read, i82439tx_pci_write) |
| 847 | MDRV_PCI_BUS_DEVICE(1, "i82371ab", i82371ab_pci_read, i82371ab_pci_write) |
| 845 | 848 | MACHINE_DRIVER_END |
| 846 | 849 | |
| 847 | 850 | |