@@ -756,7 +756,8 @@ mystique_out(uint16_t addr, uint8_t val, void *priv)
756
756
svga -> ma_latch <<= 1 ;
757
757
}
758
758
759
- svga -> ma_latch <<= 1 ;
759
+ if (!(mystique -> type >= MGA_2164W ))
760
+ svga -> ma_latch <<= 1 ;
760
761
if (svga -> ma_latch != mystique -> ma_latch_old ) {
761
762
if (svga -> interlace && svga -> oddeven )
762
763
svga -> maback = (svga -> maback - (mystique -> ma_latch_old << 2 )) +
@@ -949,7 +950,8 @@ mystique_recalctimings(svga_t *svga)
949
950
if (mystique -> type >= MGA_1064SG ) {
950
951
/*Mystique, unlike most SVGA cards, allows display start to take
951
952
effect mid-screen*/
952
- svga -> ma_latch <<= 1 ;
953
+ if (!(mystique -> type >= MGA_2164W ))
954
+ svga -> ma_latch <<= 1 ;
953
955
/* Only change maback so the new display start will take effect on the next
954
956
horizontal retrace. */
955
957
if (svga -> ma_latch != mystique -> ma_latch_old ) {
@@ -1009,6 +1011,7 @@ mystique_recalctimings(svga_t *svga)
1009
1011
break ;
1010
1012
case 32 :
1011
1013
svga -> render = svga_render_32bpp_highres ;
1014
+ svga -> rowoffset <<= 1 ;
1012
1015
break ;
1013
1016
}
1014
1017
}
@@ -1714,6 +1717,7 @@ mystique_accel_ctrl_write_b(uint32_t addr, uint8_t val, void *priv)
1714
1717
case REG_MACCESS + 3 :
1715
1718
WRITE8 (addr , mystique -> maccess , val );
1716
1719
mystique -> dwgreg .dither = mystique -> maccess >> 30 ;
1720
+ mystique -> dwgreg .z_base = mystique -> dwgreg .ydstorg * ((mystique -> maccess & MACCESS_ZWIDTH ) ? 4 : 2 ) + mystique -> dwgreg .zorg ;
1717
1721
break ;
1718
1722
1719
1723
case REG_MCTLWTST :
@@ -2575,6 +2579,7 @@ mystique_ctrl_write_l(uint32_t addr, uint32_t val, void *priv)
2575
2579
case REG_PRIMEND :
2576
2580
thread_wait_mutex (mystique -> dma .lock );
2577
2581
mystique -> dma .primend = val ;
2582
+ //pclog("PRIMADDRESS = 0x%08X, PRIMEND = 0x%08X\n", mystique->dma.primaddress, mystique->dma.primend);
2578
2583
if (mystique -> dma .state == DMA_STATE_IDLE && (mystique -> dma .primaddress & DMA_ADDR_MASK ) != (mystique -> dma .primend & DMA_ADDR_MASK )) {
2579
2584
mystique -> endprdmasts_pending = 0 ;
2580
2585
mystique -> status &= ~STATUS_ENDPRDMASTS ;
@@ -5074,6 +5079,7 @@ blit_bitblt(mystique_t *mystique)
5074
5079
case DWGCTRL_ATYPE_BLK :
5075
5080
switch (mystique -> dwgreg .dwgctrl_running & DWGCTRL_BLTMOD_MASK ) {
5076
5081
case DWGCTRL_BLTMOD_BMONOLEF :
5082
+ case DWGCTRL_BLTMOD_BMONOWF :
5077
5083
src_addr = mystique -> dwgreg .ar [3 ];
5078
5084
5079
5085
for (y = 0 ; y < mystique -> dwgreg .length ; y ++ ) {
@@ -5082,7 +5088,7 @@ blit_bitblt(mystique_t *mystique)
5082
5088
while (1 ) {
5083
5089
if (x >= mystique -> dwgreg .cxleft && x <= mystique -> dwgreg .cxright && mystique -> dwgreg .ydst_lin >= mystique -> dwgreg .ytop && mystique -> dwgreg .ydst_lin <= mystique -> dwgreg .ybot ) {
5084
5090
uint32_t byte_addr = (src_addr >> 3 ) & mystique -> vram_mask ;
5085
- int bit_offset = src_addr & 7 ;
5091
+ int bit_offset = (( mystique -> dwgreg . dwgctrl_running & DWGCTRL_BLTMOD_MASK ) == DWGCTRL_BLTMOD_BMONOWF ) ? ( 7 - ( src_addr & 7 )) : ( src_addr & 7 ) ;
5086
5092
uint32_t old_dst ;
5087
5093
5088
5094
switch (mystique -> maccess_running & MACCESS_PWIDTH_MASK ) {
@@ -5180,6 +5186,7 @@ blit_bitblt(mystique_t *mystique)
5180
5186
case DWGCTRL_ATYPE_RSTR :
5181
5187
switch (mystique -> dwgreg .dwgctrl_running & DWGCTRL_BLTMOD_MASK ) {
5182
5188
case DWGCTRL_BLTMOD_BMONOLEF :
5189
+ case DWGCTRL_BLTMOD_BMONOWF :
5183
5190
if (mystique -> dwgreg .dwgctrl_running & DWGCTRL_PATTERN )
5184
5191
fatal ("BITBLT RPL/RSTR BMONOLEF with pattern\n" );
5185
5192
@@ -5191,7 +5198,7 @@ blit_bitblt(mystique_t *mystique)
5191
5198
5192
5199
while (1 ) {
5193
5200
uint32_t byte_addr = (src_addr >> 3 ) & mystique -> vram_mask ;
5194
- int bit_offset = src_addr & 7 ;
5201
+ int bit_offset = (( mystique -> dwgreg . dwgctrl_running & DWGCTRL_BLTMOD_MASK ) == DWGCTRL_BLTMOD_BMONOWF ) ? ( 7 - ( src_addr & 7 )) : ( src_addr & 7 ) ;
5195
5202
5196
5203
if (x >= mystique -> dwgreg .cxleft && x <= mystique -> dwgreg .cxright && mystique -> dwgreg .ydst_lin >= mystique -> dwgreg .ytop && mystique -> dwgreg .ydst_lin <= mystique -> dwgreg .ybot && ((svga -> vram [byte_addr ] & (1 << bit_offset )) || !(mystique -> dwgreg .dwgctrl_running & DWGCTRL_TRANSC )) && trans [x & 3 ]) {
5197
5204
uint32_t src = (svga -> vram [byte_addr ] & (1 << bit_offset )) ? mystique -> dwgreg .fcol : mystique -> dwgreg .bcol ;
0 commit comments