Previous 15994 Revisions Next

r6937 Tuesday 5th January, 2010 at 16:19:18 UTC by Dirk Best
Added Intel 82371AB skeleton
[src/mess]mess.mak
[src/mess/drivers]at.c
[src/mess/machine]i82371ab.c* i82371ab.h* i82439tx.c

src/mess/machine/i82371ab.c
r0r6937
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 
25typedef struct _i82371ab_state i82371ab_state;
26struct _i82371ab_state
27{
28   UINT32 dummy;
29};
30 
31 
32/*****************************************************************************
33    INLINE FUNCTIONS
34*****************************************************************************/
35 
36INLINE 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 
50UINT32 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 
78void 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 
88static DEVICE_START( i82371ab )
89{
90   i82371ab_state *i82371ab = get_safe_token(device);
91 
92   i82371ab->dummy = 0;
93 
94   /* setup save states */
95}
96 
97static 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 
109static 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
r0r6937
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 
17typedef struct _i82371ab_config i82371ab_config;
18struct _i82371ab_config
19{
20};
21 
22 
23/***************************************************************************
24    FUNCTION PROTOTYPES
25***************************************************************************/
26 
27DEVICE_GET_INFO( i82371ab );
28 
29UINT32 i82371ab_pci_read(const device_config *busdevice, const device_config *device, int function, int offset, UINT32 mem_mask);
30void 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/machine/i82439tx.c
r6936r6937
269269#define DEVTEMPLATE_ID(p,s)            p##i82439tx##s
270270#define DEVTEMPLATE_FEATURES         DT_HAS_START | DT_HAS_RESET | DT_HAS_INLINE_CONFIG
271271#define DEVTEMPLATE_NAME            "Intel 82439TX"
272#define DEVTEMPLATE_FAMILY            "System controller"
272#define DEVTEMPLATE_FAMILY            "North Bridge"
273273#define DEVTEMPLATE_CLASS            DEVICE_CLASS_OTHER
274274#define DEVTEMPLATE_VERSION            "1.0"
275275#define DEVTEMPLATE_CREDITS            "Copyright MESS Team"
src/mess/mess.mak
r6936r6937
444444   $(MESS_MACHINE)/i8155.o      \
445445   $(MESS_MACHINE)/i8212.o      \
446446   $(MESS_MACHINE)/i8214.o      \
447   $(MESS_MACHINE)/i82371ab.o   \
447448   $(MESS_MACHINE)/i82439tx.o   \
448449   $(MESS_MACHINE)/i8271.o      \
449450   $(MESS_MACHINE)/i8355.o      \
src/mess/drivers/at.c
r6936r6937
1818#include "machine/ins8250.h"
1919#include "machine/mc146818.h"
2020#include "machine/pic8259.h"
21#include "machine/i82371ab.h"
2122#include "machine/i82439tx.h"
2223
2324#include "machine/pit8253.h"
r6936r6937
838839   MDRV_CPU_PROGRAM_MAP(at586_map)
839840   MDRV_CPU_IO_MAP(at586_io)
840841
842   MDRV_I82371AB_ADD("i82371ab")
841843   MDRV_I82439TX_ADD("i82439tx", "maincpu", "user1")
842844
843845   MDRV_PCI_BUS_ADD("pcibus", 0)
844846   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)
845848MACHINE_DRIVER_END
846849
847850

Previous 15994 Revisions Next


© 1998-2018 The MESS Team