trunk/src/emu/cpu/tms7000/tms7000.c
| r31169 | r31170 | |
| 49 | 49 | |
| 50 | 50 | |
| 51 | 51 | const device_type TMS7000 = &device_creator<tms7000_device>; |
| 52 | | const device_type TMS7000_EXL = &device_creator<tms7000_exl_device>; |
| 52 | const device_type TMS7020 = &device_creator<tms7020_device>; |
| 53 | const device_type TMS7020_EXL = &device_creator<tms7020_exl_device>; |
| 54 | const device_type TMS7040 = &device_creator<tms7040_device>; |
| 55 | const device_type TMS70C00 = &device_creator<tms70c00_device>; |
| 56 | const device_type TMS70C20 = &device_creator<tms70c20_device>; |
| 57 | const device_type TMS70C40 = &device_creator<tms70c40_device>; |
| 53 | 58 | |
| 54 | | |
| 55 | 59 | static ADDRESS_MAP_START(tms7000_mem, AS_PROGRAM, 8, tms7000_device ) |
| 56 | | AM_RANGE(0x0000, 0x007f) AM_RAM |
| 60 | AM_RANGE(0x0000, 0x007f) AM_RAM // 128 bytes internal RAM |
| 57 | 61 | AM_RANGE(0x0100, 0x010f) AM_READWRITE(tms70x0_pf_r, tms70x0_pf_w) /* tms7000 internal I/O ports */ |
| 58 | 62 | ADDRESS_MAP_END |
| 59 | 63 | |
| 64 | static ADDRESS_MAP_START(tms7020_mem, AS_PROGRAM, 8, tms7000_device ) |
| 65 | AM_RANGE(0xf000, 0xffff) AM_ROM // 2kB internal ROM |
| 66 | AM_IMPORT_FROM( tms7000_mem ) |
| 67 | ADDRESS_MAP_END |
| 60 | 68 | |
| 69 | static ADDRESS_MAP_START(tms7040_mem, AS_PROGRAM, 8, tms7000_device ) |
| 70 | AM_RANGE(0xf000, 0xffff) AM_ROM // 4kB internal ROM |
| 71 | AM_IMPORT_FROM( tms7000_mem ) |
| 72 | ADDRESS_MAP_END |
| 73 | |
| 74 | |
| 61 | 75 | tms7000_device::tms7000_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 62 | 76 | : cpu_device(mconfig, TMS7000, "TMS7000", tag, owner, clock, "tms7000", __FILE__) |
| 63 | 77 | , m_program_config("program", ENDIANNESS_BIG, 8, 16, 0, ADDRESS_MAP_NAME(tms7000_mem)) |
| r31169 | r31170 | |
| 66 | 80 | { |
| 67 | 81 | } |
| 68 | 82 | |
| 69 | | |
| 70 | | tms7000_device::tms7000_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) |
| 83 | tms7000_device::tms7000_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, address_map_constructor internal, const opcode_func *opcode, const char *shortname, const char *source) |
| 71 | 84 | : cpu_device(mconfig, type, name, tag, owner, clock, shortname, source) |
| 72 | | , m_program_config("program", ENDIANNESS_BIG, 8, 16, 0, ADDRESS_MAP_NAME(tms7000_mem)) |
| 85 | , m_program_config("program", ENDIANNESS_BIG, 8, 16, 0, internal) |
| 73 | 86 | , m_io_config("io", ENDIANNESS_BIG, 8, 8, 0) |
| 74 | | , m_opcode(s_opfn_exl) |
| 87 | , m_opcode(opcode) |
| 75 | 88 | { |
| 76 | 89 | } |
| 77 | 90 | |
| 91 | tms7020_device::tms7020_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 92 | : tms7000_device(mconfig, TMS7020, "TMS7020", tag, owner, clock, ADDRESS_MAP_NAME(tms7020_mem), s_opfn, "tms7020", __FILE__) |
| 93 | { |
| 94 | } |
| 78 | 95 | |
| 79 | | tms7000_exl_device::tms7000_exl_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 80 | | : tms7000_device(mconfig, TMS7000_EXL, "TMS7000_EXL", tag, owner, clock, "tms7000_exl", __FILE__) |
| 96 | tms7020_exl_device::tms7020_exl_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 97 | : tms7000_device(mconfig, TMS7020_EXL, "TMS7020 (EXL 100)", tag, owner, clock, ADDRESS_MAP_NAME(tms7020_mem), s_opfn_exl, "tms7020_exl", __FILE__) |
| 81 | 98 | { |
| 82 | 99 | } |
| 83 | 100 | |
| 101 | tms7040_device::tms7040_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 102 | : tms7000_device(mconfig, TMS7040, "TMS7040", tag, owner, clock, ADDRESS_MAP_NAME(tms7040_mem), s_opfn, "tms7040", __FILE__) |
| 103 | { |
| 104 | } |
| 84 | 105 | |
| 106 | tms70c00_device::tms70c00_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 107 | : tms7000_device(mconfig, TMS70C00, "TMS70C00", tag, owner, clock, ADDRESS_MAP_NAME(tms7000_mem), s_opfn, "tms70c00", __FILE__) |
| 108 | { |
| 109 | } |
| 110 | |
| 111 | tms70c20_device::tms70c20_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 112 | : tms7000_device(mconfig, TMS70C20, "TMS70C20", tag, owner, clock, ADDRESS_MAP_NAME(tms7020_mem), s_opfn, "tms70c20", __FILE__) |
| 113 | { |
| 114 | } |
| 115 | |
| 116 | tms70c40_device::tms70c40_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 117 | : tms7000_device(mconfig, TMS70C40, "TMS70C40", tag, owner, clock, ADDRESS_MAP_NAME(tms7040_mem), s_opfn, "tms70c40", __FILE__) |
| 118 | { |
| 119 | } |
| 120 | |
| 121 | |
| 85 | 122 | offs_t tms7000_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) |
| 86 | 123 | { |
| 87 | 124 | extern CPU_DISASSEMBLE( tms7000 ); |
trunk/src/emu/cpu/tms7000/tms7000.h
| r31169 | r31170 | |
| 45 | 45 | class tms7000_device : public cpu_device |
| 46 | 46 | { |
| 47 | 47 | public: |
| 48 | typedef void ( tms7000_device::*opcode_func ) (); |
| 49 | static const opcode_func s_opfn[0x100]; |
| 50 | static const opcode_func s_opfn_exl[0x100]; |
| 51 | |
| 48 | 52 | // construction/destruction |
| 49 | 53 | tms7000_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 50 | | tms7000_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); |
| 54 | tms7000_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, address_map_constructor internal, const opcode_func *opcode, const char *shortname, const char *source); |
| 51 | 55 | |
| 52 | 56 | DECLARE_WRITE8_MEMBER( tms70x0_pf_w ); |
| 53 | 57 | DECLARE_READ8_MEMBER( tms70x0_pf_r ); |
| r31169 | r31170 | |
| 79 | 83 | address_space_config m_program_config; |
| 80 | 84 | address_space_config m_io_config; |
| 81 | 85 | |
| 82 | | typedef void ( tms7000_device::*opcode_func ) (); |
| 83 | | static const opcode_func s_opfn[0x100]; |
| 84 | | static const opcode_func s_opfn_exl[0x100]; |
| 85 | 86 | const opcode_func *m_opcode; |
| 86 | 87 | |
| 87 | 88 | inline UINT8 bcd_add( UINT8 a, UINT8 b, UINT8 c ); |
| r31169 | r31170 | |
| 345 | 346 | }; |
| 346 | 347 | |
| 347 | 348 | |
| 348 | | class tms7000_exl_device : public tms7000_device |
| 349 | class tms7020_device : public tms7000_device |
| 349 | 350 | { |
| 350 | 351 | public: |
| 351 | | // construction/destruction |
| 352 | | tms7000_exl_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 352 | tms7020_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 353 | 353 | }; |
| 354 | 354 | |
| 355 | 355 | |
| 356 | class tms7020_exl_device : public tms7000_device |
| 357 | { |
| 358 | public: |
| 359 | tms7020_exl_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 360 | }; |
| 361 | |
| 362 | |
| 363 | class tms7040_device : public tms7000_device |
| 364 | { |
| 365 | public: |
| 366 | tms7040_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 367 | }; |
| 368 | |
| 369 | |
| 370 | class tms70c00_device : public tms7000_device |
| 371 | { |
| 372 | public: |
| 373 | tms70c00_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 374 | }; |
| 375 | |
| 376 | |
| 377 | class tms70c20_device : public tms7000_device |
| 378 | { |
| 379 | public: |
| 380 | tms70c20_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 381 | }; |
| 382 | |
| 383 | |
| 384 | class tms70c40_device : public tms7000_device |
| 385 | { |
| 386 | public: |
| 387 | tms70c40_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 388 | }; |
| 389 | |
| 390 | |
| 356 | 391 | extern const device_type TMS7000; |
| 357 | | extern const device_type TMS7000_EXL; |
| 392 | extern const device_type TMS7020; |
| 393 | extern const device_type TMS7020_EXL; |
| 394 | extern const device_type TMS7040; |
| 395 | extern const device_type TMS70C00; |
| 396 | extern const device_type TMS70C20; |
| 397 | extern const device_type TMS70C40; |
| 358 | 398 | |
| 359 | 399 | |
| 360 | 400 | #endif /* __TMS7000_H__ */ |
trunk/src/mess/drivers/exelv.c
| r31169 | r31170 | |
| 462 | 462 | AM_RANGE(0x8000, 0xbfff) AM_NOP |
| 463 | 463 | AM_RANGE(0xc000, 0xc7ff) AM_RAM /* CPU RAM */ |
| 464 | 464 | AM_RANGE(0xc800, 0xf7ff) AM_NOP |
| 465 | | AM_RANGE(0xf800, 0xffff) AM_ROM AM_REGION("maincpu",0x0000) /* tms7020 internal ROM */ |
| 466 | 465 | ADDRESS_MAP_END |
| 467 | 466 | |
| 468 | 467 | |
| r31169 | r31170 | |
| 473 | 472 | |
| 474 | 473 | |
| 475 | 474 | static ADDRESS_MAP_START(tms7041_map, AS_PROGRAM, 8, exelv_state) |
| 476 | | AM_RANGE(0xf000, 0xffff) AM_ROM AM_REGION("tms7041",0x0000) |
| 475 | AM_RANGE(0x0080, 0x00ff) AM_RAM |
| 477 | 476 | ADDRESS_MAP_END |
| 478 | 477 | |
| 479 | 478 | |
| r31169 | r31170 | |
| 497 | 496 | AM_RANGE(0x8000, 0xbfff) AM_NOP |
| 498 | 497 | AM_RANGE(0xc000, 0xc7ff) AM_RAM /* CPU RAM */ |
| 499 | 498 | AM_RANGE(0xc800, 0xefff) AM_NOP |
| 500 | | AM_RANGE(0xf000, 0xffff) AM_ROM AM_REGION("maincpu",0x0000) /* tms7040 internal ROM */ |
| 501 | 499 | ADDRESS_MAP_END |
| 502 | 500 | |
| 503 | 501 | |
| 504 | 502 | static ADDRESS_MAP_START(tms7042_map, AS_PROGRAM, 8, exelv_state) |
| 505 | | AM_RANGE(0xf000, 0xffff) AM_ROM AM_REGION("tms7042",0x0000) |
| 503 | AM_RANGE(0x0080, 0x00ff) AM_RAM |
| 506 | 504 | ADDRESS_MAP_END |
| 507 | 505 | |
| 508 | 506 | |
| r31169 | r31170 | |
| 550 | 548 | |
| 551 | 549 | static MACHINE_CONFIG_START( exl100, exelv_state ) |
| 552 | 550 | /* basic machine hardware */ |
| 553 | | MCFG_CPU_ADD("maincpu", TMS7000_EXL, XTAL_4_9152MHz) /* TMS7020 */ |
| 551 | MCFG_CPU_ADD("maincpu", TMS7020_EXL, XTAL_4_9152MHz) |
| 554 | 552 | MCFG_CPU_PROGRAM_MAP(tms7020_mem) |
| 555 | 553 | MCFG_CPU_IO_MAP(tms7020_port) |
| 556 | 554 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", exelv_state, exelv_hblank_interrupt, "screen", 0, 1) |
| 557 | 555 | |
| 558 | | MCFG_CPU_ADD("tms7041", TMS7000, XTAL_4_9152MHz) |
| 556 | MCFG_CPU_ADD("tms7041", TMS7040, XTAL_4_9152MHz) // should be TMS7041 |
| 559 | 557 | MCFG_CPU_PROGRAM_MAP(tms7041_map) |
| 560 | 558 | MCFG_CPU_IO_MAP(tms7041_port) |
| 561 | 559 | |
| 562 | 560 | MCFG_QUANTUM_PERFECT_CPU("maincpu") |
| 563 | | MCFG_QUANTUM_PERFECT_CPU("tms7041") |
| 564 | 561 | |
| 565 | 562 | MCFG_TMS3556_ADD("tms3556") |
| 566 | 563 | |
| r31169 | r31170 | |
| 591 | 588 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 592 | 589 | |
| 593 | 590 | /* cartridge */ |
| 594 | | MCFG_CARTSLOT_ADD("cart") |
| 595 | | MCFG_CARTSLOT_EXTENSION_LIST("bin,rom") |
| 596 | | MCFG_CARTSLOT_NOT_MANDATORY |
| 597 | | MCFG_CARTSLOT_LOAD(exelv_state,exelvision_cartridge) |
| 598 | | MCFG_CARTSLOT_INTERFACE("exelvision_cart") |
| 599 | | MCFG_SOFTWARE_LIST_ADD("cart_list","exelvision_cart") |
| 600 | | |
| 591 | MCFG_CARTSLOT_ADD("cart") |
| 592 | MCFG_CARTSLOT_EXTENSION_LIST("bin,rom") |
| 593 | MCFG_CARTSLOT_NOT_MANDATORY |
| 594 | MCFG_CARTSLOT_LOAD(exelv_state,exelvision_cartridge) |
| 595 | MCFG_CARTSLOT_INTERFACE("exelvision_cart") |
| 596 | MCFG_SOFTWARE_LIST_ADD("cart_list","exelvision_cart") |
| 601 | 597 | MACHINE_CONFIG_END |
| 602 | 598 | |
| 603 | 599 | |
| 604 | 600 | static MACHINE_CONFIG_START( exeltel, exelv_state ) |
| 605 | 601 | /* basic machine hardware */ |
| 606 | | MCFG_CPU_ADD("maincpu", TMS7000_EXL, XTAL_4_9152MHz) /* TMS7040 */ |
| 602 | MCFG_CPU_ADD("maincpu", TMS7040, XTAL_4_9152MHz) |
| 607 | 603 | MCFG_CPU_PROGRAM_MAP(tms7040_mem) |
| 608 | 604 | MCFG_CPU_IO_MAP(tms7020_port) |
| 609 | 605 | MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", exelv_state, exelv_hblank_interrupt, "screen", 0, 1) |
| 610 | 606 | |
| 611 | | MCFG_CPU_ADD("tms7042", TMS7000, XTAL_4_9152MHz) |
| 607 | MCFG_CPU_ADD("tms7042", TMS7040, XTAL_4_9152MHz) // should be TMS7042 |
| 612 | 608 | MCFG_CPU_PROGRAM_MAP(tms7042_map) |
| 613 | 609 | MCFG_CPU_IO_MAP(tms7041_port) |
| 614 | 610 | |
| 615 | 611 | MCFG_QUANTUM_PERFECT_CPU("maincpu") |
| 616 | | MCFG_QUANTUM_PERFECT_CPU("tms7042") |
| 617 | 612 | |
| 618 | 613 | MCFG_TMS3556_ADD("tms3556") |
| 619 | 614 | |
| r31169 | r31170 | |
| 649 | 644 | ROM loading |
| 650 | 645 | */ |
| 651 | 646 | ROM_START(exl100) |
| 652 | | ROM_REGION(0x800, "maincpu", 0) |
| 653 | | ROM_LOAD("exl100in.bin", 0x0000, 0x0800, CRC(049109a3) SHA1(98a07297dcdacef41c793c197b6496dac1e8e744)) /* TMS7020 ROM, correct */ |
| 647 | ROM_REGION(0x10000, "maincpu", 0) |
| 648 | ROM_LOAD("exl100in.bin", 0xf800, 0x0800, CRC(049109a3) SHA1(98a07297dcdacef41c793c197b6496dac1e8e744)) /* TMS7020 ROM, correct */ |
| 654 | 649 | |
| 655 | | ROM_REGION(0x1000, "tms7041", 0) |
| 656 | | ROM_LOAD("exl100_7041.bin", 0x0000, 0x1000, CRC(38f6fc7a) SHA1(b71d545664a974d8ad39bdf600c5b9884c3efab6)) /* TMS7041 internal ROM, correct */ |
| 650 | ROM_REGION(0x10000, "tms7041", 0) |
| 651 | ROM_LOAD("exl100_7041.bin", 0xf000, 0x1000, CRC(38f6fc7a) SHA1(b71d545664a974d8ad39bdf600c5b9884c3efab6)) /* TMS7041 internal ROM, correct */ |
| 657 | 652 | // ROM_REGION(0x8000, "vsm", 0) |
| 658 | 653 | |
| 659 | 654 | ROM_REGION(0x10000, "user1", ROMREGION_ERASEFF) /* cartridge area */ |
| r31169 | r31170 | |
| 661 | 656 | |
| 662 | 657 | |
| 663 | 658 | ROM_START(exeltel) |
| 664 | | ROM_REGION(0x1000, "maincpu", 0) |
| 665 | | ROM_LOAD("exeltel_7040.bin", 0x0000, 0x1000, CRC(2792f02f) SHA1(442a852eb68ef78974733d169084752a131de23d)) /* TMS7040 internal ROM */ |
| 659 | ROM_REGION(0x10000, "maincpu", 0) |
| 660 | ROM_LOAD("exeltel_7040.bin", 0xf000, 0x1000, CRC(2792f02f) SHA1(442a852eb68ef78974733d169084752a131de23d)) /* TMS7040 internal ROM */ |
| 666 | 661 | |
| 667 | | ROM_REGION(0x1000, "tms7042", 0) |
| 668 | | ROM_LOAD("exeltel_7042.bin", 0x0000, 0x1000, BAD_DUMP CRC(a0163507) SHA1(8452849df7eac8a89cf03ee98e2306047c1c4c38)) /* TMS7042 internal ROM, needs redump */ |
| 662 | ROM_REGION(0x10000, "tms7042", 0) |
| 663 | ROM_LOAD("exeltel_7042.bin", 0xf000, 0x1000, BAD_DUMP CRC(a0163507) SHA1(8452849df7eac8a89cf03ee98e2306047c1c4c38)) /* TMS7042 internal ROM, needs redump */ |
| 669 | 664 | |
| 670 | 665 | ROM_REGION(0x10000,"user1",0) |
| 671 | 666 | ROM_SYSTEM_BIOS( 0, "french", "French v1.4" ) |