Banshee/Voodoo3 BitBlt: Fixed negative srcXY and dstXY values.
This commit is contained in:
parent
637b9d4c94
commit
35e93508ac
@ -75,7 +75,8 @@ Detailed change log :
|
||||
- Fix big-endian support in Banshee / Voodoo3 mem_read code
|
||||
- Banshee/Voodoo3: Added 16 bpp to 32 bpp pixel format conversion for screen-to-screen bitblt operation
|
||||
- Banshee: added host-to-screen stretching BitBlt support
|
||||
- Banshee/Voodoo3: Added support for combined desktop / overlay mode
|
||||
- Banshee/Voodoo3: Added support for combined desktop / overlay mode with
|
||||
chroma key check support
|
||||
- Banshee/Voodoo3: Added YUV planar space write support
|
||||
- USB
|
||||
- Now includes the USB Debugger support for the xHCI and UHCI controllers
|
||||
|
@ -107,6 +107,12 @@ const Bit8u banshee_iomask[256] = {4,0,0,0,7,1,3,1,7,1,3,1,7,1,3,1,7,1,3,1,
|
||||
const Bit8u pxconv_table[16] = {0x3a,0x02,0x00,0x38,0x38,0x38,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
|
||||
|
||||
#define SIGN_EXTEND(type, dst, width, src) \
|
||||
do { \
|
||||
struct { type x : width; } s; \
|
||||
dst = s.x = src; \
|
||||
} while (0)
|
||||
|
||||
#include "voodoo_types.h"
|
||||
#include "voodoo_data.h"
|
||||
#include "voodoo_main.h"
|
||||
@ -1855,8 +1861,8 @@ void bx_banshee_c::blt_reg_write(Bit8u reg, Bit32u value)
|
||||
BLT.src_h = (BLT.reg[reg] >> 16) & 0x1fff;
|
||||
break;
|
||||
case blt_srcXY:
|
||||
BLT.src_x = BLT.reg[reg] & 0x1fff;
|
||||
BLT.src_y = (BLT.reg[reg] >> 16) & 0x1fff;
|
||||
SIGN_EXTEND(Bit16s, BLT.src_x, 13, BLT.reg[reg]);
|
||||
SIGN_EXTEND(Bit16s, BLT.src_y, 13, BLT.reg[reg] >> 16);
|
||||
break;
|
||||
case blt_colorBack:
|
||||
BLT.bgcolor[0] = BLT.reg[reg] & 0xff;
|
||||
@ -1875,16 +1881,8 @@ void bx_banshee_c::blt_reg_write(Bit8u reg, Bit32u value)
|
||||
BLT.dst_h = (BLT.reg[reg] >> 16) & 0x1fff;
|
||||
break;
|
||||
case blt_dstXY:
|
||||
if ((BLT.reg[reg] >> 15) & 1) {
|
||||
BLT.dst_x = (Bit16s)(BLT.reg[reg] & 0xffff);
|
||||
} else {
|
||||
BLT.dst_x = BLT.reg[reg] & 0x1fff;
|
||||
}
|
||||
if (BLT.reg[reg] >> 31) {
|
||||
BLT.dst_y = (Bit16s)(BLT.reg[reg] >> 16);
|
||||
} else {
|
||||
BLT.dst_y = (BLT.reg[reg] >> 16) & 0x1fff;
|
||||
}
|
||||
SIGN_EXTEND(Bit16s, BLT.dst_x, 13, BLT.reg[reg]);
|
||||
SIGN_EXTEND(Bit16s, BLT.dst_y, 13, BLT.reg[reg] >> 16);
|
||||
break;
|
||||
case blt_command:
|
||||
old_cmd = BLT.cmd;
|
||||
|
@ -1765,8 +1765,8 @@ struct _banshee_info
|
||||
Bit8u src_fmt;
|
||||
Bit16u src_pitch;
|
||||
Bit8u src_swizzle;
|
||||
Bit16u src_x;
|
||||
Bit16u src_y;
|
||||
Bit16s src_x;
|
||||
Bit16s src_y;
|
||||
Bit16u src_w;
|
||||
Bit16u src_h;
|
||||
Bit32u dst_base;
|
||||
|
Loading…
Reference in New Issue
Block a user