Previous 15994 Revisions Next

r872 Friday 24th August, 2007 at 02:52:05 UTC by Nathan Woods
[PC] Fixed memory maps
[src/mess/drivers]pc.c

src/mess/drivers/pc.c
r871r872
8686#define GAMEBLASTER
8787
8888
89static READ8_HANDLER( pc_YM3812_0_r )
90{
91   if ((offset % 1) == 0)
92      return YM3812_status_port_0_r(0);
93   else
94      return 0x00;
95}
8996
90static READ16_HANDLER( pc16le_YM3812_status_port_0_r ) { return read16le_with_read8_handler(YM3812_status_port_0_r, offset, mem_mask); }
91static WRITE16_HANDLER( pc16le_YM3812_control_port_0_w ) { write16le_with_write8_handler(YM3812_control_port_0_w, offset, data, mem_mask); }
92static WRITE16_HANDLER( pc16le_YM3812_write_port_0_w ) { write16le_with_write8_handler(YM3812_write_port_0_w, offset, data, mem_mask); }
97static WRITE8_HANDLER( pc_YM3812_0_w )
98{
99   if ((offset % 1) == 0)
100      YM3812_control_port_0_w(0, data);
101   else
102      YM3812_write_port_0_w(0, data);
103}
104
105static READ16_HANDLER( pc16le_YM3812_0_r ) { return read16le_with_read8_handler(pc_YM3812_0_r, offset, mem_mask); }
106static WRITE16_HANDLER( pc16le_YM3812_0_w ) { write16le_with_write8_handler(pc_YM3812_0_w, offset, data, mem_mask); }
107
93108static WRITE16_HANDLER( pc16le_SN76496_0_w ) { write16le_with_write8_handler(SN76496_0_w, offset, data, mem_mask); }
94109
95110// IO Expansion, only a little bit for ibm bios self tests
r871r872
136151   AM_RANGE(0x0340, 0x0357) AM_READ(return8_FF) /* anonymous bios should not recogniced realtimeclock */
137152   AM_RANGE(0x0378, 0x037f) AM_READWRITE(pc_parallelport1_r,   pc_parallelport1_w)
138153#ifdef ADLIB
139   AM_RANGE(0x0388, 0x0388) AM_READWRITE(YM3812_status_port_0_r,   YM3812_control_port_0_w)
140   AM_RANGE(0x0389, 0x0389) AM_WRITE(                     YM3812_write_port_0_w)
154   AM_RANGE(0x0388, 0x0389) AM_READWRITE(pc_YM3812_0_r,      pc_YM3812_0_w)
141155#endif
142156   AM_RANGE(0x03bc, 0x03be) AM_READWRITE(pc_parallelport0_r,   pc_parallelport0_w)
143157   AM_RANGE(0x03e8, 0x03ef) AM_READWRITE(uart8250_2_r,         uart8250_2_w)
r871r872
166180   AM_RANGE(0x0340, 0x0357) AM_READ(return16_FFFF) /* anonymous bios should not recogniced realtimeclock */
167181   AM_RANGE(0x0378, 0x037f) AM_READWRITE(pc16le_parallelport1_r,   pc16le_parallelport1_w)
168182#ifdef ADLIB
169   AM_RANGE(0x0388, 0x0388) AM_READWRITE(pc16le_YM3812_status_port_0_r,   pc16le_YM3812_control_port_0_w)
170   AM_RANGE(0x0389, 0x0389) AM_WRITE(                        pc16le_YM3812_write_port_0_w)
183   AM_RANGE(0x0388, 0x0389) AM_READWRITE(pc16le_YM3812_0_r,      pc16le_YM3812_0_w)
171184#endif
172   AM_RANGE(0x03bc, 0x03be) AM_READWRITE(pc16le_parallelport0_r,   pc16le_parallelport0_w)
185   AM_RANGE(0x03bc, 0x03bf) AM_READWRITE(pc16le_parallelport0_r,   pc16le_parallelport0_w)
173186   AM_RANGE(0x03e8, 0x03ef) AM_READWRITE(uart8250_16le_2_r,      uart8250_16le_2_w)
174187   AM_RANGE(0x03f0, 0x03f7) AM_READWRITE(pc16le_fdc_r,            pc16le_fdc_w)
175188   AM_RANGE(0x03f8, 0x03ff) AM_READWRITE(uart8250_16le_0_r,      uart8250_16le_0_w)
r871r872
205218   AM_RANGE(0x0324, 0x0327) AM_READWRITE(pc_HDC2_r,         pc_HDC2_w)
206219   AM_RANGE(0x0378, 0x037b) AM_READWRITE(pc_parallelport1_r,   pc_parallelport1_w)
207220#ifdef ADLIB
208   AM_RANGE(0x0388, 0x0388) AM_READWRITE(YM3812_status_port_0_r,   YM3812_control_port_0_w)
209   AM_RANGE(0x0389, 0x0389) AM_WRITE(                        YM3812_write_port_0_w)
221   AM_RANGE(0x0388, 0x0389) AM_READWRITE(pc_YM3812_0_r,      pc_YM3812_0_w)
210222#endif
211//   AM_RANGE(0x03bc, 0x03be) AM_READWRITE(pc16le_parallelport0_r,   pc16le_parallelport0_w)
223//   AM_RANGE(0x03bc, 0x03bf) AM_READWRITE(pc16le_parallelport0_r,   pc16le_parallelport0_w)
212224   AM_RANGE(0x03e8, 0x03ef) AM_READWRITE(uart8250_2_r,         uart8250_2_w)
213225   AM_RANGE(0x03f0, 0x03f7) AM_READWRITE(pc_fdc_r,            pc_fdc_w)
214226   AM_RANGE(0x03f8, 0x03ff) AM_READWRITE(uart8250_0_r,         uart8250_0_w)
r871r872
255267   AM_RANGE(0x0020, 0x0021) AM_READWRITE(pic8259_16le_0_r,            pic8259_16le_0_w)
256268   AM_RANGE(0x0040, 0x0043) AM_READWRITE(pit8253_16le_0_r,            pit8253_16le_0_w)
257269   AM_RANGE(0x0060, 0x0065) AM_READWRITE(pc1640_16le_port60_r,         pc1640_16le_port60_w)
258   AM_RANGE(0x0078, 0x0078) AM_READWRITE(pc1640_16le_mouse_x_r,         pc1640_16le_mouse_x_w)
259   AM_RANGE(0x007a, 0x007a) AM_READWRITE(pc1640_16le_mouse_y_r,         pc1640_16le_mouse_y_w)
270   AM_RANGE(0x0078, 0x0079) AM_READWRITE(pc1640_16le_mouse_x_r,         pc1640_16le_mouse_x_w)
271   AM_RANGE(0x007a, 0x007b) AM_READWRITE(pc1640_16le_mouse_y_r,         pc1640_16le_mouse_y_w)
260272   AM_RANGE(0x0080, 0x0087) AM_READWRITE(pc_page16le_r,            pc_page16le_w)
261273   AM_RANGE(0x0200, 0x0207) AM_READWRITE(pc16le_JOY_r,               pc16le_JOY_w)
262274   AM_RANGE(0x0278, 0x027b) AM_READWRITE(pc16le_parallelport2_r,      pc16le_parallelport2_w)
r871r872
265277   AM_RANGE(0x0320, 0x0323) AM_READWRITE(pc16le_HDC1_r,            pc16le_HDC1_w)
266278   AM_RANGE(0x0324, 0x0327) AM_READWRITE(pc16le_HDC2_r,            pc16le_HDC2_w)
267279   AM_RANGE(0x0378, 0x037b) AM_READWRITE(pc200_16le_port378_r,         pc16le_parallelport1_w)
268   AM_RANGE(0x03bc, 0x03be) AM_READWRITE(pc16le_parallelport0_r,      pc16le_parallelport0_w)
280   AM_RANGE(0x03bc, 0x03bf) AM_READWRITE(pc16le_parallelport0_r,      pc16le_parallelport0_w)
269281   AM_RANGE(0x03e8, 0x03ef) AM_READWRITE(uart8250_16le_2_r,            uart8250_16le_2_w)
270282   AM_RANGE(0x03f0, 0x03f7) AM_READWRITE(pc16le_fdc_r,               pc16le_fdc_w)
271283   AM_RANGE(0x03f8, 0x03ff) AM_READWRITE(uart8250_16le_0_r,            uart8250_16le_0_w)
r871r872
289301   AM_RANGE(0x0040, 0x0043) AM_READWRITE(pit8253_16le_0_r,         pit8253_16le_0_w)
290302   AM_RANGE(0x0060, 0x0065) AM_READWRITE(pc1640_16le_port60_r,         pc1640_16le_port60_w)
291303   AM_RANGE(0x0070, 0x0071) AM_READWRITE(mc146818_port16le_r,      mc146818_port16le_w)
292   AM_RANGE(0x0078, 0x0078) AM_READWRITE(pc1640_16le_mouse_x_r,   pc1640_16le_mouse_x_w)
293   AM_RANGE(0x007a, 0x007a) AM_READWRITE(pc1640_16le_mouse_y_r,   pc1640_16le_mouse_y_w)
304   AM_RANGE(0x0078, 0x0079) AM_READWRITE(pc1640_16le_mouse_x_r,   pc1640_16le_mouse_x_w)
305   AM_RANGE(0x007a, 0x007b) AM_READWRITE(pc1640_16le_mouse_y_r,   pc1640_16le_mouse_y_w)
294306   AM_RANGE(0x0080, 0x0087) AM_READWRITE(pc_page16le_r,            pc_page16le_w)
295307   AM_RANGE(0x0200, 0x0207) AM_READWRITE(pc16le_JOY_r,            pc16le_JOY_w)
296308   AM_RANGE(0x0278, 0x027b) AM_READWRITE(pc16le_parallelport2_r,      pc16le_parallelport2_w)
r871r872
299311   AM_RANGE(0x0320, 0x0323) AM_READWRITE(pc16le_HDC1_r,         pc16le_HDC1_w)
300312   AM_RANGE(0x0324, 0x0327) AM_READWRITE(pc16le_HDC2_r,         pc16le_HDC2_w)
301313   AM_RANGE(0x0378, 0x037b) AM_READWRITE(pc1640_16le_port378_r,         pc16le_parallelport1_w)
302   AM_RANGE(0x03bc, 0x03be) AM_READWRITE(pc16le_parallelport0_r,      pc16le_parallelport0_w)
314   AM_RANGE(0x03bc, 0x03bf) AM_READWRITE(pc16le_parallelport0_r,      pc16le_parallelport0_w)
303315   AM_RANGE(0x03e8, 0x03ef) AM_READWRITE(uart8250_16le_2_r,      uart8250_16le_2_w)
304316   AM_RANGE(0x03f0, 0x03f7) AM_READWRITE(pc16le_fdc_r,            pc16le_fdc_w)
305317   AM_RANGE(0x03f8, 0x03ff) AM_READWRITE(uart8250_16le_0_r,      uart8250_16le_0_w)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team