Previous 199869 Revisions Next

r17860 Thursday 13th September, 2012 at 14:00:19 UTC by Angelo Salese
Fixed an horizontal scrolling bug in Sengoku Mahjong [Angelo Salese]
[src/mame/drivers]legionna.c sengokmj.c
[src/mame/video]sei_crtc.c

trunk/src/mame/video/sei_crtc.c
r17859r17860
2020single boards, most if not all of them are shared video chips in the aforementioned games.
2121
2222TODO:
23- Needs a full device rewrite
2324- Dynamic Resolution Change (xx10 register?)
2425- Dynamic Paging register probably incorrect,needs further investigation;
2526- Merge the aforementioned games and clean-up the code in these drivers;
r17859r17860
99100/************************************
100101* 0x24 - Screen 1 (FG) scroll x
101102************************************/
102#define SEIBU_CRTC_SC1_SX   (seibucrtc_vregs[0x0024/2])
103#define SEIBU_CRTC_SC1_SX   (seibucrtc_vregs[0x0028/2])
103104
104105/************************************
105106* 0x26 - Screen 1 (FG) scroll y
106107************************************/
107#define SEIBU_CRTC_SC1_SY   (seibucrtc_vregs[0x0026/2])
108#define SEIBU_CRTC_SC1_SY   (seibucrtc_vregs[0x002a/2])
108109
109110/************************************
110111* 0x28 - Screen 2 (MD) scroll x
111112************************************/
112#define SEIBU_CRTC_SC2_SX   (seibucrtc_vregs[0x0028/2])
113#define SEIBU_CRTC_SC2_SX   (seibucrtc_vregs[0x0024/2])
113114
114115/************************************
115116* 0x2a - Screen 2 (MD) scroll y
116117************************************/
117#define SEIBU_CRTC_SC2_SY   (seibucrtc_vregs[0x002a/2])
118#define SEIBU_CRTC_SC2_SY   (seibucrtc_vregs[0x0026/2])
118119
119120/************************************
120121* 0x2c - Fix screen scroll x (global)
trunk/src/mame/drivers/legionna.c
r17859r17860
10611061   /* video hardware */
10621062   MCFG_SCREEN_ADD("screen", RASTER)
10631063   MCFG_SCREEN_REFRESH_RATE(60)
1064   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
1065   MCFG_SCREEN_SIZE(32*8, 32*8)
1064   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
1065   MCFG_SCREEN_SIZE(36*8, 36*8)
10661066   MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
10671067   MCFG_SCREEN_UPDATE_STATIC(legionna)
10681068
r17859r17860
10911091   /* video hardware */
10921092   MCFG_SCREEN_ADD("screen", RASTER)
10931093   MCFG_SCREEN_REFRESH_RATE(60)
1094   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
1095   MCFG_SCREEN_SIZE(32*8, 32*8)
1094   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
1095   MCFG_SCREEN_SIZE(36*8, 36*8)
10961096   MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1)
10971097   MCFG_SCREEN_UPDATE_STATIC(legionna)
10981098
r17859r17860
11201120   /* video hardware */
11211121   MCFG_SCREEN_ADD("screen", RASTER)
11221122   MCFG_SCREEN_REFRESH_RATE(61)
1123   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
1124   MCFG_SCREEN_SIZE(40*8, 32*8)
1123   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
1124   MCFG_SCREEN_SIZE(42*8, 36*8)
11251125   MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 28*8-1)
11261126   MCFG_SCREEN_UPDATE_STATIC(godzilla)
11271127
r17859r17860
11481148
11491149   /* video hardware */
11501150   MCFG_SCREEN_ADD("screen", RASTER)
1151   MCFG_SCREEN_SIZE(40*8, 32*8)
1151   MCFG_SCREEN_SIZE(42*8, 36*8)
11521152   MCFG_SCREEN_REFRESH_RATE(61)
1153   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
1153   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
11541154   MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 32*8-1)
11551155   MCFG_SCREEN_UPDATE_STATIC(godzilla)
11561156
r17859r17860
11781178   /* video hardware */
11791179   MCFG_SCREEN_ADD("screen", RASTER)
11801180   MCFG_SCREEN_REFRESH_RATE(60)
1181   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
1182   MCFG_SCREEN_SIZE(64*8, 32*8)
1181   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
1182   MCFG_SCREEN_SIZE(64*8, 36*8)
11831183   MCFG_SCREEN_VISIBLE_AREA(2*8, 42*8-1, 2*8, 30*8-1)
11841184   MCFG_SCREEN_UPDATE_STATIC(grainbow)
11851185
r17859r17860
12081208   /* video hardware */
12091209   MCFG_SCREEN_ADD("screen", RASTER)
12101210   MCFG_SCREEN_REFRESH_RATE(60)
1211   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
1212   MCFG_SCREEN_SIZE(40*8, 32*8)
1211   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
1212   MCFG_SCREEN_SIZE(42*8, 36*8)
12131213   MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 32*8-1)
12141214   MCFG_SCREEN_UPDATE_STATIC(grainbow)
12151215
r17859r17860
12471247   MCFG_SCREEN_ADD("screen", RASTER)
12481248   MCFG_SCREEN_REFRESH_RATE(60)
12491249   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
1250   MCFG_SCREEN_SIZE(40*8, 32*8)
1250   MCFG_SCREEN_SIZE(42*8, 36*8)
12511251   MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 32*8-1)
12521252   MCFG_SCREEN_UPDATE_STATIC(grainbow)
12531253
trunk/src/mame/drivers/sengokmj.c
r17859r17860
2828        M6295
2929OSC:    14.31818MHz
3030        16.000MHz
31Chips:  SEI0100
31Chips:  SEI0100 (YM3931, main/sub cpu interface)
3232        SEI0160
33        SEI0200
33        SEI0200 (tilemap chip)
3434        SEI0210
35        SEI0220
35        SEI0220 (sprite chip)
3636
3737
3838MAH1-1-1.915  samples
r17859r17860
7878/* Multiplexer device for the mahjong panel */
7979READ16_MEMBER(sengokmj_state::mahjong_panel_r)
8080{
81   switch(m_sengokumj_mux_data)
81   const char *const mpnames[] = { "KEY0", "KEY1", "KEY2", "KEY3", "KEY4", "UNUSED" };
82   int i;
83   UINT16 res = 0xffff;
84
85   for(i=0;i<5;i++)
8286   {
83      case 0x0100: return ioport("KEY0")->read();
84      case 0x0200: return ioport("KEY1")->read();
85      case 0x0400: return ioport("KEY2")->read();
86      case 0x0800: return ioport("KEY3")->read();
87      case 0x1000: return ioport("KEY4")->read();
88      case 0x2000: return ioport("UNUSED")->read();
87      if(m_sengokumj_mux_data & 1 << i)
88         res = ioport(mpnames[i])->read();
8989   }
9090
91   return 0xffff;
91   return res;
9292}
9393
9494WRITE16_MEMBER(sengokmj_state::mahjong_panel_w)
9595{
96   m_sengokumj_mux_data = data;
96   m_sengokumj_mux_data = (data & 0x3f00) >> 8;
97
98   if(data & 0xc0ff)
99      logerror("Write to mux %04x\n",data);
97100}
98101
99102WRITE16_MEMBER(sengokmj_state::sengokmj_out_w)
100103{
101104   /* ---- ---- ---x ---- J.P. Signal (?)*/
102   /* ---- ---- ---- -x-- Coin counter (done AFTER that you press start)*/
105   /* ---- ---- ---- -x-- Coin counter (done AFTER you press start)*/
103106   /* ---- ---- ---- --x- Cash enable (lockout)*/
104107   /* ---- ---- ---- ---x Hopper 10 */
105108   coin_lockout_w(machine(), 0,~data & 2);

Previous 199869 Revisions Next


© 1997-2024 The MAME Team