Previous 15994 Revisions Next

r8959 Monday 30th August, 2010 at 14:52:39 UTC by Angelo Salese
[MZ-2500]: Added the capability of doubling the tvram x size when screen is 640 and 40 x 25 is used
[src/mess/drivers]mz2500.c

src/mess/drivers/mz2500.c
r8958r8959
4646static UINT8 clut16[0x10];
4747static UINT16 clut256[0x100];
4848static UINT8 cg_mask;
49static UINT8 wid_40;
4950
5051#define WRAM_RESET 0
5152#define IPL_RESET 1
r8958r8959
140141                  pen = ((gfx_data[tile*8+yi+((gfx_sel & 0x30)<<7)]>>(7-xi)) & 1) ? color : 0;
141142               }
142143
144               if(attr & 0x40)
145                  pen ^= 0x7;
146
143147               if(pen)
144148               {
145149                  if((y*8+yi-s_y) >= 0 && (y*8+yi-s_y) < 200)
r8958r8959
218222               else
219223                  pen = ((gfx_data[tile*8+yi+((gfx_sel & 0x30)<<7)]>>(7-xi)) & 1) ? color : 0;
220224
225               if(attr & 0x40)
226                  pen ^= 0x7;
227
221228               if(pen)
222229               {
223                  if((y*8+yi-s_y) >= 0 && (y*8+yi-s_y) < 200)
224                     *BITMAP_ADDR16(bitmap, (y*8+yi-s_y), x*8+xi) = machine->pens[pen];
230                  if(wid_40) // 640 x 200 with 40 x 25, double x size
231                  {
232                     if((y*8+yi-s_y) >= 0 && (y*8+yi-s_y) < 200)
233                     {
234                        *BITMAP_ADDR16(bitmap, (y*8+yi-s_y), (x*8+xi)*2+0) = machine->pens[pen];
235                        *BITMAP_ADDR16(bitmap, (y*8+yi-s_y), (x*8+xi)*2+1) = machine->pens[pen];
236                     }
237                  }
238                  else
239                  {
240                     if((y*8+yi-s_y) >= 0 && (y*8+yi-s_y) < 200)
241                        *BITMAP_ADDR16(bitmap, (y*8+yi-s_y), x*8+xi) = machine->pens[pen];
242                  }
225243               }
226244            }
227245         }
r8958r8959
917935      rectangle visarea;
918936      static int x_size,y_size;
919937
938      /* TODO: not convinced about this arrangement ... */
920939      x_size = ((cg_reg[0x0e] & 0x1f) == 0x17 || (cg_reg[0x0e] & 0x1f) == 0x03) ? 640 : 320;
921940      y_size = ((cg_reg[0x0e] & 0x1f) == 0x03) ? 400 : 200;
922941
r8958r8959
925944      visarea.max_x = x_size - 1;
926945      visarea.max_y = y_size - 1;
927946
947      wid_40 = (x_size == 640);
948
928949      vs = (cg_reg[0x08]) | ((cg_reg[0x09]<<8) & 1);
929950      ve = (cg_reg[0x0a]) | ((cg_reg[0x0b]<<8) & 1);
930951      hs = (cg_reg[0x0c] & 0x7f)*8;
r8958r8959
11371158   PORT_START("KEYB")
11381159   PORT_BIT(0x01,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("GRPH")
11391160   PORT_BIT(0x02,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("SLOCK")
1140   PORT_BIT(0x04,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("SHIFT")
1161   PORT_BIT(0x04,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_LSHIFT)
11411162   PORT_BIT(0x08,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("KANA")
11421163   PORT_BIT(0x10,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("CTRL")
11431164   PORT_BIT(0xe0,IP_ACTIVE_LOW,IPT_UNUSED)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team