| Previous | 199869 Revisions | Next |
| r33798 Wednesday 10th December, 2014 at 11:22:55 UTC by Robbbert |
|---|
| (MESS) excalibur : various fixes and updates (nw) - Added colour - Added hires graphics - Fixed case of letters when pasting - Added F4 viewer - Added locations to rom names - Added rom patch to fix an obvious bug |
| [src/mess/drivers] | excali64.c |
| r242309 | r242310 | |
|---|---|---|
| 7 | 7 | Skeleton driver created on 2014-12-09. |
| 8 | 8 | |
| 9 | 9 | Chips: Z80A, 8251, 8253, 8255, 6845 |
| 10 | We have Basic 1.1. Other known versions are 1.01, 2.1 | |
| 10 | 11 | |
| 12 | Control W then Enter will switch between 40 and 80 characters per line. | |
| 13 | ||
| 11 | 14 | ToDo: |
| 12 | 15 | - Some keys can be connected to more than one position in the matrix. Need to |
| 13 | 16 | determine the correct positions. |
| 14 | 17 | - The position of the "Line Insert" key is unknown. |
| 15 | - The video section has attributes and colour, none of this is done. | |
| 18 | - PCGEN command not working. | |
| 19 | - Colours are wrong (colour prom needs to be dumped) | |
| 16 | 20 | - Disk controller |
| 17 | 21 | - Banking |
| 18 | 22 | - The schematic shows the audio counter connected to 2MHz, but this produces |
| r242309 | r242310 | |
| 20 | 24 | - Serial |
| 21 | 25 | - Parallel / Centronics |
| 22 | 26 | - Need software |
| 27 | - Pasting can drop a character or two at the start of a line. | |
| 28 | - Clock change for crtc | |
| 23 | 29 | |
| 24 | 30 | ****************************************************************************/ |
| 25 | 31 | |
| r242309 | r242310 | |
| 45 | 51 | , m_palette(*this, "palette") |
| 46 | 52 | , m_maincpu(*this, "maincpu") |
| 47 | 53 | , m_cass(*this, "cassette") |
| 54 | , m_crtc(*this, "crtc") | |
| 48 | 55 | , m_io_keyboard(*this, "KEY") |
| 49 | 56 | { } |
| 50 | 57 | |
| 51 | 58 | DECLARE_DRIVER_INIT(excali64); |
| 59 | DECLARE_PALETTE_INIT(excali64); | |
| 52 | 60 | DECLARE_WRITE8_MEMBER(ppib_w); |
| 53 | 61 | DECLARE_READ8_MEMBER(ppic_r); |
| 54 | 62 | DECLARE_WRITE8_MEMBER(ppic_w); |
| r242309 | r242310 | |
| 71 | 79 | bool m_crtc_de; |
| 72 | 80 | required_device<cpu_device> m_maincpu; |
| 73 | 81 | required_device<cassette_image_device> m_cass; |
| 82 | required_device<mc6845_device> m_crtc; | |
| 74 | 83 | required_ioport_array<8> m_io_keyboard; |
| 75 | 84 | }; |
| 76 | 85 | |
| r242309 | r242310 | |
| 96 | 105 | |
| 97 | 106 | /* Input ports */ |
| 98 | 107 | static INPUT_PORTS_START( excali64 ) |
| 99 | //PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("LINEFEED") PORT_CODE(KEYCODE_ENTER_PAD) PORT_CHAR(0x0a)//H | |
| 100 | //PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("REPT") PORT_CODE(KEYCODE_LALT)//0x11 | |
| 101 | //PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("(Down)") PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN))//B | |
| 102 | //PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("(Up)") PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) | |
| 103 | //PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("(Fire)") PORT_CODE(KEYCODE_INSERT) PORT_CHAR(UCHAR_MAMEKEY(INSERT)) | |
| 104 | //PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\\ |")PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') PORT_CHAR('|') PORT_CHAR(0x1c) | |
| 105 | //PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("(Right)") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) | |
| 106 | //PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("BRK") PORT_CODE(KEYCODE_NUMLOCK) PORT_CHAR(0x03) | |
| 107 | //PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("(Left)") PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) | |
| 108 | ||
| 109 | 108 | PORT_START("KEY.0") /* line 0 */ |
| 110 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R) PORT_CHAR('R') PORT_CHAR('R') PORT_CHAR(0x12) | |
| 111 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) PORT_CHAR('W') PORT_CHAR('W') PORT_CHAR(0x17) | |
| 109 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') PORT_CHAR(0x12) | |
| 110 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') PORT_CHAR(0x17) | |
| 112 | 111 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) |
| 113 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) PORT_CHAR(' | |
| 112 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') PORT_CHAR(0x05) | |
| 114 | 113 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TAB") PORT_CODE(KEYCODE_TAB) PORT_CHAR(0x09) |
| 115 | 114 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CAPSLOCK") PORT_CODE(KEYCODE_CAPSLOCK) PORT_TOGGLE |
| 116 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) PORT_CHAR('A') PORT_CHAR('A') PORT_CHAR(0x01) | |
| 117 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') PORT_CHAR('Q') PORT_CHAR(0x11) | |
| 115 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') PORT_CHAR(0x01) | |
| 116 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') PORT_CHAR(0x11) | |
| 118 | 117 | |
| 119 | 118 | PORT_START("KEY.1") /* line 1 */ |
| 120 | 119 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F3") PORT_CODE(KEYCODE_F3) |
| 121 | 120 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F2") PORT_CODE(KEYCODE_F2) |
| 122 | 121 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F4") PORT_CODE(KEYCODE_F4) |
| 123 | 122 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') |
| 124 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CTRL") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR(UCHAR_SHIFT_2) | |
| 123 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CTRL") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR(UCHAR_SHIFT_2) | |
| 125 | 124 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) // space |
| 126 | 125 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F1") PORT_CODE(KEYCODE_F1) |
| 127 | 126 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) // F1 |
| 128 | 127 | |
| 129 | 128 | PORT_START("KEY.2") /* line 2 */ |
| 130 | 129 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(". >") PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') |
| 131 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) PORT_CHAR(' | |
| 130 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') PORT_CHAR(0x0d) | |
| 132 | 131 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("/ ?") PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') |
| 133 | 132 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(", <") PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') |
| 134 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) PORT_CHAR(' | |
| 133 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') PORT_CHAR(0x02) | |
| 135 | 134 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) //B |
| 136 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) PORT_CHAR(' | |
| 135 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') PORT_CHAR(0x0e) | |
| 137 | 136 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) //N |
| 138 | 137 | |
| 139 | 138 | PORT_START("KEY.3") /* line 3 */ |
| 140 | 139 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("' \"") PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(0x27) PORT_CHAR(0x22) PORT_CHAR(0x27) |
| 141 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) PORT_CHAR(' | |
| 140 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') PORT_CHAR(0x0c) | |
| 142 | 141 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("RETURN") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(0x0d) |
| 143 | 142 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("; :") PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':') |
| 144 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) PORT_CHAR('J') PORT_CHAR('J') PORT_CHAR(0x0a) | |
| 145 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) PORT_CHAR('G') PORT_CHAR('G') PORT_CHAR(0x07) | |
| 146 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) PORT_CHAR('K') PORT_CHAR('K') PORT_CHAR(0x0b) | |
| 147 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H) PORT_CHAR('H') PORT_CHAR('H') PORT_CHAR(0x08) | |
| 143 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') PORT_CHAR(0x0a) | |
| 144 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') PORT_CHAR(0x07) | |
| 145 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') PORT_CHAR(0x0b) | |
| 146 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') PORT_CHAR(0x08) | |
| 148 | 147 | |
| 149 | 148 | PORT_START("KEY.4") /* line 4 */ |
| 150 | 149 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4 $") PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') |
| r242309 | r242310 | |
| 158 | 157 | |
| 159 | 158 | PORT_START("KEY.5") /* line 5 */ |
| 160 | 159 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("[ {") PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CHAR('{') PORT_CHAR(0x1b) |
| 161 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O) PORT_CHAR(' | |
| 160 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') PORT_CHAR(0x0f) | |
| 162 | 161 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("] }") PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('}') PORT_CHAR(0x1d) |
| 163 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) PORT_CHAR('P') PORT_CHAR('P') PORT_CHAR(0x10) | |
| 164 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U) PORT_CHAR('U') PORT_CHAR('U') PORT_CHAR(0x15) | |
| 165 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T) PORT_CHAR('T') PORT_CHAR('T') PORT_CHAR(0x14) | |
| 166 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I) PORT_CHAR('I') PORT_CHAR('I') PORT_CHAR(0x09)//0x12 | |
| 167 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) PORT_CHAR('Y') PORT_CHAR('Y') PORT_CHAR(0x19)//0x14 | |
| 162 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') PORT_CHAR(0x10) | |
| 163 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') PORT_CHAR(0x15) | |
| 164 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') PORT_CHAR(0x14) | |
| 165 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') PORT_CHAR(0x09) | |
| 166 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') PORT_CHAR(0x19) | |
| 168 | 167 | |
| 169 | 168 | PORT_START("KEY.6") /* line 6 */ |
| 170 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) PORT_CHAR('F') PORT_CHAR('F') PORT_CHAR(0x06) | |
| 171 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) PORT_CHAR('X') PORT_CHAR('X') PORT_CHAR(0x18) | |
| 172 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) PORT_CHAR('V') PORT_CHAR('V') PORT_CHAR(0x16) | |
| 173 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) PORT_CHAR('C') PORT_CHAR('C') PORT_CHAR(0x03) | |
| 174 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) PORT_CHAR('D') PORT_CHAR('D') PORT_CHAR(0x04) | |
| 175 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) PORT_CHAR('S') PORT_CHAR('S') PORT_CHAR(0x13) | |
| 176 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) PORT_CHAR('Z') PORT_CHAR('Z') PORT_CHAR(0x1a) | |
| 169 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') PORT_CHAR(0x06) | |
| 170 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') PORT_CHAR(0x18) | |
| 171 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') PORT_CHAR(0x16) | |
| 172 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') PORT_CHAR(0x03) | |
| 173 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') PORT_CHAR(0x04) | |
| 174 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') PORT_CHAR(0x13) | |
| 175 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') PORT_CHAR(0x1a) | |
| 177 | 176 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) //Z |
| 178 | 177 | |
| 179 | 178 | PORT_START("KEY.7") /* line 7 */ |
| r242309 | r242310 | |
| 234 | 233 | |
| 235 | 234 | /* |
| 236 | 235 | d0,1,2 : same as port50 |
| 237 | d | |
| 236 | d3 : 2nd colour set | |
| 238 | 237 | */ |
| 239 | 238 | WRITE8_MEMBER( excali64_state::port70_w ) |
| 240 | 239 | { |
| 241 | 240 | m_sys_status = data; |
| 241 | m_crtc->set_unscaled_clock(BIT(data, 2) ? 2e6 : 1e6); | |
| 242 | 242 | } |
| 243 | 243 | |
| 244 | 244 | WRITE8_MEMBER( excali64_state::video_w ) |
| r242309 | r242310 | |
| 262 | 262 | m_p_videoram = memregion("videoram")->base(); |
| 263 | 263 | } |
| 264 | 264 | |
| 265 | /* F4 Character Displayer */ | |
| 266 | static const gfx_layout excali64_charlayout = | |
| 267 | { | |
| 268 | 8, 12, /* 8 x 12 characters */ | |
| 269 | 256, /* 256 characters */ | |
| 270 | 1, /* 1 bits per pixel */ | |
| 271 | { 0 }, /* no bitplanes */ | |
| 272 | /* x offsets */ | |
| 273 | { 7, 6, 5, 4, 3, 2, 1, 0 }, | |
| 274 | /* y offsets */ | |
| 275 | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, 8*8, 9*8, 10*8, 11*8 }, | |
| 276 | 8*16 /* every char takes 16 bytes */ | |
| 277 | }; | |
| 278 | ||
| 279 | static GFXDECODE_START( excali64 ) | |
| 280 | GFXDECODE_ENTRY( "chargen", 0x0000, excali64_charlayout, 0, 1 ) | |
| 281 | GFXDECODE_END | |
| 282 | ||
| 283 | // The colour names in the comments are what's needed, the current rgb values are mostly wrong | |
| 284 | PALETTE_INIT_MEMBER( excali64_state, excali64 ) | |
| 285 | { | |
| 286 | // Colour Menu A | |
| 287 | palette.set_pen_color(0, 0x00, 0x00, 0x00); /* 0 Black */ | |
| 288 | palette.set_pen_color(1, 0x7f, 0x00, 0x00); /* 1 Dark Red */ | |
| 289 | palette.set_pen_color(2, 0xff, 0x00, 0x00); /* 2 Red */ | |
| 290 | palette.set_pen_color(3, 0x00, 0x00, 0x00); /* 3 Pink */ | |
| 291 | palette.set_pen_color(4, 0xbf, 0xbf, 0xbf); /* 4 Orange */ | |
| 292 | palette.set_pen_color(5, 0x00, 0xff, 0xff); /* 5 Brown */ | |
| 293 | palette.set_pen_color(6, 0xff, 0xff, 0x00); /* 6 Yellow */ | |
| 294 | palette.set_pen_color(7, 0x7f, 0x7f, 0x00); /* 7 Dark Green */ | |
| 295 | palette.set_pen_color(8, 0x00, 0x7f, 0x00); /* 8 Green */ | |
| 296 | palette.set_pen_color(9, 0x00, 0xff, 0x00); /* 9 Bright Green */ | |
| 297 | palette.set_pen_color(10, 0x00, 0x00, 0xff); /* 10 Light Blue */ | |
| 298 | palette.set_pen_color(11, 0x00, 0x00, 0x7f); /* 11 Blue */ | |
| 299 | palette.set_pen_color(12, 0xff, 0x00, 0xff); /* 12 Magenta */ | |
| 300 | palette.set_pen_color(13, 0x7f, 0x00, 0x7f); /* 13 Purple */ | |
| 301 | palette.set_pen_color(14, 0x80, 0x80, 0x80); /* 14 Dark Grey */ | |
| 302 | palette.set_pen_color(15, 0xff, 0xff, 0xff); /* 15 White */ | |
| 303 | // Colour Menu B | |
| 304 | palette.set_pen_color(16, 0x00, 0x00, 0x00); /* 0 Black */ | |
| 305 | palette.set_pen_color(17, 0x7f, 0x00, 0x00); /* 1 Dark Red */ | |
| 306 | palette.set_pen_color(18, 0xff, 0x00, 0x00); /* 2 Red */ | |
| 307 | palette.set_pen_color(19, 0x80, 0x80, 0x80); /* 3 Flesh */ | |
| 308 | palette.set_pen_color(20, 0x00, 0x00, 0xff); /* 4 Pink */ | |
| 309 | palette.set_pen_color(21, 0xff, 0xff, 0x80); /* 5 Yellow Brown */ | |
| 310 | palette.set_pen_color(22, 0x00, 0x00, 0x00); /* 6 Dark Brown */ | |
| 311 | palette.set_pen_color(23, 0x00, 0xff, 0x00); /* 7 Dark Purple */ | |
| 312 | palette.set_pen_color(24, 0xff, 0x80, 0xff); /* 8 Very Dark Green */ | |
| 313 | palette.set_pen_color(25, 0x00, 0xff, 0xff); /* 9 Yellow Green */ | |
| 314 | palette.set_pen_color(26, 0xff, 0x40, 0x40); /* 10 Grey Blue */ | |
| 315 | palette.set_pen_color(27, 0xff, 0x00, 0x00); /* 11 Sky Blue */ | |
| 316 | palette.set_pen_color(28, 0x00, 0x80, 0x80); /* 12 Very Pale Blue */ | |
| 317 | palette.set_pen_color(29, 0xff, 0x00, 0xff); /* 13 Dark Grey */ | |
| 318 | palette.set_pen_color(30, 0x80, 0xff, 0x80); /* 14 Light Grey */ | |
| 319 | palette.set_pen_color(31, 0xff, 0xff, 0xff); /* 15 White */ | |
| 320 | // Background | |
| 321 | palette.set_pen_color(32, 0x00, 0x00, 0x00); // 0 Black | |
| 322 | palette.set_pen_color(33, 0xff, 0x00, 0x00); // 1 Red | |
| 323 | palette.set_pen_color(34, 0x00, 0x00, 0xff); // 2 Blue | |
| 324 | palette.set_pen_color(35, 0xff, 0x00, 0xff); // 3 Magenta | |
| 325 | palette.set_pen_color(36, 0x00, 0xff, 0x00); // 4 Green | |
| 326 | palette.set_pen_color(37, 0xff, 0xff, 0x00); // 5 Yellow | |
| 327 | palette.set_pen_color(38, 0x00, 0xff, 0xff); // 6 Cyan | |
| 328 | palette.set_pen_color(39, 0xff, 0xff, 0xff); // 7 White | |
| 329 | ||
| 330 | } | |
| 331 | ||
| 265 | 332 | MC6845_UPDATE_ROW( excali64_state::update_row ) |
| 266 | 333 | { |
| 267 | 334 | const rgb_t *palette = m_palette->palette()->entry_list_raw(); |
| 268 | UINT8 chr,gfx; | |
| 335 | UINT8 chr,gfx,col,bg,fg; | |
| 269 | 336 | UINT16 mem,x; |
| 337 | UINT8 col_base = BIT(m_sys_status, 3) ? 16 : 0; | |
| 270 | 338 | UINT32 *p = &bitmap.pix32(y); |
| 271 | 339 | |
| 272 | 340 | for (x = 0; x < x_count; x++) |
| 273 | 341 | { |
| 274 | UINT8 inv=0; | |
| 275 | if (x == cursor_x) inv=0xff; | |
| 276 | mem = (ma + x) & 0xfff; | |
| 342 | mem = (ma + x) & 0x7ff; | |
| 277 | 343 | chr = m_p_videoram[mem]; |
| 278 | gfx = m_p_chargen[(chr<<4) | ra] ^ inv; | |
| 344 | col = m_p_videoram[mem+0x800]; | |
| 345 | fg = col_base + (col >> 4); | |
| 346 | bg = 32 + ((col >> 1) & 7); | |
| 279 | 347 | |
| 348 | if (BIT(col, 0) & BIT(chr, 7)) | |
| 349 | gfx = m_p_videoram[0x800 + (chr<<4) + ra]; // hires definition | |
| 350 | else | |
| 351 | gfx = m_p_chargen[(chr<<4) | ra]; // normal character | |
| 352 | ||
| 353 | gfx ^= ((x == cursor_x) ? 0xff : 0); | |
| 354 | ||
| 280 | 355 | /* Display a scanline of a character */ |
| 281 | *p++ = palette[BIT(gfx, 0)]; | |
| 282 | *p++ = palette[BIT(gfx, 1)]; | |
| 283 | *p++ = palette[BIT(gfx, 2)]; | |
| 284 | *p++ = palette[BIT(gfx, 3)]; | |
| 285 | *p++ = palette[BIT(gfx, 4)]; | |
| 286 | *p++ = palette[BIT(gfx, 5)]; | |
| 287 | *p++ = palette[BIT(gfx, 6)]; | |
| 288 | *p++ = palette[BIT(gfx, 7)]; | |
| 356 | *p++ = palette[BIT(gfx, 0) ? fg : bg]; | |
| 357 | *p++ = palette[BIT(gfx, 1) ? fg : bg]; | |
| 358 | *p++ = palette[BIT(gfx, 2) ? fg : bg]; | |
| 359 | *p++ = palette[BIT(gfx, 3) ? fg : bg]; | |
| 360 | *p++ = palette[BIT(gfx, 4) ? fg : bg]; | |
| 361 | *p++ = palette[BIT(gfx, 5) ? fg : bg]; | |
| 362 | *p++ = palette[BIT(gfx, 6) ? fg : bg]; | |
| 363 | *p++ = palette[BIT(gfx, 7) ? fg : bg]; | |
| 289 | 364 | } |
| 290 | 365 | } |
| 291 | 366 | |
| r242309 | r242310 | |
| 328 | 403 | MCFG_SCREEN_ADD("screen", RASTER) |
| 329 | 404 | MCFG_SCREEN_REFRESH_RATE(50) |
| 330 | 405 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 331 | MCFG_SCREEN_SIZE(80*8, 25*10) | |
| 332 | MCFG_SCREEN_VISIBLE_AREA(0, 80*8-1, 0, 25*10-1) | |
| 406 | MCFG_SCREEN_SIZE(80*8, 24*12) | |
| 407 | MCFG_SCREEN_VISIBLE_AREA(0, 80*8-1, 0, 24*12-1) | |
| 333 | 408 | MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update) |
| 334 | MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") | |
| 409 | MCFG_PALETTE_ADD("palette", 40) | |
| 410 | MCFG_PALETTE_INIT_OWNER(excali64_state, excali64) | |
| 411 | //MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") | |
| 412 | MCFG_GFXDECODE_ADD("gfxdecode", "palette", excali64) | |
| 335 | 413 | MCFG_MC6845_ADD("crtc", MC6845, "screen", XTAL_16MHz / 16) // 1MHz for lowres; 2MHz for highres |
| 336 | 414 | MCFG_MC6845_SHOW_BORDER_AREA(false) |
| 337 | 415 | MCFG_MC6845_CHAR_WIDTH(8) |
| r242309 | r242310 | |
| 346 | 424 | /* ROM definition */ |
| 347 | 425 | ROM_START( excali64 ) |
| 348 | 426 | ROM_REGION(0x10000, "maincpu", 0) |
| 349 | ROM_LOAD( "rom_1.bin", 0x0000, 0x4000, CRC(e129a305) SHA1(e43ec7d040c2b2e548d22fd6bbc7df8b45a26e5a) ) | |
| 350 | ROM_LOAD( "rom_2.bin", 0x2000, 0x2000, CRC(916d9f5a) SHA1(91c527cce963481b7bebf077e955ca89578bb553) ) | |
| 427 | ROM_LOAD( "rom_1.ic17", 0x0000, 0x4000, CRC(e129a305) SHA1(e43ec7d040c2b2e548d22fd6bbc7df8b45a26e5a) ) | |
| 428 | ROM_LOAD( "rom_2.ic24", 0x2000, 0x2000, CRC(916d9f5a) SHA1(91c527cce963481b7bebf077e955ca89578bb553) ) | |
| 429 | // fix a bug that causes screen to be filled with 'p' | |
| 430 | ROM_FILL(0x4ee, 1, 0) | |
| 431 | ROM_FILL(0x4ef, 1, 8) | |
| 432 | ROM_FILL(0x4f6, 1, 0) | |
| 433 | ROM_FILL(0x4f7, 1, 8) | |
| 351 | 434 | |
| 352 | 435 | ROM_REGION(0x2000, "videoram", ROMREGION_ERASE00) |
| 353 | 436 | |
| 354 | 437 | ROM_REGION(0x1000, "chargen", 0) |
| 355 | ROM_LOAD( "genex_3. | |
| 438 | ROM_LOAD( "genex_3.ic43", 0x0000, 0x1000, CRC(b91619a9) SHA1(2ced636cb7b94ba9d329868d7ecf79963cefe9d9) ) | |
| 356 | 439 | ROM_END |
| 357 | 440 | |
| 358 | 441 | /* Driver */ |
| 359 | 442 | |
| 360 | 443 | /* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ |
| 361 | COMP( 1984, excali64, 0, 0, excali64, excali64, excali64_state, excali64, "BGR Computers", "Excalibur 64", GAME_ | |
| 444 | COMP( 1984, excali64, 0, 0, excali64, excali64, excali64_state, excali64, "BGR Computers", "Excalibur 64", GAME_NOT_WORKING ) |
| https://github.com/mamedev/mame/commit/ef29a7d84961910e69716891db2babb3b0a414d6 |
| Previous | 199869 Revisions | Next |