trunk/src/mess/drivers/excali64.c
| r242321 | r242322 | |
| 16 | 16 | determine the correct positions. |
| 17 | 17 | - The position of the "Line Insert" key is unknown. |
| 18 | 18 | - PCGEN command not working. |
| 19 | | - Colours are wrong (colour prom needs to be dumped) |
| 19 | - Colours are approximate. |
| 20 | 20 | - Disk controller |
| 21 | 21 | - Banking |
| 22 | 22 | - The schematic shows the audio counter connected to 2MHz, but this produces |
| r242321 | r242322 | |
| 25 | 25 | - Parallel / Centronics |
| 26 | 26 | - Need software |
| 27 | 27 | - Pasting can drop a character or two at the start of a line. |
| 28 | | - Clock change for crtc |
| 29 | 28 | |
| 30 | 29 | ****************************************************************************/ |
| 31 | 30 | |
| r242321 | r242322 | |
| 55 | 54 | , m_io_keyboard(*this, "KEY") |
| 56 | 55 | { } |
| 57 | 56 | |
| 58 | | DECLARE_DRIVER_INIT(excali64); |
| 59 | 57 | DECLARE_PALETTE_INIT(excali64); |
| 60 | 58 | DECLARE_WRITE8_MEMBER(ppib_w); |
| 61 | 59 | DECLARE_READ8_MEMBER(ppic_r); |
| r242321 | r242322 | |
| 222 | 220 | { |
| 223 | 221 | UINT8 data = m_sys_status & 7; |
| 224 | 222 | data |= (UINT8)m_crtc_vs << 4; |
| 225 | | data |= (UINT8)m_crtc_de << 5; |
| 223 | data |= (UINT8)m_crtc_de << 3; |
| 226 | 224 | return data; |
| 227 | 225 | } |
| 228 | 226 | |
| r242321 | r242322 | |
| 233 | 231 | |
| 234 | 232 | /* |
| 235 | 233 | d0,1,2 : same as port50 |
| 236 | | d3 : 2nd colour set |
| 234 | d7 : 2nd colour set |
| 237 | 235 | */ |
| 238 | 236 | WRITE8_MEMBER( excali64_state::port70_w ) |
| 239 | 237 | { |
| r242321 | r242322 | |
| 256 | 254 | m_crtc_vs = state; |
| 257 | 255 | } |
| 258 | 256 | |
| 259 | | DRIVER_INIT_MEMBER( excali64_state, excali64 ) |
| 260 | | { |
| 261 | | m_p_chargen = memregion("chargen")->base(); |
| 262 | | m_p_videoram = memregion("videoram")->base(); |
| 263 | | } |
| 264 | | |
| 265 | 257 | /* F4 Character Displayer */ |
| 266 | 258 | static const gfx_layout excali64_charlayout = |
| 267 | 259 | { |
| r242321 | r242322 | |
| 280 | 272 | GFXDECODE_ENTRY( "chargen", 0x0000, excali64_charlayout, 0, 1 ) |
| 281 | 273 | GFXDECODE_END |
| 282 | 274 | |
| 283 | | // The colour names in the comments are what's needed, the current rgb values are mostly wrong |
| 275 | // The prom, the schematic, and the manual all contradict each other, |
| 276 | // so the colours can only be described as wild guesses. Further, the 38 |
| 277 | // colour-load resistors are missing labels and values. |
| 284 | 278 | PALETTE_INIT_MEMBER( excali64_state, excali64 ) |
| 285 | 279 | { |
| 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 */ |
| 280 | // do this here because driver_init hasn't run yet |
| 281 | m_p_videoram = memregion("videoram")->base(); |
| 282 | m_p_chargen = memregion("chargen")->base(); |
| 283 | |
| 284 | UINT8 r,g,b,i,code; |
| 285 | for (i = 0; i < 32; i++) |
| 286 | { |
| 287 | code = m_p_chargen[0x1000+i]; |
| 288 | r = (BIT(code, 0) ? 38 : 0) + (BIT(code, 1) ? 73 : 0) + (BIT(code, 2) ? 144 : 0); |
| 289 | b = (BIT(code, 3) ? 38 : 0) + (BIT(code, 4) ? 73 : 0) + (BIT(code, 5) ? 144 : 0); |
| 290 | g = (BIT(code, 6) ? 85 : 0) + (BIT(code, 7) ? 170 : 0); |
| 291 | palette.set_pen_color(i, r, g, b); |
| 292 | } |
| 293 | |
| 294 | |
| 320 | 295 | // Background |
| 321 | 296 | palette.set_pen_color(32, 0x00, 0x00, 0x00); // 0 Black |
| 322 | 297 | palette.set_pen_color(33, 0xff, 0x00, 0x00); // 1 Red |
| r242321 | r242322 | |
| 334 | 309 | const rgb_t *palette = m_palette->palette()->entry_list_raw(); |
| 335 | 310 | UINT8 chr,gfx,col,bg,fg; |
| 336 | 311 | UINT16 mem,x; |
| 337 | | UINT8 col_base = BIT(m_sys_status, 3) ? 16 : 0; |
| 312 | UINT8 col_base = BIT(m_sys_status, 7) ? 16 : 0; |
| 338 | 313 | UINT32 *p = &bitmap.pix32(y); |
| 339 | 314 | |
| 340 | 315 | for (x = 0; x < x_count; x++) |
| r242321 | r242322 | |
| 350 | 325 | else |
| 351 | 326 | gfx = m_p_chargen[(chr<<4) | ra]; // normal character |
| 352 | 327 | |
| 353 | | gfx ^= ((x == cursor_x) ? 0xff : 0); |
| 328 | gfx ^= (x == cursor_x) ? 0xff : 0; |
| 354 | 329 | |
| 355 | 330 | /* Display a scanline of a character */ |
| 356 | 331 | *p++ = palette[BIT(gfx, 0) ? fg : bg]; |
| r242321 | r242322 | |
| 434 | 409 | |
| 435 | 410 | ROM_REGION(0x2000, "videoram", ROMREGION_ERASE00) |
| 436 | 411 | |
| 437 | | ROM_REGION(0x1000, "chargen", 0) |
| 412 | ROM_REGION(0x1020, "chargen", 0) |
| 438 | 413 | ROM_LOAD( "genex_3.ic43", 0x0000, 0x1000, CRC(b91619a9) SHA1(2ced636cb7b94ba9d329868d7ecf79963cefe9d9) ) |
| 414 | ROM_LOAD( "hm7603.ic55", 0x1000, 0x0020, CRC(c74f47dc) SHA1(331ff3c913846191ddd97cacb80bd19438c1ff71) ) |
| 439 | 415 | ROM_END |
| 440 | 416 | |
| 441 | 417 | /* Driver */ |
| 442 | 418 | |
| 443 | | /* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ |
| 444 | | COMP( 1984, excali64, 0, 0, excali64, excali64, excali64_state, excali64, "BGR Computers", "Excalibur 64", GAME_NOT_WORKING ) |
| 419 | /* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ |
| 420 | COMP( 1984, excali64, 0, 0, excali64, excali64, driver_device, 0, "BGR Computers", "Excalibur 64", GAME_NOT_WORKING ) |