Previous 15994 Revisions Next

r15887 Monday 13th August, 2012 at 22:18:52 UTC by Angelo Salese
Fixed non-special mode tilemap, fixed Elthlead
[src/mess/drivers]pc8801.c

src/mess/drivers/pc8801.c
r15886r15887
1717    - waitstates;
1818    - dipswitches needs to be controlled;
1919    - 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
2121      with inverted color output).
2222   - clean-ups, banking and video in particular (i.e. hook-ups with memory region should go away and device models should be used instead)
2323   - OPNA needs dumping of YM2608 deltat ROM
r15886r15887
4444    - Fire Hawk: tries to r/w the opn ports (probably crashed due to floppy?)
4545    - Grobda: palette is ugly (parent pc8801 only);
4646   - Music Collection Vol. 2 - Final Fantasy Tokushuu: sound irq dies pretty soon
47   - N88 Basic Nihongo (app): background is currently purple for whatever reason;
4748    - Wanderers from Ys: user data disk looks screwed? It loads with everything as maximum as per now ...
4849    - Xevious: game is too fast (parent pc8801 only)
4950
50    list of games that crashes due of floppy issues:
51    list of games/apps that crashes due of floppy issues:
5152    - Agni no Ishi
5253    - Amazoness no Hihou (takes invalid data from floppy)
5354    - American Truck / American Truck SR (polls read deleted data command)
r15886r15887
8687    - 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)
8788   - Dragon Slayer - The Legend of Heroes 2
8889   - Dungeon Buster
90   - El Dorado Denki
91   - Elevator Action
92   (Elthlead)
8993    - Harakiri
9094    - Kaseijin (app) (code snippet is empty at some point)
9195    - MakaiMura (attempts to r/w the sio ports, but it's clearly crashed)
9296    - Mr. Pro Yakyuu
97    - PC-8034 (app)
98    - PC-8037SR (app)
9399    - P1 (app)
94100    - Pattern Editor 88 (app)
95    - Super Shunbo II (Load error)
101    - Super Shunbo II (app) (Load error)
102    - Super TII (app)
96103    - The Return of Ishtar
97104    - Tobira wo Akete (random crashes in parent pc8801 only)
98105
r15886r15887
572579
573580
574581
575static UINT8 extract_text_attribute(running_machine &machine,UINT32 address,int x, UINT8 width)
582static UINT8 extract_text_attribute(running_machine &machine,UINT32 address,int x, UINT8 width, UINT8 &non_special)
576583{
577584   pc8801_state *state = machine.driver_data<pc8801_state>();
578585   UINT8 *vram = state->memregion("wram")->base();
r15886r15887
580587   int fifo_size;
581588   int offset;
582589
590   non_special = 0;
583591   if(state->m_crtc.param[0][4] & 0x80)
584592   {
585593      popmessage("Using non-separate mode for text tilemap, contact MESSdev");
r15886r15887
590598
591599   if(fifo_size == 0)
592600   {
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;
595603   }
596604
597605   /* TODO: correct or hack-ish? Certainly having 0 as a attribute X is weird in any case. */
r15886r15887
610618   return vram[address-3+offset];
611619}
612620
613static 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)
621static 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)
614622{
615623   pc8801_state *state = machine.driver_data<pc8801_state>();
616624   int xi,yi;
r15886r15887
618626   UINT8 *gfx_rom = machine.root_device().memregion("gfx1")->base();
619627   UINT8 is_cursor;
620628   UINT8 y_height, y_double;
629   UINT8 y_step;
621630
622631   y_height = lines_per_char;
623632   y_double = (lines_per_char & 0x10) >> 4; // TODO: find correct condition
633   y_step = (non_special) ? 80 : 120; // Elthlead uses this
624634
625635   for(yi=0;yi<y_height;yi++)
626636   {
r15886r15887
633643         int color;
634644
635645         {
636            tile = vram[x+(y*120)+state->m_dma_address[2]];
646            tile = vram[x+(y*y_step)+state->m_dma_address[2]];
637647
638648            res_x = x*8+xi*(width+1);
639649            res_y = y*y_height*(height+1)+yi*(height+1);
r15886r15887
720730   UINT8 lower;
721731   UINT8 blink;
722732   int pal;
733   UINT8 non_special;
723734
724735   for(y=0;y<y_size;y++)
725736   {
r15886r15887
728739         if(x & 1 && !width)
729740            continue;
730741
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);
732743
733744         if(text_color_flag && (attr & 8)) // color mode
734745         {
r15886r15887
754765            reverse ^= state->m_crtc.inverse;
755766
756767            if(attr & 0x80)
757            {
758768               popmessage("Warning: mono gfx mode enabled, contact MESSdev");
759            }
769
760770         }
761771
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);
763773      }
764774   }
765775}
r15886r15887
11851195   xsize = screen_width + hretrace;
11861196   ysize = screen_height * lines_per_char + vretrace * lines_per_char;
11871197
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);
11891199
11901200   visarea.set(0, xvis - 1, 0, yvis - 1);
11911201   if(ysize >= 400) /* TODO: correct bit for this (m_gfx_ctrl & 1?) */

Previous 15994 Revisions Next


© 1998-2018 The MESS Team