comparison src/video/xbios/SDL_xbios.c @ 1064:fba6b67b4d60

Add Centscreen extended modes support
author Patrice Mandin <patmandin@gmail.com>
date Tue, 31 May 2005 12:31:11 +0000
parents 5023cde12cbd
children 24470ffe8ee4
comparison
equal deleted inserted replaced
1063:0fb50bfaea7f 1064:fba6b67b4d60
281 281
282 /* Initialize video mode list */ 282 /* Initialize video mode list */
283 /* and save current screen status (palette, screen address, video mode) */ 283 /* and save current screen status (palette, screen address, video mode) */
284 XBIOS_nummodes = 0; 284 XBIOS_nummodes = 0;
285 XBIOS_modelist = NULL; 285 XBIOS_modelist = NULL;
286 XBIOS_centscreen = SDL_FALSE;
286 287
287 switch (XBIOS_cvdo >>16) { 288 switch (XBIOS_cvdo >>16) {
288 case VDO_ST: 289 case VDO_ST:
289 case VDO_STE: 290 case VDO_STE:
290 { 291 {
409 current_mode->number = newvmode; 410 current_mode->number = newvmode;
410 411
411 current_mode++; 412 current_mode++;
412 } 413 }
413 414
414 /* Initialize BlowUp or SB3 stuff if present */ 415 /* Initialize BlowUp/SB3/Centscreen stuff if present */
415 if (Getcookie(C_BLOW, &cookie_blow) == C_FOUND) { 416 if (Getcookie(C_BLOW, &cookie_blow) == C_FOUND) {
416 SDL_XBIOS_BlowupInit(this, (blow_cookie_t *)cookie_blow); 417 SDL_XBIOS_BlowupInit(this, (blow_cookie_t *)cookie_blow);
417 } else if (Getcookie(C_SCPN, &cookie_scpn) == C_FOUND) { 418 } else if (Getcookie(C_SCPN, &cookie_scpn) == C_FOUND) {
418 SDL_XBIOS_SB3Init(this, (scpn_cookie_t *)cookie_scpn); 419 SDL_XBIOS_SB3Init(this, (scpn_cookie_t *)cookie_scpn);
419 } else if (Getcookie(C_CNTS, &cookie_cnts) == C_FOUND) { 420 } else if (Getcookie(C_CNTS, &cookie_cnts) == C_FOUND) {
420 SDL_XBIOS_CentscreenInit(this); 421 XBIOS_oldvmode = SDL_XBIOS_CentscreenInit(this);
421 } 422 XBIOS_centscreen = SDL_TRUE;
423 }
424
422 break; 425 break;
423 } 426 }
424 427
425 current_mode = XBIOS_modelist; 428 current_mode = XBIOS_modelist;
426 j8 = j16 = 0; 429 j8 = j16 = 0;
678 EsetShift(new_video_mode->number); 681 EsetShift(new_video_mode->number);
679 #endif 682 #endif
680 break; 683 break;
681 case VDO_F30: 684 case VDO_F30:
682 #ifndef DEBUG_VIDEO_XBIOS 685 #ifndef DEBUG_VIDEO_XBIOS
683 Vsetmode(new_video_mode->number); 686 if (XBIOS_centscreen) {
687 SDL_XBIOS_CentscreenSetmode(this, width, height, new_depth);
688 } else {
689 Vsetmode(new_video_mode->number);
690 }
684 #endif 691 #endif
685 break; 692 break;
686 } 693 }
687 694
688 Vsync(); 695 Vsync();
890 EsetPalette(0, XBIOS_oldnumcol, XBIOS_oldpalette); 897 EsetPalette(0, XBIOS_oldnumcol, XBIOS_oldpalette);
891 } 898 }
892 break; 899 break;
893 case VDO_F30: 900 case VDO_F30:
894 Setscreen(-1, XBIOS_oldvbase, -1); 901 Setscreen(-1, XBIOS_oldvbase, -1);
895 Vsetmode(XBIOS_oldvmode); 902 if (XBIOS_centscreen) {
903 SDL_XBIOS_CentscreenRestore(this, XBIOS_oldvmode);
904 } else {
905 Vsetmode(XBIOS_oldvmode);
906 }
896 if (XBIOS_oldnumcol) { 907 if (XBIOS_oldnumcol) {
897 VsetRGB(0, XBIOS_oldnumcol, XBIOS_oldpalette); 908 VsetRGB(0, XBIOS_oldnumcol, XBIOS_oldpalette);
898 } 909 }
899 break; 910 break;
900 } 911 }