trunk/src/emu/bus/isa/num9rev.c
| r242323 | r242324 | |
| 22 | 22 | { |
| 23 | 23 | rgb_t color(0); |
| 24 | 24 | UINT16 overlay; |
| 25 | | if(((address << 4) + 0xc0016) > (1024*1024)) |
| 25 | if(((address << 3) + 0xc0016) > (1024*1024)) |
| 26 | 26 | return; |
| 27 | 27 | for(int i = 0; i < 16; i++) |
| 28 | 28 | { |
| 29 | | UINT32 addr = (address << 4) + i; |
| 29 | UINT32 addr = (address << 3) + i; |
| 30 | 30 | overlay = m_ram[addr + 0xc0000] << 1; |
| 31 | 31 | overlay = m_overlay[overlay + ((m_mode & 8) ? 512 : 0)] | (m_overlay[overlay + 1 + ((m_mode & 8) ? 512 : 0)] << 8); |
| 32 | 32 | color.set_r(pal->entry_color(m_ram[addr] | ((overlay & 0xf) << 8)).r()); |
| r242323 | r242324 | |
| 37 | 37 | } |
| 38 | 38 | else |
| 39 | 39 | { |
| 40 | | if(((address << 4) + 16) > (1024*1024)) |
| 40 | if(((address << 3) + 16) > (1024*1024)) |
| 41 | 41 | return; |
| 42 | 42 | for(int i = 0; i < 16; i++) |
| 43 | 43 | bitmap.pix32(y, x + i) = pal->entry_color(m_ram[(address << 4) + i]); |
trunk/src/mess/drivers/pc9801.c
| r242323 | r242324 | |
| 1337 | 1337 | |
| 1338 | 1338 | if(m_egc.regs[6] & 0x1000) |
| 1339 | 1339 | { |
| 1340 | | src_off = 16 - (m_egc.regs[6] & 0xf); |
| 1341 | | dst_off = 16 - ((m_egc.regs[6] >> 4) & 0xf); |
| 1340 | src_off = 15 - (m_egc.regs[6] & 0xf); |
| 1341 | dst_off = 15 - ((m_egc.regs[6] >> 4) & 0xf); |
| 1342 | 1342 | } |
| 1343 | 1343 | else |
| 1344 | 1344 | { |
| r242323 | r242324 | |
| 1350 | 1350 | { |
| 1351 | 1351 | src = src_tmp << (dst_off - src_off); |
| 1352 | 1352 | src |= m_egc.leftover[plane]; |
| 1353 | | m_egc.leftover[plane] = src_tmp >> (16 - (dst_off - src_off)); |
| 1353 | m_egc.leftover[plane] = src_tmp >> (15 - (dst_off - src_off)); |
| 1354 | 1354 | } |
| 1355 | 1355 | else |
| 1356 | 1356 | { |
| 1357 | 1357 | src = src_tmp >> (src_off - dst_off); |
| 1358 | | src |= m_egc.leftover[plane] >> dst_off; |
| 1359 | | m_egc.leftover[plane] = src_tmp << (16 - (src_off - dst_off)); |
| 1358 | src |= m_egc.leftover[plane]; |
| 1359 | m_egc.leftover[plane] = src_tmp << (15 - (src_off - dst_off)); |
| 1360 | 1360 | } |
| 1361 | 1361 | |
| 1362 | 1362 | for(int i = 7; i >= 0; i--) |
| r242323 | r242324 | |
| 1377 | 1377 | int dst_off = (m_egc.regs[6] >> 4) & 0xf; |
| 1378 | 1378 | offset &= 0x3fff; |
| 1379 | 1379 | |
| 1380 | | // mask off the bits past the end of the blit |
| 1381 | | if(m_egc.count < 16) |
| 1382 | | mask &= dir ? ((1 << (m_egc.count + 1)) - 1) : ~((1 << (15 - m_egc.count)) - 1); |
| 1380 | if((((m_egc.regs[2] >> 11) & 3) == 1) || ((((m_egc.regs[2] >> 11) & 3) == 2) && !BIT(m_egc.regs[2], 10))) |
| 1381 | { |
| 1382 | // mask off the bits past the end of the blit |
| 1383 | if(m_egc.count < 16) |
| 1384 | mask &= dir ? ((1 << (m_egc.count + 1)) - 1) : ~((1 << (16 - m_egc.count)) - 1); |
| 1383 | 1385 | |
| 1384 | | // mask off the bits before the start |
| 1385 | | if(m_egc.first) |
| 1386 | | { |
| 1387 | | m_egc.leftover[0] = m_egc.leftover[1] = m_egc.leftover[2] = m_egc.leftover[3] = 0; |
| 1388 | | mask &= dir ? ~((1 << (15 - dst_off)) - 1) : ((1 << (dst_off + 1)) - 1); |
| 1386 | // mask off the bits before the start |
| 1387 | if(m_egc.first) |
| 1388 | { |
| 1389 | m_egc.leftover[0] = m_egc.leftover[1] = m_egc.leftover[2] = m_egc.leftover[3] = 0; |
| 1390 | mask &= dir ? ~((1 << (16 - dst_off)) - 1) : ((1 << (dst_off + 1)) - 1); |
| 1391 | } |
| 1389 | 1392 | } |
| 1390 | 1393 | |
| 1391 | 1394 | for(int i = 0; i < 4; i++) |