src/mess/drivers/tutor.c
| r13096 | r13097 | |
| 155 | 155 | NMI vector (*) |
| 156 | 156 | FFFF |
| 157 | 157 | |
| 158 | | */ |
| 159 | 158 | |
| 159 | |
| 160 | PYUUTAJR |
| 161 | ******** |
| 162 | |
| 163 | This is a handheld unit with 12 'chiclet' buttons. The keyboard has E800, EA00, EC00, EE00 scanned, |
| 164 | although 2 of these rows have no keys. TUTOR carts will run, however since most of them ask for |
| 165 | A=AMA, P=PRO, these keys don't exist, and so the games cannot be played. |
| 166 | |
| 167 | *********************************************************************************************************/ |
| 168 | |
| 160 | 169 | #define ADDRESS_MAP_MODERN |
| 161 | 170 | |
| 162 | 171 | #include "emu.h" |
| r13096 | r13097 | |
| 180 | 189 | { } |
| 181 | 190 | |
| 182 | 191 | required_device<cpu_device> m_maincpu; |
| 183 | | required_device<cassette_image_device> m_cass; |
| 184 | | required_device<device_t> m_printer; |
| 185 | | DECLARE_READ8_MEMBER(read_keyboard); |
| 192 | optional_device<cassette_image_device> m_cass; |
| 193 | optional_device<device_t> m_printer; |
| 194 | DECLARE_READ8_MEMBER(key_r); |
| 186 | 195 | DECLARE_READ8_MEMBER(tutor_mapper_r); |
| 187 | 196 | DECLARE_WRITE8_MEMBER(tutor_mapper_w); |
| 188 | 197 | DECLARE_READ8_MEMBER(tutor_cassette_r); |
| r13096 | r13097 | |
| 273 | 282 | mapped to both a keyboard key and a joystick switch. |
| 274 | 283 | */ |
| 275 | 284 | |
| 276 | | READ8_MEMBER( tutor_state::read_keyboard ) |
| 285 | READ8_MEMBER( tutor_state::key_r ) |
| 277 | 286 | { |
| 278 | 287 | char port[12]; |
| 279 | 288 | UINT8 value; |
| r13096 | r13097 | |
| 291 | 300 | return value; |
| 292 | 301 | } |
| 293 | 302 | |
| 303 | |
| 294 | 304 | static DEVICE_IMAGE_LOAD( tutor_cart ) |
| 295 | 305 | { |
| 296 | 306 | UINT32 size; |
| r13096 | r13097 | |
| 552 | 562 | AM_RANGE(0xe800, 0xe8ff) AM_READWRITE(tutor_printer_r, tutor_printer_w) /*printer*/ |
| 553 | 563 | AM_RANGE(0xee00, 0xeeff) AM_READNOP AM_WRITE( tutor_cassette_w) /*cassette interface*/ |
| 554 | 564 | |
| 555 | | AM_RANGE(0xf000, 0xffff) AM_NOP /*free for expansion (and internal processor RAM)*/ |
| 565 | AM_RANGE(0xf000, 0xffff) AM_NOP /*free for expansion (and internal processor RAM)*/ |
| 556 | 566 | ADDRESS_MAP_END |
| 557 | 567 | |
| 568 | static ADDRESS_MAP_START(pyuutajr_mem, AS_PROGRAM, 8, tutor_state) |
| 569 | AM_RANGE(0x0000, 0x7fff) AM_ROM /*system ROM*/ |
| 570 | AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank1") AM_WRITENOP /*BASIC ROM & cartridge ROM*/ |
| 571 | AM_RANGE(0xc000, 0xdfff) AM_NOP /*free for expansion, or cartridge ROM?*/ |
| 572 | AM_RANGE(0xe000, 0xe000) AM_DEVREADWRITE("tms9928a", tms9928a_device, vram_read, vram_write) /*VDP data*/ |
| 573 | AM_RANGE(0xe002, 0xe002) AM_DEVREADWRITE("tms9928a", tms9928a_device, register_read, register_write)/*VDP status*/ |
| 574 | AM_RANGE(0xe100, 0xe1ff) AM_READWRITE(tutor_mapper_r, tutor_mapper_w) /*cartridge mapper*/ |
| 575 | AM_RANGE(0xe200, 0xe200) AM_DEVWRITE_LEGACY("sn76489a", sn76496_w) /*sound chip*/ |
| 576 | AM_RANGE(0xe800, 0xe800) AM_READ_PORT("LINE0") |
| 577 | AM_RANGE(0xea00, 0xea00) AM_READ_PORT("LINE1") |
| 578 | AM_RANGE(0xec00, 0xec00) AM_READ_PORT("LINE2") |
| 579 | AM_RANGE(0xee00, 0xee00) AM_READ_PORT("LINE3") |
| 580 | AM_RANGE(0xf000, 0xffff) AM_NOP /*free for expansion (and internal processor RAM)*/ |
| 581 | ADDRESS_MAP_END |
| 582 | |
| 558 | 583 | /* |
| 559 | 584 | CRU map summary: |
| 560 | 585 | |
| r13096 | r13097 | |
| 566 | 591 | */ |
| 567 | 592 | |
| 568 | 593 | static ADDRESS_MAP_START(tutor_io, AS_IO, 8, tutor_state) |
| 569 | | AM_RANGE(0xec0, 0xec7) AM_READ(read_keyboard) /*keyboard interface*/ |
| 594 | AM_RANGE(0xec0, 0xec7) AM_READ(key_r) /*keyboard interface*/ |
| 570 | 595 | AM_RANGE(0xed0, 0xed0) AM_READ(tutor_cassette_r) /*cassette interface*/ |
| 571 | 596 | ADDRESS_MAP_END |
| 572 | 597 | |
| r13096 | r13097 | |
| 680 | 705 | PORT_BIT(0xf0, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 681 | 706 | INPUT_PORTS_END |
| 682 | 707 | |
| 708 | // Unit only has 12 buttons. LINE0 & 3 are scanned with the others, but have nothing connected? |
| 709 | static INPUT_PORTS_START(pyuutajr) |
| 710 | PORT_START("LINE0") |
| 711 | PORT_BIT(0xff, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 683 | 712 | |
| 713 | PORT_START("LINE1") |
| 714 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 715 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 716 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("ENTER") PORT_CODE(KEYCODE_ENTER) |
| 717 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("PALLET") PORT_CODE(KEYCODE_P) |
| 718 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("MODE") PORT_CODE(KEYCODE_M) |
| 719 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("MONITOR") PORT_CODE(KEYCODE_Q) |
| 720 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) |
| 721 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) |
| 722 | |
| 723 | PORT_START("LINE2") |
| 724 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 725 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 726 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Left") PORT_CODE(KEYCODE_COMMA) |
| 727 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Right") PORT_CODE(KEYCODE_STOP) |
| 728 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(UTF8_LEFT) PORT_CODE(KEYCODE_LEFT) |
| 729 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(UTF8_UP) PORT_CODE(KEYCODE_UP) |
| 730 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(UTF8_DOWN) PORT_CODE(KEYCODE_DOWN) |
| 731 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(UTF8_RIGHT) PORT_CODE(KEYCODE_RIGHT) |
| 732 | |
| 733 | PORT_START("LINE3") |
| 734 | PORT_BIT(0xff, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 735 | INPUT_PORTS_END |
| 736 | |
| 737 | |
| 684 | 738 | static const struct tms9995reset_param tutor_processor_config = |
| 685 | 739 | { |
| 686 | 740 | #if 0 |
| r13096 | r13097 | |
| 731 | 785 | MCFG_SOFTWARE_LIST_ADD("cart_list","tutor") |
| 732 | 786 | MACHINE_CONFIG_END |
| 733 | 787 | |
| 788 | static MACHINE_CONFIG_DERIVED( pyuutajr, tutor ) |
| 789 | MCFG_CPU_MODIFY("maincpu") |
| 790 | MCFG_CPU_PROGRAM_MAP(pyuutajr_mem) |
| 791 | //MCFG_DEVICE_REMOVE("printer") |
| 792 | //MCFG_DEVICE_REMOVE(CASSETTE_TAG) |
| 793 | MACHINE_CONFIG_END |
| 734 | 794 | |
| 735 | 795 | /* |
| 736 | 796 | ROM loading |
| r13096 | r13097 | |
| 755 | 815 | ROM_LOAD( "ipl.rom", 0x0000, 0x4000, CRC(2ca37e62) SHA1(eebdc5c37d3b532edd5e5ca65eb785269ebd1ac0)) /* system ROM */ |
| 756 | 816 | ROM_END |
| 757 | 817 | |
| 758 | | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */ |
| 759 | | COMP(1983?, tutor, 0, 0, tutor, tutor, tutor, "Tomy", "Tomy Tutor" , 0) |
| 760 | | COMP(1982, pyuuta, tutor, 0, tutor, tutor, pyuuta, "Tomy", "Tomy Pyuuta" , 0) |
| 761 | | COMP(1983, pyuutajr, tutor, 0, tutor, tutor, pyuuta, "Tomy", "Tomy Pyuuta Jr." , 0) |
| 818 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */ |
| 819 | COMP(1983?, tutor, 0, 0, tutor, tutor, tutor, "Tomy", "Tomy Tutor" , 0) |
| 820 | COMP(1982, pyuuta, tutor, 0, tutor, tutor, pyuuta, "Tomy", "Tomy Pyuuta" , 0) |
| 821 | COMP(1983, pyuutajr, tutor, 0, pyuutajr, pyuutajr, pyuuta, "Tomy", "Tomy Pyuuta Jr." , 0) |