Skip to content

Commit 85197a0

Browse files
SCREEN COLUMNS returns wrong value #792
1 parent 4b69d7a commit 85197a0

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

ugbc/src/hw/6847.c

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -380,10 +380,10 @@ int c6847_screen_mode_enable( Environment * _environment, ScreenMode * _screen_m
380380
// 64 x 32 elements is available in the display area. The element area is four
381381
// dot-clocks wide by six lines high.
382382
case TILEMAP_MODE_SEMIGRAPHICS4: // Semigraphics 4 64 × 32 8 512
383-
_environment->screenWidth = 64*4;
384-
_environment->screenHeight = 32*6;
385-
_environment->screenTilesWidth = 64;
386-
_environment->screenTilesHeight = 32;
383+
_environment->screenWidth = 64;
384+
_environment->screenHeight = 32;
385+
_environment->screenTilesWidth = 32;
386+
_environment->screenTilesHeight = 16;
387387
_environment->screenColors = 4;
388388
// Semigraphic-4 0 X X 0 0 0 0 32x16 ch, 64x32 pixels
389389
SET_VIDEOAT_400;
@@ -406,10 +406,10 @@ int c6847_screen_mode_enable( Environment * _environment, ScreenMode * _screen_m
406406
// one of four colors in the display box. A 512 byte display memory is required.
407407
// The element area is four dot-clocks wide by four lines high.
408408
case TILEMAP_MODE_SEMIGRAPHICS6: // Semigraphics 6 64 × 48 4 512
409-
_environment->screenWidth = 64*8;
410-
_environment->screenHeight = 48*12;
411-
_environment->screenTilesWidth = 64;
412-
_environment->screenTilesHeight = 48;
409+
_environment->screenWidth = 64;
410+
_environment->screenHeight = 48;
411+
_environment->screenTilesWidth = 32;
412+
_environment->screenTilesHeight = 16;
413413
_environment->screenColors = 4;
414414
// Semigraphic-6 0 X X 1 0 0 0 64x48 pixels
415415
SET_VIDEOAT_400;
@@ -433,10 +433,10 @@ int c6847_screen_mode_enable( Environment * _environment, ScreenMode * _screen_m
433433
// available in the display area. The element area is four dot-clocks wide
434434
// by three lines high.
435435
case TILEMAP_MODE_SEMIGRAPHICS8: // Semigraphics 8 64 × 64 2 512
436-
_environment->screenWidth = 64*8;
437-
_environment->screenHeight = 64*12;
438-
_environment->screenTilesWidth = 64;
439-
_environment->screenTilesHeight = 64;
436+
_environment->screenWidth = 64;
437+
_environment->screenHeight = 64;
438+
_environment->screenTilesWidth = 32;
439+
_environment->screenTilesHeight = 16;
440440
_environment->screenColors = 4;
441441
cpu_store_16bit( _environment, "CLIPX1", 0 );
442442
cpu_store_16bit( _environment, "CLIPX2", 63 );
@@ -450,10 +450,10 @@ int c6847_screen_mode_enable( Environment * _environment, ScreenMode * _screen_m
450450
// display memory is required. A density of 64 x 96 elements is available in the
451451
// display area. The element area is four dot-clocks wide by two lineshigh.
452452
case TILEMAP_MODE_SEMIGRAPHICS12: // Semigraphics 6 64 × 96 1 3072
453-
_environment->screenWidth = 64*8;
454-
_environment->screenHeight = 96*12;
455-
_environment->screenTilesWidth = 64;
456-
_environment->screenTilesHeight = 96;
453+
_environment->screenWidth = 64;
454+
_environment->screenHeight = 96;
455+
_environment->screenTilesWidth = 32;
456+
_environment->screenTilesHeight = 16;
457457
_environment->screenColors = 4;
458458
cpu_store_16bit( _environment, "CLIPX1", 0 );
459459
cpu_store_16bit( _environment, "CLIPX2", 63 );
@@ -468,10 +468,10 @@ int c6847_screen_mode_enable( Environment * _environment, ScreenMode * _screen_m
468468
// elements is available in the display are. The element area is four
469469
// dot-clocks wide by one line high.
470470
case TILEMAP_MODE_SEMIGRAPHICS24: // Semigraphics 6 64 × 96 1 3072
471-
_environment->screenWidth = 64*8;
472-
_environment->screenHeight = 96*12;
473-
_environment->screenTilesWidth = 64;
474-
_environment->screenTilesHeight = 96;
471+
_environment->screenWidth = 64;
472+
_environment->screenHeight = 96;
473+
_environment->screenTilesWidth = 32;
474+
_environment->screenTilesHeight = 16;
475475
_environment->screenColors = 4;
476476
cpu_store_16bit( _environment, "CLIPX1", 0 );
477477
cpu_store_16bit( _environment, "CLIPX2", 63 );

0 commit comments

Comments
 (0)