Some small changes in the Voodoo code.

- Fixed switch to 3D mode (mixed mode doesn't exist).
- Added / improved error messages for unimplemented features.
This commit is contained in:
Volker Ruppert 2020-09-29 21:29:09 +00:00
parent 1ad0303ace
commit ec2dcd4719
3 changed files with 15 additions and 4 deletions

View File

@ -671,11 +671,9 @@ void bx_banshee_c::write(Bit32u address, Bit32u value, unsigned io_len)
if (mode_change) {
if ((v->banshee.io[reg] & 0x180) == 0x080) {
BX_INFO(("2D desktop mode enabled"));
} else if ((v->banshee.io[reg] & 0x180) == 0x100) {
} else if ((old & 0x100) == 0) {
BX_INFO(("3D overlay mode enabled"));
v->vtimer_running = 1;
} else {
BX_INFO(("Mixed 2D/3D mode not supported yet"));
}
}
v->banshee.hwcursor.enabled = ((v->banshee.io[reg] >> 27) & 1);
@ -1021,7 +1019,7 @@ void bx_banshee_c::agp_reg_write(Bit8u reg, Bit32u value)
case cmdBump0:
case cmdBump1:
if (value > 0) {
BX_ERROR(("cmdBump%d not supported yet", fifo_idx));
BX_ERROR(("cmdBump%d not implemented (value = 0x%04x)", fifo_idx, (Bit16u)value));
}
break;
case cmdRdPtrL0:

View File

@ -1419,6 +1419,8 @@ static const Bit8u dither_matrix_2x2[16] =
#define TEXLOD_TDATA_SWIZZLE(val) (((val) >> 25) & 1)
#define TEXLOD_TDATA_SWAP(val) (((val) >> 26) & 1)
#define TEXLOD_TDIRECT_WRITE(val) (((val) >> 27) & 1) /* Voodoo 2 only */
#define TEXLOD_TMIRROR_S(val) (((val) >> 28) & 1) /* Banshee only */
#define TEXLOD_TMIRROR_T(val) (((val) >> 29) & 1) /* Banshee only */
#define TEXDETAIL_DETAIL_MAX(val) (((val) >> 0) & 0xff)
#define TEXDETAIL_DETAIL_BIAS(val) (((val) >> 8) & 0x3f)

View File

@ -330,6 +330,17 @@ void recompute_texture_params(tmu_state *t)
Bit32u base;
int lod;
/* Unimplemented switch */
if (TEXLOD_LOD_ZEROFRAC(t->reg[tLOD].u)) {
BX_ERROR(("TEXLOD_LOD_ZEROFRAC not implemented yet"));
}
/* Banshee: unimplemented switches */
if (TEXLOD_TMIRROR_S(t->reg[tLOD].u)) {
BX_ERROR(("TEXLOD_TMIRROR_S not implemented yet"));
}
if (TEXLOD_TMIRROR_T(t->reg[tLOD].u)) {
BX_ERROR(("TEXLOD_TMIRROR_T not implemented yet"));
}
/* extract LOD parameters */
t->lodmin = TEXLOD_LODMIN(t->reg[tLOD].u) << 6;
t->lodmax = TEXLOD_LODMAX(t->reg[tLOD].u) << 6;