trunk/src/emu/bus/generic/slot.c
| r32283 | r32284 | |
| 41 | 41 | // rom_alloc - alloc the space for the cart |
| 42 | 42 | //------------------------------------------------- |
| 43 | 43 | |
| 44 | | void device_generic_cart_interface::rom_alloc(size_t size, int width, const char *tag) |
| 44 | void device_generic_cart_interface::rom_alloc(size_t size, int width, endianness_t endian, const char *tag) |
| 45 | 45 | { |
| 46 | 46 | if (m_rom == NULL) |
| 47 | 47 | { |
| 48 | 48 | astring tempstring(tag); |
| 49 | 49 | tempstring.cat(GENERIC_ROM_REGION_TAG); |
| 50 | | m_rom = device().machine().memory().region_alloc(tempstring, size, width, ENDIANNESS_LITTLE)->base(); |
| 50 | m_rom = device().machine().memory().region_alloc(tempstring, size, width, endian)->base(); |
| 51 | 51 | m_rom_size = size; |
| 52 | 52 | } |
| 53 | 53 | } |
| r32283 | r32284 | |
| 84 | 84 | m_extensions("bin"), |
| 85 | 85 | m_must_be_loaded(FALSE), |
| 86 | 86 | m_width(GENERIC_ROM8_WIDTH), |
| 87 | | m_empty(TRUE) |
| 87 | m_endianness(ENDIANNESS_LITTLE) |
| 88 | 88 | { |
| 89 | 89 | } |
| 90 | 90 | |
| r32283 | r32284 | |
| 128 | 128 | if (m_cart) |
| 129 | 129 | { |
| 130 | 130 | if (!m_device_image_load.isnull()) |
| 131 | | { |
| 132 | | int result = m_device_image_load(*this); |
| 133 | | m_empty = (result == IMAGE_INIT_PASS) ? FALSE : TRUE; |
| 134 | | return result; |
| 135 | | } |
| 131 | return m_device_image_load(*this); |
| 136 | 132 | else |
| 137 | 133 | { |
| 138 | 134 | UINT32 len = common_get_size("rom"); |
| 139 | 135 | |
| 140 | | rom_alloc(len, m_width); |
| 136 | rom_alloc(len, m_width, m_endianness); |
| 141 | 137 | common_load_rom(get_rom_base(), len, "rom"); |
| 142 | | m_empty = FALSE; |
| 143 | 138 | |
| 144 | 139 | return IMAGE_INIT_PASS; |
| 145 | 140 | } |
trunk/src/emu/bus/generic/slot.h
| r32283 | r32284 | |
| 23 | 23 | virtual DECLARE_READ8_MEMBER(read_ram) { return 0xff; } |
| 24 | 24 | virtual DECLARE_WRITE8_MEMBER(write_ram) {}; |
| 25 | 25 | |
| 26 | | virtual void rom_alloc(size_t size, int width, const char *tag); |
| 26 | virtual void rom_alloc(size_t size, int width, endianness_t end, const char *tag); |
| 27 | 27 | virtual void ram_alloc(UINT32 size); |
| 28 | 28 | |
| 29 | 29 | UINT8* get_rom_base() { return m_rom; } |
| r32283 | r32284 | |
| 56 | 56 | #define MCFG_GENERIC_WIDTH(_width) \ |
| 57 | 57 | static_cast<generic_slot_device *>(device)->set_width(_width); |
| 58 | 58 | |
| 59 | #define MCFG_GENERIC_ENDIAN(_endianness) \ |
| 60 | static_cast<generic_slot_device *>(device)->set_endian(_endianness); |
| 61 | |
| 59 | 62 | #define MCFG_GENERIC_DEFAULT_CARD(_def_card) \ |
| 60 | 63 | static_cast<generic_slot_device *>(device)->set_default_card(_def_card); |
| 61 | 64 | |
| r32283 | r32284 | |
| 92 | 95 | void set_extensions(const char * exts) { m_extensions = exts; } |
| 93 | 96 | void set_must_be_loaded(bool mandatory) { m_must_be_loaded = mandatory; } |
| 94 | 97 | void set_width(int width) { m_width = width; } |
| 98 | void set_endian(endianness_t end) { m_endianness = end; } |
| 95 | 99 | |
| 96 | 100 | // device-level overrides |
| 97 | 101 | virtual void device_start(); |
| r32283 | r32284 | |
| 102 | 106 | virtual void call_unload(); |
| 103 | 107 | virtual bool call_softlist_load(software_list_device &swlist, const char *swname, const rom_entry *start_entry); |
| 104 | 108 | |
| 105 | | bool cart_mounted() { return !m_empty; } |
| 106 | 109 | UINT32 common_get_size(const char *region); |
| 107 | 110 | void common_load_rom(UINT8 *ROM, UINT32 len, const char *region); |
| 108 | 111 | |
| r32283 | r32284 | |
| 127 | 130 | virtual DECLARE_READ8_MEMBER(read_ram); |
| 128 | 131 | virtual DECLARE_WRITE8_MEMBER(write_ram); |
| 129 | 132 | |
| 130 | | virtual void rom_alloc(size_t size, int width) { if (m_cart) m_cart->rom_alloc(size, width, tag()); } |
| 133 | virtual void rom_alloc(size_t size, int width, endianness_t end) { if (m_cart) m_cart->rom_alloc(size, width, end, tag()); } |
| 131 | 134 | virtual void ram_alloc(UINT32 size) { if (m_cart) m_cart->ram_alloc(size); } |
| 132 | 135 | |
| 133 | 136 | UINT8* get_rom_base() { if (m_cart) return m_cart->get_rom_base(); return NULL; } |
| r32283 | r32284 | |
| 140 | 143 | const char *m_extensions; |
| 141 | 144 | bool m_must_be_loaded; |
| 142 | 145 | int m_width; |
| 143 | | bool m_empty; |
| 146 | endianness_t m_endianness; |
| 144 | 147 | device_generic_cart_interface *m_cart; |
| 145 | 148 | device_image_load_delegate m_device_image_load; |
| 146 | 149 | device_image_func_delegate m_device_image_unload; |
| r32283 | r32284 | |
| 155 | 158 | DEVICE CONFIGURATION MACROS |
| 156 | 159 | ***************************************************************************/ |
| 157 | 160 | |
| 158 | | #define MCFG_GENERIC_CARTSLOT_ADD(_tag, _width, _slot_intf, _dev_intf) \ |
| 161 | #define MCFG_GENERIC_CARTSLOT_ADD(_tag, _slot_intf, _dev_intf) \ |
| 159 | 162 | MCFG_DEVICE_ADD(_tag, GENERIC_SOCKET, 0) \ |
| 160 | 163 | MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, NULL, false) \ |
| 161 | 164 | MCFG_GENERIC_INTERFACE(_dev_intf) \ |
| 162 | | MCFG_GENERIC_WIDTH(_width) |
| 163 | 165 | |
| 164 | | #define MCFG_GENERIC_SOCKET_ADD(_tag, _width, _slot_intf, _dev_intf) \ |
| 166 | #define MCFG_GENERIC_SOCKET_ADD(_tag, _slot_intf, _dev_intf) \ |
| 165 | 167 | MCFG_DEVICE_ADD(_tag, GENERIC_SOCKET, 0) \ |
| 166 | 168 | MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, NULL, false) \ |
| 167 | 169 | MCFG_GENERIC_INTERFACE(_dev_intf) \ |
| 168 | | MCFG_GENERIC_WIDTH(_width) |
| 169 | 170 | |
| 170 | 171 | #endif |
trunk/src/mess/drivers/sv8000.c
| r32283 | r32284 | |
| 173 | 173 | m_intext = 0; |
| 174 | 174 | m_inv = 0; |
| 175 | 175 | |
| 176 | | if (m_cart->cart_mounted()) |
| 176 | if (m_cart->exists()) |
| 177 | 177 | m_maincpu->space(AS_PROGRAM).install_read_handler(0x0000, 0x0fff, read8_delegate(FUNC(generic_slot_device::read_rom),(generic_slot_device*)m_cart)); |
| 178 | 178 | |
| 179 | 179 | save_item(NAME(m_column)); |
| r32283 | r32284 | |
| 204 | 204 | return IMAGE_INIT_FAIL; |
| 205 | 205 | } |
| 206 | 206 | |
| 207 | | m_cart->rom_alloc(size, 1); |
| 207 | m_cart->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE); |
| 208 | 208 | m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom"); |
| 209 | 209 | |
| 210 | 210 | return IMAGE_INIT_PASS; |
| r32283 | r32284 | |
| 398 | 398 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 399 | 399 | |
| 400 | 400 | /* cartridge */ |
| 401 | | MCFG_GENERIC_CARTSLOT_ADD("cartslot", GENERIC_ROM8_WIDTH, generic_plain_slot, "sv8000_cart") |
| 401 | MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "sv8000_cart") |
| 402 | 402 | MCFG_GENERIC_MANDATORY |
| 403 | 403 | MCFG_GENERIC_LOAD(sv8000_state, cart) |
| 404 | 404 | |
trunk/src/mess/drivers/bbcbc.c
| r32283 | r32284 | |
| 118 | 118 | |
| 119 | 119 | void bbcbc_state::machine_start() |
| 120 | 120 | { |
| 121 | | if (m_cart->cart_mounted()) |
| 121 | if (m_cart->exists()) |
| 122 | 122 | m_maincpu->space(AS_PROGRAM).install_read_handler(0x4000, 0xbfff, read8_delegate(FUNC(generic_slot_device::read_rom),(generic_slot_device*)m_cart)); |
| 123 | 123 | } |
| 124 | 124 | |
| r32283 | r32284 | |
| 141 | 141 | MCFG_TMS9928A_SCREEN_ADD_PAL( "screen" ) |
| 142 | 142 | MCFG_SCREEN_UPDATE_DEVICE( "tms9129", tms9928a_device, screen_update ) |
| 143 | 143 | |
| 144 | | MCFG_GENERIC_CARTSLOT_ADD("cartslot", GENERIC_ROM8_WIDTH, generic_plain_slot, "bbcbc_cart") |
| 144 | MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "bbcbc_cart") |
| 145 | 145 | |
| 146 | 146 | /* Software lists */ |
| 147 | 147 | MCFG_SOFTWARE_LIST_ADD("cart_list","bbcbc") |
trunk/src/mess/drivers/uzebox.c
| r32283 | r32284 | |
| 67 | 67 | { |
| 68 | 68 | machine().first_screen()->register_screen_bitmap(m_bitmap); |
| 69 | 69 | |
| 70 | | if (m_cart->cart_mounted()) |
| 70 | if (m_cart->exists()) |
| 71 | 71 | m_maincpu->space(AS_PROGRAM).install_read_handler(0x0000, 0xffff, read8_delegate(FUNC(generic_slot_device::read_rom),(generic_slot_device*)m_cart)); |
| 72 | 72 | } |
| 73 | 73 | |
| r32283 | r32284 | |
| 274 | 274 | { |
| 275 | 275 | UINT32 size = m_cart->common_get_size("rom"); |
| 276 | 276 | |
| 277 | | m_cart->rom_alloc(size, 1); |
| 277 | m_cart->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE); |
| 278 | 278 | |
| 279 | 279 | if (image.software_entry() == NULL) |
| 280 | 280 | { |
| r32283 | r32284 | |
| 319 | 319 | MCFG_SOUND_ADD("dac", DAC, 0) |
| 320 | 320 | MCFG_SOUND_ROUTE(0, "avr8", 1.00) |
| 321 | 321 | |
| 322 | | MCFG_GENERIC_CARTSLOT_ADD("cartslot", GENERIC_ROM8_WIDTH, generic_plain_slot, "uzebox") |
| 322 | MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "uzebox") |
| 323 | 323 | MCFG_GENERIC_EXTENSIONS("bin,uze") |
| 324 | 324 | MCFG_GENERIC_MANDATORY |
| 325 | 325 | MCFG_GENERIC_LOAD(uzebox_state, uzebox_cart) |
trunk/src/mess/drivers/aim65.c
| r32283 | r32284 | |
| 163 | 163 | return IMAGE_INIT_FAIL; |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | | slot->rom_alloc(size, 1); |
| 166 | slot->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE); |
| 167 | 167 | slot->common_load_rom(slot->get_rom_base(), size, slot_tag); |
| 168 | 168 | |
| 169 | 169 | return IMAGE_INIT_PASS; |
| r32283 | r32284 | |
| 225 | 225 | MCFG_CASSETTE_ADD( "cassette2" ) |
| 226 | 226 | MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_RECORD | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED) |
| 227 | 227 | |
| 228 | | MCFG_GENERIC_SOCKET_ADD("z26", GENERIC_ROM8_WIDTH, generic_plain_slot, "aim65_cart") |
| 228 | MCFG_GENERIC_SOCKET_ADD("z26", generic_plain_slot, "aim65_cart") |
| 229 | 229 | MCFG_GENERIC_EXTENSIONS("z26") |
| 230 | 230 | MCFG_GENERIC_LOAD(aim65_state, z26_load) |
| 231 | 231 | |
| 232 | | MCFG_GENERIC_SOCKET_ADD("z25", GENERIC_ROM8_WIDTH, generic_plain_slot, "aim65_cart") |
| 232 | MCFG_GENERIC_SOCKET_ADD("z25", generic_plain_slot, "aim65_cart") |
| 233 | 233 | MCFG_GENERIC_EXTENSIONS("z25") |
| 234 | 234 | MCFG_GENERIC_LOAD(aim65_state, z25_load) |
| 235 | 235 | |
| 236 | | MCFG_GENERIC_SOCKET_ADD("z24", GENERIC_ROM8_WIDTH, generic_plain_slot, "aim65_cart") |
| 236 | MCFG_GENERIC_SOCKET_ADD("z24", generic_plain_slot, "aim65_cart") |
| 237 | 237 | MCFG_GENERIC_EXTENSIONS("z24") |
| 238 | 238 | MCFG_GENERIC_LOAD(aim65_state, z24_load) |
| 239 | 239 | |
trunk/src/mess/drivers/ti74.c
| r32283 | r32284 | |
| 132 | 132 | return IMAGE_INIT_FAIL; |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | | m_cart->rom_alloc(size, 1); |
| 135 | m_cart->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE); |
| 136 | 136 | m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom"); |
| 137 | 137 | |
| 138 | 138 | return IMAGE_INIT_PASS; |
| r32283 | r32284 | |
| 492 | 492 | |
| 493 | 493 | void ti74_state::machine_start() |
| 494 | 494 | { |
| 495 | | if (m_cart->cart_mounted()) |
| 495 | if (m_cart->exists()) |
| 496 | 496 | m_maincpu->space(AS_PROGRAM).install_read_handler(0x4000, 0xbfff, read8_delegate(FUNC(generic_slot_device::read_rom),(generic_slot_device*)m_cart)); |
| 497 | 497 | |
| 498 | 498 | membank("sysbank")->configure_entries(0, 4, memregion("system")->base(), 0x2000); |
| r32283 | r32284 | |
| 534 | 534 | MCFG_HD44780_PIXEL_UPDATE_CB(ti74_pixel_update) |
| 535 | 535 | |
| 536 | 536 | /* cartridge */ |
| 537 | | MCFG_GENERIC_CARTSLOT_ADD("cartslot", GENERIC_ROM8_WIDTH, generic_plain_slot, "ti74_cart") |
| 537 | MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "ti74_cart") |
| 538 | 538 | MCFG_GENERIC_EXTENSIONS("bin,rom,256") |
| 539 | 539 | MCFG_GENERIC_LOAD(ti74_state, ti74_cartridge) |
| 540 | 540 | |
| r32283 | r32284 | |
| 568 | 568 | MCFG_HD44780_PIXEL_UPDATE_CB(ti95_pixel_update) |
| 569 | 569 | |
| 570 | 570 | /* cartridge */ |
| 571 | | MCFG_GENERIC_CARTSLOT_ADD("cartslot", GENERIC_ROM8_WIDTH, generic_plain_slot, "ti95_cart") |
| 571 | MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "ti95_cart") |
| 572 | 572 | MCFG_GENERIC_EXTENSIONS("bin,rom,256") |
| 573 | 573 | MCFG_GENERIC_LOAD(ti74_state, ti74_cartridge) |
| 574 | 574 | |
trunk/src/mess/drivers/cc40.c
| r32283 | r32284 | |
| 165 | 165 | return IMAGE_INIT_FAIL; |
| 166 | 166 | } |
| 167 | 167 | |
| 168 | | m_cart->rom_alloc(size, 0x20000); // allocate a larger ROM region to have 4x32K banks |
| 168 | m_cart->rom_alloc(0x20000, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE); // allocate a larger ROM region to have 4x32K banks |
| 169 | 169 | m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom"); |
| 170 | 170 | |
| 171 | 171 | return IMAGE_INIT_PASS; |
| r32283 | r32284 | |
| 614 | 614 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 615 | 615 | |
| 616 | 616 | /* cartridge */ |
| 617 | | MCFG_GENERIC_CARTSLOT_ADD("cartslot", GENERIC_ROM8_WIDTH, generic_plain_slot, "cc40_cart") |
| 617 | MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "cc40_cart") |
| 618 | 618 | MCFG_GENERIC_EXTENSIONS("bin,rom,256") |
| 619 | 619 | MCFG_GENERIC_LOAD(cc40_state, cc40_cartridge) |
| 620 | 620 | |
trunk/src/mess/drivers/c128.c
| r32283 | r32284 | |
| 190 | 190 | { |
| 191 | 191 | data = m_vic->read(space, offset & 0x3f); |
| 192 | 192 | } |
| 193 | | if (!BIT(plaout, PLA_OUT_FROM1) && m_from->cart_mounted()) |
| 193 | if (!BIT(plaout, PLA_OUT_FROM1) && m_from->exists()) |
| 194 | 194 | { |
| 195 | 195 | data = m_from->read_rom(space, offset & 0x7fff); |
| 196 | 196 | } |
| r32283 | r32284 | |
| 1549 | 1549 | MCFG_SOFTWARE_LIST_FILTER("from_list", "NTSC") |
| 1550 | 1550 | |
| 1551 | 1551 | // function ROM |
| 1552 | | MCFG_GENERIC_SOCKET_ADD("from", GENERIC_ROM8_WIDTH, generic_plain_slot, "c128_rom") |
| 1552 | MCFG_GENERIC_SOCKET_ADD("from", generic_plain_slot, "c128_rom") |
| 1553 | 1553 | MCFG_GENERIC_EXTENSIONS("bin,rom") |
| 1554 | 1554 | |
| 1555 | 1555 | // internal ram |
| r32283 | r32284 | |
| 1723 | 1723 | MCFG_SOFTWARE_LIST_FILTER("from_list", "PAL") |
| 1724 | 1724 | |
| 1725 | 1725 | // function ROM |
| 1726 | | MCFG_GENERIC_SOCKET_ADD("from", GENERIC_ROM8_WIDTH, generic_plain_slot, "c128_rom") |
| 1726 | MCFG_GENERIC_SOCKET_ADD("from", generic_plain_slot, "c128_rom") |
| 1727 | 1727 | MCFG_GENERIC_EXTENSIONS("bin,rom") |
| 1728 | 1728 | |
| 1729 | 1729 | // internal ram |
trunk/src/mess/drivers/tek405x.c
| r32283 | r32284 | |
| 1091 | 1091 | MCFG_RAM_EXTRA_OPTIONS("16K,24K,32K") |
| 1092 | 1092 | |
| 1093 | 1093 | // cartridge |
| 1094 | | MCFG_GENERIC_CARTSLOT_ADD("cartslot1", GENERIC_ROM8_WIDTH, generic_plain_slot, "tek4050_cart") |
| 1095 | | MCFG_GENERIC_CARTSLOT_ADD("cartslot2", GENERIC_ROM8_WIDTH, generic_plain_slot, "tek4050_cart") |
| 1094 | MCFG_GENERIC_CARTSLOT_ADD("cartslot1", generic_plain_slot, "tek4050_cart") |
| 1095 | MCFG_GENERIC_CARTSLOT_ADD("cartslot2", generic_plain_slot, "tek4050_cart") |
| 1096 | 1096 | MACHINE_CONFIG_END |
| 1097 | 1097 | |
| 1098 | 1098 | |
| r32283 | r32284 | |
| 1127 | 1127 | MCFG_RAM_EXTRA_OPTIONS("64K") |
| 1128 | 1128 | |
| 1129 | 1129 | // cartridge |
| 1130 | | MCFG_GENERIC_CARTSLOT_ADD("cartslot1", GENERIC_ROM8_WIDTH, generic_plain_slot, "tek4050_cart") |
| 1131 | | MCFG_GENERIC_CARTSLOT_ADD("cartslot2", GENERIC_ROM8_WIDTH, generic_plain_slot, "tek4050_cart") |
| 1130 | MCFG_GENERIC_CARTSLOT_ADD("cartslot1", generic_plain_slot, "tek4050_cart") |
| 1131 | MCFG_GENERIC_CARTSLOT_ADD("cartslot2", generic_plain_slot, "tek4050_cart") |
| 1132 | 1132 | |
| 1133 | 1133 | // software lists |
| 1134 | 1134 | MCFG_SOFTWARE_LIST_ADD("cart_list", "tek4052_cart") |
trunk/src/mess/drivers/pokemini.c
| r32283 | r32284 | |
| 1514 | 1514 | return IMAGE_INIT_FAIL; |
| 1515 | 1515 | } |
| 1516 | 1516 | |
| 1517 | | m_cart->rom_alloc(size, 1); |
| 1517 | m_cart->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE); |
| 1518 | 1518 | m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom"); |
| 1519 | 1519 | |
| 1520 | 1520 | return IMAGE_INIT_PASS; |
| r32283 | r32284 | |
| 1779 | 1779 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 1780 | 1780 | |
| 1781 | 1781 | /* cartridge */ |
| 1782 | | MCFG_GENERIC_CARTSLOT_ADD("cartslot", GENERIC_ROM8_WIDTH, generic_plain_slot, "pokemini_cart") |
| 1782 | MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "pokemini_cart") |
| 1783 | 1783 | MCFG_GENERIC_EXTENSIONS("bin,min") |
| 1784 | 1784 | MCFG_GENERIC_LOAD(pokemini_state, pokemini_cart) |
| 1785 | 1785 | |
trunk/src/mess/drivers/pv2000.c
| r32283 | r32284 | |
| 344 | 344 | |
| 345 | 345 | void pv2000_state::machine_start() |
| 346 | 346 | { |
| 347 | | if (m_cart->cart_mounted()) |
| 347 | if (m_cart->exists()) |
| 348 | 348 | m_maincpu->space(AS_PROGRAM).install_read_handler(0xc000, 0xffff, read8_delegate(FUNC(generic_slot_device::read_rom),(generic_slot_device*)m_cart)); |
| 349 | 349 | } |
| 350 | 350 | |
| r32283 | r32284 | |
| 368 | 368 | return IMAGE_INIT_FAIL; |
| 369 | 369 | } |
| 370 | 370 | |
| 371 | | m_cart->rom_alloc(size, 1); |
| 371 | m_cart->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE); |
| 372 | 372 | m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom"); |
| 373 | 373 | |
| 374 | 374 | return IMAGE_INIT_PASS; |
| r32283 | r32284 | |
| 403 | 403 | MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED) |
| 404 | 404 | |
| 405 | 405 | /* cartridge */ |
| 406 | | MCFG_GENERIC_CARTSLOT_ADD("cartslot", GENERIC_ROM8_WIDTH, generic_plain_slot, "pv2000_cart") |
| 406 | MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "pv2000_cart") |
| 407 | 407 | MCFG_GENERIC_EXTENSIONS("bin,rom,col") |
| 408 | 408 | MCFG_GENERIC_LOAD(pv2000_state, pv2000_cart) |
| 409 | 409 | |
trunk/src/mess/drivers/exelv.c
| r32283 | r32284 | |
| 365 | 365 | */ |
| 366 | 366 | READ8_MEMBER(exelv_state::rom_r) |
| 367 | 367 | { |
| 368 | | if (m_cart && m_cart->cart_mounted()) |
| 368 | if (m_cart && m_cart->exists()) |
| 369 | 369 | return m_cart->read_rom(space, offset + 0x200); |
| 370 | 370 | |
| 371 | 371 | return 0; |
| r32283 | r32284 | |
| 535 | 535 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 536 | 536 | |
| 537 | 537 | /* cartridge */ |
| 538 | | MCFG_GENERIC_CARTSLOT_ADD("cartslot", GENERIC_ROM8_WIDTH, generic_linear_slot, "exelvision_cart") |
| 538 | MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_linear_slot, "exelvision_cart") |
| 539 | 539 | MCFG_GENERIC_EXTENSIONS("bin,rom") |
| 540 | 540 | |
| 541 | 541 | MCFG_SOFTWARE_LIST_ADD("cart_list", "exl100_cart") |
trunk/src/mess/drivers/atom.c
| r32283 | r32284 | |
| 214 | 214 | |
| 215 | 215 | READ8_MEMBER( atomeb_state::ext_r ) |
| 216 | 216 | { |
| 217 | | if (m_ext[m_eprom & 0x0f]->cart_mounted()) |
| 217 | if (m_ext[m_eprom & 0x0f]->exists()) |
| 218 | 218 | return m_ext[m_eprom & 0x0f]->read_rom(space, offset); |
| 219 | 219 | else |
| 220 | 220 | return 0xff; |
| r32283 | r32284 | |
| 226 | 226 | |
| 227 | 227 | READ8_MEMBER( atomeb_state::dos_r ) |
| 228 | 228 | { |
| 229 | | if (m_e0->cart_mounted() && !BIT(m_eprom, 7)) |
| 229 | if (m_e0->exists() && !BIT(m_eprom, 7)) |
| 230 | 230 | return m_e0->read_rom(space, offset); |
| 231 | | else if (m_e1->cart_mounted() && BIT(m_eprom, 7)) |
| 231 | else if (m_e1->exists() && BIT(m_eprom, 7)) |
| 232 | 232 | return m_e1->read_rom(space, offset); |
| 233 | 233 | else |
| 234 | 234 | return 0xff; |
| r32283 | r32284 | |
| 652 | 652 | m_baseram[0x0a] = machine().rand() & 0x0ff; |
| 653 | 653 | m_baseram[0x0b] = machine().rand() & 0x0ff; |
| 654 | 654 | |
| 655 | | if (m_cart && m_cart->cart_mounted()) |
| 655 | if (m_cart && m_cart->exists()) |
| 656 | 656 | m_maincpu->space(AS_PROGRAM).install_read_handler(0xa000, 0xafff, read8_delegate(FUNC(generic_slot_device::read_rom),(generic_slot_device*)m_cart)); |
| 657 | 657 | } |
| 658 | 658 | |
| r32283 | r32284 | |
| 679 | 679 | return IMAGE_INIT_FAIL; |
| 680 | 680 | } |
| 681 | 681 | |
| 682 | | slot->rom_alloc(size, 1); |
| 682 | slot->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE); |
| 683 | 683 | slot->common_load_rom(slot->get_rom_base(), size, "rom"); |
| 684 | 684 | |
| 685 | 685 | return IMAGE_INIT_PASS; |
| r32283 | r32284 | |
| 738 | 738 | MCFG_QUICKLOAD_ADD("quickload", atom_state, atom_atm, "atm", 0) |
| 739 | 739 | |
| 740 | 740 | /* cartridge */ |
| 741 | | MCFG_GENERIC_CARTSLOT_ADD("cartslot", GENERIC_ROM8_WIDTH, generic_linear_slot, "atom_cart") |
| 741 | MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_linear_slot, "atom_cart") |
| 742 | 742 | MCFG_GENERIC_EXTENSIONS("bin,rom") |
| 743 | 743 | MCFG_GENERIC_LOAD(atom_state, cart_load) |
| 744 | 744 | |
| r32283 | r32284 | |
| 756 | 756 | -------------------------------------------------*/ |
| 757 | 757 | |
| 758 | 758 | #define MCFG_ATOM_ROM_ADD(_tag, _load) \ |
| 759 | | MCFG_GENERIC_SOCKET_ADD(_tag, GENERIC_ROM8_WIDTH, generic_linear_slot, "atom_cart") \ |
| 759 | MCFG_GENERIC_SOCKET_ADD(_tag, generic_linear_slot, "atom_cart") \ |
| 760 | 760 | MCFG_GENERIC_EXTENSIONS("bin,rom") \ |
| 761 | 761 | MCFG_GENERIC_LOAD(atomeb_state, _load) |
| 762 | 762 | |
trunk/src/mess/drivers/atarist.c
| r32283 | r32284 | |
| 1937 | 1937 | // configure RAM banking |
| 1938 | 1938 | configure_memory(); |
| 1939 | 1939 | |
| 1940 | | if (m_cart->cart_mounted()) |
| 1940 | if (m_cart->exists()) |
| 1941 | 1941 | m_maincpu->space(AS_PROGRAM).install_read_handler(0xfa0000, 0xfbffff, read16_delegate(FUNC(generic_slot_device::read16_rom),(generic_slot_device*)m_cart)); |
| 1942 | 1942 | |
| 1943 | 1943 | // allocate timers |
| r32283 | r32284 | |
| 1998 | 1998 | /* configure RAM banking */ |
| 1999 | 1999 | configure_memory(); |
| 2000 | 2000 | |
| 2001 | | if (m_cart->cart_mounted()) |
| 2001 | if (m_cart->exists()) |
| 2002 | 2002 | m_maincpu->space(AS_PROGRAM).install_read_handler(0xfa0000, 0xfbffff, read16_delegate(FUNC(generic_slot_device::read16_rom),(generic_slot_device*)m_cart)); |
| 2003 | 2003 | |
| 2004 | 2004 | /* allocate timers */ |
| r32283 | r32284 | |
| 2043 | 2043 | break; |
| 2044 | 2044 | } |
| 2045 | 2045 | |
| 2046 | | if (m_cart->cart_mounted()) |
| 2046 | if (m_cart->exists()) |
| 2047 | 2047 | m_maincpu->space(AS_PROGRAM).install_read_handler(0xfa0000, 0xfbffff, read16_delegate(FUNC(generic_slot_device::read16_rom),(generic_slot_device*)m_cart)); |
| 2048 | 2048 | |
| 2049 | 2049 | /* register for state saving */ |
| r32283 | r32284 | |
| 2142 | 2142 | MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(st_state, write_acia_clock)) |
| 2143 | 2143 | |
| 2144 | 2144 | // cartridge |
| 2145 | | MCFG_GENERIC_CARTSLOT_ADD("cartslot", GENERIC_ROM16_WIDTH, generic_linear_slot, "st_cart") |
| 2145 | MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_linear_slot, "st_cart") |
| 2146 | 2146 | MCFG_GENERIC_EXTENSIONS("bin,rom") |
| 2147 | MCFG_GENERIC_WIDTH(GENERIC_ROM16_WIDTH) |
| 2147 | 2148 | MCFG_SOFTWARE_LIST_ADD("cart_list", "st_cart") |
| 2148 | 2149 | |
| 2149 | 2150 | // internal ram |
| r32283 | r32284 | |
| 2231 | 2232 | MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(st_state, write_acia_clock)) |
| 2232 | 2233 | |
| 2233 | 2234 | // cartridge |
| 2234 | | MCFG_GENERIC_CARTSLOT_ADD("cartslot", GENERIC_ROM16_WIDTH, generic_linear_slot, "st_cart") |
| 2235 | MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_linear_slot, "st_cart") |
| 2235 | 2236 | MCFG_GENERIC_EXTENSIONS("bin,rom") |
| 2237 | MCFG_GENERIC_WIDTH(GENERIC_ROM16_WIDTH) |
| 2236 | 2238 | MCFG_SOFTWARE_LIST_ADD("cart_list", "st_cart") |
| 2237 | 2239 | |
| 2238 | 2240 | // internal ram |
| r32283 | r32284 | |
| 2327 | 2329 | MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(st_state, write_acia_clock)) |
| 2328 | 2330 | |
| 2329 | 2331 | // cartridge |
| 2330 | | MCFG_GENERIC_CARTSLOT_ADD("cartslot", GENERIC_ROM16_WIDTH, generic_linear_slot, "st_cart") |
| 2332 | MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_linear_slot, "st_cart") |
| 2331 | 2333 | MCFG_GENERIC_EXTENSIONS("bin,rom") |
| 2334 | MCFG_GENERIC_WIDTH(GENERIC_ROM16_WIDTH) |
| 2332 | 2335 | // MCFG_SOFTWARE_LIST_ADD("cart_list", "ste_cart") |
| 2333 | 2336 | |
| 2334 | 2337 | // internal ram |
| r32283 | r32284 | |
| 2431 | 2434 | MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(st_state, write_acia_clock)) |
| 2432 | 2435 | |
| 2433 | 2436 | // cartridge |
| 2434 | | MCFG_GENERIC_CARTSLOT_ADD("cartslot", GENERIC_ROM16_WIDTH, generic_linear_slot, "st_cart") |
| 2437 | MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_linear_slot, "st_cart") |
| 2435 | 2438 | MCFG_GENERIC_EXTENSIONS("bin,rom") |
| 2439 | MCFG_GENERIC_WIDTH(GENERIC_ROM16_WIDTH) |
| 2436 | 2440 | MCFG_SOFTWARE_LIST_ADD("cart_list", "st_cart") |
| 2437 | 2441 | |
| 2438 | 2442 | /* internal ram */ |
trunk/src/mess/drivers/pockstat.c
| r32283 | r32284 | |
| 970 | 970 | return IMAGE_INIT_FAIL; |
| 971 | 971 | } |
| 972 | 972 | |
| 973 | | m_cart->rom_alloc(0x20000, GENERIC_ROM32_WIDTH); |
| 973 | m_cart->rom_alloc(0x20000, GENERIC_ROM32_WIDTH, ENDIANNESS_LITTLE); |
| 974 | 974 | image.fread(m_cart->get_rom_base(), 0x20000); |
| 975 | 975 | |
| 976 | 976 | return IMAGE_INIT_PASS; |
| r32283 | r32284 | |
| 996 | 996 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 997 | 997 | |
| 998 | 998 | /* cartridge */ |
| 999 | | MCFG_GENERIC_CARTSLOT_ADD("cartslot", GENERIC_ROM32_WIDTH, generic_plain_slot, "pockstat_cart") |
| 999 | MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "pockstat_cart") |
| 1000 | 1000 | MCFG_GENERIC_EXTENSIONS("gme") |
| 1001 | MCFG_GENERIC_WIDTH(GENERIC_ROM32_WIDTH) |
| 1002 | MCFG_GENERIC_ENDIAN(ENDIANNESS_LITTLE) |
| 1001 | 1003 | MCFG_GENERIC_LOAD(pockstat_state, pockstat_flash) |
| 1002 | 1004 | MACHINE_CONFIG_END |
| 1003 | 1005 | |
trunk/src/mess/drivers/casloopy.c
| r32283 | r32284 | |
| 479 | 479 | dynamic_buffer temp; |
| 480 | 480 | temp.resize(0x200000); |
| 481 | 481 | |
| 482 | | m_cart->rom_alloc(size, GENERIC_ROM32_WIDTH); |
| 482 | m_cart->rom_alloc(size, GENERIC_ROM32_WIDTH, ENDIANNESS_LITTLE); |
| 483 | 483 | |
| 484 | 484 | SRC = temp; |
| 485 | 485 | DST = m_cart->get_rom_base(); |
| r32283 | r32284 | |
| 523 | 523 | |
| 524 | 524 | MCFG_GFXDECODE_ADD("gfxdecode", "palette", empty) |
| 525 | 525 | |
| 526 | | MCFG_GENERIC_CARTSLOT_ADD("cartslot", GENERIC_ROM32_WIDTH, generic_plain_slot, "loopy_cart") |
| 526 | MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "loopy_cart") |
| 527 | 527 | MCFG_GENERIC_EXTENSIONS("bin,ic1") |
| 528 | MCFG_GENERIC_WIDTH(GENERIC_ROM32_WIDTH) |
| 529 | MCFG_GENERIC_ENDIAN(ENDIANNESS_LITTLE) |
| 528 | 530 | MCFG_GENERIC_MANDATORY |
| 529 | 531 | MCFG_GENERIC_LOAD(casloopy_state, loopy_cart) |
| 530 | 532 | |
trunk/src/mess/drivers/gmaster.c
| r32283 | r32284 | |
| 263 | 263 | |
| 264 | 264 | void gmaster_state::machine_start() |
| 265 | 265 | { |
| 266 | | if (m_cart->cart_mounted()) |
| 266 | if (m_cart->exists()) |
| 267 | 267 | m_maincpu->space(AS_PROGRAM).install_read_handler(0x8000, 0xfeff, read8_delegate(FUNC(generic_slot_device::read_rom),(generic_slot_device*)m_cart)); |
| 268 | 268 | |
| 269 | 269 | save_item(NAME(m_video.data)); |
| r32283 | r32284 | |
| 303 | 303 | MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) |
| 304 | 304 | MCFG_SOUND_ROUTE(0, "mono", 0.50) |
| 305 | 305 | |
| 306 | | MCFG_GENERIC_CARTSLOT_ADD("cartslot", GENERIC_ROM8_WIDTH, generic_linear_slot, "gmaster_cart") |
| 306 | MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_linear_slot, "gmaster_cart") |
| 307 | 307 | MCFG_GENERIC_MANDATORY |
| 308 | 308 | |
| 309 | 309 | MCFG_SOFTWARE_LIST_ADD("cart_list","gmaster") |
trunk/src/mess/drivers/myvision.c
| r32283 | r32284 | |
| 128 | 128 | |
| 129 | 129 | void myvision_state::machine_start() |
| 130 | 130 | { |
| 131 | | if (m_cart->cart_mounted()) |
| 131 | if (m_cart->exists()) |
| 132 | 132 | m_maincpu->space(AS_PROGRAM).install_read_handler(0x0000, 0x5fff, read8_delegate(FUNC(generic_slot_device::read_rom),(generic_slot_device*)m_cart)); |
| 133 | 133 | |
| 134 | 134 | save_item(NAME(m_column)); |
| r32283 | r32284 | |
| 151 | 151 | return IMAGE_INIT_FAIL; |
| 152 | 152 | } |
| 153 | 153 | |
| 154 | | m_cart->rom_alloc(size, 1); |
| 154 | m_cart->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE); |
| 155 | 155 | m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom"); |
| 156 | 156 | |
| 157 | 157 | return IMAGE_INIT_PASS; |
| r32283 | r32284 | |
| 231 | 231 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 232 | 232 | |
| 233 | 233 | /* cartridge */ |
| 234 | | MCFG_GENERIC_CARTSLOT_ADD("cartslot", GENERIC_ROM8_WIDTH, generic_plain_slot, "myvision_cart") |
| 234 | MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "myvision_cart") |
| 235 | 235 | MCFG_GENERIC_LOAD(myvision_state, cart) |
| 236 | 236 | //MCFG_GENERIC_MANDATORY |
| 237 | 237 | |
trunk/src/mess/drivers/fc100.c
| r32283 | r32284 | |
| 464 | 464 | m_intext = 0; |
| 465 | 465 | m_inv = 0; |
| 466 | 466 | |
| 467 | | if (m_cart->cart_mounted()) |
| 467 | if (m_cart->exists()) |
| 468 | 468 | m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000, 0x6fff, read8_delegate(FUNC(generic_slot_device::read_rom),(generic_slot_device*)m_cart)); |
| 469 | 469 | |
| 470 | 470 | save_item(NAME(m_ag)); |
| r32283 | r32284 | |
| 550 | 550 | MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_p", fc100_state, timer_p, attotime::from_hz(40000)) // cass read |
| 551 | 551 | MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_k", fc100_state, timer_k, attotime::from_hz(300)) // keyb scan |
| 552 | 552 | |
| 553 | | MCFG_GENERIC_CARTSLOT_ADD("cartslot", GENERIC_ROM8_WIDTH, generic_plain_slot, "fc100_cart") |
| 553 | MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "fc100_cart") |
| 554 | 554 | |
| 555 | 555 | MCFG_CENTRONICS_ADD("centronics", centronics_printers, "printer") |
| 556 | 556 | MCFG_CENTRONICS_ACK_HANDLER(DEVWRITELINE("cent_status_in", input_buffer_device, write_bit4)) |
trunk/src/mess/drivers/supracan.c
| r32283 | r32284 | |
| 1761 | 1761 | return IMAGE_INIT_FAIL; |
| 1762 | 1762 | } |
| 1763 | 1763 | |
| 1764 | | m_cart->rom_alloc(size, 2); |
| 1764 | m_cart->rom_alloc(size, GENERIC_ROM16_WIDTH, ENDIANNESS_BIG); |
| 1765 | 1765 | m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom"); |
| 1766 | 1766 | |
| 1767 | 1767 | return IMAGE_INIT_PASS; |
| r32283 | r32284 | |
| 1775 | 1775 | m_line_on_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(supracan_state::supracan_line_on_callback),this)); |
| 1776 | 1776 | m_line_off_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(supracan_state::supracan_line_off_callback),this)); |
| 1777 | 1777 | |
| 1778 | | if (m_cart->cart_mounted()) |
| 1778 | if (m_cart->exists()) |
| 1779 | 1779 | m_maincpu->space(AS_PROGRAM).install_read_handler(0x000000, 0x3fffff, read16_delegate(FUNC(generic_slot_device::read16_rom),(generic_slot_device*)m_cart)); |
| 1780 | 1780 | } |
| 1781 | 1781 | |
| r32283 | r32284 | |
| 1921 | 1921 | |
| 1922 | 1922 | MCFG_GFXDECODE_ADD("gfxdecode", "palette", supracan) |
| 1923 | 1923 | |
| 1924 | | MCFG_GENERIC_CARTSLOT_ADD("cartslot", GENERIC_ROM16_WIDTH, generic_plain_slot, "supracan_cart") |
| 1924 | MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "supracan_cart") |
| 1925 | MCFG_GENERIC_WIDTH(GENERIC_ROM16_WIDTH) |
| 1926 | MCFG_GENERIC_ENDIAN(ENDIANNESS_BIG) |
| 1925 | 1927 | MCFG_GENERIC_LOAD(supracan_state, supracan_cart) |
| 1926 | 1928 | |
| 1927 | 1929 | MCFG_SOFTWARE_LIST_ADD("cart_list","supracan") |
trunk/src/mess/drivers/x1.c
| r32283 | r32284 | |
| 961 | 961 | READ8_MEMBER( x1_state::x1_rom_r ) |
| 962 | 962 | { |
| 963 | 963 | // printf("%06x\n",m_rom_index[0]<<16|m_rom_index[1]<<8|m_rom_index[2]<<0); |
| 964 | | if (m_cart->cart_mounted()) |
| 964 | if (m_cart->exists()) |
| 965 | 965 | return m_cart->read_rom(space, (m_rom_index[0] << 16) | (m_rom_index[1] << 8) | (m_rom_index[2] << 0)); |
| 966 | 966 | else |
| 967 | 967 | return 0; |
| r32283 | r32284 | |
| 2478 | 2478 | MCFG_DEVICE_ADD("fdc", MB8877, 0) |
| 2479 | 2479 | MCFG_WD17XX_DEFAULT_DRIVE4_TAGS |
| 2480 | 2480 | |
| 2481 | | MCFG_GENERIC_CARTSLOT_ADD("cartslot", GENERIC_ROM8_WIDTH, generic_plain_slot, "x1_cart") |
| 2481 | MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "x1_cart") |
| 2482 | 2482 | MCFG_GENERIC_EXTENSIONS("bin,rom") |
| 2483 | 2483 | |
| 2484 | 2484 | MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
trunk/src/mess/drivers/pegasus.c
| r32283 | r32284 | |
| 437 | 437 | } |
| 438 | 438 | } |
| 439 | 439 | |
| 440 | | slot->rom_alloc(0x1000, 1); // we alloc 0x1000 also for smaller roms! |
| 440 | slot->rom_alloc(0x1000, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE); // we alloc 0x1000 also for smaller roms! |
| 441 | 441 | slot->common_load_rom(slot->get_rom_base(), size, any_socket ? "rom" : reg_tag); |
| 442 | 442 | |
| 443 | 443 | // raw images have to be decrypted |
| r32283 | r32284 | |
| 450 | 450 | { |
| 451 | 451 | m_p_pcgram = memregion("pcg")->base(); |
| 452 | 452 | |
| 453 | | if (m_exp_00->cart_mounted()) |
| 453 | if (m_exp_00->exists()) |
| 454 | 454 | m_maincpu->space(AS_PROGRAM).install_read_handler(0x0000, 0x0fff, read8_delegate(FUNC(generic_slot_device::read_rom),(generic_slot_device*)m_exp_00)); |
| 455 | | if (m_exp_01->cart_mounted()) |
| 455 | if (m_exp_01->exists()) |
| 456 | 456 | m_maincpu->space(AS_PROGRAM).install_read_handler(0x1000, 0x1fff, read8_delegate(FUNC(generic_slot_device::read_rom),(generic_slot_device*)m_exp_01)); |
| 457 | | if (m_exp_02->cart_mounted()) |
| 457 | if (m_exp_02->exists()) |
| 458 | 458 | m_maincpu->space(AS_PROGRAM).install_read_handler(0x2000, 0x2fff, read8_delegate(FUNC(generic_slot_device::read_rom),(generic_slot_device*)m_exp_02)); |
| 459 | | if (m_exp_0c->cart_mounted()) |
| 459 | if (m_exp_0c->exists()) |
| 460 | 460 | m_maincpu->space(AS_PROGRAM).install_read_handler(0xc000, 0xcfff, read8_delegate(FUNC(generic_slot_device::read_rom),(generic_slot_device*)m_exp_0c)); |
| 461 | | if (m_exp_0d->cart_mounted()) |
| 461 | if (m_exp_0d->exists()) |
| 462 | 462 | m_maincpu->space(AS_PROGRAM).install_read_handler(0xd000, 0xdfff, read8_delegate(FUNC(generic_slot_device::read_rom),(generic_slot_device*)m_exp_0d)); |
| 463 | 463 | } |
| 464 | 464 | |
| r32283 | r32284 | |
| 515 | 515 | MCFG_PIA_IRQA_HANDLER(DEVWRITELINE("maincpu", m6809e_device, irq_line)) |
| 516 | 516 | MCFG_PIA_IRQB_HANDLER(DEVWRITELINE("maincpu", m6809e_device, irq_line)) |
| 517 | 517 | |
| 518 | | MCFG_GENERIC_SOCKET_ADD("exp00", GENERIC_ROM8_WIDTH, generic_plain_slot, "pegasus_cart") |
| 518 | MCFG_GENERIC_SOCKET_ADD("exp00", generic_plain_slot, "pegasus_cart") |
| 519 | 519 | MCFG_GENERIC_LOAD(pegasus_state, exp00_load) |
| 520 | 520 | |
| 521 | | MCFG_GENERIC_SOCKET_ADD("exp01", GENERIC_ROM8_WIDTH, generic_plain_slot, "pegasus_cart") |
| 521 | MCFG_GENERIC_SOCKET_ADD("exp01", generic_plain_slot, "pegasus_cart") |
| 522 | 522 | MCFG_GENERIC_LOAD(pegasus_state, exp01_load) |
| 523 | 523 | |
| 524 | | MCFG_GENERIC_SOCKET_ADD("exp02", GENERIC_ROM8_WIDTH, generic_plain_slot, "pegasus_cart") |
| 524 | MCFG_GENERIC_SOCKET_ADD("exp02", generic_plain_slot, "pegasus_cart") |
| 525 | 525 | MCFG_GENERIC_LOAD(pegasus_state, exp02_load) |
| 526 | 526 | |
| 527 | | MCFG_GENERIC_SOCKET_ADD("exp0c", GENERIC_ROM8_WIDTH, generic_plain_slot, "pegasus_cart") |
| 527 | MCFG_GENERIC_SOCKET_ADD("exp0c", generic_plain_slot, "pegasus_cart") |
| 528 | 528 | MCFG_GENERIC_LOAD(pegasus_state, exp0c_load) |
| 529 | 529 | |
| 530 | | MCFG_GENERIC_SOCKET_ADD("exp0d", GENERIC_ROM8_WIDTH, generic_plain_slot, "pegasus_cart") |
| 530 | MCFG_GENERIC_SOCKET_ADD("exp0d", generic_plain_slot, "pegasus_cart") |
| 531 | 531 | MCFG_GENERIC_LOAD(pegasus_state, exp0d_load) |
| 532 | 532 | |
| 533 | 533 | MCFG_CASSETTE_ADD("cassette") |
trunk/src/mess/drivers/rx78.c
| r32283 | r32284 | |
| 410 | 410 | void rx78_state::machine_reset() |
| 411 | 411 | { |
| 412 | 412 | address_space &prg = m_maincpu->space(AS_PROGRAM); |
| 413 | | if (m_cart->cart_mounted()) |
| 413 | if (m_cart->exists()) |
| 414 | 414 | prg.install_read_handler(0x2000, 0x5fff, read8_delegate(FUNC(generic_slot_device::read_rom),(generic_slot_device*)m_cart)); |
| 415 | 415 | } |
| 416 | 416 | |
| r32283 | r32284 | |
| 424 | 424 | return IMAGE_INIT_FAIL; |
| 425 | 425 | } |
| 426 | 426 | |
| 427 | | m_cart->rom_alloc(size, 1); |
| 427 | m_cart->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE); |
| 428 | 428 | m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom"); |
| 429 | 429 | |
| 430 | 430 | return IMAGE_INIT_PASS; |
| r32283 | r32284 | |
| 468 | 468 | MCFG_PALETTE_ADD("palette", 16+1) //+1 for the background color |
| 469 | 469 | MCFG_GFXDECODE_ADD("gfxdecode", "palette", rx78) |
| 470 | 470 | |
| 471 | | MCFG_GENERIC_CARTSLOT_ADD("cartslot", GENERIC_ROM8_WIDTH, generic_plain_slot, "rx78_cart") |
| 471 | MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "rx78_cart") |
| 472 | 472 | MCFG_GENERIC_EXTENSIONS("bin,rom") |
| 473 | 473 | MCFG_GENERIC_LOAD(rx78_state, rx78_cart) |
| 474 | 474 | |