src/mess/drivers/pc8801.c
| r15886 | r15887 | |
| 17 | 17 | - waitstates; |
| 18 | 18 | - dipswitches needs to be controlled; |
| 19 | 19 | - below notes states that plain PC-8801 doesn't have a disk CPU, but the BIOS clearly checks the floppy ports. Wrong info? |
| 20 | | - PC-8801MC disk shows that bitmap and text colors mixes with additive blending (basically if the tv charset has white then the bitmap draws |
| 20 | - Basic Nihongo disks shows that bitmap and text colors mixes with additive blending (basically if the tv charset has white then the bitmap draws |
| 21 | 21 | with inverted color output). |
| 22 | 22 | - clean-ups, banking and video in particular (i.e. hook-ups with memory region should go away and device models should be used instead) |
| 23 | 23 | - OPNA needs dumping of YM2608 deltat ROM |
| r15886 | r15887 | |
| 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; |
| 47 | 48 | - Wanderers from Ys: user data disk looks screwed? It loads with everything as maximum as per now ... |
| 48 | 49 | - Xevious: game is too fast (parent pc8801 only) |
| 49 | 50 | |
| 50 | | list of games that crashes due of floppy issues: |
| 51 | list of games/apps that crashes due of floppy issues: |
| 51 | 52 | - Agni no Ishi |
| 52 | 53 | - Amazoness no Hihou (takes invalid data from floppy) |
| 53 | 54 | - American Truck / American Truck SR (polls read deleted data command) |
| r15886 | r15887 | |
| 86 | 87 | - Door Door MK-2 (sets up TC in the middle of execution phase read then wants status bit 6 to be low PC=0x7050 of fdc cpu) |
| 87 | 88 | - Dragon Slayer - The Legend of Heroes 2 |
| 88 | 89 | - Dungeon Buster |
| 90 | - El Dorado Denki |
| 91 | - Elevator Action |
| 92 | (Elthlead) |
| 89 | 93 | - Harakiri |
| 90 | 94 | - Kaseijin (app) (code snippet is empty at some point) |
| 91 | 95 | - MakaiMura (attempts to r/w the sio ports, but it's clearly crashed) |
| 92 | 96 | - Mr. Pro Yakyuu |
| 97 | - PC-8034 (app) |
| 98 | - PC-8037SR (app) |
| 93 | 99 | - P1 (app) |
| 94 | 100 | - Pattern Editor 88 (app) |
| 95 | | - Super Shunbo II (Load error) |
| 101 | - Super Shunbo II (app) (Load error) |
| 102 | - Super TII (app) |
| 96 | 103 | - The Return of Ishtar |
| 97 | 104 | - Tobira wo Akete (random crashes in parent pc8801 only) |
| 98 | 105 | |
| r15886 | r15887 | |
| 572 | 579 | |
| 573 | 580 | |
| 574 | 581 | |
| 575 | | static UINT8 extract_text_attribute(running_machine &machine,UINT32 address,int x, UINT8 width) |
| 582 | static UINT8 extract_text_attribute(running_machine &machine,UINT32 address,int x, UINT8 width, UINT8 &non_special) |
| 576 | 583 | { |
| 577 | 584 | pc8801_state *state = machine.driver_data<pc8801_state>(); |
| 578 | 585 | UINT8 *vram = state->memregion("wram")->base(); |
| r15886 | r15887 | |
| 580 | 587 | int fifo_size; |
| 581 | 588 | int offset; |
| 582 | 589 | |
| 590 | non_special = 0; |
| 583 | 591 | if(state->m_crtc.param[0][4] & 0x80) |
| 584 | 592 | { |
| 585 | 593 | popmessage("Using non-separate mode for text tilemap, contact MESSdev"); |
| r15886 | r15887 | |
| 590 | 598 | |
| 591 | 599 | if(fifo_size == 0) |
| 592 | 600 | { |
| 593 | | popmessage("Using non-special mode for text tilemap, contact MESSdev"); |
| 594 | | return 0xe8; |
| 601 | non_special = 1; |
| 602 | return (text_color_flag) ? 0xe8 : 0; |
| 595 | 603 | } |
| 596 | 604 | |
| 597 | 605 | /* TODO: correct or hack-ish? Certainly having 0 as a attribute X is weird in any case. */ |
| r15886 | r15887 | |
| 610 | 618 | return vram[address-3+offset]; |
| 611 | 619 | } |
| 612 | 620 | |
| 613 | | static void pc8801_draw_char(running_machine &machine,bitmap_ind16 &bitmap,int x,int y,int pal,UINT8 gfx_mode,UINT8 reverse,UINT8 secret,UINT8 blink,UINT8 upper,UINT8 lower,int y_size,int height,int width) |
| 621 | static void pc8801_draw_char(running_machine &machine,bitmap_ind16 &bitmap,int x,int y,int pal,UINT8 gfx_mode,UINT8 reverse,UINT8 secret,UINT8 blink,UINT8 upper,UINT8 lower,int y_size,int height,int width, UINT8 non_special) |
| 614 | 622 | { |
| 615 | 623 | pc8801_state *state = machine.driver_data<pc8801_state>(); |
| 616 | 624 | int xi,yi; |
| r15886 | r15887 | |
| 618 | 626 | UINT8 *gfx_rom = machine.root_device().memregion("gfx1")->base(); |
| 619 | 627 | UINT8 is_cursor; |
| 620 | 628 | UINT8 y_height, y_double; |
| 629 | UINT8 y_step; |
| 621 | 630 | |
| 622 | 631 | y_height = lines_per_char; |
| 623 | 632 | y_double = (lines_per_char & 0x10) >> 4; // TODO: find correct condition |
| 633 | y_step = (non_special) ? 80 : 120; // Elthlead uses this |
| 624 | 634 | |
| 625 | 635 | for(yi=0;yi<y_height;yi++) |
| 626 | 636 | { |
| r15886 | r15887 | |
| 633 | 643 | int color; |
| 634 | 644 | |
| 635 | 645 | { |
| 636 | | tile = vram[x+(y*120)+state->m_dma_address[2]]; |
| 646 | tile = vram[x+(y*y_step)+state->m_dma_address[2]]; |
| 637 | 647 | |
| 638 | 648 | res_x = x*8+xi*(width+1); |
| 639 | 649 | res_y = y*y_height*(height+1)+yi*(height+1); |
| r15886 | r15887 | |
| 720 | 730 | UINT8 lower; |
| 721 | 731 | UINT8 blink; |
| 722 | 732 | int pal; |
| 733 | UINT8 non_special; |
| 723 | 734 | |
| 724 | 735 | for(y=0;y<y_size;y++) |
| 725 | 736 | { |
| r15886 | r15887 | |
| 728 | 739 | if(x & 1 && !width) |
| 729 | 740 | continue; |
| 730 | 741 | |
| 731 | | attr = extract_text_attribute(machine,(((y*120)+80+state->m_dma_address[2]) & 0xffff),(x),width); |
| 742 | attr = extract_text_attribute(machine,(((y*120)+80+state->m_dma_address[2]) & 0xffff),(x),width,non_special); |
| 732 | 743 | |
| 733 | 744 | if(text_color_flag && (attr & 8)) // color mode |
| 734 | 745 | { |
| r15886 | r15887 | |
| 754 | 765 | reverse ^= state->m_crtc.inverse; |
| 755 | 766 | |
| 756 | 767 | if(attr & 0x80) |
| 757 | | { |
| 758 | 768 | popmessage("Warning: mono gfx mode enabled, contact MESSdev"); |
| 759 | | } |
| 769 | |
| 760 | 770 | } |
| 761 | 771 | |
| 762 | | pc8801_draw_char(machine,bitmap,x,y,pal,gfx_mode,reverse,secret,blink,upper,lower,y_size,monitor_24KHz,!width); |
| 772 | pc8801_draw_char(machine,bitmap,x,y,pal,gfx_mode,reverse,secret,blink,upper,lower,y_size,monitor_24KHz,!width,non_special); |
| 763 | 773 | } |
| 764 | 774 | } |
| 765 | 775 | } |
| r15886 | r15887 | |
| 1185 | 1195 | xsize = screen_width + hretrace; |
| 1186 | 1196 | ysize = screen_height * lines_per_char + vretrace * lines_per_char; |
| 1187 | 1197 | |
| 1188 | | 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); |
| 1198 | // 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); |
| 1189 | 1199 | |
| 1190 | 1200 | visarea.set(0, xvis - 1, 0, yvis - 1); |
| 1191 | 1201 | if(ysize >= 400) /* TODO: correct bit for this (m_gfx_ctrl & 1?) */ |