src/mess/drivers/jr200.c
| r5764 | r5765 | |
| 21 | 21 | |
| 22 | 22 | static UINT8 *textram; |
| 23 | 23 | |
| 24 | | static READ8_HANDLER( test1_r ) |
| 24 | static READ8_HANDLER( test_r ) |
| 25 | 25 | { |
| 26 | | if (debug_global_input_code_pressed(KEYCODE_Q)) return 0x50; |
| 27 | | return 0x50; |
| 26 | return 0x00; |
| 28 | 27 | } |
| 29 | 28 | |
| 30 | | static READ8_HANDLER( test2_r ) |
| 29 | static WRITE8_HANDLER( test_w ) |
| 31 | 30 | { |
| 32 | | if (debug_global_input_code_pressed(KEYCODE_Q)) return 0x01; |
| 33 | | return 0x01; |
| 31 | ; |
| 34 | 32 | } |
| 35 | 33 | |
| 36 | | static READ8_HANDLER( test3_r ) |
| 34 | static READ8_HANDLER( test01_r ) |
| 37 | 35 | { |
| 38 | | if (debug_global_input_code_pressed(KEYCODE_Q)) return 0x10; |
| 39 | | return 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; |
| 40 | 45 | } |
| 41 | 46 | |
| 47 | static READ8_HANDLER( test1c_r ) |
| 48 | { |
| 49 | return 0x01; |
| 50 | } |
| 51 | |
| 52 | static READ8_HANDLER( test1d_r ) |
| 53 | { |
| 54 | return 0x10; |
| 55 | } |
| 56 | |
| 42 | 57 | /* |
| 43 | 58 | 0000-3fff RAM |
| 44 | 59 | 4000-4fff RAM ( 4k expansion) |
| r5764 | r5765 | |
| 55 | 70 | AM_RANGE(0x000e, 0x3fff) AM_RAM |
| 56 | 71 | AM_RANGE(0xa000, 0xbfff) AM_ROM |
| 57 | 72 | 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) |
| 61 | 105 | AM_RANGE(0xe000, 0xffff) AM_ROM |
| 62 | 106 | ADDRESS_MAP_END |
| 63 | 107 | |
| r5764 | r5765 | |
| 123 | 167 | |
| 124 | 168 | } |
| 125 | 169 | |
| 170 | /* |
| 126 | 171 | static INTERRUPT_GEN( jr200_nmi ) |
| 127 | 172 | { |
| 128 | 173 | cpu_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); |
| 129 | 174 | } |
| 175 | */ |
| 130 | 176 | |
| 131 | 177 | static MACHINE_DRIVER_START( jr200 ) |
| 132 | 178 | /* basic machine hardware */ |
| 133 | | MDRV_CPU_ADD("maincpu", M6802, XTAL_4MHz) /* MN1800A */ |
| 179 | MDRV_CPU_ADD("maincpu", M6802, 890000) /* MN1800A */ |
| 134 | 180 | MDRV_CPU_PROGRAM_MAP(jr200_mem) |
| 135 | 181 | MDRV_CPU_IO_MAP(jr200_io) |
| 136 | 182 | MDRV_CPU_VBLANK_INT("screen", jr200_irq) |
| 137 | | MDRV_CPU_PERIODIC_INT(jr200_nmi,60) |
| 183 | // MDRV_CPU_PERIODIC_INT(jr200_nmi,60) |
| 138 | 184 | /* |
| 139 | 185 | MDRV_CPU_ADD("mn1544", MN1544, ?) |
| 140 | 186 | */ |