Previous 199869 Revisions Next

r30687 Tuesday 27th May, 2014 at 06:49:38 UTC by Barry Rodewald
vga_ati: added ATI mach64 ISA card.
[src/emu/bus/isa]isa_cards.c mach32.c mach32.h vga_ati.c vga_ati.h

trunk/src/emu/bus/isa/isa_cards.c
r30686r30687
9191   SLOT_INTERFACE("dms3d2kp", ISA16_DMS3D2KPRO)
9292   SLOT_INTERFACE("gfxultra", ISA16_VGA_GFXULTRA)
9393   SLOT_INTERFACE("gfxultrap", ISA16_SVGA_GFXULTRAPRO)
94   SLOT_INTERFACE("mach64", ISA16_SVGA_MACH64)
9495SLOT_INTERFACE_END
trunk/src/emu/bus/isa/vga_ati.c
r30686r30687
77 *  ATi Graphics Ultra Pro ISA Video card
88 *   - ATi 68800-3 (Mach32, combined VGA and 8514/A)
99 *
10 *   ATi mach64 ISA Video card
11 *    - ATi 88800 (Mach64, combined VGA and 8514/A)
12 *
1013 *  Created on: 9/09/2012
1114 */
1215
r30686r30687
2629   ROM_LOAD("gfxultrapro.bin", 0x00000, 0x8000, CRC(4e5effd7) SHA1(84ad3abf7653e4734bf39f5d5c8b88e74527e8ce) )
2730ROM_END
2831
32ROM_START( mach64 )
33   ROM_REGION(0x8000,"mach64", 0)
34   ROM_LOAD("mach64.bin", 0x00000, 0x8000, CRC(1300aa8f) SHA1(dfc7f817900f125b89b0bda16fcb205f066a47fc) )
35ROM_END
36
2937//**************************************************************************
3038//  GLOBAL VARIABLES
3139//**************************************************************************
3240
3341const device_type ISA16_VGA_GFXULTRA = &device_creator<isa16_vga_gfxultra_device>;
3442const device_type ISA16_SVGA_GFXULTRAPRO = &device_creator<isa16_vga_gfxultrapro_device>;
43const device_type ISA16_SVGA_MACH64 = &device_creator<isa16_vga_mach64_device>;
3544
3645static MACHINE_CONFIG_FRAGMENT( vga_ati )
3746   MCFG_SCREEN_ADD("screen", RASTER)
r30686r30687
5362   MCFG_DEVICE_ADD("vga", ATIMACH32, 0)
5463MACHINE_CONFIG_END
5564
65static MACHINE_CONFIG_FRAGMENT( vga_mach64 )
66   MCFG_SCREEN_ADD("screen", RASTER)
67   MCFG_SCREEN_RAW_PARAMS(XTAL_25_1748MHz,900,0,640,526,0,480)
68   MCFG_SCREEN_UPDATE_DEVICE("vga", mach64_device, screen_update)
69
70   MCFG_PALETTE_ADD("palette", 0x100)
71
72   MCFG_DEVICE_ADD("vga", ATIMACH64, 0)
73MACHINE_CONFIG_END
74
5675//-------------------------------------------------
5776//  machine_config_additions - device-specific
5877//  machine configurations
r30686r30687
6887   return MACHINE_CONFIG_NAME( vga_mach32 );
6988}
7089
90machine_config_constructor isa16_vga_mach64_device::device_mconfig_additions() const
91{
92   return MACHINE_CONFIG_NAME( vga_mach64 );
93}
94
7195//-------------------------------------------------
7296//  rom_region - device-specific ROM region
7397//-------------------------------------------------
r30686r30687
82106   return ROM_NAME( gfxultrp );
83107}
84108
109const rom_entry *isa16_vga_mach64_device::device_rom_region() const
110{
111   return ROM_NAME( mach64 );
112}
113
85114//**************************************************************************
86115//  LIVE DEVICE
87116//**************************************************************************
r30686r30687
102131{
103132}
104133
134isa16_vga_mach64_device::isa16_vga_mach64_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
135      device_t(mconfig, ISA16_SVGA_MACH64, "ATi mach64 Card", tag, owner, clock, "mach64", __FILE__),
136      device_isa16_card_interface(mconfig, *this)
137{
138}
139
105140//-------------------------------------------------
106141//  device_start - device-specific startup
107142//-------------------------------------------------
108143READ8_MEMBER(isa16_vga_gfxultra_device::input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); }
109144READ8_MEMBER(isa16_vga_gfxultrapro_device::input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); }
145READ8_MEMBER(isa16_vga_mach64_device::input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); }
110146
111147void isa16_vga_gfxultra_device::device_start()
112148{
r30686r30687
216252   m_isa->install_memory(0xa0000, 0xbffff, 0, 0, read8_delegate(FUNC(mach32_device::mem_r),m_vga), write8_delegate(FUNC(mach32_device::mem_w),m_vga));
217253}
218254
255void isa16_vga_mach64_device::device_start()
256{
257   set_isa_device();
258
259   m_vga = subdevice<mach64_device>("vga");
260
261   m_isa->install_rom(this, 0xc0000, 0xc7fff, 0, 0, "vga", "mach64");
262
263   m_isa->install_device(0x1ce, 0x1cf, 0, 0, read8_delegate(FUNC(mach64_device::ati_port_ext_r),m_vga), write8_delegate(FUNC(mach64_device::ati_port_ext_w),m_vga));
264   m_isa->install16_device(0x2e8, 0x2eb, 0, 0, read16_delegate(FUNC(mach64_device::mach32_status_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_htotal_w),m_vga));
265   m_isa->install_device(0x3b0, 0x3bf, 0, 0, read8_delegate(FUNC(mach64_device::port_03b0_r),m_vga), write8_delegate(FUNC(mach64_device::port_03b0_w),m_vga));
266   m_isa->install_device(0x3c0, 0x3cf, 0, 0, read8_delegate(FUNC(mach64_device::port_03c0_r),m_vga), write8_delegate(FUNC(mach64_device::port_03c0_w),m_vga));
267   m_isa->install_device(0x3d0, 0x3df, 0, 0, read8_delegate(FUNC(mach64_device::port_03d0_r),m_vga), write8_delegate(FUNC(mach64_device::port_03d0_w),m_vga));
268   m_isa->install16_device(0x12e8, 0x12eb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_vtotal_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_vtotal_w),m_vga));
269   m_isa->install16_device(0x12ec, 0x12ef, 0, 0, read16_delegate(FUNC(mach64_device::mach8_config1_r),m_vga), write16_delegate(FUNC(mach64_device::mach64_config1_w),m_vga));
270   m_isa->install16_device(0x16e8, 0x16eb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_vdisp_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_vdisp_w),m_vga));
271   m_isa->install16_device(0x16ec, 0x16ef, 0, 0, read16_delegate(FUNC(mach64_device::mach8_config2_r),m_vga), write16_delegate(FUNC(mach64_device::mach64_config2_w),m_vga));
272   m_isa->install16_device(0x1ae8, 0x1aeb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_vsync_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_vsync_w),m_vga));
273   m_isa->install16_device(0x26e8, 0x26eb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_htotal_r),m_vga),write16_delegate());
274   m_isa->install16_device(0x2ee8, 0x2eeb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_subcontrol_r),m_vga),write16_delegate());
275   m_isa->install16_device(0x42e8, 0x42eb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_substatus_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_subcontrol_w),m_vga));
276   m_isa->install16_device(0x42ec, 0x42ef, 0, 0, read16_delegate(FUNC(mach64_device::mach32_mem_boundary_r),m_vga), write16_delegate(FUNC(mach64_device::mach32_mem_boundary_w),m_vga));
277   m_isa->install16_device(0x4aec, 0x4aef, 0, 0, read16_delegate(FUNC(mach64_device::mach8_clksel_r),m_vga), write16_delegate(FUNC(mach64_device::mach32_clksel_w),m_vga));
278   m_isa->install16_device(0x52e8, 0x52eb, 0, 0, read16_delegate(FUNC(mach64_device::mach8_ec0_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_ec0_w),m_vga));
279   m_isa->install16_device(0x52ec, 0x52ef, 0, 0, read16_delegate(FUNC(mach64_device::mach8_scratch0_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_scratch0_w),m_vga));
280   m_isa->install16_device(0x56e8, 0x56eb, 0, 0, read16_delegate(FUNC(mach64_device::mach8_ec1_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_ec1_w),m_vga));
281   m_isa->install16_device(0x56ec, 0x56ef, 0, 0, read16_delegate(FUNC(mach64_device::mach8_scratch0_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_scratch0_w),m_vga));
282   m_isa->install16_device(0x5ae8, 0x5aeb, 0, 0, read16_delegate(FUNC(mach64_device::mach8_ec2_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_ec2_w),m_vga));
283   m_isa->install16_device(0x5ee8, 0x5eeb, 0, 0, read16_delegate(FUNC(mach64_device::mach8_ec3_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_ec3_w),m_vga));
284   m_isa->install16_device(0x82e8, 0x82eb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_currenty_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_currenty_w),m_vga));
285   m_isa->install16_device(0x86e8, 0x86eb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_currentx_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_currentx_w),m_vga));
286   m_isa->install16_device(0x8ae8, 0x8aeb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_desty_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_desty_w),m_vga));
287   m_isa->install16_device(0x8ee8, 0x8eeb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_destx_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_destx_w),m_vga));
288   m_isa->install16_device(0x92e8, 0x92eb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_line_error_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_line_error_w),m_vga));
289   m_isa->install16_device(0x96e8, 0x96eb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_width_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_width_w),m_vga));
290   m_isa->install16_device(0x96ec, 0x96ef, 0, 0, read16_delegate(FUNC(mach64_device::mach8_bresenham_count_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_bresenham_count_w),m_vga));
291   m_isa->install16_device(0x9ae8, 0x9aeb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_gpstatus_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_cmd_w),m_vga));
292   m_isa->install16_device(0x9aec, 0x9aef, 0, 0, read16_delegate(FUNC(mach64_device::mach8_ext_fifo_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_linedraw_index_w),m_vga));
293   m_isa->install16_device(0x9ee8, 0x9eeb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_ssv_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_ssv_w),m_vga));
294   m_isa->install16_device(0xa2e8, 0xa2eb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_bgcolour_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_bgcolour_w),m_vga));
295   m_isa->install16_device(0xa6e8, 0xa6eb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_fgcolour_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_fgcolour_w),m_vga));
296   m_isa->install16_device(0xaae8, 0xaaeb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_write_mask_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_write_mask_w),m_vga));
297   m_isa->install16_device(0xaee8, 0xaeeb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_read_mask_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_read_mask_w),m_vga));
298   m_isa->install16_device(0xb6e8, 0xb6eb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_backmix_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_backmix_w),m_vga));
299   m_isa->install16_device(0xbae8, 0xbaeb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_foremix_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_foremix_w),m_vga));
300   m_isa->install16_device(0xbee8, 0xbeeb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_multifunc_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_multifunc_w),m_vga));
301   m_isa->install16_device(0xe2e8, 0xe2eb, 0, 0, read16_delegate(FUNC(mach64_device::ibm8514_pixel_xfer_r),m_vga), write16_delegate(FUNC(mach64_device::ibm8514_pixel_xfer_w),m_vga));
302   m_isa->install16_device(0xdaec, 0xdaef, 0, 0, read16_delegate(FUNC(mach64_device::mach8_sourcex_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_ext_leftscissor_w),m_vga));
303   m_isa->install16_device(0xdeec, 0xdeef, 0, 0, read16_delegate(FUNC(mach64_device::mach8_sourcey_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_ext_topscissor_w),m_vga));
304   m_isa->install16_device(0xfaec, 0xfaef, 0, 0, read16_delegate(FUNC(mach64_device::mach32_chipid_r),m_vga), write16_delegate());
305   m_isa->install16_device(0xfeec, 0xfeef, 0, 0, read16_delegate(FUNC(mach64_device::mach8_linedraw_r),m_vga), write16_delegate(FUNC(mach64_device::mach8_linedraw_w),m_vga));
306
307   m_isa->install_memory(0xa0000, 0xbffff, 0, 0, read8_delegate(FUNC(mach64_device::mem_r),m_vga), write8_delegate(FUNC(mach64_device::mem_w),m_vga));
308}
309
219310//-------------------------------------------------
220311//  device_reset - device-specific reset
221312//-------------------------------------------------
r30686r30687
227318void isa16_vga_gfxultrapro_device::device_reset()
228319{
229320}
321
322void isa16_vga_mach64_device::device_reset()
323{
324}
trunk/src/emu/bus/isa/vga_ati.h
r30686r30687
6464      mach32_device *m_vga;
6565};
6666
67class isa16_vga_mach64_device :
68      public device_t,
69      public device_isa16_card_interface
70{
71public:
72      // construction/destruction
73      isa16_vga_mach64_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
6774
75      // optional information overrides
76      virtual machine_config_constructor device_mconfig_additions() const;
77      virtual const rom_entry *device_rom_region() const;
78
79      DECLARE_READ8_MEMBER(input_port_0_r);
80protected:
81      // device-level overrides
82      virtual void device_start();
83      virtual void device_reset();
84private:
85      mach64_device *m_vga;
86};
87
88
6889// device type definition
6990extern const device_type ISA16_VGA_GFXULTRA;
7091extern const device_type ISA16_SVGA_GFXULTRAPRO;
92extern const device_type ISA16_SVGA_MACH64;
7193
7294
7395#endif /* ISA_VGA_ATI_H_ */
trunk/src/emu/bus/isa/mach32.c
r30686r30687
11/*
22 * mach32.c
33 *
4 *  Implementation of the ATi Mach32 video chip
4 *  Implementation of the ATi mach32 and mach64 video chips
55 *  Based on ati_vga and mach8
66 *
77 *  Created on: 16/05/2014
r30686r30687
1111
1212const device_type ATIMACH32 = &device_creator<mach32_device>;
1313const device_type ATIMACH32_8514A = &device_creator<mach32_8514a_device>;
14const device_type ATIMACH64 = &device_creator<mach64_device>;
15const device_type ATIMACH64_8514A = &device_creator<mach64_8514a_device>;
1416
17
18/*
19 *  mach32
20 */
21
1522// 8514/A device
1623mach32_8514a_device::mach32_8514a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
1724   : mach8_device(mconfig, ATIMACH32_8514A, "ATi mach32 (2D acceleration module)", tag, owner, clock, "mach32_8514a", __FILE__)
r30686r30687
7178{
7279   ati_vga_device::device_reset();
7380}
81
82/*
83 *   mach64
84 */
85
86// 8514/A device
87mach64_8514a_device::mach64_8514a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
88   : mach32_8514a_device(mconfig, ATIMACH64_8514A, "ATi mach64 (2D acceleration module)", tag, owner, clock, "mach64_8514a", __FILE__)
89{
90}
91
92mach64_8514a_device::mach64_8514a_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
93   : mach32_8514a_device(mconfig, type, name, tag, owner, clock, shortname, source)
94{
95}
96
97
98// SVGA device
99mach64_device::mach64_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
100   : mach32_device(mconfig, ATIMACH64, "ATi mach64", tag, owner, clock, "mach64", __FILE__),
101     m_8514a(*this,"8514a")
102{
103}
104
105mach64_device::mach64_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
106   : mach32_device(mconfig, type, name, tag, owner, clock, shortname, source),
107     m_8514a(*this,"8514a")
108{
109}
110
111static MACHINE_CONFIG_FRAGMENT( mach64_8514a )
112   MCFG_DEVICE_ADD("8514a", ATIMACH64_8514A, 0)
113   MCFG_EEPROM_SERIAL_93C56_ADD("ati_eeprom")
114MACHINE_CONFIG_END
115
116machine_config_constructor mach64_device::device_mconfig_additions() const
117{
118   return MACHINE_CONFIG_NAME( mach64_8514a );
119}
120
121void mach64_8514a_device::device_start()
122{
123   mach32_8514a_device::device_start();
124   //    017h  68800-AX
125   //    177h  68800-LX
126   //    2F7h  68800-6
127   //  The 68800-3 appears to return 0 for this field (undocumented)
128   m_chip_ID = 0x0000;  // value is unknown for mach64
129   m_membounds = 0;
130}
131
132void mach64_8514a_device::device_reset()
133{
134}
135
136void mach64_device::device_start()
137{
138   mach32_device::device_start();
139}
140
141void mach64_device::device_reset()
142{
143   mach32_device::device_reset();
144}
trunk/src/emu/bus/isa/mach32.h
r30686r30687
112112   DECLARE_READ16_MEMBER(ibm8514_pixel_xfer_r) { return m_8514a->ibm8514_pixel_xfer_r(space,offset,mem_mask); }
113113   DECLARE_WRITE16_MEMBER(ibm8514_pixel_xfer_w) { m_8514a->ibm8514_pixel_xfer_w(space,offset,data,mem_mask); }
114114
115   // Mach32 specific handlers
116115   DECLARE_READ16_MEMBER(mach32_chipid_r) { return m_8514a->mach32_chipid_r(space,offset,mem_mask);  }
117116   DECLARE_READ16_MEMBER(mach8_clksel_r) { return m_8514a->mach8_clksel_r(space,offset,mem_mask); }
118117   DECLARE_WRITE16_MEMBER(mach32_clksel_w) { m_8514a->mach32_clksel_w(space,offset,data,mem_mask); }  // read only on the mach8
r30686r30687
128127private:
129128};
130129
130/*
131 *   ATi mach64
132 */
133
134// 8514/A module of the Mach64
135class mach64_8514a_device : public mach32_8514a_device
136{
137public:
138   // construction/destruction
139   mach64_8514a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
140   mach64_8514a_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
141
142protected:
143   virtual void device_start();
144   virtual void device_reset();
145};
146
147// main SVGA device
148class mach64_device : public mach32_device
149{
150public:
151   // construction/destruction
152   mach64_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
153   mach64_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
154
155   required_device<mach64_8514a_device> m_8514a;  // provides accelerated 2D drawing, derived from the Mach8 device
156
157   DECLARE_WRITE16_MEMBER(mach64_config1_w) {  }  // why does the mach64 BIOS write to these, they are read only on the mach32 and earlier
158   DECLARE_WRITE16_MEMBER(mach64_config2_w) {  }
159
160protected:
161   // device-level overrides
162   virtual void device_start();
163   virtual void device_reset();
164   virtual machine_config_constructor device_mconfig_additions() const;
165};
131166// device type definition
132167extern const device_type ATIMACH32;
133168extern const device_type ATIMACH32_8514A;
169extern const device_type ATIMACH64;
170extern const device_type ATIMACH64_8514A;
134171
135172#endif /* MACH32_H_ */

Previous 199869 Revisions Next


© 1997-2024 The MAME Team