trunk/src/emu/bus/isa/vga_ati.c
| r30686 | r30687 | |
| 7 | 7 | * ATi Graphics Ultra Pro ISA Video card |
| 8 | 8 | * - ATi 68800-3 (Mach32, combined VGA and 8514/A) |
| 9 | 9 | * |
| 10 | * ATi mach64 ISA Video card |
| 11 | * - ATi 88800 (Mach64, combined VGA and 8514/A) |
| 12 | * |
| 10 | 13 | * Created on: 9/09/2012 |
| 11 | 14 | */ |
| 12 | 15 | |
| r30686 | r30687 | |
| 26 | 29 | ROM_LOAD("gfxultrapro.bin", 0x00000, 0x8000, CRC(4e5effd7) SHA1(84ad3abf7653e4734bf39f5d5c8b88e74527e8ce) ) |
| 27 | 30 | ROM_END |
| 28 | 31 | |
| 32 | ROM_START( mach64 ) |
| 33 | ROM_REGION(0x8000,"mach64", 0) |
| 34 | ROM_LOAD("mach64.bin", 0x00000, 0x8000, CRC(1300aa8f) SHA1(dfc7f817900f125b89b0bda16fcb205f066a47fc) ) |
| 35 | ROM_END |
| 36 | |
| 29 | 37 | //************************************************************************** |
| 30 | 38 | // GLOBAL VARIABLES |
| 31 | 39 | //************************************************************************** |
| 32 | 40 | |
| 33 | 41 | const device_type ISA16_VGA_GFXULTRA = &device_creator<isa16_vga_gfxultra_device>; |
| 34 | 42 | const device_type ISA16_SVGA_GFXULTRAPRO = &device_creator<isa16_vga_gfxultrapro_device>; |
| 43 | const device_type ISA16_SVGA_MACH64 = &device_creator<isa16_vga_mach64_device>; |
| 35 | 44 | |
| 36 | 45 | static MACHINE_CONFIG_FRAGMENT( vga_ati ) |
| 37 | 46 | MCFG_SCREEN_ADD("screen", RASTER) |
| r30686 | r30687 | |
| 53 | 62 | MCFG_DEVICE_ADD("vga", ATIMACH32, 0) |
| 54 | 63 | MACHINE_CONFIG_END |
| 55 | 64 | |
| 65 | static 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) |
| 73 | MACHINE_CONFIG_END |
| 74 | |
| 56 | 75 | //------------------------------------------------- |
| 57 | 76 | // machine_config_additions - device-specific |
| 58 | 77 | // machine configurations |
| r30686 | r30687 | |
| 68 | 87 | return MACHINE_CONFIG_NAME( vga_mach32 ); |
| 69 | 88 | } |
| 70 | 89 | |
| 90 | machine_config_constructor isa16_vga_mach64_device::device_mconfig_additions() const |
| 91 | { |
| 92 | return MACHINE_CONFIG_NAME( vga_mach64 ); |
| 93 | } |
| 94 | |
| 71 | 95 | //------------------------------------------------- |
| 72 | 96 | // rom_region - device-specific ROM region |
| 73 | 97 | //------------------------------------------------- |
| r30686 | r30687 | |
| 82 | 106 | return ROM_NAME( gfxultrp ); |
| 83 | 107 | } |
| 84 | 108 | |
| 109 | const rom_entry *isa16_vga_mach64_device::device_rom_region() const |
| 110 | { |
| 111 | return ROM_NAME( mach64 ); |
| 112 | } |
| 113 | |
| 85 | 114 | //************************************************************************** |
| 86 | 115 | // LIVE DEVICE |
| 87 | 116 | //************************************************************************** |
| r30686 | r30687 | |
| 102 | 131 | { |
| 103 | 132 | } |
| 104 | 133 | |
| 134 | isa16_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 | |
| 105 | 140 | //------------------------------------------------- |
| 106 | 141 | // device_start - device-specific startup |
| 107 | 142 | //------------------------------------------------- |
| 108 | 143 | READ8_MEMBER(isa16_vga_gfxultra_device::input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); } |
| 109 | 144 | READ8_MEMBER(isa16_vga_gfxultrapro_device::input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); } |
| 145 | READ8_MEMBER(isa16_vga_mach64_device::input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); } |
| 110 | 146 | |
| 111 | 147 | void isa16_vga_gfxultra_device::device_start() |
| 112 | 148 | { |
| r30686 | r30687 | |
| 216 | 252 | 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)); |
| 217 | 253 | } |
| 218 | 254 | |
| 255 | void 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 | |
| 219 | 310 | //------------------------------------------------- |
| 220 | 311 | // device_reset - device-specific reset |
| 221 | 312 | //------------------------------------------------- |
| r30686 | r30687 | |
| 227 | 318 | void isa16_vga_gfxultrapro_device::device_reset() |
| 228 | 319 | { |
| 229 | 320 | } |
| 321 | |
| 322 | void isa16_vga_mach64_device::device_reset() |
| 323 | { |
| 324 | } |
trunk/src/emu/bus/isa/mach32.c
| r30686 | r30687 | |
| 1 | 1 | /* |
| 2 | 2 | * mach32.c |
| 3 | 3 | * |
| 4 | | * Implementation of the ATi Mach32 video chip |
| 4 | * Implementation of the ATi mach32 and mach64 video chips |
| 5 | 5 | * Based on ati_vga and mach8 |
| 6 | 6 | * |
| 7 | 7 | * Created on: 16/05/2014 |
| r30686 | r30687 | |
| 11 | 11 | |
| 12 | 12 | const device_type ATIMACH32 = &device_creator<mach32_device>; |
| 13 | 13 | const device_type ATIMACH32_8514A = &device_creator<mach32_8514a_device>; |
| 14 | const device_type ATIMACH64 = &device_creator<mach64_device>; |
| 15 | const device_type ATIMACH64_8514A = &device_creator<mach64_8514a_device>; |
| 14 | 16 | |
| 17 | |
| 18 | /* |
| 19 | * mach32 |
| 20 | */ |
| 21 | |
| 15 | 22 | // 8514/A device |
| 16 | 23 | mach32_8514a_device::mach32_8514a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 17 | 24 | : mach8_device(mconfig, ATIMACH32_8514A, "ATi mach32 (2D acceleration module)", tag, owner, clock, "mach32_8514a", __FILE__) |
| r30686 | r30687 | |
| 71 | 78 | { |
| 72 | 79 | ati_vga_device::device_reset(); |
| 73 | 80 | } |
| 81 | |
| 82 | /* |
| 83 | * mach64 |
| 84 | */ |
| 85 | |
| 86 | // 8514/A device |
| 87 | mach64_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 | |
| 92 | mach64_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 |
| 99 | mach64_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 | |
| 105 | mach64_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 | |
| 111 | static MACHINE_CONFIG_FRAGMENT( mach64_8514a ) |
| 112 | MCFG_DEVICE_ADD("8514a", ATIMACH64_8514A, 0) |
| 113 | MCFG_EEPROM_SERIAL_93C56_ADD("ati_eeprom") |
| 114 | MACHINE_CONFIG_END |
| 115 | |
| 116 | machine_config_constructor mach64_device::device_mconfig_additions() const |
| 117 | { |
| 118 | return MACHINE_CONFIG_NAME( mach64_8514a ); |
| 119 | } |
| 120 | |
| 121 | void 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 | |
| 132 | void mach64_8514a_device::device_reset() |
| 133 | { |
| 134 | } |
| 135 | |
| 136 | void mach64_device::device_start() |
| 137 | { |
| 138 | mach32_device::device_start(); |
| 139 | } |
| 140 | |
| 141 | void mach64_device::device_reset() |
| 142 | { |
| 143 | mach32_device::device_reset(); |
| 144 | } |