trunk/src/mess/drivers/excali64.c
| r242503 | r242504 | |
| 19 | 19 | |
| 20 | 20 | ToDo: |
| 21 | 21 | - Colours are approximate. |
| 22 | | - Issues with bitmap graphics |
| 23 | 22 | - Disk controller, works with old wd17xx but crashes on new wd. |
| 24 | 23 | - Hardware supports 8 and 5.25 inch floppies, but we only support 5.25 as this |
| 25 | 24 | is the only software that exists. |
| r242503 | r242504 | |
| 97 | 96 | DECLARE_READ8_MEMBER(io_read_byte); |
| 98 | 97 | DECLARE_WRITE8_MEMBER(io_write_byte); |
| 99 | 98 | MC6845_UPDATE_ROW(update_row); |
| 100 | | DECLARE_WRITE_LINE_MEMBER(crtc_de); |
| 99 | DECLARE_WRITE_LINE_MEMBER(crtc_hs); |
| 101 | 100 | DECLARE_WRITE_LINE_MEMBER(crtc_vs); |
| 102 | 101 | DECLARE_WRITE8_MEMBER(motor_w); |
| 103 | 102 | DECLARE_MACHINE_RESET(excali64); |
| r242503 | r242504 | |
| 110 | 109 | UINT8 m_sys_status; |
| 111 | 110 | UINT8 m_kbdrow; |
| 112 | 111 | bool m_crtc_vs; |
| 113 | | bool m_crtc_de; |
| 112 | bool m_crtc_hs; |
| 114 | 113 | bool m_motor; |
| 115 | 114 | required_device<cpu_device> m_maincpu; |
| 116 | 115 | required_device<cassette_image_device> m_cass; |
| r242503 | r242504 | |
| 392 | 391 | READ8_MEMBER( excali64_state::port50_r ) |
| 393 | 392 | { |
| 394 | 393 | UINT8 data = m_sys_status & 0x2f; |
| 395 | | data |= (UINT8)m_crtc_vs << 4; |
| 394 | bool csync = m_crtc_hs | m_crtc_vs; |
| 395 | data |= (UINT8)csync << 4; |
| 396 | 396 | return data; |
| 397 | 397 | } |
| 398 | 398 | |
| r242503 | r242504 | |
| 457 | 457 | m_maincpu->reset(); |
| 458 | 458 | } |
| 459 | 459 | |
| 460 | | WRITE_LINE_MEMBER( excali64_state::crtc_de ) |
| 460 | WRITE_LINE_MEMBER( excali64_state::crtc_hs ) |
| 461 | 461 | { |
| 462 | | m_crtc_de = state; |
| 462 | m_crtc_hs = state; |
| 463 | 463 | } |
| 464 | 464 | |
| 465 | 465 | WRITE_LINE_MEMBER( excali64_state::crtc_vs ) |
| r242503 | r242504 | |
| 561 | 561 | |
| 562 | 562 | if BIT(col, 0) |
| 563 | 563 | { |
| 564 | | UINT16 hires_bank = (m_p_videoram[mem+0x1000] ^ 4) << 24; |
| 565 | | gfx = m_p_hiresram[hires_bank | (chr<<4) | ra]; // hires definition |
| 564 | UINT8 h = m_p_videoram[mem+0x1000] - 4; |
| 565 | if (h > 5) |
| 566 | h = 0; // keep us in bounds |
| 567 | // hires definition - pixels are opposite order to characters |
| 568 | gfx = BITSWAP8(m_p_hiresram[(h << 12) | (chr<<4) | ra], 0, 1, 2, 3, 4, 5, 6, 7); |
| 566 | 569 | } |
| 567 | 570 | else |
| 568 | 571 | gfx = m_p_chargen[(chr<<4) | ra]; // normal character |
| r242503 | r242504 | |
| 632 | 635 | MCFG_MC6845_SHOW_BORDER_AREA(false) |
| 633 | 636 | MCFG_MC6845_CHAR_WIDTH(8) |
| 634 | 637 | MCFG_MC6845_UPDATE_ROW_CB(excali64_state, update_row) |
| 635 | | MCFG_MC6845_OUT_DE_CB(WRITELINE(excali64_state, crtc_de)) |
| 638 | MCFG_MC6845_OUT_HSYNC_CB(WRITELINE(excali64_state, crtc_hs)) |
| 636 | 639 | MCFG_MC6845_OUT_VSYNC_CB(WRITELINE(excali64_state, crtc_vs)) |
| 637 | 640 | |
| 638 | 641 | /* Devices */ |