Previous 15994 Revisions Next

r5765 Thursday 17th September, 2009 at 12:58:11 UTC by Roberto Zandonà
[JR200] implemented a preliminary keyboard
[src/mess/drivers]jr200.c

src/mess/drivers/jr200.c
r5764r5765
2121
2222static UINT8 *textram;
2323
24static READ8_HANDLER( test1_r )
24static READ8_HANDLER( test_r )
2525{
26   if (debug_global_input_code_pressed(KEYCODE_Q)) return 0x50;
27return 0x50;
26   return 0x00;
2827}
2928
30static READ8_HANDLER( test2_r )
29static WRITE8_HANDLER( test_w )
3130{
32   if (debug_global_input_code_pressed(KEYCODE_Q)) return 0x01;
33return 0x01;
31   ;
3432}
3533
36static READ8_HANDLER( test3_r )
34static READ8_HANDLER( test01_r )
3735{
38   if (debug_global_input_code_pressed(KEYCODE_Q)) return 0x10;
39return 0x10;
36   if (debug_global_input_code_pressed(KEYCODE_Q)) return 0x51;
37   if (debug_global_input_code_pressed(KEYCODE_P)) return 0x50;
38   if (debug_global_input_code_pressed(KEYCODE_R)) return 0x52;
39   if (debug_global_input_code_pressed(KEYCODE_S)) return 0x53;
40   if (debug_global_input_code_pressed(KEYCODE_T)) return 0x54;
41   if (debug_global_input_code_pressed(KEYCODE_U)) return 0x55;
42   if (debug_global_input_code_pressed(KEYCODE_V)) return 0x56;
43   if (debug_global_input_code_pressed(KEYCODE_W)) return 0x57;
44   return 0x00;
4045}
4146
47static READ8_HANDLER( test1c_r )
48{
49   return 0x01;
50}
51
52static READ8_HANDLER( test1d_r )
53{
54   return 0x10;
55}
56
4257/*
4358   0000-3fff RAM
4459   4000-4fff RAM ( 4k expansion)
r5764r5765
5570   AM_RANGE(0x000e, 0x3fff) AM_RAM
5671   AM_RANGE(0xa000, 0xbfff) AM_ROM
5772   AM_RANGE(0xc000, 0xc7ff) AM_RAM AM_BASE(&textram)
58   AM_RANGE(0xc801, 0xc801) AM_RAM AM_READ(test1_r)
59   AM_RANGE(0xc81c, 0xc81c) AM_RAM AM_READ(test2_r)
60   AM_RANGE(0xc81d, 0xc81d) AM_RAM AM_READ(test3_r)
73   AM_RANGE(0xc800, 0xc800) AM_RAM AM_READWRITE(test_r, test_w)
74   AM_RANGE(0xc801, 0xc801) AM_RAM AM_READWRITE(test01_r, test_w)
75   AM_RANGE(0xc802, 0xc802) AM_RAM AM_READWRITE(test_r, test_w)
76   AM_RANGE(0xc803, 0xc803) AM_RAM AM_READWRITE(test_r, test_w)
77   AM_RANGE(0xc804, 0xc804) AM_RAM AM_READWRITE(test_r, test_w)
78   AM_RANGE(0xc805, 0xc805) AM_RAM AM_READWRITE(test_r, test_w)
79   AM_RANGE(0xc806, 0xc806) AM_RAM AM_READWRITE(test_r, test_w)
80   AM_RANGE(0xc807, 0xc807) AM_RAM AM_READWRITE(test_r, test_w)
81   AM_RANGE(0xc808, 0xc808) AM_RAM AM_READWRITE(test_r, test_w)
82   AM_RANGE(0xc809, 0xc809) AM_RAM AM_READWRITE(test_r, test_w)
83   AM_RANGE(0xc80a, 0xc80a) AM_RAM AM_READWRITE(test_r, test_w)
84   AM_RANGE(0xc80b, 0xc80b) AM_RAM AM_READWRITE(test_r, test_w)
85   AM_RANGE(0xc80c, 0xc80c) AM_RAM AM_READWRITE(test_r, test_w)
86   AM_RANGE(0xc80d, 0xc80d) AM_RAM AM_READWRITE(test_r, test_w)
87   AM_RANGE(0xc80e, 0xc80e) AM_RAM AM_READWRITE(test_r, test_w)
88   AM_RANGE(0xc80f, 0xc80f) AM_RAM AM_READWRITE(test_r, test_w)
89   AM_RANGE(0xc810, 0xc810) AM_RAM AM_READWRITE(test_r, test_w)
90   AM_RANGE(0xc811, 0xc811) AM_RAM AM_READWRITE(test_r, test_w)
91   AM_RANGE(0xc812, 0xc812) AM_RAM AM_READWRITE(test_r, test_w)
92   AM_RANGE(0xc813, 0xc813) AM_RAM AM_READWRITE(test_r, test_w)
93   AM_RANGE(0xc814, 0xc814) AM_RAM AM_READWRITE(test_r, test_w)
94   AM_RANGE(0xc815, 0xc815) AM_RAM AM_READWRITE(test_r, test_w)
95   AM_RANGE(0xc816, 0xc816) AM_RAM AM_READWRITE(test_r, test_w)
96   AM_RANGE(0xc817, 0xc817) AM_RAM AM_READWRITE(test_r, test_w)
97   AM_RANGE(0xc818, 0xc818) AM_RAM AM_READWRITE(test_r, test_w)
98   AM_RANGE(0xc819, 0xc819) AM_RAM AM_READWRITE(test_r, test_w)
99   AM_RANGE(0xc81a, 0xc81a) AM_RAM AM_READWRITE(test_r, test_w)
100   AM_RANGE(0xc81b, 0xc81b) AM_RAM AM_READWRITE(test_r, test_w)
101   AM_RANGE(0xc81c, 0xc81c) AM_RAM AM_READWRITE(test1c_r, test_w)
102   AM_RANGE(0xc81d, 0xc81d) AM_RAM AM_READWRITE(test1d_r, test_w)
103   AM_RANGE(0xc81e, 0xc81e) AM_RAM AM_READWRITE(test_r, test_w)
104   AM_RANGE(0xc81f, 0xc81f) AM_RAM AM_READWRITE(test_r, test_w)
61105   AM_RANGE(0xe000, 0xffff) AM_ROM
62106ADDRESS_MAP_END
63107
r5764r5765
123167
124168}
125169
170/*
126171static INTERRUPT_GEN( jr200_nmi )
127172{
128173   cpu_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE);
129174}
175*/
130176
131177static MACHINE_DRIVER_START( jr200 )
132178   /* basic machine hardware */
133   MDRV_CPU_ADD("maincpu", M6802, XTAL_4MHz) /* MN1800A */
179   MDRV_CPU_ADD("maincpu", M6802, 890000) /* MN1800A */
134180   MDRV_CPU_PROGRAM_MAP(jr200_mem)
135181   MDRV_CPU_IO_MAP(jr200_io)
136182MDRV_CPU_VBLANK_INT("screen", jr200_irq)
137MDRV_CPU_PERIODIC_INT(jr200_nmi,60)
183// MDRV_CPU_PERIODIC_INT(jr200_nmi,60)
138184/*
139185   MDRV_CPU_ADD("mn1544", MN1544, ?)
140186*/

Previous 15994 Revisions Next


© 1998-2018 The MESS Team