[Mplayer-cvslog] CVS: main/osdep vbelib.h, 1.11, 1.12 vbelib.c, 1.23, 1.24

Alex Beregszaszi syncmail at mplayerhq.hu
Fri Jun 25 19:29:20 CEST 2004


CVS change done by Alex Beregszaszi

Update of /cvsroot/mplayer/main/osdep
In directory mail:/var2/tmp/cvs-serv17519/osdep

Modified Files:
	vbelib.h vbelib.c 
Log Message:
neomagic tv out support throught vesa vbe, patch by Rudolf Marek

Index: vbelib.h
===================================================================
RCS file: /cvsroot/mplayer/main/osdep/vbelib.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- vbelib.h	22 Aug 2002 23:03:51 -0000	1.11
+++ vbelib.h	25 Jun 2004 17:29:18 -0000	1.12
@@ -82,6 +82,8 @@
 #define MODE_WIN_RELOCATABLE 	(1 << 0)
 #define MODE_WIN_READABLE 	(1 << 1)
 #define MODE_WIN_WRITEABLE 	(1 << 2)
+#define NEO_PAL 0
+#define NEO_NTSC 1
 
 /* SuperVGA mode information block */
 struct VesaModeInfoBlock {
@@ -211,6 +213,7 @@
 extern int vbeGetDisplayStart(unsigned *pixel_num,unsigned *scan_line);
 extern int vbeSetDisplayStart(unsigned long offset, int vsync);
 extern int vbeSetScheduledDisplayStart(unsigned long offset, int vsync);
+extern int vbeSetTV(unsigned int vesa_mode,unsigned int TV_mode);
 /*
    Func 0x08-0x09:
    Support of palette currently is not implemented.

Index: vbelib.c
===================================================================
RCS file: /cvsroot/mplayer/main/osdep/vbelib.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- vbelib.c	13 Nov 2003 20:53:40 -0000	1.23
+++ vbelib.c	25 Jun 2004 17:29:18 -0000	1.24
@@ -6,6 +6,7 @@
    You can redistribute this file under terms and conditions
    of GNU General Public licence v2.
    Written by Nick Kurshev <nickols_k at mail.ru>
+   Neomagic TV out support by Rudolf Marek <r.marek et sh.cvut.cz>
 */
 
 #include <../config.h>
@@ -336,6 +337,46 @@
   return retval;
 }
 
+
+int vbeSetTV(unsigned int vesa_mode,unsigned int TV_mode) {
+
+#define NR_MODES 8
+
+unsigned int mode_table[NR_MODES] =    
+			{0x101,0x103,0x111,0x114,0x120,0x121,0x122,0x123};
+unsigned int tv_table[][NR_MODES] = {
+	        	{0x201,0x202,0x211,0x212,0x221,0x231,0x222,0x232},
+	        	{0x200,0x203,0x210,0x213,0x220,0x230,0xFFFF,0xFFFF}};
+
+/*
+
+Alternate mode map. If modes like 320x240 and 400x300 does not work, but
+640x480 and 800x600 work, then try to replace above two lines with this
+lines and write email to me if it works.
+r.marek et sh.cvut.cz
+
+	        	{0x201,0x202,0x211,0x212,0x222,0x223,0x224,0x225},
+	        	{0x200,0x203,0x210,0x213,0x220,0x221,0xFFFF,0xFFFF}};
+
+*/				 
+  int i,retval;
+  struct LRMI_regs r;
+
+  memset(&r,0,sizeof(struct LRMI_regs));
+  for (i=0;((mode_table[i]!=(vesa_mode&0x3FF))&&(i<NR_MODES));i++) ;
+  
+  if (i==NR_MODES) return 0;
+  if(verbose > 1) printf("vbelib: Trying to set TV mode %x\n",tv_table[TV_mode][i]);
+  r.eax = 0x4f14;
+  r.ebx = 0x20;
+  r.edx = 0;
+  r.edi = 0;
+  r.ecx =  tv_table[TV_mode][i];
+  retval = VBE_LRMI_int(0x10,&r);
+  if(!retval) return VBE_VM86_FAIL;
+  return r.eax & 0xffff;
+  
+}
 int vbeSetMode(unsigned mode,struct VesaCRTCInfoBlock *data)
 {
   struct LRMI_regs r;




More information about the MPlayer-cvslog mailing list