src/mess/drivers/mz2500.c
| r8958 | r8959 | |
| 46 | 46 | static UINT8 clut16[0x10]; |
| 47 | 47 | static UINT16 clut256[0x100]; |
| 48 | 48 | static UINT8 cg_mask; |
| 49 | static UINT8 wid_40; |
| 49 | 50 | |
| 50 | 51 | #define WRAM_RESET 0 |
| 51 | 52 | #define IPL_RESET 1 |
| r8958 | r8959 | |
| 140 | 141 | pen = ((gfx_data[tile*8+yi+((gfx_sel & 0x30)<<7)]>>(7-xi)) & 1) ? color : 0; |
| 141 | 142 | } |
| 142 | 143 | |
| 144 | if(attr & 0x40) |
| 145 | pen ^= 0x7; |
| 146 | |
| 143 | 147 | if(pen) |
| 144 | 148 | { |
| 145 | 149 | if((y*8+yi-s_y) >= 0 && (y*8+yi-s_y) < 200) |
| r8958 | r8959 | |
| 218 | 222 | else |
| 219 | 223 | pen = ((gfx_data[tile*8+yi+((gfx_sel & 0x30)<<7)]>>(7-xi)) & 1) ? color : 0; |
| 220 | 224 | |
| 225 | if(attr & 0x40) |
| 226 | pen ^= 0x7; |
| 227 | |
| 221 | 228 | if(pen) |
| 222 | 229 | { |
| 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 | } |
| 225 | 243 | } |
| 226 | 244 | } |
| 227 | 245 | } |
| r8958 | r8959 | |
| 917 | 935 | rectangle visarea; |
| 918 | 936 | static int x_size,y_size; |
| 919 | 937 | |
| 938 | /* TODO: not convinced about this arrangement ... */ |
| 920 | 939 | x_size = ((cg_reg[0x0e] & 0x1f) == 0x17 || (cg_reg[0x0e] & 0x1f) == 0x03) ? 640 : 320; |
| 921 | 940 | y_size = ((cg_reg[0x0e] & 0x1f) == 0x03) ? 400 : 200; |
| 922 | 941 | |
| r8958 | r8959 | |
| 925 | 944 | visarea.max_x = x_size - 1; |
| 926 | 945 | visarea.max_y = y_size - 1; |
| 927 | 946 | |
| 947 | wid_40 = (x_size == 640); |
| 948 | |
| 928 | 949 | vs = (cg_reg[0x08]) | ((cg_reg[0x09]<<8) & 1); |
| 929 | 950 | ve = (cg_reg[0x0a]) | ((cg_reg[0x0b]<<8) & 1); |
| 930 | 951 | hs = (cg_reg[0x0c] & 0x7f)*8; |
| r8958 | r8959 | |
| 1137 | 1158 | PORT_START("KEYB") |
| 1138 | 1159 | PORT_BIT(0x01,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("GRPH") |
| 1139 | 1160 | 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) |
| 1141 | 1162 | PORT_BIT(0x08,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("KANA") |
| 1142 | 1163 | PORT_BIT(0x10,IP_ACTIVE_LOW,IPT_KEYBOARD) PORT_NAME("CTRL") |
| 1143 | 1164 | PORT_BIT(0xe0,IP_ACTIVE_LOW,IPT_UNUSED) |