src/mess/video/fmtowns.c
| r6973 | r6974 | |
| 170 | 170 | |
| 171 | 171 | READ8_HANDLER( towns_gfx_r ) |
| 172 | 172 | { |
| 173 | UINT8 ret = 0; |
| 174 | |
| 173 | 175 | if(towns_mainmem_enable != 0) |
| 174 | 176 | return messram_get_ptr(devtag_get_device(space->machine, "messram"))[offset+0xc0000]; |
| 175 | 177 | |
| 178 | offset = offset << 2; |
| 179 | |
| 176 | 180 | if(towns_vram_page_sel != 0) |
| 177 | 181 | offset += 0x20000; |
| 178 | 182 | |
| 179 | | return 0; |
| 183 | ret = (((towns_gfxvram[offset] >> towns_vram_rplane) << 7) & 0x80) |
| 184 | | (((towns_gfxvram[offset] >> towns_vram_rplane) << 2) & 0x40) |
| 185 | | (((towns_gfxvram[offset+1] >> towns_vram_rplane) << 5) & 0x20) |
| 186 | | (((towns_gfxvram[offset+1] >> towns_vram_rplane)) & 0x10) |
| 187 | | (((towns_gfxvram[offset+2] >> towns_vram_rplane) << 3) & 0x08) |
| 188 | | (((towns_gfxvram[offset+2] >> towns_vram_rplane) >> 2) & 0x04) |
| 189 | | (((towns_gfxvram[offset+3] >> towns_vram_rplane) << 1) & 0x02) |
| 190 | | (((towns_gfxvram[offset+3] >> towns_vram_rplane) >> 4) & 0x01); |
| 191 | |
| 192 | return ret; |
| 180 | 193 | } |
| 181 | 194 | |
| 182 | 195 | WRITE8_HANDLER( towns_gfx_w ) |
| r6973 | r6974 | |
| 287 | 300 | towns_update_video_banks(space); |
| 288 | 301 | logerror("VGA: VRAM wplane select = 0x%02x\n",towns_vram_wplane); |
| 289 | 302 | break; |
| 290 | | case 0x03: // VRAM page select (bit 5) |
| 303 | case 0x03: // VRAM page select (bit 4) |
| 291 | 304 | towns_vram_page_sel = data & 0x10; |
| 292 | 305 | break; |
| 293 | 306 | case 0x14: // Kanji offset (high) |