src/mess/drivers/arcadia.c
| r13301 | r13302 | |
| 1 | | /****************************************************************************** |
| 2 | | Consolidation and enhancement of documentation by Manfred Schneider based on previous work from |
| 3 | | PeT mess@utanet.at and Paul Robson (autismuk@aol.com) minor updates by incog |
| 4 | | |
| 5 | | Schematics, manuals and anything you can desire for at http://amigan.classicgaming.gamespy.com/ |
| 6 | | |
| 7 | | TODO: implement the RESET key on the front panel |
| 8 | | find a dump of the character ROM |
| 9 | | convert the drawing code to tilemap |
| 10 | | |
| 11 | | |
| 12 | | 1. General |
| 13 | | SYSTEM |
| 14 | | - Signetics 2650 CPU at 3.58/4 MHz(for NTSC) or at 4,433/5 (for PAL) |
| 15 | | - 1k x 8 of RAM (physically present but only 512 byte available) |
| 16 | | - 2 x 2 axis Analogue Joysticks |
| 17 | | - 2 x 12 button Controllers |
| 18 | | - 3 buttons on system unit and CPU Reset |
| 19 | | VIDEO |
| 20 | | - 128 x 208 pixel resolution (alternate 128 x 104 mode available) |
| 21 | | - 16 x 26 (can be 16x13) background display (2 colour 8 x 8 pixel characters) |
| 22 | | - 4 x 8 x 8 Sprites (2 colour 8 x 8 pixels) |
| 23 | | - total of 8 user defined characters available |
| 24 | | SOUND |
| 25 | | - Single channel beeper |
| 26 | | |
| 27 | | |
| 28 | | 2. Memory map |
| 29 | | The memory map of the 2001 is below. |
| 30 | | 0000 - 0FFF 4k ROM Block 1 (first 4k of a cartridge) |
| 31 | | 1000 - 13FF mirror of $1800-$1BFF |
| 32 | | 1400 - 17FF mirror of $1800-$1BFF |
| 33 | | 1800 - 1BFF UVI2637 Area (detail description in video/arcadia.c) |
| 34 | | 1800 - 18CF Screen display , upper 13 lines, characters/palette high bits |
| 35 | | 18D0 - 18EF Free for user programs. |
| 36 | | 18F0 - 18F7 Sprite coordinates y0x0y1x1y2x2y3x3 |
| 37 | | 18F8 - 1908 registers of UVI |
| 38 | | 1909 - 197F Unmapped |
| 39 | | 1980 - 19BF User defined characters (8 possible, 8 bytes per character) |
| 40 | | 19C0 - 19F7 Unmapped |
| 41 | | 19F8 - 19FF registers of UVI |
| 42 | | 1A00 - 1ACF Screen display , lower 13 lines, characters/palette high bits |
| 43 | | 1AD0 - 1AFF User memory |
| 44 | | 1B00 - 1BFF mirror of 1900-19FF |
| 45 | | 1C00 - 1FFF mirror of 1800-1BFF |
| 46 | | 2000 - 2FFF 4k ROM Block 2 (for 8k carts such as Jungler) |
| 47 | | 3000 - 3FFF mirror of 1000-1FFF |
| 48 | | 4000 - 4FFF mirror of 0000-0FFF |
| 49 | | 5000 - 5FFF mirror of 1000-1FFF |
| 50 | | 6000 - 6FFF mirror of 0000-0FFF |
| 51 | | 7000 - 7FFF mirror of 1000-1FFF |
| 52 | | |
| 53 | | The Palladium VCG memory map is as follows. |
| 54 | | 0000 - 0FFF 4k ROM Block 1 (first 4k of a cartridge) |
| 55 | | 1000 - 17FF could be ROM or RAM but no Cartridge uses this |
| 56 | | 1800 - 1BFF UVI2637 Area (detail description in video/arcadia.c) |
| 57 | | 1800 - 18CF Screen display , upper 13 lines, characters/palette high bits |
| 58 | | 18D0 - 18EF Free for user programs. |
| 59 | | 18F0 - 18F7 Sprite coordinates y0x0y1x1y2x2y3x3 |
| 60 | | 18F8 - 1908 registers of UVI |
| 61 | | 1909 - 197F Unmapped |
| 62 | | 1980 - 19BF User defined characters (8 possible, 8 bytes per character) |
| 63 | | 19C0 - 19F7 Unmapped |
| 64 | | 19F8 - 19FF registers of UVI |
| 65 | | 1A00 - 1ACF Screen display , lower 13 lines, characters/palette high bits |
| 66 | | 1AD0 - 1AFF User memory |
| 67 | | 1B00 - 1BFF mirror of 1900-19FF |
| 68 | | 1C00 - 1FFF could be ROM or RAM but no Cartridge uses this |
| 69 | | 2000 - 2FFF 4k ROM Block (for 8k carts such as Jungler) |
| 70 | | 3000 - 3FFF could be ROM or RAM but no Cartridge uses this |
| 71 | | 4000 - 4FFF 4k ROM Block (first 2K used by Golf) |
| 72 | | 5000 - 5FFF 4k ROM Block |
| 73 | | 6000 - 6FFF 4k ROM Block |
| 74 | | 7000 - 7FFF 4k ROM Block |
| 75 | | |
| 76 | | |
| 77 | | 3. ROM Images |
| 78 | | ROM Images are loaded into 0000-0FFF. If the ROM is an 8k ROM the |
| 79 | | second half of the Rom is located at 2000-2FFF. Except for the Golf cart |
| 80 | | which is located from 0x0000-0x0FFF and a 2kbyte block from 0x4000 only on |
| 81 | | Palladium VCG. |
| 82 | | |
| 83 | | |
| 84 | | 4. Controls |
| 85 | | All key controls are indicated by a bit going to '1'. Unused bits at |
| 86 | | the memory location are set to zero. |
| 87 | | |
| 88 | | Keypads |
| 89 | | |
| 90 | | 1900-1902 (Player 1) 1904-1906 (Player 2) |
| 91 | | The keypads are arranged as follows :- |
| 92 | | |
| 93 | | 1 2 3 |
| 94 | | 4 5 6 |
| 95 | | 7 8 9 |
| 96 | | Enter 0 Clear |
| 97 | | |
| 98 | | Row 1/4/7 is 1900/4, Row 2/5/8/0 is 1901/5 and Row 3/6/9 is 1902/6 |
| 99 | | The topmost key is bit 3, the lowermost key is bit 0. |
| 100 | | |
| 101 | | Location $1908 contains bit 0 Start,bit 1 Option,bit 2 Difficulty. |
| 102 | | These keys are "latched" i.e. a press causes a logic 1 to appear |
| 103 | | on the current frame. |
| 104 | | |
| 105 | | The fire buttons are equivalent to Keypad #2 e.g. they are 1901 and |
| 106 | | 1905 bit 3. |
| 107 | | |
| 108 | | Palladium has 4 additional key per keypad which are mapped at |
| 109 | | 1903 palladium player 1 |
| 110 | | 1907 palladium player 2 |
| 111 | | |
| 112 | | |
| 113 | | 5. Other information |
| 114 | | Interrupts are not supported |
| 115 | | The Read/Write 2650 CPU Port-Commands do not appear to be connected to |
| 116 | | anything in hardware. No cartridge has been found which uses them. |
| 117 | | |
| 118 | | ******************************************************************************/ |
| 119 | | |
| 120 | | #include <assert.h> |
| 121 | | #include "emu.h" |
| 122 | | #include "cpu/s2650/s2650.h" |
| 123 | | #include "includes/arcadia.h" |
| 124 | | #include "imagedev/cartslot.h" |
| 125 | | |
| 126 | | static ADDRESS_MAP_START( arcadia_mem, AS_PROGRAM, 8) |
| 127 | | AM_RANGE( 0x0000, 0x0fff) AM_ROM |
| 128 | | AM_RANGE( 0x1800, 0x1aff) AM_READWRITE( arcadia_video_r, arcadia_video_w ) |
| 129 | | AM_RANGE( 0x2000, 0x2fff) AM_ROM |
| 130 | | ADDRESS_MAP_END |
| 131 | | |
| 132 | | static ADDRESS_MAP_START( arcadia_io, AS_IO, 8) |
| 133 | | //{ S2650_CTRL_PORT,S2650_CTRL_PORT, }, |
| 134 | | //{ S2650_DATA_PORT,S2650_DATA_PORT, }, |
| 135 | | AM_RANGE( S2650_SENSE_PORT,S2650_SENSE_PORT) AM_READ( arcadia_vsync_r) |
| 136 | | ADDRESS_MAP_END |
| 137 | | |
| 138 | | /* The Emerson Arcadia 2001 controllers have 2 fire buttons on the side, |
| 139 | | but actually they are wired to keypad button #2. The following definitions |
| 140 | | are meant to document this fact. The keypad has the following layout: |
| 141 | | |
| 142 | | 1 2 3 |
| 143 | | 4 5 6 |
| 144 | | 7 8 9 |
| 145 | | Cl 0 En */ |
| 146 | | |
| 147 | | static INPUT_PORTS_START( arcadia ) |
| 148 | | PORT_START("panel") |
| 149 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START ) PORT_NAME("Start") |
| 150 | | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Option") PORT_CODE(KEYCODE_O) |
| 151 | | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_NAME("Select") |
| 152 | | // PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Reset") PORT_CODE(KEYCODE_R) Not implemented |
| 153 | | |
| 154 | | PORT_START("controller1_col1") |
| 155 | | PORT_BIT( 0xf0, 0xf0, IPT_UNUSED) |
| 156 | | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 1") PORT_CODE(KEYCODE_1_PAD) |
| 157 | | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 4") PORT_CODE(KEYCODE_4_PAD) |
| 158 | | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 7") PORT_CODE(KEYCODE_7_PAD) |
| 159 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad Clear") PORT_CODE(KEYCODE_MINUS_PAD) |
| 160 | | |
| 161 | | PORT_START("controller1_col2") |
| 162 | | PORT_BIT( 0xf0, 0xf0, IPT_UNUSED) |
| 163 | | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 2/Button") PORT_CODE(KEYCODE_2_PAD) |
| 164 | | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 5") PORT_CODE(KEYCODE_5_PAD) |
| 165 | | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 8") PORT_CODE(KEYCODE_8_PAD) |
| 166 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 0") PORT_CODE(KEYCODE_0_PAD) |
| 167 | | |
| 168 | | PORT_START("controller1_col3") |
| 169 | | PORT_BIT( 0xf0, 0xf0, IPT_UNUSED) |
| 170 | | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 3") PORT_CODE(KEYCODE_3_PAD) |
| 171 | | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 6") PORT_CODE(KEYCODE_6_PAD) |
| 172 | | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 9") PORT_CODE(KEYCODE_9_PAD) |
| 173 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad Enter") PORT_CODE(KEYCODE_PLUS_PAD) |
| 174 | | |
| 175 | | PORT_START("controller1_extra") |
| 176 | | PORT_BIT( 0xff, 0xf0, IPT_UNUSED) // used in palladium |
| 177 | | |
| 178 | | PORT_START("controller2_col1") |
| 179 | | PORT_BIT( 0xf0, 0xf0, IPT_UNUSED) |
| 180 | | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 1") PORT_CODE(KEYCODE_Z) |
| 181 | | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 4") PORT_CODE(KEYCODE_A) |
| 182 | | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 7") PORT_CODE(KEYCODE_Q) |
| 183 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad Clear") PORT_CODE(KEYCODE_V) |
| 184 | | |
| 185 | | PORT_START("controller2_col2") |
| 186 | | PORT_BIT( 0xf0, 0xf0, IPT_UNUSED) |
| 187 | | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 2/Button") PORT_CODE(KEYCODE_X) |
| 188 | | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 5") PORT_CODE(KEYCODE_S) |
| 189 | | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 8") PORT_CODE(KEYCODE_W) |
| 190 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 0") PORT_CODE(KEYCODE_F) |
| 191 | | |
| 192 | | PORT_START("controller2_col3") |
| 193 | | PORT_BIT( 0xf0, 0xf0, IPT_UNUSED) |
| 194 | | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 3") PORT_CODE(KEYCODE_C) |
| 195 | | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 6") PORT_CODE(KEYCODE_D) |
| 196 | | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 9") PORT_CODE(KEYCODE_E) |
| 197 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad Enter") PORT_CODE(KEYCODE_R) |
| 198 | | |
| 199 | | PORT_START("controller2_extra") |
| 200 | | PORT_BIT( 0xff, 0xf0, IPT_UNUSED) // used in palladium |
| 201 | | |
| 202 | | /* FIXME: the joystick are analog - the actual definition is merely an hack */ |
| 203 | | |
| 204 | | #if 0 |
| 205 | | // auto centering too slow, so only using 5 bits, and scaling at videoside |
| 206 | | PORT_START("controller1_joy_x") |
| 207 | | PORT_BIT( 0x1fe,0x10,IPT_AD_STICK_X) |
| 208 | | PORT_SENSITIVITY(1) |
| 209 | | PORT_KEYDELTA(2000) |
| 210 | | PORT_MINMAX(0,0x1f) |
| 211 | | PORT_CODE_DEC(KEYCODE_LEFT) |
| 212 | | PORT_CODE_INC(KEYCODE_RIGHT) |
| 213 | | PORT_CODE_DEC(JOYCODE_1_LEFT) |
| 214 | | PORT_CODE_INC(JOYCODE_1_RIGHT) |
| 215 | | PORT_PLAYER(1) |
| 216 | | PORT_RESET |
| 217 | | |
| 218 | | PORT_START("controller1_joy_y") |
| 219 | | PORT_BIT( 0x1fe,0x10,IPT_AD_STICK_Y) |
| 220 | | PORT_SENSITIVITY(1) |
| 221 | | PORT_KEYDELTA(2000) |
| 222 | | PORT_MINMAX(0,0x1f) |
| 223 | | PORT_CODE_DEC(KEYCODE_UP) |
| 224 | | PORT_CODE_INC(KEYCODE_DOWN) |
| 225 | | PORT_CODE_DEC(JOYCODE_1_UP) |
| 226 | | PORT_CODE_INC(JOYCODE_1_DOWN) |
| 227 | | PORT_PLAYER(1) |
| 228 | | PORT_RESET |
| 229 | | |
| 230 | | PORT_START("controller2_joy_x") |
| 231 | | PORT_BIT( 0x1ff,0x10,IPT_AD_STICK_X) |
| 232 | | PORT_SENSITIVITY(100) |
| 233 | | PORT_KEYDELTA(10) |
| 234 | | PORT_MINMAX(0,0x1f) |
| 235 | | PORT_CODE_DEC(KEYCODE_DEL) |
| 236 | | PORT_CODE_INC(KEYCODE_PGDN) |
| 237 | | PORT_CODE_DEC(JOYCODE_2_LEFT) |
| 238 | | PORT_CODE_INC(JOYCODE_2_RIGHT) |
| 239 | | PORT_PLAYER(2) |
| 240 | | PORT_RESET |
| 241 | | |
| 242 | | PORT_START("controller2_joy_y") |
| 243 | | PORT_BIT( 0x1ff,0x10,IPT_AD_STICK_Y) |
| 244 | | PORT_SENSITIVITY(100) |
| 245 | | PORT_KEYDELTA(10) |
| 246 | | PORT_MINMAX(0,0x1f) |
| 247 | | PORT_CODE_DEC(KEYCODE_HOME) |
| 248 | | PORT_CODE_INC(KEYCODE_END) |
| 249 | | PORT_CODE_DEC(JOYCODE_2_UP) |
| 250 | | PORT_CODE_INC(JOYCODE_2_DOWN) |
| 251 | | PORT_PLAYER(2) |
| 252 | | PORT_RESET |
| 253 | | #else |
| 254 | | PORT_START("joysticks") |
| 255 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_8WAY |
| 256 | | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_8WAY |
| 257 | | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_8WAY |
| 258 | | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_8WAY |
| 259 | | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_8WAY |
| 260 | | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_8WAY |
| 261 | | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_8WAY |
| 262 | | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_8WAY |
| 263 | | #endif |
| 264 | | INPUT_PORTS_END |
| 265 | | |
| 266 | | /* The Palladium Video-Computer-Game controllers have no fire buttons on their side |
| 267 | | but have a 16 keys unlabeled keypad. The keys are fully independent and layed out |
| 268 | | according to this weird scheme, which keeps backward compatibility to Arcadia 2001's |
| 269 | | electrical wiring. |
| 270 | | |
| 271 | | 2 |
| 272 | | 13 14 15 |
| 273 | | 1 16 3 |
| 274 | | 4 5 6 |
| 275 | | 7 8 9 |
| 276 | | 10 11 12 */ |
| 277 | | |
| 278 | | static INPUT_PORTS_START( plldium ) |
| 279 | | PORT_START("panel") |
| 280 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START ) PORT_NAME("Start") |
| 281 | | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_NAME("Selector A") |
| 282 | | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Selector B") PORT_CODE(KEYCODE_O) |
| 283 | | // PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Reset") PORT_CODE(KEYCODE_R) Not implemented |
| 284 | | |
| 285 | | PORT_START("controller1_col1") |
| 286 | | PORT_BIT( 0xf0, 0xf0, IPT_UNUSED) // some bits must be high |
| 287 | | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 1") PORT_CODE(KEYCODE_1_PAD) |
| 288 | | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 4") PORT_CODE(KEYCODE_4_PAD) |
| 289 | | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 7") PORT_CODE(KEYCODE_7_PAD) |
| 290 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 10") PORT_CODE(KEYCODE_MINUS_PAD) |
| 291 | | |
| 292 | | PORT_START("controller1_col2") |
| 293 | | PORT_BIT( 0xf0, 0xf0, IPT_UNUSED) |
| 294 | | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 2/Button") PORT_CODE(KEYCODE_2_PAD) |
| 295 | | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 5") PORT_CODE(KEYCODE_5_PAD) |
| 296 | | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 8") PORT_CODE(KEYCODE_8_PAD) |
| 297 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 11") PORT_CODE(KEYCODE_0_PAD) |
| 298 | | |
| 299 | | PORT_START("controller1_col3") |
| 300 | | PORT_BIT( 0xf0, 0xf0, IPT_UNUSED) |
| 301 | | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 3") PORT_CODE(KEYCODE_3_PAD) |
| 302 | | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 6") PORT_CODE(KEYCODE_6_PAD) |
| 303 | | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 9") PORT_CODE(KEYCODE_9_PAD) |
| 304 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 12") PORT_CODE(KEYCODE_PLUS_PAD) |
| 305 | | |
| 306 | | PORT_START("controller1_extra") |
| 307 | | PORT_BIT( 0xf0, 0xf0, IPT_UNUSED) |
| 308 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 13") PORT_CODE(KEYCODE_ENTER_PAD) |
| 309 | | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 14") PORT_CODE(KEYCODE_SLASH_PAD) |
| 310 | | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 15") PORT_CODE(KEYCODE_ASTERISK) |
| 311 | | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 16") PORT_CODE(KEYCODE_DEL_PAD) |
| 312 | | |
| 313 | | PORT_START("controller2_col1") |
| 314 | | PORT_BIT( 0xf0, 0xf0, IPT_UNUSED) |
| 315 | | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 1") PORT_CODE(KEYCODE_Z) |
| 316 | | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 4") PORT_CODE(KEYCODE_A) |
| 317 | | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 7") PORT_CODE(KEYCODE_Q) |
| 318 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 10") PORT_CODE(KEYCODE_V) |
| 319 | | |
| 320 | | PORT_START("controller2_col2") |
| 321 | | PORT_BIT( 0xf0, 0xf0, IPT_UNUSED) |
| 322 | | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 2/Button") PORT_CODE(KEYCODE_X) |
| 323 | | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 5") PORT_CODE(KEYCODE_S) |
| 324 | | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 8") PORT_CODE(KEYCODE_W) |
| 325 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 11") PORT_CODE(KEYCODE_F) |
| 326 | | |
| 327 | | PORT_START("controller2_col3") |
| 328 | | PORT_BIT( 0xf0, 0xf0, IPT_UNUSED) |
| 329 | | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 3") PORT_CODE(KEYCODE_C) |
| 330 | | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 6") PORT_CODE(KEYCODE_D) |
| 331 | | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 9") PORT_CODE(KEYCODE_E) |
| 332 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 12") PORT_CODE(KEYCODE_R) |
| 333 | | |
| 334 | | PORT_START("controller2_extra") |
| 335 | | PORT_BIT( 0xf0, 0xf0, IPT_UNUSED) |
| 336 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 13") PORT_CODE(KEYCODE_B) |
| 337 | | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 14") PORT_CODE(KEYCODE_G) |
| 338 | | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 15") PORT_CODE(KEYCODE_T) |
| 339 | | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 16") PORT_CODE(KEYCODE_H) |
| 340 | | |
| 341 | | /* FIXME: the joystick are analog - the actual definition is merely an hack */ |
| 342 | | |
| 343 | | #if 0 |
| 344 | | // auto centering too slow, so only using 5 bits, and scaling at videoside |
| 345 | | PORT_START("controller1_joy_x") |
| 346 | | PORT_BIT( 0x1fe,0x10,IPT_AD_STICK_X) |
| 347 | | PORT_SENSITIVITY(1) |
| 348 | | PORT_KEYDELTA(2000) |
| 349 | | PORT_MINMAX(0,0x1f) |
| 350 | | PORT_CODE_DEC(KEYCODE_LEFT) |
| 351 | | PORT_CODE_INC(KEYCODE_RIGHT) |
| 352 | | PORT_CODE_DEC(JOYCODE_1_LEFT) |
| 353 | | PORT_CODE_INC(JOYCODE_1_RIGHT) |
| 354 | | PORT_PLAYER(1) |
| 355 | | PORT_RESET |
| 356 | | |
| 357 | | PORT_START("controller1_joy_y") |
| 358 | | PORT_BIT( 0x1fe,0x10,IPT_AD_STICK_Y) |
| 359 | | PORT_SENSITIVITY(1) |
| 360 | | PORT_KEYDELTA(2000) |
| 361 | | PORT_MINMAX(0,0x1f) |
| 362 | | PORT_CODE_DEC(KEYCODE_UP) |
| 363 | | PORT_CODE_INC(KEYCODE_DOWN) |
| 364 | | PORT_CODE_DEC(JOYCODE_1_UP) |
| 365 | | PORT_CODE_INC(JOYCODE_1_DOWN) |
| 366 | | PORT_PLAYER(1) |
| 367 | | PORT_RESET |
| 368 | | |
| 369 | | PORT_START("controller2_joy_x") |
| 370 | | PORT_BIT( 0x1ff,0x10,IPT_AD_STICK_X) |
| 371 | | PORT_SENSITIVITY(100) |
| 372 | | PORT_KEYDELTA(10) |
| 373 | | PORT_MINMAX(0,0x1f) |
| 374 | | PORT_CODE_DEC(KEYCODE_DEL) |
| 375 | | PORT_CODE_INC(KEYCODE_PGDN) |
| 376 | | PORT_CODE_DEC(JOYCODE_2_LEFT) |
| 377 | | PORT_CODE_INC(JOYCODE_2_RIGHT) |
| 378 | | PORT_PLAYER(2) |
| 379 | | PORT_RESET |
| 380 | | |
| 381 | | PORT_START("controller2_joy_y") |
| 382 | | PORT_BIT( 0x1ff,0x10,IPT_AD_STICK_Y) |
| 383 | | PORT_SENSITIVITY(100) |
| 384 | | PORT_KEYDELTA(10) |
| 385 | | PORT_MINMAX(0,0x1f) |
| 386 | | PORT_CODE_DEC(KEYCODE_HOME) |
| 387 | | PORT_CODE_INC(KEYCODE_END) |
| 388 | | PORT_CODE_DEC(JOYCODE_2_UP) |
| 389 | | PORT_CODE_INC(JOYCODE_2_DOWN) |
| 390 | | PORT_PLAYER(2) |
| 391 | | PORT_RESET |
| 392 | | #else |
| 393 | | PORT_START("joysticks") |
| 394 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_8WAY |
| 395 | | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_8WAY |
| 396 | | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_8WAY |
| 397 | | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_8WAY |
| 398 | | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_8WAY |
| 399 | | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_8WAY |
| 400 | | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_8WAY |
| 401 | | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_8WAY |
| 402 | | #endif |
| 403 | | INPUT_PORTS_END |
| 404 | | |
| 405 | | static const gfx_layout arcadia_charlayout = |
| 406 | | { |
| 407 | | 8, /*width*/ |
| 408 | | 1, /*height*/ |
| 409 | | 256, /* 256 characters */ |
| 410 | | 1, /* 1 bits per pixel */ |
| 411 | | { 0 }, /* no bitplanes; 1 bit per pixel */ |
| 412 | | { 0, 1, 2, 3, 4, 5, 6, 7 }, /* x offsets */ |
| 413 | | { 0 }, /* y offsets */ |
| 414 | | 1*8 |
| 415 | | }; |
| 416 | | |
| 417 | | static GFXDECODE_START( arcadia ) |
| 418 | | GFXDECODE_ENTRY( "gfx1", 0x0000, arcadia_charlayout, 0, 68 ) |
| 419 | | GFXDECODE_END |
| 420 | | |
| 421 | | static const rgb_t arcadia_colors[] = |
| 422 | | { |
| 423 | | RGB_WHITE, /* white */ |
| 424 | | MAKE_RGB(0xff, 0xff, 0x00), /* yellow */ |
| 425 | | MAKE_RGB(0x00, 0xff, 0xff), /* cyan */ |
| 426 | | MAKE_RGB(0x00, 0xff, 0x00), /* green */ |
| 427 | | MAKE_RGB(0xff, 0x00, 0xff), /* magenta */ |
| 428 | | MAKE_RGB(0xff, 0x00, 0x00), /* red */ |
| 429 | | MAKE_RGB(0x00, 0x00, 0xff), /* blue */ |
| 430 | | RGB_BLACK /* black */ |
| 431 | | }; |
| 432 | | |
| 433 | | static const unsigned short arcadia_palette[128+8] = /* bgnd, fgnd */ |
| 434 | | { |
| 435 | | 0,1,2,3,4,5,6,7, |
| 436 | | |
| 437 | | 0,0, 0,1, 0,2, 0,3, 0,4, 0,5, 0,6, 0,7, |
| 438 | | 1,0, 1,1, 1,2, 1,3, 1,4, 1,5, 1,6, 1,7, |
| 439 | | 2,0, 2,1, 2,2, 2,3, 2,4, 2,5, 2,6, 2,7, |
| 440 | | 3,0, 3,1, 3,2, 3,3, 3,4, 3,5, 3,6, 3,7, |
| 441 | | 4,0, 4,1, 4,2, 4,3, 4,4, 4,5, 4,6, 4,7, |
| 442 | | 5,0, 5,1, 5,2, 5,3, 5,4, 5,5, 5,6, 5,7, |
| 443 | | 6,0, 6,1, 6,2, 6,3, 6,4, 6,5, 6,6, 6,7, |
| 444 | | 7,0, 7,1, 7,2, 7,3, 7,4, 7,5, 7,6, 7,7 |
| 445 | | }; |
| 446 | | |
| 447 | | static PALETTE_INIT( arcadia ) |
| 448 | | { |
| 449 | | int i; |
| 450 | | |
| 451 | | machine.colortable = colortable_alloc(machine, 8); |
| 452 | | |
| 453 | | for (i = 0; i < 8; i++) |
| 454 | | colortable_palette_set_color(machine.colortable, i, arcadia_colors[i]); |
| 455 | | |
| 456 | | for (i = 0; i < 128+8; i++) |
| 457 | | colortable_entry_set_value(machine.colortable, i, arcadia_palette[i]); |
| 458 | | } |
| 459 | | |
| 460 | | static DEVICE_IMAGE_LOAD( arcadia_cart ) |
| 461 | | { |
| 462 | | UINT8 *rom = image.device().machine().region("maincpu")->base(); |
| 463 | | int size; |
| 464 | | |
| 465 | | memset(rom, 0, 0x8000); |
| 466 | | if (image.software_entry() == NULL) |
| 467 | | { |
| 468 | | size = image.length(); |
| 469 | | |
| 470 | | if (size > image.device().machine().region("maincpu")->bytes()) |
| 471 | | size = image.device().machine().region("maincpu")->bytes(); |
| 472 | | |
| 473 | | if (image.fread(rom, size) != size) |
| 474 | | return IMAGE_INIT_FAIL; |
| 475 | | } |
| 476 | | else |
| 477 | | { |
| 478 | | size = image.get_software_region_length("rom"); |
| 479 | | memcpy(rom, image.get_software_region("rom"), size); |
| 480 | | } |
| 481 | | |
| 482 | | if (size > 0x1000) |
| 483 | | memmove(rom + 0x2000, rom + 0x1000, size - 0x1000); |
| 484 | | |
| 485 | | if (size > 0x2000) |
| 486 | | memmove(rom + 0x4000, rom + 0x3000, size - 0x2000); |
| 487 | | |
| 488 | | #if 1 |
| 489 | | // golf cartridge support |
| 490 | | // 4kbyte at 0x0000 |
| 491 | | // 2kbyte at 0x4000 |
| 492 | | if (size <= 0x2000) |
| 493 | | memcpy(rom + 0x4000, rom + 0x2000, 0x1000); |
| 494 | | #else |
| 495 | | /* this is a testpatch for the golf cartridge |
| 496 | | so it could be burned in a arcadia 2001 cartridge |
| 497 | | activate it and use debugger to save patched version */ |
| 498 | | // not enough yet (some pointers stored as data?) |
| 499 | | int i; |
| 500 | | static const struct { UINT16 address; UINT8 old; UINT8 new; } |
| 501 | | patch[]= { |
| 502 | | { 0x0077,0x40,0x20 }, |
| 503 | | { 0x011e,0x40,0x20 }, |
| 504 | | { 0x0348,0x40,0x20 }, |
| 505 | | { 0x03be,0x40,0x20 }, |
| 506 | | { 0x04ce,0x40,0x20 }, |
| 507 | | { 0x04da,0x40,0x20 }, |
| 508 | | { 0x0562,0x42,0x22 }, |
| 509 | | { 0x0617,0x40,0x20 }, |
| 510 | | { 0x0822,0x40,0x20 }, |
| 511 | | { 0x095e,0x42,0x22 }, |
| 512 | | { 0x09d3,0x42,0x22 }, |
| 513 | | { 0x0bb0,0x42,0x22 }, |
| 514 | | { 0x0efb,0x40,0x20 }, |
| 515 | | { 0x0ec1,0x43,0x23 }, |
| 516 | | { 0x0f00,0x40,0x20 }, |
| 517 | | { 0x0f12,0x40,0x20 }, |
| 518 | | { 0x0ff5,0x43,0x23 }, |
| 519 | | { 0x0ff7,0x41,0x21 }, |
| 520 | | { 0x0ff9,0x40,0x20 }, |
| 521 | | { 0x0ffb,0x41,0x21 }, |
| 522 | | { 0x20ec,0x42,0x22 } |
| 523 | | }; |
| 524 | | |
| 525 | | for (i = 0; i < ARRAY_LENGTH(patch); i++) |
| 526 | | { |
| 527 | | assert(rom[patch[i].address] == patch[i].old); |
| 528 | | rom[patch[i].address] = patch[i].new; |
| 529 | | } |
| 530 | | #endif |
| 531 | | return IMAGE_INIT_PASS; |
| 532 | | } |
| 533 | | |
| 534 | | static MACHINE_CONFIG_START( arcadia, arcadia_state ) |
| 535 | | /* basic machine hardware */ |
| 536 | | MCFG_CPU_ADD("maincpu", S2650, 3580000/4) /* 0.895 MHz */ |
| 537 | | MCFG_CPU_PROGRAM_MAP(arcadia_mem) |
| 538 | | MCFG_CPU_IO_MAP(arcadia_io) |
| 539 | | MCFG_CPU_PERIODIC_INT(arcadia_video_line, 262*60) |
| 540 | | MCFG_QUANTUM_TIME(attotime::from_hz(60)) |
| 541 | | |
| 542 | | /* video hardware */ |
| 543 | | MCFG_SCREEN_ADD("screen", RASTER) |
| 544 | | MCFG_SCREEN_REFRESH_RATE(60) |
| 545 | | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) |
| 546 | | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 547 | | MCFG_SCREEN_SIZE(128+2*XPOS, 262) |
| 548 | | MCFG_SCREEN_VISIBLE_AREA(0, 2*XPOS+128-1, 0, 262-1) |
| 549 | | MCFG_SCREEN_UPDATE( arcadia ) |
| 550 | | |
| 551 | | MCFG_GFXDECODE( arcadia ) |
| 552 | | MCFG_PALETTE_LENGTH(ARRAY_LENGTH(arcadia_palette)) |
| 553 | | MCFG_PALETTE_INIT( arcadia ) |
| 554 | | |
| 555 | | MCFG_VIDEO_START( arcadia ) |
| 556 | | |
| 557 | | /* sound hardware */ |
| 558 | | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 559 | | MCFG_SOUND_ADD("custom", ARCADIA, 0) |
| 560 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 561 | | |
| 562 | | /* cartridge */ |
| 563 | | MCFG_CARTSLOT_ADD("cart") |
| 564 | | MCFG_CARTSLOT_EXTENSION_LIST("bin") |
| 565 | | MCFG_CARTSLOT_NOT_MANDATORY |
| 566 | | MCFG_CARTSLOT_INTERFACE("arcadia_cart") |
| 567 | | MCFG_CARTSLOT_LOAD(arcadia_cart) |
| 568 | | |
| 569 | | /* Software lists */ |
| 570 | | MCFG_SOFTWARE_LIST_ADD("cart_list","arcadia") |
| 571 | | MACHINE_CONFIG_END |
| 572 | | |
| 573 | | ROM_START(advsnha) |
| 574 | | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 575 | | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 576 | | ROM_END |
| 577 | | |
| 578 | | ROM_START(bndarc) |
| 579 | | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 580 | | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 581 | | ROM_END |
| 582 | | |
| 583 | | ROM_START(arcadia) |
| 584 | | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 585 | | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 586 | | ROM_END |
| 587 | | |
| 588 | | ROM_START(tccosmos) |
| 589 | | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 590 | | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 591 | | ROM_END |
| 592 | | |
| 593 | | ROM_START(dynavisn) |
| 594 | | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 595 | | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 596 | | ROM_END |
| 597 | | |
| 598 | | ROM_START(ekusera) |
| 599 | | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 600 | | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 601 | | ROM_END |
| 602 | | |
| 603 | | ROM_START(hanihac) |
| 604 | | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 605 | | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 606 | | ROM_END |
| 607 | | |
| 608 | | ROM_START(hmg2650) |
| 609 | | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 610 | | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 611 | | ROM_END |
| 612 | | |
| 613 | | ROM_START(intmpt03) |
| 614 | | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 615 | | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 616 | | ROM_END |
| 617 | | |
| 618 | | ROM_START(ixl2000) |
| 619 | | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 620 | | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 621 | | ROM_END |
| 622 | | |
| 623 | | ROM_START(intervsn) |
| 624 | | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 625 | | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 626 | | ROM_END |
| 627 | | |
| 628 | | ROM_START(itmcmtp3) |
| 629 | | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 630 | | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 631 | | ROM_END |
| 632 | | |
| 633 | | ROM_START(lvision) |
| 634 | | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 635 | | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 636 | | ROM_END |
| 637 | | |
| 638 | | ROM_START(leonardo) |
| 639 | | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 640 | | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 641 | | ROM_END |
| 642 | | |
| 643 | | ROM_START(mratlus) |
| 644 | | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 645 | | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 646 | | ROM_END |
| 647 | | |
| 648 | | ROM_START(ormatu) |
| 649 | | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 650 | | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 651 | | ROM_END |
| 652 | | |
| 653 | | ROM_START(plldium) |
| 654 | | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 655 | | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 656 | | ROM_END |
| 657 | | |
| 658 | | ROM_START(polyvcg) |
| 659 | | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 660 | | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 661 | | ROM_END |
| 662 | | |
| 663 | | ROM_START(poppympt) |
| 664 | | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 665 | | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 666 | | ROM_END |
| 667 | | |
| 668 | | ROM_START(prestmpt) |
| 669 | | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 670 | | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 671 | | ROM_END |
| 672 | | |
| 673 | | ROM_START(rowtrn2k) |
| 674 | | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 675 | | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 676 | | ROM_END |
| 677 | | |
| 678 | | ROM_START(tvg2000) |
| 679 | | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 680 | | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 681 | | ROM_END |
| 682 | | |
| 683 | | ROM_START(sheenhvc) |
| 684 | | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 685 | | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 686 | | ROM_END |
| 687 | | |
| 688 | | ROM_START(soundic) |
| 689 | | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 690 | | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 691 | | ROM_END |
| 692 | | |
| 693 | | ROM_START(telefevr) |
| 694 | | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 695 | | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 696 | | ROM_END |
| 697 | | |
| 698 | | ROM_START(tempestm) |
| 699 | | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 700 | | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 701 | | ROM_END |
| 702 | | |
| 703 | | ROM_START(tbbympt3) |
| 704 | | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 705 | | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 706 | | ROM_END |
| 707 | | |
| 708 | | ROM_START(trakcvg) |
| 709 | | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 710 | | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 711 | | ROM_END |
| 712 | | |
| 713 | | ROM_START(tunixha) |
| 714 | | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 715 | | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 716 | | ROM_END |
| 717 | | |
| 718 | | ROM_START(tryomvgc) |
| 719 | | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 720 | | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 721 | | ROM_END |
| 722 | | |
| 723 | | ROM_START(orbituvi) |
| 724 | | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 725 | | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 726 | | ROM_END |
| 727 | | |
| 728 | | ROM_START(vdmaster) |
| 729 | | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 730 | | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 731 | | ROM_END |
| 732 | | |
| 733 | | |
| 734 | | /*************************************************************************** |
| 735 | | |
| 736 | | Game driver(s) |
| 737 | | |
| 738 | | ***************************************************************************/ |
| 739 | | |
| 740 | | static DRIVER_INIT( arcadia ) |
| 741 | | { |
| 742 | | int i; |
| 743 | | UINT8 *gfx=machine.region("gfx1")->base(); |
| 744 | | for (i=0; i<256; i++) gfx[i]=i; |
| 745 | | #if 0 |
| 746 | | // this is here to allow developement of some simple testroutines |
| 747 | | // for a real console |
| 748 | | { |
| 749 | | UINT8 *rom=machine.region("maincpu")->base(); |
| 750 | | /* this is a simple routine to display all rom characters |
| 751 | | on the display for a snapshot */ |
| 752 | | static const UINT8 prog[]={ // address 0 of course |
| 753 | | 0x20, // eorz, 0 |
| 754 | | 0x1b, 0x01, // bctr,a $0004 |
| 755 | | 0x17, // retc a |
| 756 | | 0x76, 0x20, // ppsu ii |
| 757 | | |
| 758 | | // fill screen |
| 759 | | 0x04, 0x00, // lodi,0 0 |
| 760 | | 0x04|1, 0x00, // lodi,1 0 |
| 761 | | 0xcc|1, 0x78, 0x10, //a: stra,0 $1800,r1 |
| 762 | | 0x75,9, //cpsl wc|c |
| 763 | | 0x84,0x41, // addi,0 0x41 |
| 764 | | 0x75,9, //cpsl wc|c |
| 765 | | 0x84|1, 0x01, // addi,1 1 |
| 766 | | 0xe4|1, 0x40, // comi,1 40 |
| 767 | | 0x98, 0x80-15, // bcfr,0 a |
| 768 | | |
| 769 | | 0x04, 0xff, // lodi,0 7 |
| 770 | | 0xcc, 0x18, 0xfc, // stra,0 $19f8 |
| 771 | | 0x04, 0x00, // lodi,0 7 |
| 772 | | 0xcc, 0x18, 0xfd, // stra,0 $18fd |
| 773 | | 0x04, 0x07, // lodi,0 7 |
| 774 | | 0xcc, 0x19, 0xf9, // stra,0 $19f9 |
| 775 | | |
| 776 | | 0x04, 0x00, // lodi,0 7 |
| 777 | | 0xcc, 0x19, 0xbe, // stra,0 $19bf |
| 778 | | 0x04, 0x00, // lodi,0 7 |
| 779 | | 0xcc, 0x19, 0xbf, // stra,0 $19bf |
| 780 | | |
| 781 | | //loop: 0x0021 |
| 782 | | // print keyboards |
| 783 | | 0x04|1, 0x00, //y:lodi,1 0 |
| 784 | | 0x0c|1, 0x79, 0x00, //x: ldra,0 1900,r1 |
| 785 | | 0x44|0, 0x0f, //andi,0 0f |
| 786 | | 0x64|0, 0x10, //ori,0 10 |
| 787 | | 0xcc|1, 0x78, 0x01, //stra,0 1840,r1 |
| 788 | | 0x75,9, //cpsl wc|c |
| 789 | | 0x84|1, 0x01, //addi,1 1 |
| 790 | | 0xe4|1, 0x09, //comi,1 9 |
| 791 | | 0x98, 0x80-18, //bcfr,0 x |
| 792 | | |
| 793 | | // cycle colors |
| 794 | | 0x0c|1, 0x19, 0x00, //ldra,1 1900 |
| 795 | | 0x44|1, 0xf, //andi,0 0f |
| 796 | | 0xe4|1, 1, //comi,1 1 |
| 797 | | 0x98, +10, //bcfr,0 c |
| 798 | | 0x0c, 0x19, 0xbf,//ldra,0 19f9,0 |
| 799 | | 0x84, 1, //addi,0 1 |
| 800 | | 0xcc, 0x19, 0xbf, //stra,0 19f9,0 |
| 801 | | 0x18|3, 12, // bctr,a |
| 802 | | 0xe4|1, 2, //c:comi,1 2 |
| 803 | | 0x98, +10, //bcfr,0 d |
| 804 | | 0x0c, 0x19, 0xbf, //ldra,0 19f9,0 |
| 805 | | 0x84, 8, //addi,0 8 |
| 806 | | 0xcc, 0x19, 0xbf, //stra,0 19f9,0 |
| 807 | | 0x18|3, 12, // bctr,a |
| 808 | | |
| 809 | | // cycle colors |
| 810 | | 0xe4|1, 4, //comi,1 4 |
| 811 | | 0x98, +10, //bcfr,0 c |
| 812 | | 0x0c, 0x19, 0xbe,//ldra,0 19f9,0 |
| 813 | | 0x84, 1, //addi,0 1 |
| 814 | | 0xcc, 0x19, 0xbe, //stra,0 19f9,0 |
| 815 | | 0x18|3, 12, // bctr,a |
| 816 | | 0xe4|1, 8, //c:comi,1 2 |
| 817 | | 0x98, +8+9, //bcfr,0 d |
| 818 | | 0x0c, 0x19, 0xbe, //ldra,0 19f9,0 |
| 819 | | 0x84, 8, //addi,0 8 |
| 820 | | 0xcc, 0x19, 0xbe, //stra,0 19f9,0 |
| 821 | | |
| 822 | | 0x0c, 0x19, 0x00, //b: ldra,0 1900 |
| 823 | | 0x44|0, 0xf, //andi,0 0f |
| 824 | | 0xe4, 0, //comi,0 0 |
| 825 | | 0x98, 0x80-9, //bcfr,0 b |
| 826 | | |
| 827 | | 0x0c, 0x19, 0xbe, //ldra,0 19bf |
| 828 | | 0xcc, 0x19, 0xf8, //stra,0 19f8 |
| 829 | | 0x0c, 0x19, 0xbf, //ldra,0 19bf |
| 830 | | 0xcc, 0x19, 0xf9, //stra,0 19f8 |
| 831 | | |
| 832 | | 0x0c, 0x19, 0xbe, //ldra,0 17ff |
| 833 | | 0x44|0, 0xf, //andi,0 7 |
| 834 | | 0x64|0, 0x10, //ori,0 10 |
| 835 | | 0xcc, 0x18, 0x0d, //stra,0 180f |
| 836 | | 0x0c, 0x19, 0xbe, //x: ldra,0 19bf |
| 837 | | 0x50, 0x50, 0x50, 0x50, //shr,0 4 |
| 838 | | 0x44|0, 0xf, //andi,0 7 |
| 839 | | 0x64|0, 0x10, //ori,0 10 |
| 840 | | 0xcc, 0x18, 0x0c, //stra,0 180e |
| 841 | | |
| 842 | | 0x0c, 0x19, 0xbf, //ldra,0 17ff |
| 843 | | 0x44|0, 0xf, //andi,0 7 |
| 844 | | 0x64|0, 0x10, //ori,0 10 |
| 845 | | 0xcc, 0x18, 0x0f, //stra,0 180f |
| 846 | | 0x0c, 0x19, 0xbf, //x: ldra,0 19bf |
| 847 | | 0x50, 0x50, 0x50, 0x50, //shr,0 4 |
| 848 | | 0x44|0, 0xf, //andi,0 7 |
| 849 | | 0x64|0, 0x10, //ori,0 10 |
| 850 | | 0xcc, 0x18, 0x0e, //stra,0 180e |
| 851 | | |
| 852 | | 0x0c, 0x18, 0x00, //ldra,0 1800 |
| 853 | | 0x84, 1, //addi,0 1 |
| 854 | | 0xcc, 0x18, 0x00, //stra,0 1800 |
| 855 | | |
| 856 | | // 0x1b, 0x80-20-29-26-9-8-2 // bctr,a y |
| 857 | | 0x1c|3, 0, 0x32, // bcta,3 loop |
| 858 | | |
| 859 | | // calling too many subdirectories causes cpu to reset! |
| 860 | | // bxa causes trap |
| 861 | | }; |
| 862 | | #if 1 |
| 863 | | FILE *f; |
| 864 | | f=fopen("chartest.bin","wb"); |
| 865 | | fwrite(prog, ARRAY_LENGTH(prog), sizeof(prog[0]), f); |
| 866 | | fclose(f); |
| 867 | | #endif |
| 868 | | for (i=0; i<ARRAY_LENGTH(prog); i++) rom[i]=prog[i]; |
| 869 | | |
| 870 | | } |
| 871 | | #endif |
| 872 | | } |
| 873 | | |
| 874 | | |
| 875 | | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */ |
| 876 | | CONS(1983, advsnha, arcadia, 0, arcadia, arcadia, arcadia, "Advision", "Advision Home Arcade", GAME_IMPERFECT_SOUND ) /* France */ |
| 877 | | CONS(1982, bndarc, arcadia, 0, arcadia, arcadia, arcadia, "Bandai", "Arcadia", GAME_IMPERFECT_SOUND ) /* Japan */ |
| 878 | | CONS(1982, arcadia, 0, 0, arcadia, arcadia, arcadia, "Emerson", "Arcadia 2001", GAME_IMPERFECT_SOUND ) /* U.S.A. */ |
| 879 | | CONS(198?, tccosmos, arcadia, 0, arcadia, arcadia, arcadia, "Mobilar?", "Tele-Computer Cosmos", GAME_IMPERFECT_SOUND ) /* Spain? I have only found pictures of a German Cosmos ( http://www.pong-picture-page.de/catalog/product_info.php?products_id=2170 ) */ |
| 880 | | CONS(1982, dynavisn, intmpt03, 0, arcadia, arcadia, arcadia, "Yamagiwa", "Dynavision", GAME_IMPERFECT_SOUND ) /* Japan */ |
| 881 | | CONS(1982, ekusera, intmpt03, 0, arcadia, arcadia, arcadia, "P.I.C", "Ekusera", GAME_IMPERFECT_SOUND ) /* Japan */ |
| 882 | | CONS(1982, hanihac, arcadia, 0, arcadia, arcadia, arcadia, "Hanimex", "Hanimex Home Arcade Centre", GAME_IMPERFECT_SOUND ) /* UK */ |
| 883 | | CONS(1982, hmg2650, arcadia, 0, arcadia, arcadia, arcadia, "Hanimex", "HMG-2650", GAME_IMPERFECT_SOUND ) /* Germany */ |
| 884 | | CONS(198?, intmpt03, 0, arcadia, arcadia, arcadia, arcadia, "Intelligent Game", "Intelligent Game MPT-03", GAME_IMPERFECT_SOUND ) /* U.S.A */ |
| 885 | | CONS(198?, ixl2000, arcadia, 0, arcadia, arcadia, arcadia, "Intercord", "Intercord XL 2000 System", GAME_IMPERFECT_SOUND ) /* Germany */ |
| 886 | | CONS(198?, intervsn, ormatu, 0, arcadia, arcadia, arcadia, "Intervision", "Intervision 2001", GAME_IMPERFECT_SOUND ) /* Switzerland */ |
| 887 | | CONS(198?, itmcmtp3, intmpt03, 0, arcadia, arcadia, arcadia, "ITMC", "ITMC MPT-03", GAME_IMPERFECT_SOUND ) /* France */ |
| 888 | | CONS(1982, lvision, arcadia, 0, arcadia, arcadia, arcadia, "Leisure-Dynamics", "Leisure-Vision", GAME_IMPERFECT_SOUND ) /* Canada */ |
| 889 | | CONS(1982, leonardo, arcadia, 0, arcadia, arcadia, arcadia, "GiG Electronics", "Leonardo", GAME_IMPERFECT_SOUND ) /* Italy */ |
| 890 | | CONS(1983, mratlus, plldium, 0, arcadia, arcadia, arcadia, "H.G.S.", "Mr. Altus Tele Brain", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* Germany */ |
| 891 | | CONS(198?, ormatu, 0, arcadia, arcadia, arcadia, arcadia, "Ormatu Electronics", "Ormatu 2001", GAME_IMPERFECT_SOUND ) /* Netherlands */ |
| 892 | | CONS(198?, plldium, 0, arcadia, arcadia, plldium, arcadia, "Neckermann", "Palladium Video-Computer-Game", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* Germany, 16 keys instead of 12 */ |
| 893 | | CONS(1983, polyvcg, plldium, 0, arcadia, arcadia, arcadia, "Polybrain", "Polybrain Video Computer Game", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* Germany */ |
| 894 | | CONS(198?, poppympt, intmpt03, 0, arcadia, arcadia, arcadia, "Transonic", "Poppy MPT-03 Tele Computer Spiel", GAME_IMPERFECT_SOUND ) /* Germany */ |
| 895 | | CONS(198?, prestmpt, intmpt03, 0, arcadia, arcadia, arcadia, "Prestige", "Prestige Video Computer Game MPT-03", GAME_IMPERFECT_SOUND ) /* France */ |
| 896 | | CONS(198?, rowtrn2k, intmpt03, 0, arcadia, arcadia, arcadia, "Rowtron", "Rowtron 2000", GAME_IMPERFECT_SOUND ) /* UK */ |
| 897 | | CONS(1982, tvg2000, arcadia, 0, arcadia, arcadia, arcadia, "Schmid", "Schmid TVG 2000", GAME_IMPERFECT_SOUND ) /* Germany */ |
| 898 | | CONS(198?, sheenhvc, ormatu, 0, arcadia, arcadia, arcadia, "Sheen", "Sheen Home Video Centre 2001", GAME_IMPERFECT_SOUND ) /* Australia */ |
| 899 | | CONS(198?, soundic, intmpt03, 0, arcadia, arcadia, arcadia, "Soundic", "Soundic MPT-03", GAME_IMPERFECT_SOUND ) /* Finland */ |
| 900 | | CONS(198?, telefevr, arcadia, 0, arcadia, arcadia, arcadia, "Tchibo", "Tele-Fever", GAME_IMPERFECT_SOUND ) /* Germany */ |
| 901 | | CONS(198?, tempestm, intmpt03, 0, arcadia, arcadia, arcadia, "Tempest", "Tempest MPT-03", GAME_IMPERFECT_SOUND ) /* Australia */ |
| 902 | | CONS(198?, tbbympt3, intmpt03, 0, arcadia, arcadia, arcadia, "Tobby", "Tobby MPT-03", GAME_IMPERFECT_SOUND ) /* ? */ |
| 903 | | CONS(198?, trakcvg, plldium, 0, arcadia, arcadia, arcadia, "Trakton", "Trakton Computer Video Game", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* Australia */ |
| 904 | | CONS(1982, tunixha, arcadia, 0, arcadia, arcadia, arcadia, "Monaco Leisure", "Tunix Home Arcade", GAME_IMPERFECT_SOUND ) /* New Zealand */ |
| 905 | | CONS(198?, tryomvgc, intmpt03, 0, arcadia, arcadia, arcadia, "Tryom", "Tryom Video Game Center", GAME_IMPERFECT_SOUND ) /* U.S.A */ |
| 906 | | CONS(198?, orbituvi, 0, arcadia, arcadia, arcadia, arcadia, "Orbit Electronics", "UVI Compu-Game", GAME_IMPERFECT_SOUND ) /* New Zealand */ |
| 907 | | CONS(198?, vdmaster, orbituvi, 0, arcadia, arcadia, arcadia, "Grandstand", "Video Master", GAME_IMPERFECT_SOUND ) /* New Zealand */ |
src/mess/drivers/ace.c
| r13301 | r13302 | |
| 1 | | /*************************************************************************** |
| 2 | | Jupiter Ace memory map |
| 3 | | |
| 4 | | CPU: Z80 |
| 5 | | 0000-1fff ROM |
| 6 | | 2000-23ff Mirror of 2400-27FF |
| 7 | | 2400-27ff RAM (1K RAM used for screen and edit/cassette buffer) |
| 8 | | 2800-2bff Mirror of 2C00-2FFF |
| 9 | | 2c00-2fff RAM (1K RAM for char set, write only) |
| 10 | | 3000-3bff Mirror of 3C00-3FFF |
| 11 | | 3c00-3fff RAM (1K RAM standard) |
| 12 | | 4000-7fff RAM (16K Expansion) |
| 13 | | 8000-ffff RAM (48K Expansion) |
| 14 | | |
| 15 | | Interrupts: |
| 16 | | |
| 17 | | IRQ: |
| 18 | | 50Hz vertical sync |
| 19 | | |
| 20 | | Ports: |
| 21 | | |
| 22 | | Out 0xfe: |
| 23 | | Tape and buzzer |
| 24 | | |
| 25 | | In 0xfe: |
| 26 | | Keyboard input, tape, and buzzer |
| 27 | | |
| 28 | | http://www.jupiter-ace.co.uk/ |
| 29 | | |
| 30 | | ***************************************************************************/ |
| 31 | | |
| 32 | | /* |
| 33 | | |
| 34 | | TODO: |
| 35 | | |
| 36 | | - Ace Colour Board |
| 37 | | - 96K ram expansion |
| 38 | | - Deep Thought disc interface (6850, 6821) |
| 39 | | |
| 40 | | */ |
| 41 | | |
| 42 | | #define ADDRESS_MAP_MODERN |
| 43 | | |
| 44 | | #include "emu.h" |
| 45 | | #include "cpu/z80/z80.h" |
| 46 | | #include "formats/ace_ace.h" |
| 47 | | #include "formats/ace_tap.h" |
| 48 | | #include "imagedev/cassette.h" |
| 49 | | #include "imagedev/snapquik.h" |
| 50 | | #include "machine/ctronics.h" |
| 51 | | #include "machine/i8255.h" |
| 52 | | #include "machine/ram.h" |
| 53 | | #include "machine/z80pio.h" |
| 54 | | #include "sound/ay8910.h" |
| 55 | | #include "sound/sp0256.h" |
| 56 | | #include "sound/speaker.h" |
| 57 | | #include "sound/wave.h" |
| 58 | | #include "includes/ace.h" |
| 59 | | |
| 60 | | |
| 61 | | |
| 62 | | //************************************************************************** |
| 63 | | // READ/WRITE HANDLERS |
| 64 | | //************************************************************************** |
| 65 | | |
| 66 | | //------------------------------------------------- |
| 67 | | // io_r - |
| 68 | | //------------------------------------------------- |
| 69 | | |
| 70 | | READ8_MEMBER( ace_state::io_r ) |
| 71 | | { |
| 72 | | UINT8 data = 0xff; |
| 73 | | |
| 74 | | if (!BIT(offset, 8)) data &= input_port_read(machine(), "A8"); |
| 75 | | if (!BIT(offset, 9)) data &= input_port_read(machine(), "A9"); |
| 76 | | if (!BIT(offset, 10)) data &= input_port_read(machine(), "A10"); |
| 77 | | if (!BIT(offset, 11)) data &= input_port_read(machine(), "A11"); |
| 78 | | if (!BIT(offset, 12)) data &= input_port_read(machine(), "A12"); |
| 79 | | if (!BIT(offset, 13)) data &= input_port_read(machine(), "A13"); |
| 80 | | if (!BIT(offset, 14)) data &= input_port_read(machine(), "A14"); |
| 81 | | |
| 82 | | if (!BIT(offset, 15)) |
| 83 | | { |
| 84 | | data &= input_port_read(machine(), "A15"); |
| 85 | | |
| 86 | | m_cassette->output(-1); |
| 87 | | speaker_level_w(m_speaker, 0); |
| 88 | | } |
| 89 | | |
| 90 | | if (m_cassette->input() > 0) |
| 91 | | { |
| 92 | | data &= ~0x20; |
| 93 | | } |
| 94 | | |
| 95 | | return data; |
| 96 | | } |
| 97 | | |
| 98 | | |
| 99 | | //------------------------------------------------- |
| 100 | | // io_w - |
| 101 | | //------------------------------------------------- |
| 102 | | |
| 103 | | WRITE8_MEMBER( ace_state::io_w ) |
| 104 | | { |
| 105 | | m_cassette->output(1); |
| 106 | | speaker_level_w(m_speaker, 1); |
| 107 | | } |
| 108 | | |
| 109 | | |
| 110 | | //------------------------------------------------- |
| 111 | | // ppi_r - |
| 112 | | //------------------------------------------------- |
| 113 | | |
| 114 | | READ8_MEMBER( ace_state::ppi_pa_r ) |
| 115 | | { |
| 116 | | return m_ppi->read(space, 0); |
| 117 | | } |
| 118 | | |
| 119 | | READ8_MEMBER( ace_state::ppi_pb_r ) |
| 120 | | { |
| 121 | | return m_ppi->read(space, 1); |
| 122 | | } |
| 123 | | |
| 124 | | READ8_MEMBER( ace_state::ppi_pc_r ) |
| 125 | | { |
| 126 | | return m_ppi->read(space, 2); |
| 127 | | } |
| 128 | | |
| 129 | | READ8_MEMBER( ace_state::ppi_control_r ) |
| 130 | | { |
| 131 | | return m_ppi->read(space, 3); |
| 132 | | } |
| 133 | | |
| 134 | | |
| 135 | | //------------------------------------------------- |
| 136 | | // ppi_w - |
| 137 | | //------------------------------------------------- |
| 138 | | |
| 139 | | WRITE8_MEMBER( ace_state::ppi_pa_w ) |
| 140 | | { |
| 141 | | m_ppi->write(space, 0, data); |
| 142 | | } |
| 143 | | |
| 144 | | WRITE8_MEMBER( ace_state::ppi_pb_w ) |
| 145 | | { |
| 146 | | m_ppi->write(space, 1, data); |
| 147 | | } |
| 148 | | |
| 149 | | WRITE8_MEMBER( ace_state::ppi_pc_w ) |
| 150 | | { |
| 151 | | m_ppi->write(space, 2, data); |
| 152 | | } |
| 153 | | |
| 154 | | WRITE8_MEMBER( ace_state::ppi_control_w ) |
| 155 | | { |
| 156 | | m_ppi->write(space, 3, data); |
| 157 | | } |
| 158 | | |
| 159 | | |
| 160 | | //------------------------------------------------- |
| 161 | | // pio_r - |
| 162 | | //------------------------------------------------- |
| 163 | | |
| 164 | | static READ8_DEVICE_HANDLER( pio_ad_r ) |
| 165 | | { |
| 166 | | return z80pio_d_r(device, 0); |
| 167 | | } |
| 168 | | |
| 169 | | static READ8_DEVICE_HANDLER( pio_bd_r ) |
| 170 | | { |
| 171 | | return z80pio_d_r(device, 1); |
| 172 | | } |
| 173 | | |
| 174 | | static READ8_DEVICE_HANDLER( pio_ac_r ) |
| 175 | | { |
| 176 | | return z80pio_c_r(device, 0); |
| 177 | | } |
| 178 | | |
| 179 | | static READ8_DEVICE_HANDLER( pio_bc_r ) |
| 180 | | { |
| 181 | | return z80pio_c_r(device, 1); |
| 182 | | } |
| 183 | | |
| 184 | | |
| 185 | | //------------------------------------------------- |
| 186 | | // pio_w - |
| 187 | | //------------------------------------------------- |
| 188 | | |
| 189 | | static WRITE8_DEVICE_HANDLER( pio_ad_w ) |
| 190 | | { |
| 191 | | z80pio_d_w(device, 0, data); |
| 192 | | } |
| 193 | | |
| 194 | | static WRITE8_DEVICE_HANDLER( pio_bd_w ) |
| 195 | | { |
| 196 | | z80pio_d_w(device, 1, data); |
| 197 | | } |
| 198 | | |
| 199 | | static WRITE8_DEVICE_HANDLER( pio_ac_w ) |
| 200 | | { |
| 201 | | z80pio_c_w(device, 0, data); |
| 202 | | } |
| 203 | | |
| 204 | | static WRITE8_DEVICE_HANDLER( pio_bc_w ) |
| 205 | | { |
| 206 | | z80pio_c_w(device, 1, data); |
| 207 | | } |
| 208 | | |
| 209 | | |
| 210 | | |
| 211 | | //************************************************************************** |
| 212 | | // ADDRESS MAPS |
| 213 | | //************************************************************************** |
| 214 | | |
| 215 | | //------------------------------------------------- |
| 216 | | // ADDRESS_MAP( ace_mem ) |
| 217 | | //------------------------------------------------- |
| 218 | | |
| 219 | | static ADDRESS_MAP_START( ace_mem, AS_PROGRAM, 8, ace_state ) |
| 220 | | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 221 | | AM_RANGE(0x2000, 0x23ff) AM_MIRROR(0x0400) AM_RAM AM_BASE(m_video_ram) |
| 222 | | AM_RANGE(0x2800, 0x2bff) AM_MIRROR(0x0400) AM_RAM AM_BASE(m_char_ram) AM_REGION(Z80_TAG, 0xfc00) |
| 223 | | AM_RANGE(0x3000, 0x33ff) AM_MIRROR(0x0c00) AM_RAM |
| 224 | | AM_RANGE(0x4000, 0xffff) AM_RAM |
| 225 | | ADDRESS_MAP_END |
| 226 | | |
| 227 | | |
| 228 | | //------------------------------------------------- |
| 229 | | // ADDRESS_MAP( ace_io ) |
| 230 | | //------------------------------------------------- |
| 231 | | |
| 232 | | static ADDRESS_MAP_START( ace_io, AS_IO, 8, ace_state ) |
| 233 | | AM_RANGE(0x00, 0x00) AM_MIRROR(0xfffe) AM_MASK(0xff00) AM_READWRITE(io_r, io_w) |
| 234 | | AM_RANGE(0x01, 0x01) AM_MIRROR(0xff00) AM_READ_PORT("JOY") |
| 235 | | AM_RANGE(0x41, 0x41) AM_MIRROR(0xff80) AM_READWRITE(ppi_pa_r, ppi_pa_w) |
| 236 | | AM_RANGE(0x43, 0x43) AM_MIRROR(0xff80) AM_READWRITE(ppi_pb_r, ppi_pb_w) |
| 237 | | AM_RANGE(0x45, 0x45) AM_MIRROR(0xff80) AM_READWRITE(ppi_pc_r, ppi_pc_w) |
| 238 | | AM_RANGE(0x47, 0x47) AM_MIRROR(0xff80) AM_READWRITE(ppi_control_r, ppi_control_w) |
| 239 | | AM_RANGE(0x81, 0x81) AM_MIRROR(0xff38) AM_DEVREADWRITE_LEGACY(Z80PIO_TAG, pio_ad_r, pio_ad_w) |
| 240 | | AM_RANGE(0x83, 0x83) AM_MIRROR(0xff38) AM_DEVREADWRITE_LEGACY(Z80PIO_TAG, pio_bd_r, pio_bd_w) |
| 241 | | AM_RANGE(0x85, 0x85) AM_MIRROR(0xff38) AM_DEVREADWRITE_LEGACY(Z80PIO_TAG, pio_ac_r, pio_ac_w) |
| 242 | | AM_RANGE(0x87, 0x87) AM_MIRROR(0xff38) AM_DEVREADWRITE_LEGACY(Z80PIO_TAG, pio_bc_r, pio_bc_w) |
| 243 | | AM_RANGE(0xfd, 0xfd) AM_MIRROR(0xff00) AM_DEVWRITE_LEGACY(AY8910_TAG, ay8910_address_w) |
| 244 | | AM_RANGE(0xff, 0xff) AM_MIRROR(0xff00) AM_DEVREADWRITE_LEGACY(AY8910_TAG, ay8910_r, ay8910_data_w) |
| 245 | | ADDRESS_MAP_END |
| 246 | | |
| 247 | | |
| 248 | | |
| 249 | | //************************************************************************** |
| 250 | | // INPUT PORTS |
| 251 | | //************************************************************************** |
| 252 | | |
| 253 | | //------------------------------------------------- |
| 254 | | // INPUT_PORTS( ace ) |
| 255 | | //------------------------------------------------- |
| 256 | | |
| 257 | | static INPUT_PORTS_START( ace ) |
| 258 | | PORT_START("A8") |
| 259 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) |
| 260 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Symbol Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_2) |
| 261 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') PORT_CHAR(':') |
| 262 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') PORT_CHAR('\xA3') |
| 263 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') PORT_CHAR('?') |
| 264 | | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 265 | | |
| 266 | | PORT_START("A9") |
| 267 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') PORT_CHAR('~') |
| 268 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') PORT_CHAR('|') |
| 269 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') PORT_CHAR('\\') |
| 270 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') PORT_CHAR('{') |
| 271 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') PORT_CHAR('}') |
| 272 | | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 273 | | |
| 274 | | PORT_START("A10") |
| 275 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') |
| 276 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') |
| 277 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') |
| 278 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') PORT_CHAR('<') |
| 279 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') PORT_CHAR('>') |
| 280 | | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 281 | | |
| 282 | | PORT_START("A11") |
| 283 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') |
| 284 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('@') |
| 285 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') |
| 286 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') |
| 287 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_LEFT) PORT_CHAR('5') PORT_CHAR('%') |
| 288 | | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 289 | | |
| 290 | | PORT_START("A12") |
| 291 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR('_') |
| 292 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')') |
| 293 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR('8') PORT_CHAR('(') |
| 294 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_DOWN) PORT_CHAR('7') PORT_CHAR('\'') |
| 295 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_UP) PORT_CHAR('6') PORT_CHAR('&') |
| 296 | | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 297 | | |
| 298 | | PORT_START("A13") |
| 299 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') PORT_CHAR('"') |
| 300 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') PORT_CHAR(';') |
| 301 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') PORT_CHAR(0x00A9) |
| 302 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') PORT_CHAR(']') |
| 303 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') PORT_CHAR('[') |
| 304 | | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 305 | | |
| 306 | | PORT_START("A14") |
| 307 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) |
| 308 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') PORT_CHAR('=') |
| 309 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') PORT_CHAR('+') |
| 310 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') PORT_CHAR('-') |
| 311 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("h H \xE2\x86\x91") PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') |
| 312 | | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 313 | | |
| 314 | | PORT_START("A15") |
| 315 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') |
| 316 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') PORT_CHAR('.') |
| 317 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') PORT_CHAR(',') |
| 318 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') PORT_CHAR('*') |
| 319 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') PORT_CHAR('/') |
| 320 | | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 321 | | |
| 322 | | PORT_START("JOY") |
| 323 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) |
| 324 | | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) |
| 325 | | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) |
| 326 | | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) |
| 327 | | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 328 | | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) |
| 329 | | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 330 | | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 331 | | INPUT_PORTS_END |
| 332 | | |
| 333 | | |
| 334 | | |
| 335 | | //************************************************************************** |
| 336 | | // VIDEO |
| 337 | | //************************************************************************** |
| 338 | | |
| 339 | | //------------------------------------------------- |
| 340 | | // gfx_layout ace_charlayout |
| 341 | | //------------------------------------------------- |
| 342 | | |
| 343 | | static const gfx_layout ace_charlayout = |
| 344 | | { |
| 345 | | 8,8, |
| 346 | | 128, |
| 347 | | 1, |
| 348 | | { RGN_FRAC(0,1) }, |
| 349 | | { STEP8(0,1) }, |
| 350 | | { STEP8(0,8) }, |
| 351 | | 8*8 |
| 352 | | }; |
| 353 | | |
| 354 | | |
| 355 | | //------------------------------------------------- |
| 356 | | // GFXDECODE( ace ) |
| 357 | | //------------------------------------------------- |
| 358 | | |
| 359 | | static GFXDECODE_START( ace ) |
| 360 | | GFXDECODE_ENTRY( Z80_TAG, 0xfc00, ace_charlayout, 0, 1 ) |
| 361 | | GFXDECODE_END |
| 362 | | |
| 363 | | |
| 364 | | //------------------------------------------------- |
| 365 | | // TIMER_DEVICE_CALLBACK( set_irq ) |
| 366 | | //------------------------------------------------- |
| 367 | | |
| 368 | | static TIMER_DEVICE_CALLBACK( set_irq ) |
| 369 | | { |
| 370 | | cputag_set_input_line(timer.machine(), Z80_TAG, INPUT_LINE_IRQ0, ASSERT_LINE); |
| 371 | | } |
| 372 | | |
| 373 | | |
| 374 | | //------------------------------------------------- |
| 375 | | // TIMER_DEVICE_CALLBACK( clear_irq ) |
| 376 | | //------------------------------------------------- |
| 377 | | |
| 378 | | static TIMER_DEVICE_CALLBACK( clear_irq ) |
| 379 | | { |
| 380 | | cputag_set_input_line(timer.machine(), Z80_TAG, INPUT_LINE_IRQ0, CLEAR_LINE); |
| 381 | | } |
| 382 | | |
| 383 | | |
| 384 | | //------------------------------------------------- |
| 385 | | // SCREEN_UPDATE( ace ) |
| 386 | | //------------------------------------------------- |
| 387 | | |
| 388 | | bool ace_state::screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect) |
| 389 | | { |
| 390 | | UINT8 y,ra,chr,gfx; |
| 391 | | UINT16 sy=56,ma=0,x; |
| 392 | | |
| 393 | | for (y = 0; y < 24; y++) |
| 394 | | { |
| 395 | | for (ra = 0; ra < 8; ra++) |
| 396 | | { |
| 397 | | UINT16 *p = BITMAP_ADDR16(&bitmap, sy++, 40); |
| 398 | | |
| 399 | | for (x = ma; x < ma+32; x++) |
| 400 | | { |
| 401 | | chr = m_video_ram[x]; |
| 402 | | |
| 403 | | /* get pattern of pixels for that character scanline */ |
| 404 | | gfx = m_char_ram[((chr&0x7f)<<3) | ra] ^ (BIT(chr, 7) ? 0xff : 0); |
| 405 | | |
| 406 | | /* Display a scanline of a character (8 pixels) */ |
| 407 | | *p++ = BIT(gfx, 7); |
| 408 | | *p++ = BIT(gfx, 6); |
| 409 | | *p++ = BIT(gfx, 5); |
| 410 | | *p++ = BIT(gfx, 4); |
| 411 | | *p++ = BIT(gfx, 3); |
| 412 | | *p++ = BIT(gfx, 2); |
| 413 | | *p++ = BIT(gfx, 1); |
| 414 | | *p++ = BIT(gfx, 0); |
| 415 | | } |
| 416 | | } |
| 417 | | ma+=32; |
| 418 | | } |
| 419 | | return 0; |
| 420 | | } |
| 421 | | |
| 422 | | |
| 423 | | |
| 424 | | //************************************************************************** |
| 425 | | // DEVICE CONFIGURATION |
| 426 | | //************************************************************************** |
| 427 | | |
| 428 | | //------------------------------------------------- |
| 429 | | // cassette_interface ace_cassette_interface |
| 430 | | //------------------------------------------------- |
| 431 | | |
| 432 | | static const cassette_interface ace_cassette_interface = |
| 433 | | { |
| 434 | | ace_cassette_formats, |
| 435 | | NULL, |
| 436 | | (cassette_state)(CASSETTE_STOPPED), |
| 437 | | NULL, |
| 438 | | NULL |
| 439 | | }; |
| 440 | | |
| 441 | | |
| 442 | | //------------------------------------------------- |
| 443 | | // ay8910_interface psg_intf |
| 444 | | //------------------------------------------------- |
| 445 | | |
| 446 | | static const ay8910_interface psg_intf = |
| 447 | | { |
| 448 | | AY8910_LEGACY_OUTPUT, |
| 449 | | AY8910_DEFAULT_LOADS, |
| 450 | | DEVCB_NULL, |
| 451 | | DEVCB_NULL, |
| 452 | | DEVCB_NULL, |
| 453 | | DEVCB_NULL |
| 454 | | }; |
| 455 | | |
| 456 | | |
| 457 | | //------------------------------------------------- |
| 458 | | // sp0256_interface sp0256_intf |
| 459 | | //------------------------------------------------- |
| 460 | | |
| 461 | | static const sp0256_interface sp0256_intf = |
| 462 | | { |
| 463 | | DEVCB_NULL, |
| 464 | | DEVCB_NULL |
| 465 | | }; |
| 466 | | |
| 467 | | |
| 468 | | //------------------------------------------------- |
| 469 | | // I8255A_INTERFACE( ppi_intf ) |
| 470 | | //------------------------------------------------- |
| 471 | | |
| 472 | | static READ8_DEVICE_HANDLER( sby_r ) |
| 473 | | { |
| 474 | | /* |
| 475 | | |
| 476 | | bit description |
| 477 | | |
| 478 | | PC0 SP0256 SBY |
| 479 | | PC1 |
| 480 | | PC2 |
| 481 | | PC3 |
| 482 | | PC4 |
| 483 | | PC5 |
| 484 | | PC6 |
| 485 | | PC7 |
| 486 | | |
| 487 | | */ |
| 488 | | |
| 489 | | return sp0256_sby_r(device); |
| 490 | | } |
| 491 | | |
| 492 | | static WRITE8_DEVICE_HANDLER( ald_w ) |
| 493 | | { |
| 494 | | /* |
| 495 | | |
| 496 | | bit description |
| 497 | | |
| 498 | | PA0 SP0256 A1 |
| 499 | | PA1 SP0256 A2 |
| 500 | | PA2 SP0256 A3 |
| 501 | | PA3 SP0256 A4 |
| 502 | | PA4 SP0256 A5 |
| 503 | | PA5 SP0256 A6 |
| 504 | | PA6 SP0256 _ALD |
| 505 | | PA7 |
| 506 | | |
| 507 | | */ |
| 508 | | |
| 509 | | if (!BIT(data, 6)) |
| 510 | | { |
| 511 | | sp0256_ALD_w(device, 0, data & 0x3f); |
| 512 | | } |
| 513 | | } |
| 514 | | |
| 515 | | static I8255A_INTERFACE( ppi_intf ) |
| 516 | | { |
| 517 | | DEVCB_NULL, |
| 518 | | DEVCB_NULL, |
| 519 | | DEVCB_DEVICE_HANDLER(SP0256AL2_TAG, sby_r), |
| 520 | | DEVCB_DEVICE_HANDLER(SP0256AL2_TAG, ald_w), |
| 521 | | DEVCB_NULL, |
| 522 | | DEVCB_NULL |
| 523 | | }; |
| 524 | | |
| 525 | | |
| 526 | | //------------------------------------------------- |
| 527 | | // Z80PIO_INTERFACE( pio_intf ) |
| 528 | | //------------------------------------------------- |
| 529 | | |
| 530 | | READ8_MEMBER( ace_state::pio_pa_r ) |
| 531 | | { |
| 532 | | /* |
| 533 | | |
| 534 | | bit description |
| 535 | | |
| 536 | | PA0 |
| 537 | | PA1 RxD |
| 538 | | PA2 |
| 539 | | PA3 |
| 540 | | PA4 |
| 541 | | PA5 |
| 542 | | PA6 |
| 543 | | PA7 |
| 544 | | |
| 545 | | */ |
| 546 | | |
| 547 | | return 0; |
| 548 | | }; |
| 549 | | |
| 550 | | WRITE8_MEMBER( ace_state::pio_pa_w ) |
| 551 | | { |
| 552 | | /* |
| 553 | | |
| 554 | | bit description |
| 555 | | |
| 556 | | PA0 RTS |
| 557 | | PA1 |
| 558 | | PA2 CTS |
| 559 | | PA3 TxD |
| 560 | | PA4 |
| 561 | | PA5 |
| 562 | | PA6 STB |
| 563 | | PA7 |
| 564 | | |
| 565 | | */ |
| 566 | | |
| 567 | | // centronics strobe |
| 568 | | centronics_strobe_w(m_centronics, !BIT(data, 6)); |
| 569 | | }; |
| 570 | | |
| 571 | | static Z80PIO_INTERFACE( pio_intf ) |
| 572 | | { |
| 573 | | DEVCB_CPU_INPUT_LINE(Z80_TAG, INPUT_LINE_IRQ0), |
| 574 | | DEVCB_DRIVER_MEMBER(ace_state, pio_pa_r), |
| 575 | | DEVCB_DRIVER_MEMBER(ace_state, pio_pa_w), |
| 576 | | DEVCB_NULL, |
| 577 | | DEVCB_NULL, |
| 578 | | DEVCB_DEVICE_HANDLER(CENTRONICS_TAG, centronics_data_w), |
| 579 | | DEVCB_NULL |
| 580 | | }; |
| 581 | | |
| 582 | | |
| 583 | | |
| 584 | | //************************************************************************** |
| 585 | | // MACHINE INITIALIZATION |
| 586 | | //************************************************************************** |
| 587 | | |
| 588 | | //------------------------------------------------- |
| 589 | | // MACHINE_START( ace ) |
| 590 | | //------------------------------------------------- |
| 591 | | |
| 592 | | void ace_state::machine_start() |
| 593 | | { |
| 594 | | address_space *program = m_maincpu->memory().space(AS_PROGRAM); |
| 595 | | |
| 596 | | /* configure RAM */ |
| 597 | | switch (ram_get_size(m_ram)) |
| 598 | | { |
| 599 | | case 1*1024: |
| 600 | | program->unmap_readwrite(0x4000, 0xffff); |
| 601 | | break; |
| 602 | | |
| 603 | | case 16*1024: |
| 604 | | program->unmap_readwrite(0x8000, 0xffff); |
| 605 | | break; |
| 606 | | |
| 607 | | case 32*1024: |
| 608 | | program->unmap_readwrite(0xc000, 0xffff); |
| 609 | | break; |
| 610 | | } |
| 611 | | } |
| 612 | | |
| 613 | | |
| 614 | | |
| 615 | | //************************************************************************** |
| 616 | | // MACHINE CONFIGURATION |
| 617 | | //************************************************************************** |
| 618 | | |
| 619 | | //------------------------------------------------- |
| 620 | | // MACHINE_CONFIG( ace ) |
| 621 | | //------------------------------------------------- |
| 622 | | |
| 623 | | static MACHINE_CONFIG_START( ace, ace_state ) |
| 624 | | // basic machine hardware |
| 625 | | MCFG_CPU_ADD(Z80_TAG, Z80, XTAL_6_5MHz/2) |
| 626 | | MCFG_CPU_PROGRAM_MAP(ace_mem) |
| 627 | | MCFG_CPU_IO_MAP(ace_io) |
| 628 | | MCFG_QUANTUM_TIME(attotime::from_hz(60)) |
| 629 | | |
| 630 | | // video hardware |
| 631 | | MCFG_SCREEN_ADD(SCREEN_TAG, RASTER) |
| 632 | | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 633 | | MCFG_SCREEN_RAW_PARAMS(XTAL_6_5MHz, 416, 0, 336, 312, 0, 304) |
| 634 | | MCFG_TIMER_ADD_SCANLINE("set_irq", set_irq, SCREEN_TAG, 31*8, 264) |
| 635 | | MCFG_TIMER_ADD_SCANLINE("clear_irq", clear_irq, SCREEN_TAG, 32*8, 264) |
| 636 | | |
| 637 | | MCFG_PALETTE_LENGTH(2) |
| 638 | | MCFG_PALETTE_INIT(black_and_white) |
| 639 | | |
| 640 | | MCFG_GFXDECODE(ace) |
| 641 | | |
| 642 | | // sound hardware |
| 643 | | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 644 | | MCFG_SOUND_WAVE_ADD(WAVE_TAG, CASSETTE_TAG) |
| 645 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 646 | | MCFG_SOUND_ADD(SPEAKER_TAG, SPEAKER_SOUND, 0) |
| 647 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 648 | | |
| 649 | | MCFG_SOUND_ADD(AY8910_TAG, AY8910, XTAL_6_5MHz/2) |
| 650 | | MCFG_SOUND_CONFIG(psg_intf) |
| 651 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 652 | | |
| 653 | | MCFG_SOUND_ADD(SP0256AL2_TAG, SP0256, XTAL_3MHz) |
| 654 | | MCFG_SOUND_CONFIG(sp0256_intf) |
| 655 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 656 | | |
| 657 | | // devices |
| 658 | | MCFG_CASSETTE_ADD(CASSETTE_TAG, ace_cassette_interface) |
| 659 | | MCFG_SNAPSHOT_ADD("snapshot", ace, "ace", 1) |
| 660 | | MCFG_I8255A_ADD(I8255_TAG, ppi_intf) |
| 661 | | MCFG_Z80PIO_ADD(Z80PIO_TAG, XTAL_6_5MHz/2, pio_intf) |
| 662 | | MCFG_CENTRONICS_ADD(CENTRONICS_TAG, standard_centronics) |
| 663 | | |
| 664 | | // internal ram |
| 665 | | MCFG_RAM_ADD(RAM_TAG) |
| 666 | | MCFG_RAM_DEFAULT_SIZE("1K") |
| 667 | | MCFG_RAM_EXTRA_OPTIONS("16K,32K,48K") |
| 668 | | MACHINE_CONFIG_END |
| 669 | | |
| 670 | | |
| 671 | | |
| 672 | | //************************************************************************** |
| 673 | | // ROMS |
| 674 | | //************************************************************************** |
| 675 | | |
| 676 | | //------------------------------------------------- |
| 677 | | // ROM( ace ) |
| 678 | | //------------------------------------------------- |
| 679 | | |
| 680 | | ROM_START( ace ) |
| 681 | | ROM_REGION( 0x10000, Z80_TAG, 0 ) |
| 682 | | ROM_LOAD( "rom-a.z1", 0x0000, 0x1000, CRC(dc8438a5) SHA1(8fa97eb71e5dd17c7d190c6587ee3840f839347c) ) |
| 683 | | ROM_LOAD( "rom-b.z2", 0x1000, 0x1000, CRC(4009f636) SHA1(98c5d4bcd74bcf014268cf4c00b2007ea5cc21f3) ) |
| 684 | | |
| 685 | | ROM_REGION( 0x1000, "fdc", 0 ) // Deep Thought disc interface |
| 686 | | ROM_LOAD( "dos 4.bin", 0x0000, 0x1000, CRC(04c70448) SHA1(53ddcced6ae2feafd687a3b55864726656b71412) ) |
| 687 | | |
| 688 | | ROM_REGION( 0x10000, SP0256AL2_TAG, 0 ) |
| 689 | | ROM_LOAD( "sp0256-al2.ic1", 0x000, 0x800, CRC(b504ac15) SHA1(e60fcb5fa16ff3f3b69d36c7a6e955744d3feafc) ) |
| 690 | | ROM_END |
| 691 | | |
| 692 | | |
| 693 | | |
| 694 | | //************************************************************************** |
| 695 | | // SYSTEM DRIVERS |
| 696 | | //************************************************************************** |
| 697 | | |
| 698 | | // YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS |
| 699 | | COMP( 1981, ace, 0, 0, ace, ace, 0, "Jupiter Cantab", "Jupiter Ace" , 0 ) |
src/mess/drivers/astrocde.c
| r13301 | r13302 | |
| 1 | | /**************************************************************************** |
| 2 | | |
| 3 | | Bally Astrocade consumer hardware |
| 4 | | driver by Nicola Salmoria, Mike Coates, Frank Palazzolo, Aaron Giles, |
| 5 | | Dirk Best |
| 6 | | |
| 7 | | ****************************************************************************/ |
| 8 | | |
| 9 | | #include "emu.h" |
| 10 | | #include "cpu/z80/z80.h" |
| 11 | | #include "includes/astrocde.h" |
| 12 | | #include "sound/astrocde.h" |
| 13 | | #include "imagedev/cartslot.h" |
| 14 | | #include "machine/ram.h" |
| 15 | | |
| 16 | | MACHINE_RESET( astrocde ); |
| 17 | | void get_ram_expansion_settings(address_space *space, int &ram_expansion_installed, int &write_protect_on, int &expansion_ram_start, int &expansion_ram_end, int &shadow_ram_end); |
| 18 | | |
| 19 | | /************************************* |
| 20 | | * |
| 21 | | * Memory maps |
| 22 | | * |
| 23 | | * $0000 to $1FFF: 8K on-board ROM (could be one of three available BIOS dumps) |
| 24 | | * $2000 to $3FFF: 8K cartridge ROM |
| 25 | | * $4000 to $4FFF: 4K screen RAM |
| 26 | | * $5000 to $FFFF: 44K address space not available in standard machine. With a |
| 27 | | * sufficiently large RAM expansion, all of this RAM can be added, and accessed |
| 28 | | * by an extended BASIC program. Bally and Astrocade BASIC can access from |
| 29 | | * $5000 to $7FFF if available. |
| 30 | | * |
| 31 | | * RAM Expansions |
| 32 | | * |
| 33 | | * Several third party RAM expansions have been made for the Astrocade. These |
| 34 | | * allow access to various ranges of the expansion memory ($5000 to $FFFF). |
| 35 | | * A RAM expansion is required to use extended BASIC programs like Blue RAM BASIC |
| 36 | | * and VIPERSoft BASIC. All of the expansions also have a RAM protect switch, which |
| 37 | | * can be flipped at any time to make the RAM act like ROM. Extended BASIC |
| 38 | | * programs need access to the RAM and won't work with RAM protect enabled, but |
| 39 | | * this can be useful with Bally and Astrocade BASIC. They also have a range switch |
| 40 | | * (not implemented). The default position is 6K, but it can be switched to |
| 41 | | * 2K. This means that the expanded memory starting at $6000 will instead be |
| 42 | | * mapped to the cartridge memory starting at $2000. So it would be possible to |
| 43 | | * load a cartridge program from tape into the expansion memory, then flip the range |
| 44 | | * switch and run it as a cartridge. This is useful for cartridge development. |
| 45 | | * |
| 46 | | * NOTE: If you have any trouble running cartridges with a RAM expansion installed, hit reset. |
| 47 | | * |
| 48 | | * Blue RAM -- available in 4K, 16K, and 32K. These also use an INS8154 chip, |
| 49 | | * (not yet implemented) which has an additional $80 bytes of RAM mapped |
| 50 | | * immediately after the end of the expansion address space. This memory |
| 51 | | * can't be write protected. The INS8154 has I/O features needed for loading |
| 52 | | * tape programs into Blue RAM BASIC, as well as running the Blue RAM Utility cart. |
| 53 | | * 4K: $6000 to $6FFF (can't run VIPERSoft BASIC, because this program needs memory |
| 54 | | * past this range) |
| 55 | | * 16K: $6000 to $9FFF |
| 56 | | * 32K: $6000 to $DFFF |
| 57 | | * |
| 58 | | * VIPER System 1 -- This is available in 16K only. It also includes a keyboard (not implemented). |
| 59 | | * 16K: $6000 to $9FFF |
| 60 | | * |
| 61 | | * Lil' WHITE RAM -- This is available in 32K only. Attempts to read and write |
| 62 | | * to memory outside of its address range ($D000 to $FFFF) are mapped to the expansion |
| 63 | | * memory $5000 to $7FFF. The current implementation won't allow the shadow RAM area |
| 64 | | * to be accessed when RAM protect is on, but there is no known software that will |
| 65 | | * access the upper range of the expansion RAM when RAM protect is enabled. |
| 66 | | * 32K: $5000 to $CFFF |
| 67 | | * |
| 68 | | * R&L 64K RAM Board -- This is a highly configurable kit. RAM can be installed in |
| 69 | | * 2K increments. So, the entire 44K expansion memory can be filled. It is also |
| 70 | | * possible to override the rest of the memory map with RAM (not implemented). |
| 71 | | * There are 32 switches allowing users to activate and deactivate each 2K block (not implemented). |
| 72 | | * RAM write protection can be implemented in three ranges through jumpers or by |
| 73 | | * installing switches. The ranges are $0000 to $0FFF (first 4K), $0000 to $3FFF (first 16K), |
| 74 | | * and $0000 to $FFFF (all 64K). The current implementation is for 44K expansion memory mapped from |
| 75 | | * $5000 to $FFFF, with only a single write protect covering this entire range. |
| 76 | | * |
| 77 | | *************************************/ |
| 78 | | |
| 79 | | static ADDRESS_MAP_START( astrocade_mem, AS_PROGRAM, 8 ) |
| 80 | | AM_RANGE(0x0000, 0x0fff) AM_ROM AM_WRITE(astrocade_funcgen_w) |
| 81 | | AM_RANGE(0x1000, 0x3fff) AM_ROM /* Star Fortress writes in here?? */ |
| 82 | | AM_RANGE(0x4000, 0x4fff) AM_RAM AM_BASE_MEMBER(astrocde_state, m_videoram) /* ASG */ |
| 83 | | ADDRESS_MAP_END |
| 84 | | |
| 85 | | |
| 86 | | static ADDRESS_MAP_START( astrocade_io, AS_IO, 8 ) |
| 87 | | AM_RANGE(0x00, 0x1f) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_READWRITE(astrocade_data_chip_register_r, astrocade_data_chip_register_w) |
| 88 | | ADDRESS_MAP_END |
| 89 | | |
| 90 | | static INPUT_CHANGED( set_write_protect ) // run when RAM expansion write protect switch is changed |
| 91 | | { |
| 92 | | int ram_expansion_installed = 0, write_protect_on = 0, expansion_ram_start = 0, expansion_ram_end = 0, shadow_ram_end = 0; |
| 93 | | address_space *space = field.machine().device("maincpu")->memory().space(AS_PROGRAM); |
| 94 | | UINT8 *expram = ram_get_ptr(field.machine().device("ram_tag")); |
| 95 | | |
| 96 | | get_ram_expansion_settings(space, ram_expansion_installed, write_protect_on, expansion_ram_start, expansion_ram_end, shadow_ram_end); // passing by reference |
| 97 | | |
| 98 | | if (ram_expansion_installed == 1) |
| 99 | | { |
| 100 | | if (write_protect_on == 0) // write protect off, so install memory normally |
| 101 | | { |
| 102 | | space->install_ram(expansion_ram_start, expansion_ram_end, expram); |
| 103 | | if (shadow_ram_end > expansion_ram_end) |
| 104 | | space->install_ram(expansion_ram_end + 1, shadow_ram_end, expram); |
| 105 | | } |
| 106 | | else // write protect on, so make memory read only |
| 107 | | { |
| 108 | | space->nop_write(expansion_ram_start, expansion_ram_end); |
| 109 | | } |
| 110 | | } |
| 111 | | } |
| 112 | | |
| 113 | | /************************************* |
| 114 | | * |
| 115 | | * Input ports |
| 116 | | * |
| 117 | | * |
| 118 | | * The Astrocade has ports for four hand controllers. Each controller has a |
| 119 | | * knob on top that can be simultaneously pushed as an eight-way joystick and |
| 120 | | * twisted as a paddle, in addition to a trigger button. The knob can twist |
| 121 | | * through about 270 degrees, registering 256 unique positions. It does not |
| 122 | | * autocenter. When selecting options on the menu, twisting the knob to the |
| 123 | | * right gives lower numbers, and twisting to the left gives larger numbers. |
| 124 | | * Paddle games like Clowns have more intuitive behavior -- twisting to the |
| 125 | | * right moves the character right. |
| 126 | | * |
| 127 | | * There is a 24-key keypad on the system itself (6 rows, 4 columns). It is |
| 128 | | * labeled for the built-in calculator, but overlays were released for other |
| 129 | | * programs, the most popular being the BASIC cartridges, which allowed a |
| 130 | | * large number of inputs by making the bottom row shift buttons. The labels |
| 131 | | * below first list the calculator key, then the BASIC keys in the order of no |
| 132 | | * shift, GREEN shift, RED shift, BLUE shift, WORDS shift. |
| 133 | | * |
| 134 | | *************************************/ |
| 135 | | |
| 136 | | static INPUT_PORTS_START( astrocde ) |
| 137 | | PORT_START("P1HANDLE") |
| 138 | | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP) PORT_PLAYER(1) PORT_8WAY |
| 139 | | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN) PORT_PLAYER(1) PORT_8WAY |
| 140 | | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT) PORT_PLAYER(1) PORT_8WAY |
| 141 | | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT) PORT_PLAYER(1) PORT_8WAY |
| 142 | | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_PLAYER(1) |
| 143 | | PORT_BIT(0xe0, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 144 | | |
| 145 | | PORT_START("P2HANDLE") |
| 146 | | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP) PORT_PLAYER(2) PORT_8WAY |
| 147 | | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN) PORT_PLAYER(2) PORT_8WAY |
| 148 | | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT) PORT_PLAYER(2) PORT_8WAY |
| 149 | | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT) PORT_PLAYER(2) PORT_8WAY |
| 150 | | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_PLAYER(2) |
| 151 | | PORT_BIT(0xe0, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 152 | | |
| 153 | | PORT_START("P3HANDLE") |
| 154 | | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP) PORT_PLAYER(3) PORT_8WAY |
| 155 | | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN) PORT_PLAYER(3) PORT_8WAY |
| 156 | | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT) PORT_PLAYER(3) PORT_8WAY |
| 157 | | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT) PORT_PLAYER(3) PORT_8WAY |
| 158 | | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_PLAYER(3) |
| 159 | | PORT_BIT(0xe0, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 160 | | |
| 161 | | PORT_START("P4HANDLE") |
| 162 | | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP) PORT_PLAYER(4) PORT_8WAY |
| 163 | | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN) PORT_PLAYER(4) PORT_8WAY |
| 164 | | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT) PORT_PLAYER(4) PORT_8WAY |
| 165 | | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT) PORT_PLAYER(4) PORT_8WAY |
| 166 | | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_PLAYER(4) |
| 167 | | PORT_BIT(0xe0, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 168 | | |
| 169 | | PORT_START("KEYPAD0") |
| 170 | | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("% \xC3\xB7 [ ] LIST") PORT_CODE(KEYCODE_O) |
| 171 | | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("/ x J K L NEXT") PORT_CODE(KEYCODE_SLASH_PAD) |
| 172 | | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("x - V W X IF") PORT_CODE(KEYCODE_ASTERISK) |
| 173 | | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("- + & @ * GOTO") PORT_CODE(KEYCODE_MINUS_PAD) |
| 174 | | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("+ = # % : PRINT") PORT_CODE(KEYCODE_PLUS_PAD) |
| 175 | | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("= WORDS Shift") PORT_CODE(KEYCODE_ENTER_PAD) |
| 176 | | PORT_BIT(0xc0, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 177 | | |
| 178 | | PORT_START("KEYPAD1") |
| 179 | | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("\xE2\x86\x93 HALT RUN") PORT_CODE(KEYCODE_PGDN) |
| 180 | | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CH 9 G H I STEP") PORT_CODE(KEYCODE_H) |
| 181 | | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("9 6 S T U RND") PORT_CODE(KEYCODE_9) |
| 182 | | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("6 3 \xE2\x86\x91 . \xE2\x86\x93 BOX") PORT_CODE(KEYCODE_6) |
| 183 | | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("3 ERASE ( ; )") PORT_CODE(KEYCODE_3) |
| 184 | | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME(". BLUE Shift") PORT_CODE(KEYCODE_STOP) |
| 185 | | PORT_BIT(0xc0, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 186 | | |
| 187 | | PORT_START("KEYPAD2") |
| 188 | | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("\xE2\x86\x91 PAUSE / \\") PORT_CODE(KEYCODE_PGUP) |
| 189 | | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("MS 8 D E F TO") PORT_CODE(KEYCODE_S) |
| 190 | | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("8 5 P Q R RETN") PORT_CODE(KEYCODE_8) |
| 191 | | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("5 2 \xE2\x86\x90 ' \xE2\x86\x92 LINE") PORT_CODE(KEYCODE_5) |
| 192 | | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("2 0 < \" > INPUT") PORT_CODE(KEYCODE_2) |
| 193 | | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("0 RED Shift") PORT_CODE(KEYCODE_0) |
| 194 | | PORT_BIT(0xc0, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 195 | | |
| 196 | | PORT_START("KEYPAD3") |
| 197 | | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("C GO +10") PORT_CODE(KEYCODE_C) |
| 198 | | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("MR 7 A B C FOR") PORT_CODE(KEYCODE_R) |
| 199 | | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("7 4 M N O GOSB") PORT_CODE(KEYCODE_7) |
| 200 | | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("4 1 Y Z ! CLEAR") PORT_CODE(KEYCODE_4) |
| 201 | | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("1 SPACE $ , ?") PORT_CODE(KEYCODE_1) |
| 202 | | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CE GREEN Shift") PORT_CODE(KEYCODE_E) |
| 203 | | PORT_BIT(0xc0, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 204 | | |
| 205 | | PORT_START("P1_KNOB") |
| 206 | | PORT_BIT(0xff, 0x00, IPT_PADDLE) PORT_INVERT PORT_SENSITIVITY(85) PORT_KEYDELTA(10) PORT_CENTERDELTA(0) PORT_MINMAX(0,255) PORT_CODE_DEC(KEYCODE_Z) PORT_CODE_INC(KEYCODE_X) PORT_PLAYER(1) |
| 207 | | |
| 208 | | PORT_START("P2_KNOB") |
| 209 | | PORT_BIT(0xff, 0x00, IPT_PADDLE) PORT_INVERT PORT_SENSITIVITY(85) PORT_KEYDELTA(10) PORT_CENTERDELTA(0) PORT_MINMAX(0,255) PORT_CODE_DEC(KEYCODE_N) PORT_CODE_INC(KEYCODE_M) PORT_PLAYER(2) |
| 210 | | |
| 211 | | PORT_START("P3_KNOB") |
| 212 | | PORT_BIT(0xff, 0x00, IPT_PADDLE) PORT_INVERT PORT_SENSITIVITY(85) PORT_KEYDELTA(10) PORT_CENTERDELTA(0) PORT_MINMAX(0,255) PORT_CODE_DEC(KEYCODE_Q) PORT_CODE_INC(KEYCODE_W) PORT_PLAYER(3) |
| 213 | | |
| 214 | | PORT_START("P4_KNOB") |
| 215 | | PORT_BIT(0xff, 0x00, IPT_PADDLE) PORT_INVERT PORT_SENSITIVITY(85) PORT_KEYDELTA(10) PORT_CENTERDELTA(0) PORT_MINMAX(0,255) PORT_CODE_DEC(KEYCODE_Y) PORT_CODE_INC(KEYCODE_U) PORT_PLAYER(4) |
| 216 | | |
| 217 | | PORT_START("CFG") /* machine config */ |
| 218 | | PORT_DIPNAME( 0x3f, 0x00, "RAM Expansion") |
| 219 | | PORT_DIPSETTING( 0x00, "No RAM Expansion") |
| 220 | | PORT_DIPSETTING( 0x01, "16KB Viper System 1 RAM Expansion") |
| 221 | | PORT_DIPSETTING( 0x02, "32KB Lil' WHITE RAM Expansion") |
| 222 | | PORT_DIPSETTING( 0x04, "R&L 64K RAM Board (44K installed)") |
| 223 | | PORT_DIPSETTING( 0x08, "4KB Blue RAM Expansion") |
| 224 | | PORT_DIPSETTING( 0x10, "16KB Blue RAM Expansion") |
| 225 | | PORT_DIPSETTING( 0x20, "32KB Blue RAM Expansion") |
| 226 | | |
| 227 | | PORT_START("PROTECT") /* Write protect RAM */ |
| 228 | | PORT_DIPNAME( 0x01, 0x00, "Write Protect RAM") PORT_CHANGED(set_write_protect, 0) |
| 229 | | PORT_DIPSETTING( 0x00, "Write Protect Off") |
| 230 | | PORT_DIPSETTING( 0x01, "Write Protect On") |
| 231 | | INPUT_PORTS_END |
| 232 | | |
| 233 | | |
| 234 | | /************************************* |
| 235 | | * |
| 236 | | * Machine drivers |
| 237 | | * |
| 238 | | *************************************/ |
| 239 | | |
| 240 | | static MACHINE_CONFIG_START( astrocde, astrocde_state ) |
| 241 | | /* basic machine hardware */ |
| 242 | | MCFG_CPU_ADD("maincpu", Z80, ASTROCADE_CLOCK/4) /* 1.789 MHz */ |
| 243 | | MCFG_CPU_PROGRAM_MAP(astrocade_mem) |
| 244 | | MCFG_CPU_IO_MAP(astrocade_io) |
| 245 | | |
| 246 | | MCFG_MACHINE_RESET( astrocde ) |
| 247 | | |
| 248 | | /* video hardware */ |
| 249 | | MCFG_SCREEN_ADD("screen", RASTER) |
| 250 | | MCFG_SCREEN_RAW_PARAMS(ASTROCADE_CLOCK, 455, 0, 352, 262, 0, 240) |
| 251 | | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 252 | | MCFG_SCREEN_UPDATE(astrocde) |
| 253 | | |
| 254 | | MCFG_PALETTE_LENGTH(512) |
| 255 | | MCFG_PALETTE_INIT(astrocde) |
| 256 | | |
| 257 | | MCFG_VIDEO_START(astrocde) |
| 258 | | |
| 259 | | /* sound hardware */ |
| 260 | | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 261 | | MCFG_SOUND_ADD("astrocade1", ASTROCADE, ASTROCADE_CLOCK/4) |
| 262 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 263 | | |
| 264 | | /* optional expansion ram (installed in MACHINE_RESET)*/ |
| 265 | | MCFG_RAM_ADD("ram_tag") |
| 266 | | MCFG_RAM_DEFAULT_SIZE("32k") |
| 267 | | |
| 268 | | /* cartridge */ |
| 269 | | MCFG_CARTSLOT_ADD("cart") |
| 270 | | MCFG_CARTSLOT_EXTENSION_LIST("bin") |
| 271 | | MCFG_CARTSLOT_INTERFACE("astrocde_cart") |
| 272 | | |
| 273 | | /* Software lists */ |
| 274 | | MCFG_SOFTWARE_LIST_ADD("cart_list","astrocde") |
| 275 | | MACHINE_CONFIG_END |
| 276 | | |
| 277 | | |
| 278 | | /************************************* |
| 279 | | * |
| 280 | | * ROM definitions |
| 281 | | * |
| 282 | | *************************************/ |
| 283 | | |
| 284 | | ROM_START( astrocde ) |
| 285 | | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 286 | | ROM_LOAD( "astro.bin", 0x0000, 0x2000, CRC(ebc77f3a) SHA1(b902c941997c9d150a560435bf517c6a28137ecc) ) |
| 287 | | ROM_CART_LOAD( "cart", 0x2000, 0x8000, 0 ) |
| 288 | | ROM_END |
| 289 | | |
| 290 | | ROM_START( astrocdl ) |
| 291 | | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 292 | | ROM_LOAD( "ballyhlc.bin", 0x0000, 0x2000, CRC(d7c517ba) SHA1(6b2bef5d970e54ed204549f58ba6d197a8bfd3cc) ) |
| 293 | | ROM_CART_LOAD( "cart", 0x2000, 0x8000, 0 ) |
| 294 | | ROM_END |
| 295 | | |
| 296 | | ROM_START( astrocdw ) |
| 297 | | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 298 | | ROM_LOAD( "bioswhit.bin", 0x0000, 0x2000, CRC(6eb53e79) SHA1(d84341feec1a0a0e8aa6151b649bc3cf6ef69fbf) ) |
| 299 | | ROM_CART_LOAD( "cart", 0x2000, 0x8000, 0 ) |
| 300 | | ROM_END |
| 301 | | |
| 302 | | /************************************* |
| 303 | | * |
| 304 | | * Driver initialization |
| 305 | | * |
| 306 | | *************************************/ |
| 307 | | |
| 308 | | static DRIVER_INIT( astrocde ) |
| 309 | | { |
| 310 | | astrocde_state *state = machine.driver_data<astrocde_state>(); |
| 311 | | state->m_video_config = AC_SOUND_PRESENT | AC_LIGHTPEN_INTS; |
| 312 | | } |
| 313 | | |
| 314 | | MACHINE_RESET( astrocde ) |
| 315 | | { |
| 316 | | int ram_expansion_installed = 0, write_protect_on = 0, expansion_ram_start = 0, expansion_ram_end = 0, shadow_ram_end = 0; |
| 317 | | address_space *space = machine.device("maincpu")->memory().space(AS_PROGRAM); |
| 318 | | UINT8 *expram = ram_get_ptr(machine.device("ram_tag")); |
| 319 | | space->unmap_readwrite(0x5000, 0xffff); // unmap any previously installed expansion RAM |
| 320 | | |
| 321 | | get_ram_expansion_settings(space, ram_expansion_installed, write_protect_on, expansion_ram_start, expansion_ram_end, shadow_ram_end); // passing by reference |
| 322 | | |
| 323 | | if (ram_expansion_installed == 1) |
| 324 | | { |
| 325 | | if (write_protect_on == 0) // write protect off, so install memory normally |
| 326 | | { |
| 327 | | space->install_ram(expansion_ram_start, expansion_ram_end, expram); |
| 328 | | if (shadow_ram_end > expansion_ram_end) |
| 329 | | space->install_ram(expansion_ram_end + 1, shadow_ram_end, expram); |
| 330 | | } |
| 331 | | else // write protect on, so make memory read only |
| 332 | | { |
| 333 | | space->nop_write(expansion_ram_start, expansion_ram_end); |
| 334 | | } |
| 335 | | } |
| 336 | | } |
| 337 | | |
| 338 | | void get_ram_expansion_settings(address_space *space, int &ram_expansion_installed, int &write_protect_on, int &expansion_ram_start, int &expansion_ram_end, int &shadow_ram_end) |
| 339 | | { |
| 340 | | if (input_port_read(space->machine(), "PROTECT") == 0x01) |
| 341 | | write_protect_on = 1; |
| 342 | | else |
| 343 | | write_protect_on = 0; |
| 344 | | |
| 345 | | ram_expansion_installed = 1; |
| 346 | | |
| 347 | | switch(input_port_read(space->machine(), "CFG")) // check RAM expansion configuration and set address ranges |
| 348 | | { |
| 349 | | case 0x00: // No RAM Expansion |
| 350 | | ram_expansion_installed = 0; |
| 351 | | break; |
| 352 | | case 0x01: // 16KB Viper System 1 RAM Expansion |
| 353 | | expansion_ram_start = 0x6000; |
| 354 | | expansion_ram_end = 0x9fff; |
| 355 | | shadow_ram_end = 0; |
| 356 | | break; |
| 357 | | case 0x02: // "32KB Lil' WHITE RAM Expansion |
| 358 | | expansion_ram_start = 0x5000; |
| 359 | | expansion_ram_end = 0xcfff; |
| 360 | | shadow_ram_end = 0xffff; |
| 361 | | break; |
| 362 | | case 0x04: // R&L 64K RAM Board (44KB installed) |
| 363 | | expansion_ram_start = 0x5000; |
| 364 | | expansion_ram_end = 0xffff; |
| 365 | | shadow_ram_end = 0; |
| 366 | | break; |
| 367 | | case 0x08: // 4KB Blue RAM Expansion |
| 368 | | expansion_ram_start = 0x6000; |
| 369 | | expansion_ram_end = 0x6fff; |
| 370 | | shadow_ram_end = 0; |
| 371 | | break; |
| 372 | | case 0x10: // 16KB Blue RAM Expansion |
| 373 | | expansion_ram_start = 0x6000; |
| 374 | | expansion_ram_end = 0x9fff; |
| 375 | | shadow_ram_end = 0; |
| 376 | | break; |
| 377 | | case 0x20: // 32KB Blue RAM Expansion |
| 378 | | expansion_ram_start = 0x6000; |
| 379 | | expansion_ram_end = 0xdfff; |
| 380 | | shadow_ram_end = 0; |
| 381 | | break; |
| 382 | | default: |
| 383 | | break; |
| 384 | | } |
| 385 | | } |
| 386 | | |
| 387 | | |
| 388 | | /************************************* |
| 389 | | * |
| 390 | | * Driver definitions |
| 391 | | * |
| 392 | | *************************************/ |
| 393 | | |
| 394 | | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 395 | | CONS( 1978, astrocde, 0, 0, astrocde, astrocde, astrocde, "Bally Manufacturing", "Bally Professional Arcade", GAME_SUPPORTS_SAVE ) |
| 396 | | CONS( 1977, astrocdl, astrocde, 0, astrocde, astrocde, astrocde, "Bally Manufacturing", "Bally Home Library Computer", GAME_SUPPORTS_SAVE ) |
| 397 | | CONS( 1977, astrocdw, astrocde, 0, astrocde, astrocde, astrocde, "Bally Manufacturing", "Bally Computer System", GAME_SUPPORTS_SAVE ) |
src/mess/drivers/sms.c
| r13301 | r13302 | |
| 1 | | /****************************************************************************** |
| 2 | | Contributors: |
| 3 | | |
| 4 | | Marat Fayzullin (MG source) |
| 5 | | Charles MacDonald |
| 6 | | Mathis Rosenhauer |
| 7 | | Brad Oliver |
| 8 | | Michael Luong |
| 9 | | |
| 10 | | To do: |
| 11 | | |
| 12 | | - SIO interface for Game Gear (needs netplay, I guess) |
| 13 | | - SMS lightgun support |
| 14 | | - LCD persistence emulation for GG |
| 15 | | - SMS 3D glass support |
| 16 | | |
| 17 | | The Game Gear SIO hardware is not emulated but has some |
| 18 | | placeholders in 'machine/sms.c' |
| 19 | | |
| 20 | | Changes: |
| 21 | | Apr 02 - Added raster palette effects for SMS & GG (ML) |
| 22 | | - Added sprite collision (ML) |
| 23 | | - Added zoomed sprites (ML) |
| 24 | | May 02 - Fixed paging bug (ML) |
| 25 | | - Fixed sprite and tile priority bug (ML) |
| 26 | | - Fixed bug #66 (ML) |
| 27 | | - Fixed bug #78 (ML) |
| 28 | | - try to implement LCD persistence emulation for GG (ML) |
| 29 | | Jun 10, 02 - Added bios emulation (ML) |
| 30 | | Jun 12, 02 - Added PAL & NTSC systems (ML) |
| 31 | | Jun 25, 02 - Added border emulation (ML) |
| 32 | | Jun 27, 02 - Version bits for Game Gear (bits 6 of port 00) (ML) |
| 33 | | Nov-Dec, 05 - Numerous cleanups, fixes, updates (WP) |
| 34 | | Mar, 07 - More cleanups, fixes, mapper additions, etc (WP) |
| 35 | | |
| 36 | | SMS Store Unit memory map for the second CPU: |
| 37 | | |
| 38 | | 0000-3FFF - BIOS |
| 39 | | 4000-47FF - RAM |
| 40 | | 8000 - System Control Register (R/W) |
| 41 | | Reading: |
| 42 | | bit7 - ready (0 = ready, 1 = not ready) |
| 43 | | bit6-bit5 - unknown |
| 44 | | bit4-bit3 - timer selection bit switches |
| 45 | | bit2-bit0 - unknown |
| 46 | | Writing: |
| 47 | | bit7-bit4 - unknown, maybe led of selected game to set? |
| 48 | | bit3 - unknown, 1 seems to be written all the time |
| 49 | | bit2 - unknown, 1 seems to be written all the time |
| 50 | | bit1 - reset signal for sms cpu, 0 = reset low, 1 = reset high |
| 51 | | bit0 - which cpu receives interrupt signals, 0 = sms cpu, 1 = controlling cpu |
| 52 | | C000 - Card/Cartridge selction register (W) |
| 53 | | bit7-bit4 - slot to select |
| 54 | | bit3 - slot type (0 = cartridge, 1 = card ?) |
| 55 | | bit2-bit0 - unknown |
| 56 | | C400 - ???? (used once) |
| 57 | | D800 - Selection buttons #1, 1-8 (R) |
| 58 | | DC00 - Selection buttons #2, 9-16 (R) |
| 59 | | |
| 60 | | ******************************************************************************/ |
| 61 | | |
| 62 | | #include "emu.h" |
| 63 | | #include "cpu/z80/z80.h" |
| 64 | | #include "sound/sn76496.h" |
| 65 | | #include "sound/2413intf.h" |
| 66 | | #include "includes/sms.h" |
| 67 | | #include "video/smsvdp.h" |
| 68 | | #include "imagedev/cartslot.h" |
| 69 | | |
| 70 | | #include "sms1.lh" |
| 71 | | |
| 72 | | #define MASTER_CLOCK_PAL 53203400 /* This might be a tiny bit too low */ |
| 73 | | |
| 74 | | |
| 75 | | static ADDRESS_MAP_START( sms1_mem, AS_PROGRAM, 8 ) |
| 76 | | AM_RANGE(0x0000, 0x03ff) AM_ROMBANK("bank1") /* First 0x0400 part always points to first page */ |
| 77 | | AM_RANGE(0x0400, 0x3fff) AM_ROMBANK("bank2") /* switchable rom bank */ |
| 78 | | AM_RANGE(0x4000, 0x5fff) AM_ROMBANK("bank3") /* switchable rom bank */ |
| 79 | | AM_RANGE(0x6000, 0x7fff) AM_ROMBANK("bank4") /* switchable rom bank */ |
| 80 | | AM_RANGE(0x8000, 0x9fff) AM_READ_BANK("bank5") AM_WRITE(sms_cartram_w) /* ROM bank / on-cart RAM */ |
| 81 | | AM_RANGE(0xa000, 0xbfff) AM_READ_BANK("bank6") AM_WRITE(sms_cartram2_w) /* ROM bank / on-cart RAM */ |
| 82 | | AM_RANGE(0xc000, 0xdff7) AM_MIRROR(0x2000) AM_RAM /* RAM (mirror at 0xE000) */ |
| 83 | | AM_RANGE(0xdff8, 0xdfff) AM_RAM /* RAM "underneath" frame registers */ |
| 84 | | AM_RANGE(0xfff8, 0xfffb) AM_READWRITE(sms_sscope_r, sms_sscope_w) /* 3-D glasses */ |
| 85 | | AM_RANGE(0xfffc, 0xffff) AM_READWRITE(sms_mapper_r, sms_mapper_w) /* Bankswitch control */ |
| 86 | | ADDRESS_MAP_END |
| 87 | | |
| 88 | | static ADDRESS_MAP_START( sms_mem, AS_PROGRAM, 8 ) |
| 89 | | AM_RANGE(0x0000, 0x03ff) AM_ROMBANK("bank1") /* First 0x0400 part always points to first page */ |
| 90 | | AM_RANGE(0x0400, 0x3fff) AM_ROMBANK("bank2") /* switchable rom bank */ |
| 91 | | AM_RANGE(0x4000, 0x5fff) AM_ROMBANK("bank3") /* switchable rom bank */ |
| 92 | | AM_RANGE(0x6000, 0x7fff) AM_ROMBANK("bank4") /* switchable rom bank */ |
| 93 | | AM_RANGE(0x8000, 0x9fff) AM_READ_BANK("bank5") AM_WRITE(sms_cartram_w) /* ROM bank / on-cart RAM */ |
| 94 | | AM_RANGE(0xa000, 0xbfff) AM_READ_BANK("bank6") AM_WRITE(sms_cartram2_w) /* ROM bank / on-cart RAM */ |
| 95 | | AM_RANGE(0xc000, 0xdffb) AM_MIRROR(0x2000) AM_RAM /* RAM (mirror at 0xE000) */ |
| 96 | | AM_RANGE(0xdffc, 0xdfff) AM_RAM /* RAM "underneath" frame registers */ |
| 97 | | AM_RANGE(0xfffc, 0xffff) AM_READWRITE(sms_mapper_r, sms_mapper_w) /* Bankswitch control */ |
| 98 | | ADDRESS_MAP_END |
| 99 | | |
| 100 | | static ADDRESS_MAP_START( sms_store_mem, AS_PROGRAM, 8 ) |
| 101 | | AM_RANGE(0x0000, 0x3fff) AM_ROM /* BIOS */ |
| 102 | | AM_RANGE(0x4000, 0x47ff) AM_RAM /* RAM */ |
| 103 | | AM_RANGE(0x6000, 0x7fff) AM_ROMBANK("bank10") /* Cartridge/card peek area */ |
| 104 | | AM_RANGE(0x8000, 0x8000) AM_READWRITE(sms_store_control_r, sms_store_control_w) /* Control */ |
| 105 | | AM_RANGE(0xc000, 0xc000) AM_READWRITE(sms_store_cart_select_r, sms_store_cart_select_w) /* cartridge/card slot selector */ |
| 106 | | AM_RANGE(0xd800, 0xd800) AM_READ(sms_store_select1) /* Game selector port #1 */ |
| 107 | | AM_RANGE(0xdc00, 0xdc00) AM_READ(sms_store_select2) /* Game selector port #2 */ |
| 108 | | ADDRESS_MAP_END |
| 109 | | |
| 110 | | static ADDRESS_MAP_START( sms_io, AS_IO, 8 ) |
| 111 | | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 112 | | ADDRESS_MAP_UNMAP_HIGH |
| 113 | | AM_RANGE(0x00, 0x00) AM_MIRROR(0x3e) AM_WRITE(sms_bios_w) |
| 114 | | AM_RANGE(0x01, 0x01) AM_MIRROR(0x3e) AM_WRITE(sms_io_control_w) |
| 115 | | AM_RANGE(0x40, 0x7f) AM_READ(sms_count_r) |
| 116 | | AM_RANGE(0x40, 0x7f) AM_DEVWRITE("segapsg", sn76496_w) |
| 117 | | AM_RANGE(0x80, 0x80) AM_MIRROR(0x3e) AM_DEVREADWRITE("sms_vdp", sms_vdp_data_r, sms_vdp_data_w) |
| 118 | | AM_RANGE(0x81, 0x81) AM_MIRROR(0x3e) AM_DEVREADWRITE("sms_vdp", sms_vdp_ctrl_r, sms_vdp_ctrl_w) |
| 119 | | AM_RANGE(0xc0, 0xc0) AM_MIRROR(0x1e) AM_READ(sms_input_port_0_r) |
| 120 | | AM_RANGE(0xc1, 0xc1) AM_MIRROR(0x1e) AM_READ(sms_input_port_1_r) |
| 121 | | AM_RANGE(0xe0, 0xe0) AM_MIRROR(0x0e) AM_READ(sms_input_port_0_r) |
| 122 | | AM_RANGE(0xe1, 0xe1) AM_MIRROR(0x0e) AM_READ(sms_input_port_1_r) |
| 123 | | AM_RANGE(0xf0, 0xf0) AM_READWRITE(sms_input_port_0_r, sms_ym2413_register_port_0_w) |
| 124 | | AM_RANGE(0xf1, 0xf1) AM_READWRITE(sms_input_port_1_r, sms_ym2413_data_port_0_w) |
| 125 | | AM_RANGE(0xf2, 0xf2) AM_READWRITE(sms_fm_detect_r, sms_fm_detect_w) |
| 126 | | AM_RANGE(0xf3, 0xf3) AM_READ(sms_input_port_1_r) |
| 127 | | AM_RANGE(0xf4, 0xf4) AM_MIRROR(0x02) AM_READ(sms_input_port_0_r) |
| 128 | | AM_RANGE(0xf5, 0xf5) AM_MIRROR(0x02) AM_READ(sms_input_port_1_r) |
| 129 | | AM_RANGE(0xf8, 0xf8) AM_MIRROR(0x06) AM_READ(sms_input_port_0_r) |
| 130 | | AM_RANGE(0xf9, 0xf9) AM_MIRROR(0x06) AM_READ(sms_input_port_1_r) |
| 131 | | ADDRESS_MAP_END |
| 132 | | |
| 133 | | static ADDRESS_MAP_START( gg_io, AS_IO, 8 ) |
| 134 | | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 135 | | ADDRESS_MAP_UNMAP_HIGH |
| 136 | | AM_RANGE(0x00, 0x00) AM_READ(gg_input_port_2_r) |
| 137 | | AM_RANGE(0x01, 0x05) AM_READWRITE(gg_sio_r, gg_sio_w) |
| 138 | | AM_RANGE(0x06, 0x06) AM_DEVWRITE("gamegear", sn76496_stereo_w) |
| 139 | | AM_RANGE(0x07, 0x07) AM_WRITE(sms_io_control_w) |
| 140 | | AM_RANGE(0x08, 0x08) AM_MIRROR(0x06) AM_WRITE(sms_bios_w) |
| 141 | | AM_RANGE(0x09, 0x09) AM_MIRROR(0x06) AM_WRITE(sms_io_control_w) |
| 142 | | AM_RANGE(0x10, 0x10) AM_MIRROR(0x0e) AM_WRITE(sms_bios_w) |
| 143 | | AM_RANGE(0x11, 0x11) AM_MIRROR(0x0e) AM_WRITE(sms_io_control_w) |
| 144 | | AM_RANGE(0x20, 0x20) AM_MIRROR(0x1e) AM_WRITE(sms_bios_w) |
| 145 | | AM_RANGE(0x21, 0x21) AM_MIRROR(0x1e) AM_WRITE(sms_io_control_w) |
| 146 | | AM_RANGE(0x40, 0x7f) AM_READ(sms_count_r) |
| 147 | | AM_RANGE(0x40, 0x7f) AM_DEVWRITE("gamegear", sn76496_w) |
| 148 | | AM_RANGE(0x80, 0x80) AM_MIRROR(0x3e) AM_DEVREADWRITE("sms_vdp", sms_vdp_data_r, sms_vdp_data_w) |
| 149 | | AM_RANGE(0x81, 0x81) AM_MIRROR(0x3e) AM_DEVREADWRITE("sms_vdp", sms_vdp_ctrl_r, sms_vdp_ctrl_w) |
| 150 | | AM_RANGE(0xc0, 0xc0) AM_READ_PORT("PORT_DC") |
| 151 | | AM_RANGE(0xc1, 0xc1) AM_READ_PORT("PORT_DD") |
| 152 | | AM_RANGE(0xdc, 0xdc) AM_READ_PORT("PORT_DC") |
| 153 | | AM_RANGE(0xdd, 0xdd) AM_READ_PORT("PORT_DD") |
| 154 | | ADDRESS_MAP_END |
| 155 | | |
| 156 | | |
| 157 | | static INPUT_PORTS_START( sms ) |
| 158 | | PORT_START("PORT_DC") |
| 159 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_8WAY PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x00) |
| 160 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_8WAY PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x00) |
| 161 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_8WAY PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x00) |
| 162 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_8WAY PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x00) |
| 163 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x00) |
| 164 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x00) |
| 165 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_8WAY PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x00) |
| 166 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_8WAY PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x00) |
| 167 | | |
| 168 | | PORT_START("PORT_DD") |
| 169 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_8WAY PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x00) |
| 170 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_8WAY PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x00) |
| 171 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x00) |
| 172 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x00) |
| 173 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) /* Software Reset bit */ |
| 174 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 175 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) /* Port A TH */ |
| 176 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) /* Port B TH */ |
| 177 | | |
| 178 | | PORT_START("PAUSE") |
| 179 | | PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 180 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START ) PORT_NAME(DEF_STR(Pause)) |
| 181 | | |
| 182 | | PORT_START("LPHASER0") /* Light phaser X - player 1 */ |
| 183 | | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR( X, 1.0, 0.0, 0 ) PORT_SENSITIVITY(50) PORT_KEYDELTA(15) PORT_PLAYER(1) PORT_CHANGED(lgun1_changed, NULL) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) |
| 184 | | |
| 185 | | PORT_START("LPHASER1") /* Light phaser Y - player 1 */ |
| 186 | | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR( Y, 1.0, 0.0, 0 ) PORT_SENSITIVITY(50) PORT_KEYDELTA(15) PORT_PLAYER(1) PORT_CHANGED(lgun1_changed, NULL) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) |
| 187 | | |
| 188 | | PORT_START("LPHASER2") /* Light phaser X - player 2 */ |
| 189 | | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR( X, 1.0, 0.0, 0 ) PORT_SENSITIVITY(50) PORT_KEYDELTA(15) PORT_PLAYER(2) PORT_CHANGED(lgun2_changed, NULL) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) |
| 190 | | |
| 191 | | PORT_START("LPHASER3") /* Light phaser Y - player 2 */ |
| 192 | | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR( Y, 1.0, 0.0, 0 ) PORT_SENSITIVITY(50) PORT_KEYDELTA(25) PORT_PLAYER(2) PORT_CHANGED(lgun2_changed, NULL) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) |
| 193 | | |
| 194 | | PORT_START("RFU") /* Rapid Fire Unit */ |
| 195 | | PORT_CONFNAME( 0x03, 0x00, "Rapid Fire Unit - Player 1" ) |
| 196 | | PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) |
| 197 | | PORT_CONFSETTING( 0x01, "Button A" ) |
| 198 | | PORT_CONFSETTING( 0x02, "Button B" ) |
| 199 | | PORT_CONFSETTING( 0x03, "Button A + B" ) |
| 200 | | PORT_CONFNAME( 0x0c, 0x00, "Rapid Fire Unit - Player 2" ) |
| 201 | | PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) |
| 202 | | PORT_CONFSETTING( 0x04, "Button A" ) |
| 203 | | PORT_CONFSETTING( 0x08, "Button B" ) |
| 204 | | PORT_CONFSETTING( 0x0c, "Button A + B" ) |
| 205 | | |
| 206 | | PORT_START("PADDLE0") /* Paddle player 1 */ |
| 207 | | PORT_BIT( 0xff, 0x80, IPT_PADDLE) PORT_SENSITIVITY(40) PORT_KEYDELTA(20) PORT_CENTERDELTA(0) PORT_MINMAX(0,255) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x02) |
| 208 | | |
| 209 | | PORT_START("PADDLE1") /* Paddle player 2 */ |
| 210 | | PORT_BIT( 0xff, 0x80, IPT_PADDLE) PORT_SENSITIVITY(40) PORT_KEYDELTA(20) PORT_CENTERDELTA(0) PORT_MINMAX(0,255) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x20) |
| 211 | | |
| 212 | | PORT_START("CTRLIPT") /* Light Phaser and Paddle Control buttons */ |
| 213 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) |
| 214 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x02) |
| 215 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x04) |
| 216 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x04) |
| 217 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) |
| 218 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x20) |
| 219 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x40) |
| 220 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x40) |
| 221 | | |
| 222 | | PORT_START("CTRLSEL") /* Controller selection */ |
| 223 | | PORT_CONFNAME( 0x0f, 0x00, "Player 1 Controller" ) |
| 224 | | PORT_CONFSETTING( 0x00, DEF_STR( Joystick ) ) |
| 225 | | PORT_CONFSETTING( 0x01, "Light Phaser" ) |
| 226 | | PORT_CONFSETTING( 0x02, "Sega Paddle Control" ) |
| 227 | | PORT_CONFSETTING( 0x04, "Sega Sports Pad" ) |
| 228 | | PORT_CONFNAME( 0xf0, 0x00, "Player 2 Controller" ) |
| 229 | | PORT_CONFSETTING( 0x00, DEF_STR( Joystick ) ) |
| 230 | | PORT_CONFSETTING( 0x10, "Light Phaser" ) |
| 231 | | PORT_CONFSETTING( 0x20, "Sega Paddle Control" ) |
| 232 | | PORT_CONFSETTING( 0x40, "Sega Sports Pad" ) |
| 233 | | |
| 234 | | PORT_START("SPORT0") /* Player 1 Sports Pad X axis */ |
| 235 | | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(40) PORT_RESET PORT_REVERSE PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x04) |
| 236 | | |
| 237 | | PORT_START("SPORT1") /* Player 1 Sports Pad Y axis */ |
| 238 | | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(50) PORT_KEYDELTA(40) PORT_RESET PORT_REVERSE PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x04) |
| 239 | | |
| 240 | | PORT_START("SPORT2") /* Player 2 Sports Pad X axis */ |
| 241 | | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(40) PORT_RESET PORT_REVERSE PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x40) |
| 242 | | |
| 243 | | PORT_START("SPORT3") /* Player 2 Sports Pad Y axis */ |
| 244 | | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(50) PORT_KEYDELTA(40) PORT_RESET PORT_REVERSE PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x40) |
| 245 | | INPUT_PORTS_END |
| 246 | | |
| 247 | | static INPUT_PORTS_START( sms1 ) |
| 248 | | PORT_INCLUDE( sms ) |
| 249 | | |
| 250 | | PORT_START("RESET") |
| 251 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Reset Button") |
| 252 | | |
| 253 | | PORT_START("SEGASCOPE") |
| 254 | | PORT_CONFNAME( 0x01, 0x00, "SegaScope (3-D Glasses)" ) |
| 255 | | PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) |
| 256 | | PORT_CONFSETTING( 0x01, DEF_STR( On ) ) |
| 257 | | |
| 258 | | PORT_START("SSCOPE_BINOCULAR") |
| 259 | | PORT_CONFNAME( 0x03, 0x00, "SegaScope - Binocular Hack" ) PORT_CONDITION("SEGASCOPE", 0x01, PORTCOND_EQUALS, 0x01) |
| 260 | | PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) |
| 261 | | PORT_CONFSETTING( 0x01, "Left Lens" ) |
| 262 | | PORT_CONFSETTING( 0x02, "Right Lens" ) |
| 263 | | PORT_CONFSETTING( 0x03, "Both Lens" ) |
| 264 | | PORT_BIT( 0x03, 0x00, IPT_UNUSED ) PORT_CONDITION("SEGASCOPE", 0x01, PORTCOND_EQUALS, 0x00) |
| 265 | | INPUT_PORTS_END |
| 266 | | |
| 267 | | static INPUT_PORTS_START( smsj ) |
| 268 | | PORT_INCLUDE( sms1 ) |
| 269 | | |
| 270 | | PORT_START("TVDRAW") |
| 271 | | PORT_CONFNAME( 0x01, 0x00, "Terebi Oekaki Graphics Tablet" ) |
| 272 | | PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) |
| 273 | | PORT_CONFSETTING( 0x01, DEF_STR( On ) ) |
| 274 | | |
| 275 | | PORT_START("TVDRAW_X") |
| 276 | | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_NAME("Tablet - X Axis") PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_PLAYER(1) |
| 277 | | PORT_CONDITION("TVDRAW", 0x01, PORTCOND_EQUALS, 0x01) |
| 278 | | |
| 279 | | PORT_START("TVDRAW_Y") |
| 280 | | PORT_BIT( 0xff, 0x60, IPT_LIGHTGUN_Y ) PORT_NAME("Tablet - Y Axis") PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_MINMAX(0, 191) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_PLAYER(1) |
| 281 | | PORT_CONDITION("TVDRAW", 0x01, PORTCOND_EQUALS, 0x01) |
| 282 | | |
| 283 | | PORT_START("TVDRAW_PEN") |
| 284 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Tablet - Pen") PORT_CONDITION("TVDRAW", 0x01, PORTCOND_EQUALS, 0x01) |
| 285 | | INPUT_PORTS_END |
| 286 | | |
| 287 | | static INPUT_PORTS_START( gg ) |
| 288 | | PORT_START("PORT_DC") |
| 289 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_8WAY |
| 290 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_8WAY |
| 291 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_8WAY |
| 292 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_8WAY |
| 293 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 294 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 295 | | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 296 | | |
| 297 | | PORT_START("PORT_DD") |
| 298 | | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 299 | | |
| 300 | | PORT_START("START") |
| 301 | | PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 302 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START ) PORT_NAME("Start") /* Game Gear START */ |
| 303 | | INPUT_PORTS_END |
| 304 | | |
| 305 | | static PALETTE_INIT( sms ) |
| 306 | | { |
| 307 | | int i; |
| 308 | | for (i = 0; i < 64; i++) |
| 309 | | { |
| 310 | | int r = i & 0x03; |
| 311 | | int g = (i & 0x0c) >> 2; |
| 312 | | int b = (i & 0x30) >> 4; |
| 313 | | palette_set_color_rgb(machine, i, r << 6, g << 6, b << 6); |
| 314 | | } |
| 315 | | /* TMS9918 palette */ |
| 316 | | palette_set_color_rgb(machine, 64+ 0, 0, 0, 0); |
| 317 | | palette_set_color_rgb(machine, 64+ 1, 0, 0, 0); |
| 318 | | palette_set_color_rgb(machine, 64+ 2, 33, 200, 66); |
| 319 | | palette_set_color_rgb(machine, 64+ 3, 94, 220, 120); |
| 320 | | palette_set_color_rgb(machine, 64+ 4, 84, 85, 237); |
| 321 | | palette_set_color_rgb(machine, 64+ 5, 125, 118, 252); |
| 322 | | palette_set_color_rgb(machine, 64+ 6, 212, 82, 77); |
| 323 | | palette_set_color_rgb(machine, 64+ 7, 66, 235, 245); |
| 324 | | palette_set_color_rgb(machine, 64+ 8, 252, 85, 84); |
| 325 | | palette_set_color_rgb(machine, 64+ 9, 255, 121, 120); |
| 326 | | palette_set_color_rgb(machine, 64+10, 212, 193, 84); |
| 327 | | palette_set_color_rgb(machine, 64+11, 230, 206, 128); |
| 328 | | palette_set_color_rgb(machine, 64+12, 33, 176, 59); |
| 329 | | palette_set_color_rgb(machine, 64+13, 201, 91, 186); |
| 330 | | palette_set_color_rgb(machine, 64+14, 204, 204, 204); |
| 331 | | palette_set_color_rgb(machine, 64+15, 255, 255, 255); |
| 332 | | } |
| 333 | | |
| 334 | | static PALETTE_INIT( gamegear ) |
| 335 | | { |
| 336 | | int i; |
| 337 | | for (i = 0; i < 4096; i++) |
| 338 | | { |
| 339 | | int r = i & 0x000f; |
| 340 | | int g = (i & 0x00f0) >> 4; |
| 341 | | int b = (i & 0x0f00) >> 8; |
| 342 | | palette_set_color_rgb(machine, i, r << 4, g << 4, b << 4); |
| 343 | | } |
| 344 | | } |
| 345 | | |
| 346 | | |
| 347 | | |
| 348 | | static void sms_int_callback( running_machine &machine, int state ) |
| 349 | | { |
| 350 | | cputag_set_input_line(machine, "maincpu", 0, state); |
| 351 | | } |
| 352 | | |
| 353 | | static const smsvdp_interface _315_5124_intf = |
| 354 | | { |
| 355 | | MODEL_315_5124, |
| 356 | | sms_int_callback, |
| 357 | | sms_pause_callback |
| 358 | | }; |
| 359 | | |
| 360 | | static const smsvdp_interface _315_5246_intf = |
| 361 | | { |
| 362 | | MODEL_315_5246, |
| 363 | | sms_int_callback, |
| 364 | | sms_pause_callback |
| 365 | | }; |
| 366 | | |
| 367 | | static const smsvdp_interface _315_5378_intf = |
| 368 | | { |
| 369 | | MODEL_315_5378, |
| 370 | | sms_int_callback, |
| 371 | | sms_pause_callback |
| 372 | | }; |
| 373 | | |
| 374 | | static const smsvdp_interface sms_store_intf = |
| 375 | | { |
| 376 | | MODEL_315_5124, |
| 377 | | sms_store_int_callback, |
| 378 | | sms_pause_callback |
| 379 | | }; |
| 380 | | |
| 381 | | static MACHINE_CONFIG_FRAGMENT( sms_cartslot ) |
| 382 | | MCFG_CARTSLOT_ADD("cart1") |
| 383 | | MCFG_CARTSLOT_EXTENSION_LIST("sms,bin") |
| 384 | | MCFG_CARTSLOT_NOT_MANDATORY |
| 385 | | MCFG_CARTSLOT_INTERFACE("sms_cart") |
| 386 | | MCFG_CARTSLOT_START(sms_cart) |
| 387 | | MCFG_CARTSLOT_LOAD(sms_cart) |
| 388 | | |
| 389 | | MCFG_SOFTWARE_LIST_ADD("cart_list","sms") |
| 390 | | MACHINE_CONFIG_END |
| 391 | | |
| 392 | | static MACHINE_CONFIG_FRAGMENT( gg_cartslot ) |
| 393 | | MCFG_CARTSLOT_ADD("cart1") |
| 394 | | MCFG_CARTSLOT_EXTENSION_LIST("gg,bin") |
| 395 | | MCFG_CARTSLOT_MANDATORY |
| 396 | | MCFG_CARTSLOT_INTERFACE("gamegear_cart") |
| 397 | | MCFG_CARTSLOT_START(sms_cart) |
| 398 | | MCFG_CARTSLOT_LOAD(sms_cart) |
| 399 | | |
| 400 | | MCFG_SOFTWARE_LIST_ADD("cart_list","gamegear") |
| 401 | | MACHINE_CONFIG_END |
| 402 | | |
| 403 | | static MACHINE_CONFIG_START( sms_ntsc_base, sms_state ) |
| 404 | | /* basic machine hardware */ |
| 405 | | MCFG_CPU_ADD("maincpu", Z80, XTAL_53_693175MHz/15) |
| 406 | | MCFG_CPU_PROGRAM_MAP(sms_mem) |
| 407 | | MCFG_CPU_IO_MAP(sms_io) |
| 408 | | |
| 409 | | MCFG_QUANTUM_TIME(attotime::from_hz(60)) |
| 410 | | |
| 411 | | MCFG_MACHINE_START(sms) |
| 412 | | MCFG_MACHINE_RESET(sms) |
| 413 | | |
| 414 | | /* sound hardware */ |
| 415 | | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 416 | | MCFG_SOUND_ADD("segapsg", SEGAPSG, XTAL_53_693175MHz/15) |
| 417 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 418 | | |
| 419 | | MCFG_FRAGMENT_ADD( sms_cartslot ) |
| 420 | | MACHINE_CONFIG_END |
| 421 | | |
| 422 | | static MACHINE_CONFIG_DERIVED( sms2_ntsc, sms_ntsc_base ) |
| 423 | | /* video hardware */ |
| 424 | | MCFG_SCREEN_ADD("screen", RASTER) |
| 425 | | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) |
| 426 | | MCFG_SCREEN_RAW_PARAMS(XTAL_53_693175MHz/10, SMS_X_PIXELS, LBORDER_START + LBORDER_X_PIXELS - 2, LBORDER_START + LBORDER_X_PIXELS + 256 + 10, NTSC_Y_PIXELS, TBORDER_START + NTSC_224_TBORDER_Y_PIXELS, TBORDER_START + NTSC_224_TBORDER_Y_PIXELS + 224) |
| 427 | | MCFG_SCREEN_UPDATE(sms) |
| 428 | | |
| 429 | | MCFG_PALETTE_LENGTH(64+16) |
| 430 | | MCFG_PALETTE_INIT(sms) |
| 431 | | |
| 432 | | MCFG_SMSVDP_ADD("sms_vdp", _315_5246_intf) |
| 433 | | MACHINE_CONFIG_END |
| 434 | | |
| 435 | | static MACHINE_CONFIG_DERIVED( sms1_ntsc, sms_ntsc_base ) |
| 436 | | |
| 437 | | MCFG_CPU_MODIFY("maincpu") |
| 438 | | MCFG_CPU_PROGRAM_MAP(sms1_mem) // This adds the SegaScope handlers for 3-D glasses |
| 439 | | MCFG_CPU_IO_MAP(sms_io) |
| 440 | | |
| 441 | | /* video hardware */ |
| 442 | | MCFG_SCREEN_ADD("screen", RASTER) |
| 443 | | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) |
| 444 | | MCFG_SCREEN_RAW_PARAMS(XTAL_53_693175MHz/10, SMS_X_PIXELS, LBORDER_START + LBORDER_X_PIXELS - 2, LBORDER_START + LBORDER_X_PIXELS + 256 + 10, NTSC_Y_PIXELS, TBORDER_START + NTSC_224_TBORDER_Y_PIXELS, TBORDER_START + NTSC_224_TBORDER_Y_PIXELS + 224) |
| 445 | | MCFG_SCREEN_UPDATE(sms1) |
| 446 | | |
| 447 | | MCFG_SCREEN_ADD("left_lcd", LCD) // This is needed for SegaScope Left LCD |
| 448 | | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) |
| 449 | | MCFG_SCREEN_RAW_PARAMS(XTAL_53_693175MHz/10, SMS_X_PIXELS, LBORDER_START + LBORDER_X_PIXELS - 2, LBORDER_START + LBORDER_X_PIXELS + 256 + 10, NTSC_Y_PIXELS, TBORDER_START + NTSC_224_TBORDER_Y_PIXELS, TBORDER_START + NTSC_224_TBORDER_Y_PIXELS + 224) |
| 450 | | MCFG_SCREEN_UPDATE(sms1) |
| 451 | | |
| 452 | | MCFG_SCREEN_ADD("right_lcd", LCD) // This is needed for SegaScope Right LCD |
| 453 | | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) |
| 454 | | MCFG_SCREEN_RAW_PARAMS(XTAL_53_693175MHz/10, SMS_X_PIXELS, LBORDER_START + LBORDER_X_PIXELS - 2, LBORDER_START + LBORDER_X_PIXELS + 256 + 10, NTSC_Y_PIXELS, TBORDER_START + NTSC_224_TBORDER_Y_PIXELS, TBORDER_START + NTSC_224_TBORDER_Y_PIXELS + 224) |
| 455 | | MCFG_SCREEN_UPDATE(sms1) |
| 456 | | |
| 457 | | MCFG_DEFAULT_LAYOUT(layout_sms1) |
| 458 | | |
| 459 | | MCFG_PALETTE_LENGTH(64+16) |
| 460 | | MCFG_PALETTE_INIT(sms) |
| 461 | | |
| 462 | | MCFG_VIDEO_START(sms1) |
| 463 | | |
| 464 | | MCFG_SMSVDP_ADD("sms_vdp", _315_5124_intf) |
| 465 | | MACHINE_CONFIG_END |
| 466 | | |
| 467 | | #define MCFG_SMSSDISP_CARTSLOT_ADD(_tag) \ |
| 468 | | MCFG_CARTSLOT_ADD(_tag) \ |
| 469 | | MCFG_CARTSLOT_EXTENSION_LIST("sms,bin") \ |
| 470 | | MCFG_CARTSLOT_NOT_MANDATORY \ |
| 471 | | MCFG_CARTSLOT_INTERFACE("sms_cart") \ |
| 472 | | MCFG_CARTSLOT_START(sms_cart) \ |
| 473 | | MCFG_CARTSLOT_LOAD(sms_cart) |
| 474 | | |
| 475 | | static MACHINE_CONFIG_DERIVED( sms_sdisp, sms2_ntsc ) |
| 476 | | |
| 477 | | MCFG_DEVICE_REMOVE("sms_vdp") |
| 478 | | MCFG_SMSVDP_ADD("sms_vdp", sms_store_intf) |
| 479 | | |
| 480 | | MCFG_CPU_ADD("control", Z80, XTAL_53_693175MHz/15) |
| 481 | | MCFG_CPU_PROGRAM_MAP(sms_store_mem) |
| 482 | | /* Both CPUs seem to communicate with the VDP etc? */ |
| 483 | | MCFG_CPU_IO_MAP(sms_io) |
| 484 | | |
| 485 | | MCFG_CARTSLOT_MODIFY("cart1") |
| 486 | | MCFG_CARTSLOT_EXTENSION_LIST("sms,bin") |
| 487 | | MCFG_CARTSLOT_MANDATORY |
| 488 | | MCFG_CARTSLOT_INTERFACE("sms_cart") |
| 489 | | MCFG_CARTSLOT_START(sms_cart) |
| 490 | | MCFG_CARTSLOT_LOAD(sms_cart) |
| 491 | | |
| 492 | | MCFG_SMSSDISP_CARTSLOT_ADD("cart2") |
| 493 | | MCFG_SMSSDISP_CARTSLOT_ADD("cart3") |
| 494 | | MCFG_SMSSDISP_CARTSLOT_ADD("cart4") |
| 495 | | MCFG_SMSSDISP_CARTSLOT_ADD("cart5") |
| 496 | | MCFG_SMSSDISP_CARTSLOT_ADD("cart6") |
| 497 | | MCFG_SMSSDISP_CARTSLOT_ADD("cart7") |
| 498 | | MCFG_SMSSDISP_CARTSLOT_ADD("cart8") |
| 499 | | MCFG_SMSSDISP_CARTSLOT_ADD("cart9") |
| 500 | | MCFG_SMSSDISP_CARTSLOT_ADD("cart10") |
| 501 | | MCFG_SMSSDISP_CARTSLOT_ADD("cart11") |
| 502 | | MCFG_SMSSDISP_CARTSLOT_ADD("cart12") |
| 503 | | MCFG_SMSSDISP_CARTSLOT_ADD("cart13") |
| 504 | | MCFG_SMSSDISP_CARTSLOT_ADD("cart14") |
| 505 | | MCFG_SMSSDISP_CARTSLOT_ADD("cart15") |
| 506 | | MCFG_SMSSDISP_CARTSLOT_ADD("cart16") |
| 507 | | MACHINE_CONFIG_END |
| 508 | | |
| 509 | | static MACHINE_CONFIG_START( sms_pal_base, sms_state ) |
| 510 | | /* basic machine hardware */ |
| 511 | | MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK_PAL/15) |
| 512 | | MCFG_CPU_PROGRAM_MAP(sms_mem) |
| 513 | | MCFG_CPU_IO_MAP(sms_io) |
| 514 | | |
| 515 | | MCFG_QUANTUM_TIME(attotime::from_hz(60)) |
| 516 | | |
| 517 | | MCFG_MACHINE_START(sms) |
| 518 | | MCFG_MACHINE_RESET(sms) |
| 519 | | |
| 520 | | /* sound hardware */ |
| 521 | | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 522 | | MCFG_SOUND_ADD("segapsg", SEGAPSG, MASTER_CLOCK_PAL/15) |
| 523 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 524 | | |
| 525 | | MCFG_FRAGMENT_ADD( sms_cartslot ) |
| 526 | | MACHINE_CONFIG_END |
| 527 | | |
| 528 | | static MACHINE_CONFIG_DERIVED( sms2_pal, sms_pal_base ) |
| 529 | | |
| 530 | | /* video hardware */ |
| 531 | | MCFG_SCREEN_ADD("screen", RASTER) |
| 532 | | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) |
| 533 | | MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK_PAL/10, SMS_X_PIXELS, LBORDER_START + LBORDER_X_PIXELS - 2, LBORDER_START + LBORDER_X_PIXELS + 256 + 10, PAL_Y_PIXELS, TBORDER_START + PAL_240_TBORDER_Y_PIXELS, TBORDER_START + PAL_240_TBORDER_Y_PIXELS + 240) |
| 534 | | MCFG_SCREEN_UPDATE(sms) |
| 535 | | |
| 536 | | MCFG_PALETTE_LENGTH(64+16) |
| 537 | | MCFG_PALETTE_INIT(sms) |
| 538 | | |
| 539 | | MCFG_SMSVDP_ADD("sms_vdp", _315_5246_intf) |
| 540 | | MACHINE_CONFIG_END |
| 541 | | |
| 542 | | static MACHINE_CONFIG_DERIVED( sms1_pal, sms_pal_base ) |
| 543 | | |
| 544 | | MCFG_CPU_MODIFY("maincpu") |
| 545 | | MCFG_CPU_PROGRAM_MAP(sms1_mem) // This adds the SegaScope handlers for 3-D glasses |
| 546 | | MCFG_CPU_IO_MAP(sms_io) |
| 547 | | |
| 548 | | /* video hardware */ |
| 549 | | MCFG_SCREEN_ADD("screen", RASTER) |
| 550 | | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) |
| 551 | | MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK_PAL/10, SMS_X_PIXELS, LBORDER_START + LBORDER_X_PIXELS - 2, LBORDER_START + LBORDER_X_PIXELS + 256 + 10, PAL_Y_PIXELS, TBORDER_START + PAL_240_TBORDER_Y_PIXELS, TBORDER_START + PAL_240_TBORDER_Y_PIXELS + 240) |
| 552 | | MCFG_SCREEN_UPDATE(sms1) |
| 553 | | |
| 554 | | MCFG_SCREEN_ADD("left_lcd", LCD) // This is needed for SegaScope Left LCD |
| 555 | | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) |
| 556 | | MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK_PAL/10, SMS_X_PIXELS, LBORDER_START + LBORDER_X_PIXELS - 2, LBORDER_START + LBORDER_X_PIXELS + 256 + 10, PAL_Y_PIXELS, TBORDER_START + PAL_240_TBORDER_Y_PIXELS, TBORDER_START + PAL_240_TBORDER_Y_PIXELS + 240) |
| 557 | | MCFG_SCREEN_UPDATE(sms1) |
| 558 | | |
| 559 | | MCFG_SCREEN_ADD("right_lcd", LCD) // This is needed for SegaScope Right LCD |
| 560 | | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) |
| 561 | | MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK_PAL/10, SMS_X_PIXELS, LBORDER_START + LBORDER_X_PIXELS - 2, LBORDER_START + LBORDER_X_PIXELS + 256 + 10, PAL_Y_PIXELS, TBORDER_START + PAL_240_TBORDER_Y_PIXELS, TBORDER_START + PAL_240_TBORDER_Y_PIXELS + 240) |
| 562 | | MCFG_SCREEN_UPDATE(sms1) |
| 563 | | |
| 564 | | MCFG_PALETTE_LENGTH(64+16) |
| 565 | | MCFG_PALETTE_INIT(sms) |
| 566 | | |
| 567 | | MCFG_DEFAULT_LAYOUT(layout_sms1) |
| 568 | | |
| 569 | | MCFG_SMSVDP_ADD("sms_vdp", _315_5124_intf) |
| 570 | | MACHINE_CONFIG_END |
| 571 | | |
| 572 | | static MACHINE_CONFIG_DERIVED( sms_fm, sms1_ntsc ) |
| 573 | | |
| 574 | | MCFG_SOUND_ADD("ym2413", YM2413, XTAL_53_693175MHz/15) |
| 575 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 576 | | MACHINE_CONFIG_END |
| 577 | | |
| 578 | | static MACHINE_CONFIG_DERIVED( sg1000m3, sms_fm ) |
| 579 | | |
| 580 | | MCFG_CARTSLOT_MODIFY("cart1") |
| 581 | | MCFG_CARTSLOT_EXTENSION_LIST("sms,bin,sg") |
| 582 | | MCFG_CARTSLOT_MANDATORY |
| 583 | | MCFG_CARTSLOT_START(sms_cart) |
| 584 | | MCFG_CARTSLOT_LOAD(sms_cart) |
| 585 | | MACHINE_CONFIG_END |
| 586 | | |
| 587 | | static MACHINE_CONFIG_DERIVED( sms2_fm, sms2_ntsc ) |
| 588 | | |
| 589 | | MCFG_SOUND_ADD("ym2413", YM2413, XTAL_53_693175MHz/15) |
| 590 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 591 | | MACHINE_CONFIG_END |
| 592 | | |
| 593 | | static MACHINE_CONFIG_START( gamegear, sms_state ) |
| 594 | | /* basic machine hardware */ |
| 595 | | MCFG_CPU_ADD("maincpu", Z80, XTAL_53_693175MHz/15) |
| 596 | | MCFG_CPU_PROGRAM_MAP(sms_mem) |
| 597 | | MCFG_CPU_IO_MAP(gg_io) |
| 598 | | |
| 599 | | MCFG_QUANTUM_TIME(attotime::from_hz(60)) |
| 600 | | |
| 601 | | MCFG_MACHINE_START(sms) |
| 602 | | MCFG_MACHINE_RESET(sms) |
| 603 | | |
| 604 | | /* video hardware */ |
| 605 | | MCFG_SCREEN_ADD("screen", LCD) |
| 606 | | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) |
| 607 | | MCFG_SCREEN_RAW_PARAMS(XTAL_53_693175MHz/10, SMS_X_PIXELS, LBORDER_START + LBORDER_X_PIXELS + 6*8, LBORDER_START + LBORDER_X_PIXELS + 26*8, NTSC_Y_PIXELS, TBORDER_START + NTSC_192_TBORDER_Y_PIXELS + 3*8, TBORDER_START + NTSC_192_TBORDER_Y_PIXELS + 21*8 ) |
| 608 | | MCFG_SCREEN_UPDATE(gamegear) |
| 609 | | |
| 610 | | MCFG_PALETTE_LENGTH(4096) |
| 611 | | MCFG_PALETTE_INIT(gamegear) |
| 612 | | |
| 613 | | MCFG_VIDEO_START(gamegear) |
| 614 | | |
| 615 | | MCFG_SMSVDP_ADD("sms_vdp", _315_5378_intf) |
| 616 | | |
| 617 | | /* sound hardware */ |
| 618 | | MCFG_SPEAKER_STANDARD_STEREO("lspeaker","rspeaker") |
| 619 | | MCFG_SOUND_ADD("gamegear", GAMEGEAR, XTAL_53_693175MHz/15) |
| 620 | | MCFG_SOUND_ROUTE(0, "lspeaker", 1.00) |
| 621 | | MCFG_SOUND_ROUTE(1, "rspeaker", 1.00) |
| 622 | | |
| 623 | | /* cartridge */ |
| 624 | | MCFG_FRAGMENT_ADD( gg_cartslot ) |
| 625 | | MACHINE_CONFIG_END |
| 626 | | |
| 627 | | |
| 628 | | ROM_START(sms1) |
| 629 | | ROM_REGION(0x4000, "maincpu", 0) |
| 630 | | ROM_FILL(0x0000, 0x4000, 0xff) |
| 631 | | |
| 632 | | ROM_REGION(0x20000, "user1", 0) |
| 633 | | ROM_SYSTEM_BIOS( 0, "bios13", "US/European BIOS v1.3 (1986)" ) |
| 634 | | ROMX_LOAD("bios13fx.rom", 0x0000, 0x2000, CRC(0072ED54) SHA1(c315672807d8ddb8d91443729405c766dd95cae7), ROM_BIOS(1)) |
| 635 | | ROM_SYSTEM_BIOS( 1, "hangonsh", "US/European BIOS v2.4 with Hang On and Safari Hunt (1988)" ) |
| 636 | | ROMX_LOAD("mpr-11459a.rom", 0x0000, 0x20000, CRC(91E93385) SHA1(9e179392cd416af14024d8f31c981d9ee9a64517), ROM_BIOS(2)) |
| 637 | | ROM_SYSTEM_BIOS( 2, "hangon", "US/European BIOS v3.4 with Hang On (1988)" ) |
| 638 | | ROMX_LOAD("mpr-11458.rom", 0x0000, 0x20000, CRC(8EDF7AC6) SHA1(51fd6d7990f62cd9d18c9ecfc62ed7936169107e), ROM_BIOS(3)) |
| 639 | | ROM_SYSTEM_BIOS( 3, "missiled", "US/European BIOS v4.4 with Missile Defense 3D (1988)" ) |
| 640 | | ROMX_LOAD("missiled.rom", 0x0000, 0x20000, CRC(E79BB689) SHA1(aa92ae576ca670b00855e278378d89e9f85e0351), ROM_BIOS(4)) |
| 641 | | ROM_SYSTEM_BIOS( 4, "proto", "US Master System Prototype BIOS" ) |
| 642 | | ROMX_LOAD("m404prot.rom", 0x0000, 0x2000, CRC(1a15dfcc) SHA1(4a06c8e66261611dce0305217c42138b71331701), ROM_BIOS(5)) |
| 643 | | ROM_END |
| 644 | | |
| 645 | | ROM_START(sms) |
| 646 | | ROM_REGION(0x4000, "maincpu", 0) |
| 647 | | ROM_FILL(0x0000, 0x4000, 0xff) |
| 648 | | |
| 649 | | ROM_REGION(0x20000, "user1", 0) |
| 650 | | ROM_SYSTEM_BIOS( 0, "alexkidd", "US/European BIOS with Alex Kidd in Miracle World (1990)" ) |
| 651 | | ROMX_LOAD("mpr-12808.ic2", 0x0000, 0x20000, CRC(CF4A09EA) SHA1(3af7b66248d34eb26da40c92bf2fa4c73a46a051), ROM_BIOS(1)) /* "SEGA // MPR-12808 W63 // 9114E9004" @ IC2 */ |
| 652 | | ROM_END |
| 653 | | |
| 654 | | ROM_START(smssdisp) |
| 655 | | ROM_REGION(0x4000, "maincpu", 0) |
| 656 | | ROM_FILL(0x0000, 0x4000, 0x00) |
| 657 | | |
| 658 | | ROM_REGION(0x4000, "user1", 0) |
| 659 | | ROM_FILL(0x0000, 0x4000, 0xff) |
| 660 | | |
| 661 | | ROM_REGION(0x4000, "control", 0) |
| 662 | | ROM_LOAD("smssdisp.rom", 0x0000, 0x4000, CRC(ee2c29ba) SHA1(fc465122134d95363112eb51b9ab71db3576cefd)) |
| 663 | | ROM_END |
| 664 | | |
| 665 | | ROM_START(sms1pal) |
| 666 | | ROM_REGION(0x4000, "maincpu", 0) |
| 667 | | ROM_FILL(0x0000, 0x4000, 0xff) |
| 668 | | |
| 669 | | ROM_REGION(0x20000, "user1", 0) |
| 670 | | ROM_SYSTEM_BIOS( 0, "bios13", "US/European BIOS v1.3 (1986)" ) |
| 671 | | ROMX_LOAD("bios13fx.rom", 0x0000, 0x2000, CRC(0072ED54) SHA1(c315672807d8ddb8d91443729405c766dd95cae7), ROM_BIOS(1)) |
| 672 | | ROM_SYSTEM_BIOS( 1, "hangonsh", "US/European BIOS v2.4 with Hang On and Safari Hunt (1988)" ) |
| 673 | | ROMX_LOAD("mpr-11459a.rom", 0x0000, 0x20000, CRC(91E93385) SHA1(9e179392cd416af14024d8f31c981d9ee9a64517), ROM_BIOS(2)) |
| 674 | | ROM_SYSTEM_BIOS( 2, "hangon", "Sega Master System - US/European BIOS v3.4 with Hang On (1988)" ) |
| 675 | | ROMX_LOAD("mpr-11458.rom", 0x0000, 0x20000, CRC(8EDF7AC6) SHA1(51fd6d7990f62cd9d18c9ecfc62ed7936169107e), ROM_BIOS(3)) |
| 676 | | ROM_SYSTEM_BIOS( 3, "missiled", "US/European BIOS v4.4 with Missile Defense 3D (1988)" ) |
| 677 | | ROMX_LOAD("missiled.rom", 0x0000, 0x20000, CRC(E79BB689) SHA1(aa92ae576ca670b00855e278378d89e9f85e0351), ROM_BIOS(4)) |
| 678 | | ROM_END |
| 679 | | |
| 680 | | ROM_START(smspal) |
| 681 | | ROM_REGION(0x4000, "maincpu", 0) |
| 682 | | ROM_FILL(0x0000, 0x4000, 0xff) |
| 683 | | |
| 684 | | ROM_REGION(0x40000, "user1", 0) |
| 685 | | ROM_SYSTEM_BIOS( 0, "alexkidd", "US/European BIOS with Alex Kidd in Miracle World (1990)" ) /* PCB Label: SEGA // IC BD M4Jr. PAL" Master System II with 314-5246 (ZIP) VDP and 314-5237 (DIP48) IO */ |
| 686 | | ROMX_LOAD("mpr-12808.ic2", 0x0000, 0x20000, CRC(CF4A09EA) SHA1(3af7b66248d34eb26da40c92bf2fa4c73a46a051), ROM_BIOS(1)) /* "SEGA // MPR-12808 W63 // 9114E9004" @ IC2 */ |
| 687 | | ROM_SYSTEM_BIOS( 1, "sonic", "European/Brazilian BIOS with Sonic the Hedgehog (1991)" ) |
| 688 | | ROMX_LOAD("sonbios.rom", 0x0000, 0x40000, CRC(81C3476B) SHA1(6aca0e3dffe461ba1cb11a86cd4caf5b97e1b8df), ROM_BIOS(2)) |
| 689 | | ROM_END |
| 690 | | |
| 691 | | ROM_START(sg1000m3) |
| 692 | | ROM_REGION(0x4000, "maincpu", 0) |
| 693 | | ROM_FILL(0x0000, 0x4000, 0x00) |
| 694 | | ROM_END |
| 695 | | |
| 696 | | ROM_START(smsj) /* PCB Label: "SEGA(R) IC BOARD M4J MAIN // 837-6418"; has "YM2413 // 78 04 71 G" at IC10; Back of pcb has traces marked "171-5541 (C)SEGA 1987 MADE IN JAPAN" |
| 697 | | see http://www.smspower.org/Development/JapaneseSMS837-6418 */ |
| 698 | | ROM_REGION(0x4000, "maincpu", 0) |
| 699 | | ROM_FILL(0x0000, 0x4000, 0xff) |
| 700 | | |
| 701 | | ROM_REGION(0x4000, "user1", 0) |
| 702 | | ROM_SYSTEM_BIOS( 0, "jbios21", "Japanese BIOS v2.1 (1987)" ) |
| 703 | | ROMX_LOAD("mpr-11124.ic2", 0x0000, 0x2000, CRC(48D44A13) SHA1(a8c1b39a2e41137835eda6a5de6d46dd9fadbaf2), ROM_BIOS(1)) /* "SONY 7J06 // MPR-11124 // JAPAN 021" @ IC2 */ |
| 704 | | ROM_END |
| 705 | | |
| 706 | | ROM_START(sms2kr) |
| 707 | | ROM_REGION(0x4000, "maincpu", 0) |
| 708 | | ROM_FILL(0x0000, 0x4000, 0xff) |
| 709 | | |
| 710 | | ROM_REGION(0x20000, "user1", 0) |
| 711 | | ROM_SYSTEM_BIOS( 0, "akbioskr", "Samsung Gam*Boy II with Alex Kidd in Miracle World (1990)" ) |
| 712 | | ROMX_LOAD("akbioskr.rom", 0x000, 0x20000, CRC(9c5bad91) SHA1(2feafd8f1c40fdf1bd5668f8c5c02e5560945b17), ROM_BIOS(1)) |
| 713 | | ROM_END |
| 714 | | |
| 715 | | ROM_START(gamegear) |
| 716 | | ROM_REGION(0x4000, "maincpu", 0) |
| 717 | | ROM_FILL(0x0000, 0x4000, 0x00) |
| 718 | | |
| 719 | | ROM_REGION(0x0400, "user1", 0) |
| 720 | | ROM_SYSTEM_BIOS( 0, "none", "No BIOS" ) /* gamegear */ |
| 721 | | ROM_SYSTEM_BIOS( 1, "majesco", "Majesco BIOS" ) /* gamg */ |
| 722 | | ROMX_LOAD("majbios.rom", 0x0000, 0x0400, CRC(0EBEA9D4) SHA1(914aa165e3d879f060be77870d345b60cfeb4ede), ROM_BIOS(2)) |
| 723 | | ROM_END |
| 724 | | |
| 725 | | #define rom_gamegeaj rom_gamegear |
| 726 | | |
| 727 | | /*************************************************************************** |
| 728 | | |
| 729 | | Game driver(s) |
| 730 | | |
| 731 | | US |
| 732 | | - Sega Master System I (sms1) |
| 733 | | - prototype (M404) bios - 1986 |
| 734 | | - without built-in game v1.3 - 1986 |
| 735 | | - built-in Hang On/Safari Hunt v2.4 - 1988 |
| 736 | | - built-in Hang On v3.4 - 1988 |
| 737 | | - built-in Missile Defense 3-D v4.4 - 1988 |
| 738 | | - built-in Hang On/Astro Warrior ???? |
| 739 | | - Sega Master System II (sms) |
| 740 | | - built-in Alex Kidd in Miracle World - 1990 |
| 741 | | |
| 742 | | JP |
| 743 | | - Sega SG-1000 Mark III (sg1000m3) |
| 744 | | - no bios |
| 745 | | - Sega Master System (I) (smsj) |
| 746 | | - without built-in game v2.1 - 1987 |
| 747 | | |
| 748 | | KR |
| 749 | | - Sega Master System II (sms2kr) |
| 750 | | - built-in Alex Kidd in Miracle World (Korean) |
| 751 | | |
| 752 | | EU |
| 753 | | - Sega Master System I (sms1pal) |
| 754 | | - without built-in game v1.3 - 1986 |
| 755 | | - built-in Hang On/Safari Hunt v2.4 - 1988 |
| 756 | | - built-in Hang On v3.4 - 1988 |
| 757 | | - built-in Missile Defense 3-D v4.4 - 1988 |
| 758 | | - built-in Hang On/Astro Warrior ???? |
| 759 | | - Sega Master System II (smspal) |
| 760 | | - built-in Alex Kidd in Miracle World - 1990 |
| 761 | | - built-in Sonic the Hedgehog - 1991 |
| 762 | | |
| 763 | | BR |
| 764 | | - Sega Master System I - 1987 |
| 765 | | - Sega Master System II??? |
| 766 | | - Sega Master System III - Tec Toy, 1987 |
| 767 | | - Sega Master System Compact - Tec Toy, 1992 |
| 768 | | - Sega Master System Girl - Tec Toy, 1992 |
| 769 | | |
| 770 | | ***************************************************************************/ |
| 771 | | |
| 772 | | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 773 | | CONS( 1984, sg1000m3, sms, 0, sg1000m3, smsj, sg1000m3, "Sega", "SG-1000 Mark III", 0 ) |
| 774 | | CONS( 1986, sms1, sms, 0, sms1_ntsc, sms1, sms1, "Sega", "Master System I", 0 ) |
| 775 | | CONS( 1986, sms1pal, sms, 0, sms1_pal, sms1, sms1, "Sega", "Master System I (PAL)" , 0 ) |
| 776 | | CONS( 1986, smssdisp, sms, 0, sms_sdisp, sms, smssdisp, "Sega", "Master System Store Display Unit", GAME_NOT_WORKING ) |
| 777 | | CONS( 1987, smsj, sms, 0, sms_fm, smsj, smsj, "Sega", "Master System (Japan)", 0 ) |
| 778 | | CONS( 1990, sms, 0, 0, sms2_ntsc, sms, sms1, "Sega", "Master System II", 0 ) |
| 779 | | CONS( 1990, smspal, sms, 0, sms2_pal, sms, sms1, "Sega", "Master System II (PAL)", 0 ) |
| 780 | | CONS( 1990, sms2kr, sms, 0, sms2_fm, sms, sms2kr, "Samsung", "Gam*Boy II (Korea)", 0 ) |
| 781 | | |
| 782 | | CONS( 1990, gamegear, 0, sms, gamegear, gg, gamegear, "Sega", "Game Gear (Europe/America)", 0 ) |
| 783 | | CONS( 1990, gamegeaj, gamegear, 0, gamegear, gg, gamegeaj, "Sega", "Game Gear (Japan)", 0 ) |
src/mess/drivers/mephisto.c
| r13301 | r13302 | |
| 1 | | /****************************************************************************** |
| 2 | | Mephisto 4 + 5 Chess Computer |
| 3 | | 2007 Dirk V. |
| 4 | | |
| 5 | | CPU 65C02 P4 |
| 6 | | Clock 4.9152 MHz |
| 7 | | NMI CLK 600 Hz |
| 8 | | IRQ Line is set to VSS |
| 9 | | 8 KByte SRAM Sony CXK5864-15l |
| 10 | | |
| 11 | | 1-CD74HC4060E 14 Bit Counter |
| 12 | | 1-CD74HC166E |
| 13 | | 1-CD74HC251E |
| 14 | | 1-SN74HC138N TI |
| 15 | | 1-SN74HC139N TI |
| 16 | | 1-74HC14AP Toshiba |
| 17 | | 1-74HC02AP Toshiba |
| 18 | | 1-74HC00AP Toshiba |
| 19 | | 1-CD74HC259E |
| 20 | | |
| 21 | | |
| 22 | | $0000-$1fff S-RAM |
| 23 | | $2000 LCD 4 Byte Shift Register writeonly right to left |
| 24 | | every 2nd char xor'd by $FF |
| 25 | | |
| 26 | | 2c00-2c07 Keyboard (8to1 Multiplexer) 74HCT251 |
| 27 | | 2*8 Matrix |
| 28 | | Adr. 0x3407 |
| 29 | | ==0 !=0 |
| 30 | | 2c00 CL E5 |
| 31 | | 2c01 POS F6 |
| 32 | | 2c02 MEMO G7 |
| 33 | | 2c03 INFO A1 |
| 34 | | 2c04 LEV H8 |
| 35 | | 2c05 ENT B2 |
| 36 | | 2c06 >0 C3 |
| 37 | | 2c07 <9 D4 |
| 38 | | |
| 39 | | $3400-$3407 LED 1-6, Buzzer, Keyboard select |
| 40 | | |
| 41 | | $2400 // Chess Board |
| 42 | | $2800 // Chess Board |
| 43 | | $3000 // Chess Board |
| 44 | | |
| 45 | | $4000-7FFF Opening Modul HG550 |
| 46 | | $8000-$FFF ROM |
| 47 | | |
| 48 | | Mephisto 4 Turbo Kit 18mhz - (mm4tk) |
| 49 | | This is a replacement rom combining the turbo kit initial rom with the original MM IV. |
| 50 | | The Turbo Kit powers up to it's tiny rom, copies itself to ram, banks in normal rom, |
| 51 | | copies that to faster SRAM, then patches the checksum and the LED blink delays. |
| 52 | | If someone else wants to code up the power up banking, feel free |
| 53 | | |
| 54 | | There is an undumped MM V Turbo Kit, which will be the exact same except for location of |
| 55 | | the patches. The mm5tk just needs the normal mm5 ROM swapped out for that one to |
| 56 | | blinks the LEDs a little slower. |
| 57 | | |
| 58 | | -- Cowering (2011) |
| 59 | | |
| 60 | | 'rebel5' driver broke somewhere between 0.141 and 0.142 and is now marked as NOT_WORKING |
| 61 | | |
| 62 | | ***********************************************************************************************/ |
| 63 | | |
| 64 | | #define ADDRESS_MAP_MODERN |
| 65 | | |
| 66 | | #include "emu.h" |
| 67 | | #include "cpu/m6502/m6502.h" |
| 68 | | #include "sound/beep.h" |
| 69 | | //#include "mephisto.lh" |
| 70 | | |
| 71 | | #include "machine/mboard.h" |
| 72 | | |
| 73 | | |
| 74 | | class mephisto_state : public driver_device |
| 75 | | { |
| 76 | | public: |
| 77 | | mephisto_state(const machine_config &mconfig, device_type type, const char *tag) |
| 78 | | : driver_device(mconfig, type, tag), |
| 79 | | m_maincpu(*this, "maincpu"), |
| 80 | | m_beep(*this, BEEPER_TAG) |
| 81 | | { } |
| 82 | | |
| 83 | | required_device<cpu_device> m_maincpu; |
| 84 | | required_device<device_t> m_beep; |
| 85 | | DECLARE_WRITE8_MEMBER(write_lcd); |
| 86 | | DECLARE_WRITE8_MEMBER(mephisto_NMI); |
| 87 | | DECLARE_READ8_MEMBER(read_keys); |
| 88 | | DECLARE_WRITE8_MEMBER(write_led); |
| 89 | | DECLARE_WRITE8_MEMBER(write_led_mm2); |
| 90 | | UINT8 m_lcd_shift_counter; |
| 91 | | UINT8 m_led_status; |
| 92 | | //UINT8 *m_p_ram; |
| 93 | | UINT8 m_led7; |
| 94 | | UINT8 m_allowNMI; |
| 95 | | }; |
| 96 | | |
| 97 | | |
| 98 | | WRITE8_MEMBER( mephisto_state::write_lcd ) |
| 99 | | { |
| 100 | | if (m_led7 == 0) output_set_digit_value(m_lcd_shift_counter,data); // 0x109 MM IV // 0x040 MM V |
| 101 | | |
| 102 | | //output_set_digit_value(m_lcd_shift_counter,data ^ m_p_ram[0x165]); // 0x109 MM IV // 0x040 MM V |
| 103 | | m_lcd_shift_counter--; |
| 104 | | m_lcd_shift_counter &= 3; |
| 105 | | } |
| 106 | | |
| 107 | | WRITE8_MEMBER( mephisto_state::mephisto_NMI ) |
| 108 | | { |
| 109 | | m_allowNMI = 1; |
| 110 | | } |
| 111 | | |
| 112 | | READ8_MEMBER( mephisto_state::read_keys ) |
| 113 | | { |
| 114 | | UINT8 data; |
| 115 | | static const char *const keynames[2][8] = |
| 116 | | { |
| 117 | | { "KEY1_0", "KEY1_1", "KEY1_2", "KEY1_3", "KEY1_4", "KEY1_5", "KEY1_6", "KEY1_7" }, |
| 118 | | { "KEY2_0", "KEY2_1", "KEY2_2", "KEY2_3", "KEY2_4", "KEY2_5", "KEY2_6", "KEY2_7" } |
| 119 | | }; |
| 120 | | |
| 121 | | data = 0xff; |
| 122 | | if (((m_led_status & 0x80) == 0x00)) |
| 123 | | data=input_port_read(machine(), keynames[0][offset]); |
| 124 | | else |
| 125 | | data=input_port_read(machine(), keynames[1][offset]); |
| 126 | | |
| 127 | | logerror("Keyboard Port = %s Data = %d\n ", ((m_led_status & 0x80) == 0x00) ? keynames[0][offset] : keynames[1][offset], data); |
| 128 | | return data | 0x7f; |
| 129 | | } |
| 130 | | |
| 131 | | WRITE8_MEMBER( mephisto_state::write_led ) |
| 132 | | { |
| 133 | | UINT8 LED_offset=100; |
| 134 | | data &= 0x80; |
| 135 | | |
| 136 | | if (data==0)m_led_status &= 255-(1<<offset) ; else m_led_status|=1<<offset; |
| 137 | | if (offset<6)output_set_led_value(LED_offset+offset, m_led_status&1<<offset?1:0); |
| 138 | | if (offset==7) m_led7=data& 0x80 ? 0x00 :0xff; |
| 139 | | logerror("LEDs Offset = %d Data = %d\n",offset,data); |
| 140 | | } |
| 141 | | |
| 142 | | WRITE8_MEMBER( mephisto_state::write_led_mm2 ) |
| 143 | | { |
| 144 | | UINT8 LED_offset=100; |
| 145 | | data &= 0x80; |
| 146 | | |
| 147 | | if (data==0) |
| 148 | | m_led_status &= 255-(1<<offset); |
| 149 | | else |
| 150 | | m_led_status|=1<<offset; |
| 151 | | |
| 152 | | if (offset<6) |
| 153 | | output_set_led_value(LED_offset+offset, m_led_status&1<<offset?1:0); |
| 154 | | |
| 155 | | if (offset==7) |
| 156 | | m_led7= BIT(data, 7) ? 0xff :0x00; //MM2 |
| 157 | | } |
| 158 | | |
| 159 | | static ADDRESS_MAP_START( rebel5_mem, AS_PROGRAM, 8, mephisto_state ) |
| 160 | | AM_RANGE( 0x0000, 0x1fff) AM_RAM // AM_BASE(m_p_ram) |
| 161 | | AM_RANGE( 0x2000, 0x2007) AM_WRITE(write_led) // Status LEDs+ buzzer |
| 162 | | AM_RANGE( 0x3000, 0x3007) AM_READ(read_keys) // Rebel 5.0 |
| 163 | | AM_RANGE( 0x3000, 0x4000) AM_READ_LEGACY(mboard_read_board_8) // Chessboard |
| 164 | | AM_RANGE( 0x5000, 0x5000) AM_WRITE(write_lcd) |
| 165 | | AM_RANGE( 0x6000, 0x6000) AM_WRITE_LEGACY(mboard_write_LED_8) // Chessboard |
| 166 | | AM_RANGE( 0x7000, 0x7000) AM_WRITE_LEGACY(mboard_write_board_8) // Chessboard |
| 167 | | AM_RANGE( 0x8000, 0xffff) AM_ROM |
| 168 | | ADDRESS_MAP_END |
| 169 | | |
| 170 | | |
| 171 | | static ADDRESS_MAP_START( mephisto_mem, AS_PROGRAM, 8, mephisto_state ) |
| 172 | | AM_RANGE( 0x0000, 0x1fff) AM_RAM //AM_BASE(m_p_ram) |
| 173 | | AM_RANGE( 0x2000, 0x2000) AM_WRITE(write_lcd) |
| 174 | | AM_RANGE( 0x2400, 0x2407) AM_WRITE_LEGACY(mboard_write_LED_8) // Chessboard |
| 175 | | AM_RANGE( 0x2800, 0x2800) AM_WRITE_LEGACY(mboard_write_board_8) // Chessboard |
| 176 | | AM_RANGE( 0x2c00, 0x2c07) AM_READ(read_keys) |
| 177 | | AM_RANGE( 0x3000, 0x3000) AM_READ_LEGACY(mboard_read_board_8) // Chessboard |
| 178 | | AM_RANGE( 0x3400, 0x3407) AM_WRITE(write_led) // Status LEDs+ buzzer |
| 179 | | AM_RANGE( 0x3800, 0x3800) AM_WRITE(mephisto_NMI) // NMI enable |
| 180 | | AM_RANGE( 0x4000, 0x7fff) AM_ROM // Opening Library |
| 181 | | AM_RANGE( 0x8000, 0xffff) AM_ROM |
| 182 | | ADDRESS_MAP_END |
| 183 | | |
| 184 | | static ADDRESS_MAP_START( mm2_mem, AS_PROGRAM, 8, mephisto_state ) |
| 185 | | AM_RANGE( 0x0000, 0x0fff) AM_RAM //AM_BASE(m_p_ram) |
| 186 | | AM_RANGE( 0x1000, 0x1007) AM_WRITE(write_led_mm2) //Status LEDs |
| 187 | | AM_RANGE( 0x1800, 0x1807) AM_READ(read_keys) |
| 188 | | AM_RANGE( 0x2000, 0x2000) AM_READ_LEGACY(mboard_read_board_8) //Chessboard |
| 189 | | AM_RANGE( 0x2800, 0x2800) AM_WRITE(write_lcd) |
| 190 | | AM_RANGE( 0x3000, 0x3000) AM_WRITE_LEGACY(mboard_write_LED_8) //Chessboard |
| 191 | | AM_RANGE( 0x3800, 0x3800) AM_WRITE_LEGACY(mboard_write_board_8) //Chessboard |
| 192 | | AM_RANGE( 0x4000, 0x7fff) AM_ROM // Opening Library ? |
| 193 | | AM_RANGE( 0x8000, 0xffff) AM_ROM |
| 194 | | ADDRESS_MAP_END |
| 195 | | |
| 196 | | static INPUT_PORTS_START( board ) |
| 197 | | PORT_START("LINE2") |
| 198 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 199 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 200 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 201 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 202 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 203 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 204 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 205 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 206 | | PORT_START("LINE3") |
| 207 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 208 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 209 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 210 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 211 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 212 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 213 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 214 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 215 | | PORT_START("LINE4") |
| 216 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 217 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 218 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 219 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 220 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 221 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 222 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 223 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 224 | | PORT_START("LINE5") |
| 225 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 226 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 227 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 228 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 229 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 230 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 231 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 232 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 233 | | PORT_START("LINE6") |
| 234 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 235 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 236 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 237 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 238 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 239 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 240 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 241 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 242 | | PORT_START("LINE7") |
| 243 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 244 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 245 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 246 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 247 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 248 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 249 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 250 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 251 | | PORT_START("LINE8") |
| 252 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 253 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 254 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 255 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 256 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 257 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 258 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 259 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 260 | | PORT_START("LINE9") |
| 261 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 262 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 263 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 264 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 265 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 266 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 267 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 268 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 269 | | |
| 270 | | PORT_START("LINE10") |
| 271 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) |
| 272 | | |
| 273 | | PORT_START("B_WHITE") |
| 274 | | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) |
| 275 | | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) |
| 276 | | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) |
| 277 | | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) |
| 278 | | PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYBOARD) |
| 279 | | PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYBOARD) |
| 280 | | |
| 281 | | PORT_START("B_BLACK") |
| 282 | | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) |
| 283 | | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) |
| 284 | | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) |
| 285 | | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) |
| 286 | | PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYBOARD) |
| 287 | | PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYBOARD) |
| 288 | | |
| 289 | | PORT_START("B_BUTTONS") |
| 290 | | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) |
| 291 | | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) |
| 292 | | INPUT_PORTS_END |
| 293 | | |
| 294 | | static INPUT_PORTS_START( mephisto ) |
| 295 | | PORT_START("KEY1_0") //Port $2c00 |
| 296 | | PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CLEAR") PORT_CODE(KEYCODE_F1) |
| 297 | | PORT_START("KEY1_1") //Port $2c01 |
| 298 | | PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("POS") PORT_CODE(KEYCODE_F2) |
| 299 | | PORT_START("KEY1_2") //Port $2c02 |
| 300 | | PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("MEM") PORT_CODE(KEYCODE_F3) |
| 301 | | PORT_START("KEY1_3") //Port $2c03 |
| 302 | | PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("INFO") PORT_CODE(KEYCODE_F4) |
| 303 | | PORT_START("KEY1_4") //Port $2c04 |
| 304 | | PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("LEV") PORT_CODE(KEYCODE_F5) |
| 305 | | PORT_START("KEY1_5") //Port $2c05 |
| 306 | | PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ENT") PORT_CODE(KEYCODE_ENTER) |
| 307 | | PORT_START("KEY1_6") //Port $2c06 |
| 308 | | PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) |
| 309 | | PORT_START("KEY1_7") //Port $2c07 |
| 310 | | PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) |
| 311 | | |
| 312 | | PORT_START("KEY2_0") //Port $2c08 |
| 313 | | PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E 5") PORT_CODE(KEYCODE_E) PORT_CODE(KEYCODE_5) |
| 314 | | PORT_START("KEY2_1") //Port $2c09 |
| 315 | | PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F 6") PORT_CODE(KEYCODE_F) PORT_CODE(KEYCODE_6) |
| 316 | | PORT_START("KEY2_2") //Port $2c0a |
| 317 | | PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G 7") PORT_CODE(KEYCODE_G) PORT_CODE(KEYCODE_7) |
| 318 | | PORT_START("KEY2_3") //Port $2c0b |
| 319 | | PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A 1") PORT_CODE(KEYCODE_A) PORT_CODE(KEYCODE_1) |
| 320 | | PORT_START("KEY2_4") //Port $2c0c |
| 321 | | PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H 8") PORT_CODE(KEYCODE_H) PORT_CODE(KEYCODE_8) |
| 322 | | PORT_START("KEY2_5") //Port $2c0d |
| 323 | | PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B 2") PORT_CODE(KEYCODE_B) PORT_CODE(KEYCODE_2) |
| 324 | | PORT_START("KEY2_6") //Port $2c0e |
| 325 | | PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C 3") PORT_CODE(KEYCODE_C) PORT_CODE(KEYCODE_3) |
| 326 | | PORT_START("KEY2_7") //Port $2c0f |
| 327 | | PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D 4") PORT_CODE(KEYCODE_D) PORT_CODE(KEYCODE_4) |
| 328 | | |
| 329 | | PORT_INCLUDE( board ) |
| 330 | | INPUT_PORTS_END |
| 331 | | |
| 332 | | |
| 333 | | static TIMER_DEVICE_CALLBACK( update_nmi ) |
| 334 | | { |
| 335 | | mephisto_state *state = timer.machine().driver_data<mephisto_state>(); |
| 336 | | if (state->m_allowNMI) |
| 337 | | { |
| 338 | | state->m_allowNMI = 0; |
| 339 | | cputag_set_input_line(timer.machine(), "maincpu", INPUT_LINE_NMI,PULSE_LINE); |
| 340 | | } |
| 341 | | beep_set_state(state->m_beep, state->m_led_status&64?1:0); |
| 342 | | } |
| 343 | | |
| 344 | | static TIMER_DEVICE_CALLBACK( update_irq ) //only mm2 |
| 345 | | { |
| 346 | | mephisto_state *state = timer.machine().driver_data<mephisto_state>(); |
| 347 | | cputag_set_input_line(timer.machine(), "maincpu", M6502_IRQ_LINE, ASSERT_LINE); |
| 348 | | cputag_set_input_line(timer.machine(), "maincpu", M6502_IRQ_LINE, CLEAR_LINE); |
| 349 | | |
| 350 | | beep_set_state(state->m_beep, state->m_led_status&64?1:0); |
| 351 | | } |
| 352 | | |
| 353 | | static MACHINE_START( mephisto ) |
| 354 | | { |
| 355 | | mephisto_state *state = machine.driver_data<mephisto_state>(); |
| 356 | | state->m_lcd_shift_counter = 3; |
| 357 | | state->m_allowNMI = 1; |
| 358 | | mboard_savestate_register(machine); |
| 359 | | } |
| 360 | | |
| 361 | | static MACHINE_START( mm2 ) |
| 362 | | { |
| 363 | | mephisto_state *state = machine.driver_data<mephisto_state>(); |
| 364 | | state->m_lcd_shift_counter = 3; |
| 365 | | state->m_led7=0xff; |
| 366 | | |
| 367 | | mboard_savestate_register(machine); |
| 368 | | } |
| 369 | | |
| 370 | | |
| 371 | | static MACHINE_RESET( mephisto ) |
| 372 | | { |
| 373 | | mephisto_state *state = machine.driver_data<mephisto_state>(); |
| 374 | | state->m_lcd_shift_counter = 3; |
| 375 | | state->m_allowNMI = 1; |
| 376 | | mboard_set_border_pieces(); |
| 377 | | mboard_set_board(); |
| 378 | | |
| 379 | | /* adjust artwork depending on current emulation*/ |
| 380 | | |
| 381 | | if (!strcmp(machine.system().name,"mm2") ) |
| 382 | | output_set_value("MM",1); |
| 383 | | else if (!strcmp(machine.system().name,"mm4") ) |
| 384 | | output_set_value("MM",2); |
| 385 | | else if (!strcmp(machine.system().name,"mm4tk") ) |
| 386 | | output_set_value("MM",5); |
| 387 | | else if (!strcmp(machine.system().name,"mm5tk") ) |
| 388 | | output_set_value("MM",5); |
| 389 | | else if (!strcmp(machine.system().name,"mm5") ) |
| 390 | | output_set_value("MM",3); |
| 391 | | else if (!strcmp(machine.system().name,"mm50") ) |
| 392 | | output_set_value("MM",3); |
| 393 | | else if (!strcmp(machine.system().name,"rebel5") ) |
| 394 | | output_set_value("MM",4); |
| 395 | | } |
| 396 | | |
| 397 | | |
| 398 | | static MACHINE_CONFIG_START( mephisto, mephisto_state ) |
| 399 | | /* basic machine hardware */ |
| 400 | | MCFG_CPU_ADD("maincpu",M65C02,4915200) /* 65C02 */ |
| 401 | | MCFG_CPU_PROGRAM_MAP(mephisto_mem) |
| 402 | | MCFG_QUANTUM_TIME(attotime::from_hz(60)) |
| 403 | | MCFG_MACHINE_START( mephisto ) |
| 404 | | MCFG_MACHINE_RESET( mephisto ) |
| 405 | | |
| 406 | | /* sound hardware */ |
| 407 | | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 408 | | MCFG_SOUND_ADD(BEEPER_TAG, BEEP, 0) |
| 409 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 410 | | |
| 411 | | MCFG_TIMER_ADD_PERIODIC("nmi_timer", update_nmi, attotime::from_hz(600)) |
| 412 | | MCFG_TIMER_ADD_PERIODIC("artwork_timer", mboard_update_artwork, attotime::from_hz(100)) |
| 413 | | MACHINE_CONFIG_END |
| 414 | | |
| 415 | | static MACHINE_CONFIG_DERIVED( rebel5, mephisto ) |
| 416 | | /* basic machine hardware */ |
| 417 | | MCFG_CPU_MODIFY("maincpu") |
| 418 | | MCFG_CPU_PROGRAM_MAP(rebel5_mem) |
| 419 | | MACHINE_CONFIG_END |
| 420 | | |
| 421 | | static MACHINE_CONFIG_DERIVED( mm2, mephisto ) |
| 422 | | MCFG_CPU_REPLACE("maincpu", M65C02, 3700000) |
| 423 | | MCFG_CPU_PROGRAM_MAP(mm2_mem) |
| 424 | | MCFG_MACHINE_START( mm2 ) |
| 425 | | |
| 426 | | MCFG_DEVICE_REMOVE("nmi_timer") |
| 427 | | MCFG_TIMER_ADD_PERIODIC("irq_timer", update_irq, attotime::from_hz(450)) |
| 428 | | MACHINE_CONFIG_END |
| 429 | | |
| 430 | | static MACHINE_CONFIG_DERIVED( mm4tk, mephisto ) |
| 431 | | MCFG_CPU_MODIFY("maincpu") |
| 432 | | MCFG_CPU_REPLACE("maincpu", M65C02, 18000000) |
| 433 | | MCFG_CPU_PROGRAM_MAP(mephisto_mem) |
| 434 | | MACHINE_CONFIG_END |
| 435 | | |
| 436 | | ROM_START(rebel5) |
| 437 | | ROM_REGION(0x10000,"maincpu",0) |
| 438 | | ROM_LOAD("rebel5.rom", 0x8000, 0x8000, CRC(8d02e1ef) SHA1(9972c75936613bd68cfd3fe62bd222e90e8b1083)) |
| 439 | | ROM_END |
| 440 | | |
| 441 | | ROM_START(mm2) |
| 442 | | ROM_REGION(0x10000,"maincpu",0) |
| 443 | | ROM_LOAD("mm2_1.bin", 0x8000, 0x4000, CRC(e2daac82) SHA1(c9fa59ca92362f8ee770733073bfa2ab8c7904ad)) |
| 444 | | ROM_LOAD("mm2_2.bin", 0xc000, 0x4000, CRC(5e296939) SHA1(badd2a377259cf738cd076d8fb245c3dc284c24d)) |
| 445 | | ROM_END |
| 446 | | |
| 447 | | ROM_START(mm4) |
| 448 | | ROM_REGION(0x10000,"maincpu",0) |
| 449 | | ROM_LOAD("mephisto4.rom", 0x8000, 0x8000, CRC(f68a4124) SHA1(d1d03a9aacc291d5cb720d2ee2a209eeba13a36c)) |
| 450 | | ROM_SYSTEM_BIOS( 0, "none", "No Opening Library" ) |
| 451 | | ROM_SYSTEM_BIOS( 1, "hg440", "HG440 Opening Library" ) |
| 452 | | ROMX_LOAD( "hg440.rom", 0x4000, 0x4000, CRC(81ffcdfd) SHA1(b0f7bcc11d1e821daf92cde31e3446c8be0bbe19), ROM_BIOS(2)) |
| 453 | | ROM_END |
| 454 | | |
| 455 | | ROM_START(mm4tk) |
| 456 | | ROM_REGION(0x10000,"maincpu",0) |
| 457 | | ROM_LOAD("mm4tk.rom", 0x8000, 0x8000, CRC(51cb36a4) SHA1(9e184b4e85bb721e794b88d8657ae8d2ff5a24af)) |
| 458 | | ROM_SYSTEM_BIOS( 0, "none", "No Opening Library" ) |
| 459 | | ROM_SYSTEM_BIOS( 1, "hg440", "HG440 Opening Library" ) |
| 460 | | ROMX_LOAD( "hg440.rom", 0x4000, 0x4000, CRC(81ffcdfd) SHA1(b0f7bcc11d1e821daf92cde31e3446c8be0bbe19), ROM_BIOS(0)) |
| 461 | | ROM_END |
| 462 | | |
| 463 | | ROM_START(mm5tk) |
| 464 | | ROM_REGION(0x10000,"maincpu",0) |
| 465 | | ROM_LOAD("mephisto5.rom", 0x8000, 0x8000, BAD_DUMP CRC(89c3d9d2) SHA1(77cd6f8eeb03c713249db140d2541e3264328048)) |
| 466 | | ROM_SYSTEM_BIOS( 0, "none", "No Opening Library" ) |
| 467 | | ROM_SYSTEM_BIOS( 1, "hg550", "HG550 Opening Library" ) |
| 468 | | ROMX_LOAD("hg550.rom", 0x4000, 0x4000, CRC(0359f13d) SHA1(833cef8302ad8d283d3f95b1d325353c7e3b8614),ROM_BIOS(0)) |
| 469 | | ROM_END |
| 470 | | |
| 471 | | ROM_START(mm5) |
| 472 | | ROM_REGION(0x10000,"maincpu",0) |
| 473 | | ROM_LOAD("mephisto5.rom", 0x8000, 0x8000, CRC(89c3d9d2) SHA1(77cd6f8eeb03c713249db140d2541e3264328048)) |
| 474 | | ROM_SYSTEM_BIOS( 0, "none", "No Opening Library" ) |
| 475 | | ROM_SYSTEM_BIOS( 1, "hg550", "HG550 Opening Library" ) |
| 476 | | ROMX_LOAD("hg550.rom", 0x4000, 0x4000, CRC(0359f13d) SHA1(833cef8302ad8d283d3f95b1d325353c7e3b8614),ROM_BIOS(2)) |
| 477 | | ROM_END |
| 478 | | |
| 479 | | ROM_START(mm50) |
| 480 | | ROM_REGION(0x10000,"maincpu",0) |
| 481 | | ROM_LOAD("mm50.rom", 0x8000, 0x8000, CRC(fcfa7e6e) SHA1(afeac3a8c957ba58cefaa27b11df974f6f2066da)) |
| 482 | | ROM_SYSTEM_BIOS( 0, "none", "No Opening Library" ) |
| 483 | | ROM_SYSTEM_BIOS( 1, "hg550", "HG550 Opening Library" ) |
| 484 | | ROMX_LOAD("hg550.rom", 0x4000, 0x4000, CRC(0359f13d) SHA1(833cef8302ad8d283d3f95b1d325353c7e3b8614),ROM_BIOS(2)) |
| 485 | | ROM_END |
| 486 | | |
| 487 | | |
| 488 | | static DRIVER_INIT( mephisto ) |
| 489 | | { |
| 490 | | mephisto_state *state = machine.driver_data<mephisto_state>(); |
| 491 | | state->m_lcd_shift_counter = 3; |
| 492 | | } |
| 493 | | |
| 494 | | /*************************************************************************** |
| 495 | | |
| 496 | | Game driver(s) |
| 497 | | |
| 498 | | ***************************************************************************/ |
| 499 | | |
| 500 | | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 501 | | |
| 502 | | CONS( 1984, mm2, mm4, 0, mm2, mephisto, mephisto, "Hegener & Glaser", "Mephisto MM2 Schachcomputer", GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK ) |
| 503 | | CONS( 1986, rebel5, mm4, 0, rebel5, mephisto, mephisto, "Hegener & Glaser", "Mephisto Rebel 5 Schachcomputer", GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK|GAME_NOT_WORKING ) |
| 504 | | CONS( 1987, mm4, 0, 0, mephisto, mephisto, mephisto, "Hegener & Glaser", "Mephisto 4 Schachcomputer", GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK ) |
| 505 | | CONS( 1987, mm4tk, mm4, 0, mm4tk, mephisto, mephisto, "Hegener & Glaser", "Mephisto 4 Schachcomputer Turbo Kit + HG440", GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK ) |
| 506 | | CONS( 1990, mm5, mm4, 0, mephisto, mephisto, mephisto, "Hegener & Glaser", "Mephisto 5.1 Schachcomputer", GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK ) |
| 507 | | CONS( 1990, mm50, mm4, 0, mephisto, mephisto, mephisto, "Hegener & Glaser", "Mephisto 5.0 Schachcomputer", GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK ) |
| 508 | | CONS( 1990, mm5tk, mm4, 0, mm4tk, mephisto, mephisto, "Hegener & Glaser", "Mephisto 5.1 Schachcomputer Turbo Kit + HG550", GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK ) |
src/mess/drivers/jupace.c
| r0 | r13302 | |
| 1 | /*************************************************************************** |
| 2 | Jupiter Ace memory map |
| 3 | |
| 4 | CPU: Z80 |
| 5 | 0000-1fff ROM |
| 6 | 2000-23ff Mirror of 2400-27FF |
| 7 | 2400-27ff RAM (1K RAM used for screen and edit/cassette buffer) |
| 8 | 2800-2bff Mirror of 2C00-2FFF |
| 9 | 2c00-2fff RAM (1K RAM for char set, write only) |
| 10 | 3000-3bff Mirror of 3C00-3FFF |
| 11 | 3c00-3fff RAM (1K RAM standard) |
| 12 | 4000-7fff RAM (16K Expansion) |
| 13 | 8000-ffff RAM (48K Expansion) |
| 14 | |
| 15 | Interrupts: |
| 16 | |
| 17 | IRQ: |
| 18 | 50Hz vertical sync |
| 19 | |
| 20 | Ports: |
| 21 | |
| 22 | Out 0xfe: |
| 23 | Tape and buzzer |
| 24 | |
| 25 | In 0xfe: |
| 26 | Keyboard input, tape, and buzzer |
| 27 | |
| 28 | http://www.jupiter-ace.co.uk/ |
| 29 | |
| 30 | ***************************************************************************/ |
| 31 | |
| 32 | /* |
| 33 | |
| 34 | TODO: |
| 35 | |
| 36 | - Ace Colour Board |
| 37 | - 96K ram expansion |
| 38 | - Deep Thought disc interface (6850, 6821) |
| 39 | |
| 40 | */ |
| 41 | |
| 42 | #define ADDRESS_MAP_MODERN |
| 43 | |
| 44 | #include "emu.h" |
| 45 | #include "cpu/z80/z80.h" |
| 46 | #include "formats/ace_ace.h" |
| 47 | #include "formats/ace_tap.h" |
| 48 | #include "imagedev/cassette.h" |
| 49 | #include "imagedev/snapquik.h" |
| 50 | #include "machine/ctronics.h" |
| 51 | #include "machine/i8255.h" |
| 52 | #include "machine/ram.h" |
| 53 | #include "machine/z80pio.h" |
| 54 | #include "sound/ay8910.h" |
| 55 | #include "sound/sp0256.h" |
| 56 | #include "sound/speaker.h" |
| 57 | #include "sound/wave.h" |
| 58 | #include "includes/ace.h" |
| 59 | |
| 60 | |
| 61 | |
| 62 | //************************************************************************** |
| 63 | // READ/WRITE HANDLERS |
| 64 | //************************************************************************** |
| 65 | |
| 66 | //------------------------------------------------- |
| 67 | // io_r - |
| 68 | //------------------------------------------------- |
| 69 | |
| 70 | READ8_MEMBER( ace_state::io_r ) |
| 71 | { |
| 72 | UINT8 data = 0xff; |
| 73 | |
| 74 | if (!BIT(offset, 8)) data &= input_port_read(machine(), "A8"); |
| 75 | if (!BIT(offset, 9)) data &= input_port_read(machine(), "A9"); |
| 76 | if (!BIT(offset, 10)) data &= input_port_read(machine(), "A10"); |
| 77 | if (!BIT(offset, 11)) data &= input_port_read(machine(), "A11"); |
| 78 | if (!BIT(offset, 12)) data &= input_port_read(machine(), "A12"); |
| 79 | if (!BIT(offset, 13)) data &= input_port_read(machine(), "A13"); |
| 80 | if (!BIT(offset, 14)) data &= input_port_read(machine(), "A14"); |
| 81 | |
| 82 | if (!BIT(offset, 15)) |
| 83 | { |
| 84 | data &= input_port_read(machine(), "A15"); |
| 85 | |
| 86 | m_cassette->output(-1); |
| 87 | speaker_level_w(m_speaker, 0); |
| 88 | } |
| 89 | |
| 90 | if (m_cassette->input() > 0) |
| 91 | { |
| 92 | data &= ~0x20; |
| 93 | } |
| 94 | |
| 95 | return data; |
| 96 | } |
| 97 | |
| 98 | |
| 99 | //------------------------------------------------- |
| 100 | // io_w - |
| 101 | //------------------------------------------------- |
| 102 | |
| 103 | WRITE8_MEMBER( ace_state::io_w ) |
| 104 | { |
| 105 | m_cassette->output(1); |
| 106 | speaker_level_w(m_speaker, 1); |
| 107 | } |
| 108 | |
| 109 | |
| 110 | //------------------------------------------------- |
| 111 | // ppi_r - |
| 112 | //------------------------------------------------- |
| 113 | |
| 114 | READ8_MEMBER( ace_state::ppi_pa_r ) |
| 115 | { |
| 116 | return m_ppi->read(space, 0); |
| 117 | } |
| 118 | |
| 119 | READ8_MEMBER( ace_state::ppi_pb_r ) |
| 120 | { |
| 121 | return m_ppi->read(space, 1); |
| 122 | } |
| 123 | |
| 124 | READ8_MEMBER( ace_state::ppi_pc_r ) |
| 125 | { |
| 126 | return m_ppi->read(space, 2); |
| 127 | } |
| 128 | |
| 129 | READ8_MEMBER( ace_state::ppi_control_r ) |
| 130 | { |
| 131 | return m_ppi->read(space, 3); |
| 132 | } |
| 133 | |
| 134 | |
| 135 | //------------------------------------------------- |
| 136 | // ppi_w - |
| 137 | //------------------------------------------------- |
| 138 | |
| 139 | WRITE8_MEMBER( ace_state::ppi_pa_w ) |
| 140 | { |
| 141 | m_ppi->write(space, 0, data); |
| 142 | } |
| 143 | |
| 144 | WRITE8_MEMBER( ace_state::ppi_pb_w ) |
| 145 | { |
| 146 | m_ppi->write(space, 1, data); |
| 147 | } |
| 148 | |
| 149 | WRITE8_MEMBER( ace_state::ppi_pc_w ) |
| 150 | { |
| 151 | m_ppi->write(space, 2, data); |
| 152 | } |
| 153 | |
| 154 | WRITE8_MEMBER( ace_state::ppi_control_w ) |
| 155 | { |
| 156 | m_ppi->write(space, 3, data); |
| 157 | } |
| 158 | |
| 159 | |
| 160 | //------------------------------------------------- |
| 161 | // pio_r - |
| 162 | //------------------------------------------------- |
| 163 | |
| 164 | static READ8_DEVICE_HANDLER( pio_ad_r ) |
| 165 | { |
| 166 | return z80pio_d_r(device, 0); |
| 167 | } |
| 168 | |
| 169 | static READ8_DEVICE_HANDLER( pio_bd_r ) |
| 170 | { |
| 171 | return z80pio_d_r(device, 1); |
| 172 | } |
| 173 | |
| 174 | static READ8_DEVICE_HANDLER( pio_ac_r ) |
| 175 | { |
| 176 | return z80pio_c_r(device, 0); |
| 177 | } |
| 178 | |
| 179 | static READ8_DEVICE_HANDLER( pio_bc_r ) |
| 180 | { |
| 181 | return z80pio_c_r(device, 1); |
| 182 | } |
| 183 | |
| 184 | |
| 185 | //------------------------------------------------- |
| 186 | // pio_w - |
| 187 | //------------------------------------------------- |
| 188 | |
| 189 | static WRITE8_DEVICE_HANDLER( pio_ad_w ) |
| 190 | { |
| 191 | z80pio_d_w(device, 0, data); |
| 192 | } |
| 193 | |
| 194 | static WRITE8_DEVICE_HANDLER( pio_bd_w ) |
| 195 | { |
| 196 | z80pio_d_w(device, 1, data); |
| 197 | } |
| 198 | |
| 199 | static WRITE8_DEVICE_HANDLER( pio_ac_w ) |
| 200 | { |
| 201 | z80pio_c_w(device, 0, data); |
| 202 | } |
| 203 | |
| 204 | static WRITE8_DEVICE_HANDLER( pio_bc_w ) |
| 205 | { |
| 206 | z80pio_c_w(device, 1, data); |
| 207 | } |
| 208 | |
| 209 | |
| 210 | |
| 211 | //************************************************************************** |
| 212 | // ADDRESS MAPS |
| 213 | //************************************************************************** |
| 214 | |
| 215 | //------------------------------------------------- |
| 216 | // ADDRESS_MAP( ace_mem ) |
| 217 | //------------------------------------------------- |
| 218 | |
| 219 | static ADDRESS_MAP_START( ace_mem, AS_PROGRAM, 8, ace_state ) |
| 220 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 221 | AM_RANGE(0x2000, 0x23ff) AM_MIRROR(0x0400) AM_RAM AM_BASE(m_video_ram) |
| 222 | AM_RANGE(0x2800, 0x2bff) AM_MIRROR(0x0400) AM_RAM AM_BASE(m_char_ram) AM_REGION(Z80_TAG, 0xfc00) |
| 223 | AM_RANGE(0x3000, 0x33ff) AM_MIRROR(0x0c00) AM_RAM |
| 224 | AM_RANGE(0x4000, 0xffff) AM_RAM |
| 225 | ADDRESS_MAP_END |
| 226 | |
| 227 | |
| 228 | //------------------------------------------------- |
| 229 | // ADDRESS_MAP( ace_io ) |
| 230 | //------------------------------------------------- |
| 231 | |
| 232 | static ADDRESS_MAP_START( ace_io, AS_IO, 8, ace_state ) |
| 233 | AM_RANGE(0x00, 0x00) AM_MIRROR(0xfffe) AM_MASK(0xff00) AM_READWRITE(io_r, io_w) |
| 234 | AM_RANGE(0x01, 0x01) AM_MIRROR(0xff00) AM_READ_PORT("JOY") |
| 235 | AM_RANGE(0x41, 0x41) AM_MIRROR(0xff80) AM_READWRITE(ppi_pa_r, ppi_pa_w) |
| 236 | AM_RANGE(0x43, 0x43) AM_MIRROR(0xff80) AM_READWRITE(ppi_pb_r, ppi_pb_w) |
| 237 | AM_RANGE(0x45, 0x45) AM_MIRROR(0xff80) AM_READWRITE(ppi_pc_r, ppi_pc_w) |
| 238 | AM_RANGE(0x47, 0x47) AM_MIRROR(0xff80) AM_READWRITE(ppi_control_r, ppi_control_w) |
| 239 | AM_RANGE(0x81, 0x81) AM_MIRROR(0xff38) AM_DEVREADWRITE_LEGACY(Z80PIO_TAG, pio_ad_r, pio_ad_w) |
| 240 | AM_RANGE(0x83, 0x83) AM_MIRROR(0xff38) AM_DEVREADWRITE_LEGACY(Z80PIO_TAG, pio_bd_r, pio_bd_w) |
| 241 | AM_RANGE(0x85, 0x85) AM_MIRROR(0xff38) AM_DEVREADWRITE_LEGACY(Z80PIO_TAG, pio_ac_r, pio_ac_w) |
| 242 | AM_RANGE(0x87, 0x87) AM_MIRROR(0xff38) AM_DEVREADWRITE_LEGACY(Z80PIO_TAG, pio_bc_r, pio_bc_w) |
| 243 | AM_RANGE(0xfd, 0xfd) AM_MIRROR(0xff00) AM_DEVWRITE_LEGACY(AY8910_TAG, ay8910_address_w) |
| 244 | AM_RANGE(0xff, 0xff) AM_MIRROR(0xff00) AM_DEVREADWRITE_LEGACY(AY8910_TAG, ay8910_r, ay8910_data_w) |
| 245 | ADDRESS_MAP_END |
| 246 | |
| 247 | |
| 248 | |
| 249 | //************************************************************************** |
| 250 | // INPUT PORTS |
| 251 | //************************************************************************** |
| 252 | |
| 253 | //------------------------------------------------- |
| 254 | // INPUT_PORTS( ace ) |
| 255 | //------------------------------------------------- |
| 256 | |
| 257 | static INPUT_PORTS_START( ace ) |
| 258 | PORT_START("A8") |
| 259 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) |
| 260 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Symbol Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_2) |
| 261 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') PORT_CHAR(':') |
| 262 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') PORT_CHAR('\xA3') |
| 263 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') PORT_CHAR('?') |
| 264 | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 265 | |
| 266 | PORT_START("A9") |
| 267 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') PORT_CHAR('~') |
| 268 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') PORT_CHAR('|') |
| 269 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') PORT_CHAR('\\') |
| 270 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') PORT_CHAR('{') |
| 271 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') PORT_CHAR('}') |
| 272 | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 273 | |
| 274 | PORT_START("A10") |
| 275 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') |
| 276 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') |
| 277 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') |
| 278 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') PORT_CHAR('<') |
| 279 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') PORT_CHAR('>') |
| 280 | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 281 | |
| 282 | PORT_START("A11") |
| 283 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') |
| 284 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('@') |
| 285 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') |
| 286 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') |
| 287 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_LEFT) PORT_CHAR('5') PORT_CHAR('%') |
| 288 | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 289 | |
| 290 | PORT_START("A12") |
| 291 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR('_') |
| 292 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')') |
| 293 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR('8') PORT_CHAR('(') |
| 294 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_DOWN) PORT_CHAR('7') PORT_CHAR('\'') |
| 295 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_UP) PORT_CHAR('6') PORT_CHAR('&') |
| 296 | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 297 | |
| 298 | PORT_START("A13") |
| 299 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') PORT_CHAR('"') |
| 300 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') PORT_CHAR(';') |
| 301 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') PORT_CHAR(0x00A9) |
| 302 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') PORT_CHAR(']') |
| 303 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') PORT_CHAR('[') |
| 304 | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 305 | |
| 306 | PORT_START("A14") |
| 307 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) |
| 308 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') PORT_CHAR('=') |
| 309 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') PORT_CHAR('+') |
| 310 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') PORT_CHAR('-') |
| 311 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("h H \xE2\x86\x91") PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') |
| 312 | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 313 | |
| 314 | PORT_START("A15") |
| 315 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') |
| 316 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') PORT_CHAR('.') |
| 317 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') PORT_CHAR(',') |
| 318 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') PORT_CHAR('*') |
| 319 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') PORT_CHAR('/') |
| 320 | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 321 | |
| 322 | PORT_START("JOY") |
| 323 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) |
| 324 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) |
| 325 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) |
| 326 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) |
| 327 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 328 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) |
| 329 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 330 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 331 | INPUT_PORTS_END |
| 332 | |
| 333 | |
| 334 | |
| 335 | //************************************************************************** |
| 336 | // VIDEO |
| 337 | //************************************************************************** |
| 338 | |
| 339 | //------------------------------------------------- |
| 340 | // gfx_layout ace_charlayout |
| 341 | //------------------------------------------------- |
| 342 | |
| 343 | static const gfx_layout ace_charlayout = |
| 344 | { |
| 345 | 8,8, |
| 346 | 128, |
| 347 | 1, |
| 348 | { RGN_FRAC(0,1) }, |
| 349 | { STEP8(0,1) }, |
| 350 | { STEP8(0,8) }, |
| 351 | 8*8 |
| 352 | }; |
| 353 | |
| 354 | |
| 355 | //------------------------------------------------- |
| 356 | // GFXDECODE( ace ) |
| 357 | //------------------------------------------------- |
| 358 | |
| 359 | static GFXDECODE_START( ace ) |
| 360 | GFXDECODE_ENTRY( Z80_TAG, 0xfc00, ace_charlayout, 0, 1 ) |
| 361 | GFXDECODE_END |
| 362 | |
| 363 | |
| 364 | //------------------------------------------------- |
| 365 | // TIMER_DEVICE_CALLBACK( set_irq ) |
| 366 | //------------------------------------------------- |
| 367 | |
| 368 | static TIMER_DEVICE_CALLBACK( set_irq ) |
| 369 | { |
| 370 | cputag_set_input_line(timer.machine(), Z80_TAG, INPUT_LINE_IRQ0, ASSERT_LINE); |
| 371 | } |
| 372 | |
| 373 | |
| 374 | //------------------------------------------------- |
| 375 | // TIMER_DEVICE_CALLBACK( clear_irq ) |
| 376 | //------------------------------------------------- |
| 377 | |
| 378 | static TIMER_DEVICE_CALLBACK( clear_irq ) |
| 379 | { |
| 380 | cputag_set_input_line(timer.machine(), Z80_TAG, INPUT_LINE_IRQ0, CLEAR_LINE); |
| 381 | } |
| 382 | |
| 383 | |
| 384 | //------------------------------------------------- |
| 385 | // SCREEN_UPDATE( ace ) |
| 386 | //------------------------------------------------- |
| 387 | |
| 388 | bool ace_state::screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect) |
| 389 | { |
| 390 | UINT8 y,ra,chr,gfx; |
| 391 | UINT16 sy=56,ma=0,x; |
| 392 | |
| 393 | for (y = 0; y < 24; y++) |
| 394 | { |
| 395 | for (ra = 0; ra < 8; ra++) |
| 396 | { |
| 397 | UINT16 *p = BITMAP_ADDR16(&bitmap, sy++, 40); |
| 398 | |
| 399 | for (x = ma; x < ma+32; x++) |
| 400 | { |
| 401 | chr = m_video_ram[x]; |
| 402 | |
| 403 | /* get pattern of pixels for that character scanline */ |
| 404 | gfx = m_char_ram[((chr&0x7f)<<3) | ra] ^ (BIT(chr, 7) ? 0xff : 0); |
| 405 | |
| 406 | /* Display a scanline of a character (8 pixels) */ |
| 407 | *p++ = BIT(gfx, 7); |
| 408 | *p++ = BIT(gfx, 6); |
| 409 | *p++ = BIT(gfx, 5); |
| 410 | *p++ = BIT(gfx, 4); |
| 411 | *p++ = BIT(gfx, 3); |
| 412 | *p++ = BIT(gfx, 2); |
| 413 | *p++ = BIT(gfx, 1); |
| 414 | *p++ = BIT(gfx, 0); |
| 415 | } |
| 416 | } |
| 417 | ma+=32; |
| 418 | } |
| 419 | return 0; |
| 420 | } |
| 421 | |
| 422 | |
| 423 | |
| 424 | //************************************************************************** |
| 425 | // DEVICE CONFIGURATION |
| 426 | //************************************************************************** |
| 427 | |
| 428 | //------------------------------------------------- |
| 429 | // cassette_interface ace_cassette_interface |
| 430 | //------------------------------------------------- |
| 431 | |
| 432 | static const cassette_interface ace_cassette_interface = |
| 433 | { |
| 434 | ace_cassette_formats, |
| 435 | NULL, |
| 436 | (cassette_state)(CASSETTE_STOPPED), |
| 437 | NULL, |
| 438 | NULL |
| 439 | }; |
| 440 | |
| 441 | |
| 442 | //------------------------------------------------- |
| 443 | // ay8910_interface psg_intf |
| 444 | //------------------------------------------------- |
| 445 | |
| 446 | static const ay8910_interface psg_intf = |
| 447 | { |
| 448 | AY8910_LEGACY_OUTPUT, |
| 449 | AY8910_DEFAULT_LOADS, |
| 450 | DEVCB_NULL, |
| 451 | DEVCB_NULL, |
| 452 | DEVCB_NULL, |
| 453 | DEVCB_NULL |
| 454 | }; |
| 455 | |
| 456 | |
| 457 | //------------------------------------------------- |
| 458 | // sp0256_interface sp0256_intf |
| 459 | //------------------------------------------------- |
| 460 | |
| 461 | static const sp0256_interface sp0256_intf = |
| 462 | { |
| 463 | DEVCB_NULL, |
| 464 | DEVCB_NULL |
| 465 | }; |
| 466 | |
| 467 | |
| 468 | //------------------------------------------------- |
| 469 | // I8255A_INTERFACE( ppi_intf ) |
| 470 | //------------------------------------------------- |
| 471 | |
| 472 | static READ8_DEVICE_HANDLER( sby_r ) |
| 473 | { |
| 474 | /* |
| 475 | |
| 476 | bit description |
| 477 | |
| 478 | PC0 SP0256 SBY |
| 479 | PC1 |
| 480 | PC2 |
| 481 | PC3 |
| 482 | PC4 |
| 483 | PC5 |
| 484 | PC6 |
| 485 | PC7 |
| 486 | |
| 487 | */ |
| 488 | |
| 489 | return sp0256_sby_r(device); |
| 490 | } |
| 491 | |
| 492 | static WRITE8_DEVICE_HANDLER( ald_w ) |
| 493 | { |
| 494 | /* |
| 495 | |
| 496 | bit description |
| 497 | |
| 498 | PA0 SP0256 A1 |
| 499 | PA1 SP0256 A2 |
| 500 | PA2 SP0256 A3 |
| 501 | PA3 SP0256 A4 |
| 502 | PA4 SP0256 A5 |
| 503 | PA5 SP0256 A6 |
| 504 | PA6 SP0256 _ALD |
| 505 | PA7 |
| 506 | |
| 507 | */ |
| 508 | |
| 509 | if (!BIT(data, 6)) |
| 510 | { |
| 511 | sp0256_ALD_w(device, 0, data & 0x3f); |
| 512 | } |
| 513 | } |
| 514 | |
| 515 | static I8255A_INTERFACE( ppi_intf ) |
| 516 | { |
| 517 | DEVCB_NULL, |
| 518 | DEVCB_NULL, |
| 519 | DEVCB_DEVICE_HANDLER(SP0256AL2_TAG, sby_r), |
| 520 | DEVCB_DEVICE_HANDLER(SP0256AL2_TAG, ald_w), |
| 521 | DEVCB_NULL, |
| 522 | DEVCB_NULL |
| 523 | }; |
| 524 | |
| 525 | |
| 526 | //------------------------------------------------- |
| 527 | // Z80PIO_INTERFACE( pio_intf ) |
| 528 | //------------------------------------------------- |
| 529 | |
| 530 | READ8_MEMBER( ace_state::pio_pa_r ) |
| 531 | { |
| 532 | /* |
| 533 | |
| 534 | bit description |
| 535 | |
| 536 | PA0 |
| 537 | PA1 RxD |
| 538 | PA2 |
| 539 | PA3 |
| 540 | PA4 |
| 541 | PA5 |
| 542 | PA6 |
| 543 | PA7 |
| 544 | |
| 545 | */ |
| 546 | |
| 547 | return 0; |
| 548 | }; |
| 549 | |
| 550 | WRITE8_MEMBER( ace_state::pio_pa_w ) |
| 551 | { |
| 552 | /* |
| 553 | |
| 554 | bit description |
| 555 | |
| 556 | PA0 RTS |
| 557 | PA1 |
| 558 | PA2 CTS |
| 559 | PA3 TxD |
| 560 | PA4 |
| 561 | PA5 |
| 562 | PA6 STB |
| 563 | PA7 |
| 564 | |
| 565 | */ |
| 566 | |
| 567 | // centronics strobe |
| 568 | centronics_strobe_w(m_centronics, !BIT(data, 6)); |
| 569 | }; |
| 570 | |
| 571 | static Z80PIO_INTERFACE( pio_intf ) |
| 572 | { |
| 573 | DEVCB_CPU_INPUT_LINE(Z80_TAG, INPUT_LINE_IRQ0), |
| 574 | DEVCB_DRIVER_MEMBER(ace_state, pio_pa_r), |
| 575 | DEVCB_DRIVER_MEMBER(ace_state, pio_pa_w), |
| 576 | DEVCB_NULL, |
| 577 | DEVCB_NULL, |
| 578 | DEVCB_DEVICE_HANDLER(CENTRONICS_TAG, centronics_data_w), |
| 579 | DEVCB_NULL |
| 580 | }; |
| 581 | |
| 582 | |
| 583 | |
| 584 | //************************************************************************** |
| 585 | // MACHINE INITIALIZATION |
| 586 | //************************************************************************** |
| 587 | |
| 588 | //------------------------------------------------- |
| 589 | // MACHINE_START( ace ) |
| 590 | //------------------------------------------------- |
| 591 | |
| 592 | void ace_state::machine_start() |
| 593 | { |
| 594 | address_space *program = m_maincpu->memory().space(AS_PROGRAM); |
| 595 | |
| 596 | /* configure RAM */ |
| 597 | switch (ram_get_size(m_ram)) |
| 598 | { |
| 599 | case 1*1024: |
| 600 | program->unmap_readwrite(0x4000, 0xffff); |
| 601 | break; |
| 602 | |
| 603 | case 16*1024: |
| 604 | program->unmap_readwrite(0x8000, 0xffff); |
| 605 | break; |
| 606 | |
| 607 | case 32*1024: |
| 608 | program->unmap_readwrite(0xc000, 0xffff); |
| 609 | break; |
| 610 | } |
| 611 | } |
| 612 | |
| 613 | |
| 614 | |
| 615 | //************************************************************************** |
| 616 | // MACHINE CONFIGURATION |
| 617 | //************************************************************************** |
| 618 | |
| 619 | //------------------------------------------------- |
| 620 | // MACHINE_CONFIG( ace ) |
| 621 | //------------------------------------------------- |
| 622 | |
| 623 | static MACHINE_CONFIG_START( ace, ace_state ) |
| 624 | // basic machine hardware |
| 625 | MCFG_CPU_ADD(Z80_TAG, Z80, XTAL_6_5MHz/2) |
| 626 | MCFG_CPU_PROGRAM_MAP(ace_mem) |
| 627 | MCFG_CPU_IO_MAP(ace_io) |
| 628 | MCFG_QUANTUM_TIME(attotime::from_hz(60)) |
| 629 | |
| 630 | // video hardware |
| 631 | MCFG_SCREEN_ADD(SCREEN_TAG, RASTER) |
| 632 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 633 | MCFG_SCREEN_RAW_PARAMS(XTAL_6_5MHz, 416, 0, 336, 312, 0, 304) |
| 634 | MCFG_TIMER_ADD_SCANLINE("set_irq", set_irq, SCREEN_TAG, 31*8, 264) |
| 635 | MCFG_TIMER_ADD_SCANLINE("clear_irq", clear_irq, SCREEN_TAG, 32*8, 264) |
| 636 | |
| 637 | MCFG_PALETTE_LENGTH(2) |
| 638 | MCFG_PALETTE_INIT(black_and_white) |
| 639 | |
| 640 | MCFG_GFXDECODE(ace) |
| 641 | |
| 642 | // sound hardware |
| 643 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 644 | MCFG_SOUND_WAVE_ADD(WAVE_TAG, CASSETTE_TAG) |
| 645 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 646 | MCFG_SOUND_ADD(SPEAKER_TAG, SPEAKER_SOUND, 0) |
| 647 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 648 | |
| 649 | MCFG_SOUND_ADD(AY8910_TAG, AY8910, XTAL_6_5MHz/2) |
| 650 | MCFG_SOUND_CONFIG(psg_intf) |
| 651 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 652 | |
| 653 | MCFG_SOUND_ADD(SP0256AL2_TAG, SP0256, XTAL_3MHz) |
| 654 | MCFG_SOUND_CONFIG(sp0256_intf) |
| 655 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 656 | |
| 657 | // devices |
| 658 | MCFG_CASSETTE_ADD(CASSETTE_TAG, ace_cassette_interface) |
| 659 | MCFG_SNAPSHOT_ADD("snapshot", ace, "ace", 1) |
| 660 | MCFG_I8255A_ADD(I8255_TAG, ppi_intf) |
| 661 | MCFG_Z80PIO_ADD(Z80PIO_TAG, XTAL_6_5MHz/2, pio_intf) |
| 662 | MCFG_CENTRONICS_ADD(CENTRONICS_TAG, standard_centronics) |
| 663 | |
| 664 | // internal ram |
| 665 | MCFG_RAM_ADD(RAM_TAG) |
| 666 | MCFG_RAM_DEFAULT_SIZE("1K") |
| 667 | MCFG_RAM_EXTRA_OPTIONS("16K,32K,48K") |
| 668 | MACHINE_CONFIG_END |
| 669 | |
| 670 | |
| 671 | |
| 672 | //************************************************************************** |
| 673 | // ROMS |
| 674 | //************************************************************************** |
| 675 | |
| 676 | //------------------------------------------------- |
| 677 | // ROM( ace ) |
| 678 | //------------------------------------------------- |
| 679 | |
| 680 | ROM_START( jupace ) |
| 681 | ROM_REGION( 0x10000, Z80_TAG, 0 ) |
| 682 | ROM_LOAD( "rom-a.z1", 0x0000, 0x1000, CRC(dc8438a5) SHA1(8fa97eb71e5dd17c7d190c6587ee3840f839347c) ) |
| 683 | ROM_LOAD( "rom-b.z2", 0x1000, 0x1000, CRC(4009f636) SHA1(98c5d4bcd74bcf014268cf4c00b2007ea5cc21f3) ) |
| 684 | |
| 685 | ROM_REGION( 0x1000, "fdc", 0 ) // Deep Thought disc interface |
| 686 | ROM_LOAD( "dos 4.bin", 0x0000, 0x1000, CRC(04c70448) SHA1(53ddcced6ae2feafd687a3b55864726656b71412) ) |
| 687 | |
| 688 | ROM_REGION( 0x10000, SP0256AL2_TAG, 0 ) |
| 689 | ROM_LOAD( "sp0256-al2.ic1", 0x000, 0x800, CRC(b504ac15) SHA1(e60fcb5fa16ff3f3b69d36c7a6e955744d3feafc) ) |
| 690 | ROM_END |
| 691 | |
| 692 | |
| 693 | |
| 694 | //************************************************************************** |
| 695 | // SYSTEM DRIVERS |
| 696 | //************************************************************************** |
| 697 | |
| 698 | // YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS |
| 699 | COMP( 1981, jupace, 0, 0, ace, ace, 0, "Jupiter Cantab", "Jupiter Ace" , 0 ) |
src/mess/drivers/arcadiah.c
| r0 | r13302 | |
| 1 | /****************************************************************************** |
| 2 | Consolidation and enhancement of documentation by Manfred Schneider based on previous work from |
| 3 | PeT mess@utanet.at and Paul Robson (autismuk@aol.com) minor updates by incog |
| 4 | |
| 5 | Schematics, manuals and anything you can desire for at http://amigan.classicgaming.gamespy.com/ |
| 6 | |
| 7 | TODO: implement the RESET key on the front panel |
| 8 | find a dump of the character ROM |
| 9 | convert the drawing code to tilemap |
| 10 | |
| 11 | |
| 12 | 1. General |
| 13 | SYSTEM |
| 14 | - Signetics 2650 CPU at 3.58/4 MHz(for NTSC) or at 4,433/5 (for PAL) |
| 15 | - 1k x 8 of RAM (physically present but only 512 byte available) |
| 16 | - 2 x 2 axis Analogue Joysticks |
| 17 | - 2 x 12 button Controllers |
| 18 | - 3 buttons on system unit and CPU Reset |
| 19 | VIDEO |
| 20 | - 128 x 208 pixel resolution (alternate 128 x 104 mode available) |
| 21 | - 16 x 26 (can be 16x13) background display (2 colour 8 x 8 pixel characters) |
| 22 | - 4 x 8 x 8 Sprites (2 colour 8 x 8 pixels) |
| 23 | - total of 8 user defined characters available |
| 24 | SOUND |
| 25 | - Single channel beeper |
| 26 | |
| 27 | |
| 28 | 2. Memory map |
| 29 | The memory map of the 2001 is below. |
| 30 | 0000 - 0FFF 4k ROM Block 1 (first 4k of a cartridge) |
| 31 | 1000 - 13FF mirror of $1800-$1BFF |
| 32 | 1400 - 17FF mirror of $1800-$1BFF |
| 33 | 1800 - 1BFF UVI2637 Area (detail description in video/arcadia.c) |
| 34 | 1800 - 18CF Screen display , upper 13 lines, characters/palette high bits |
| 35 | 18D0 - 18EF Free for user programs. |
| 36 | 18F0 - 18F7 Sprite coordinates y0x0y1x1y2x2y3x3 |
| 37 | 18F8 - 1908 registers of UVI |
| 38 | 1909 - 197F Unmapped |
| 39 | 1980 - 19BF User defined characters (8 possible, 8 bytes per character) |
| 40 | 19C0 - 19F7 Unmapped |
| 41 | 19F8 - 19FF registers of UVI |
| 42 | 1A00 - 1ACF Screen display , lower 13 lines, characters/palette high bits |
| 43 | 1AD0 - 1AFF User memory |
| 44 | 1B00 - 1BFF mirror of 1900-19FF |
| 45 | 1C00 - 1FFF mirror of 1800-1BFF |
| 46 | 2000 - 2FFF 4k ROM Block 2 (for 8k carts such as Jungler) |
| 47 | 3000 - 3FFF mirror of 1000-1FFF |
| 48 | 4000 - 4FFF mirror of 0000-0FFF |
| 49 | 5000 - 5FFF mirror of 1000-1FFF |
| 50 | 6000 - 6FFF mirror of 0000-0FFF |
| 51 | 7000 - 7FFF mirror of 1000-1FFF |
| 52 | |
| 53 | The Palladium VCG memory map is as follows. |
| 54 | 0000 - 0FFF 4k ROM Block 1 (first 4k of a cartridge) |
| 55 | 1000 - 17FF could be ROM or RAM but no Cartridge uses this |
| 56 | 1800 - 1BFF UVI2637 Area (detail description in video/arcadia.c) |
| 57 | 1800 - 18CF Screen display , upper 13 lines, characters/palette high bits |
| 58 | 18D0 - 18EF Free for user programs. |
| 59 | 18F0 - 18F7 Sprite coordinates y0x0y1x1y2x2y3x3 |
| 60 | 18F8 - 1908 registers of UVI |
| 61 | 1909 - 197F Unmapped |
| 62 | 1980 - 19BF User defined characters (8 possible, 8 bytes per character) |
| 63 | 19C0 - 19F7 Unmapped |
| 64 | 19F8 - 19FF registers of UVI |
| 65 | 1A00 - 1ACF Screen display , lower 13 lines, characters/palette high bits |
| 66 | 1AD0 - 1AFF User memory |
| 67 | 1B00 - 1BFF mirror of 1900-19FF |
| 68 | 1C00 - 1FFF could be ROM or RAM but no Cartridge uses this |
| 69 | 2000 - 2FFF 4k ROM Block (for 8k carts such as Jungler) |
| 70 | 3000 - 3FFF could be ROM or RAM but no Cartridge uses this |
| 71 | 4000 - 4FFF 4k ROM Block (first 2K used by Golf) |
| 72 | 5000 - 5FFF 4k ROM Block |
| 73 | 6000 - 6FFF 4k ROM Block |
| 74 | 7000 - 7FFF 4k ROM Block |
| 75 | |
| 76 | |
| 77 | 3. ROM Images |
| 78 | ROM Images are loaded into 0000-0FFF. If the ROM is an 8k ROM the |
| 79 | second half of the Rom is located at 2000-2FFF. Except for the Golf cart |
| 80 | which is located from 0x0000-0x0FFF and a 2kbyte block from 0x4000 only on |
| 81 | Palladium VCG. |
| 82 | |
| 83 | |
| 84 | 4. Controls |
| 85 | All key controls are indicated by a bit going to '1'. Unused bits at |
| 86 | the memory location are set to zero. |
| 87 | |
| 88 | Keypads |
| 89 | |
| 90 | 1900-1902 (Player 1) 1904-1906 (Player 2) |
| 91 | The keypads are arranged as follows :- |
| 92 | |
| 93 | 1 2 3 |
| 94 | 4 5 6 |
| 95 | 7 8 9 |
| 96 | Enter 0 Clear |
| 97 | |
| 98 | Row 1/4/7 is 1900/4, Row 2/5/8/0 is 1901/5 and Row 3/6/9 is 1902/6 |
| 99 | The topmost key is bit 3, the lowermost key is bit 0. |
| 100 | |
| 101 | Location $1908 contains bit 0 Start,bit 1 Option,bit 2 Difficulty. |
| 102 | These keys are "latched" i.e. a press causes a logic 1 to appear |
| 103 | on the current frame. |
| 104 | |
| 105 | The fire buttons are equivalent to Keypad #2 e.g. they are 1901 and |
| 106 | 1905 bit 3. |
| 107 | |
| 108 | Palladium has 4 additional key per keypad which are mapped at |
| 109 | 1903 palladium player 1 |
| 110 | 1907 palladium player 2 |
| 111 | |
| 112 | |
| 113 | 5. Other information |
| 114 | Interrupts are not supported |
| 115 | The Read/Write 2650 CPU Port-Commands do not appear to be connected to |
| 116 | anything in hardware. No cartridge has been found which uses them. |
| 117 | |
| 118 | ******************************************************************************/ |
| 119 | |
| 120 | #include <assert.h> |
| 121 | #include "emu.h" |
| 122 | #include "cpu/s2650/s2650.h" |
| 123 | #include "includes/arcadia.h" |
| 124 | #include "imagedev/cartslot.h" |
| 125 | |
| 126 | static ADDRESS_MAP_START( arcadia_mem, AS_PROGRAM, 8) |
| 127 | AM_RANGE( 0x0000, 0x0fff) AM_ROM |
| 128 | AM_RANGE( 0x1800, 0x1aff) AM_READWRITE( arcadia_video_r, arcadia_video_w ) |
| 129 | AM_RANGE( 0x2000, 0x2fff) AM_ROM |
| 130 | ADDRESS_MAP_END |
| 131 | |
| 132 | static ADDRESS_MAP_START( arcadia_io, AS_IO, 8) |
| 133 | //{ S2650_CTRL_PORT,S2650_CTRL_PORT, }, |
| 134 | //{ S2650_DATA_PORT,S2650_DATA_PORT, }, |
| 135 | AM_RANGE( S2650_SENSE_PORT,S2650_SENSE_PORT) AM_READ( arcadia_vsync_r) |
| 136 | ADDRESS_MAP_END |
| 137 | |
| 138 | /* The Emerson Arcadia 2001 controllers have 2 fire buttons on the side, |
| 139 | but actually they are wired to keypad button #2. The following definitions |
| 140 | are meant to document this fact. The keypad has the following layout: |
| 141 | |
| 142 | 1 2 3 |
| 143 | 4 5 6 |
| 144 | 7 8 9 |
| 145 | Cl 0 En */ |
| 146 | |
| 147 | static INPUT_PORTS_START( arcadia ) |
| 148 | PORT_START("panel") |
| 149 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START ) PORT_NAME("Start") |
| 150 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Option") PORT_CODE(KEYCODE_O) |
| 151 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_NAME("Select") |
| 152 | // PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Reset") PORT_CODE(KEYCODE_R) Not implemented |
| 153 | |
| 154 | PORT_START("controller1_col1") |
| 155 | PORT_BIT( 0xf0, 0xf0, IPT_UNUSED) |
| 156 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 1") PORT_CODE(KEYCODE_1_PAD) |
| 157 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 4") PORT_CODE(KEYCODE_4_PAD) |
| 158 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 7") PORT_CODE(KEYCODE_7_PAD) |
| 159 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad Clear") PORT_CODE(KEYCODE_MINUS_PAD) |
| 160 | |
| 161 | PORT_START("controller1_col2") |
| 162 | PORT_BIT( 0xf0, 0xf0, IPT_UNUSED) |
| 163 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 2/Button") PORT_CODE(KEYCODE_2_PAD) |
| 164 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 5") PORT_CODE(KEYCODE_5_PAD) |
| 165 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 8") PORT_CODE(KEYCODE_8_PAD) |
| 166 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 0") PORT_CODE(KEYCODE_0_PAD) |
| 167 | |
| 168 | PORT_START("controller1_col3") |
| 169 | PORT_BIT( 0xf0, 0xf0, IPT_UNUSED) |
| 170 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 3") PORT_CODE(KEYCODE_3_PAD) |
| 171 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 6") PORT_CODE(KEYCODE_6_PAD) |
| 172 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 9") PORT_CODE(KEYCODE_9_PAD) |
| 173 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad Enter") PORT_CODE(KEYCODE_PLUS_PAD) |
| 174 | |
| 175 | PORT_START("controller1_extra") |
| 176 | PORT_BIT( 0xff, 0xf0, IPT_UNUSED) // used in palladium |
| 177 | |
| 178 | PORT_START("controller2_col1") |
| 179 | PORT_BIT( 0xf0, 0xf0, IPT_UNUSED) |
| 180 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 1") PORT_CODE(KEYCODE_Z) |
| 181 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 4") PORT_CODE(KEYCODE_A) |
| 182 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 7") PORT_CODE(KEYCODE_Q) |
| 183 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad Clear") PORT_CODE(KEYCODE_V) |
| 184 | |
| 185 | PORT_START("controller2_col2") |
| 186 | PORT_BIT( 0xf0, 0xf0, IPT_UNUSED) |
| 187 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 2/Button") PORT_CODE(KEYCODE_X) |
| 188 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 5") PORT_CODE(KEYCODE_S) |
| 189 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 8") PORT_CODE(KEYCODE_W) |
| 190 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 0") PORT_CODE(KEYCODE_F) |
| 191 | |
| 192 | PORT_START("controller2_col3") |
| 193 | PORT_BIT( 0xf0, 0xf0, IPT_UNUSED) |
| 194 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 3") PORT_CODE(KEYCODE_C) |
| 195 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 6") PORT_CODE(KEYCODE_D) |
| 196 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 9") PORT_CODE(KEYCODE_E) |
| 197 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad Enter") PORT_CODE(KEYCODE_R) |
| 198 | |
| 199 | PORT_START("controller2_extra") |
| 200 | PORT_BIT( 0xff, 0xf0, IPT_UNUSED) // used in palladium |
| 201 | |
| 202 | /* FIXME: the joystick are analog - the actual definition is merely an hack */ |
| 203 | |
| 204 | #if 0 |
| 205 | // auto centering too slow, so only using 5 bits, and scaling at videoside |
| 206 | PORT_START("controller1_joy_x") |
| 207 | PORT_BIT( 0x1fe,0x10,IPT_AD_STICK_X) |
| 208 | PORT_SENSITIVITY(1) |
| 209 | PORT_KEYDELTA(2000) |
| 210 | PORT_MINMAX(0,0x1f) |
| 211 | PORT_CODE_DEC(KEYCODE_LEFT) |
| 212 | PORT_CODE_INC(KEYCODE_RIGHT) |
| 213 | PORT_CODE_DEC(JOYCODE_1_LEFT) |
| 214 | PORT_CODE_INC(JOYCODE_1_RIGHT) |
| 215 | PORT_PLAYER(1) |
| 216 | PORT_RESET |
| 217 | |
| 218 | PORT_START("controller1_joy_y") |
| 219 | PORT_BIT( 0x1fe,0x10,IPT_AD_STICK_Y) |
| 220 | PORT_SENSITIVITY(1) |
| 221 | PORT_KEYDELTA(2000) |
| 222 | PORT_MINMAX(0,0x1f) |
| 223 | PORT_CODE_DEC(KEYCODE_UP) |
| 224 | PORT_CODE_INC(KEYCODE_DOWN) |
| 225 | PORT_CODE_DEC(JOYCODE_1_UP) |
| 226 | PORT_CODE_INC(JOYCODE_1_DOWN) |
| 227 | PORT_PLAYER(1) |
| 228 | PORT_RESET |
| 229 | |
| 230 | PORT_START("controller2_joy_x") |
| 231 | PORT_BIT( 0x1ff,0x10,IPT_AD_STICK_X) |
| 232 | PORT_SENSITIVITY(100) |
| 233 | PORT_KEYDELTA(10) |
| 234 | PORT_MINMAX(0,0x1f) |
| 235 | PORT_CODE_DEC(KEYCODE_DEL) |
| 236 | PORT_CODE_INC(KEYCODE_PGDN) |
| 237 | PORT_CODE_DEC(JOYCODE_2_LEFT) |
| 238 | PORT_CODE_INC(JOYCODE_2_RIGHT) |
| 239 | PORT_PLAYER(2) |
| 240 | PORT_RESET |
| 241 | |
| 242 | PORT_START("controller2_joy_y") |
| 243 | PORT_BIT( 0x1ff,0x10,IPT_AD_STICK_Y) |
| 244 | PORT_SENSITIVITY(100) |
| 245 | PORT_KEYDELTA(10) |
| 246 | PORT_MINMAX(0,0x1f) |
| 247 | PORT_CODE_DEC(KEYCODE_HOME) |
| 248 | PORT_CODE_INC(KEYCODE_END) |
| 249 | PORT_CODE_DEC(JOYCODE_2_UP) |
| 250 | PORT_CODE_INC(JOYCODE_2_DOWN) |
| 251 | PORT_PLAYER(2) |
| 252 | PORT_RESET |
| 253 | #else |
| 254 | PORT_START("joysticks") |
| 255 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_8WAY |
| 256 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_8WAY |
| 257 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_8WAY |
| 258 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_8WAY |
| 259 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_8WAY |
| 260 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_8WAY |
| 261 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_8WAY |
| 262 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_8WAY |
| 263 | #endif |
| 264 | INPUT_PORTS_END |
| 265 | |
| 266 | /* The Palladium Video-Computer-Game controllers have no fire buttons on their side |
| 267 | but have a 16 keys unlabeled keypad. The keys are fully independent and layed out |
| 268 | according to this weird scheme, which keeps backward compatibility to Arcadia 2001's |
| 269 | electrical wiring. |
| 270 | |
| 271 | 2 |
| 272 | 13 14 15 |
| 273 | 1 16 3 |
| 274 | 4 5 6 |
| 275 | 7 8 9 |
| 276 | 10 11 12 */ |
| 277 | |
| 278 | static INPUT_PORTS_START( plldium ) |
| 279 | PORT_START("panel") |
| 280 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START ) PORT_NAME("Start") |
| 281 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_NAME("Selector A") |
| 282 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Selector B") PORT_CODE(KEYCODE_O) |
| 283 | // PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Reset") PORT_CODE(KEYCODE_R) Not implemented |
| 284 | |
| 285 | PORT_START("controller1_col1") |
| 286 | PORT_BIT( 0xf0, 0xf0, IPT_UNUSED) // some bits must be high |
| 287 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 1") PORT_CODE(KEYCODE_1_PAD) |
| 288 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 4") PORT_CODE(KEYCODE_4_PAD) |
| 289 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 7") PORT_CODE(KEYCODE_7_PAD) |
| 290 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 10") PORT_CODE(KEYCODE_MINUS_PAD) |
| 291 | |
| 292 | PORT_START("controller1_col2") |
| 293 | PORT_BIT( 0xf0, 0xf0, IPT_UNUSED) |
| 294 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 2/Button") PORT_CODE(KEYCODE_2_PAD) |
| 295 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 5") PORT_CODE(KEYCODE_5_PAD) |
| 296 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 8") PORT_CODE(KEYCODE_8_PAD) |
| 297 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 11") PORT_CODE(KEYCODE_0_PAD) |
| 298 | |
| 299 | PORT_START("controller1_col3") |
| 300 | PORT_BIT( 0xf0, 0xf0, IPT_UNUSED) |
| 301 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 3") PORT_CODE(KEYCODE_3_PAD) |
| 302 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 6") PORT_CODE(KEYCODE_6_PAD) |
| 303 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 9") PORT_CODE(KEYCODE_9_PAD) |
| 304 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 12") PORT_CODE(KEYCODE_PLUS_PAD) |
| 305 | |
| 306 | PORT_START("controller1_extra") |
| 307 | PORT_BIT( 0xf0, 0xf0, IPT_UNUSED) |
| 308 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 13") PORT_CODE(KEYCODE_ENTER_PAD) |
| 309 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 14") PORT_CODE(KEYCODE_SLASH_PAD) |
| 310 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 15") PORT_CODE(KEYCODE_ASTERISK) |
| 311 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P1 Keypad 16") PORT_CODE(KEYCODE_DEL_PAD) |
| 312 | |
| 313 | PORT_START("controller2_col1") |
| 314 | PORT_BIT( 0xf0, 0xf0, IPT_UNUSED) |
| 315 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 1") PORT_CODE(KEYCODE_Z) |
| 316 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 4") PORT_CODE(KEYCODE_A) |
| 317 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 7") PORT_CODE(KEYCODE_Q) |
| 318 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 10") PORT_CODE(KEYCODE_V) |
| 319 | |
| 320 | PORT_START("controller2_col2") |
| 321 | PORT_BIT( 0xf0, 0xf0, IPT_UNUSED) |
| 322 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 2/Button") PORT_CODE(KEYCODE_X) |
| 323 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 5") PORT_CODE(KEYCODE_S) |
| 324 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 8") PORT_CODE(KEYCODE_W) |
| 325 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 11") PORT_CODE(KEYCODE_F) |
| 326 | |
| 327 | PORT_START("controller2_col3") |
| 328 | PORT_BIT( 0xf0, 0xf0, IPT_UNUSED) |
| 329 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 3") PORT_CODE(KEYCODE_C) |
| 330 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 6") PORT_CODE(KEYCODE_D) |
| 331 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 9") PORT_CODE(KEYCODE_E) |
| 332 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 12") PORT_CODE(KEYCODE_R) |
| 333 | |
| 334 | PORT_START("controller2_extra") |
| 335 | PORT_BIT( 0xf0, 0xf0, IPT_UNUSED) |
| 336 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 13") PORT_CODE(KEYCODE_B) |
| 337 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 14") PORT_CODE(KEYCODE_G) |
| 338 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 15") PORT_CODE(KEYCODE_T) |
| 339 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("P2 Keypad 16") PORT_CODE(KEYCODE_H) |
| 340 | |
| 341 | /* FIXME: the joystick are analog - the actual definition is merely an hack */ |
| 342 | |
| 343 | #if 0 |
| 344 | // auto centering too slow, so only using 5 bits, and scaling at videoside |
| 345 | PORT_START("controller1_joy_x") |
| 346 | PORT_BIT( 0x1fe,0x10,IPT_AD_STICK_X) |
| 347 | PORT_SENSITIVITY(1) |
| 348 | PORT_KEYDELTA(2000) |
| 349 | PORT_MINMAX(0,0x1f) |
| 350 | PORT_CODE_DEC(KEYCODE_LEFT) |
| 351 | PORT_CODE_INC(KEYCODE_RIGHT) |
| 352 | PORT_CODE_DEC(JOYCODE_1_LEFT) |
| 353 | PORT_CODE_INC(JOYCODE_1_RIGHT) |
| 354 | PORT_PLAYER(1) |
| 355 | PORT_RESET |
| 356 | |
| 357 | PORT_START("controller1_joy_y") |
| 358 | PORT_BIT( 0x1fe,0x10,IPT_AD_STICK_Y) |
| 359 | PORT_SENSITIVITY(1) |
| 360 | PORT_KEYDELTA(2000) |
| 361 | PORT_MINMAX(0,0x1f) |
| 362 | PORT_CODE_DEC(KEYCODE_UP) |
| 363 | PORT_CODE_INC(KEYCODE_DOWN) |
| 364 | PORT_CODE_DEC(JOYCODE_1_UP) |
| 365 | PORT_CODE_INC(JOYCODE_1_DOWN) |
| 366 | PORT_PLAYER(1) |
| 367 | PORT_RESET |
| 368 | |
| 369 | PORT_START("controller2_joy_x") |
| 370 | PORT_BIT( 0x1ff,0x10,IPT_AD_STICK_X) |
| 371 | PORT_SENSITIVITY(100) |
| 372 | PORT_KEYDELTA(10) |
| 373 | PORT_MINMAX(0,0x1f) |
| 374 | PORT_CODE_DEC(KEYCODE_DEL) |
| 375 | PORT_CODE_INC(KEYCODE_PGDN) |
| 376 | PORT_CODE_DEC(JOYCODE_2_LEFT) |
| 377 | PORT_CODE_INC(JOYCODE_2_RIGHT) |
| 378 | PORT_PLAYER(2) |
| 379 | PORT_RESET |
| 380 | |
| 381 | PORT_START("controller2_joy_y") |
| 382 | PORT_BIT( 0x1ff,0x10,IPT_AD_STICK_Y) |
| 383 | PORT_SENSITIVITY(100) |
| 384 | PORT_KEYDELTA(10) |
| 385 | PORT_MINMAX(0,0x1f) |
| 386 | PORT_CODE_DEC(KEYCODE_HOME) |
| 387 | PORT_CODE_INC(KEYCODE_END) |
| 388 | PORT_CODE_DEC(JOYCODE_2_UP) |
| 389 | PORT_CODE_INC(JOYCODE_2_DOWN) |
| 390 | PORT_PLAYER(2) |
| 391 | PORT_RESET |
| 392 | #else |
| 393 | PORT_START("joysticks") |
| 394 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_8WAY |
| 395 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_8WAY |
| 396 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_8WAY |
| 397 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_8WAY |
| 398 | PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_8WAY |
| 399 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_8WAY |
| 400 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_8WAY |
| 401 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_8WAY |
| 402 | #endif |
| 403 | INPUT_PORTS_END |
| 404 | |
| 405 | static const gfx_layout arcadia_charlayout = |
| 406 | { |
| 407 | 8, /*width*/ |
| 408 | 1, /*height*/ |
| 409 | 256, /* 256 characters */ |
| 410 | 1, /* 1 bits per pixel */ |
| 411 | { 0 }, /* no bitplanes; 1 bit per pixel */ |
| 412 | { 0, 1, 2, 3, 4, 5, 6, 7 }, /* x offsets */ |
| 413 | { 0 }, /* y offsets */ |
| 414 | 1*8 |
| 415 | }; |
| 416 | |
| 417 | static GFXDECODE_START( arcadia ) |
| 418 | GFXDECODE_ENTRY( "gfx1", 0x0000, arcadia_charlayout, 0, 68 ) |
| 419 | GFXDECODE_END |
| 420 | |
| 421 | static const rgb_t arcadia_colors[] = |
| 422 | { |
| 423 | RGB_WHITE, /* white */ |
| 424 | MAKE_RGB(0xff, 0xff, 0x00), /* yellow */ |
| 425 | MAKE_RGB(0x00, 0xff, 0xff), /* cyan */ |
| 426 | MAKE_RGB(0x00, 0xff, 0x00), /* green */ |
| 427 | MAKE_RGB(0xff, 0x00, 0xff), /* magenta */ |
| 428 | MAKE_RGB(0xff, 0x00, 0x00), /* red */ |
| 429 | MAKE_RGB(0x00, 0x00, 0xff), /* blue */ |
| 430 | RGB_BLACK /* black */ |
| 431 | }; |
| 432 | |
| 433 | static const unsigned short arcadia_palette[128+8] = /* bgnd, fgnd */ |
| 434 | { |
| 435 | 0,1,2,3,4,5,6,7, |
| 436 | |
| 437 | 0,0, 0,1, 0,2, 0,3, 0,4, 0,5, 0,6, 0,7, |
| 438 | 1,0, 1,1, 1,2, 1,3, 1,4, 1,5, 1,6, 1,7, |
| 439 | 2,0, 2,1, 2,2, 2,3, 2,4, 2,5, 2,6, 2,7, |
| 440 | 3,0, 3,1, 3,2, 3,3, 3,4, 3,5, 3,6, 3,7, |
| 441 | 4,0, 4,1, 4,2, 4,3, 4,4, 4,5, 4,6, 4,7, |
| 442 | 5,0, 5,1, 5,2, 5,3, 5,4, 5,5, 5,6, 5,7, |
| 443 | 6,0, 6,1, 6,2, 6,3, 6,4, 6,5, 6,6, 6,7, |
| 444 | 7,0, 7,1, 7,2, 7,3, 7,4, 7,5, 7,6, 7,7 |
| 445 | }; |
| 446 | |
| 447 | static PALETTE_INIT( arcadia ) |
| 448 | { |
| 449 | int i; |
| 450 | |
| 451 | machine.colortable = colortable_alloc(machine, 8); |
| 452 | |
| 453 | for (i = 0; i < 8; i++) |
| 454 | colortable_palette_set_color(machine.colortable, i, arcadia_colors[i]); |
| 455 | |
| 456 | for (i = 0; i < 128+8; i++) |
| 457 | colortable_entry_set_value(machine.colortable, i, arcadia_palette[i]); |
| 458 | } |
| 459 | |
| 460 | static DEVICE_IMAGE_LOAD( arcadia_cart ) |
| 461 | { |
| 462 | UINT8 *rom = image.device().machine().region("maincpu")->base(); |
| 463 | int size; |
| 464 | |
| 465 | memset(rom, 0, 0x8000); |
| 466 | if (image.software_entry() == NULL) |
| 467 | { |
| 468 | size = image.length(); |
| 469 | |
| 470 | if (size > image.device().machine().region("maincpu")->bytes()) |
| 471 | size = image.device().machine().region("maincpu")->bytes(); |
| 472 | |
| 473 | if (image.fread(rom, size) != size) |
| 474 | return IMAGE_INIT_FAIL; |
| 475 | } |
| 476 | else |
| 477 | { |
| 478 | size = image.get_software_region_length("rom"); |
| 479 | memcpy(rom, image.get_software_region("rom"), size); |
| 480 | } |
| 481 | |
| 482 | if (size > 0x1000) |
| 483 | memmove(rom + 0x2000, rom + 0x1000, size - 0x1000); |
| 484 | |
| 485 | if (size > 0x2000) |
| 486 | memmove(rom + 0x4000, rom + 0x3000, size - 0x2000); |
| 487 | |
| 488 | #if 1 |
| 489 | // golf cartridge support |
| 490 | // 4kbyte at 0x0000 |
| 491 | // 2kbyte at 0x4000 |
| 492 | if (size <= 0x2000) |
| 493 | memcpy(rom + 0x4000, rom + 0x2000, 0x1000); |
| 494 | #else |
| 495 | /* this is a testpatch for the golf cartridge |
| 496 | so it could be burned in a arcadia 2001 cartridge |
| 497 | activate it and use debugger to save patched version */ |
| 498 | // not enough yet (some pointers stored as data?) |
| 499 | int i; |
| 500 | static const struct { UINT16 address; UINT8 old; UINT8 new; } |
| 501 | patch[]= { |
| 502 | { 0x0077,0x40,0x20 }, |
| 503 | { 0x011e,0x40,0x20 }, |
| 504 | { 0x0348,0x40,0x20 }, |
| 505 | { 0x03be,0x40,0x20 }, |
| 506 | { 0x04ce,0x40,0x20 }, |
| 507 | { 0x04da,0x40,0x20 }, |
| 508 | { 0x0562,0x42,0x22 }, |
| 509 | { 0x0617,0x40,0x20 }, |
| 510 | { 0x0822,0x40,0x20 }, |
| 511 | { 0x095e,0x42,0x22 }, |
| 512 | { 0x09d3,0x42,0x22 }, |
| 513 | { 0x0bb0,0x42,0x22 }, |
| 514 | { 0x0efb,0x40,0x20 }, |
| 515 | { 0x0ec1,0x43,0x23 }, |
| 516 | { 0x0f00,0x40,0x20 }, |
| 517 | { 0x0f12,0x40,0x20 }, |
| 518 | { 0x0ff5,0x43,0x23 }, |
| 519 | { 0x0ff7,0x41,0x21 }, |
| 520 | { 0x0ff9,0x40,0x20 }, |
| 521 | { 0x0ffb,0x41,0x21 }, |
| 522 | { 0x20ec,0x42,0x22 } |
| 523 | }; |
| 524 | |
| 525 | for (i = 0; i < ARRAY_LENGTH(patch); i++) |
| 526 | { |
| 527 | assert(rom[patch[i].address] == patch[i].old); |
| 528 | rom[patch[i].address] = patch[i].new; |
| 529 | } |
| 530 | #endif |
| 531 | return IMAGE_INIT_PASS; |
| 532 | } |
| 533 | |
| 534 | static MACHINE_CONFIG_START( arcadia, arcadia_state ) |
| 535 | /* basic machine hardware */ |
| 536 | MCFG_CPU_ADD("maincpu", S2650, 3580000/4) /* 0.895 MHz */ |
| 537 | MCFG_CPU_PROGRAM_MAP(arcadia_mem) |
| 538 | MCFG_CPU_IO_MAP(arcadia_io) |
| 539 | MCFG_CPU_PERIODIC_INT(arcadia_video_line, 262*60) |
| 540 | MCFG_QUANTUM_TIME(attotime::from_hz(60)) |
| 541 | |
| 542 | /* video hardware */ |
| 543 | MCFG_SCREEN_ADD("screen", RASTER) |
| 544 | MCFG_SCREEN_REFRESH_RATE(60) |
| 545 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) |
| 546 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 547 | MCFG_SCREEN_SIZE(128+2*XPOS, 262) |
| 548 | MCFG_SCREEN_VISIBLE_AREA(0, 2*XPOS+128-1, 0, 262-1) |
| 549 | MCFG_SCREEN_UPDATE( arcadia ) |
| 550 | |
| 551 | MCFG_GFXDECODE( arcadia ) |
| 552 | MCFG_PALETTE_LENGTH(ARRAY_LENGTH(arcadia_palette)) |
| 553 | MCFG_PALETTE_INIT( arcadia ) |
| 554 | |
| 555 | MCFG_VIDEO_START( arcadia ) |
| 556 | |
| 557 | /* sound hardware */ |
| 558 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 559 | MCFG_SOUND_ADD("custom", ARCADIA, 0) |
| 560 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 561 | |
| 562 | /* cartridge */ |
| 563 | MCFG_CARTSLOT_ADD("cart") |
| 564 | MCFG_CARTSLOT_EXTENSION_LIST("bin") |
| 565 | MCFG_CARTSLOT_NOT_MANDATORY |
| 566 | MCFG_CARTSLOT_INTERFACE("arcadia_cart") |
| 567 | MCFG_CARTSLOT_LOAD(arcadia_cart) |
| 568 | |
| 569 | /* Software lists */ |
| 570 | MCFG_SOFTWARE_LIST_ADD("cart_list","arcadia") |
| 571 | MACHINE_CONFIG_END |
| 572 | |
| 573 | ROM_START(advsnha) |
| 574 | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 575 | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 576 | ROM_END |
| 577 | |
| 578 | ROM_START(bndarc) |
| 579 | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 580 | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 581 | ROM_END |
| 582 | |
| 583 | ROM_START(arcadia) |
| 584 | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 585 | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 586 | ROM_END |
| 587 | |
| 588 | ROM_START(tccosmos) |
| 589 | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 590 | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 591 | ROM_END |
| 592 | |
| 593 | ROM_START(dynavisn) |
| 594 | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 595 | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 596 | ROM_END |
| 597 | |
| 598 | ROM_START(ekusera) |
| 599 | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 600 | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 601 | ROM_END |
| 602 | |
| 603 | ROM_START(hanihac) |
| 604 | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 605 | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 606 | ROM_END |
| 607 | |
| 608 | ROM_START(hmg2650) |
| 609 | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 610 | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 611 | ROM_END |
| 612 | |
| 613 | ROM_START(intmpt03) |
| 614 | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 615 | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 616 | ROM_END |
| 617 | |
| 618 | ROM_START(ixl2000) |
| 619 | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 620 | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 621 | ROM_END |
| 622 | |
| 623 | ROM_START(intervsn) |
| 624 | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 625 | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 626 | ROM_END |
| 627 | |
| 628 | ROM_START(itmcmtp3) |
| 629 | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 630 | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 631 | ROM_END |
| 632 | |
| 633 | ROM_START(lvision) |
| 634 | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 635 | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 636 | ROM_END |
| 637 | |
| 638 | ROM_START(leonardo) |
| 639 | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 640 | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 641 | ROM_END |
| 642 | |
| 643 | ROM_START(mratlus) |
| 644 | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 645 | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 646 | ROM_END |
| 647 | |
| 648 | ROM_START(ormatu) |
| 649 | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 650 | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 651 | ROM_END |
| 652 | |
| 653 | ROM_START(plldium) |
| 654 | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 655 | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 656 | ROM_END |
| 657 | |
| 658 | ROM_START(polyvcg) |
| 659 | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 660 | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 661 | ROM_END |
| 662 | |
| 663 | ROM_START(poppympt) |
| 664 | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 665 | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 666 | ROM_END |
| 667 | |
| 668 | ROM_START(prestmpt) |
| 669 | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 670 | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 671 | ROM_END |
| 672 | |
| 673 | ROM_START(rowtrn2k) |
| 674 | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 675 | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 676 | ROM_END |
| 677 | |
| 678 | ROM_START(tvg2000) |
| 679 | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 680 | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 681 | ROM_END |
| 682 | |
| 683 | ROM_START(sheenhvc) |
| 684 | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 685 | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 686 | ROM_END |
| 687 | |
| 688 | ROM_START(soundic) |
| 689 | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 690 | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 691 | ROM_END |
| 692 | |
| 693 | ROM_START(telefevr) |
| 694 | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 695 | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 696 | ROM_END |
| 697 | |
| 698 | ROM_START(tempestm) |
| 699 | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 700 | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 701 | ROM_END |
| 702 | |
| 703 | ROM_START(tbbympt3) |
| 704 | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 705 | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 706 | ROM_END |
| 707 | |
| 708 | ROM_START(trakcvg) |
| 709 | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 710 | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 711 | ROM_END |
| 712 | |
| 713 | ROM_START(tunixha) |
| 714 | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 715 | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 716 | ROM_END |
| 717 | |
| 718 | ROM_START(tryomvgc) |
| 719 | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 720 | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 721 | ROM_END |
| 722 | |
| 723 | ROM_START(orbituvi) |
| 724 | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 725 | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 726 | ROM_END |
| 727 | |
| 728 | ROM_START(vdmaster) |
| 729 | ROM_REGION(0x8000,"maincpu", ROMREGION_ERASEFF) |
| 730 | ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF) |
| 731 | ROM_END |
| 732 | |
| 733 | |
| 734 | /*************************************************************************** |
| 735 | |
| 736 | Game driver(s) |
| 737 | |
| 738 | ***************************************************************************/ |
| 739 | |
| 740 | static DRIVER_INIT( arcadia ) |
| 741 | { |
| 742 | int i; |
| 743 | UINT8 *gfx=machine.region("gfx1")->base(); |
| 744 | for (i=0; i<256; i++) gfx[i]=i; |
| 745 | #if 0 |
| 746 | // this is here to allow developement of some simple testroutines |
| 747 | // for a real console |
| 748 | { |
| 749 | UINT8 *rom=machine.region("maincpu")->base(); |
| 750 | /* this is a simple routine to display all rom characters |
| 751 | on the display for a snapshot */ |
| 752 | static const UINT8 prog[]={ // address 0 of course |
| 753 | 0x20, // eorz, 0 |
| 754 | 0x1b, 0x01, // bctr,a $0004 |
| 755 | 0x17, // retc a |
| 756 | 0x76, 0x20, // ppsu ii |
| 757 | |
| 758 | // fill screen |
| 759 | 0x04, 0x00, // lodi,0 0 |
| 760 | 0x04|1, 0x00, // lodi,1 0 |
| 761 | 0xcc|1, 0x78, 0x10, //a: stra,0 $1800,r1 |
| 762 | 0x75,9, //cpsl wc|c |
| 763 | 0x84,0x41, // addi,0 0x41 |
| 764 | 0x75,9, //cpsl wc|c |
| 765 | 0x84|1, 0x01, // addi,1 1 |
| 766 | 0xe4|1, 0x40, // comi,1 40 |
| 767 | 0x98, 0x80-15, // bcfr,0 a |
| 768 | |
| 769 | 0x04, 0xff, // lodi,0 7 |
| 770 | 0xcc, 0x18, 0xfc, // stra,0 $19f8 |
| 771 | 0x04, 0x00, // lodi,0 7 |
| 772 | 0xcc, 0x18, 0xfd, // stra,0 $18fd |
| 773 | 0x04, 0x07, // lodi,0 7 |
| 774 | 0xcc, 0x19, 0xf9, // stra,0 $19f9 |
| 775 | |
| 776 | 0x04, 0x00, // lodi,0 7 |
| 777 | 0xcc, 0x19, 0xbe, // stra,0 $19bf |
| 778 | 0x04, 0x00, // lodi,0 7 |
| 779 | 0xcc, 0x19, 0xbf, // stra,0 $19bf |
| 780 | |
| 781 | //loop: 0x0021 |
| 782 | // print keyboards |
| 783 | 0x04|1, 0x00, //y:lodi,1 0 |
| 784 | 0x0c|1, 0x79, 0x00, //x: ldra,0 1900,r1 |
| 785 | 0x44|0, 0x0f, //andi,0 0f |
| 786 | 0x64|0, 0x10, //ori,0 10 |
| 787 | 0xcc|1, 0x78, 0x01, //stra,0 1840,r1 |
| 788 | 0x75,9, //cpsl wc|c |
| 789 | 0x84|1, 0x01, //addi,1 1 |
| 790 | 0xe4|1, 0x09, //comi,1 9 |
| 791 | 0x98, 0x80-18, //bcfr,0 x |
| 792 | |
| 793 | // cycle colors |
| 794 | 0x0c|1, 0x19, 0x00, //ldra,1 1900 |
| 795 | 0x44|1, 0xf, //andi,0 0f |
| 796 | 0xe4|1, 1, //comi,1 1 |
| 797 | 0x98, +10, //bcfr,0 c |
| 798 | 0x0c, 0x19, 0xbf,//ldra,0 19f9,0 |
| 799 | 0x84, 1, //addi,0 1 |
| 800 | 0xcc, 0x19, 0xbf, //stra,0 19f9,0 |
| 801 | 0x18|3, 12, // bctr,a |
| 802 | 0xe4|1, 2, //c:comi,1 2 |
| 803 | 0x98, +10, //bcfr,0 d |
| 804 | 0x0c, 0x19, 0xbf, //ldra,0 19f9,0 |
| 805 | 0x84, 8, //addi,0 8 |
| 806 | 0xcc, 0x19, 0xbf, //stra,0 19f9,0 |
| 807 | 0x18|3, 12, // bctr,a |
| 808 | |
| 809 | // cycle colors |
| 810 | 0xe4|1, 4, //comi,1 4 |
| 811 | 0x98, +10, //bcfr,0 c |
| 812 | 0x0c, 0x19, 0xbe,//ldra,0 19f9,0 |
| 813 | 0x84, 1, //addi,0 1 |
| 814 | 0xcc, 0x19, 0xbe, //stra,0 19f9,0 |
| 815 | 0x18|3, 12, // bctr,a |
| 816 | 0xe4|1, 8, //c:comi,1 2 |
| 817 | 0x98, +8+9, //bcfr,0 d |
| 818 | 0x0c, 0x19, 0xbe, //ldra,0 19f9,0 |
| 819 | 0x84, 8, //addi,0 8 |
| 820 | 0xcc, 0x19, 0xbe, //stra,0 19f9,0 |
| 821 | |
| 822 | 0x0c, 0x19, 0x00, //b: ldra,0 1900 |
| 823 | 0x44|0, 0xf, //andi,0 0f |
| 824 | 0xe4, 0, //comi,0 0 |
| 825 | 0x98, 0x80-9, //bcfr,0 b |
| 826 | |
| 827 | 0x0c, 0x19, 0xbe, //ldra,0 19bf |
| 828 | 0xcc, 0x19, 0xf8, //stra,0 19f8 |
| 829 | 0x0c, 0x19, 0xbf, //ldra,0 19bf |
| 830 | 0xcc, 0x19, 0xf9, //stra,0 19f8 |
| 831 | |
| 832 | 0x0c, 0x19, 0xbe, //ldra,0 17ff |
| 833 | 0x44|0, 0xf, //andi,0 7 |
| 834 | 0x64|0, 0x10, //ori,0 10 |
| 835 | 0xcc, 0x18, 0x0d, //stra,0 180f |
| 836 | 0x0c, 0x19, 0xbe, //x: ldra,0 19bf |
| 837 | 0x50, 0x50, 0x50, 0x50, //shr,0 4 |
| 838 | 0x44|0, 0xf, //andi,0 7 |
| 839 | 0x64|0, 0x10, //ori,0 10 |
| 840 | 0xcc, 0x18, 0x0c, //stra,0 180e |
| 841 | |
| 842 | 0x0c, 0x19, 0xbf, //ldra,0 17ff |
| 843 | 0x44|0, 0xf, //andi,0 7 |
| 844 | 0x64|0, 0x10, //ori,0 10 |
| 845 | 0xcc, 0x18, 0x0f, //stra,0 180f |
| 846 | 0x0c, 0x19, 0xbf, //x: ldra,0 19bf |
| 847 | 0x50, 0x50, 0x50, 0x50, //shr,0 4 |
| 848 | 0x44|0, 0xf, //andi,0 7 |
| 849 | 0x64|0, 0x10, //ori,0 10 |
| 850 | 0xcc, 0x18, 0x0e, //stra,0 180e |
| 851 | |
| 852 | 0x0c, 0x18, 0x00, //ldra,0 1800 |
| 853 | 0x84, 1, //addi,0 1 |
| 854 | 0xcc, 0x18, 0x00, //stra,0 1800 |
| 855 | |
| 856 | // 0x1b, 0x80-20-29-26-9-8-2 // bctr,a y |
| 857 | 0x1c|3, 0, 0x32, // bcta,3 loop |
| 858 | |
| 859 | // calling too many subdirectories causes cpu to reset! |
| 860 | // bxa causes trap |
| 861 | }; |
| 862 | #if 1 |
| 863 | FILE *f; |
| 864 | f=fopen("chartest.bin","wb"); |
| 865 | fwrite(prog, ARRAY_LENGTH(prog), sizeof(prog[0]), f); |
| 866 | fclose(f); |
| 867 | #endif |
| 868 | for (i=0; i<ARRAY_LENGTH(prog); i++) rom[i]=prog[i]; |
| 869 | |
| 870 | } |
| 871 | #endif |
| 872 | } |
| 873 | |
| 874 | |
| 875 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */ |
| 876 | CONS(1983, advsnha, arcadia, 0, arcadia, arcadia, arcadia, "Advision", "Advision Home Arcade", GAME_IMPERFECT_SOUND ) /* France */ |
| 877 | CONS(1982, bndarc, arcadia, 0, arcadia, arcadia, arcadia, "Bandai", "Arcadia", GAME_IMPERFECT_SOUND ) /* Japan */ |
| 878 | CONS(1982, arcadia, 0, 0, arcadia, arcadia, arcadia, "Emerson", "Arcadia 2001", GAME_IMPERFECT_SOUND ) /* U.S.A. */ |
| 879 | CONS(198?, tccosmos, arcadia, 0, arcadia, arcadia, arcadia, "Mobilar?", "Tele-Computer Cosmos", GAME_IMPERFECT_SOUND ) /* Spain? I have only found pictures of a German Cosmos ( http://www.pong-picture-page.de/catalog/product_info.php?products_id=2170 ) */ |
| 880 | CONS(1982, dynavisn, intmpt03, 0, arcadia, arcadia, arcadia, "Yamagiwa", "Dynavision", GAME_IMPERFECT_SOUND ) /* Japan */ |
| 881 | CONS(1982, ekusera, intmpt03, 0, arcadia, arcadia, arcadia, "P.I.C", "Ekusera", GAME_IMPERFECT_SOUND ) /* Japan */ |
| 882 | CONS(1982, hanihac, arcadia, 0, arcadia, arcadia, arcadia, "Hanimex", "Hanimex Home Arcade Centre", GAME_IMPERFECT_SOUND ) /* UK */ |
| 883 | CONS(1982, hmg2650, arcadia, 0, arcadia, arcadia, arcadia, "Hanimex", "HMG-2650", GAME_IMPERFECT_SOUND ) /* Germany */ |
| 884 | CONS(198?, intmpt03, 0, arcadia, arcadia, arcadia, arcadia, "Intelligent Game", "Intelligent Game MPT-03", GAME_IMPERFECT_SOUND ) /* U.S.A */ |
| 885 | CONS(198?, ixl2000, arcadia, 0, arcadia, arcadia, arcadia, "Intercord", "Intercord XL 2000 System", GAME_IMPERFECT_SOUND ) /* Germany */ |
| 886 | CONS(198?, intervsn, ormatu, 0, arcadia, arcadia, arcadia, "Intervision", "Intervision 2001", GAME_IMPERFECT_SOUND ) /* Switzerland */ |
| 887 | CONS(198?, itmcmtp3, intmpt03, 0, arcadia, arcadia, arcadia, "ITMC", "ITMC MPT-03", GAME_IMPERFECT_SOUND ) /* France */ |
| 888 | CONS(1982, lvision, arcadia, 0, arcadia, arcadia, arcadia, "Leisure-Dynamics", "Leisure-Vision", GAME_IMPERFECT_SOUND ) /* Canada */ |
| 889 | CONS(1982, leonardo, arcadia, 0, arcadia, arcadia, arcadia, "GiG Electronics", "Leonardo", GAME_IMPERFECT_SOUND ) /* Italy */ |
| 890 | CONS(1983, mratlus, plldium, 0, arcadia, arcadia, arcadia, "H.G.S.", "Mr. Altus Tele Brain", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* Germany */ |
| 891 | CONS(198?, ormatu, 0, arcadia, arcadia, arcadia, arcadia, "Ormatu Electronics", "Ormatu 2001", GAME_IMPERFECT_SOUND ) /* Netherlands */ |
| 892 | CONS(198?, plldium, 0, arcadia, arcadia, plldium, arcadia, "Neckermann", "Palladium Video-Computer-Game", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* Germany, 16 keys instead of 12 */ |
| 893 | CONS(1983, polyvcg, plldium, 0, arcadia, arcadia, arcadia, "Polybrain", "Polybrain Video Computer Game", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* Germany */ |
| 894 | CONS(198?, poppympt, intmpt03, 0, arcadia, arcadia, arcadia, "Transonic", "Poppy MPT-03 Tele Computer Spiel", GAME_IMPERFECT_SOUND ) /* Germany */ |
| 895 | CONS(198?, prestmpt, intmpt03, 0, arcadia, arcadia, arcadia, "Prestige", "Prestige Video Computer Game MPT-03", GAME_IMPERFECT_SOUND ) /* France */ |
| 896 | CONS(198?, rowtrn2k, intmpt03, 0, arcadia, arcadia, arcadia, "Rowtron", "Rowtron 2000", GAME_IMPERFECT_SOUND ) /* UK */ |
| 897 | CONS(1982, tvg2000, arcadia, 0, arcadia, arcadia, arcadia, "Schmid", "Schmid TVG 2000", GAME_IMPERFECT_SOUND ) /* Germany */ |
| 898 | CONS(198?, sheenhvc, ormatu, 0, arcadia, arcadia, arcadia, "Sheen", "Sheen Home Video Centre 2001", GAME_IMPERFECT_SOUND ) /* Australia */ |
| 899 | CONS(198?, soundic, intmpt03, 0, arcadia, arcadia, arcadia, "Soundic", "Soundic MPT-03", GAME_IMPERFECT_SOUND ) /* Finland */ |
| 900 | CONS(198?, telefevr, arcadia, 0, arcadia, arcadia, arcadia, "Tchibo", "Tele-Fever", GAME_IMPERFECT_SOUND ) /* Germany */ |
| 901 | CONS(198?, tempestm, intmpt03, 0, arcadia, arcadia, arcadia, "Tempest", "Tempest MPT-03", GAME_IMPERFECT_SOUND ) /* Australia */ |
| 902 | CONS(198?, tbbympt3, intmpt03, 0, arcadia, arcadia, arcadia, "Tobby", "Tobby MPT-03", GAME_IMPERFECT_SOUND ) /* ? */ |
| 903 | CONS(198?, trakcvg, plldium, 0, arcadia, arcadia, arcadia, "Trakton", "Trakton Computer Video Game", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) /* Australia */ |
| 904 | CONS(1982, tunixha, arcadia, 0, arcadia, arcadia, arcadia, "Monaco Leisure", "Tunix Home Arcade", GAME_IMPERFECT_SOUND ) /* New Zealand */ |
| 905 | CONS(198?, tryomvgc, intmpt03, 0, arcadia, arcadia, arcadia, "Tryom", "Tryom Video Game Center", GAME_IMPERFECT_SOUND ) /* U.S.A */ |
| 906 | CONS(198?, orbituvi, 0, arcadia, arcadia, arcadia, arcadia, "Orbit Electronics", "UVI Compu-Game", GAME_IMPERFECT_SOUND ) /* New Zealand */ |
| 907 | CONS(198?, vdmaster, orbituvi, 0, arcadia, arcadia, arcadia, "Grandstand", "Video Master", GAME_IMPERFECT_SOUND ) /* New Zealand */ |
src/mess/drivers/astrocdeh.c
| r0 | r13302 | |
| 1 | /**************************************************************************** |
| 2 | |
| 3 | Bally Astrocade consumer hardware |
| 4 | driver by Nicola Salmoria, Mike Coates, Frank Palazzolo, Aaron Giles, |
| 5 | Dirk Best |
| 6 | |
| 7 | ****************************************************************************/ |
| 8 | |
| 9 | #include "emu.h" |
| 10 | #include "cpu/z80/z80.h" |
| 11 | #include "includes/astrocde.h" |
| 12 | #include "sound/astrocde.h" |
| 13 | #include "imagedev/cartslot.h" |
| 14 | #include "machine/ram.h" |
| 15 | |
| 16 | MACHINE_RESET( astrocde ); |
| 17 | void get_ram_expansion_settings(address_space *space, int &ram_expansion_installed, int &write_protect_on, int &expansion_ram_start, int &expansion_ram_end, int &shadow_ram_end); |
| 18 | |
| 19 | /************************************* |
| 20 | * |
| 21 | * Memory maps |
| 22 | * |
| 23 | * $0000 to $1FFF: 8K on-board ROM (could be one of three available BIOS dumps) |
| 24 | * $2000 to $3FFF: 8K cartridge ROM |
| 25 | * $4000 to $4FFF: 4K screen RAM |
| 26 | * $5000 to $FFFF: 44K address space not available in standard machine. With a |
| 27 | * sufficiently large RAM expansion, all of this RAM can be added, and accessed |
| 28 | * by an extended BASIC program. Bally and Astrocade BASIC can access from |
| 29 | * $5000 to $7FFF if available. |
| 30 | * |
| 31 | * RAM Expansions |
| 32 | * |
| 33 | * Several third party RAM expansions have been made for the Astrocade. These |
| 34 | * allow access to various ranges of the expansion memory ($5000 to $FFFF). |
| 35 | * A RAM expansion is required to use extended BASIC programs like Blue RAM BASIC |
| 36 | * and VIPERSoft BASIC. All of the expansions also have a RAM protect switch, which |
| 37 | * can be flipped at any time to make the RAM act like ROM. Extended BASIC |
| 38 | * programs need access to the RAM and won't work with RAM protect enabled, but |
| 39 | * this can be useful with Bally and Astrocade BASIC. They also have a range switch |
| 40 | * (not implemented). The default position is 6K, but it can be switched to |
| 41 | * 2K. This means that the expanded memory starting at $6000 will instead be |
| 42 | * mapped to the cartridge memory starting at $2000. So it would be possible to |
| 43 | * load a cartridge program from tape into the expansion memory, then flip the range |
| 44 | * switch and run it as a cartridge. This is useful for cartridge development. |
| 45 | * |
| 46 | * NOTE: If you have any trouble running cartridges with a RAM expansion installed, hit reset. |
| 47 | * |
| 48 | * Blue RAM -- available in 4K, 16K, and 32K. These also use an INS8154 chip, |
| 49 | * (not yet implemented) which has an additional $80 bytes of RAM mapped |
| 50 | * immediately after the end of the expansion address space. This memory |
| 51 | * can't be write protected. The INS8154 has I/O features needed for loading |
| 52 | * tape programs into Blue RAM BASIC, as well as running the Blue RAM Utility cart. |
| 53 | * 4K: $6000 to $6FFF (can't run VIPERSoft BASIC, because this program needs memory |
| 54 | * past this range) |
| 55 | * 16K: $6000 to $9FFF |
| 56 | * 32K: $6000 to $DFFF |
| 57 | * |
| 58 | * VIPER System 1 -- This is available in 16K only. It also includes a keyboard (not implemented). |
| 59 | * 16K: $6000 to $9FFF |
| 60 | * |
| 61 | * Lil' WHITE RAM -- This is available in 32K only. Attempts to read and write |
| 62 | * to memory outside of its address range ($D000 to $FFFF) are mapped to the expansion |
| 63 | * memory $5000 to $7FFF. The current implementation won't allow the shadow RAM area |
| 64 | * to be accessed when RAM protect is on, but there is no known software that will |
| 65 | * access the upper range of the expansion RAM when RAM protect is enabled. |
| 66 | * 32K: $5000 to $CFFF |
| 67 | * |
| 68 | * R&L 64K RAM Board -- This is a highly configurable kit. RAM can be installed in |
| 69 | * 2K increments. So, the entire 44K expansion memory can be filled. It is also |
| 70 | * possible to override the rest of the memory map with RAM (not implemented). |
| 71 | * There are 32 switches allowing users to activate and deactivate each 2K block (not implemented). |
| 72 | * RAM write protection can be implemented in three ranges through jumpers or by |
| 73 | * installing switches. The ranges are $0000 to $0FFF (first 4K), $0000 to $3FFF (first 16K), |
| 74 | * and $0000 to $FFFF (all 64K). The current implementation is for 44K expansion memory mapped from |
| 75 | * $5000 to $FFFF, with only a single write protect covering this entire range. |
| 76 | * |
| 77 | *************************************/ |
| 78 | |
| 79 | static ADDRESS_MAP_START( astrocade_mem, AS_PROGRAM, 8 ) |
| 80 | AM_RANGE(0x0000, 0x0fff) AM_ROM AM_WRITE(astrocade_funcgen_w) |
| 81 | AM_RANGE(0x1000, 0x3fff) AM_ROM /* Star Fortress writes in here?? */ |
| 82 | AM_RANGE(0x4000, 0x4fff) AM_RAM AM_BASE_MEMBER(astrocde_state, m_videoram) /* ASG */ |
| 83 | ADDRESS_MAP_END |
| 84 | |
| 85 | |
| 86 | static ADDRESS_MAP_START( astrocade_io, AS_IO, 8 ) |
| 87 | AM_RANGE(0x00, 0x1f) AM_MIRROR(0xff00) AM_MASK(0xffff) AM_READWRITE(astrocade_data_chip_register_r, astrocade_data_chip_register_w) |
| 88 | ADDRESS_MAP_END |
| 89 | |
| 90 | static INPUT_CHANGED( set_write_protect ) // run when RAM expansion write protect switch is changed |
| 91 | { |
| 92 | int ram_expansion_installed = 0, write_protect_on = 0, expansion_ram_start = 0, expansion_ram_end = 0, shadow_ram_end = 0; |
| 93 | address_space *space = field.machine().device("maincpu")->memory().space(AS_PROGRAM); |
| 94 | UINT8 *expram = ram_get_ptr(field.machine().device("ram_tag")); |
| 95 | |
| 96 | get_ram_expansion_settings(space, ram_expansion_installed, write_protect_on, expansion_ram_start, expansion_ram_end, shadow_ram_end); // passing by reference |
| 97 | |
| 98 | if (ram_expansion_installed == 1) |
| 99 | { |
| 100 | if (write_protect_on == 0) // write protect off, so install memory normally |
| 101 | { |
| 102 | space->install_ram(expansion_ram_start, expansion_ram_end, expram); |
| 103 | if (shadow_ram_end > expansion_ram_end) |
| 104 | space->install_ram(expansion_ram_end + 1, shadow_ram_end, expram); |
| 105 | } |
| 106 | else // write protect on, so make memory read only |
| 107 | { |
| 108 | space->nop_write(expansion_ram_start, expansion_ram_end); |
| 109 | } |
| 110 | } |
| 111 | } |
| 112 | |
| 113 | /************************************* |
| 114 | * |
| 115 | * Input ports |
| 116 | * |
| 117 | * |
| 118 | * The Astrocade has ports for four hand controllers. Each controller has a |
| 119 | * knob on top that can be simultaneously pushed as an eight-way joystick and |
| 120 | * twisted as a paddle, in addition to a trigger button. The knob can twist |
| 121 | * through about 270 degrees, registering 256 unique positions. It does not |
| 122 | * autocenter. When selecting options on the menu, twisting the knob to the |
| 123 | * right gives lower numbers, and twisting to the left gives larger numbers. |
| 124 | * Paddle games like Clowns have more intuitive behavior -- twisting to the |
| 125 | * right moves the character right. |
| 126 | * |
| 127 | * There is a 24-key keypad on the system itself (6 rows, 4 columns). It is |
| 128 | * labeled for the built-in calculator, but overlays were released for other |
| 129 | * programs, the most popular being the BASIC cartridges, which allowed a |
| 130 | * large number of inputs by making the bottom row shift buttons. The labels |
| 131 | * below first list the calculator key, then the BASIC keys in the order of no |
| 132 | * shift, GREEN shift, RED shift, BLUE shift, WORDS shift. |
| 133 | * |
| 134 | *************************************/ |
| 135 | |
| 136 | static INPUT_PORTS_START( astrocde ) |
| 137 | PORT_START("P1HANDLE") |
| 138 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP) PORT_PLAYER(1) PORT_8WAY |
| 139 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN) PORT_PLAYER(1) PORT_8WAY |
| 140 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT) PORT_PLAYER(1) PORT_8WAY |
| 141 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT) PORT_PLAYER(1) PORT_8WAY |
| 142 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_PLAYER(1) |
| 143 | PORT_BIT(0xe0, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 144 | |
| 145 | PORT_START("P2HANDLE") |
| 146 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP) PORT_PLAYER(2) PORT_8WAY |
| 147 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN) PORT_PLAYER(2) PORT_8WAY |
| 148 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT) PORT_PLAYER(2) PORT_8WAY |
| 149 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT) PORT_PLAYER(2) PORT_8WAY |
| 150 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_PLAYER(2) |
| 151 | PORT_BIT(0xe0, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 152 | |
| 153 | PORT_START("P3HANDLE") |
| 154 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP) PORT_PLAYER(3) PORT_8WAY |
| 155 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN) PORT_PLAYER(3) PORT_8WAY |
| 156 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT) PORT_PLAYER(3) PORT_8WAY |
| 157 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT) PORT_PLAYER(3) PORT_8WAY |
| 158 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_PLAYER(3) |
| 159 | PORT_BIT(0xe0, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 160 | |
| 161 | PORT_START("P4HANDLE") |
| 162 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP) PORT_PLAYER(4) PORT_8WAY |
| 163 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN) PORT_PLAYER(4) PORT_8WAY |
| 164 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT) PORT_PLAYER(4) PORT_8WAY |
| 165 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT) PORT_PLAYER(4) PORT_8WAY |
| 166 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_PLAYER(4) |
| 167 | PORT_BIT(0xe0, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 168 | |
| 169 | PORT_START("KEYPAD0") |
| 170 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("% \xC3\xB7 [ ] LIST") PORT_CODE(KEYCODE_O) |
| 171 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("/ x J K L NEXT") PORT_CODE(KEYCODE_SLASH_PAD) |
| 172 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("x - V W X IF") PORT_CODE(KEYCODE_ASTERISK) |
| 173 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("- + & @ * GOTO") PORT_CODE(KEYCODE_MINUS_PAD) |
| 174 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("+ = # % : PRINT") PORT_CODE(KEYCODE_PLUS_PAD) |
| 175 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("= WORDS Shift") PORT_CODE(KEYCODE_ENTER_PAD) |
| 176 | PORT_BIT(0xc0, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 177 | |
| 178 | PORT_START("KEYPAD1") |
| 179 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("\xE2\x86\x93 HALT RUN") PORT_CODE(KEYCODE_PGDN) |
| 180 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CH 9 G H I STEP") PORT_CODE(KEYCODE_H) |
| 181 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("9 6 S T U RND") PORT_CODE(KEYCODE_9) |
| 182 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("6 3 \xE2\x86\x91 . \xE2\x86\x93 BOX") PORT_CODE(KEYCODE_6) |
| 183 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("3 ERASE ( ; )") PORT_CODE(KEYCODE_3) |
| 184 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME(". BLUE Shift") PORT_CODE(KEYCODE_STOP) |
| 185 | PORT_BIT(0xc0, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 186 | |
| 187 | PORT_START("KEYPAD2") |
| 188 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("\xE2\x86\x91 PAUSE / \\") PORT_CODE(KEYCODE_PGUP) |
| 189 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("MS 8 D E F TO") PORT_CODE(KEYCODE_S) |
| 190 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("8 5 P Q R RETN") PORT_CODE(KEYCODE_8) |
| 191 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("5 2 \xE2\x86\x90 ' \xE2\x86\x92 LINE") PORT_CODE(KEYCODE_5) |
| 192 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("2 0 < \" > INPUT") PORT_CODE(KEYCODE_2) |
| 193 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("0 RED Shift") PORT_CODE(KEYCODE_0) |
| 194 | PORT_BIT(0xc0, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 195 | |
| 196 | PORT_START("KEYPAD3") |
| 197 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("C GO +10") PORT_CODE(KEYCODE_C) |
| 198 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("MR 7 A B C FOR") PORT_CODE(KEYCODE_R) |
| 199 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("7 4 M N O GOSB") PORT_CODE(KEYCODE_7) |
| 200 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("4 1 Y Z ! CLEAR") PORT_CODE(KEYCODE_4) |
| 201 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("1 SPACE $ , ?") PORT_CODE(KEYCODE_1) |
| 202 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CE GREEN Shift") PORT_CODE(KEYCODE_E) |
| 203 | PORT_BIT(0xc0, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 204 | |
| 205 | PORT_START("P1_KNOB") |
| 206 | PORT_BIT(0xff, 0x00, IPT_PADDLE) PORT_INVERT PORT_SENSITIVITY(85) PORT_KEYDELTA(10) PORT_CENTERDELTA(0) PORT_MINMAX(0,255) PORT_CODE_DEC(KEYCODE_Z) PORT_CODE_INC(KEYCODE_X) PORT_PLAYER(1) |
| 207 | |
| 208 | PORT_START("P2_KNOB") |
| 209 | PORT_BIT(0xff, 0x00, IPT_PADDLE) PORT_INVERT PORT_SENSITIVITY(85) PORT_KEYDELTA(10) PORT_CENTERDELTA(0) PORT_MINMAX(0,255) PORT_CODE_DEC(KEYCODE_N) PORT_CODE_INC(KEYCODE_M) PORT_PLAYER(2) |
| 210 | |
| 211 | PORT_START("P3_KNOB") |
| 212 | PORT_BIT(0xff, 0x00, IPT_PADDLE) PORT_INVERT PORT_SENSITIVITY(85) PORT_KEYDELTA(10) PORT_CENTERDELTA(0) PORT_MINMAX(0,255) PORT_CODE_DEC(KEYCODE_Q) PORT_CODE_INC(KEYCODE_W) PORT_PLAYER(3) |
| 213 | |
| 214 | PORT_START("P4_KNOB") |
| 215 | PORT_BIT(0xff, 0x00, IPT_PADDLE) PORT_INVERT PORT_SENSITIVITY(85) PORT_KEYDELTA(10) PORT_CENTERDELTA(0) PORT_MINMAX(0,255) PORT_CODE_DEC(KEYCODE_Y) PORT_CODE_INC(KEYCODE_U) PORT_PLAYER(4) |
| 216 | |
| 217 | PORT_START("CFG") /* machine config */ |
| 218 | PORT_DIPNAME( 0x3f, 0x00, "RAM Expansion") |
| 219 | PORT_DIPSETTING( 0x00, "No RAM Expansion") |
| 220 | PORT_DIPSETTING( 0x01, "16KB Viper System 1 RAM Expansion") |
| 221 | PORT_DIPSETTING( 0x02, "32KB Lil' WHITE RAM Expansion") |
| 222 | PORT_DIPSETTING( 0x04, "R&L 64K RAM Board (44K installed)") |
| 223 | PORT_DIPSETTING( 0x08, "4KB Blue RAM Expansion") |
| 224 | PORT_DIPSETTING( 0x10, "16KB Blue RAM Expansion") |
| 225 | PORT_DIPSETTING( 0x20, "32KB Blue RAM Expansion") |
| 226 | |
| 227 | PORT_START("PROTECT") /* Write protect RAM */ |
| 228 | PORT_DIPNAME( 0x01, 0x00, "Write Protect RAM") PORT_CHANGED(set_write_protect, 0) |
| 229 | PORT_DIPSETTING( 0x00, "Write Protect Off") |
| 230 | PORT_DIPSETTING( 0x01, "Write Protect On") |
| 231 | INPUT_PORTS_END |
| 232 | |
| 233 | |
| 234 | /************************************* |
| 235 | * |
| 236 | * Machine drivers |
| 237 | * |
| 238 | *************************************/ |
| 239 | |
| 240 | static MACHINE_CONFIG_START( astrocde, astrocde_state ) |
| 241 | /* basic machine hardware */ |
| 242 | MCFG_CPU_ADD("maincpu", Z80, ASTROCADE_CLOCK/4) /* 1.789 MHz */ |
| 243 | MCFG_CPU_PROGRAM_MAP(astrocade_mem) |
| 244 | MCFG_CPU_IO_MAP(astrocade_io) |
| 245 | |
| 246 | MCFG_MACHINE_RESET( astrocde ) |
| 247 | |
| 248 | /* video hardware */ |
| 249 | MCFG_SCREEN_ADD("screen", RASTER) |
| 250 | MCFG_SCREEN_RAW_PARAMS(ASTROCADE_CLOCK, 455, 0, 352, 262, 0, 240) |
| 251 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 252 | MCFG_SCREEN_UPDATE(astrocde) |
| 253 | |
| 254 | MCFG_PALETTE_LENGTH(512) |
| 255 | MCFG_PALETTE_INIT(astrocde) |
| 256 | |
| 257 | MCFG_VIDEO_START(astrocde) |
| 258 | |
| 259 | /* sound hardware */ |
| 260 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 261 | MCFG_SOUND_ADD("astrocade1", ASTROCADE, ASTROCADE_CLOCK/4) |
| 262 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 263 | |
| 264 | /* optional expansion ram (installed in MACHINE_RESET)*/ |
| 265 | MCFG_RAM_ADD("ram_tag") |
| 266 | MCFG_RAM_DEFAULT_SIZE("32k") |
| 267 | |
| 268 | /* cartridge */ |
| 269 | MCFG_CARTSLOT_ADD("cart") |
| 270 | MCFG_CARTSLOT_EXTENSION_LIST("bin") |
| 271 | MCFG_CARTSLOT_INTERFACE("astrocde_cart") |
| 272 | |
| 273 | /* Software lists */ |
| 274 | MCFG_SOFTWARE_LIST_ADD("cart_list","astrocde") |
| 275 | MACHINE_CONFIG_END |
| 276 | |
| 277 | |
| 278 | /************************************* |
| 279 | * |
| 280 | * ROM definitions |
| 281 | * |
| 282 | *************************************/ |
| 283 | |
| 284 | ROM_START( astrocde ) |
| 285 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 286 | ROM_LOAD( "astro.bin", 0x0000, 0x2000, CRC(ebc77f3a) SHA1(b902c941997c9d150a560435bf517c6a28137ecc) ) |
| 287 | ROM_CART_LOAD( "cart", 0x2000, 0x8000, 0 ) |
| 288 | ROM_END |
| 289 | |
| 290 | ROM_START( astrocdl ) |
| 291 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 292 | ROM_LOAD( "ballyhlc.bin", 0x0000, 0x2000, CRC(d7c517ba) SHA1(6b2bef5d970e54ed204549f58ba6d197a8bfd3cc) ) |
| 293 | ROM_CART_LOAD( "cart", 0x2000, 0x8000, 0 ) |
| 294 | ROM_END |
| 295 | |
| 296 | ROM_START( astrocdw ) |
| 297 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 298 | ROM_LOAD( "bioswhit.bin", 0x0000, 0x2000, CRC(6eb53e79) SHA1(d84341feec1a0a0e8aa6151b649bc3cf6ef69fbf) ) |
| 299 | ROM_CART_LOAD( "cart", 0x2000, 0x8000, 0 ) |
| 300 | ROM_END |
| 301 | |
| 302 | /************************************* |
| 303 | * |
| 304 | * Driver initialization |
| 305 | * |
| 306 | *************************************/ |
| 307 | |
| 308 | static DRIVER_INIT( astrocde ) |
| 309 | { |
| 310 | astrocde_state *state = machine.driver_data<astrocde_state>(); |
| 311 | state->m_video_config = AC_SOUND_PRESENT | AC_LIGHTPEN_INTS; |
| 312 | } |
| 313 | |
| 314 | MACHINE_RESET( astrocde ) |
| 315 | { |
| 316 | int ram_expansion_installed = 0, write_protect_on = 0, expansion_ram_start = 0, expansion_ram_end = 0, shadow_ram_end = 0; |
| 317 | address_space *space = machine.device("maincpu")->memory().space(AS_PROGRAM); |
| 318 | UINT8 *expram = ram_get_ptr(machine.device("ram_tag")); |
| 319 | space->unmap_readwrite(0x5000, 0xffff); // unmap any previously installed expansion RAM |
| 320 | |
| 321 | get_ram_expansion_settings(space, ram_expansion_installed, write_protect_on, expansion_ram_start, expansion_ram_end, shadow_ram_end); // passing by reference |
| 322 | |
| 323 | if (ram_expansion_installed == 1) |
| 324 | { |
| 325 | if (write_protect_on == 0) // write protect off, so install memory normally |
| 326 | { |
| 327 | space->install_ram(expansion_ram_start, expansion_ram_end, expram); |
| 328 | if (shadow_ram_end > expansion_ram_end) |
| 329 | space->install_ram(expansion_ram_end + 1, shadow_ram_end, expram); |
| 330 | } |
| 331 | else // write protect on, so make memory read only |
| 332 | { |
| 333 | space->nop_write(expansion_ram_start, expansion_ram_end); |
| 334 | } |
| 335 | } |
| 336 | } |
| 337 | |
| 338 | void get_ram_expansion_settings(address_space *space, int &ram_expansion_installed, int &write_protect_on, int &expansion_ram_start, int &expansion_ram_end, int &shadow_ram_end) |
| 339 | { |
| 340 | if (input_port_read(space->machine(), "PROTECT") == 0x01) |
| 341 | write_protect_on = 1; |
| 342 | else |
| 343 | write_protect_on = 0; |
| 344 | |
| 345 | ram_expansion_installed = 1; |
| 346 | |
| 347 | switch(input_port_read(space->machine(), "CFG")) // check RAM expansion configuration and set address ranges |
| 348 | { |
| 349 | case 0x00: // No RAM Expansion |
| 350 | ram_expansion_installed = 0; |
| 351 | break; |
| 352 | case 0x01: // 16KB Viper System 1 RAM Expansion |
| 353 | expansion_ram_start = 0x6000; |
| 354 | expansion_ram_end = 0x9fff; |
| 355 | shadow_ram_end = 0; |
| 356 | break; |
| 357 | case 0x02: // "32KB Lil' WHITE RAM Expansion |
| 358 | expansion_ram_start = 0x5000; |
| 359 | expansion_ram_end = 0xcfff; |
| 360 | shadow_ram_end = 0xffff; |
| 361 | break; |
| 362 | case 0x04: // R&L 64K RAM Board (44KB installed) |
| 363 | expansion_ram_start = 0x5000; |
| 364 | expansion_ram_end = 0xffff; |
| 365 | shadow_ram_end = 0; |
| 366 | break; |
| 367 | case 0x08: // 4KB Blue RAM Expansion |
| 368 | expansion_ram_start = 0x6000; |
| 369 | expansion_ram_end = 0x6fff; |
| 370 | shadow_ram_end = 0; |
| 371 | break; |
| 372 | case 0x10: // 16KB Blue RAM Expansion |
| 373 | expansion_ram_start = 0x6000; |
| 374 | expansion_ram_end = 0x9fff; |
| 375 | shadow_ram_end = 0; |
| 376 | break; |
| 377 | case 0x20: // 32KB Blue RAM Expansion |
| 378 | expansion_ram_start = 0x6000; |
| 379 | expansion_ram_end = 0xdfff; |
| 380 | shadow_ram_end = 0; |
| 381 | break; |
| 382 | default: |
| 383 | break; |
| 384 | } |
| 385 | } |
| 386 | |
| 387 | |
| 388 | /************************************* |
| 389 | * |
| 390 | * Driver definitions |
| 391 | * |
| 392 | *************************************/ |
| 393 | |
| 394 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 395 | CONS( 1978, astrocde, 0, 0, astrocde, astrocde, astrocde, "Bally Manufacturing", "Bally Professional Arcade", GAME_SUPPORTS_SAVE ) |
| 396 | CONS( 1977, astrocdl, astrocde, 0, astrocde, astrocde, astrocde, "Bally Manufacturing", "Bally Home Library Computer", GAME_SUPPORTS_SAVE ) |
| 397 | CONS( 1977, astrocdw, astrocde, 0, astrocde, astrocde, astrocde, "Bally Manufacturing", "Bally Computer System", GAME_SUPPORTS_SAVE ) |
src/mess/drivers/segasms.c
| r0 | r13302 | |
| 1 | /****************************************************************************** |
| 2 | Contributors: |
| 3 | |
| 4 | Marat Fayzullin (MG source) |
| 5 | Charles MacDonald |
| 6 | Mathis Rosenhauer |
| 7 | Brad Oliver |
| 8 | Michael Luong |
| 9 | |
| 10 | To do: |
| 11 | |
| 12 | - SIO interface for Game Gear (needs netplay, I guess) |
| 13 | - SMS lightgun support |
| 14 | - LCD persistence emulation for GG |
| 15 | - SMS 3D glass support |
| 16 | |
| 17 | The Game Gear SIO hardware is not emulated but has some |
| 18 | placeholders in 'machine/sms.c' |
| 19 | |
| 20 | Changes: |
| 21 | Apr 02 - Added raster palette effects for SMS & GG (ML) |
| 22 | - Added sprite collision (ML) |
| 23 | - Added zoomed sprites (ML) |
| 24 | May 02 - Fixed paging bug (ML) |
| 25 | - Fixed sprite and tile priority bug (ML) |
| 26 | - Fixed bug #66 (ML) |
| 27 | - Fixed bug #78 (ML) |
| 28 | - try to implement LCD persistence emulation for GG (ML) |
| 29 | Jun 10, 02 - Added bios emulation (ML) |
| 30 | Jun 12, 02 - Added PAL & NTSC systems (ML) |
| 31 | Jun 25, 02 - Added border emulation (ML) |
| 32 | Jun 27, 02 - Version bits for Game Gear (bits 6 of port 00) (ML) |
| 33 | Nov-Dec, 05 - Numerous cleanups, fixes, updates (WP) |
| 34 | Mar, 07 - More cleanups, fixes, mapper additions, etc (WP) |
| 35 | |
| 36 | SMS Store Unit memory map for the second CPU: |
| 37 | |
| 38 | 0000-3FFF - BIOS |
| 39 | 4000-47FF - RAM |
| 40 | 8000 - System Control Register (R/W) |
| 41 | Reading: |
| 42 | bit7 - ready (0 = ready, 1 = not ready) |
| 43 | bit6-bit5 - unknown |
| 44 | bit4-bit3 - timer selection bit switches |
| 45 | bit2-bit0 - unknown |
| 46 | Writing: |
| 47 | bit7-bit4 - unknown, maybe led of selected game to set? |
| 48 | bit3 - unknown, 1 seems to be written all the time |
| 49 | bit2 - unknown, 1 seems to be written all the time |
| 50 | bit1 - reset signal for sms cpu, 0 = reset low, 1 = reset high |
| 51 | bit0 - which cpu receives interrupt signals, 0 = sms cpu, 1 = controlling cpu |
| 52 | C000 - Card/Cartridge selction register (W) |
| 53 | bit7-bit4 - slot to select |
| 54 | bit3 - slot type (0 = cartridge, 1 = card ?) |
| 55 | bit2-bit0 - unknown |
| 56 | C400 - ???? (used once) |
| 57 | D800 - Selection buttons #1, 1-8 (R) |
| 58 | DC00 - Selection buttons #2, 9-16 (R) |
| 59 | |
| 60 | ******************************************************************************/ |
| 61 | |
| 62 | #include "emu.h" |
| 63 | #include "cpu/z80/z80.h" |
| 64 | #include "sound/sn76496.h" |
| 65 | #include "sound/2413intf.h" |
| 66 | #include "includes/sms.h" |
| 67 | #include "video/smsvdp.h" |
| 68 | #include "imagedev/cartslot.h" |
| 69 | |
| 70 | #include "sms1.lh" |
| 71 | |
| 72 | #define MASTER_CLOCK_PAL 53203400 /* This might be a tiny bit too low */ |
| 73 | |
| 74 | |
| 75 | static ADDRESS_MAP_START( sms1_mem, AS_PROGRAM, 8 ) |
| 76 | AM_RANGE(0x0000, 0x03ff) AM_ROMBANK("bank1") /* First 0x0400 part always points to first page */ |
| 77 | AM_RANGE(0x0400, 0x3fff) AM_ROMBANK("bank2") /* switchable rom bank */ |
| 78 | AM_RANGE(0x4000, 0x5fff) AM_ROMBANK("bank3") /* switchable rom bank */ |
| 79 | AM_RANGE(0x6000, 0x7fff) AM_ROMBANK("bank4") /* switchable rom bank */ |
| 80 | AM_RANGE(0x8000, 0x9fff) AM_READ_BANK("bank5") AM_WRITE(sms_cartram_w) /* ROM bank / on-cart RAM */ |
| 81 | AM_RANGE(0xa000, 0xbfff) AM_READ_BANK("bank6") AM_WRITE(sms_cartram2_w) /* ROM bank / on-cart RAM */ |
| 82 | AM_RANGE(0xc000, 0xdff7) AM_MIRROR(0x2000) AM_RAM /* RAM (mirror at 0xE000) */ |
| 83 | AM_RANGE(0xdff8, 0xdfff) AM_RAM /* RAM "underneath" frame registers */ |
| 84 | AM_RANGE(0xfff8, 0xfffb) AM_READWRITE(sms_sscope_r, sms_sscope_w) /* 3-D glasses */ |
| 85 | AM_RANGE(0xfffc, 0xffff) AM_READWRITE(sms_mapper_r, sms_mapper_w) /* Bankswitch control */ |
| 86 | ADDRESS_MAP_END |
| 87 | |
| 88 | static ADDRESS_MAP_START( sms_mem, AS_PROGRAM, 8 ) |
| 89 | AM_RANGE(0x0000, 0x03ff) AM_ROMBANK("bank1") /* First 0x0400 part always points to first page */ |
| 90 | AM_RANGE(0x0400, 0x3fff) AM_ROMBANK("bank2") /* switchable rom bank */ |
| 91 | AM_RANGE(0x4000, 0x5fff) AM_ROMBANK("bank3") /* switchable rom bank */ |
| 92 | AM_RANGE(0x6000, 0x7fff) AM_ROMBANK("bank4") /* switchable rom bank */ |
| 93 | AM_RANGE(0x8000, 0x9fff) AM_READ_BANK("bank5") AM_WRITE(sms_cartram_w) /* ROM bank / on-cart RAM */ |
| 94 | AM_RANGE(0xa000, 0xbfff) AM_READ_BANK("bank6") AM_WRITE(sms_cartram2_w) /* ROM bank / on-cart RAM */ |
| 95 | AM_RANGE(0xc000, 0xdffb) AM_MIRROR(0x2000) AM_RAM /* RAM (mirror at 0xE000) */ |
| 96 | AM_RANGE(0xdffc, 0xdfff) AM_RAM /* RAM "underneath" frame registers */ |
| 97 | AM_RANGE(0xfffc, 0xffff) AM_READWRITE(sms_mapper_r, sms_mapper_w) /* Bankswitch control */ |
| 98 | ADDRESS_MAP_END |
| 99 | |
| 100 | static ADDRESS_MAP_START( sms_store_mem, AS_PROGRAM, 8 ) |
| 101 | AM_RANGE(0x0000, 0x3fff) AM_ROM /* BIOS */ |
| 102 | AM_RANGE(0x4000, 0x47ff) AM_RAM /* RAM */ |
| 103 | AM_RANGE(0x6000, 0x7fff) AM_ROMBANK("bank10") /* Cartridge/card peek area */ |
| 104 | AM_RANGE(0x8000, 0x8000) AM_READWRITE(sms_store_control_r, sms_store_control_w) /* Control */ |
| 105 | AM_RANGE(0xc000, 0xc000) AM_READWRITE(sms_store_cart_select_r, sms_store_cart_select_w) /* cartridge/card slot selector */ |
| 106 | AM_RANGE(0xd800, 0xd800) AM_READ(sms_store_select1) /* Game selector port #1 */ |
| 107 | AM_RANGE(0xdc00, 0xdc00) AM_READ(sms_store_select2) /* Game selector port #2 */ |
| 108 | ADDRESS_MAP_END |
| 109 | |
| 110 | static ADDRESS_MAP_START( sms_io, AS_IO, 8 ) |
| 111 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 112 | ADDRESS_MAP_UNMAP_HIGH |
| 113 | AM_RANGE(0x00, 0x00) AM_MIRROR(0x3e) AM_WRITE(sms_bios_w) |
| 114 | AM_RANGE(0x01, 0x01) AM_MIRROR(0x3e) AM_WRITE(sms_io_control_w) |
| 115 | AM_RANGE(0x40, 0x7f) AM_READ(sms_count_r) |
| 116 | AM_RANGE(0x40, 0x7f) AM_DEVWRITE("segapsg", sn76496_w) |
| 117 | AM_RANGE(0x80, 0x80) AM_MIRROR(0x3e) AM_DEVREADWRITE("sms_vdp", sms_vdp_data_r, sms_vdp_data_w) |
| 118 | AM_RANGE(0x81, 0x81) AM_MIRROR(0x3e) AM_DEVREADWRITE("sms_vdp", sms_vdp_ctrl_r, sms_vdp_ctrl_w) |
| 119 | AM_RANGE(0xc0, 0xc0) AM_MIRROR(0x1e) AM_READ(sms_input_port_0_r) |
| 120 | AM_RANGE(0xc1, 0xc1) AM_MIRROR(0x1e) AM_READ(sms_input_port_1_r) |
| 121 | AM_RANGE(0xe0, 0xe0) AM_MIRROR(0x0e) AM_READ(sms_input_port_0_r) |
| 122 | AM_RANGE(0xe1, 0xe1) AM_MIRROR(0x0e) AM_READ(sms_input_port_1_r) |
| 123 | AM_RANGE(0xf0, 0xf0) AM_READWRITE(sms_input_port_0_r, sms_ym2413_register_port_0_w) |
| 124 | AM_RANGE(0xf1, 0xf1) AM_READWRITE(sms_input_port_1_r, sms_ym2413_data_port_0_w) |
| 125 | AM_RANGE(0xf2, 0xf2) AM_READWRITE(sms_fm_detect_r, sms_fm_detect_w) |
| 126 | AM_RANGE(0xf3, 0xf3) AM_READ(sms_input_port_1_r) |
| 127 | AM_RANGE(0xf4, 0xf4) AM_MIRROR(0x02) AM_READ(sms_input_port_0_r) |
| 128 | AM_RANGE(0xf5, 0xf5) AM_MIRROR(0x02) AM_READ(sms_input_port_1_r) |
| 129 | AM_RANGE(0xf8, 0xf8) AM_MIRROR(0x06) AM_READ(sms_input_port_0_r) |
| 130 | AM_RANGE(0xf9, 0xf9) AM_MIRROR(0x06) AM_READ(sms_input_port_1_r) |
| 131 | ADDRESS_MAP_END |
| 132 | |
| 133 | static ADDRESS_MAP_START( gg_io, AS_IO, 8 ) |
| 134 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 135 | ADDRESS_MAP_UNMAP_HIGH |
| 136 | AM_RANGE(0x00, 0x00) AM_READ(gg_input_port_2_r) |
| 137 | AM_RANGE(0x01, 0x05) AM_READWRITE(gg_sio_r, gg_sio_w) |
| 138 | AM_RANGE(0x06, 0x06) AM_DEVWRITE("gamegear", sn76496_stereo_w) |
| 139 | AM_RANGE(0x07, 0x07) AM_WRITE(sms_io_control_w) |
| 140 | AM_RANGE(0x08, 0x08) AM_MIRROR(0x06) AM_WRITE(sms_bios_w) |
| 141 | AM_RANGE(0x09, 0x09) AM_MIRROR(0x06) AM_WRITE(sms_io_control_w) |
| 142 | AM_RANGE(0x10, 0x10) AM_MIRROR(0x0e) AM_WRITE(sms_bios_w) |
| 143 | AM_RANGE(0x11, 0x11) AM_MIRROR(0x0e) AM_WRITE(sms_io_control_w) |
| 144 | AM_RANGE(0x20, 0x20) AM_MIRROR(0x1e) AM_WRITE(sms_bios_w) |
| 145 | AM_RANGE(0x21, 0x21) AM_MIRROR(0x1e) AM_WRITE(sms_io_control_w) |
| 146 | AM_RANGE(0x40, 0x7f) AM_READ(sms_count_r) |
| 147 | AM_RANGE(0x40, 0x7f) AM_DEVWRITE("gamegear", sn76496_w) |
| 148 | AM_RANGE(0x80, 0x80) AM_MIRROR(0x3e) AM_DEVREADWRITE("sms_vdp", sms_vdp_data_r, sms_vdp_data_w) |
| 149 | AM_RANGE(0x81, 0x81) AM_MIRROR(0x3e) AM_DEVREADWRITE("sms_vdp", sms_vdp_ctrl_r, sms_vdp_ctrl_w) |
| 150 | AM_RANGE(0xc0, 0xc0) AM_READ_PORT("PORT_DC") |
| 151 | AM_RANGE(0xc1, 0xc1) AM_READ_PORT("PORT_DD") |
| 152 | AM_RANGE(0xdc, 0xdc) AM_READ_PORT("PORT_DC") |
| 153 | AM_RANGE(0xdd, 0xdd) AM_READ_PORT("PORT_DD") |
| 154 | ADDRESS_MAP_END |
| 155 | |
| 156 | |
| 157 | static INPUT_PORTS_START( sms ) |
| 158 | PORT_START("PORT_DC") |
| 159 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_8WAY PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x00) |
| 160 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_8WAY PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x00) |
| 161 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_8WAY PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x00) |
| 162 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_8WAY PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x00) |
| 163 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x00) |
| 164 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x00) |
| 165 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_8WAY PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x00) |
| 166 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_8WAY PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x00) |
| 167 | |
| 168 | PORT_START("PORT_DD") |
| 169 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_8WAY PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x00) |
| 170 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_8WAY PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x00) |
| 171 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x00) |
| 172 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x00) |
| 173 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) /* Software Reset bit */ |
| 174 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 175 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) /* Port A TH */ |
| 176 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) /* Port B TH */ |
| 177 | |
| 178 | PORT_START("PAUSE") |
| 179 | PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 180 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START ) PORT_NAME(DEF_STR(Pause)) |
| 181 | |
| 182 | PORT_START("LPHASER0") /* Light phaser X - player 1 */ |
| 183 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR( X, 1.0, 0.0, 0 ) PORT_SENSITIVITY(50) PORT_KEYDELTA(15) PORT_PLAYER(1) PORT_CHANGED(lgun1_changed, NULL) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) |
| 184 | |
| 185 | PORT_START("LPHASER1") /* Light phaser Y - player 1 */ |
| 186 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR( Y, 1.0, 0.0, 0 ) PORT_SENSITIVITY(50) PORT_KEYDELTA(15) PORT_PLAYER(1) PORT_CHANGED(lgun1_changed, NULL) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) |
| 187 | |
| 188 | PORT_START("LPHASER2") /* Light phaser X - player 2 */ |
| 189 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR( X, 1.0, 0.0, 0 ) PORT_SENSITIVITY(50) PORT_KEYDELTA(15) PORT_PLAYER(2) PORT_CHANGED(lgun2_changed, NULL) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) |
| 190 | |
| 191 | PORT_START("LPHASER3") /* Light phaser Y - player 2 */ |
| 192 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR( Y, 1.0, 0.0, 0 ) PORT_SENSITIVITY(50) PORT_KEYDELTA(25) PORT_PLAYER(2) PORT_CHANGED(lgun2_changed, NULL) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) |
| 193 | |
| 194 | PORT_START("RFU") /* Rapid Fire Unit */ |
| 195 | PORT_CONFNAME( 0x03, 0x00, "Rapid Fire Unit - Player 1" ) |
| 196 | PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) |
| 197 | PORT_CONFSETTING( 0x01, "Button A" ) |
| 198 | PORT_CONFSETTING( 0x02, "Button B" ) |
| 199 | PORT_CONFSETTING( 0x03, "Button A + B" ) |
| 200 | PORT_CONFNAME( 0x0c, 0x00, "Rapid Fire Unit - Player 2" ) |
| 201 | PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) |
| 202 | PORT_CONFSETTING( 0x04, "Button A" ) |
| 203 | PORT_CONFSETTING( 0x08, "Button B" ) |
| 204 | PORT_CONFSETTING( 0x0c, "Button A + B" ) |
| 205 | |
| 206 | PORT_START("PADDLE0") /* Paddle player 1 */ |
| 207 | PORT_BIT( 0xff, 0x80, IPT_PADDLE) PORT_SENSITIVITY(40) PORT_KEYDELTA(20) PORT_CENTERDELTA(0) PORT_MINMAX(0,255) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x02) |
| 208 | |
| 209 | PORT_START("PADDLE1") /* Paddle player 2 */ |
| 210 | PORT_BIT( 0xff, 0x80, IPT_PADDLE) PORT_SENSITIVITY(40) PORT_KEYDELTA(20) PORT_CENTERDELTA(0) PORT_MINMAX(0,255) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x20) |
| 211 | |
| 212 | PORT_START("CTRLIPT") /* Light Phaser and Paddle Control buttons */ |
| 213 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x01) |
| 214 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x02) |
| 215 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x04) |
| 216 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x04) |
| 217 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x10) |
| 218 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x20) |
| 219 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x40) |
| 220 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x40) |
| 221 | |
| 222 | PORT_START("CTRLSEL") /* Controller selection */ |
| 223 | PORT_CONFNAME( 0x0f, 0x00, "Player 1 Controller" ) |
| 224 | PORT_CONFSETTING( 0x00, DEF_STR( Joystick ) ) |
| 225 | PORT_CONFSETTING( 0x01, "Light Phaser" ) |
| 226 | PORT_CONFSETTING( 0x02, "Sega Paddle Control" ) |
| 227 | PORT_CONFSETTING( 0x04, "Sega Sports Pad" ) |
| 228 | PORT_CONFNAME( 0xf0, 0x00, "Player 2 Controller" ) |
| 229 | PORT_CONFSETTING( 0x00, DEF_STR( Joystick ) ) |
| 230 | PORT_CONFSETTING( 0x10, "Light Phaser" ) |
| 231 | PORT_CONFSETTING( 0x20, "Sega Paddle Control" ) |
| 232 | PORT_CONFSETTING( 0x40, "Sega Sports Pad" ) |
| 233 | |
| 234 | PORT_START("SPORT0") /* Player 1 Sports Pad X axis */ |
| 235 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(40) PORT_RESET PORT_REVERSE PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x04) |
| 236 | |
| 237 | PORT_START("SPORT1") /* Player 1 Sports Pad Y axis */ |
| 238 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(50) PORT_KEYDELTA(40) PORT_RESET PORT_REVERSE PORT_PLAYER(1) PORT_CONDITION("CTRLSEL", 0x0f, PORTCOND_EQUALS, 0x04) |
| 239 | |
| 240 | PORT_START("SPORT2") /* Player 2 Sports Pad X axis */ |
| 241 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(40) PORT_RESET PORT_REVERSE PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x40) |
| 242 | |
| 243 | PORT_START("SPORT3") /* Player 2 Sports Pad Y axis */ |
| 244 | PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(50) PORT_KEYDELTA(40) PORT_RESET PORT_REVERSE PORT_PLAYER(2) PORT_CONDITION("CTRLSEL", 0xf0, PORTCOND_EQUALS, 0x40) |
| 245 | INPUT_PORTS_END |
| 246 | |
| 247 | static INPUT_PORTS_START( sms1 ) |
| 248 | PORT_INCLUDE( sms ) |
| 249 | |
| 250 | PORT_START("RESET") |
| 251 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Reset Button") |
| 252 | |
| 253 | PORT_START("SEGASCOPE") |
| 254 | PORT_CONFNAME( 0x01, 0x00, "SegaScope (3-D Glasses)" ) |
| 255 | PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) |
| 256 | PORT_CONFSETTING( 0x01, DEF_STR( On ) ) |
| 257 | |
| 258 | PORT_START("SSCOPE_BINOCULAR") |
| 259 | PORT_CONFNAME( 0x03, 0x00, "SegaScope - Binocular Hack" ) PORT_CONDITION("SEGASCOPE", 0x01, PORTCOND_EQUALS, 0x01) |
| 260 | PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) |
| 261 | PORT_CONFSETTING( 0x01, "Left Lens" ) |
| 262 | PORT_CONFSETTING( 0x02, "Right Lens" ) |
| 263 | PORT_CONFSETTING( 0x03, "Both Lens" ) |
| 264 | PORT_BIT( 0x03, 0x00, IPT_UNUSED ) PORT_CONDITION("SEGASCOPE", 0x01, PORTCOND_EQUALS, 0x00) |
| 265 | INPUT_PORTS_END |
| 266 | |
| 267 | static INPUT_PORTS_START( smsj ) |
| 268 | PORT_INCLUDE( sms1 ) |
| 269 | |
| 270 | PORT_START("TVDRAW") |
| 271 | PORT_CONFNAME( 0x01, 0x00, "Terebi Oekaki Graphics Tablet" ) |
| 272 | PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) |
| 273 | PORT_CONFSETTING( 0x01, DEF_STR( On ) ) |
| 274 | |
| 275 | PORT_START("TVDRAW_X") |
| 276 | PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_NAME("Tablet - X Axis") PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_PLAYER(1) |
| 277 | PORT_CONDITION("TVDRAW", 0x01, PORTCOND_EQUALS, 0x01) |
| 278 | |
| 279 | PORT_START("TVDRAW_Y") |
| 280 | PORT_BIT( 0xff, 0x60, IPT_LIGHTGUN_Y ) PORT_NAME("Tablet - Y Axis") PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_MINMAX(0, 191) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_PLAYER(1) |
| 281 | PORT_CONDITION("TVDRAW", 0x01, PORTCOND_EQUALS, 0x01) |
| 282 | |
| 283 | PORT_START("TVDRAW_PEN") |
| 284 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Tablet - Pen") PORT_CONDITION("TVDRAW", 0x01, PORTCOND_EQUALS, 0x01) |
| 285 | INPUT_PORTS_END |
| 286 | |
| 287 | static INPUT_PORTS_START( gg ) |
| 288 | PORT_START("PORT_DC") |
| 289 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_8WAY |
| 290 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_8WAY |
| 291 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_8WAY |
| 292 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_8WAY |
| 293 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 294 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 295 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 296 | |
| 297 | PORT_START("PORT_DD") |
| 298 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 299 | |
| 300 | PORT_START("START") |
| 301 | PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 302 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START ) PORT_NAME("Start") /* Game Gear START */ |
| 303 | INPUT_PORTS_END |
| 304 | |
| 305 | static PALETTE_INIT( sms ) |
| 306 | { |
| 307 | int i; |
| 308 | for (i = 0; i < 64; i++) |
| 309 | { |
| 310 | int r = i & 0x03; |
| 311 | int g = (i & 0x0c) >> 2; |
| 312 | int b = (i & 0x30) >> 4; |
| 313 | palette_set_color_rgb(machine, i, r << 6, g << 6, b << 6); |
| 314 | } |
| 315 | /* TMS9918 palette */ |
| 316 | palette_set_color_rgb(machine, 64+ 0, 0, 0, 0); |
| 317 | palette_set_color_rgb(machine, 64+ 1, 0, 0, 0); |
| 318 | palette_set_color_rgb(machine, 64+ 2, 33, 200, 66); |
| 319 | palette_set_color_rgb(machine, 64+ 3, 94, 220, 120); |
| 320 | palette_set_color_rgb(machine, 64+ 4, 84, 85, 237); |
| 321 | palette_set_color_rgb(machine, 64+ 5, 125, 118, 252); |
| 322 | palette_set_color_rgb(machine, 64+ 6, 212, 82, 77); |
| 323 | palette_set_color_rgb(machine, 64+ 7, 66, 235, 245); |
| 324 | palette_set_color_rgb(machine, 64+ 8, 252, 85, 84); |
| 325 | palette_set_color_rgb(machine, 64+ 9, 255, 121, 120); |
| 326 | palette_set_color_rgb(machine, 64+10, 212, 193, 84); |
| 327 | palette_set_color_rgb(machine, 64+11, 230, 206, 128); |
| 328 | palette_set_color_rgb(machine, 64+12, 33, 176, 59); |
| 329 | palette_set_color_rgb(machine, 64+13, 201, 91, 186); |
| 330 | palette_set_color_rgb(machine, 64+14, 204, 204, 204); |
| 331 | palette_set_color_rgb(machine, 64+15, 255, 255, 255); |
| 332 | } |
| 333 | |
| 334 | static PALETTE_INIT( gamegear ) |
| 335 | { |
| 336 | int i; |
| 337 | for (i = 0; i < 4096; i++) |
| 338 | { |
| 339 | int r = i & 0x000f; |
| 340 | int g = (i & 0x00f0) >> 4; |
| 341 | int b = (i & 0x0f00) >> 8; |
| 342 | palette_set_color_rgb(machine, i, r << 4, g << 4, b << 4); |
| 343 | } |
| 344 | } |
| 345 | |
| 346 | |
| 347 | |
| 348 | static void sms_int_callback( running_machine &machine, int state ) |
| 349 | { |
| 350 | cputag_set_input_line(machine, "maincpu", 0, state); |
| 351 | } |
| 352 | |
| 353 | static const smsvdp_interface _315_5124_intf = |
| 354 | { |
| 355 | MODEL_315_5124, |
| 356 | sms_int_callback, |
| 357 | sms_pause_callback |
| 358 | }; |
| 359 | |
| 360 | static const smsvdp_interface _315_5246_intf = |
| 361 | { |
| 362 | MODEL_315_5246, |
| 363 | sms_int_callback, |
| 364 | sms_pause_callback |
| 365 | }; |
| 366 | |
| 367 | static const smsvdp_interface _315_5378_intf = |
| 368 | { |
| 369 | MODEL_315_5378, |
| 370 | sms_int_callback, |
| 371 | sms_pause_callback |
| 372 | }; |
| 373 | |
| 374 | static const smsvdp_interface sms_store_intf = |
| 375 | { |
| 376 | MODEL_315_5124, |
| 377 | sms_store_int_callback, |
| 378 | sms_pause_callback |
| 379 | }; |
| 380 | |
| 381 | static MACHINE_CONFIG_FRAGMENT( sms_cartslot ) |
| 382 | MCFG_CARTSLOT_ADD("cart1") |
| 383 | MCFG_CARTSLOT_EXTENSION_LIST("sms,bin") |
| 384 | MCFG_CARTSLOT_NOT_MANDATORY |
| 385 | MCFG_CARTSLOT_INTERFACE("sms_cart") |
| 386 | MCFG_CARTSLOT_START(sms_cart) |
| 387 | MCFG_CARTSLOT_LOAD(sms_cart) |
| 388 | |
| 389 | MCFG_SOFTWARE_LIST_ADD("cart_list","sms") |
| 390 | MACHINE_CONFIG_END |
| 391 | |
| 392 | static MACHINE_CONFIG_FRAGMENT( gg_cartslot ) |
| 393 | MCFG_CARTSLOT_ADD("cart1") |
| 394 | MCFG_CARTSLOT_EXTENSION_LIST("gg,bin") |
| 395 | MCFG_CARTSLOT_MANDATORY |
| 396 | MCFG_CARTSLOT_INTERFACE("gamegear_cart") |
| 397 | MCFG_CARTSLOT_START(sms_cart) |
| 398 | MCFG_CARTSLOT_LOAD(sms_cart) |
| 399 | |
| 400 | MCFG_SOFTWARE_LIST_ADD("cart_list","gamegear") |
| 401 | MACHINE_CONFIG_END |
| 402 | |
| 403 | static MACHINE_CONFIG_START( sms_ntsc_base, sms_state ) |
| 404 | /* basic machine hardware */ |
| 405 | MCFG_CPU_ADD("maincpu", Z80, XTAL_53_693175MHz/15) |
| 406 | MCFG_CPU_PROGRAM_MAP(sms_mem) |
| 407 | MCFG_CPU_IO_MAP(sms_io) |
| 408 | |
| 409 | MCFG_QUANTUM_TIME(attotime::from_hz(60)) |
| 410 | |
| 411 | MCFG_MACHINE_START(sms) |
| 412 | MCFG_MACHINE_RESET(segasms) |
| 413 | |
| 414 | /* sound hardware */ |
| 415 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 416 | MCFG_SOUND_ADD("segapsg", SEGAPSG, XTAL_53_693175MHz/15) |
| 417 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 418 | |
| 419 | MCFG_FRAGMENT_ADD( sms_cartslot ) |
| 420 | MACHINE_CONFIG_END |
| 421 | |
| 422 | static MACHINE_CONFIG_DERIVED( sms2_ntsc, sms_ntsc_base ) |
| 423 | /* video hardware */ |
| 424 | MCFG_SCREEN_ADD("screen", RASTER) |
| 425 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) |
| 426 | MCFG_SCREEN_RAW_PARAMS(XTAL_53_693175MHz/10, SMS_X_PIXELS, LBORDER_START + LBORDER_X_PIXELS - 2, LBORDER_START + LBORDER_X_PIXELS + 256 + 10, NTSC_Y_PIXELS, TBORDER_START + NTSC_224_TBORDER_Y_PIXELS, TBORDER_START + NTSC_224_TBORDER_Y_PIXELS + 224) |
| 427 | MCFG_SCREEN_UPDATE(sms) |
| 428 | |
| 429 | MCFG_PALETTE_LENGTH(64+16) |
| 430 | MCFG_PALETTE_INIT(sms) |
| 431 | |
| 432 | MCFG_SMSVDP_ADD("sms_vdp", _315_5246_intf) |
| 433 | MACHINE_CONFIG_END |
| 434 | |
| 435 | static MACHINE_CONFIG_DERIVED( sms1_ntsc, sms_ntsc_base ) |
| 436 | |
| 437 | MCFG_CPU_MODIFY("maincpu") |
| 438 | MCFG_CPU_PROGRAM_MAP(sms1_mem) // This adds the SegaScope handlers for 3-D glasses |
| 439 | MCFG_CPU_IO_MAP(sms_io) |
| 440 | |
| 441 | /* video hardware */ |
| 442 | MCFG_SCREEN_ADD("screen", RASTER) |
| 443 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) |
| 444 | MCFG_SCREEN_RAW_PARAMS(XTAL_53_693175MHz/10, SMS_X_PIXELS, LBORDER_START + LBORDER_X_PIXELS - 2, LBORDER_START + LBORDER_X_PIXELS + 256 + 10, NTSC_Y_PIXELS, TBORDER_START + NTSC_224_TBORDER_Y_PIXELS, TBORDER_START + NTSC_224_TBORDER_Y_PIXELS + 224) |
| 445 | MCFG_SCREEN_UPDATE(sms1) |
| 446 | |
| 447 | MCFG_SCREEN_ADD("left_lcd", LCD) // This is needed for SegaScope Left LCD |
| 448 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) |
| 449 | MCFG_SCREEN_RAW_PARAMS(XTAL_53_693175MHz/10, SMS_X_PIXELS, LBORDER_START + LBORDER_X_PIXELS - 2, LBORDER_START + LBORDER_X_PIXELS + 256 + 10, NTSC_Y_PIXELS, TBORDER_START + NTSC_224_TBORDER_Y_PIXELS, TBORDER_START + NTSC_224_TBORDER_Y_PIXELS + 224) |
| 450 | MCFG_SCREEN_UPDATE(sms1) |
| 451 | |
| 452 | MCFG_SCREEN_ADD("right_lcd", LCD) // This is needed for SegaScope Right LCD |
| 453 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) |
| 454 | MCFG_SCREEN_RAW_PARAMS(XTAL_53_693175MHz/10, SMS_X_PIXELS, LBORDER_START + LBORDER_X_PIXELS - 2, LBORDER_START + LBORDER_X_PIXELS + 256 + 10, NTSC_Y_PIXELS, TBORDER_START + NTSC_224_TBORDER_Y_PIXELS, TBORDER_START + NTSC_224_TBORDER_Y_PIXELS + 224) |
| 455 | MCFG_SCREEN_UPDATE(sms1) |
| 456 | |
| 457 | MCFG_DEFAULT_LAYOUT(layout_sms1) |
| 458 | |
| 459 | MCFG_PALETTE_LENGTH(64+16) |
| 460 | MCFG_PALETTE_INIT(sms) |
| 461 | |
| 462 | MCFG_VIDEO_START(sms1) |
| 463 | |
| 464 | MCFG_SMSVDP_ADD("sms_vdp", _315_5124_intf) |
| 465 | MACHINE_CONFIG_END |
| 466 | |
| 467 | #define MCFG_SMSSDISP_CARTSLOT_ADD(_tag) \ |
| 468 | MCFG_CARTSLOT_ADD(_tag) \ |
| 469 | MCFG_CARTSLOT_EXTENSION_LIST("sms,bin") \ |
| 470 | MCFG_CARTSLOT_NOT_MANDATORY \ |
| 471 | MCFG_CARTSLOT_INTERFACE("sms_cart") \ |
| 472 | MCFG_CARTSLOT_START(sms_cart) \ |
| 473 | MCFG_CARTSLOT_LOAD(sms_cart) |
| 474 | |
| 475 | static MACHINE_CONFIG_DERIVED( sms_sdisp, sms2_ntsc ) |
| 476 | |
| 477 | MCFG_DEVICE_REMOVE("sms_vdp") |
| 478 | MCFG_SMSVDP_ADD("sms_vdp", sms_store_intf) |
| 479 | |
| 480 | MCFG_CPU_ADD("control", Z80, XTAL_53_693175MHz/15) |
| 481 | MCFG_CPU_PROGRAM_MAP(sms_store_mem) |
| 482 | /* Both CPUs seem to communicate with the VDP etc? */ |
| 483 | MCFG_CPU_IO_MAP(sms_io) |
| 484 | |
| 485 | MCFG_CARTSLOT_MODIFY("cart1") |
| 486 | MCFG_CARTSLOT_EXTENSION_LIST("sms,bin") |
| 487 | MCFG_CARTSLOT_MANDATORY |
| 488 | MCFG_CARTSLOT_INTERFACE("sms_cart") |
| 489 | MCFG_CARTSLOT_START(sms_cart) |
| 490 | MCFG_CARTSLOT_LOAD(sms_cart) |
| 491 | |
| 492 | MCFG_SMSSDISP_CARTSLOT_ADD("cart2") |
| 493 | MCFG_SMSSDISP_CARTSLOT_ADD("cart3") |
| 494 | MCFG_SMSSDISP_CARTSLOT_ADD("cart4") |
| 495 | MCFG_SMSSDISP_CARTSLOT_ADD("cart5") |
| 496 | MCFG_SMSSDISP_CARTSLOT_ADD("cart6") |
| 497 | MCFG_SMSSDISP_CARTSLOT_ADD("cart7") |
| 498 | MCFG_SMSSDISP_CARTSLOT_ADD("cart8") |
| 499 | MCFG_SMSSDISP_CARTSLOT_ADD("cart9") |
| 500 | MCFG_SMSSDISP_CARTSLOT_ADD("cart10") |
| 501 | MCFG_SMSSDISP_CARTSLOT_ADD("cart11") |
| 502 | MCFG_SMSSDISP_CARTSLOT_ADD("cart12") |
| 503 | MCFG_SMSSDISP_CARTSLOT_ADD("cart13") |
| 504 | MCFG_SMSSDISP_CARTSLOT_ADD("cart14") |
| 505 | MCFG_SMSSDISP_CARTSLOT_ADD("cart15") |
| 506 | MCFG_SMSSDISP_CARTSLOT_ADD("cart16") |
| 507 | MACHINE_CONFIG_END |
| 508 | |
| 509 | static MACHINE_CONFIG_START( sms_pal_base, sms_state ) |
| 510 | /* basic machine hardware */ |
| 511 | MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK_PAL/15) |
| 512 | MCFG_CPU_PROGRAM_MAP(sms_mem) |
| 513 | MCFG_CPU_IO_MAP(sms_io) |
| 514 | |
| 515 | MCFG_QUANTUM_TIME(attotime::from_hz(60)) |
| 516 | |
| 517 | MCFG_MACHINE_START(sms) |
| 518 | MCFG_MACHINE_RESET(segasms) |
| 519 | |
| 520 | /* sound hardware */ |
| 521 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 522 | MCFG_SOUND_ADD("segapsg", SEGAPSG, MASTER_CLOCK_PAL/15) |
| 523 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 524 | |
| 525 | MCFG_FRAGMENT_ADD( sms_cartslot ) |
| 526 | MACHINE_CONFIG_END |
| 527 | |
| 528 | static MACHINE_CONFIG_DERIVED( sms2_pal, sms_pal_base ) |
| 529 | |
| 530 | /* video hardware */ |
| 531 | MCFG_SCREEN_ADD("screen", RASTER) |
| 532 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) |
| 533 | MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK_PAL/10, SMS_X_PIXELS, LBORDER_START + LBORDER_X_PIXELS - 2, LBORDER_START + LBORDER_X_PIXELS + 256 + 10, PAL_Y_PIXELS, TBORDER_START + PAL_240_TBORDER_Y_PIXELS, TBORDER_START + PAL_240_TBORDER_Y_PIXELS + 240) |
| 534 | MCFG_SCREEN_UPDATE(sms) |
| 535 | |
| 536 | MCFG_PALETTE_LENGTH(64+16) |
| 537 | MCFG_PALETTE_INIT(sms) |
| 538 | |
| 539 | MCFG_SMSVDP_ADD("sms_vdp", _315_5246_intf) |
| 540 | MACHINE_CONFIG_END |
| 541 | |
| 542 | static MACHINE_CONFIG_DERIVED( sms1_pal, sms_pal_base ) |
| 543 | |
| 544 | MCFG_CPU_MODIFY("maincpu") |
| 545 | MCFG_CPU_PROGRAM_MAP(sms1_mem) // This adds the SegaScope handlers for 3-D glasses |
| 546 | MCFG_CPU_IO_MAP(sms_io) |
| 547 | |
| 548 | /* video hardware */ |
| 549 | MCFG_SCREEN_ADD("screen", RASTER) |
| 550 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) |
| 551 | MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK_PAL/10, SMS_X_PIXELS, LBORDER_START + LBORDER_X_PIXELS - 2, LBORDER_START + LBORDER_X_PIXELS + 256 + 10, PAL_Y_PIXELS, TBORDER_START + PAL_240_TBORDER_Y_PIXELS, TBORDER_START + PAL_240_TBORDER_Y_PIXELS + 240) |
| 552 | MCFG_SCREEN_UPDATE(sms1) |
| 553 | |
| 554 | MCFG_SCREEN_ADD("left_lcd", LCD) // This is needed for SegaScope Left LCD |
| 555 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) |
| 556 | MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK_PAL/10, SMS_X_PIXELS, LBORDER_START + LBORDER_X_PIXELS - 2, LBORDER_START + LBORDER_X_PIXELS + 256 + 10, PAL_Y_PIXELS, TBORDER_START + PAL_240_TBORDER_Y_PIXELS, TBORDER_START + PAL_240_TBORDER_Y_PIXELS + 240) |
| 557 | MCFG_SCREEN_UPDATE(sms1) |
| 558 | |
| 559 | MCFG_SCREEN_ADD("right_lcd", LCD) // This is needed for SegaScope Right LCD |
| 560 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) |
| 561 | MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK_PAL/10, SMS_X_PIXELS, LBORDER_START + LBORDER_X_PIXELS - 2, LBORDER_START + LBORDER_X_PIXELS + 256 + 10, PAL_Y_PIXELS, TBORDER_START + PAL_240_TBORDER_Y_PIXELS, TBORDER_START + PAL_240_TBORDER_Y_PIXELS + 240) |
| 562 | MCFG_SCREEN_UPDATE(sms1) |
| 563 | |
| 564 | MCFG_PALETTE_LENGTH(64+16) |
| 565 | MCFG_PALETTE_INIT(sms) |
| 566 | |
| 567 | MCFG_DEFAULT_LAYOUT(layout_sms1) |
| 568 | |
| 569 | MCFG_SMSVDP_ADD("sms_vdp", _315_5124_intf) |
| 570 | MACHINE_CONFIG_END |
| 571 | |
| 572 | static MACHINE_CONFIG_DERIVED( sms_fm, sms1_ntsc ) |
| 573 | |
| 574 | MCFG_SOUND_ADD("ym2413", YM2413, XTAL_53_693175MHz/15) |
| 575 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 576 | MACHINE_CONFIG_END |
| 577 | |
| 578 | static MACHINE_CONFIG_DERIVED( sg1000m3, sms_fm ) |
| 579 | |
| 580 | MCFG_CARTSLOT_MODIFY("cart1") |
| 581 | MCFG_CARTSLOT_EXTENSION_LIST("sms,bin,sg") |
| 582 | MCFG_CARTSLOT_MANDATORY |
| 583 | MCFG_CARTSLOT_START(sms_cart) |
| 584 | MCFG_CARTSLOT_LOAD(sms_cart) |
| 585 | MACHINE_CONFIG_END |
| 586 | |
| 587 | static MACHINE_CONFIG_DERIVED( sms2_fm, sms2_ntsc ) |
| 588 | |
| 589 | MCFG_SOUND_ADD("ym2413", YM2413, XTAL_53_693175MHz/15) |
| 590 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 591 | MACHINE_CONFIG_END |
| 592 | |
| 593 | static MACHINE_CONFIG_START( gamegear, sms_state ) |
| 594 | /* basic machine hardware */ |
| 595 | MCFG_CPU_ADD("maincpu", Z80, XTAL_53_693175MHz/15) |
| 596 | MCFG_CPU_PROGRAM_MAP(sms_mem) |
| 597 | MCFG_CPU_IO_MAP(gg_io) |
| 598 | |
| 599 | MCFG_QUANTUM_TIME(attotime::from_hz(60)) |
| 600 | |
| 601 | MCFG_MACHINE_START(sms) |
| 602 | MCFG_MACHINE_RESET(segasms) |
| 603 | |
| 604 | /* video hardware */ |
| 605 | MCFG_SCREEN_ADD("screen", LCD) |
| 606 | MCFG_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) |
| 607 | MCFG_SCREEN_RAW_PARAMS(XTAL_53_693175MHz/10, SMS_X_PIXELS, LBORDER_START + LBORDER_X_PIXELS + 6*8, LBORDER_START + LBORDER_X_PIXELS + 26*8, NTSC_Y_PIXELS, TBORDER_START + NTSC_192_TBORDER_Y_PIXELS + 3*8, TBORDER_START + NTSC_192_TBORDER_Y_PIXELS + 21*8 ) |
| 608 | MCFG_SCREEN_UPDATE(gamegear) |
| 609 | |
| 610 | MCFG_PALETTE_LENGTH(4096) |
| 611 | MCFG_PALETTE_INIT(gamegear) |
| 612 | |
| 613 | MCFG_VIDEO_START(gamegear) |
| 614 | |
| 615 | MCFG_SMSVDP_ADD("sms_vdp", _315_5378_intf) |
| 616 | |
| 617 | /* sound hardware */ |
| 618 | MCFG_SPEAKER_STANDARD_STEREO("lspeaker","rspeaker") |
| 619 | MCFG_SOUND_ADD("gamegear", GAMEGEAR, XTAL_53_693175MHz/15) |
| 620 | MCFG_SOUND_ROUTE(0, "lspeaker", 1.00) |
| 621 | MCFG_SOUND_ROUTE(1, "rspeaker", 1.00) |
| 622 | |
| 623 | /* cartridge */ |
| 624 | MCFG_FRAGMENT_ADD( gg_cartslot ) |
| 625 | MACHINE_CONFIG_END |
| 626 | |
| 627 | |
| 628 | ROM_START(sms1) |
| 629 | ROM_REGION(0x4000, "maincpu", 0) |
| 630 | ROM_FILL(0x0000, 0x4000, 0xff) |
| 631 | |
| 632 | ROM_REGION(0x20000, "user1", 0) |
| 633 | ROM_SYSTEM_BIOS( 0, "bios13", "US/European BIOS v1.3 (1986)" ) |
| 634 | ROMX_LOAD("bios13fx.rom", 0x0000, 0x2000, CRC(0072ED54) SHA1(c315672807d8ddb8d91443729405c766dd95cae7), ROM_BIOS(1)) |
| 635 | ROM_SYSTEM_BIOS( 1, "hangonsh", "US/European BIOS v2.4 with Hang On and Safari Hunt (1988)" ) |
| 636 | ROMX_LOAD("mpr-11459a.rom", 0x0000, 0x20000, CRC(91E93385) SHA1(9e179392cd416af14024d8f31c981d9ee9a64517), ROM_BIOS(2)) |
| 637 | ROM_SYSTEM_BIOS( 2, "hangon", "US/European BIOS v3.4 with Hang On (1988)" ) |
| 638 | ROMX_LOAD("mpr-11458.rom", 0x0000, 0x20000, CRC(8EDF7AC6) SHA1(51fd6d7990f62cd9d18c9ecfc62ed7936169107e), ROM_BIOS(3)) |
| 639 | ROM_SYSTEM_BIOS( 3, "missiled", "US/European BIOS v4.4 with Missile Defense 3D (1988)" ) |
| 640 | ROMX_LOAD("missiled.rom", 0x0000, 0x20000, CRC(E79BB689) SHA1(aa92ae576ca670b00855e278378d89e9f85e0351), ROM_BIOS(4)) |
| 641 | ROM_SYSTEM_BIOS( 4, "proto", "US Master System Prototype BIOS" ) |
| 642 | ROMX_LOAD("m404prot.rom", 0x0000, 0x2000, CRC(1a15dfcc) SHA1(4a06c8e66261611dce0305217c42138b71331701), ROM_BIOS(5)) |
| 643 | ROM_END |
| 644 | |
| 645 | ROM_START(sms) |
| 646 | ROM_REGION(0x4000, "maincpu", 0) |
| 647 | ROM_FILL(0x0000, 0x4000, 0xff) |
| 648 | |
| 649 | ROM_REGION(0x20000, "user1", 0) |
| 650 | ROM_SYSTEM_BIOS( 0, "alexkidd", "US/European BIOS with Alex Kidd in Miracle World (1990)" ) |
| 651 | ROMX_LOAD("mpr-12808.ic2", 0x0000, 0x20000, CRC(CF4A09EA) SHA1(3af7b66248d34eb26da40c92bf2fa4c73a46a051), ROM_BIOS(1)) /* "SEGA // MPR-12808 W63 // 9114E9004" @ IC2 */ |
| 652 | ROM_END |
| 653 | |
| 654 | ROM_START(smssdisp) |
| 655 | ROM_REGION(0x4000, "maincpu", 0) |
| 656 | ROM_FILL(0x0000, 0x4000, 0x00) |
| 657 | |
| 658 | ROM_REGION(0x4000, "user1", 0) |
| 659 | ROM_FILL(0x0000, 0x4000, 0xff) |
| 660 | |
| 661 | ROM_REGION(0x4000, "control", 0) |
| 662 | ROM_LOAD("smssdisp.rom", 0x0000, 0x4000, CRC(ee2c29ba) SHA1(fc465122134d95363112eb51b9ab71db3576cefd)) |
| 663 | ROM_END |
| 664 | |
| 665 | ROM_START(sms1pal) |
| 666 | ROM_REGION(0x4000, "maincpu", 0) |
| 667 | ROM_FILL(0x0000, 0x4000, 0xff) |
| 668 | |
| 669 | ROM_REGION(0x20000, "user1", 0) |
| 670 | ROM_SYSTEM_BIOS( 0, "bios13", "US/European BIOS v1.3 (1986)" ) |
| 671 | ROMX_LOAD("bios13fx.rom", 0x0000, 0x2000, CRC(0072ED54) SHA1(c315672807d8ddb8d91443729405c766dd95cae7), ROM_BIOS(1)) |
| 672 | ROM_SYSTEM_BIOS( 1, "hangonsh", "US/European BIOS v2.4 with Hang On and Safari Hunt (1988)" ) |
| 673 | ROMX_LOAD("mpr-11459a.rom", 0x0000, 0x20000, CRC(91E93385) SHA1(9e179392cd416af14024d8f31c981d9ee9a64517), ROM_BIOS(2)) |
| 674 | ROM_SYSTEM_BIOS( 2, "hangon", "Sega Master System - US/European BIOS v3.4 with Hang On (1988)" ) |
| 675 | ROMX_LOAD("mpr-11458.rom", 0x0000, 0x20000, CRC(8EDF7AC6) SHA1(51fd6d7990f62cd9d18c9ecfc62ed7936169107e), ROM_BIOS(3)) |
| 676 | ROM_SYSTEM_BIOS( 3, "missiled", "US/European BIOS v4.4 with Missile Defense 3D (1988)" ) |
| 677 | ROMX_LOAD("missiled.rom", 0x0000, 0x20000, CRC(E79BB689) SHA1(aa92ae576ca670b00855e278378d89e9f85e0351), ROM_BIOS(4)) |
| 678 | ROM_END |
| 679 | |
| 680 | ROM_START(smspal) |
| 681 | ROM_REGION(0x4000, "maincpu", 0) |
| 682 | ROM_FILL(0x0000, 0x4000, 0xff) |
| 683 | |
| 684 | ROM_REGION(0x40000, "user1", 0) |
| 685 | ROM_SYSTEM_BIOS( 0, "alexkidd", "US/European BIOS with Alex Kidd in Miracle World (1990)" ) /* PCB Label: SEGA // IC BD M4Jr. PAL" Master System II with 314-5246 (ZIP) VDP and 314-5237 (DIP48) IO */ |
| 686 | ROMX_LOAD("mpr-12808.ic2", 0x0000, 0x20000, CRC(CF4A09EA) SHA1(3af7b66248d34eb26da40c92bf2fa4c73a46a051), ROM_BIOS(1)) /* "SEGA // MPR-12808 W63 // 9114E9004" @ IC2 */ |
| 687 | ROM_SYSTEM_BIOS( 1, "sonic", "European/Brazilian BIOS with Sonic the Hedgehog (1991)" ) |
| 688 | ROMX_LOAD("sonbios.rom", 0x0000, 0x40000, CRC(81C3476B) SHA1(6aca0e3dffe461ba1cb11a86cd4caf5b97e1b8df), ROM_BIOS(2)) |
| 689 | ROM_END |
| 690 | |
| 691 | ROM_START(sg1000m3) |
| 692 | ROM_REGION(0x4000, "maincpu", 0) |
| 693 | ROM_FILL(0x0000, 0x4000, 0x00) |
| 694 | ROM_END |
| 695 | |
| 696 | ROM_START(smsj) /* PCB Label: "SEGA(R) IC BOARD M4J MAIN // 837-6418"; has "YM2413 // 78 04 71 G" at IC10; Back of pcb has traces marked "171-5541 (C)SEGA 1987 MADE IN JAPAN" |
| 697 | see http://www.smspower.org/Development/JapaneseSMS837-6418 */ |
| 698 | ROM_REGION(0x4000, "maincpu", 0) |
| 699 | ROM_FILL(0x0000, 0x4000, 0xff) |
| 700 | |
| 701 | ROM_REGION(0x4000, "user1", 0) |
| 702 | ROM_SYSTEM_BIOS( 0, "jbios21", "Japanese BIOS v2.1 (1987)" ) |
| 703 | ROMX_LOAD("mpr-11124.ic2", 0x0000, 0x2000, CRC(48D44A13) SHA1(a8c1b39a2e41137835eda6a5de6d46dd9fadbaf2), ROM_BIOS(1)) /* "SONY 7J06 // MPR-11124 // JAPAN 021" @ IC2 */ |
| 704 | ROM_END |
| 705 | |
| 706 | ROM_START(sms2kr) |
| 707 | ROM_REGION(0x4000, "maincpu", 0) |
| 708 | ROM_FILL(0x0000, 0x4000, 0xff) |
| 709 | |
| 710 | ROM_REGION(0x20000, "user1", 0) |
| 711 | ROM_SYSTEM_BIOS( 0, "akbioskr", "Samsung Gam*Boy II with Alex Kidd in Miracle World (1990)" ) |
| 712 | ROMX_LOAD("akbioskr.rom", 0x000, 0x20000, CRC(9c5bad91) SHA1(2feafd8f1c40fdf1bd5668f8c5c02e5560945b17), ROM_BIOS(1)) |
| 713 | ROM_END |
| 714 | |
| 715 | ROM_START(gamegear) |
| 716 | ROM_REGION(0x4000, "maincpu", 0) |
| 717 | ROM_FILL(0x0000, 0x4000, 0x00) |
| 718 | |
| 719 | ROM_REGION(0x0400, "user1", 0) |
| 720 | ROM_SYSTEM_BIOS( 0, "none", "No BIOS" ) /* gamegear */ |
| 721 | ROM_SYSTEM_BIOS( 1, "majesco", "Majesco BIOS" ) /* gamg */ |
| 722 | ROMX_LOAD("majbios.rom", 0x0000, 0x0400, CRC(0EBEA9D4) SHA1(914aa165e3d879f060be77870d345b60cfeb4ede), ROM_BIOS(2)) |
| 723 | ROM_END |
| 724 | |
| 725 | #define rom_gamegeaj rom_gamegear |
| 726 | |
| 727 | /*************************************************************************** |
| 728 | |
| 729 | Game driver(s) |
| 730 | |
| 731 | US |
| 732 | - Sega Master System I (sms1) |
| 733 | - prototype (M404) bios - 1986 |
| 734 | - without built-in game v1.3 - 1986 |
| 735 | - built-in Hang On/Safari Hunt v2.4 - 1988 |
| 736 | - built-in Hang On v3.4 - 1988 |
| 737 | - built-in Missile Defense 3-D v4.4 - 1988 |
| 738 | - built-in Hang On/Astro Warrior ???? |
| 739 | - Sega Master System II (sms) |
| 740 | - built-in Alex Kidd in Miracle World - 1990 |
| 741 | |
| 742 | JP |
| 743 | - Sega SG-1000 Mark III (sg1000m3) |
| 744 | - no bios |
| 745 | - Sega Master System (I) (smsj) |
| 746 | - without built-in game v2.1 - 1987 |
| 747 | |
| 748 | KR |
| 749 | - Sega Master System II (sms2kr) |
| 750 | - built-in Alex Kidd in Miracle World (Korean) |
| 751 | |
| 752 | EU |
| 753 | - Sega Master System I (sms1pal) |
| 754 | - without built-in game v1.3 - 1986 |
| 755 | - built-in Hang On/Safari Hunt v2.4 - 1988 |
| 756 | - built-in Hang On v3.4 - 1988 |
| 757 | - built-in Missile Defense 3-D v4.4 - 1988 |
| 758 | - built-in Hang On/Astro Warrior ???? |
| 759 | - Sega Master System II (smspal) |
| 760 | - built-in Alex Kidd in Miracle World - 1990 |
| 761 | - built-in Sonic the Hedgehog - 1991 |
| 762 | |
| 763 | BR |
| 764 | - Sega Master System I - 1987 |
| 765 | - Sega Master System II??? |
| 766 | - Sega Master System III - Tec Toy, 1987 |
| 767 | - Sega Master System Compact - Tec Toy, 1992 |
| 768 | - Sega Master System Girl - Tec Toy, 1992 |
| 769 | |
| 770 | ***************************************************************************/ |
| 771 | |
| 772 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 773 | CONS( 1984, sg1000m3, sms, 0, sg1000m3, smsj, sg1000m3, "Sega", "SG-1000 Mark III", 0 ) |
| 774 | CONS( 1986, sms1, sms, 0, sms1_ntsc, sms1, sms1, "Sega", "Master System I", 0 ) |
| 775 | CONS( 1986, sms1pal, sms, 0, sms1_pal, sms1, sms1, "Sega", "Master System I (PAL)" , 0 ) |
| 776 | CONS( 1986, smssdisp, sms, 0, sms_sdisp, sms, smssdisp, "Sega", "Master System Store Display Unit", GAME_NOT_WORKING ) |
| 777 | CONS( 1987, smsj, sms, 0, sms_fm, smsj, smsj, "Sega", "Master System (Japan)", 0 ) |
| 778 | CONS( 1990, sms, 0, 0, sms2_ntsc, sms, sms1, "Sega", "Master System II", 0 ) |
| 779 | CONS( 1990, smspal, sms, 0, sms2_pal, sms, sms1, "Sega", "Master System II (PAL)", 0 ) |
| 780 | CONS( 1990, sms2kr, sms, 0, sms2_fm, sms, sms2kr, "Samsung", "Gam*Boy II (Korea)", 0 ) |
| 781 | |
| 782 | CONS( 1990, gamegear, 0, sms, gamegear, gg, gamegear, "Sega", "Game Gear (Europe/America)", 0 ) |
| 783 | CONS( 1990, gamegeaj, gamegear, 0, gamegear, gg, gamegeaj, "Sega", "Game Gear (Japan)", 0 ) |
src/mess/drivers/mephistoc.c
| r0 | r13302 | |
| 1 | /****************************************************************************** |
| 2 | Mephisto 4 + 5 Chess Computer |
| 3 | 2007 Dirk V. |
| 4 | |
| 5 | CPU 65C02 P4 |
| 6 | Clock 4.9152 MHz |
| 7 | NMI CLK 600 Hz |
| 8 | IRQ Line is set to VSS |
| 9 | 8 KByte SRAM Sony CXK5864-15l |
| 10 | |
| 11 | 1-CD74HC4060E 14 Bit Counter |
| 12 | 1-CD74HC166E |
| 13 | 1-CD74HC251E |
| 14 | 1-SN74HC138N TI |
| 15 | 1-SN74HC139N TI |
| 16 | 1-74HC14AP Toshiba |
| 17 | 1-74HC02AP Toshiba |
| 18 | 1-74HC00AP Toshiba |
| 19 | 1-CD74HC259E |
| 20 | |
| 21 | |
| 22 | $0000-$1fff S-RAM |
| 23 | $2000 LCD 4 Byte Shift Register writeonly right to left |
| 24 | every 2nd char xor'd by $FF |
| 25 | |
| 26 | 2c00-2c07 Keyboard (8to1 Multiplexer) 74HCT251 |
| 27 | 2*8 Matrix |
| 28 | Adr. 0x3407 |
| 29 | ==0 !=0 |
| 30 | 2c00 CL E5 |
| 31 | 2c01 POS F6 |
| 32 | 2c02 MEMO G7 |
| 33 | 2c03 INFO A1 |
| 34 | 2c04 LEV H8 |
| 35 | 2c05 ENT B2 |
| 36 | 2c06 >0 C3 |
| 37 | 2c07 <9 D4 |
| 38 | |
| 39 | $3400-$3407 LED 1-6, Buzzer, Keyboard select |
| 40 | |
| 41 | $2400 // Chess Board |
| 42 | $2800 // Chess Board |
| 43 | $3000 // Chess Board |
| 44 | |
| 45 | $4000-7FFF Opening Modul HG550 |
| 46 | $8000-$FFF ROM |
| 47 | |
| 48 | Mephisto 4 Turbo Kit 18mhz - (mm4tk) |
| 49 | This is a replacement rom combining the turbo kit initial rom with the original MM IV. |
| 50 | The Turbo Kit powers up to it's tiny rom, copies itself to ram, banks in normal rom, |
| 51 | copies that to faster SRAM, then patches the checksum and the LED blink delays. |
| 52 | If someone else wants to code up the power up banking, feel free |
| 53 | |
| 54 | There is an undumped MM V Turbo Kit, which will be the exact same except for location of |
| 55 | the patches. The mm5tk just needs the normal mm5 ROM swapped out for that one to |
| 56 | blinks the LEDs a little slower. |
| 57 | |
| 58 | -- Cowering (2011) |
| 59 | |
| 60 | 'rebel5' driver broke somewhere between 0.141 and 0.142 and is now marked as NOT_WORKING |
| 61 | |
| 62 | ***********************************************************************************************/ |
| 63 | |
| 64 | #define ADDRESS_MAP_MODERN |
| 65 | |
| 66 | #include "emu.h" |
| 67 | #include "cpu/m6502/m6502.h" |
| 68 | #include "sound/beep.h" |
| 69 | //#include "mephisto.lh" |
| 70 | |
| 71 | #include "machine/mboard.h" |
| 72 | |
| 73 | |
| 74 | class mephisto_state : public driver_device |
| 75 | { |
| 76 | public: |
| 77 | mephisto_state(const machine_config &mconfig, device_type type, const char *tag) |
| 78 | : driver_device(mconfig, type, tag), |
| 79 | m_maincpu(*this, "maincpu"), |
| 80 | m_beep(*this, BEEPER_TAG) |
| 81 | { } |
| 82 | |
| 83 | required_device<cpu_device> m_maincpu; |
| 84 | required_device<device_t> m_beep; |
| 85 | DECLARE_WRITE8_MEMBER(write_lcd); |
| 86 | DECLARE_WRITE8_MEMBER(mephisto_NMI); |
| 87 | DECLARE_READ8_MEMBER(read_keys); |
| 88 | DECLARE_WRITE8_MEMBER(write_led); |
| 89 | DECLARE_WRITE8_MEMBER(write_led_mm2); |
| 90 | UINT8 m_lcd_shift_counter; |
| 91 | UINT8 m_led_status; |
| 92 | //UINT8 *m_p_ram; |
| 93 | UINT8 m_led7; |
| 94 | UINT8 m_allowNMI; |
| 95 | }; |
| 96 | |
| 97 | |
| 98 | WRITE8_MEMBER( mephisto_state::write_lcd ) |
| 99 | { |
| 100 | if (m_led7 == 0) output_set_digit_value(m_lcd_shift_counter,data); // 0x109 MM IV // 0x040 MM V |
| 101 | |
| 102 | //output_set_digit_value(m_lcd_shift_counter,data ^ m_p_ram[0x165]); // 0x109 MM IV // 0x040 MM V |
| 103 | m_lcd_shift_counter--; |
| 104 | m_lcd_shift_counter &= 3; |
| 105 | } |
| 106 | |
| 107 | WRITE8_MEMBER( mephisto_state::mephisto_NMI ) |
| 108 | { |
| 109 | m_allowNMI = 1; |
| 110 | } |
| 111 | |
| 112 | READ8_MEMBER( mephisto_state::read_keys ) |
| 113 | { |
| 114 | UINT8 data; |
| 115 | static const char *const keynames[2][8] = |
| 116 | { |
| 117 | { "KEY1_0", "KEY1_1", "KEY1_2", "KEY1_3", "KEY1_4", "KEY1_5", "KEY1_6", "KEY1_7" }, |
| 118 | { "KEY2_0", "KEY2_1", "KEY2_2", "KEY2_3", "KEY2_4", "KEY2_5", "KEY2_6", "KEY2_7" } |
| 119 | }; |
| 120 | |
| 121 | data = 0xff; |
| 122 | if (((m_led_status & 0x80) == 0x00)) |
| 123 | data=input_port_read(machine(), keynames[0][offset]); |
| 124 | else |
| 125 | data=input_port_read(machine(), keynames[1][offset]); |
| 126 | |
| 127 | logerror("Keyboard Port = %s Data = %d\n ", ((m_led_status & 0x80) == 0x00) ? keynames[0][offset] : keynames[1][offset], data); |
| 128 | return data | 0x7f; |
| 129 | } |
| 130 | |
| 131 | WRITE8_MEMBER( mephisto_state::write_led ) |
| 132 | { |
| 133 | UINT8 LED_offset=100; |
| 134 | data &= 0x80; |
| 135 | |
| 136 | if (data==0)m_led_status &= 255-(1<<offset) ; else m_led_status|=1<<offset; |
| 137 | if (offset<6)output_set_led_value(LED_offset+offset, m_led_status&1<<offset?1:0); |
| 138 | if (offset==7) m_led7=data& 0x80 ? 0x00 :0xff; |
| 139 | logerror("LEDs Offset = %d Data = %d\n",offset,data); |
| 140 | } |
| 141 | |
| 142 | WRITE8_MEMBER( mephisto_state::write_led_mm2 ) |
| 143 | { |
| 144 | UINT8 LED_offset=100; |
| 145 | data &= 0x80; |
| 146 | |
| 147 | if (data==0) |
| 148 | m_led_status &= 255-(1<<offset); |
| 149 | else |
| 150 | m_led_status|=1<<offset; |
| 151 | |
| 152 | if (offset<6) |
| 153 | output_set_led_value(LED_offset+offset, m_led_status&1<<offset?1:0); |
| 154 | |
| 155 | if (offset==7) |
| 156 | m_led7= BIT(data, 7) ? 0xff :0x00; //MM2 |
| 157 | } |
| 158 | |
| 159 | static ADDRESS_MAP_START( rebel5_mem, AS_PROGRAM, 8, mephisto_state ) |
| 160 | AM_RANGE( 0x0000, 0x1fff) AM_RAM // AM_BASE(m_p_ram) |
| 161 | AM_RANGE( 0x2000, 0x2007) AM_WRITE(write_led) // Status LEDs+ buzzer |
| 162 | AM_RANGE( 0x3000, 0x3007) AM_READ(read_keys) // Rebel 5.0 |
| 163 | AM_RANGE( 0x3000, 0x4000) AM_READ_LEGACY(mboard_read_board_8) // Chessboard |
| 164 | AM_RANGE( 0x5000, 0x5000) AM_WRITE(write_lcd) |
| 165 | AM_RANGE( 0x6000, 0x6000) AM_WRITE_LEGACY(mboard_write_LED_8) // Chessboard |
| 166 | AM_RANGE( 0x7000, 0x7000) AM_WRITE_LEGACY(mboard_write_board_8) // Chessboard |
| 167 | AM_RANGE( 0x8000, 0xffff) AM_ROM |
| 168 | ADDRESS_MAP_END |
| 169 | |
| 170 | |
| 171 | static ADDRESS_MAP_START( mephisto_mem, AS_PROGRAM, 8, mephisto_state ) |
| 172 | AM_RANGE( 0x0000, 0x1fff) AM_RAM //AM_BASE(m_p_ram) |
| 173 | AM_RANGE( 0x2000, 0x2000) AM_WRITE(write_lcd) |
| 174 | AM_RANGE( 0x2400, 0x2407) AM_WRITE_LEGACY(mboard_write_LED_8) // Chessboard |
| 175 | AM_RANGE( 0x2800, 0x2800) AM_WRITE_LEGACY(mboard_write_board_8) // Chessboard |
| 176 | AM_RANGE( 0x2c00, 0x2c07) AM_READ(read_keys) |
| 177 | AM_RANGE( 0x3000, 0x3000) AM_READ_LEGACY(mboard_read_board_8) // Chessboard |
| 178 | AM_RANGE( 0x3400, 0x3407) AM_WRITE(write_led) // Status LEDs+ buzzer |
| 179 | AM_RANGE( 0x3800, 0x3800) AM_WRITE(mephisto_NMI) // NMI enable |
| 180 | AM_RANGE( 0x4000, 0x7fff) AM_ROM // Opening Library |
| 181 | AM_RANGE( 0x8000, 0xffff) AM_ROM |
| 182 | ADDRESS_MAP_END |
| 183 | |
| 184 | static ADDRESS_MAP_START( mm2_mem, AS_PROGRAM, 8, mephisto_state ) |
| 185 | AM_RANGE( 0x0000, 0x0fff) AM_RAM //AM_BASE(m_p_ram) |
| 186 | AM_RANGE( 0x1000, 0x1007) AM_WRITE(write_led_mm2) //Status LEDs |
| 187 | AM_RANGE( 0x1800, 0x1807) AM_READ(read_keys) |
| 188 | AM_RANGE( 0x2000, 0x2000) AM_READ_LEGACY(mboard_read_board_8) //Chessboard |
| 189 | AM_RANGE( 0x2800, 0x2800) AM_WRITE(write_lcd) |
| 190 | AM_RANGE( 0x3000, 0x3000) AM_WRITE_LEGACY(mboard_write_LED_8) //Chessboard |
| 191 | AM_RANGE( 0x3800, 0x3800) AM_WRITE_LEGACY(mboard_write_board_8) //Chessboard |
| 192 | AM_RANGE( 0x4000, 0x7fff) AM_ROM // Opening Library ? |
| 193 | AM_RANGE( 0x8000, 0xffff) AM_ROM |
| 194 | ADDRESS_MAP_END |
| 195 | |
| 196 | static INPUT_PORTS_START( board ) |
| 197 | PORT_START("LINE2") |
| 198 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 199 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 200 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 201 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 202 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 203 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 204 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 205 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 206 | PORT_START("LINE3") |
| 207 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 208 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 209 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 210 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 211 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 212 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 213 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 214 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 215 | PORT_START("LINE4") |
| 216 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 217 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 218 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 219 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 220 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 221 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 222 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 223 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 224 | PORT_START("LINE5") |
| 225 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 226 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 227 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 228 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 229 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 230 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 231 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 232 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 233 | PORT_START("LINE6") |
| 234 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 235 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 236 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 237 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 238 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 239 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 240 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 241 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 242 | PORT_START("LINE7") |
| 243 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 244 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 245 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 246 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 247 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 248 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 249 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 250 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 251 | PORT_START("LINE8") |
| 252 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 253 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 254 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 255 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 256 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 257 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 258 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 259 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 260 | PORT_START("LINE9") |
| 261 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 262 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 263 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 264 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 265 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 266 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 267 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 268 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) |
| 269 | |
| 270 | PORT_START("LINE10") |
| 271 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) |
| 272 | |
| 273 | PORT_START("B_WHITE") |
| 274 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) |
| 275 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) |
| 276 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) |
| 277 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) |
| 278 | PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYBOARD) |
| 279 | PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYBOARD) |
| 280 | |
| 281 | PORT_START("B_BLACK") |
| 282 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) |
| 283 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) |
| 284 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) |
| 285 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) |
| 286 | PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYBOARD) |
| 287 | PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYBOARD) |
| 288 | |
| 289 | PORT_START("B_BUTTONS") |
| 290 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) |
| 291 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) |
| 292 | INPUT_PORTS_END |
| 293 | |
| 294 | static INPUT_PORTS_START( mephisto ) |
| 295 | PORT_START("KEY1_0") //Port $2c00 |
| 296 | PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CLEAR") PORT_CODE(KEYCODE_F1) |
| 297 | PORT_START("KEY1_1") //Port $2c01 |
| 298 | PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("POS") PORT_CODE(KEYCODE_F2) |
| 299 | PORT_START("KEY1_2") //Port $2c02 |
| 300 | PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("MEM") PORT_CODE(KEYCODE_F3) |
| 301 | PORT_START("KEY1_3") //Port $2c03 |
| 302 | PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("INFO") PORT_CODE(KEYCODE_F4) |
| 303 | PORT_START("KEY1_4") //Port $2c04 |
| 304 | PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("LEV") PORT_CODE(KEYCODE_F5) |
| 305 | PORT_START("KEY1_5") //Port $2c05 |
| 306 | PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ENT") PORT_CODE(KEYCODE_ENTER) |
| 307 | PORT_START("KEY1_6") //Port $2c06 |
| 308 | PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) |
| 309 | PORT_START("KEY1_7") //Port $2c07 |
| 310 | PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) |
| 311 | |
| 312 | PORT_START("KEY2_0") //Port $2c08 |
| 313 | PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E 5") PORT_CODE(KEYCODE_E) PORT_CODE(KEYCODE_5) |
| 314 | PORT_START("KEY2_1") //Port $2c09 |
| 315 | PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F 6") PORT_CODE(KEYCODE_F) PORT_CODE(KEYCODE_6) |
| 316 | PORT_START("KEY2_2") //Port $2c0a |
| 317 | PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G 7") PORT_CODE(KEYCODE_G) PORT_CODE(KEYCODE_7) |
| 318 | PORT_START("KEY2_3") //Port $2c0b |
| 319 | PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A 1") PORT_CODE(KEYCODE_A) PORT_CODE(KEYCODE_1) |
| 320 | PORT_START("KEY2_4") //Port $2c0c |
| 321 | PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H 8") PORT_CODE(KEYCODE_H) PORT_CODE(KEYCODE_8) |
| 322 | PORT_START("KEY2_5") //Port $2c0d |
| 323 | PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B 2") PORT_CODE(KEYCODE_B) PORT_CODE(KEYCODE_2) |
| 324 | PORT_START("KEY2_6") //Port $2c0e |
| 325 | PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C 3") PORT_CODE(KEYCODE_C) PORT_CODE(KEYCODE_3) |
| 326 | PORT_START("KEY2_7") //Port $2c0f |
| 327 | PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D 4") PORT_CODE(KEYCODE_D) PORT_CODE(KEYCODE_4) |
| 328 | |
| 329 | PORT_INCLUDE( board ) |
| 330 | INPUT_PORTS_END |
| 331 | |
| 332 | |
| 333 | static TIMER_DEVICE_CALLBACK( update_nmi ) |
| 334 | { |
| 335 | mephisto_state *state = timer.machine().driver_data<mephisto_state>(); |
| 336 | if (state->m_allowNMI) |
| 337 | { |
| 338 | state->m_allowNMI = 0; |
| 339 | cputag_set_input_line(timer.machine(), "maincpu", INPUT_LINE_NMI,PULSE_LINE); |
| 340 | } |
| 341 | beep_set_state(state->m_beep, state->m_led_status&64?1:0); |
| 342 | } |
| 343 | |
| 344 | static TIMER_DEVICE_CALLBACK( update_irq ) //only mm2 |
| 345 | { |
| 346 | mephisto_state *state = timer.machine().driver_data<mephisto_state>(); |
| 347 | cputag_set_input_line(timer.machine(), "maincpu", M6502_IRQ_LINE, ASSERT_LINE); |
| 348 | cputag_set_input_line(timer.machine(), "maincpu", M6502_IRQ_LINE, CLEAR_LINE); |
| 349 | |
| 350 | beep_set_state(state->m_beep, state->m_led_status&64?1:0); |
| 351 | } |
| 352 | |
| 353 | static MACHINE_START( mephisto ) |
| 354 | { |
| 355 | mephisto_state *state = machine.driver_data<mephisto_state>(); |
| 356 | state->m_lcd_shift_counter = 3; |
| 357 | state->m_allowNMI = 1; |
| 358 | mboard_savestate_register(machine); |
| 359 | } |
| 360 | |
| 361 | static MACHINE_START( mm2 ) |
| 362 | { |
| 363 | mephisto_state *state = machine.driver_data<mephisto_state>(); |
| 364 | state->m_lcd_shift_counter = 3; |
| 365 | state->m_led7=0xff; |
| 366 | |
| 367 | mboard_savestate_register(machine); |
| 368 | } |
| 369 | |
| 370 | |
| 371 | static MACHINE_RESET( mephisto ) |
| 372 | { |
| 373 | mephisto_state *state = machine.driver_data<mephisto_state>(); |
| 374 | state->m_lcd_shift_counter = 3; |
| 375 | state->m_allowNMI = 1; |
| 376 | mboard_set_border_pieces(); |
| 377 | mboard_set_board(); |
| 378 | |
| 379 | /* adjust artwork depending on current emulation*/ |
| 380 | |
| 381 | if (!strcmp(machine.system().name,"mm2") ) |
| 382 | output_set_value("MM",1); |
| 383 | else if (!strcmp(machine.system().name,"mm4") ) |
| 384 | output_set_value("MM",2); |
| 385 | else if (!strcmp(machine.system().name,"mm4tk") ) |
| 386 | output_set_value("MM",5); |
| 387 | else if (!strcmp(machine.system().name,"mm5tk") ) |
| 388 | output_set_value("MM",5); |
| 389 | else if (!strcmp(machine.system().name,"mm5") ) |
| 390 | output_set_value("MM",3); |
| 391 | else if (!strcmp(machine.system().name,"mm50") ) |
| 392 | output_set_value("MM",3); |
| 393 | else if (!strcmp(machine.system().name,"rebel5") ) |
| 394 | output_set_value("MM",4); |
| 395 | } |
| 396 | |
| 397 | |
| 398 | static MACHINE_CONFIG_START( mephisto, mephisto_state ) |
| 399 | /* basic machine hardware */ |
| 400 | MCFG_CPU_ADD("maincpu",M65C02,4915200) /* 65C02 */ |
| 401 | MCFG_CPU_PROGRAM_MAP(mephisto_mem) |
| 402 | MCFG_QUANTUM_TIME(attotime::from_hz(60)) |
| 403 | MCFG_MACHINE_START( mephisto ) |
| 404 | MCFG_MACHINE_RESET( mephisto ) |
| 405 | |
| 406 | /* sound hardware */ |
| 407 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 408 | MCFG_SOUND_ADD(BEEPER_TAG, BEEP, 0) |
| 409 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 410 | |
| 411 | MCFG_TIMER_ADD_PERIODIC("nmi_timer", update_nmi, attotime::from_hz(600)) |
| 412 | MCFG_TIMER_ADD_PERIODIC("artwork_timer", mboard_update_artwork, attotime::from_hz(100)) |
| 413 | MACHINE_CONFIG_END |
| 414 | |
| 415 | static MACHINE_CONFIG_DERIVED( rebel5, mephisto ) |
| 416 | /* basic machine hardware */ |
| 417 | MCFG_CPU_MODIFY("maincpu") |
| 418 | MCFG_CPU_PROGRAM_MAP(rebel5_mem) |
| 419 | MACHINE_CONFIG_END |
| 420 | |
| 421 | static MACHINE_CONFIG_DERIVED( mm2, mephisto ) |
| 422 | MCFG_CPU_REPLACE("maincpu", M65C02, 3700000) |
| 423 | MCFG_CPU_PROGRAM_MAP(mm2_mem) |
| 424 | MCFG_MACHINE_START( mm2 ) |
| 425 | |
| 426 | MCFG_DEVICE_REMOVE("nmi_timer") |
| 427 | MCFG_TIMER_ADD_PERIODIC("irq_timer", update_irq, attotime::from_hz(450)) |
| 428 | MACHINE_CONFIG_END |
| 429 | |
| 430 | static MACHINE_CONFIG_DERIVED( mm4tk, mephisto ) |
| 431 | MCFG_CPU_MODIFY("maincpu") |
| 432 | MCFG_CPU_REPLACE("maincpu", M65C02, 18000000) |
| 433 | MCFG_CPU_PROGRAM_MAP(mephisto_mem) |
| 434 | MACHINE_CONFIG_END |
| 435 | |
| 436 | ROM_START(rebel5) |
| 437 | ROM_REGION(0x10000,"maincpu",0) |
| 438 | ROM_LOAD("rebel5.rom", 0x8000, 0x8000, CRC(8d02e1ef) SHA1(9972c75936613bd68cfd3fe62bd222e90e8b1083)) |
| 439 | ROM_END |
| 440 | |
| 441 | ROM_START(mm2) |
| 442 | ROM_REGION(0x10000,"maincpu",0) |
| 443 | ROM_LOAD("mm2_1.bin", 0x8000, 0x4000, CRC(e2daac82) SHA1(c9fa59ca92362f8ee770733073bfa2ab8c7904ad)) |
| 444 | ROM_LOAD("mm2_2.bin", 0xc000, 0x4000, CRC(5e296939) SHA1(badd2a377259cf738cd076d8fb245c3dc284c24d)) |
| 445 | ROM_END |
| 446 | |
| 447 | ROM_START(mm4) |
| 448 | ROM_REGION(0x10000,"maincpu",0) |
| 449 | ROM_LOAD("mephisto4.rom", 0x8000, 0x8000, CRC(f68a4124) SHA1(d1d03a9aacc291d5cb720d2ee2a209eeba13a36c)) |
| 450 | ROM_SYSTEM_BIOS( 0, "none", "No Opening Library" ) |
| 451 | ROM_SYSTEM_BIOS( 1, "hg440", "HG440 Opening Library" ) |
| 452 | ROMX_LOAD( "hg440.rom", 0x4000, 0x4000, CRC(81ffcdfd) SHA1(b0f7bcc11d1e821daf92cde31e3446c8be0bbe19), ROM_BIOS(2)) |
| 453 | ROM_END |
| 454 | |
| 455 | ROM_START(mm4tk) |
| 456 | ROM_REGION(0x10000,"maincpu",0) |
| 457 | ROM_LOAD("mm4tk.rom", 0x8000, 0x8000, CRC(51cb36a4) SHA1(9e184b4e85bb721e794b88d8657ae8d2ff5a24af)) |
| 458 | ROM_SYSTEM_BIOS( 0, "none", "No Opening Library" ) |
| 459 | ROM_SYSTEM_BIOS( 1, "hg440", "HG440 Opening Library" ) |
| 460 | ROMX_LOAD( "hg440.rom", 0x4000, 0x4000, CRC(81ffcdfd) SHA1(b0f7bcc11d1e821daf92cde31e3446c8be0bbe19), ROM_BIOS(0)) |
| 461 | ROM_END |
| 462 | |
| 463 | ROM_START(mm5tk) |
| 464 | ROM_REGION(0x10000,"maincpu",0) |
| 465 | ROM_LOAD("mephisto5.rom", 0x8000, 0x8000, BAD_DUMP CRC(89c3d9d2) SHA1(77cd6f8eeb03c713249db140d2541e3264328048)) |
| 466 | ROM_SYSTEM_BIOS( 0, "none", "No Opening Library" ) |
| 467 | ROM_SYSTEM_BIOS( 1, "hg550", "HG550 Opening Library" ) |
| 468 | ROMX_LOAD("hg550.rom", 0x4000, 0x4000, CRC(0359f13d) SHA1(833cef8302ad8d283d3f95b1d325353c7e3b8614),ROM_BIOS(0)) |
| 469 | ROM_END |
| 470 | |
| 471 | ROM_START(mm5) |
| 472 | ROM_REGION(0x10000,"maincpu",0) |
| 473 | ROM_LOAD("mephisto5.rom", 0x8000, 0x8000, CRC(89c3d9d2) SHA1(77cd6f8eeb03c713249db140d2541e3264328048)) |
| 474 | ROM_SYSTEM_BIOS( 0, "none", "No Opening Library" ) |
| 475 | ROM_SYSTEM_BIOS( 1, "hg550", "HG550 Opening Library" ) |
| 476 | ROMX_LOAD("hg550.rom", 0x4000, 0x4000, CRC(0359f13d) SHA1(833cef8302ad8d283d3f95b1d325353c7e3b8614),ROM_BIOS(2)) |
| 477 | ROM_END |
| 478 | |
| 479 | ROM_START(mm50) |
| 480 | ROM_REGION(0x10000,"maincpu",0) |
| 481 | ROM_LOAD("mm50.rom", 0x8000, 0x8000, CRC(fcfa7e6e) SHA1(afeac3a8c957ba58cefaa27b11df974f6f2066da)) |
| 482 | ROM_SYSTEM_BIOS( 0, "none", "No Opening Library" ) |
| 483 | ROM_SYSTEM_BIOS( 1, "hg550", "HG550 Opening Library" ) |
| 484 | ROMX_LOAD("hg550.rom", 0x4000, 0x4000, CRC(0359f13d) SHA1(833cef8302ad8d283d3f95b1d325353c7e3b8614),ROM_BIOS(2)) |
| 485 | ROM_END |
| 486 | |
| 487 | |
| 488 | static DRIVER_INIT( mephisto ) |
| 489 | { |
| 490 | mephisto_state *state = machine.driver_data<mephisto_state>(); |
| 491 | state->m_lcd_shift_counter = 3; |
| 492 | } |
| 493 | |
| 494 | /*************************************************************************** |
| 495 | |
| 496 | Game driver(s) |
| 497 | |
| 498 | ***************************************************************************/ |
| 499 | |
| 500 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 501 | |
| 502 | CONS( 1984, mm2, mm4, 0, mm2, mephisto, mephisto, "Hegener & Glaser", "Mephisto MM2 Schachcomputer", GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK ) |
| 503 | CONS( 1986, rebel5, mm4, 0, rebel5, mephisto, mephisto, "Hegener & Glaser", "Mephisto Rebel 5 Schachcomputer", GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK|GAME_NOT_WORKING ) |
| 504 | CONS( 1987, mm4, 0, 0, mephisto, mephisto, mephisto, "Hegener & Glaser", "Mephisto 4 Schachcomputer", GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK ) |
| 505 | CONS( 1987, mm4tk, mm4, 0, mm4tk, mephisto, mephisto, "Hegener & Glaser", "Mephisto 4 Schachcomputer Turbo Kit + HG440", GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK ) |
| 506 | CONS( 1990, mm5, mm4, 0, mephisto, mephisto, mephisto, "Hegener & Glaser", "Mephisto 5.1 Schachcomputer", GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK ) |
| 507 | CONS( 1990, mm50, mm4, 0, mephisto, mephisto, mephisto, "Hegener & Glaser", "Mephisto 5.0 Schachcomputer", GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK ) |
| 508 | CONS( 1990, mm5tk, mm4, 0, mm4tk, mephisto, mephisto, "Hegener & Glaser", "Mephisto 5.1 Schachcomputer Turbo Kit + HG550", GAME_SUPPORTS_SAVE|GAME_REQUIRES_ARTWORK ) |