trunk/src/mess/drivers/exelv.c
| r32212 | r32213 | |
| 55 | 55 | #include "video/tms3556.h" |
| 56 | 56 | #include "sound/tms5220.h" |
| 57 | 57 | #include "machine/spchrom.h" |
| 58 | | #include "imagedev/cartslot.h" |
| 58 | #include "bus/generic/slot.h" |
| 59 | #include "bus/generic/carts.h" |
| 59 | 60 | //#include "imagedev/cassette.h" |
| 60 | 61 | |
| 61 | 62 | |
| r32212 | r32213 | |
| 66 | 67 | : driver_device(mconfig, type, tag), |
| 67 | 68 | m_maincpu(*this, "maincpu"), |
| 68 | 69 | m_tms3556(*this, "tms3556"), |
| 69 | | m_tms5220c(*this, "tms5220c") |
| 70 | m_tms5220c(*this, "tms5220c"), |
| 71 | m_cart(*this, "cartslot") |
| 70 | 72 | { } |
| 71 | 73 | |
| 72 | 74 | required_device<cpu_device> m_maincpu; |
| 73 | 75 | required_device<tms3556_device> m_tms3556; |
| 74 | 76 | required_device<tms5220c_device> m_tms5220c; |
| 77 | optional_device<generic_slot_device> m_cart; |
| 75 | 78 | |
| 76 | | virtual void machine_start(); |
| 77 | | |
| 78 | 79 | DECLARE_READ8_MEMBER( mailbox_wx319_r ); |
| 79 | 80 | DECLARE_WRITE8_MEMBER( mailbox_wx318_w ); |
| 80 | 81 | DECLARE_READ8_MEMBER( tms7020_porta_r ); |
| r32212 | r32213 | |
| 85 | 86 | DECLARE_WRITE8_MEMBER( tms7041_portc_w ); |
| 86 | 87 | DECLARE_READ8_MEMBER( tms7041_portd_r ); |
| 87 | 88 | DECLARE_WRITE8_MEMBER( tms7041_portd_w ); |
| 89 | DECLARE_READ8_MEMBER( rom_r ); |
| 88 | 90 | |
| 91 | DECLARE_MACHINE_START(exl100); |
| 92 | DECLARE_MACHINE_START(exeltel); |
| 93 | |
| 89 | 94 | /* tms7020 i/o ports */ |
| 90 | 95 | UINT8 m_tms7020_portb; |
| 91 | 96 | |
| r32212 | r32213 | |
| 105 | 110 | }; |
| 106 | 111 | |
| 107 | 112 | |
| 108 | | DEVICE_IMAGE_LOAD_MEMBER( exelv_state, exelvision_cartridge ) |
| 109 | | { |
| 110 | | UINT8* pos = memregion("user1")->base(); |
| 111 | | offs_t size; |
| 112 | | |
| 113 | | if (image.software_entry() == NULL) |
| 114 | | size = image.length(); |
| 115 | | else |
| 116 | | size = image.get_software_region_length("rom"); |
| 117 | | |
| 118 | | |
| 119 | | if (image.software_entry() == NULL) |
| 120 | | { |
| 121 | | image.fread( pos, size ); |
| 122 | | } |
| 123 | | else |
| 124 | | { |
| 125 | | memcpy(pos, image.get_software_region("rom"), size); |
| 126 | | } |
| 127 | | |
| 128 | | return IMAGE_INIT_PASS; |
| 129 | | } |
| 130 | | |
| 131 | | |
| 132 | | |
| 133 | 113 | TIMER_DEVICE_CALLBACK_MEMBER(exelv_state::exelv_hblank_interrupt) |
| 134 | 114 | { |
| 135 | 115 | m_tms3556->interrupt(machine()); |
| 136 | 116 | } |
| 137 | 117 | |
| 138 | | #ifdef UNUSED_FUNCTION |
| 139 | | static DEVICE_IMAGE_LOAD(exelv_cart) |
| 140 | | { |
| 141 | | return IMAGE_INIT_PASS; |
| 142 | | } |
| 143 | 118 | |
| 144 | | static DEVICE_IMAGE_UNLOAD( exelv_cart ) |
| 145 | | { |
| 146 | | } |
| 147 | | #endif |
| 148 | | |
| 149 | 119 | /* |
| 150 | 120 | I/O CPU protocol (WIP): |
| 151 | 121 | |
| r32212 | r32213 | |
| 389 | 359 | m_tms7041_portd = data; |
| 390 | 360 | } |
| 391 | 361 | |
| 362 | |
| 392 | 363 | /* |
| 364 | CARTRIDGE ACCESS |
| 365 | */ |
| 366 | READ8_MEMBER(exelv_state::rom_r) |
| 367 | { |
| 368 | if (m_cart && m_cart->cart_mounted()) |
| 369 | return m_cart->read_rom(space, offset + 0x200); |
| 370 | |
| 371 | return 0; |
| 372 | } |
| 373 | |
| 374 | |
| 375 | /* |
| 393 | 376 | Main CPU memory map summary: |
| 394 | 377 | |
| 395 | 378 | @>0000-@>007f: tms7020/tms7040 internal RAM |
| r32212 | r32213 | |
| 423 | 406 | AM_RANGE(0x012e, 0x012e) AM_DEVWRITE("tms3556", tms3556_device, vram_w) |
| 424 | 407 | |
| 425 | 408 | AM_RANGE(0x0130, 0x0130) AM_READWRITE(mailbox_wx319_r, mailbox_wx318_w) |
| 426 | | AM_RANGE(0x0200, 0x7fff) AM_ROMBANK("bank1") /* system ROM */ |
| 409 | AM_RANGE(0x0200, 0x7fff) AM_READ(rom_r) |
| 427 | 410 | AM_RANGE(0x8000, 0xbfff) AM_NOP |
| 428 | 411 | AM_RANGE(0xc000, 0xc7ff) AM_RAM /* CPU RAM */ |
| 429 | 412 | AM_RANGE(0xc800, 0xf7ff) AM_NOP |
| r32212 | r32213 | |
| 482 | 465 | |
| 483 | 466 | /* Machine Initialization */ |
| 484 | 467 | |
| 485 | | void exelv_state::machine_start() |
| 468 | MACHINE_START_MEMBER( exelv_state, exl100) |
| 469 | { |
| 470 | /* register for state saving */ |
| 471 | save_item(NAME(m_tms7020_portb)); |
| 472 | save_item(NAME(m_tms7041_portb)); |
| 473 | save_item(NAME(m_tms7041_portc)); |
| 474 | save_item(NAME(m_tms7041_portd)); |
| 475 | save_item(NAME(m_wx318)); |
| 476 | save_item(NAME(m_wx319)); |
| 477 | } |
| 478 | |
| 479 | MACHINE_START_MEMBER( exelv_state, exeltel) |
| 486 | 480 | { |
| 487 | 481 | UINT8 *rom = memregion("user1")->base() + 0x0200; |
| 488 | 482 | membank("bank1")->configure_entry(0, rom); |
| 489 | 483 | membank("bank1")->set_entry(0); |
| 490 | | |
| 484 | |
| 491 | 485 | /* register for state saving */ |
| 492 | 486 | save_item(NAME(m_tms7020_portb)); |
| 493 | 487 | save_item(NAME(m_tms7041_portb)); |
| r32212 | r32213 | |
| 497 | 491 | save_item(NAME(m_wx319)); |
| 498 | 492 | } |
| 499 | 493 | |
| 494 | |
| 500 | 495 | static MACHINE_CONFIG_START( exl100, exelv_state ) |
| 501 | 496 | |
| 502 | 497 | /* basic machine hardware */ |
| r32212 | r32213 | |
| 504 | 499 | MCFG_CPU_PROGRAM_MAP(tms7020_mem) |
| 505 | 500 | MCFG_CPU_IO_MAP(tms7020_port) |
| 506 | 501 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", exelv_state, exelv_hblank_interrupt, "screen", 0, 1) |
| 502 | MCFG_MACHINE_START_OVERRIDE(exelv_state, exl100) |
| 507 | 503 | |
| 508 | 504 | MCFG_CPU_ADD("tms7041", TMS7041, XTAL_4_9152MHz) |
| 509 | 505 | MCFG_CPU_IO_MAP(tms7041_port) |
| r32212 | r32213 | |
| 538 | 534 | // MCFG_TMS52XX_SPEECHROM("vsm") |
| 539 | 535 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 540 | 536 | |
| 541 | | /* cartridge */ |
| 542 | | MCFG_CARTSLOT_ADD("cart") |
| 543 | | MCFG_CARTSLOT_EXTENSION_LIST("bin,rom") |
| 544 | | MCFG_CARTSLOT_NOT_MANDATORY |
| 545 | | MCFG_CARTSLOT_LOAD(exelv_state,exelvision_cartridge) |
| 546 | | MCFG_CARTSLOT_INTERFACE("exelvision_cart") |
| 547 | | //MCFG_SOFTWARE_LIST_ADD("cart_list","exelvision_cart") |
| 537 | /* cartridge */ |
| 538 | MCFG_GENERIC_CARTSLOT_ADD("cartslot", GENERIC_ROM8_WIDTH, generic_linear_slot, "exelvision_cart") |
| 539 | MCFG_GENERIC_EXTENSIONS("bin,rom") |
| 540 | |
| 541 | MCFG_SOFTWARE_LIST_ADD("cart_list", "exl100_cart") |
| 548 | 542 | MACHINE_CONFIG_END |
| 549 | 543 | |
| 550 | 544 | |
| r32212 | r32213 | |
| 555 | 549 | MCFG_CPU_PROGRAM_MAP(tms7040_mem) |
| 556 | 550 | MCFG_CPU_IO_MAP(tms7020_port) |
| 557 | 551 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", exelv_state, exelv_hblank_interrupt, "screen", 0, 1) |
| 552 | MCFG_MACHINE_START_OVERRIDE(exelv_state, exeltel) |
| 558 | 553 | |
| 559 | 554 | MCFG_CPU_ADD("tms7042", TMS7042, XTAL_4_9152MHz) |
| 560 | 555 | MCFG_CPU_IO_MAP(tms7041_port) |
| r32212 | r32213 | |
| 601 | 596 | ROM_REGION(0x10000, "tms7041", 0) |
| 602 | 597 | ROM_LOAD("exl100_7041.bin", 0xf000, 0x1000, CRC(38f6fc7a) SHA1(b71d545664a974d8ad39bdf600c5b9884c3efab6)) /* TMS7041 internal ROM, correct */ |
| 603 | 598 | // ROM_REGION(0x8000, "vsm", 0) |
| 604 | | |
| 605 | | ROM_REGION(0x10000, "user1", ROMREGION_ERASEFF) /* cartridge area */ |
| 606 | 599 | ROM_END |
| 607 | 600 | |
| 608 | 601 | |
trunk/src/mess/drivers/fc100.c
| r32212 | r32213 | |
| 25 | 25 | - Cassette can be 600 or 1200 baud, how is 600 baud selected? |
| 26 | 26 | - Hookup Graphics modes and colours |
| 27 | 27 | - Unknown i/o ports |
| 28 | | - Need software |
| 28 | - Need cart software (current code is just a guess) |
| 29 | 29 | |
| 30 | 30 | |
| 31 | 31 | ****************************************************************************/ |
| r32212 | r32213 | |
| 37 | 37 | #include "machine/i8251.h" |
| 38 | 38 | #include "machine/clock.h" |
| 39 | 39 | #include "sound/ay8910.h" |
| 40 | | #include "imagedev/cartslot.h" |
| 41 | 40 | #include "imagedev/cassette.h" |
| 42 | 41 | #include "sound/wave.h" |
| 43 | 42 | #include "formats/fc100_cas.h" |
| 44 | 43 | #include "machine/buffer.h" |
| 45 | 44 | #include "bus/centronics/ctronics.h" |
| 45 | #include "bus/generic/slot.h" |
| 46 | #include "bus/generic/carts.h" |
| 46 | 47 | |
| 47 | 48 | |
| 48 | 49 | class fc100_state : public driver_device |
| r32212 | r32213 | |
| 54 | 55 | , m_vdg(*this, "vdg") |
| 55 | 56 | , m_p_videoram(*this, "videoram") |
| 56 | 57 | , m_cass(*this, "cassette") |
| 58 | , m_cart(*this, "cartslot") |
| 57 | 59 | , m_uart(*this, "uart") |
| 58 | 60 | , m_centronics(*this, "centronics") |
| 59 | 61 | , m_keyboard(*this, "KEY") |
| r32212 | r32213 | |
| 102 | 104 | required_device<mc6847_base_device> m_vdg; |
| 103 | 105 | required_shared_ptr<UINT8> m_p_videoram; |
| 104 | 106 | required_device<cassette_image_device> m_cass; |
| 107 | required_device<generic_slot_device> m_cart; |
| 105 | 108 | required_device<i8251_device> m_uart; |
| 106 | 109 | required_device<centronics_device> m_centronics; |
| 107 | 110 | required_ioport_array<16> m_keyboard; |
| r32212 | r32213 | |
| 111 | 114 | static ADDRESS_MAP_START( fc100_mem, AS_PROGRAM, 8, fc100_state ) |
| 112 | 115 | ADDRESS_MAP_UNMAP_HIGH |
| 113 | 116 | AM_RANGE( 0x0000, 0x5fff ) AM_ROM AM_REGION("roms", 0) |
| 114 | | AM_RANGE( 0x6000, 0x77ff ) AM_ROM AM_REGION("cart", 0) |
| 117 | //AM_RANGE(0x6000, 0x6fff) // mapped by the cartslot |
| 115 | 118 | AM_RANGE( 0x7800, 0x7fff ) AM_READ_BANK("bankr") AM_WRITE_BANK("bankw") // Banked RAM/ROM |
| 116 | | AM_RANGE( 0x8000, 0xBFFF ) AM_RAM // expansion ram pack - if omitted you get a 'Pages?' prompt at boot |
| 119 | AM_RANGE( 0x8000, 0xbfff ) AM_RAM // expansion ram pack - if omitted you get a 'Pages?' prompt at boot |
| 117 | 120 | AM_RANGE( 0xc000, 0xffff ) AM_RAM AM_SHARE("videoram") |
| 118 | 121 | ADDRESS_MAP_END |
| 119 | 122 | |
| r32212 | r32213 | |
| 461 | 464 | m_intext = 0; |
| 462 | 465 | m_inv = 0; |
| 463 | 466 | |
| 467 | if (m_cart->cart_mounted()) |
| 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 | |
| 464 | 470 | save_item(NAME(m_ag)); |
| 465 | 471 | save_item(NAME(m_gm2)); |
| 466 | 472 | save_item(NAME(m_gm1)); |
| r32212 | r32213 | |
| 543 | 549 | MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_c", fc100_state, timer_c, attotime::from_hz(4800)) // cass write |
| 544 | 550 | MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_p", fc100_state, timer_p, attotime::from_hz(40000)) // cass read |
| 545 | 551 | MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_k", fc100_state, timer_k, attotime::from_hz(300)) // keyb scan |
| 546 | | MCFG_CARTSLOT_ADD("cart") |
| 552 | |
| 553 | MCFG_GENERIC_CARTSLOT_ADD("cartslot", GENERIC_ROM8_WIDTH, generic_plain_slot, "fc100_cart") |
| 554 | |
| 547 | 555 | MCFG_CENTRONICS_ADD("centronics", centronics_printers, "printer") |
| 548 | 556 | MCFG_CENTRONICS_ACK_HANDLER(DEVWRITELINE("cent_status_in", input_buffer_device, write_bit4)) |
| 549 | 557 | MCFG_CENTRONICS_BUSY_HANDLER(DEVWRITELINE("cent_status_in", input_buffer_device, write_bit5)) |
| r32212 | r32213 | |
| 562 | 570 | |
| 563 | 571 | ROM_REGION( 0x1000, "chargen", 0 ) |
| 564 | 572 | ROM_LOAD( "cg-04-01.u53", 0x0000, 0x1000, CRC(2de75b7f) SHA1(464369d98cbae92ffa322ebaa4404cf5b26825f1) ) |
| 565 | | |
| 566 | | ROM_REGION(0x2000,"cart", ROMREGION_ERASEFF) |
| 567 | | ROM_CART_LOAD("cart", 0x0000, 0x2000, ROM_OPTIONAL) |
| 568 | 573 | ROM_END |
| 569 | 574 | |
| 570 | 575 | /* Driver */ |
trunk/src/mess/drivers/myvision.c
| r32212 | r32213 | |
| 25 | 25 | |
| 26 | 26 | #include "emu.h" |
| 27 | 27 | #include "cpu/z80/z80.h" |
| 28 | | #include "imagedev/cartslot.h" |
| 29 | 28 | #include "video/tms9928a.h" |
| 30 | 29 | #include "sound/ay8910.h" |
| 30 | #include "bus/generic/slot.h" |
| 31 | #include "bus/generic/carts.h" |
| 31 | 32 | |
| 32 | 33 | |
| 33 | 34 | class myvision_state : public driver_device |
| r32212 | r32213 | |
| 36 | 37 | myvision_state(const machine_config &mconfig, device_type type, const char *tag) |
| 37 | 38 | : driver_device(mconfig, type, tag) |
| 38 | 39 | , m_maincpu(*this, "maincpu") |
| 40 | , m_cart(*this, "cartslot") |
| 39 | 41 | , m_io_row0(*this, "ROW0") |
| 40 | 42 | , m_io_row1(*this, "ROW1") |
| 41 | 43 | , m_io_row2(*this, "ROW2") |
| r32212 | r32213 | |
| 53 | 55 | virtual void machine_start(); |
| 54 | 56 | virtual void machine_reset(); |
| 55 | 57 | required_device<cpu_device> m_maincpu; |
| 58 | required_device<generic_slot_device> m_cart; |
| 56 | 59 | UINT8 m_column; |
| 57 | 60 | required_ioport m_io_row0; |
| 58 | 61 | required_ioport m_io_row1; |
| r32212 | r32213 | |
| 63 | 66 | |
| 64 | 67 | static ADDRESS_MAP_START(myvision_mem, AS_PROGRAM, 8, myvision_state) |
| 65 | 68 | ADDRESS_MAP_UNMAP_HIGH |
| 66 | | AM_RANGE( 0x0000, 0x5fff ) AM_ROM |
| 67 | | AM_RANGE( 0xa000, 0xa7ff ) AM_RAM |
| 69 | //AM_RANGE(0x0000, 0x5fff) // mapped by the cartslot |
| 70 | AM_RANGE(0xa000, 0xa7ff) AM_RAM |
| 68 | 71 | AM_RANGE(0xe000, 0xe000) AM_DEVREADWRITE("tms9918", tms9918a_device, vram_read, vram_write) |
| 69 | 72 | AM_RANGE(0xe002, 0xe002) AM_DEVREADWRITE("tms9918", tms9918a_device, register_read, register_write) |
| 70 | 73 | ADDRESS_MAP_END |
| r32212 | r32213 | |
| 125 | 128 | |
| 126 | 129 | void myvision_state::machine_start() |
| 127 | 130 | { |
| 131 | if (m_cart->cart_mounted()) |
| 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 | |
| 128 | 134 | save_item(NAME(m_column)); |
| 129 | 135 | } |
| 130 | 136 | |
| r32212 | r32213 | |
| 137 | 143 | |
| 138 | 144 | DEVICE_IMAGE_LOAD_MEMBER( myvision_state, cart ) |
| 139 | 145 | { |
| 140 | | UINT8 *cart = memregion("maincpu")->base(); |
| 141 | | |
| 142 | | if (image.software_entry() == NULL) |
| 146 | UINT32 size = m_cart->common_get_size("rom"); |
| 147 | |
| 148 | if (size != 0x4000 && size != 0x6000) |
| 143 | 149 | { |
| 144 | | UINT32 filesize = image.length(); |
| 145 | | |
| 146 | | if (filesize != 0x4000 && filesize != 0x6000) |
| 147 | | { |
| 148 | | image.seterror(IMAGE_ERROR_UNSPECIFIED, "Incorrect or unsupported cartridge size"); |
| 149 | | return IMAGE_INIT_FAIL; |
| 150 | | } |
| 151 | | |
| 152 | | if (image.fread( cart, filesize) != filesize) |
| 153 | | { |
| 154 | | image.seterror(IMAGE_ERROR_UNSPECIFIED, "Error loading file"); |
| 155 | | return IMAGE_INIT_FAIL; |
| 156 | | } |
| 150 | image.seterror(IMAGE_ERROR_UNSPECIFIED, "Unsupported cartridge size"); |
| 151 | return IMAGE_INIT_FAIL; |
| 157 | 152 | } |
| 158 | | else |
| 159 | | { |
| 160 | | memcpy(cart, image.get_software_region("rom"), image.get_software_region_length("rom")); |
| 161 | | } |
| 153 | |
| 154 | m_cart->rom_alloc(size, 1); |
| 155 | m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom"); |
| 162 | 156 | |
| 163 | 157 | return IMAGE_INIT_PASS; |
| 164 | 158 | } |
| r32212 | r32213 | |
| 199 | 193 | |
| 200 | 194 | READ8_MEMBER( myvision_state::ay_port_b_r ) |
| 201 | 195 | { |
| 202 | | return 0xFF; |
| 196 | return 0xff; |
| 203 | 197 | } |
| 204 | 198 | |
| 205 | 199 | |
| r32212 | r32213 | |
| 237 | 231 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 238 | 232 | |
| 239 | 233 | /* cartridge */ |
| 240 | | MCFG_CARTSLOT_ADD("cart") |
| 241 | | MCFG_CARTSLOT_EXTENSION_LIST("bin") |
| 242 | | MCFG_CARTSLOT_MANDATORY |
| 243 | | MCFG_CARTSLOT_LOAD(myvision_state,cart) |
| 244 | | MCFG_CARTSLOT_INTERFACE("myvision_cart") |
| 234 | MCFG_GENERIC_CARTSLOT_ADD("cartslot", GENERIC_ROM8_WIDTH, generic_plain_slot, "myvision_cart") |
| 235 | MCFG_GENERIC_LOAD(myvision_state, cart) |
| 236 | //MCFG_GENERIC_MANDATORY |
| 245 | 237 | |
| 246 | 238 | /* software lists */ |
| 247 | 239 | MCFG_SOFTWARE_LIST_ADD("cart_list","myvision") |
| r32212 | r32213 | |
| 249 | 241 | |
| 250 | 242 | /* ROM definition */ |
| 251 | 243 | ROM_START( myvision ) |
| 252 | | ROM_REGION( 0x6000, "maincpu", ROMREGION_ERASEFF ) |
| 244 | ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) |
| 253 | 245 | ROM_END |
| 254 | 246 | |
| 255 | 247 | /* Driver */ |
trunk/src/mess/drivers/m5.c
| r32212 | r32213 | |
| 25 | 25 | #include "cpu/z80/z80daisy.h" |
| 26 | 26 | #include "formats/m5_dsk.h" |
| 27 | 27 | #include "formats/sord_cas.h" |
| 28 | | #include "imagedev/cartslot.h" |
| 29 | 28 | #include "imagedev/cassette.h" |
| 30 | 29 | #include "bus/centronics/ctronics.h" |
| 31 | 30 | #include "machine/i8255.h" |
| r32212 | r32213 | |
| 34 | 33 | #include "machine/z80ctc.h" |
| 35 | 34 | #include "sound/sn76496.h" |
| 36 | 35 | #include "video/tms9928a.h" |
| 36 | #include "bus/generic/slot.h" |
| 37 | #include "bus/generic/carts.h" |
| 37 | 38 | #include "includes/m5.h" |
| 38 | 39 | |
| 39 | 40 | |
| r32212 | r32213 | |
| 242 | 243 | static ADDRESS_MAP_START( m5_mem, AS_PROGRAM, 8, m5_state ) |
| 243 | 244 | ADDRESS_MAP_UNMAP_HIGH |
| 244 | 245 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 245 | | AM_RANGE(0x2000, 0x6fff) AM_ROM |
| 246 | //AM_RANGE(0x2000, 0x6fff) // mapped by the cartslot |
| 246 | 247 | AM_RANGE(0x7000, 0x7fff) AM_RAM |
| 247 | 248 | AM_RANGE(0x8000, 0xffff) AM_RAM |
| 248 | 249 | ADDRESS_MAP_END |
| r32212 | r32213 | |
| 546 | 547 | break; |
| 547 | 548 | } |
| 548 | 549 | |
| 550 | if (m_cart->cart_mounted()) |
| 551 | program.install_read_handler(0x2000, 0x6fff, read8_delegate(FUNC(generic_slot_device::read_rom),(generic_slot_device*)m_cart)); |
| 552 | |
| 549 | 553 | // register for state saving |
| 550 | 554 | save_item(NAME(m_fd5_data)); |
| 551 | 555 | save_item(NAME(m_fd5_com)); |
| r32212 | r32213 | |
| 612 | 616 | MCFG_FLOPPY_DRIVE_ADD(UPD765_TAG ":0", m5_floppies, "525dd", m5_state::floppy_formats) |
| 613 | 617 | |
| 614 | 618 | // cartridge |
| 615 | | MCFG_CARTSLOT_ADD("cart") |
| 616 | | MCFG_CARTSLOT_EXTENSION_LIST("bin,rom") |
| 617 | | MCFG_CARTSLOT_MANDATORY |
| 618 | | MCFG_CARTSLOT_INTERFACE("m5_cart") |
| 619 | MCFG_GENERIC_CARTSLOT_ADD("cartslot", GENERIC_ROM8_WIDTH, generic_plain_slot, "m5_cart") |
| 620 | MCFG_GENERIC_EXTENSIONS("bin,rom") |
| 621 | //MCFG_GENERIC_MANDATORY |
| 619 | 622 | |
| 620 | 623 | // software lists |
| 621 | 624 | MCFG_SOFTWARE_LIST_ADD("cart_list", "m5") |
| r32212 | r32213 | |
| 667 | 670 | ROM_START( m5 ) |
| 668 | 671 | ROM_REGION( 0x7000, Z80_TAG, ROMREGION_ERASEFF ) |
| 669 | 672 | ROM_LOAD( "sordjap.ic21", 0x0000, 0x2000, CRC(92cf9353) SHA1(b0a4b3658fde68cb1f344dfb095bac16a78e9b3e) ) |
| 670 | | ROM_CART_LOAD( "cart", 0x2000, 0x5000, ROM_NOMIRROR | ROM_OPTIONAL ) |
| 671 | 673 | |
| 672 | 674 | ROM_REGION( 0x4000, Z80_FD5_TAG, 0 ) |
| 673 | 675 | ROM_LOAD( "sordfd5.rom", 0x0000, 0x4000, CRC(7263bbc5) SHA1(b729500d3d2b2e807d384d44b76ea5ad23996f4a)) |
| r32212 | r32213 | |
| 681 | 683 | ROM_START( m5p ) |
| 682 | 684 | ROM_REGION( 0x7000, Z80_TAG, ROMREGION_ERASEFF ) |
| 683 | 685 | ROM_LOAD( "sordint.ic21", 0x0000, 0x2000, CRC(78848d39) SHA1(ac042c4ae8272ad6abe09ae83492ef9a0026d0b2) ) |
| 684 | | ROM_CART_LOAD( "cart", 0x2000, 0x5000, ROM_NOMIRROR | ROM_OPTIONAL ) |
| 685 | 686 | |
| 686 | 687 | ROM_REGION( 0x4000, Z80_FD5_TAG, 0 ) |
| 687 | 688 | ROM_LOAD( "sordfd5.rom", 0x0000, 0x4000, CRC(7263bbc5) SHA1(b729500d3d2b2e807d384d44b76ea5ad23996f4a)) |
trunk/src/mess/drivers/ep64.c
| r32212 | r32213 | |
| 320 | 320 | |
| 321 | 321 | static ADDRESS_MAP_START( dave_64k_mem, AS_PROGRAM, 8, ep64_state ) |
| 322 | 322 | AM_RANGE(0x000000, 0x007fff) AM_ROM AM_REGION(Z80_TAG, 0) |
| 323 | | AM_RANGE(0x010000, 0x01ffff) AM_ROM AM_REGION("cart", 0) |
| 323 | //AM_RANGE(0x010000, 0x01ffff) // mapped by the cartslot |
| 324 | 324 | AM_RANGE(0x3f0000, 0x3fffff) AM_DEVICE(NICK_TAG, nick_device, vram_map) |
| 325 | 325 | ADDRESS_MAP_END |
| 326 | 326 | |
| r32212 | r32213 | |
| 470 | 470 | |
| 471 | 471 | void ep64_state::machine_start() |
| 472 | 472 | { |
| 473 | if (m_cart->cart_mounted()) |
| 474 | m_dave->space(AS_PROGRAM).install_read_handler(0x010000, 0x01ffff, read8_delegate(FUNC(generic_slot_device::read_rom),(generic_slot_device*)m_cart)); |
| 475 | |
| 473 | 476 | // state saving |
| 474 | 477 | save_item(NAME(m_key)); |
| 475 | 478 | save_item(NAME(m_centronics_busy)); |
| r32212 | r32213 | |
| 538 | 541 | MCFG_RAM_DEFAULT_SIZE("64K") |
| 539 | 542 | |
| 540 | 543 | // cartridge |
| 541 | | MCFG_CARTSLOT_ADD("cart") |
| 542 | | MCFG_CARTSLOT_EXTENSION_LIST("rom,bin") |
| 543 | | MCFG_CARTSLOT_NOT_MANDATORY |
| 544 | | MCFG_CARTSLOT_INTERFACE("ep64_cart") |
| 544 | MCFG_GENERIC_CARTSLOT_ADD("cartslot", GENERIC_ROM8_WIDTH, generic_linear_slot, "ep64_cart") |
| 545 | MCFG_GENERIC_EXTENSIONS("bin,rom") |
| 545 | 546 | |
| 546 | 547 | // software lists |
| 547 | 548 | MCFG_SOFTWARE_LIST_ADD("cart_list", "ep64_cart") |
| r32212 | r32213 | |
| 576 | 577 | ROM_START( ep64 ) |
| 577 | 578 | ROM_REGION( 0x8000, Z80_TAG, 0 ) |
| 578 | 579 | ROM_LOAD( "9256ds-0038_enter05-23-a.u2", 0x0000, 0x8000, CRC(d421795f) SHA1(6033a0535136c40c47137e4d1cd9273c06d5fdff) ) |
| 579 | | |
| 580 | | ROM_REGION( 0x10000, "cart", 0 ) |
| 581 | | ROM_CART_LOAD( "cart", 0x00000, 0x10000, ROM_MIRROR ) |
| 582 | 580 | ROM_END |
| 583 | 581 | |
| 584 | 582 | #define rom_phc64 rom_ep64 |
| r32212 | r32213 | |
| 591 | 589 | ROM_START( ep128 ) |
| 592 | 590 | ROM_REGION( 0x8000, Z80_TAG, 0 ) |
| 593 | 591 | ROM_LOAD( "9256ds-0019_enter08-45-a.u2", 0x0000, 0x8000, CRC(982a3b44) SHA1(55315b20fecb4441a07ee4bc5dc7153f396e0a2e) ) |
| 594 | | |
| 595 | | ROM_REGION( 0x10000, "cart", 0 ) |
| 596 | | ROM_CART_LOAD( "cart", 0x00000, 0x10000, ROM_MIRROR ) |
| 597 | 592 | ROM_END |
| 598 | 593 | |
| 599 | 594 | |
trunk/src/mess/drivers/gmaster.c
| r32212 | r32213 | |
| 4 | 4 | |
| 5 | 5 | #include "emu.h" |
| 6 | 6 | #include "cpu/upd7810/upd7810.h" |
| 7 | | #include "imagedev/cartslot.h" |
| 8 | 7 | #include "sound/speaker.h" |
| 8 | #include "bus/generic/slot.h" |
| 9 | #include "bus/generic/carts.h" |
| 9 | 10 | #include "rendlay.h" |
| 10 | 11 | |
| 11 | 12 | |
| r32212 | r32213 | |
| 16 | 17 | : driver_device(mconfig, type, tag) |
| 17 | 18 | , m_maincpu(*this, "maincpu") |
| 18 | 19 | , m_speaker(*this, "speaker") |
| 20 | , m_cart(*this, "cartslot") |
| 19 | 21 | , m_io_joy(*this, "JOY") |
| 20 | 22 | { } |
| 21 | 23 | |
| r32212 | r32213 | |
| 45 | 47 | UINT8 m_ram[0x4000]; |
| 46 | 48 | required_device<cpu_device> m_maincpu; |
| 47 | 49 | required_device<speaker_sound_device> m_speaker; |
| 50 | required_device<generic_slot_device> m_cart; |
| 48 | 51 | required_ioport m_io_joy; |
| 49 | 52 | }; |
| 50 | 53 | |
| r32212 | r32213 | |
| 179 | 182 | static ADDRESS_MAP_START( gmaster_mem, AS_PROGRAM, 8, gmaster_state ) |
| 180 | 183 | AM_RANGE(0x0000, 0x3fff) AM_ROM |
| 181 | 184 | AM_RANGE(0x4000, 0x7fff) AM_READWRITE(gmaster_io_r, gmaster_io_w) |
| 182 | | AM_RANGE(0x8000, 0xfeff) AM_ROM |
| 185 | //AM_RANGE(0x8000, 0xfeff) // mapped by the cartslot |
| 183 | 186 | AM_RANGE(0xff00, 0xffff) AM_RAM |
| 184 | 187 | ADDRESS_MAP_END |
| 185 | 188 | |
| r32212 | r32213 | |
| 260 | 263 | |
| 261 | 264 | void gmaster_state::machine_start() |
| 262 | 265 | { |
| 266 | if (m_cart->cart_mounted()) |
| 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 | |
| 263 | 269 | save_item(NAME(m_video.data)); |
| 264 | 270 | save_item(NAME(m_video.index)); |
| 265 | 271 | save_item(NAME(m_video.x)); |
| r32212 | r32213 | |
| 297 | 303 | MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) |
| 298 | 304 | MCFG_SOUND_ROUTE(0, "mono", 0.50) |
| 299 | 305 | |
| 300 | | MCFG_CARTSLOT_ADD("cart") |
| 301 | | MCFG_CARTSLOT_EXTENSION_LIST("bin") |
| 302 | | MCFG_CARTSLOT_MANDATORY |
| 303 | | MCFG_CARTSLOT_INTERFACE("gmaster_cart") |
| 306 | MCFG_GENERIC_CARTSLOT_ADD("cartslot", GENERIC_ROM8_WIDTH, generic_linear_slot, "gmaster_cart") |
| 307 | MCFG_GENERIC_MANDATORY |
| 308 | |
| 304 | 309 | MCFG_SOFTWARE_LIST_ADD("cart_list","gmaster") |
| 305 | 310 | MACHINE_CONFIG_END |
| 306 | 311 | |
| r32212 | r32213 | |
| 308 | 313 | ROM_START(gmaster) |
| 309 | 314 | ROM_REGION(0x10000,"maincpu", 0) |
| 310 | 315 | ROM_LOAD("d78c11agf_e19.u1", 0x0000, 0x1000, CRC(05cc45e5) SHA1(05d73638dea9657ccc2791c0202d9074a4782c1e) ) |
| 311 | | ROM_CART_LOAD("cart", 0x8000, 0x8000, 0) |
| 312 | 316 | ROM_END |
| 313 | 317 | |
| 314 | 318 | |