trunk/src/emu/bus/centronics/epson_ex800.c
| r0 | r30941 | |
| 1 | // license:MAME, GPL-2.0+ |
| 2 | // copyright-holders:Dirk Best |
| 3 | /****************************************************************************** |
| 4 | |
| 5 | Epson EX-800 Dot Matrix printer |
| 6 | |
| 7 | license: MAME, GPL-2.0+ |
| 8 | copyright-holders: Dirk Best |
| 9 | |
| 10 | |
| 11 | -- |
| 12 | |
| 13 | Main CPU is a UPD7810H6 running at 12 MHz. |
| 14 | |
| 15 | -- |
| 16 | |
| 17 | On startup, the ports are initialized as follows: |
| 18 | |
| 19 | Port A lines PA0-PA7 are configured as output |
| 20 | Port B lines PB0-PB7 are configured as output |
| 21 | Port C lines PC2, PC4 and PC5 are configured as output |
| 22 | the other lines are control lines |
| 23 | PC0: TxD output |
| 24 | PC1: RxD input |
| 25 | PC3: TI input |
| 26 | PC6: CO0 output |
| 27 | PC7: CO1 output |
| 28 | |
| 29 | The I/O lines are connected as follows: |
| 30 | |
| 31 | PA0: \ |
| 32 | PA1: Carriage motor |
| 33 | PA2: driving pulses |
| 34 | PA3: / |
| 35 | PA4: High when carriage assembly reaches either end |
| 36 | PA5: High when carriage assembly reaches either end |
| 37 | PA6: Bank 0 |
| 38 | PA7: Bank 1 |
| 39 | |
| 40 | PB0: Line feed motor driving pulses |
| 41 | PB1: Line feed motor driving pulses |
| 42 | PB2: Line feed motor current control |
| 43 | PB3: LED09, Online |
| 44 | PB4: (used for serial port) |
| 45 | PB5: ERR signal |
| 46 | PB6: ACKNLG signal, data received at printer |
| 47 | PB7: LED12, Paper empty |
| 48 | |
| 49 | PC0: TxD output |
| 50 | PC1: RxD input |
| 51 | PC2: |
| 52 | PC3: TI input |
| 53 | PC4: |
| 54 | PC5: |
| 55 | PC6: PWD signal of 5a |
| 56 | PC7: Buzzer |
| 57 | |
| 58 | PD0-7: Data bus D0-D7 |
| 59 | |
| 60 | PF0-7: Address bus A8-A15 |
| 61 | |
| 62 | AN0: DSW 2 |
| 63 | AN1: DSW 1 |
| 64 | AN2: |
| 65 | AN3: |
| 66 | AN4: Print head operating temperature sensor |
| 67 | AN5: Scanner Unit, Color Home sensor |
| 68 | AN6: |
| 69 | AN7: Color Home sensor adjust |
| 70 | |
| 71 | INT: Online switch |
| 72 | |
| 73 | |
| 74 | Gate array 5a (parallel port, printer head) |
| 75 | |
| 76 | IN0-IN7: DATA1 to DATA8 from parallel port |
| 77 | HD1-HD9: Head driving pulses |
| 78 | STROBE: STROBE signal |
| 79 | PWD: PC6 of CPU |
| 80 | ALE: ALE of CPU |
| 81 | |
| 82 | Gate array 7a (inputs) |
| 83 | |
| 84 | - activated when carriage assembly reaches either end? |
| 85 | |
| 86 | PA0: Draft switch |
| 87 | PA1: NLQ Roman switch |
| 88 | PA2: Pica switch |
| 89 | PA3: NLQ sans-serif switch |
| 90 | PA4: Elite switch |
| 91 | PA5: Proportional switch |
| 92 | PA6: Normal switch |
| 93 | PA7: Condensed switch |
| 94 | |
| 95 | PB0: Form feed switch |
| 96 | PB1: Line feed switch |
| 97 | PB2: Autoload switch |
| 98 | PB3: Low when paper empty |
| 99 | PB4: Low when carriage assembly is in home position |
| 100 | PB5: SLCTIN (connected to parallel port), disable with DSW2-1 |
| 101 | PB6: AUTO FEEDXT (connected to parallel port), disable with DSW2-4 |
| 102 | "When this signal is LOW, the paper is automatically fed 1 line after |
| 103 | printing." |
| 104 | PB7: |
| 105 | |
| 106 | PC0: Dipswitch SW1-1 and SW1-2, Draft LED |
| 107 | PC1: Dipswitch SW1-3 and SW1-4, Roman LED |
| 108 | PC2: Dipswitch SW1-5 and SW1-6, Pica LED |
| 109 | PC3: Dipswitch SW1-7 and SW1-8, Sans-Serif LED |
| 110 | PC4: Dipswitch SW2-2 and SW2-3, Elite LED |
| 111 | PC5: Dipswitch SW2-5 and SW2-6, Proportional LED |
| 112 | PC6: Normal LED |
| 113 | PC7: Condensed LED |
| 114 | |
| 115 | -- |
| 116 | |
| 117 | LED state on startup: |
| 118 | |
| 119 | The power light comes on, then draft, pica and normal. If there is no paper, |
| 120 | the paper empty LED comes on. |
| 121 | |
| 122 | Power LED is green, selectype LED is orange, paper out LED is red. |
| 123 | |
| 124 | -- |
| 125 | |
| 126 | TODO: - The UPD7810 core is missing analog port emulation |
| 127 | - Figure out the gate arrays (using trojan code?) |
| 128 | - (much later) write an interface so that other drivers can hook |
| 129 | into this one and use to print |
| 130 | |
| 131 | ******************************************************************************/ |
| 132 | |
| 133 | #include "epson_ex800.h" |
| 134 | #include "ex800.lh" |
| 135 | |
| 136 | |
| 137 | |
| 138 | //************************************************************************** |
| 139 | // MACROS / CONSTANTS |
| 140 | //************************************************************************** |
| 141 | |
| 142 | #define PA0 (data & 0x01) |
| 143 | #define PA1 (data & 0x02) |
| 144 | #define PA2 (data & 0x04) |
| 145 | #define PA3 (data & 0x08) |
| 146 | #define PA4 (data & 0x10) |
| 147 | #define PA5 (data & 0x20) |
| 148 | #define PA6 (data & 0x40) |
| 149 | #define PA7 (data & 0x80) |
| 150 | |
| 151 | #define PB0 (data & 0x01) |
| 152 | #define PB1 (data & 0x02) |
| 153 | #define PB2 (data & 0x04) |
| 154 | #define PB3 (data & 0x08) |
| 155 | #define PB4 (data & 0x10) |
| 156 | #define PB5 (data & 0x20) |
| 157 | #define PB6 (data & 0x40) |
| 158 | #define PB7 (data & 0x80) |
| 159 | |
| 160 | #define PC0 (data & 0x01) |
| 161 | #define PC1 (data & 0x02) |
| 162 | #define PC2 (data & 0x04) |
| 163 | #define PC3 (data & 0x08) |
| 164 | #define PC4 (data & 0x10) |
| 165 | #define PC5 (data & 0x20) |
| 166 | #define PC6 (data & 0x40) |
| 167 | #define PC7 (data & 0x80) |
| 168 | |
| 169 | |
| 170 | |
| 171 | //************************************************************************** |
| 172 | // DEVICE DEFINITIONS |
| 173 | //************************************************************************** |
| 174 | |
| 175 | const device_type EPSON_EX800 = &device_creator<epson_ex800_t>; |
| 176 | |
| 177 | |
| 178 | //------------------------------------------------- |
| 179 | // ROM( ex800 ) |
| 180 | //------------------------------------------------- |
| 181 | |
| 182 | ROM_START( ex800 ) |
| 183 | ROM_REGION(0x8000, "maincpu", 0) |
| 184 | ROM_LOAD("w8_pe9.9b", 0x0000, 0x8000, CRC(6dd41e9b) SHA1(8e30ead727b9317154742efd881206e9f9bbf95b)) |
| 185 | ROM_END |
| 186 | |
| 187 | |
| 188 | //------------------------------------------------- |
| 189 | // rom_region - device-specific ROM region |
| 190 | //------------------------------------------------- |
| 191 | |
| 192 | const rom_entry *epson_ex800_t::device_rom_region() const |
| 193 | { |
| 194 | return ROM_NAME( ex800 ); |
| 195 | } |
| 196 | |
| 197 | |
| 198 | //------------------------------------------------- |
| 199 | // ADDRESS_MAP( ex800_mem ) |
| 200 | //------------------------------------------------- |
| 201 | |
| 202 | static ADDRESS_MAP_START( ex800_mem, AS_PROGRAM, 8, epson_ex800_t ) |
| 203 | AM_RANGE(0x0000, 0x7fff) AM_ROM AM_REGION("maincpu", 0) |
| 204 | AM_RANGE(0x8000, 0xbfff) AM_RAM /* external RAM */ |
| 205 | AM_RANGE(0xc000, 0xc7ff) AM_MIRROR(0x1800) AM_READWRITE(devsel_r, devsel_w) |
| 206 | AM_RANGE(0xe000, 0xe7ff) AM_READWRITE(gate5a_r, gate5a_w) |
| 207 | AM_RANGE(0xe800, 0xefff) AM_READWRITE(iosel_r, iosel_w) |
| 208 | AM_RANGE(0xf000, 0xf001) AM_MIRROR(0x07fc) AM_READ(gate7a_r) |
| 209 | AM_RANGE(0xf002, 0xf003) AM_MIRROR(0x07fc) AM_WRITE(gate7a_w) |
| 210 | AM_RANGE(0xf800, 0xfeff) AM_NOP /* not connected */ |
| 211 | AM_RANGE(0xff00, 0xffff) AM_RAM /* internal CPU RAM */ |
| 212 | ADDRESS_MAP_END |
| 213 | |
| 214 | |
| 215 | //------------------------------------------------- |
| 216 | // ADDRESS_MAP( ex800_io ) |
| 217 | //------------------------------------------------- |
| 218 | |
| 219 | static ADDRESS_MAP_START( ex800_io, AS_IO, 8, epson_ex800_t ) |
| 220 | AM_RANGE(UPD7810_PORTA, UPD7810_PORTA) AM_READ(porta_r) AM_WRITE(porta_w) |
| 221 | AM_RANGE(UPD7810_PORTB, UPD7810_PORTB) AM_READ(portb_r) AM_WRITE(portb_w) |
| 222 | AM_RANGE(UPD7810_PORTC, UPD7810_PORTC) AM_READ(portc_r) AM_WRITE(portc_w) |
| 223 | ADDRESS_MAP_END |
| 224 | |
| 225 | |
| 226 | //------------------------------------------------- |
| 227 | // MACHINE_DRIVER( epson_ex800 ) |
| 228 | //------------------------------------------------- |
| 229 | |
| 230 | static MACHINE_CONFIG_FRAGMENT( epson_ex800 ) |
| 231 | /* basic machine hardware */ |
| 232 | MCFG_CPU_ADD("maincpu", UPD7810, 12000000) /* 12 MHz? */ |
| 233 | MCFG_CPU_PROGRAM_MAP(ex800_mem) |
| 234 | MCFG_CPU_IO_MAP(ex800_io) |
| 235 | |
| 236 | |
| 237 | MCFG_DEFAULT_LAYOUT(layout_ex800) |
| 238 | |
| 239 | /* audio hardware */ |
| 240 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 241 | MCFG_SOUND_ADD("beeper", BEEP, 0) |
| 242 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 243 | MACHINE_CONFIG_END |
| 244 | |
| 245 | |
| 246 | //------------------------------------------------- |
| 247 | // machine_config_additions - device-specific |
| 248 | // machine configurations |
| 249 | //------------------------------------------------- |
| 250 | |
| 251 | machine_config_constructor epson_ex800_t::device_mconfig_additions() const |
| 252 | { |
| 253 | return MACHINE_CONFIG_NAME( epson_ex800 ); |
| 254 | } |
| 255 | |
| 256 | |
| 257 | /* The ON LINE switch is directly connected to the INT1 input of the CPU */ |
| 258 | INPUT_CHANGED_MEMBER(epson_ex800_t::online_switch) |
| 259 | { |
| 260 | if (newval) |
| 261 | { |
| 262 | m_maincpu->set_input_line(UPD7810_INTF1, m_irq_state); |
| 263 | m_irq_state = (m_irq_state == ASSERT_LINE) ? CLEAR_LINE : ASSERT_LINE; |
| 264 | } |
| 265 | } |
| 266 | |
| 267 | |
| 268 | //------------------------------------------------- |
| 269 | // INPUT_PORTS( epson_ex800 ) |
| 270 | //------------------------------------------------- |
| 271 | |
| 272 | INPUT_PORTS_START( epson_ex800 ) |
| 273 | PORT_START("ONLISW") |
| 274 | PORT_BIT(0xfe, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 275 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("ON LINE") PORT_CODE(KEYCODE_F9) PORT_CHANGED_MEMBER(DEVICE_SELF, epson_ex800_t, online_switch, NULL) |
| 276 | |
| 277 | PORT_START("FEED") |
| 278 | PORT_BIT(0xfc, IP_ACTIVE_LOW, IPT_UNUSED) |
| 279 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("FORM FEED") PORT_CODE(KEYCODE_F10) |
| 280 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("LINE FEED") PORT_CODE(KEYCODE_F11) |
| 281 | |
| 282 | PORT_START("SelecType") |
| 283 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Draft") PORT_CODE(KEYCODE_F8) |
| 284 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("NLQ Roman") PORT_CODE(KEYCODE_F7) |
| 285 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Pica") PORT_CODE(KEYCODE_F6) |
| 286 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("NLQ Sans Serif") PORT_CODE(KEYCODE_F5) |
| 287 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Elite") PORT_CODE(KEYCODE_F4) |
| 288 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Proportional") PORT_CODE(KEYCODE_F3) |
| 289 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(DEF_STR(Normal)) PORT_CODE(KEYCODE_F2) |
| 290 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Condensed") PORT_CODE(KEYCODE_F1) |
| 291 | |
| 292 | PORT_START("DSW_1") |
| 293 | PORT_DIPNAME(0x01, 0x00, "Condensed characters") |
| 294 | PORT_DIPSETTING( 0x00, DEF_STR(Off)) |
| 295 | PORT_DIPSETTING( 0x01, DEF_STR(On)) |
| 296 | PORT_DIPNAME(0x02, 0x00, "Slashed zero") |
| 297 | PORT_DIPSETTING( 0x00, DEF_STR(Off)) |
| 298 | PORT_DIPSETTING( 0x02, DEF_STR(On)) |
| 299 | PORT_DIPNAME(0x04, 0x00, "Character table") |
| 300 | PORT_DIPSETTING( 0x00, "Italics") |
| 301 | PORT_DIPSETTING( 0x04, "Graphics") |
| 302 | PORT_DIPNAME(0x08, 0x00, "Printer commands") |
| 303 | PORT_DIPSETTING( 0x00, "ESC/P") |
| 304 | PORT_DIPSETTING( 0x08, "IBM printer emulation") |
| 305 | PORT_DIPNAME(0x10, 0x00, "Print quality") |
| 306 | PORT_DIPSETTING( 0x00, "Draft") |
| 307 | PORT_DIPSETTING( 0x10, "NLQ") |
| 308 | PORT_DIPNAME(0xe0, 0x00, "Int. character set") |
| 309 | PORT_DIPSETTING( 0x00, DEF_STR(USA)) |
| 310 | PORT_DIPSETTING( 0x20, DEF_STR(French)) |
| 311 | PORT_DIPSETTING( 0x30, DEF_STR(German)) |
| 312 | PORT_DIPSETTING( 0x40, "UK") |
| 313 | PORT_DIPSETTING( 0x50, "Danish") |
| 314 | PORT_DIPSETTING( 0x60, "Swedish") |
| 315 | PORT_DIPSETTING( 0x70, DEF_STR(Italian)) |
| 316 | PORT_DIPSETTING( 0x80, DEF_STR(Spanish)) |
| 317 | |
| 318 | PORT_START("DSW_2") |
| 319 | PORT_DIPNAME(0x01, 0x00, "Page length") |
| 320 | PORT_DIPSETTING( 0x00, "11 inch") |
| 321 | PORT_DIPSETTING( 0x01, "12 inch") |
| 322 | PORT_DIPNAME(0x02, 0x00, "Auto. sheet feeder") |
| 323 | PORT_DIPSETTING( 0x00, "Canceled") |
| 324 | PORT_DIPSETTING( 0x02, "Selected") |
| 325 | PORT_DIPNAME(0x04, 0x00, "Skip-over-perforation") |
| 326 | PORT_DIPSETTING( 0x00, DEF_STR(None)) |
| 327 | PORT_DIPSETTING( 0x04, "1 inch") |
| 328 | PORT_DIPNAME(0x08, 0x00, "Add LF after CR") |
| 329 | PORT_DIPSETTING( 0x00, "CR only") |
| 330 | PORT_DIPSETTING( 0x08, "CR + LF") |
| 331 | PORT_DIPNAME(0x30, 0x00, "Interface type") |
| 332 | PORT_DIPSETTING( 0x00, "Parallel") |
| 333 | PORT_DIPSETTING( 0x10, "Serial (odd parity)") |
| 334 | PORT_DIPSETTING( 0x20, "Serial (even parity)") |
| 335 | PORT_DIPSETTING( 0x30, "Serial (no parity)") |
| 336 | PORT_DIPNAME(0xc0, 0x00, "Baud rate") |
| 337 | PORT_DIPSETTING( 0x00, "9600") |
| 338 | PORT_DIPSETTING( 0x40, "4800") |
| 339 | PORT_DIPSETTING( 0x80, "1200") |
| 340 | PORT_DIPSETTING( 0xc0, "300") |
| 341 | INPUT_PORTS_END |
| 342 | |
| 343 | |
| 344 | //------------------------------------------------- |
| 345 | // input_ports - device-specific input ports |
| 346 | //------------------------------------------------- |
| 347 | |
| 348 | ioport_constructor epson_ex800_t::device_input_ports() const |
| 349 | { |
| 350 | return INPUT_PORTS_NAME( epson_ex800 ); |
| 351 | } |
| 352 | |
| 353 | |
| 354 | |
| 355 | //************************************************************************** |
| 356 | // LIVE DEVICE |
| 357 | //************************************************************************** |
| 358 | |
| 359 | //------------------------------------------------- |
| 360 | // epson_ex800_t - constructor |
| 361 | //------------------------------------------------- |
| 362 | |
| 363 | epson_ex800_t::epson_ex800_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : |
| 364 | device_t(mconfig, EPSON_EX800, "Epson EX-800", tag, owner, clock, "ex800", __FILE__), |
| 365 | device_centronics_peripheral_interface(mconfig, *this), |
| 366 | m_maincpu(*this, "maincpu"), |
| 367 | m_beeper(*this, "beeper") |
| 368 | { |
| 369 | } |
| 370 | |
| 371 | |
| 372 | //------------------------------------------------- |
| 373 | // device_start - device-specific startup |
| 374 | //------------------------------------------------- |
| 375 | |
| 376 | void epson_ex800_t::device_start() |
| 377 | { |
| 378 | m_irq_state = ASSERT_LINE; |
| 379 | } |
| 380 | |
| 381 | |
| 382 | //------------------------------------------------- |
| 383 | // device_reset - device-specific reset |
| 384 | //------------------------------------------------- |
| 385 | |
| 386 | void epson_ex800_t::device_reset() |
| 387 | { |
| 388 | /* Setup beep */ |
| 389 | m_beeper->set_state(0); |
| 390 | m_beeper->set_frequency(4000); /* measured at 4000 Hz */ |
| 391 | } |
| 392 | |
| 393 | |
| 394 | READ8_MEMBER(epson_ex800_t::porta_r) |
| 395 | { |
| 396 | logerror("PA R @%x\n", space.device().safe_pc()); |
| 397 | return machine().rand(); |
| 398 | } |
| 399 | |
| 400 | READ8_MEMBER(epson_ex800_t::portb_r) |
| 401 | { |
| 402 | logerror("PB R @%x\n", space.device().safe_pc()); |
| 403 | return machine().rand(); |
| 404 | } |
| 405 | |
| 406 | READ8_MEMBER(epson_ex800_t::portc_r) |
| 407 | { |
| 408 | logerror("PC R @%x\n", space.device().safe_pc()); |
| 409 | return machine().rand(); |
| 410 | } |
| 411 | |
| 412 | WRITE8_MEMBER(epson_ex800_t::porta_w) |
| 413 | { |
| 414 | if (PA6) logerror("BNK0 selected.\n"); |
| 415 | if (PA7) logerror("BNK1 selected.\n"); |
| 416 | |
| 417 | logerror("PA W %x @%x\n", data, space.device().safe_pc()); |
| 418 | } |
| 419 | |
| 420 | WRITE8_MEMBER(epson_ex800_t::portb_w) |
| 421 | { |
| 422 | if (data & 3) |
| 423 | logerror("PB0/1 Line feed @%x\n", space.device().safe_pc()); |
| 424 | if (!(data & 4)) |
| 425 | logerror("PB2 Line feed @%x\n", space.device().safe_pc()); |
| 426 | if (data & 8) |
| 427 | logerror("PB3 Online LED on @%x\n", space.device().safe_pc()); |
| 428 | else |
| 429 | logerror("PB3 Online LED off @%x\n", space.device().safe_pc()); |
| 430 | if (data & 16) |
| 431 | logerror("PB4 Serial @%x\n", space.device().safe_pc()); |
| 432 | if (data & 32) |
| 433 | logerror("PB4 Serial @%x\n", space.device().safe_pc()); |
| 434 | if (data & 64) |
| 435 | logerror("PB4 Serial @%x\n", space.device().safe_pc()); |
| 436 | if (data & 128) |
| 437 | logerror("PB3 Paper empty LED on @%x\n", space.device().safe_pc()); |
| 438 | else |
| 439 | logerror("PB3 Paper empty LED off @%x\n", space.device().safe_pc()); |
| 440 | |
| 441 | // logerror("PB W %x @%x\n", data, space.device().safe_pc()); |
| 442 | } |
| 443 | |
| 444 | WRITE8_MEMBER(epson_ex800_t::portc_w) |
| 445 | { |
| 446 | if (data & 0x80) |
| 447 | m_beeper->set_state(0); |
| 448 | else |
| 449 | m_beeper->set_state(1); |
| 450 | |
| 451 | logerror("PC W %x @%x\n", data, space.device().safe_pc()); |
| 452 | } |
| 453 | |
| 454 | |
| 455 | /* Memory mapped I/O access */ |
| 456 | |
| 457 | READ8_MEMBER(epson_ex800_t::devsel_r) |
| 458 | { |
| 459 | logerror("DEVSEL R @%x with offset %x\n", space.device().safe_pc(), offset); |
| 460 | return machine().rand(); |
| 461 | } |
| 462 | |
| 463 | WRITE8_MEMBER(epson_ex800_t::devsel_w) |
| 464 | { |
| 465 | logerror("DEVSEL W %x @%x with offset %x\n", data, space.device().safe_pc(), offset); |
| 466 | } |
| 467 | |
| 468 | READ8_MEMBER(epson_ex800_t::gate5a_r) |
| 469 | { |
| 470 | logerror("GATE5A R @%x with offset %x\n", space.device().safe_pc(), offset); |
| 471 | return machine().rand(); |
| 472 | } |
| 473 | |
| 474 | WRITE8_MEMBER(epson_ex800_t::gate5a_w) |
| 475 | { |
| 476 | logerror("GATE5A W %x @%x with offset %x\n", data, space.device().safe_pc(), offset); |
| 477 | } |
| 478 | |
| 479 | READ8_MEMBER(epson_ex800_t::iosel_r) |
| 480 | { |
| 481 | logerror("IOSEL R @%x with offset %x\n", space.device().safe_pc(), offset); |
| 482 | return machine().rand(); |
| 483 | } |
| 484 | |
| 485 | WRITE8_MEMBER(epson_ex800_t::iosel_w) |
| 486 | { |
| 487 | logerror("IOSEL W %x @%x with offset %x\n", data, space.device().safe_pc(), offset); |
| 488 | } |
| 489 | |
| 490 | READ8_MEMBER(epson_ex800_t::gate7a_r) |
| 491 | { |
| 492 | logerror("GATE7A R @%x with offset %x\n", space.device().safe_pc(), offset); |
| 493 | return machine().rand(); |
| 494 | } |
| 495 | |
| 496 | WRITE8_MEMBER(epson_ex800_t::gate7a_w) |
| 497 | { |
| 498 | logerror("GATE7A W %x @%x with offset %x\n", data, space.device().safe_pc(), offset); |
| 499 | } |
trunk/src/mess/drivers/ex800.c
| r30940 | r30941 | |
| 1 | | /****************************************************************************** |
| 2 | | |
| 3 | | Epson EX-800 Dot Matrix printer |
| 4 | | |
| 5 | | license: MAME, GPL-2.0+ |
| 6 | | copyright-holders: Dirk Best |
| 7 | | |
| 8 | | |
| 9 | | -- |
| 10 | | |
| 11 | | Main CPU is a UPD7810H6 running at 12 MHz. |
| 12 | | |
| 13 | | -- |
| 14 | | |
| 15 | | On startup, the ports are initialized as follows: |
| 16 | | |
| 17 | | Port A lines PA0-PA7 are configured as output |
| 18 | | Port B lines PB0-PB7 are configured as output |
| 19 | | Port C lines PC2, PC4 and PC5 are configured as output |
| 20 | | the other lines are control lines |
| 21 | | PC0: TxD output |
| 22 | | PC1: RxD input |
| 23 | | PC3: TI input |
| 24 | | PC6: CO0 output |
| 25 | | PC7: CO1 output |
| 26 | | |
| 27 | | The I/O lines are connected as follows: |
| 28 | | |
| 29 | | PA0: \ |
| 30 | | PA1: Carriage motor |
| 31 | | PA2: driving pulses |
| 32 | | PA3: / |
| 33 | | PA4: High when carriage assembly reaches either end |
| 34 | | PA5: High when carriage assembly reaches either end |
| 35 | | PA6: Bank 0 |
| 36 | | PA7: Bank 1 |
| 37 | | |
| 38 | | PB0: Line feed motor driving pulses |
| 39 | | PB1: Line feed motor driving pulses |
| 40 | | PB2: Line feed motor current control |
| 41 | | PB3: LED09, Online |
| 42 | | PB4: (used for serial port) |
| 43 | | PB5: ERR signal |
| 44 | | PB6: ACKNLG signal, data received at printer |
| 45 | | PB7: LED12, Paper empty |
| 46 | | |
| 47 | | PC0: TxD output |
| 48 | | PC1: RxD input |
| 49 | | PC2: |
| 50 | | PC3: TI input |
| 51 | | PC4: |
| 52 | | PC5: |
| 53 | | PC6: PWD signal of 5a |
| 54 | | PC7: Buzzer |
| 55 | | |
| 56 | | PD0-7: Data bus D0-D7 |
| 57 | | |
| 58 | | PF0-7: Address bus A8-A15 |
| 59 | | |
| 60 | | AN0: DSW 2 |
| 61 | | AN1: DSW 1 |
| 62 | | AN2: |
| 63 | | AN3: |
| 64 | | AN4: Print head operating temperature sensor |
| 65 | | AN5: Scanner Unit, Color Home sensor |
| 66 | | AN6: |
| 67 | | AN7: Color Home sensor adjust |
| 68 | | |
| 69 | | INT: Online switch |
| 70 | | |
| 71 | | |
| 72 | | Gate array 5a (parallel port, printer head) |
| 73 | | |
| 74 | | IN0-IN7: DATA1 to DATA8 from parallel port |
| 75 | | HD1-HD9: Head driving pulses |
| 76 | | STROBE: STROBE signal |
| 77 | | PWD: PC6 of CPU |
| 78 | | ALE: ALE of CPU |
| 79 | | |
| 80 | | Gate array 7a (inputs) |
| 81 | | |
| 82 | | - activated when carriage assembly reaches either end? |
| 83 | | |
| 84 | | PA0: Draft switch |
| 85 | | PA1: NLQ Roman switch |
| 86 | | PA2: Pica switch |
| 87 | | PA3: NLQ sans-serif switch |
| 88 | | PA4: Elite switch |
| 89 | | PA5: Proportional switch |
| 90 | | PA6: Normal switch |
| 91 | | PA7: Condensed switch |
| 92 | | |
| 93 | | PB0: Form feed switch |
| 94 | | PB1: Line feed switch |
| 95 | | PB2: Autoload switch |
| 96 | | PB3: Low when paper empty |
| 97 | | PB4: Low when carriage assembly is in home position |
| 98 | | PB5: SLCTIN (connected to parallel port), disable with DSW2-1 |
| 99 | | PB6: AUTO FEEDXT (connected to parallel port), disable with DSW2-4 |
| 100 | | "When this signal is LOW, the paper is automatically fed 1 line after |
| 101 | | printing." |
| 102 | | PB7: |
| 103 | | |
| 104 | | PC0: Dipswitch SW1-1 and SW1-2, Draft LED |
| 105 | | PC1: Dipswitch SW1-3 and SW1-4, Roman LED |
| 106 | | PC2: Dipswitch SW1-5 and SW1-6, Pica LED |
| 107 | | PC3: Dipswitch SW1-7 and SW1-8, Sans-Serif LED |
| 108 | | PC4: Dipswitch SW2-2 and SW2-3, Elite LED |
| 109 | | PC5: Dipswitch SW2-5 and SW2-6, Proportional LED |
| 110 | | PC6: Normal LED |
| 111 | | PC7: Condensed LED |
| 112 | | |
| 113 | | -- |
| 114 | | |
| 115 | | LED state on startup: |
| 116 | | |
| 117 | | The power light comes on, then draft, pica and normal. If there is no paper, |
| 118 | | the paper empty LED comes on. |
| 119 | | |
| 120 | | Power LED is green, selectype LED is orange, paper out LED is red. |
| 121 | | |
| 122 | | -- |
| 123 | | |
| 124 | | TODO: - The UPD7810 core is missing analog port emulation |
| 125 | | - Figure out the gate arrays (using trojan code?) |
| 126 | | - (much later) write an interface so that other drivers can hook |
| 127 | | into this one and use to print |
| 128 | | |
| 129 | | ******************************************************************************/ |
| 130 | | |
| 131 | | #include "emu.h" |
| 132 | | #include "cpu/upd7810/upd7810.h" |
| 133 | | #include "sound/beep.h" |
| 134 | | #include "ex800.lh" |
| 135 | | |
| 136 | | |
| 137 | | class ex800_state : public driver_device |
| 138 | | { |
| 139 | | public: |
| 140 | | ex800_state(const machine_config &mconfig, device_type type, const char *tag) |
| 141 | | : driver_device(mconfig, type, tag) , |
| 142 | | m_maincpu(*this, "maincpu"), |
| 143 | | m_beeper(*this, "beeper") { } |
| 144 | | |
| 145 | | int m_irq_state; |
| 146 | | DECLARE_READ8_MEMBER(ex800_porta_r); |
| 147 | | DECLARE_READ8_MEMBER(ex800_portb_r); |
| 148 | | DECLARE_READ8_MEMBER(ex800_portc_r); |
| 149 | | DECLARE_WRITE8_MEMBER(ex800_porta_w); |
| 150 | | DECLARE_WRITE8_MEMBER(ex800_portb_w); |
| 151 | | DECLARE_WRITE8_MEMBER(ex800_portc_w); |
| 152 | | DECLARE_READ8_MEMBER(ex800_devsel_r); |
| 153 | | DECLARE_WRITE8_MEMBER(ex800_devsel_w); |
| 154 | | DECLARE_READ8_MEMBER(ex800_gate5a_r); |
| 155 | | DECLARE_WRITE8_MEMBER(ex800_gate5a_w); |
| 156 | | DECLARE_READ8_MEMBER(ex800_iosel_r); |
| 157 | | DECLARE_WRITE8_MEMBER(ex800_iosel_w); |
| 158 | | DECLARE_READ8_MEMBER(ex800_gate7a_r); |
| 159 | | DECLARE_WRITE8_MEMBER(ex800_gate7a_w); |
| 160 | | virtual void machine_start(); |
| 161 | | DECLARE_INPUT_CHANGED_MEMBER(online_switch); |
| 162 | | required_device<cpu_device> m_maincpu; |
| 163 | | required_device<beep_device> m_beeper; |
| 164 | | }; |
| 165 | | |
| 166 | | |
| 167 | | |
| 168 | | #define PA0 (data & 0x01) |
| 169 | | #define PA1 (data & 0x02) |
| 170 | | #define PA2 (data & 0x04) |
| 171 | | #define PA3 (data & 0x08) |
| 172 | | #define PA4 (data & 0x10) |
| 173 | | #define PA5 (data & 0x20) |
| 174 | | #define PA6 (data & 0x40) |
| 175 | | #define PA7 (data & 0x80) |
| 176 | | |
| 177 | | #define PB0 (data & 0x01) |
| 178 | | #define PB1 (data & 0x02) |
| 179 | | #define PB2 (data & 0x04) |
| 180 | | #define PB3 (data & 0x08) |
| 181 | | #define PB4 (data & 0x10) |
| 182 | | #define PB5 (data & 0x20) |
| 183 | | #define PB6 (data & 0x40) |
| 184 | | #define PB7 (data & 0x80) |
| 185 | | |
| 186 | | #define PC0 (data & 0x01) |
| 187 | | #define PC1 (data & 0x02) |
| 188 | | #define PC2 (data & 0x04) |
| 189 | | #define PC3 (data & 0x08) |
| 190 | | #define PC4 (data & 0x10) |
| 191 | | #define PC5 (data & 0x20) |
| 192 | | #define PC6 (data & 0x40) |
| 193 | | #define PC7 (data & 0x80) |
| 194 | | |
| 195 | | |
| 196 | | /****************************************************************************** |
| 197 | | Misc (will be moved to other files) |
| 198 | | ******************************************************************************/ |
| 199 | | |
| 200 | | |
| 201 | | /* The ON LINE switch is directly connected to the INT1 input of the CPU */ |
| 202 | | INPUT_CHANGED_MEMBER(ex800_state::online_switch) |
| 203 | | { |
| 204 | | if (newval) |
| 205 | | { |
| 206 | | m_maincpu->set_input_line(UPD7810_INTF1, m_irq_state); |
| 207 | | m_irq_state = (m_irq_state == ASSERT_LINE) ? CLEAR_LINE : ASSERT_LINE; |
| 208 | | } |
| 209 | | } |
| 210 | | |
| 211 | | |
| 212 | | void ex800_state::machine_start() |
| 213 | | { |
| 214 | | m_irq_state = ASSERT_LINE; |
| 215 | | /* Setup beep */ |
| 216 | | m_beeper->set_state(0); |
| 217 | | m_beeper->set_frequency(4000); /* measured at 4000 Hz */ |
| 218 | | } |
| 219 | | |
| 220 | | |
| 221 | | READ8_MEMBER(ex800_state::ex800_porta_r) |
| 222 | | { |
| 223 | | logerror("PA R @%x\n", space.device().safe_pc()); |
| 224 | | return machine().rand(); |
| 225 | | } |
| 226 | | |
| 227 | | READ8_MEMBER(ex800_state::ex800_portb_r) |
| 228 | | { |
| 229 | | logerror("PB R @%x\n", space.device().safe_pc()); |
| 230 | | return machine().rand(); |
| 231 | | } |
| 232 | | |
| 233 | | READ8_MEMBER(ex800_state::ex800_portc_r) |
| 234 | | { |
| 235 | | logerror("PC R @%x\n", space.device().safe_pc()); |
| 236 | | return machine().rand(); |
| 237 | | } |
| 238 | | |
| 239 | | WRITE8_MEMBER(ex800_state::ex800_porta_w) |
| 240 | | { |
| 241 | | if (PA6) logerror("BNK0 selected.\n"); |
| 242 | | if (PA7) logerror("BNK1 selected.\n"); |
| 243 | | |
| 244 | | logerror("PA W %x @%x\n", data, space.device().safe_pc()); |
| 245 | | } |
| 246 | | |
| 247 | | WRITE8_MEMBER(ex800_state::ex800_portb_w) |
| 248 | | { |
| 249 | | if (data & 3) |
| 250 | | logerror("PB0/1 Line feed @%x\n", space.device().safe_pc()); |
| 251 | | if (!(data & 4)) |
| 252 | | logerror("PB2 Line feed @%x\n", space.device().safe_pc()); |
| 253 | | if (data & 8) |
| 254 | | logerror("PB3 Online LED on @%x\n", space.device().safe_pc()); |
| 255 | | else |
| 256 | | logerror("PB3 Online LED off @%x\n", space.device().safe_pc()); |
| 257 | | if (data & 16) |
| 258 | | logerror("PB4 Serial @%x\n", space.device().safe_pc()); |
| 259 | | if (data & 32) |
| 260 | | logerror("PB4 Serial @%x\n", space.device().safe_pc()); |
| 261 | | if (data & 64) |
| 262 | | logerror("PB4 Serial @%x\n", space.device().safe_pc()); |
| 263 | | if (data & 128) |
| 264 | | logerror("PB3 Paper empty LED on @%x\n", space.device().safe_pc()); |
| 265 | | else |
| 266 | | logerror("PB3 Paper empty LED off @%x\n", space.device().safe_pc()); |
| 267 | | |
| 268 | | // logerror("PB W %x @%x\n", data, space.device().safe_pc()); |
| 269 | | } |
| 270 | | |
| 271 | | WRITE8_MEMBER(ex800_state::ex800_portc_w) |
| 272 | | { |
| 273 | | if (data & 0x80) |
| 274 | | m_beeper->set_state(0); |
| 275 | | else |
| 276 | | m_beeper->set_state(1); |
| 277 | | |
| 278 | | logerror("PC W %x @%x\n", data, space.device().safe_pc()); |
| 279 | | } |
| 280 | | |
| 281 | | |
| 282 | | /* Memory mapped I/O access */ |
| 283 | | |
| 284 | | READ8_MEMBER(ex800_state::ex800_devsel_r) |
| 285 | | { |
| 286 | | logerror("DEVSEL R @%x with offset %x\n", space.device().safe_pc(), offset); |
| 287 | | return machine().rand(); |
| 288 | | } |
| 289 | | |
| 290 | | WRITE8_MEMBER(ex800_state::ex800_devsel_w) |
| 291 | | { |
| 292 | | logerror("DEVSEL W %x @%x with offset %x\n", data, space.device().safe_pc(), offset); |
| 293 | | } |
| 294 | | |
| 295 | | READ8_MEMBER(ex800_state::ex800_gate5a_r) |
| 296 | | { |
| 297 | | logerror("GATE5A R @%x with offset %x\n", space.device().safe_pc(), offset); |
| 298 | | return machine().rand(); |
| 299 | | } |
| 300 | | |
| 301 | | WRITE8_MEMBER(ex800_state::ex800_gate5a_w) |
| 302 | | { |
| 303 | | logerror("GATE5A W %x @%x with offset %x\n", data, space.device().safe_pc(), offset); |
| 304 | | } |
| 305 | | |
| 306 | | READ8_MEMBER(ex800_state::ex800_iosel_r) |
| 307 | | { |
| 308 | | logerror("IOSEL R @%x with offset %x\n", space.device().safe_pc(), offset); |
| 309 | | return machine().rand(); |
| 310 | | } |
| 311 | | |
| 312 | | WRITE8_MEMBER(ex800_state::ex800_iosel_w) |
| 313 | | { |
| 314 | | logerror("IOSEL W %x @%x with offset %x\n", data, space.device().safe_pc(), offset); |
| 315 | | } |
| 316 | | |
| 317 | | READ8_MEMBER(ex800_state::ex800_gate7a_r) |
| 318 | | { |
| 319 | | logerror("GATE7A R @%x with offset %x\n", space.device().safe_pc(), offset); |
| 320 | | return machine().rand(); |
| 321 | | } |
| 322 | | |
| 323 | | WRITE8_MEMBER(ex800_state::ex800_gate7a_w) |
| 324 | | { |
| 325 | | logerror("GATE7A W %x @%x with offset %x\n", data, space.device().safe_pc(), offset); |
| 326 | | } |
| 327 | | |
| 328 | | |
| 329 | | /****************************************************************************** |
| 330 | | Address Maps |
| 331 | | ******************************************************************************/ |
| 332 | | |
| 333 | | |
| 334 | | static ADDRESS_MAP_START( ex800_mem, AS_PROGRAM, 8, ex800_state ) |
| 335 | | AM_RANGE(0x0000, 0x7fff) AM_ROM AM_REGION("maincpu", 0) |
| 336 | | AM_RANGE(0x8000, 0xbfff) AM_RAM /* external RAM */ |
| 337 | | AM_RANGE(0xc000, 0xc7ff) AM_MIRROR(0x1800) AM_READWRITE(ex800_devsel_r, ex800_devsel_w) |
| 338 | | AM_RANGE(0xe000, 0xe7ff) AM_READWRITE(ex800_gate5a_r, ex800_gate5a_w) |
| 339 | | AM_RANGE(0xe800, 0xefff) AM_READWRITE(ex800_iosel_r, ex800_iosel_w) |
| 340 | | AM_RANGE(0xf000, 0xf001) AM_MIRROR(0x07fc) AM_READ(ex800_gate7a_r) |
| 341 | | AM_RANGE(0xf002, 0xf003) AM_MIRROR(0x07fc) AM_WRITE(ex800_gate7a_w) |
| 342 | | AM_RANGE(0xf800, 0xfeff) AM_NOP /* not connected */ |
| 343 | | AM_RANGE(0xff00, 0xffff) AM_RAM /* internal CPU RAM */ |
| 344 | | ADDRESS_MAP_END |
| 345 | | |
| 346 | | |
| 347 | | static ADDRESS_MAP_START( ex800_io, AS_IO, 8, ex800_state ) |
| 348 | | AM_RANGE(UPD7810_PORTA, UPD7810_PORTA) AM_READ(ex800_porta_r) AM_WRITE(ex800_porta_w) |
| 349 | | AM_RANGE(UPD7810_PORTB, UPD7810_PORTB) AM_READ(ex800_portb_r) AM_WRITE(ex800_portb_w) |
| 350 | | AM_RANGE(UPD7810_PORTC, UPD7810_PORTC) AM_READ(ex800_portc_r) AM_WRITE(ex800_portc_w) |
| 351 | | ADDRESS_MAP_END |
| 352 | | |
| 353 | | |
| 354 | | |
| 355 | | /****************************************************************************** |
| 356 | | Inputs and DIP switches |
| 357 | | ******************************************************************************/ |
| 358 | | |
| 359 | | |
| 360 | | static INPUT_PORTS_START( ex800 ) |
| 361 | | PORT_START("ONLISW") |
| 362 | | PORT_BIT(0xfe, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 363 | | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("ON LINE") PORT_CODE(KEYCODE_F9) PORT_CHANGED_MEMBER(DEVICE_SELF, ex800_state, online_switch, NULL) |
| 364 | | |
| 365 | | PORT_START("FEED") |
| 366 | | PORT_BIT(0xfc, IP_ACTIVE_LOW, IPT_UNUSED) |
| 367 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("FORM FEED") PORT_CODE(KEYCODE_F10) |
| 368 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("LINE FEED") PORT_CODE(KEYCODE_F11) |
| 369 | | |
| 370 | | PORT_START("SelecType") |
| 371 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Draft") PORT_CODE(KEYCODE_F8) |
| 372 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("NLQ Roman") PORT_CODE(KEYCODE_F7) |
| 373 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Pica") PORT_CODE(KEYCODE_F6) |
| 374 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("NLQ Sans Serif") PORT_CODE(KEYCODE_F5) |
| 375 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Elite") PORT_CODE(KEYCODE_F4) |
| 376 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Proportional") PORT_CODE(KEYCODE_F3) |
| 377 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(DEF_STR(Normal)) PORT_CODE(KEYCODE_F2) |
| 378 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Condensed") PORT_CODE(KEYCODE_F1) |
| 379 | | |
| 380 | | PORT_START("DSW_1") |
| 381 | | PORT_DIPNAME(0x01, 0x00, "Condensed characters") |
| 382 | | PORT_DIPSETTING( 0x00, DEF_STR(Off)) |
| 383 | | PORT_DIPSETTING( 0x01, DEF_STR(On)) |
| 384 | | PORT_DIPNAME(0x02, 0x00, "Slashed zero") |
| 385 | | PORT_DIPSETTING( 0x00, DEF_STR(Off)) |
| 386 | | PORT_DIPSETTING( 0x02, DEF_STR(On)) |
| 387 | | PORT_DIPNAME(0x04, 0x00, "Character table") |
| 388 | | PORT_DIPSETTING( 0x00, "Italics") |
| 389 | | PORT_DIPSETTING( 0x04, "Graphics") |
| 390 | | PORT_DIPNAME(0x08, 0x00, "Printer commands") |
| 391 | | PORT_DIPSETTING( 0x00, "ESC/P") |
| 392 | | PORT_DIPSETTING( 0x08, "IBM printer emulation") |
| 393 | | PORT_DIPNAME(0x10, 0x00, "Print quality") |
| 394 | | PORT_DIPSETTING( 0x00, "Draft") |
| 395 | | PORT_DIPSETTING( 0x10, "NLQ") |
| 396 | | PORT_DIPNAME(0xe0, 0x00, "Int. character set") |
| 397 | | PORT_DIPSETTING( 0x00, DEF_STR(USA)) |
| 398 | | PORT_DIPSETTING( 0x20, DEF_STR(French)) |
| 399 | | PORT_DIPSETTING( 0x30, DEF_STR(German)) |
| 400 | | PORT_DIPSETTING( 0x40, "UK") |
| 401 | | PORT_DIPSETTING( 0x50, "Danish") |
| 402 | | PORT_DIPSETTING( 0x60, "Swedish") |
| 403 | | PORT_DIPSETTING( 0x70, DEF_STR(Italian)) |
| 404 | | PORT_DIPSETTING( 0x80, DEF_STR(Spanish)) |
| 405 | | |
| 406 | | PORT_START("DSW_2") |
| 407 | | PORT_DIPNAME(0x01, 0x00, "Page length") |
| 408 | | PORT_DIPSETTING( 0x00, "11 inch") |
| 409 | | PORT_DIPSETTING( 0x01, "12 inch") |
| 410 | | PORT_DIPNAME(0x02, 0x00, "Auto. sheet feeder") |
| 411 | | PORT_DIPSETTING( 0x00, "Canceled") |
| 412 | | PORT_DIPSETTING( 0x02, "Selected") |
| 413 | | PORT_DIPNAME(0x04, 0x00, "Skip-over-perforation") |
| 414 | | PORT_DIPSETTING( 0x00, DEF_STR(None)) |
| 415 | | PORT_DIPSETTING( 0x04, "1 inch") |
| 416 | | PORT_DIPNAME(0x08, 0x00, "Add LF after CR") |
| 417 | | PORT_DIPSETTING( 0x00, "CR only") |
| 418 | | PORT_DIPSETTING( 0x08, "CR + LF") |
| 419 | | PORT_DIPNAME(0x30, 0x00, "Interface type") |
| 420 | | PORT_DIPSETTING( 0x00, "Parallel") |
| 421 | | PORT_DIPSETTING( 0x10, "Serial (odd parity)") |
| 422 | | PORT_DIPSETTING( 0x20, "Serial (even parity)") |
| 423 | | PORT_DIPSETTING( 0x30, "Serial (no parity)") |
| 424 | | PORT_DIPNAME(0xc0, 0x00, "Baud rate") |
| 425 | | PORT_DIPSETTING( 0x00, "9600") |
| 426 | | PORT_DIPSETTING( 0x40, "4800") |
| 427 | | PORT_DIPSETTING( 0x80, "1200") |
| 428 | | PORT_DIPSETTING( 0xc0, "300") |
| 429 | | INPUT_PORTS_END |
| 430 | | |
| 431 | | |
| 432 | | |
| 433 | | /****************************************************************************** |
| 434 | | Machine Drivers |
| 435 | | ******************************************************************************/ |
| 436 | | |
| 437 | | |
| 438 | | static MACHINE_CONFIG_START( ex800, ex800_state ) |
| 439 | | /* basic machine hardware */ |
| 440 | | MCFG_CPU_ADD("maincpu", UPD7810, 12000000) /* 12 MHz? */ |
| 441 | | MCFG_CPU_PROGRAM_MAP(ex800_mem) |
| 442 | | MCFG_CPU_IO_MAP(ex800_io) |
| 443 | | |
| 444 | | |
| 445 | | MCFG_DEFAULT_LAYOUT(layout_ex800) |
| 446 | | |
| 447 | | /* audio hardware */ |
| 448 | | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 449 | | MCFG_SOUND_ADD("beeper", BEEP, 0) |
| 450 | | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 451 | | MACHINE_CONFIG_END |
| 452 | | |
| 453 | | |
| 454 | | |
| 455 | | /****************************************************************************** |
| 456 | | ROM Definitions |
| 457 | | ******************************************************************************/ |
| 458 | | |
| 459 | | |
| 460 | | ROM_START( ex800 ) |
| 461 | | ROM_REGION(0x8000, "maincpu", 0) |
| 462 | | ROM_LOAD("w8_pe9.9b", 0x0000, 0x8000, CRC(6dd41e9b) SHA1(8e30ead727b9317154742efd881206e9f9bbf95b)) |
| 463 | | ROM_END |
| 464 | | |
| 465 | | |
| 466 | | |
| 467 | | /****************************************************************************** |
| 468 | | Drivers |
| 469 | | ******************************************************************************/ |
| 470 | | |
| 471 | | |
| 472 | | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 473 | | COMP( 1986, ex800, 0, 0, ex800, ex800, driver_device, 0, "Epson", "EX-800", GAME_NO_SOUND | GAME_NOT_WORKING) |