@@ -2287,14 +2287,46 @@ chips_69000_vblank_start(svga_t *svga)
2287
2287
chips_69000_interrupt (chips );
2288
2288
}
2289
2289
2290
+ static void
2291
+ chips_69000_hwcursor_draw_64x64 (svga_t * svga , int displine )
2292
+ {
2293
+ chips_69000_t * chips = (chips_69000_t * ) svga -> priv ;
2294
+ uint64_t dat [2 ];
2295
+ int offset = svga -> hwcursor_latch .x - svga -> hwcursor_latch .xoff ;
2296
+
2297
+ if (svga -> interlace && svga -> hwcursor_oddeven )
2298
+ svga -> hwcursor_latch .addr += 16 ;
2299
+
2300
+ dat [1 ] = bswap64 (* (uint64_t * ) (& svga -> vram [svga -> hwcursor_latch .addr ]));
2301
+ dat [0 ] = bswap64 (* (uint64_t * ) (& svga -> vram [svga -> hwcursor_latch .addr + 8 ]));
2302
+ svga -> hwcursor_latch .addr += 16 ;
2303
+
2304
+ for (uint8_t x = 0 ; x < 64 ; x ++ ) {
2305
+ if (!(dat [1 ] & (1ULL << 63 )))
2306
+ svga -> monitor -> target_buffer -> line [displine ][(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 ]);
2307
+ else if (dat [0 ] & (1ULL << 63 ))
2308
+ svga -> monitor -> target_buffer -> line [displine ][(offset + svga -> x_add ) & 2047 ] ^= 0xffffff ;
2309
+
2310
+ offset ++ ;
2311
+ dat [0 ] <<= 1 ;
2312
+ dat [1 ] <<= 1 ;
2313
+ }
2314
+
2315
+ if (svga -> interlace && !svga -> hwcursor_oddeven )
2316
+ svga -> hwcursor_latch .addr += 16 ;
2317
+ }
2318
+
2290
2319
static void
2291
2320
chips_69000_hwcursor_draw (svga_t * svga , int displine )
2292
2321
{
2293
2322
chips_69000_t * chips = (chips_69000_t * ) svga -> priv ;
2294
2323
uint64_t dat [2 ];
2295
2324
int offset = svga -> hwcursor_latch .x - svga -> hwcursor_latch .xoff ;
2296
2325
2297
- if (svga -> interlace && (chips -> ext_regs [0xa0 ] & 7 ) == 0b1 ) {
2326
+ if ((chips -> ext_regs [0xa0 ] & 7 ) == 0b101 )
2327
+ return chips_69000_hwcursor_draw_64x64 (svga , displine );
2328
+
2329
+ if (svga -> interlace ) {
2298
2330
dat [1 ] = bswap64 (* (uint64_t * ) (& svga -> vram [svga -> hwcursor_latch .addr ]));
2299
2331
dat [0 ] = bswap64 (* (uint64_t * ) (& svga -> vram [svga -> hwcursor_latch .addr + 8 ]));
2300
2332
svga -> hwcursor_latch .addr += 16 ;
@@ -2315,10 +2347,7 @@ chips_69000_hwcursor_draw(svga_t *svga, int displine)
2315
2347
return ;
2316
2348
}
2317
2349
2318
- if (svga -> interlace && svga -> hwcursor_oddeven )
2319
- svga -> hwcursor_latch .addr += 16 ;
2320
-
2321
- if ((svga -> hwcursor_on & 1 ) && (chips -> ext_regs [0xa0 ] & 7 ) == 0b1 ) {
2350
+ if ((svga -> hwcursor_on & 1 )) {
2322
2351
dat [1 ] = bswap64 (* (uint64_t * ) (& svga -> vram [svga -> hwcursor_latch .addr - 16 ]));
2323
2352
dat [0 ] = bswap64 (* (uint64_t * ) (& svga -> vram [(svga -> hwcursor_latch .addr - 16 ) + 8 ]));
2324
2353
dat [1 ] <<= 32ULL ;
@@ -2329,27 +2358,17 @@ chips_69000_hwcursor_draw(svga_t *svga, int displine)
2329
2358
dat [0 ] = bswap64 (* (uint64_t * ) (& svga -> vram [svga -> hwcursor_latch .addr + 8 ]));
2330
2359
svga -> hwcursor_latch .addr += 16 ;
2331
2360
}
2332
- switch (chips -> ext_regs [0xa0 ] & 7 ) {
2333
- case 0b1 :
2334
- case 0b101 :
2335
- for (uint8_t x = 0 ; x < (((chips -> ext_regs [0xa0 ] & 7 ) == 0b1 ) ? 32 : 64 ); x ++ ) {
2336
- if (!(dat [1 ] & (1ULL << 63 )))
2337
- 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 ]);
2338
- else if (dat [0 ] & (1ULL << 63 ))
2339
- svga -> monitor -> target_buffer -> line [displine & 2047 ][(offset + svga -> x_add ) & 2047 ] ^= 0xffffff ;
2340
-
2341
- offset ++ ;
2342
- dat [0 ] <<= 1 ;
2343
- dat [1 ] <<= 1 ;
2344
- }
2345
- break ;
2346
2361
2347
- default :
2348
- break ;
2349
- }
2362
+ for (uint8_t x = 0 ; x < 32 ; x ++ ) {
2363
+ if (!(dat [1 ] & (1ULL << 63 )))
2364
+ 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 ]);
2365
+ else if (dat [0 ] & (1ULL << 63 ))
2366
+ svga -> monitor -> target_buffer -> line [displine & 2047 ][(offset + svga -> x_add ) & 2047 ] ^= 0xffffff ;
2350
2367
2351
- if (svga -> interlace && !svga -> hwcursor_oddeven )
2352
- svga -> hwcursor_latch .addr += 16 ;
2368
+ offset ++ ;
2369
+ dat [0 ] <<= 1 ;
2370
+ dat [1 ] <<= 1 ;
2371
+ }
2353
2372
}
2354
2373
2355
2374
static float
0 commit comments