comparison src/video/xbios/SDL_xbios_blowup.c @ 4194:05c9e942cc46 SDL-1.2

Preliminary work to support the Milan video bios, that will gives access to 24 or 32 bpp modes. I used the svga driver as model to dynamically build video modes list.
author Patrice Mandin <patmandin@gmail.com>
date Sat, 19 Sep 2009 12:46:00 +0000
parents a1b03ba2fcd0
children 6405314a7c07
comparison
equal deleted inserted replaced
4193:430e6690c4cd 4194:05c9e942cc46
30 #include <mint/falcon.h> 30 #include <mint/falcon.h>
31 31
32 #include "SDL_xbios.h" 32 #include "SDL_xbios.h"
33 #include "SDL_xbios_blowup.h" 33 #include "SDL_xbios_blowup.h"
34 34
35 void SDL_XBIOS_BlowupInit(_THIS, blow_cookie_t *cookie_blow) 35 void SDL_XBIOS_ListBlowupModes(_THIS, int actually_add, blow_cookie_t *cookie_blow)
36 { 36 {
37 int i, num_mode, bank; 37 int i, j, num_mode, bank;
38 blow_mode_t *blow_mode; 38 blow_mode_t *blow_mode;
39 xbiosmode_t modeinfo;
39 40
40 /* Add bit 15 for old modes */ 41 if (actually_add) {
41 for (i=0;i<XBIOS_nummodes;i++) { 42 /* Set bit 15 for old modes */
42 XBIOS_modelist[i].number |= 1<<15; 43 for (i=0;i<NUM_MODELISTS;i++) {
44 if ( SDL_xbiosmode[i] != NULL ) {
45 for ( j=0; SDL_xbiosmode[i][j]; ++j ) {
46 SDL_xbiosmode[i][j]->number |= 1<<15;
47 }
48 }
49 }
43 } 50 }
44 51
45 /* Add Blowup modes for 8 and 16 bpp */ 52 /* Add Blowup modes for 8 and 16 bpp */
46 for (num_mode=3; num_mode<5; num_mode++) { 53 for (num_mode=3; num_mode<5; num_mode++) {
47 bank = cookie_blow->num_mode[num_mode]; 54 bank = cookie_blow->num_mode[num_mode];
55 && (cookie_blow->montype == MONITOR_RGB)) 62 && (cookie_blow->montype == MONITOR_RGB))
56 || ((blow_mode->monitor == MONITOR_RGB) 63 || ((blow_mode->monitor == MONITOR_RGB)
57 && (cookie_blow->montype == MONITOR_TV))) 64 && (cookie_blow->montype == MONITOR_TV)))
58 { 65 {
59 /* we can use this extended mode */ 66 /* we can use this extended mode */
60 SDL_XBIOS_AddMode(this, 67 modeinfo.number = (num_mode == 3 ? BPS8 : BPS16);
61 num_mode == 3 ? BPS8 : BPS16, 68 modeinfo.width = blow_mode->width + 1;
62 blow_mode->width + 1, 69 modeinfo.height = blow_mode->height + 1;
63 blow_mode->height + 1, 70 modeinfo.depth = (num_mode == 3 ? 8 : 16);
64 num_mode == 3 ? 8 : 16, 71 modeinfo.doubleline = SDL_FALSE;
65 SDL_FALSE 72
66 ); 73 SDL_XBIOS_AddMode(this, actually_add, &modeinfo);
67 } 74 }
68 } 75 }
69 } 76 }
70 } 77 }