src/mess/drivers/bigbord2.c
| r15579 | r15580 | |
| 25 | 25 | d8 = port7 |
| 26 | 26 | dc = 6845 ce |
| 27 | 27 | |
| 28 | |
| 29 | Difficulties encountered: |
| 30 | |
| 31 | CTCA controls a pair of vectored interrupts. |
| 32 | One is triggered by a keypress, the other by a vsync pulse.. |
| 33 | Once a key is pressed, CTCA continually issues a keyboard interrupt, |
| 34 | causing a complete freeze. Therefore CTCA has been isolated, and the |
| 35 | 2 interrupts are triggered by a hack. It isn't a very good hack, |
| 36 | because the system crashes after a while. However it will allow |
| 37 | testing and development to continue. |
| 38 | |
| 28 | 39 | ****************************************************************************/ |
| 29 | 40 | |
| 30 | 41 | |
| r15579 | r15580 | |
| 37 | 48 | #include "machine/ram.h" |
| 38 | 49 | #include "machine/z80ctc.h" |
| 39 | 50 | #include "machine/z80sio.h" |
| 51 | #include "machine/z80dma.h" |
| 40 | 52 | #include "machine/wd17xx.h" |
| 41 | 53 | #include "video/mc6845.h" |
| 42 | 54 | #include "machine/keyboard.h" |
| 43 | 55 | |
| 44 | 56 | #define SCREEN_TAG "screen" |
| 45 | 57 | |
| 46 | | #define Z80_TAG "u46" |
| 58 | #define Z80_TAG "u39" |
| 47 | 59 | #define Z80SIO_TAG "u16" |
| 48 | | #define Z80CTC_TAG "u99" |
| 49 | | #define WD1771_TAG "u109" |
| 60 | #define Z80CTCA_TAG "u37" |
| 61 | #define Z80CTCB_TAG "u21" |
| 62 | #define Z80DMA_TAG "u62" |
| 50 | 63 | |
| 51 | 64 | class bigbord2_state : public driver_device |
| 52 | 65 | { |
| r15579 | r15580 | |
| 55 | 68 | : driver_device(mconfig, type, tag), |
| 56 | 69 | m_maincpu(*this, Z80_TAG), |
| 57 | 70 | m_6845(*this, "crtc"), |
| 58 | | m_ctc_84(*this, "ctc_84"), |
| 59 | | m_ctc_88(*this, "ctc_88"), |
| 60 | | m_fdc(*this, WD1771_TAG), |
| 71 | m_ctca(*this, Z80CTCA_TAG), |
| 72 | m_ctcb(*this, Z80CTCA_TAG), |
| 73 | m_fdc(*this, "fdc"), |
| 61 | 74 | // m_ram(*this, RAM_TAG), |
| 62 | 75 | m_floppy0(*this, FLOPPY_0), |
| 63 | 76 | m_floppy1(*this, FLOPPY_1), |
| 64 | | m_videoram(*this, "videoram"){ } |
| 77 | m_videoram(*this, "videoram"), |
| 78 | m_workram(*this, "workram"), |
| 79 | m_attribram(*this, "attribram"){ } |
| 65 | 80 | |
| 66 | 81 | virtual void machine_start(); |
| 67 | 82 | virtual void machine_reset(); |
| 68 | 83 | |
| 69 | 84 | virtual void video_start(); |
| 70 | 85 | |
| 71 | | required_device<cpu_device> m_maincpu; |
| 72 | | required_device<mc6845_device> m_6845; |
| 73 | | required_device<z80ctc_device> m_ctc_84; |
| 74 | | required_device<z80ctc_device> m_ctc_88; |
| 75 | | required_device<device_t> m_fdc; |
| 76 | | //required_device<ram_device> m_ram; |
| 77 | | required_device<device_t> m_floppy0; |
| 78 | | required_device<device_t> m_floppy1; |
| 79 | | |
| 80 | 86 | DECLARE_WRITE8_MEMBER( scroll_w ); |
| 81 | 87 | //DECLARE_WRITE8_MEMBER( x120_system_w ); |
| 82 | 88 | DECLARE_READ8_MEMBER( bigbord2_c4_r ); |
| r15579 | r15580 | |
| 87 | 93 | DECLARE_READ8_MEMBER( kbpio_pb_r ); |
| 88 | 94 | DECLARE_WRITE_LINE_MEMBER( intrq_w ); |
| 89 | 95 | DECLARE_WRITE_LINE_MEMBER( drq_w ); |
| 96 | DECLARE_WRITE_LINE_MEMBER(frame); |
| 90 | 97 | |
| 91 | 98 | void scan_keyboard(); |
| 92 | 99 | //void bankswitch(int bank); |
| r15579 | r15580 | |
| 98 | 105 | UINT8 m_term_status; |
| 99 | 106 | |
| 100 | 107 | /* video state */ |
| 101 | | required_shared_ptr<UINT8> m_videoram; /* video RAM */ |
| 102 | | UINT8 *m_char_rom; /* character ROM */ |
| 108 | UINT8 *m_p_chargen; /* character ROM */ |
| 103 | 109 | UINT8 m_scroll; /* vertical scroll */ |
| 104 | 110 | int m_ncset2; /* national character set */ |
| 105 | 111 | int m_vatt; /* X120 video attribute */ |
| r15579 | r15580 | |
| 111 | 117 | int m_fdc_drq; /* data request */ |
| 112 | 118 | int m_8n5; /* 5.25" / 8" drive select */ |
| 113 | 119 | int m_dsdd; /* double sided disk detect */ |
| 120 | required_device<cpu_device> m_maincpu; |
| 121 | required_device<mc6845_device> m_6845; |
| 122 | required_device<z80ctc_device> m_ctca; |
| 123 | required_device<z80ctc_device> m_ctcb; |
| 124 | required_device<device_t> m_fdc; |
| 125 | //required_device<ram_device> m_ram; |
| 126 | required_device<device_t> m_floppy0; |
| 127 | required_device<device_t> m_floppy1; |
| 128 | required_shared_ptr<UINT8> m_videoram; /* video RAM */ |
| 129 | required_shared_ptr<UINT8> m_workram; |
| 130 | required_shared_ptr<UINT8> m_attribram; |
| 114 | 131 | }; |
| 115 | 132 | |
| 116 | | /* Keyboard (external keyboard - so we use the 'terminal') */ |
| 133 | /* Keyboard (external keyboard - so we use the 'ascii keyboard') */ |
| 117 | 134 | |
| 118 | 135 | READ8_MEMBER( bigbord2_state::bigbord2_c4_r ) |
| 119 | 136 | { |
| r15579 | r15580 | |
| 124 | 141 | |
| 125 | 142 | READ8_MEMBER( bigbord2_state::bigbord2_d0_r ) |
| 126 | 143 | { |
| 127 | | return m_term_data; |
| 144 | UINT8 ret = m_term_data; |
| 145 | m_term_data = 0; |
| 146 | return ret; |
| 128 | 147 | } |
| 129 | 148 | |
| 130 | 149 | WRITE8_MEMBER( bigbord2_state::bigbord2_kbd_put ) |
| 131 | 150 | { |
| 132 | | m_term_data = data; |
| 133 | | m_term_status = 8; |
| 151 | if (data) |
| 152 | { |
| 153 | m_term_data = data; |
| 154 | m_term_status = 8; |
| 155 | z80ctc_trg0_w(m_ctca, 0); |
| 156 | z80ctc_trg0_w(m_ctca, 1); |
| 157 | if (space.read_byte(0xf13d) == 0x4d) |
| 158 | { |
| 159 | // simulate interrupt by saving current pc on |
| 160 | // the stack and jumping to interrupt handler. |
| 161 | UINT16 spreg = cpu_get_reg(m_maincpu, Z80_SP); |
| 162 | UINT16 pcreg = cpu_get_reg(m_maincpu, Z80_PC); |
| 163 | spreg--; |
| 164 | space.write_byte(spreg, pcreg >> 8); |
| 165 | spreg--; |
| 166 | space.write_byte(spreg, pcreg); |
| 167 | cpu_set_reg(m_maincpu, Z80_SP, spreg); |
| 168 | cpu_set_reg(m_maincpu, Z80_PC, 0xF120); |
| 169 | } |
| 170 | } |
| 134 | 171 | } |
| 135 | 172 | |
| 136 | 173 | static ASCII_KEYBOARD_INTERFACE( keyboard_intf ) |
| r15579 | r15580 | |
| 138 | 175 | DEVCB_DRIVER_MEMBER(bigbord2_state, bigbord2_kbd_put) |
| 139 | 176 | }; |
| 140 | 177 | |
| 178 | |
| 141 | 179 | static READ8_DEVICE_HANDLER( bigbord2_sio_r ) |
| 142 | 180 | { |
| 143 | 181 | if (!offset) |
| r15579 | r15580 | |
| 167 | 205 | } |
| 168 | 206 | |
| 169 | 207 | |
| 170 | | /* Read/Write Handlers */ |
| 208 | /* Z80 DMA */ |
| 171 | 209 | |
| 172 | | #if 0 |
| 173 | | void bigbord2_state::bankswitch(int bank) |
| 174 | | { |
| 175 | | address_space *program = m_maincpu->memory().space(AS_PROGRAM); |
| 176 | | UINT8 *ram = m_ram->pointer(); |
| 177 | 210 | |
| 178 | | if (bank) |
| 179 | | { |
| 180 | | /* ROM */ |
| 181 | | program->install_rom(0x0000, 0x0fff, machine.root_device().memregion("monitor")->base()); |
| 182 | | program->unmap_readwrite(0x1000, 0x1fff); |
| 183 | | program->install_ram(0x3000, 0x3fff, m_videoram); |
| 184 | | } |
| 185 | | else |
| 186 | | { |
| 187 | | /* RAM */ |
| 188 | | program->install_ram(0x0000, 0x3fff, ram); |
| 189 | | } |
| 190 | | } |
| 191 | | #endif |
| 211 | static UINT8 memory_read_byte(address_space *space, offs_t address) { return space->read_byte(address); } |
| 212 | static void memory_write_byte(address_space *space, offs_t address, UINT8 data) { space->write_byte(address, data); } |
| 192 | 213 | |
| 193 | | WRITE8_MEMBER( bigbord2_state::scroll_w ) |
| 214 | static Z80DMA_INTERFACE( dma_intf ) |
| 194 | 215 | { |
| 195 | | m_scroll = (offset >> 8) & 0x1f; |
| 196 | | } |
| 216 | DEVCB_CPU_INPUT_LINE(Z80_TAG, INPUT_LINE_HALT), // actually BUSRQ |
| 217 | DEVCB_CPU_INPUT_LINE(Z80_TAG, INPUT_LINE_IRQ0), |
| 218 | DEVCB_NULL, |
| 219 | DEVCB_MEMORY_HANDLER(Z80_TAG, PROGRAM, memory_read_byte), |
| 220 | DEVCB_MEMORY_HANDLER(Z80_TAG, PROGRAM, memory_write_byte), |
| 221 | DEVCB_MEMORY_HANDLER(Z80_TAG, IO, memory_read_byte), |
| 222 | DEVCB_MEMORY_HANDLER(Z80_TAG, IO, memory_write_byte) |
| 223 | }; |
| 197 | 224 | |
| 225 | |
| 226 | /* Read/Write Handlers */ |
| 227 | |
| 228 | |
| 229 | |
| 198 | 230 | #ifdef UNUSED_CODE |
| 199 | 231 | WRITE8_MEMBER( bigbord2_state::x120_system_w ) |
| 200 | 232 | { |
| r15579 | r15580 | |
| 252 | 284 | |
| 253 | 285 | static ADDRESS_MAP_START( bigbord2_mem, AS_PROGRAM, 8, bigbord2_state ) |
| 254 | 286 | ADDRESS_MAP_UNMAP_HIGH |
| 255 | | AM_RANGE(0x6000, 0x67ff) AM_RAM AM_SHARE("videoram") |
| 256 | 287 | AM_RANGE(0x0000, 0x0fff) AM_ROM |
| 257 | 288 | AM_RANGE(0x1000, 0x5fff) AM_RAM |
| 258 | | AM_RANGE(0x6800, 0xffff) AM_RAM |
| 289 | AM_RANGE(0x6000, 0x6fff) AM_RAM AM_SHARE("videoram") |
| 290 | AM_RANGE(0x7000, 0x7fff) AM_RAM AM_SHARE("attribram") |
| 291 | AM_RANGE(0x8000, 0xfeff) AM_RAM |
| 292 | AM_RANGE(0xff00, 0xffff) AM_RAM AM_SHARE("workram") |
| 259 | 293 | ADDRESS_MAP_END |
| 260 | 294 | |
| 261 | 295 | static ADDRESS_MAP_START( bigbord2_io, AS_IO, 8, bigbord2_state ) |
| 262 | 296 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 263 | 297 | AM_RANGE(0x80, 0x83) AM_DEVREADWRITE_LEGACY(Z80SIO_TAG, bigbord2_sio_r, bigbord2_sio_w) |
| 264 | | //AM_RANGE(0x84, 0x87) AM_DEVREADWRITE_LEGACY(Z80CTC_TAG, z80ctc_r, z80ctc_w) |
| 265 | | //AM_RANGE(0x88, 0x8b) AM_DEVREADWRITE_LEGACY(Z80CTC_TAG, z80ctc_r, z80ctc_w) |
| 266 | | //AM_RANGE(0x8C, 0x8F) AM_DEVREADWRITE_LEGACY(Z80DMA_TAG, z80ctc_r, z80ctc_w) |
| 298 | //AM_RANGE(0x84, 0x87) AM_DEVREADWRITE_LEGACY(Z80CTCA_TAG, z80ctc_r, z80ctc_w) //has issues |
| 299 | AM_RANGE(0x88, 0x8b) AM_DEVREADWRITE_LEGACY(Z80CTCB_TAG, z80ctc_r, z80ctc_w) |
| 300 | AM_RANGE(0x8C, 0x8F) AM_DEVREADWRITE_LEGACY(Z80DMA_TAG, z80dma_r, z80dma_w) |
| 267 | 301 | AM_RANGE(0xC4, 0xC7) AM_READ(bigbord2_c4_r) |
| 268 | 302 | AM_RANGE(0xD0, 0xD3) AM_READ(bigbord2_d0_r) |
| 269 | | AM_RANGE(0xD4, 0xD7) AM_DEVREADWRITE_LEGACY(WD1771_TAG, wd17xx_r, wd17xx_w) |
| 270 | | AM_RANGE(0xDC, 0xDC) AM_MIRROR(2) AM_DEVWRITE("crtc", mc6845_device, address_w) |
| 303 | AM_RANGE(0xD4, 0xD7) AM_DEVREADWRITE_LEGACY("fdc", wd17xx_r, wd17xx_w) |
| 304 | AM_RANGE(0xDC, 0xDC) AM_MIRROR(2) AM_DEVREADWRITE("crtc", mc6845_device, status_r, address_w) |
| 271 | 305 | AM_RANGE(0xDD, 0xDD) AM_MIRROR(2) AM_DEVREADWRITE("crtc", mc6845_device, register_r, register_w) |
| 272 | 306 | ADDRESS_MAP_END |
| 273 | 307 | |
| r15579 | r15580 | |
| 367 | 401 | |
| 368 | 402 | static TIMER_DEVICE_CALLBACK( ctc_tick ) |
| 369 | 403 | { |
| 370 | | //bigbord2_state *state = timer.machine().driver_data<bigbord2_state>(); |
| 404 | bigbord2_state *state = timer.machine().driver_data<bigbord2_state>(); |
| 371 | 405 | |
| 372 | | //z80ctc_trg0_w(state->m_ctc, 1); |
| 373 | | //z80ctc_trg0_w(state->m_ctc, 0); |
| 406 | z80ctc_trg0_w(state->m_ctcb, 1); |
| 407 | z80ctc_trg1_w(state->m_ctcb, 1); |
| 408 | z80ctc_trg0_w(state->m_ctcb, 0); |
| 409 | z80ctc_trg1_w(state->m_ctcb, 0); |
| 374 | 410 | } |
| 375 | 411 | |
| 376 | | static WRITE_LINE_DEVICE_HANDLER( ctc_z0_w ) |
| 412 | WRITE_LINE_MEMBER( bigbord2_state::frame ) |
| 377 | 413 | { |
| 378 | | // z80ctc_trg1_w(device, state); |
| 414 | address_space *space = m_maincpu->memory().space(AS_PROGRAM); |
| 415 | static UINT8 framecnt; |
| 416 | framecnt++; |
| 417 | |
| 418 | if ((space->read_byte(0xf13d) == 0x4d) & (framecnt > 3)) |
| 419 | { |
| 420 | framecnt = 0; |
| 421 | // simulate interrupt by saving current pc on |
| 422 | // the stack and jumping to interrupt handler. |
| 423 | UINT16 spreg = cpu_get_reg(m_maincpu, Z80_SP); |
| 424 | UINT16 pcreg = cpu_get_reg(m_maincpu, Z80_PC); |
| 425 | spreg--; |
| 426 | space->write_byte(spreg, pcreg >> 8); |
| 427 | spreg--; |
| 428 | space->write_byte(spreg, pcreg); |
| 429 | cpu_set_reg(m_maincpu, Z80_SP, spreg); |
| 430 | cpu_set_reg(m_maincpu, Z80_PC, 0xF18E); |
| 431 | } |
| 379 | 432 | } |
| 380 | 433 | |
| 434 | |
| 435 | // other inputs of ctca: |
| 436 | // trg0 = KBDSTB; trg1 = index pulse from fdc; trg2 = synca output from sio |
| 437 | |
| 438 | |
| 439 | |
| 381 | 440 | static WRITE_LINE_DEVICE_HANDLER( ctc_z2_w ) |
| 382 | 441 | { |
| 383 | | // z80ctc_trg3_w(device, state); |
| 442 | z80ctc_trg3_w(device, state); |
| 384 | 443 | } |
| 385 | 444 | |
| 386 | | static Z80CTC_INTERFACE( ctc_intf ) |
| 445 | static Z80CTC_INTERFACE( ctca_intf ) |
| 387 | 446 | { |
| 388 | 447 | 0, /* timer disables */ |
| 389 | 448 | DEVCB_CPU_INPUT_LINE(Z80_TAG, INPUT_LINE_IRQ0), /* interrupt handler */ |
| 390 | | DEVCB_LINE(ctc_z0_w), /* ZC/TO0 callback */ |
| 391 | | DEVCB_LINE(z80ctc_trg2_w), /* ZC/TO1 callback */ |
| 392 | | DEVCB_LINE(ctc_z2_w) /* ZC/TO2 callback */ |
| 449 | DEVCB_NULL, /* ZC/TO0 callback - KBDCLK */ |
| 450 | DEVCB_NULL, /* ZC/TO1 callback - not connected */ |
| 451 | DEVCB_NULL /* ZC/TO2 callback - not connected */ |
| 393 | 452 | }; |
| 394 | 453 | |
| 454 | static Z80CTC_INTERFACE( ctcb_intf ) |
| 455 | { |
| 456 | 0, /* timer disables */ |
| 457 | DEVCB_CPU_INPUT_LINE(Z80_TAG, INPUT_LINE_IRQ0), /* interrupt handler */ |
| 458 | DEVCB_NULL, /* ZC/TO0 callback - SIO channel B clock */ |
| 459 | DEVCB_NULL, /* ZC/TO1 callback - SIO channel A clock */ |
| 460 | DEVCB_DEVICE_LINE(Z80CTCB_TAG, ctc_z2_w) /* ZC/TO2 callback */ |
| 461 | }; |
| 462 | |
| 395 | 463 | /* Z80 Daisy Chain */ |
| 396 | 464 | |
| 397 | 465 | static const z80_daisy_config bigbord2_daisy_chain[] = |
| 398 | 466 | { |
| 467 | { Z80DMA_TAG }, |
| 468 | { Z80CTCA_TAG }, |
| 469 | { Z80CTCB_TAG }, |
| 399 | 470 | { Z80SIO_TAG }, |
| 400 | | { "ctc_84" }, |
| 401 | | { "ctc_88" }, |
| 402 | 471 | { NULL } |
| 403 | 472 | }; |
| 404 | 473 | |
| 405 | | /* WD1771 Interface */ |
| 474 | /* WD1793 Interface */ |
| 406 | 475 | |
| 407 | 476 | WRITE_LINE_MEMBER( bigbord2_state::intrq_w ) |
| 408 | 477 | { |
| 409 | | int halt = cpu_get_reg(m_maincpu, Z80_HALT); |
| 478 | // int halt = cpu_get_reg(m_maincpu, Z80_HALT); |
| 410 | 479 | |
| 411 | 480 | m_fdc_irq = state; |
| 412 | 481 | |
| 413 | | if (halt && state) |
| 414 | | device_set_input_line(m_maincpu, INPUT_LINE_NMI, ASSERT_LINE); |
| 415 | | else |
| 416 | | device_set_input_line(m_maincpu, INPUT_LINE_NMI, CLEAR_LINE); |
| 482 | // if (halt && state) |
| 483 | // device_set_input_line(m_maincpu, INPUT_LINE_NMI, ASSERT_LINE); |
| 484 | // else |
| 485 | // device_set_input_line(m_maincpu, INPUT_LINE_NMI, CLEAR_LINE); |
| 417 | 486 | } |
| 418 | 487 | |
| 419 | 488 | WRITE_LINE_MEMBER( bigbord2_state::drq_w ) |
| 420 | 489 | { |
| 421 | | int halt = cpu_get_reg(m_maincpu, Z80_HALT); |
| 490 | // int halt = cpu_get_reg(m_maincpu, Z80_HALT); |
| 422 | 491 | |
| 423 | 492 | m_fdc_drq = state; |
| 424 | 493 | |
| 425 | | if (halt && state) |
| 426 | | device_set_input_line(m_maincpu, INPUT_LINE_NMI, ASSERT_LINE); |
| 427 | | else |
| 428 | | device_set_input_line(m_maincpu, INPUT_LINE_NMI, CLEAR_LINE); |
| 494 | // if (halt && state) |
| 495 | // device_set_input_line(m_maincpu, INPUT_LINE_NMI, ASSERT_LINE); |
| 496 | // else |
| 497 | // device_set_input_line(m_maincpu, INPUT_LINE_NMI, CLEAR_LINE); |
| 429 | 498 | } |
| 430 | 499 | |
| 431 | 500 | static const wd17xx_interface fdc_intf = |
| r15579 | r15580 | |
| 442 | 511 | void bigbord2_state::video_start() |
| 443 | 512 | { |
| 444 | 513 | /* find memory regions */ |
| 445 | | m_char_rom = memregion("chargen")->base(); |
| 514 | m_p_chargen = memregion("chargen")->base(); |
| 446 | 515 | } |
| 447 | 516 | |
| 448 | 517 | |
| r15579 | r15580 | |
| 500 | 569 | |
| 501 | 570 | void bigbord2_state::machine_reset() |
| 502 | 571 | { |
| 503 | | //bankswitch(1); |
| 572 | |
| 504 | 573 | } |
| 505 | 574 | |
| 506 | 575 | static LEGACY_FLOPPY_OPTIONS_START( bigbord2 ) |
| r15579 | r15580 | |
| 569 | 638 | UINT16 mem,x; |
| 570 | 639 | UINT32 *p = &bitmap.pix32(y); |
| 571 | 640 | |
| 572 | | for (x = 0; x < x_count; x++) // for each character |
| 641 | for (x = 0; x < x_count; x++) |
| 573 | 642 | { |
| 574 | 643 | inv=0; |
| 575 | | if (x == cursor_x) inv^=0xff; |
| 576 | 644 | mem = (ma + x) & 0x7ff; |
| 645 | if (BIT(state->m_attribram[mem], 7)) inv^=0xff; |
| 577 | 646 | chr = state->m_videoram[mem]; |
| 578 | 647 | |
| 579 | 648 | /* get pattern of pixels for that character scanline */ |
| 580 | | gfx = state->m_char_rom[(chr<<4) | ra ] ^ inv; |
| 649 | gfx = state->m_p_chargen[(chr<<4) | ra ] ^ inv; |
| 581 | 650 | |
| 582 | 651 | /* Display a scanline of a character */ |
| 583 | | *p++ = palette[BIT( gfx, 7 ) ? 1 : 0]; |
| 584 | | *p++ = palette[BIT( gfx, 6 ) ? 1 : 0]; |
| 585 | | *p++ = palette[BIT( gfx, 5 ) ? 1 : 0]; |
| 586 | | *p++ = palette[BIT( gfx, 4 ) ? 1 : 0]; |
| 587 | | *p++ = palette[BIT( gfx, 3 ) ? 1 : 0]; |
| 588 | | *p++ = palette[BIT( gfx, 2 ) ? 1 : 0]; |
| 589 | | *p++ = palette[BIT( gfx, 1 ) ? 1 : 0]; |
| 590 | | *p++ = palette[BIT( gfx, 0 ) ? 1 : 0]; |
| 652 | *p++ = palette[BIT( gfx, 7 )]; |
| 653 | *p++ = palette[BIT( gfx, 6 )]; |
| 654 | *p++ = palette[BIT( gfx, 5 )]; |
| 655 | *p++ = palette[BIT( gfx, 4 )]; |
| 656 | *p++ = palette[BIT( gfx, 3 )]; |
| 657 | *p++ = palette[BIT( gfx, 2 )]; |
| 658 | *p++ = palette[BIT( gfx, 1 )]; |
| 659 | *p++ = palette[BIT( gfx, 0 )]; |
| 591 | 660 | } |
| 592 | 661 | } |
| 593 | 662 | |
| r15579 | r15580 | |
| 600 | 669 | DEVCB_NULL, |
| 601 | 670 | DEVCB_NULL, |
| 602 | 671 | DEVCB_NULL, |
| 603 | | DEVCB_NULL, |
| 672 | DEVCB_DRIVER_LINE_MEMBER(bigbord2_state, frame), //DEVCB_DEVICE_LINE(Z80CTCA_TAG, z80ctc_trg3_w), // vsync |
| 604 | 673 | NULL |
| 605 | 674 | }; |
| 606 | 675 | |
| r15579 | r15580 | |
| 628 | 697 | MCFG_TIMER_ADD_PERIODIC("ctc", ctc_tick, attotime::from_hz(MAIN_CLOCK)) |
| 629 | 698 | |
| 630 | 699 | /* devices */ |
| 700 | MCFG_Z80DMA_ADD(Z80DMA_TAG, MAIN_CLOCK, dma_intf) |
| 631 | 701 | MCFG_Z80SIO_ADD(Z80SIO_TAG, MAIN_CLOCK, sio_intf) |
| 632 | | MCFG_Z80CTC_ADD("ctc_84", MAIN_CLOCK, ctc_intf) |
| 633 | | MCFG_Z80CTC_ADD("ctc_88", MAIN_CLOCK, ctc_intf) |
| 634 | | MCFG_FD1793_ADD(WD1771_TAG, fdc_intf) |
| 702 | MCFG_Z80CTC_ADD(Z80CTCA_TAG, MAIN_CLOCK, ctca_intf) |
| 703 | MCFG_Z80CTC_ADD(Z80CTCB_TAG, MAIN_CLOCK / 6, ctcb_intf) |
| 704 | MCFG_FD1793_ADD("fdc", fdc_intf) |
| 635 | 705 | MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(bigbord2_floppy_interface) |
| 636 | 706 | MCFG_MC6845_ADD("crtc", MC6845, XTAL_16MHz / 8, bigbord2_crtc) |
| 637 | 707 | MCFG_ASCII_KEYBOARD_ADD(KEYBOARD_TAG, keyboard_intf) |