Previous 15994 Revisions Next

r13097 Sunday 23rd October, 2011 at 11:19:07 UTC by Robbbert
Fixed keyboard on pyuutajr. Added some notes.
[src/mess/drivers]tutor.c

src/mess/drivers/tutor.c
r13096r13097
155155                                NMI vector (*)
156156FFFF
157157
158*/
159158
159
160PYUUTAJR
161********
162
163This is a handheld unit with 12 'chiclet' buttons. The keyboard has E800, EA00, EC00, EE00 scanned,
164although 2 of these rows have no keys. TUTOR carts will run, however since most of them ask for
165A=AMA, P=PRO, these keys don't exist, and so the games cannot be played.
166
167*********************************************************************************************************/
168
160169#define ADDRESS_MAP_MODERN
161170
162171#include "emu.h"
r13096r13097
180189   { }
181190
182191   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);
186195   DECLARE_READ8_MEMBER(tutor_mapper_r);
187196   DECLARE_WRITE8_MEMBER(tutor_mapper_w);
188197   DECLARE_READ8_MEMBER(tutor_cassette_r);
r13096r13097
273282    mapped to both a keyboard key and a joystick switch.
274283*/
275284
276READ8_MEMBER( tutor_state::read_keyboard )
285READ8_MEMBER( tutor_state::key_r )
277286{
278287   char port[12];
279288   UINT8 value;
r13096r13097
291300   return value;
292301}
293302
303
294304static DEVICE_IMAGE_LOAD( tutor_cart )
295305{
296306   UINT32 size;
r13096r13097
552562   AM_RANGE(0xe800, 0xe8ff) AM_READWRITE(tutor_printer_r, tutor_printer_w)   /*printer*/
553563   AM_RANGE(0xee00, 0xeeff) AM_READNOP AM_WRITE( tutor_cassette_w)      /*cassette interface*/
554564
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)*/
556566ADDRESS_MAP_END
557567
568static 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)*/
581ADDRESS_MAP_END
582
558583/*
559584    CRU map summary:
560585
r13096r13097
566591*/
567592
568593static 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*/
570595   AM_RANGE(0xed0, 0xed0) AM_READ(tutor_cassette_r)      /*cassette interface*/
571596ADDRESS_MAP_END
572597
r13096r13097
680705      PORT_BIT(0xf0, IP_ACTIVE_HIGH, IPT_UNUSED)
681706INPUT_PORTS_END
682707
708// Unit only has 12 buttons. LINE0 & 3 are scanned with the others, but have nothing connected?
709static INPUT_PORTS_START(pyuutajr)
710   PORT_START("LINE0")
711      PORT_BIT(0xff, IP_ACTIVE_HIGH, IPT_UNUSED)
683712
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)
735INPUT_PORTS_END
736
737
684738static const struct tms9995reset_param tutor_processor_config =
685739{
686740#if 0
r13096r13097
731785   MCFG_SOFTWARE_LIST_ADD("cart_list","tutor")
732786MACHINE_CONFIG_END
733787
788static 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)
793MACHINE_CONFIG_END
734794
735795/*
736796  ROM loading
r13096r13097
755815   ROM_LOAD( "ipl.rom", 0x0000, 0x4000, CRC(2ca37e62) SHA1(eebdc5c37d3b532edd5e5ca65eb785269ebd1ac0))      /* system ROM */
756816ROM_END 
757817 
758/*   YEAR    NAME    PARENT      COMPAT  MACHINE     INPUT   INIT    COMPANY     FULLNAME */
759COMP(1983?,  tutor,  0,          0,      tutor,      tutor,  tutor,  "Tomy",   "Tomy Tutor" , 0)
760COMP(1982,   pyuuta, tutor,      0,      tutor,      tutor,  pyuuta, "Tomy",   "Tomy Pyuuta" , 0)
761COMP(1983,   pyuutajr, tutor,      0,      tutor,      tutor,  pyuuta, "Tomy",   "Tomy Pyuuta Jr." , 0)
818/*   YEAR    NAME      PARENT      COMPAT  MACHINE     INPUT      INIT    COMPANY     FULLNAME */
819COMP(1983?,  tutor,    0,          0,      tutor,      tutor,     tutor,  "Tomy",   "Tomy Tutor" , 0)
820COMP(1982,   pyuuta,   tutor,      0,      tutor,      tutor,     pyuuta, "Tomy",   "Tomy Pyuuta" , 0)
821COMP(1983,   pyuutajr, tutor,      0,      pyuutajr,   pyuutajr,  pyuuta, "Tomy",   "Tomy Pyuuta Jr." , 0)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team