trunk/src/emu/machine/pci.c
| r242312 | r242313 | |
| 63 | 63 | revision = 0x00; |
| 64 | 64 | pclass = 0xffffff; |
| 65 | 65 | subsystem_id = 0xffffffff; |
| 66 | is_multifunction_device = false; |
| 66 | 67 | } |
| 67 | 68 | |
| 68 | 69 | void pci_device::set_ids(UINT32 _main_id, UINT8 _revision, UINT32 _pclass, UINT32 _subsystem_id) |
| r242312 | r242313 | |
| 194 | 195 | return 0x00; |
| 195 | 196 | } |
| 196 | 197 | |
| 198 | void pci_device::set_multifunction_device(bool enable) |
| 199 | { |
| 200 | is_multifunction_device = enable; |
| 201 | } |
| 202 | |
| 197 | 203 | READ8_MEMBER(pci_device::header_type_r) |
| 198 | 204 | { |
| 199 | | return 0x00; |
| 205 | return is_multifunction_device ? 0x80 : 0x00; |
| 200 | 206 | } |
| 201 | 207 | |
| 202 | 208 | READ8_MEMBER(pci_device::bist_r) |
| r242312 | r242313 | |
| 237 | 243 | return 0x00; |
| 238 | 244 | } |
| 239 | 245 | |
| 240 | | void pci_device::scan_sub_devices(pci_device **devices, dynamic_array<pci_device *> &all, dynamic_array<pci_device *> &bridges, device_t *root) |
| 241 | | { |
| 242 | | } |
| 243 | | |
| 244 | 246 | void pci_device::set_remap_cb(mapper_cb _remap_cb) |
| 245 | 247 | { |
| 246 | 248 | remap_cb = _remap_cb; |
| r242312 | r242313 | |
| 425 | 427 | |
| 426 | 428 | for(int i=0; i<32*8; i++) |
| 427 | 429 | if(sub_devices[i]) { |
| 430 | if((i & 7) && sub_devices[i & ~7]) |
| 431 | sub_devices[i & ~7]->set_multifunction_device(true); |
| 432 | |
| 428 | 433 | all_devices.append(sub_devices[i]); |
| 429 | 434 | if(sub_devices[i] != this) { |
| 430 | 435 | sub_devices[i]->remap_config_cb = cf_cb; |
trunk/src/emu/machine/pci.h
| r242312 | r242313 | |
| 31 | 31 | pci_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); |
| 32 | 32 | |
| 33 | 33 | void set_ids(UINT32 main_id, UINT8 revision, UINT32 pclass, UINT32 subsystem_id); |
| 34 | void set_multifunction_device(bool enable); |
| 34 | 35 | |
| 35 | 36 | virtual void set_remap_cb(mapper_cb _remap_cb); |
| 36 | 37 | virtual void reset_all_mappings(); |
| r242312 | r242313 | |
| 109 | 110 | const UINT8 *expansion_rom; |
| 110 | 111 | UINT32 expansion_rom_size; |
| 111 | 112 | UINT32 expansion_rom_base; |
| 113 | bool is_multifunction_device; |
| 112 | 114 | |
| 113 | 115 | virtual void device_start(); |
| 114 | 116 | virtual void device_reset(); |
| 115 | 117 | |
| 116 | | static void scan_sub_devices(pci_device **devices, dynamic_array<pci_device *> &all, dynamic_array<pci_device *> &bridges, device_t *root); |
| 117 | | |
| 118 | 118 | void skip_map_regs(int count); |
| 119 | 119 | void add_map(UINT64 size, int flags, address_map_delegate &map); |
| 120 | 120 | template <typename T> void add_map(UINT64 size, int flags, void (T::*map)(address_map &map, device_t &device), const char *name) { |