# HG changeset patch # User Patrice Mandin # Date 1253366465 0 # Node ID 13de8ea401dbaf979bcb0d65a6881fb91eb3059d # Parent 05c9e942cc46bd44180ae42f6bc6f714784bc515 Start Milan video support diff -r 05c9e942cc46 -r 13de8ea401db src/video/xbios/SDL_xbios.c --- a/src/video/xbios/SDL_xbios.c Sat Sep 19 12:46:00 2009 +0000 +++ b/src/video/xbios/SDL_xbios.c Sat Sep 19 13:21:05 2009 +0000 @@ -50,6 +50,7 @@ #include "SDL_xbios_centscreen.h" #include "SDL_xbios_sb3.h" #include "SDL_xbios_tveille.h" +#include "SDL_xbios_milan.h" #define XBIOS_VID_DRIVER_NAME "xbios" @@ -183,6 +184,8 @@ } } break; + case VDO_MILAN: + break; default: return 0; } @@ -488,6 +491,9 @@ } } break; + case VDO_MILAN: + SDL_XBIOS_ListMilanModes(this, 0); + break; } for ( i=0; i + +#include "SDL_xbios.h" +#include "SDL_xbios_milan.h" + +#ifndef Validmode +#define Validmode(mode) \ + (short)trap_14_ww((short)0x5f,(short)(mode)) +#endif + +#define NUM_PREDEFINED_MODES 7 + +typedef struct { + Uint16 width, height; +} predefined_mode_t; + +static const predefined_mode_t mode_list[NUM_PREDEFINED_MODES]={ + {640,400}, + {640,480}, + {800,608}, + {1024,768}, + {1152,864}, + {1280,1024}, + {1600,1200} +}; + +static const Uint8 mode_bpp[4]={ + 8, 15, 16, 32 +}; + +void SDL_XBIOS_ListMilanModes(_THIS, int actually_add) +{ + int i; + + /* Read infos about current mode */ + + /* Read validated predefined modes */ + for (i=0; i