src/mess/drivers/pc8801.c
| r15887 | r15888 | |
| 44 | 44 | - Fire Hawk: tries to r/w the opn ports (probably crashed due to floppy?) |
| 45 | 45 | - Grobda: palette is ugly (parent pc8801 only); |
| 46 | 46 | - Music Collection Vol. 2 - Final Fantasy Tokushuu: sound irq dies pretty soon |
| 47 | | - N88 Basic Nihongo (app): background is currently purple for whatever reason; |
| 48 | 47 | - Wanderers from Ys: user data disk looks screwed? It loads with everything as maximum as per now ... |
| 49 | 48 | - Xevious: game is too fast (parent pc8801 only) |
| 50 | 49 | |
| r15887 | r15888 | |
| 89 | 88 | - Dungeon Buster |
| 90 | 89 | - El Dorado Denki |
| 91 | 90 | - Elevator Action |
| 92 | | (Elthlead) |
| 91 | - Emerald Densetsu |
| 92 | - Emerald Dragon (it seems to miss a timer) |
| 93 | - Emmy |
| 94 | (Exective he no Michi) |
| 95 | |
| 93 | 96 | - Harakiri |
| 94 | 97 | - Kaseijin (app) (code snippet is empty at some point) |
| 95 | 98 | - MakaiMura (attempts to r/w the sio ports, but it's clearly crashed) |
| r15887 | r15888 | |
| 451 | 454 | |
| 452 | 455 | count = 0; |
| 453 | 456 | |
| 454 | | y_double = ((lines_per_char & 0x10) >> 4); // TODO: true condition of this? |
| 457 | y_double = (state->m_gfx_ctrl & 0x20) >> 5; // TODO: true condition of this? |
| 455 | 458 | y_size = (y_double+1) * 200; |
| 456 | 459 | |
| 457 | 460 | for(y=0;y<y_size;y+=(y_double+1)) |
| r15887 | r15888 | |
| 495 | 498 | int x,y,xi; |
| 496 | 499 | UINT32 count; |
| 497 | 500 | UINT8 *gvram = state->memregion("gvram")->base(); |
| 501 | UINT8 color; |
| 498 | 502 | |
| 499 | 503 | count = 0; |
| 504 | color = (state->m_gfx_ctrl & 1) ? 7 & ((state->m_layer_mask ^ 0xe) >> 1) : 7; |
| 500 | 505 | |
| 501 | 506 | for(y=0;y<200;y++) |
| 502 | 507 | { |
| r15887 | r15888 | |
| 508 | 513 | |
| 509 | 514 | pen = ((gvram[count+0x0000] >> (7-xi)) & 1) << 0; |
| 510 | 515 | |
| 511 | | if(state->m_gfx_ctrl & 1) |
| 516 | if(state->m_gfx_ctrl & 0x20) // pixel clock select |
| 512 | 517 | { |
| 513 | 518 | if(cliprect.contains(x+xi, y*2+0)) |
| 514 | | bitmap.pix16(y*2+0, x+xi) = machine.pens[pen ? 7 & ((state->m_layer_mask ^ 0xe) >> 1) : 0]; |
| 519 | bitmap.pix16(y*2+0, x+xi) = machine.pens[pen ? color : 0]; |
| 515 | 520 | |
| 516 | 521 | if(cliprect.contains(x+xi, y*2+1)) |
| 517 | | bitmap.pix16(y*2+1, x+xi) = machine.pens[pen ? 7 & ((state->m_layer_mask ^ 0xe) >> 1) : 0]; |
| 522 | bitmap.pix16(y*2+1, x+xi) = machine.pens[pen ? color : 0]; |
| 518 | 523 | } |
| 519 | 524 | else |
| 520 | 525 | { |
| 521 | 526 | if(cliprect.contains(x+xi, y)) |
| 522 | | bitmap.pix16(y, x+xi) = machine.pens[pen ? 7 & ((state->m_layer_mask ^ 0xe) >> 1) : 0]; |
| 527 | bitmap.pix16(y, x+xi) = machine.pens[pen ? color : 0]; |
| 523 | 528 | } |
| 524 | 529 | } |
| 525 | 530 | |
| r15887 | r15888 | |
| 542 | 547 | pen = ((gvram[count+0x4000] >> (7-xi)) & 1) << 0; |
| 543 | 548 | |
| 544 | 549 | if(cliprect.contains(x+xi, y)) |
| 545 | | bitmap.pix16(y, x+xi) = machine.pens[pen ? 7 & ((state->m_layer_mask ^ 0xe) >> 1) : 0]; |
| 550 | bitmap.pix16(y, x+xi) = machine.pens[pen ? 7 : 0]; |
| 546 | 551 | } |
| 547 | 552 | |
| 548 | 553 | count++; |
| r15887 | r15888 | |
| 629 | 634 | UINT8 y_step; |
| 630 | 635 | |
| 631 | 636 | y_height = lines_per_char; |
| 632 | | y_double = (lines_per_char & 0x10) >> 4; // TODO: find correct condition |
| 633 | | y_step = (non_special) ? 80 : 120; // Elthlead uses this |
| 637 | y_double = (state->m_gfx_ctrl & 0x20) >> 5; |
| 638 | y_step = (non_special) ? 80 : 120; // trusted by Elthlead |
| 634 | 639 | |
| 635 | 640 | for(yi=0;yi<y_height;yi++) |
| 636 | 641 | { |
| r15887 | r15888 | |
| 793 | 798 | |
| 794 | 799 | if(!(state->m_layer_mask & 1) && state->m_dmac_mode & 4 && state->m_crtc.status & 0x10 && state->m_crtc.irq_mask == 3) |
| 795 | 800 | { |
| 796 | | int y_size; |
| 797 | | |
| 798 | 801 | //popmessage("%02x %02x",state->m_crtc.param[0][0],state->m_crtc.param[0][4]); |
| 799 | 802 | |
| 800 | | /* TODO: left-over, to be removed */ |
| 801 | | y_size = (state->m_crtc.param[0][1] & 0x3f) + 1; |
| 802 | | |
| 803 | | if(y_size < 20) y_size = 20; |
| 804 | | if(y_size > 25) y_size = 25; |
| 805 | | |
| 806 | | draw_text(screen.machine(),bitmap,y_size,state->m_txt_width); |
| 803 | draw_text(screen.machine(),bitmap,screen_height,state->m_txt_width); |
| 807 | 804 | } |
| 808 | 805 | |
| 809 | 806 | return 0; |
| r15887 | r15888 | |
| 1198 | 1195 | // popmessage("H %d V %d (%d x %d) HR %d VR %d (%d %d)\n",xvis,yvis,screen_height,lines_per_char,hretrace,vretrace, xsize,ysize); |
| 1199 | 1196 | |
| 1200 | 1197 | visarea.set(0, xvis - 1, 0, yvis - 1); |
| 1201 | | if(ysize >= 400) /* TODO: correct bit for this (m_gfx_ctrl & 1?) */ |
| 1198 | if(state->m_gfx_ctrl & 0x20) /* TODO: correct bit for this (m_gfx_ctrl & 1?) */ |
| 1202 | 1199 | refresh = HZ_TO_ATTOSECONDS(PIXEL_CLOCK_24KHz) * (xsize) * ysize; |
| 1203 | 1200 | else |
| 1204 | 1201 | refresh = HZ_TO_ATTOSECONDS(PIXEL_CLOCK_15KHz) * (xsize) * ysize; |
| r15887 | r15888 | |
| 1209 | 1206 | WRITE8_MEMBER(pc8801_state::pc8801_gfx_ctrl_w) |
| 1210 | 1207 | { |
| 1211 | 1208 | /* |
| 1212 | | --x- ---- VRAM y 25 (1) / 20 (0) |
| 1209 | --x- ---- Pixel clock select? |
| 1213 | 1210 | ---x ---- graphic color yes (1) / no (0) |
| 1214 | 1211 | ---- x--- graphic display yes (1) / no (0) |
| 1215 | 1212 | ---- -x-- Basic N (1) / N88 (0) |
| 1216 | 1213 | ---- --x- RAM select yes (1) / no (0) |
| 1217 | | ---- ---x VRAM 200 lines (1) / 400 lines (0), 15 KHz / 24 KHz |
| 1214 | ---- ---x VRAM 200 lines (1) / 400 lines (0) in 1bpp mode |
| 1218 | 1215 | */ |
| 1219 | 1216 | |
| 1220 | 1217 | m_gfx_ctrl = data; |