Previous 199869 Revisions Next

r19480 Wednesday 12th December, 2012 at 03:31:01 UTC by Angelo Salese
Various fixes
[src/mess/drivers]pc9801.c

trunk/src/mess/drivers/pc9801.c
r19479r19480
4747   List of per-game TODO:
4848   - 4D Boxing: inputs are unresponsive
4949   - A Ressha de Ikou 2: missing text (PC-9801RS only);
50   - Absolutely Mahjong: Kanji data doesn't appear at the Epson logo. Transitions are too fast.
51   - Agumix Selects!: needs GDC = 5 MHz, interlace doesn't apply there;
50   - Absolutely Mahjong: Transitions are too fast.
51   - Agumix Selects!: needs GDC = 5 MHz, interlace doesn't work properly;
52   - Aki no Tsukasa no Fushigi no Kabe: moans with a kanji error
53      "can't use (this) on a vanilla PC-9801, a PC-9801E nor a PC-9801U. Please turn off the computer and turn it on again."
54      display of this kanji error is wrong on PC-9801RS;
55   - Alice no Yakata: wants a "DSW 1-8" on.
56   - Animahjong V3: accesses port 0x88, tile selection pointer has a gfx clearance bug;
57   - Anniversary - Memories of Summer: thinks that a button is pressed, has window masking bugs during intro;
58   - Another Genesis: fails loading;
59
5260   - Brandish 2: Intro needs some window masking effects;
5361   - Dragon Buster: missing bitplanes for the PCG (or not?), slight issue with window masking;
5462   - Far Side Moon: doesn't detect sound board (tied to 0x00ec ports)
r19479r19480
5967   - Quarth: uploads a PCG charset
6068   - Runner's High: wrong double height on the title screen;
6169   - Uchiyama Aki no Chou Bangai: keyboard irq is fussy (sometimes it doesn't register a key press);
70   - Uno: uses EGC
6271
6372========================================================================================
6473
r19479r19480
351360
352361   /* PC9801RS specific */
353362   UINT8 m_gate_a20; //A20 line
363   UINT8 m_nmi_enable;
354364   UINT8 m_access_ctrl; // DMA related
355365   UINT8 m_rom_bank;
356366   UINT8 m_fdc_ctrl;
r19479r19480
458468   DECLARE_WRITE8_MEMBER(opn_portb_w);
459469   DECLARE_READ8_MEMBER(pc9801_ext_opna_r);
460470   DECLARE_WRITE8_MEMBER(pc9801_ext_opna_w);
471   DECLARE_WRITE8_MEMBER(pc9801rs_nmi_w);
472   DECLARE_READ8_MEMBER(pc9801rs_midi_r);
461473
462474   DECLARE_READ8_MEMBER(sdip_0_r);
463475   DECLARE_READ8_MEMBER(sdip_1_r);
r19479r19480
688700   {
689701      UINT8 tile_data,secret,reverse,u_line,v_line;
690702      UINT8 color;
691      UINT8 attr,pen;
703      UINT8 attr;
704      int pen;
692705      UINT32 tile_addr;
693706      UINT8 knj_tile;
694707      UINT8 gfx_mode;
r19479r19480
772785               tile_data^=0xff;
773786
774787            if(yi >= char_size)
775               pen = 0;
788               pen = -1;
776789            else
777               pen = (tile_data >> (7-xi) & 1) ? color : 0;
790               pen = (tile_data >> (7-xi) & 1) ? color : -1;
778791
779            if(pen)
792            if(pen != -1)
780793               bitmap.pix32(res_y, res_x) = palette[pen];
781794
782795            if(state->m_video_ff[WIDTH40_REG])
r19479r19480
784797               if(!device->machine().primary_screen->visible_area().contains(res_x+1, res_y))
785798                  continue;
786799
787               bitmap.pix32(res_y, res_x+1) = palette[pen];
800               if(pen != -1)
801                  bitmap.pix32(res_y, res_x+1) = palette[pen];
788802            }
789803         }
790804      }
r19479r19480
16951709{
16961710
16971711   if(offset == 0x02)
1698      return (m_gate_a20 ^ 1) | 0x2e;
1712      return (m_gate_a20 ^ 1) | 0xfe;
16991713   else if(offset == 0x06)
1700      return (m_gate_a20 ^ 1) | 0x5e;
1714      return (m_gate_a20 ^ 1) | (m_nmi_enable << 1);
17011715
17021716   return 0x00;
17031717}
r19479r19480
19281942            "<unknown>"         // 3
19291943         };
19301944
1931         printf("Write to extend video FF register %s -> %02x\n",ex_video_ff_regnames[(data & 0x06) >> 1],data & 1);
1945         printf("Write to extended video FF register %s -> %02x\n",ex_video_ff_regnames[(data & 0x06) >> 1],data & 1);
19321946      }
19331947      //else
1934      //   printf("Write to extend video FF register %02x\n",data);
1948      //   printf("Write to extended video FF register %02x\n",data);
19351949
19361950      return;
19371951   }
r19479r19480
19411955
19421956WRITE8_MEMBER(pc9801_state::pc9801rs_a0_w)
19431957{
1944
19451958   if((offset & 1) == 0 && offset & 8 && m_ex_video_ff[ANALOG_16_MODE])
19461959   {
19471960      switch(offset)
r19479r19480
19882001
19892002READ8_MEMBER( pc9801_state::pc9801_ext_opna_r )
19902003{
1991   printf("OPNA EXT read ID [%02x]\n",offset);
1992   return 0;
2004   if(offset == 0)
2005   {
2006      printf("OPNA EXT read ID [%02x]\n",offset);
2007      return 0xff;
2008   }
2009
2010   printf("OPNA EXT read unk [%02x]\n",offset);
2011   return 0xff;
19932012}
19942013
19952014WRITE8_MEMBER( pc9801_state::pc9801_ext_opna_w )
19962015{
1997   printf("OPNA EXT write mask %02x -> [%02x]\n",data,offset);
2016   if(offset == 0)
2017   {
2018      printf("OPNA EXT write mask %02x -> [%02x]\n",data,offset);
2019      return;
2020   }
2021
2022   printf("OPNA EXT write unk %02x -> [%02x]\n",data,offset);
19982023}
19992024
20002025
2026WRITE8_MEMBER( pc9801_state::pc9801rs_nmi_w )
2027{
2028   if(offset == 0)
2029      m_nmi_enable = 0;
2030
2031   if(offset == 2)
2032      m_nmi_enable = 1;
2033}
2034
2035READ8_MEMBER( pc9801_state::pc9801rs_midi_r )
2036{
2037   /* unconnect, needed by Amaranth KH to boot */
2038   return 0xff;
2039}
2040
20012041static ADDRESS_MAP_START( pc9801rs_map, AS_PROGRAM, 32, pc9801_state )
20022042   AM_RANGE(0x00000000, 0xffffffff) AM_READWRITE8(pc9801rs_memory_r,pc9801rs_memory_w,0xffffffff)
20032043ADDRESS_MAP_END
r19479r19480
20072047   AM_RANGE(0x0020, 0x0027) AM_READWRITE8(pc9801_20_r,        pc9801_20_w,        0xffffffff) // RTC / DMA registers (LS244)
20082048   AM_RANGE(0x0030, 0x0037) AM_READWRITE8(pc9801rs_30_r,      pc9801_30_w,        0xffffffff) //i8251 RS232c / i8255 system port
20092049   AM_RANGE(0x0040, 0x0047) AM_READWRITE8(pc9801_40_r,        pc9801_40_w,        0xffffffff) //i8255 printer port / i8251 keyboard
2050   AM_RANGE(0x0050, 0x0053) AM_WRITE8(pc9801rs_nmi_w, 0xffffffff)
20102051   AM_RANGE(0x005c, 0x005f) AM_WRITENOP // time-stamp?
20112052   AM_RANGE(0x0060, 0x0063) AM_READWRITE8(pc9801_60_r,        pc9801_60_w,        0xffffffff) //upd7220 character ports / <undefined>
20122053   AM_RANGE(0x0064, 0x0067) AM_WRITE8(pc9801_vrtc_mask_w, 0xffffffff)
r19479r19480
20252066   AM_RANGE(0x7fd8, 0x7fdf) AM_READWRITE8(pc9801_mouse_r,     pc9801_mouse_w,     0xffffffff) // <undefined> / mouse ppi8255 ports
20262067   AM_RANGE(0xa460, 0xa463) AM_READWRITE8(pc9801_ext_opna_r,  pc9801_ext_opna_w,  0xffffffff)
20272068   AM_RANGE(0xbfd8, 0xbfdf) AM_WRITE8(pc9801rs_mouse_freq_w, 0xffffffff)
2069   AM_RANGE(0xe0d0, 0xe0d3) AM_READ8(pc9801rs_midi_r, 0xffffffff)
20282070ADDRESS_MAP_END
20292071
20302072READ8_MEMBER(pc9801_state::pc980ux_memory_r)
r19479r19480
23702412   AM_RANGE(0x0020, 0x0027) AM_READWRITE8(pc9801_20_r,        pc9801_20_w,        0xffffffff) // RTC / DMA registers (LS244)
23712413   AM_RANGE(0x0030, 0x0037) AM_READWRITE8(pc9801rs_30_r,      pc9801_30_w,        0xffffffff) //i8251 RS232c / i8255 system port
23722414   AM_RANGE(0x0040, 0x0047) AM_READWRITE8(pc9801_40_r,        pc9801_40_w,        0xffffffff) //i8255 printer port / i8251 keyboard
2415   AM_RANGE(0x0050, 0x0053) AM_WRITE8(pc9801rs_nmi_w, 0xffffffff)
23732416   AM_RANGE(0x005c, 0x005f) AM_READ(pc9821_timestamp_r) AM_WRITENOP
23742417   AM_RANGE(0x0060, 0x0063) AM_READWRITE8(pc9801_60_r,        pc9801_60_w,        0xffffffff) //upd7220 character ports / <undefined>
23752418   AM_RANGE(0x0064, 0x0067) AM_WRITE8(pc9801_vrtc_mask_w, 0xffffffff)
r19479r19480
26712714   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
26722715
26732716   PORT_START("DSW5")
2674   PORT_DIPNAME( 0x01, 0x00, "DSW5" )
2717   PORT_DIPNAME( 0x01, 0x00, "DSW5" ) // goes into basic with this off
26752718   PORT_DIPSETTING(      0x01, DEF_STR( Off ) )
26762719   PORT_DIPSETTING(      0x00, DEF_STR( On ) )
26772720   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
r19479r19480
34063449      int i;
34073450      static const UINT8 default_memsw_data[0x10] =
34083451      {
3409         0xe1, 0x48, 0xe1, 0x05, 0xe1, 0x04, 0xe1, 0x00, 0xe1, 0x01, 0xe1, 0x00, 0xe1, 0x00, 0xe1, 0x00
3452         0xe1, 0x48, 0xe1, 0x05, 0xe1, 0x04, 0xe1, 0x00, 0xe1, 0x01, 0xe1, 0x00, 0xe1, 0x00, 0xe1, 0x6e
34103453//          0xe1, 0xff, 0xe1, 0xff, 0xe1, 0xff, 0xe1, 0xff, 0xe1, 0xff, 0xe1, 0xff, 0xe1, 0xff, 0xe1, 0xff
34113454      };
34123455

Previous 199869 Revisions Next


© 1997-2024 The MAME Team