@@ -1128,6 +1128,8 @@ chips_69000_setup_bitblt(chips_69000_t* chips)
1128
1128
case 1 :
1129
1129
chips -> bitblt_running .x_dir = -1 ;
1130
1130
chips -> bitblt_running .y_dir = 1 ;
1131
+ chips -> bitblt_running .bitblt .source_addr -= (chips -> bitblt_running .bytes_per_pixel - 1 );
1132
+ chips -> bitblt_running .bitblt .destination_addr -= (chips -> bitblt_running .bytes_per_pixel - 1 );
1131
1133
break ;
1132
1134
case 2 :
1133
1135
chips -> bitblt_running .x_dir = 1 ;
@@ -1136,6 +1138,8 @@ chips_69000_setup_bitblt(chips_69000_t* chips)
1136
1138
case 3 :
1137
1139
chips -> bitblt_running .x_dir = -1 ;
1138
1140
chips -> bitblt_running .y_dir = -1 ;
1141
+ chips -> bitblt_running .bitblt .source_addr -= (chips -> bitblt_running .bytes_per_pixel - 1 );
1142
+ chips -> bitblt_running .bitblt .destination_addr -= (chips -> bitblt_running .bytes_per_pixel - 1 );
1139
1143
break ;
1140
1144
}
1141
1145
@@ -1517,18 +1521,26 @@ chips_69000_write_ext_reg(chips_69000_t* chips, uint8_t val)
1517
1521
case 0xA4 :
1518
1522
chips -> ext_regs [chips -> ext_index ] = val ;
1519
1523
chips -> svga .hwcursor .x = val | (chips -> ext_regs [0xA5 ] & 7 ) << 8 ;
1524
+ if (chips -> ext_regs [0xA5 ] & 0x80 )
1525
+ chips -> svga .hwcursor .x = - chips -> svga .hwcursor .x ;
1520
1526
break ;
1521
1527
case 0xA5 :
1522
1528
chips -> ext_regs [chips -> ext_index ] = val ;
1523
1529
chips -> svga .hwcursor .x = chips -> ext_regs [0xA4 ] | (val & 7 ) << 8 ;
1530
+ if (chips -> ext_regs [0xA5 ] & 0x80 )
1531
+ chips -> svga .hwcursor .x = - chips -> svga .hwcursor .x ;
1524
1532
break ;
1525
1533
case 0xA6 :
1526
1534
chips -> ext_regs [chips -> ext_index ] = val ;
1527
1535
chips -> svga .hwcursor .y = val | (chips -> ext_regs [0xA7 ] & 7 ) << 8 ;
1536
+ if (chips -> ext_regs [0xA7 ] & 0x80 )
1537
+ chips -> svga .hwcursor .y = - chips -> svga .hwcursor .y ;
1528
1538
break ;
1529
1539
case 0xA7 :
1530
1540
chips -> ext_regs [chips -> ext_index ] = val ;
1531
1541
chips -> svga .hwcursor .y = chips -> ext_regs [0xA6 ] | (val & 7 ) << 8 ;
1542
+ if (chips -> ext_regs [0xA7 ] & 0x80 )
1543
+ chips -> svga .hwcursor .y = - chips -> svga .hwcursor .y ;
1532
1544
break ;
1533
1545
case 0xC8 :
1534
1546
case 0xC9 :
@@ -2213,9 +2225,9 @@ chips_69000_hwcursor_draw(svga_t *svga, int displine)
2213
2225
case 0b101 :
2214
2226
for (uint8_t x = 0 ; x < (((chips -> ext_regs [0xa0 ] & 7 ) == 0b1 ) ? 32 : 64 ); x ++ ) {
2215
2227
if (!(dat [1 ] & (1ULL << 63 )))
2216
- svga -> monitor -> target_buffer -> line [displine ][ offset + svga -> x_add ] = (dat [0 ] & (1ULL << 63 )) ? svga_lookup_lut_ram (svga , chips -> cursor_pallook [5 ]) : svga_lookup_lut_ram (svga , chips -> cursor_pallook [4 ]);
2228
+ svga -> monitor -> target_buffer -> line [displine & 2047 ][( offset + svga -> x_add ) & 2047 ] = (dat [0 ] & (1ULL << 63 )) ? svga_lookup_lut_ram (svga , chips -> cursor_pallook [5 ]) : svga_lookup_lut_ram (svga , chips -> cursor_pallook [4 ]);
2217
2229
else if (dat [0 ] & (1ULL << 63 ))
2218
- svga -> monitor -> target_buffer -> line [displine ][ offset + svga -> x_add ] ^= 0xffffff ;
2230
+ svga -> monitor -> target_buffer -> line [displine & 2047 ][( offset + svga -> x_add ) & 2047 ] ^= 0xffffff ;
2219
2231
2220
2232
offset ++ ;
2221
2233
dat [0 ] <<= 1 ;
0 commit comments