Jump to content


Photo

Research Into Vga For Xbox 1.6 Xcalibur Encoder


  • Please log in to reply
7 replies to this topic

#1 ldotsfan

ldotsfan

    X-S Messiah

  • Dev/Contributor
  • PipPipPipPipPipPipPip
  • 3,100 posts
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 01 July 2010 - 04:31 AM

How VGA bios work by PunMaster
http://forums.xbox-s...p;#entry4019291

Work previously done on Xcalibur VGA by FrostyTheSnowman
http://forums.xbox-s...p;#entry3983164

Dump of Xcalibur Register Data by FrostyTheSnowman
http://forums.xbox-s...p;#entry3984956

Xcalibur register values from Cromwell source for NTSC and PAL
http://xbox-linux.cv.....pe=text/plain
CODE

unsigned char xcal_video_register_sequence[] = {
    0x01,0x0F,0x1B,0x50,0x51,0x52,0x54,0x55,0x56,0x58,0x59,0x5A,0x5B,0x60,
    0x61,0x62,0x63,0x64,0x65,0x66,0x80,0x81,0x45,0x46,0x47,0x48,0x42,0x43,0x44,0x1F,
    0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
    0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
    0x40,0x41,0x00,0x0C,0x0D,0x0E,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x04,0x07,0x04
};

unsigned int xcal_composite_ntsc[] = {
    0x10804003, 0x01000000, 0x00000000, 0x0D820C03, 0x27A0001E, 0x49000028, 0x0D020C03, 0x2698101E,
    0x60000028, 0x10808000, 0xF0000000, 0x8C000000, 0x01100000, 0x10004101, 0x20808000, 0x20808000,
    0x20808000, 0x20808000, 0x20808000, 0x20808000, 0x05000000, 0x0F000000, 0x04000000, 0xF8E5E108,
    0x3A3A08E1, 0xE5F80000, 0x04000000, 0xFAFD0210, 0x1B230000, 0x04000000, 0xFEFF0A00, 0xE9FF3700,
    0xE4000000, 0xFBFF0300, 0xFCFF0F00, 0xDBFF7E00, 0xC000E1FF, 0x0800FFFF, 0xFDFF0900, 0xE1FFBE00,
    0x8000DBFF, 0x0E00FCFF, 0x0300FCFF, 0x0000E200, 0x3900E8FF, 0x0B00FEFF, 0x00000000, 0x00000000,
    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
    0x02000000, 0x0F000000, 0x00000000, 0x01000000, 0x10004101, 0x24709000, 0x24709000, 0x24709000,
    0x24709000, 0x24709000, 0x24709000, 0x04000000, 0x00000303, 0x04000000
};  


Xcalibur register values for 480p
http://xbox-linux.cv.....pe=text/plain
CODE

const u32 HDTV_XCal_Vals_480p[] = {
    0x02000000, 0x30004000, 0x00000000, 0x00000000,
    0x08000000, 0xa6c08324, 0xcf6f4600, 0x00000000,
    0xffffffff, 0x00000000, 0x00000000, 0xffffffff,
    0x0f000000, 0x00000000, 0xffffffff, 0x01000000,
    0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
    0x00000000, 0xffffffff, 0xffffffff, 0xffffffff,
    0x00000000, 0x00000000, 0x00000000, 0x01000000,
    0xffffffff, 0xffffffff, 0xffffffff, 0x04000000,
    0x00000000, 0x00000000, 0x00000000, 0x00000000,
    0x00000000, 0x00000000, 0x00000000, 0x00000000,
    0x00000000, 0x00000000, 0x00000000, 0x00000000,
    0x00000000, 0x00000000, 0x00000000, 0x00000000,
    0x00000000, 0xfb001000, 0xdb016000, 0xe900e801,
    0x01000200, 0x02000300, 0xe801e700, 0x6200da01,
    0x1000fb00, 0x00000000, 0xfc000e00, 0xe0015100,
    0xc600ec01, 0x01000200, 0x02000200, 0xec01c500,
    0x5200e001, 0x0e00fc00, 0x04000000, 0x00000000,
    0x00000000, 0x04000000, 0x00000000, 0x00000000,
    0x00000000, 0xffffffff, 0xffffffff, 0xffffffff,
    0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
    0x0d020c03, 0x2594001e, 0x1c000028, 0xffffffff,
    0x0d020c03, 0x2594001e, 0x60000028, 0xffffffff,
    0x10808000, 0xf0000000, 0x4c000000, 0x0dd22000,
    0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
    0x10000001, 0x20808000, 0x20808000, 0x20808000,
    0x20808000, 0x20808000, 0x20808000, 0xffffffff,
    0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
    0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
    0x00000000, 0x00000000, 0xffffffff, 0xffffffff,
    0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
    0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
    0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
    0x05000000, 0x0f000000, 0xffffffff, 0xffffffff,
    0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
    0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
    0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
};


Initialization of Xcalibur Encoder in Cromwell
http://xbox-linux.cv.....pe=text/plain
CODE
]
//Xlb init
                XCal_Reg = newmode.encoder_regs;
                regs = malloc(4);
                
                ReadfromSMBus(0x70,4,4,&i);
                WriteToSMBus(0x70,4,4,0x0F000000);
                ReadfromSMBus(0x70,0,4,&i);
                WriteToSMBus(0x70,0,4,0x00000000);
                          
                for(i = 0; i < 0x90; i++) {
                    //Endianness.
                    memcpy(regs,(unsigned char*)(&XCal_Reg[i])+3,0x01);
                    memcpy(regs+1,(unsigned char*)(&XCal_Reg[i])+2,0x01);
                    memcpy(regs+2,(unsigned char*)(&XCal_Reg[i])+1,0x01);
                    memcpy(regs+3,(unsigned char*)(&XCal_Reg[i]),0x01);
                
                    WriteToSMBus(0x70, i, 4, *(unsigned long*)regs);
                    wait_us(500);
                }
                free(regs);


dr_oldschool's explanation of IND-BIOS VGA
http://forums.xbox-s...&...t&p=2682090

For comparison:
Conenant register data from Nkpatcher 11_U04 Source
CODE

conexantregs:
    db 0xD6, 0x2E, 0x32, 0x3C, 0x3E, 0x40, 0xC4, 0xC6, 0xCE, 0xA0, 0x9E, 0x9C, 0x6C; register
    db 0x0C, 0x00, 0x48, 0x80, 0x80, 0x80, 0x01, 0x98, 0xE1, 0x8C, 0x00, 0x00, 0x46; 480p
    db 0x0C, 0x00, 0x48, 0x80, 0x80, 0x80, 0x01, 0x98, 0xE1, 0x21, 0x00, 0x00, 0x46; 720p
    db 0x0C, 0x00, 0x48, 0x80, 0x80, 0x80, 0x01, 0x98, 0xE1, 0x21, 0x00, 0x00, 0x46; 1080i
.end


Diagram:
http://forums.xbox-s...&...t&p=4010858



#2 ldotsfan

ldotsfan

    X-S Messiah

  • Dev/Contributor
  • PipPipPipPipPipPipPip
  • 3,100 posts
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 02 July 2010 - 03:12 PM

Ref:
1. http://forums.xbox-s...howtopic=403919
2. http://openxdk.cvs.s.....pe=text/plain. OpenXDK video.c
3. http://openxdk.cvs.s.....pe=text/plain. OpenXDK video.h

Interested in these values:
CODE

{0x88070701,640,480,60,VIDEO_REGION_NTSCM,VIDEO_ADAPTER_HDTV}, //640x480p NTSCM 60Hz
{0x88080801,720,480,60,VIDEO_REGION_NTSCM,VIDEO_ADAPTER_HDTV}, //720x480p NTSCM 60Hz
{0x880B0A02,1280,720,60,VIDEO_REGION_NTSCM,VIDEO_ADAPTER_HDTV}, //1280x720p NTSCM 60Hz
{0x880E0C03,1920,1080,60,VIDEO_REGION_NTSCM,VIDEO_ADAPTER_HDTV}, //1920x1080i NTSCM 60Hz
{0x88070701,640,480,60,VIDEO_REGION_NTSCJ,VIDEO_ADAPTER_HDTV}, //640x480p NTSCJ 60Hz
{0x88080801,720,480,60,VIDEO_REGION_NTSCJ,VIDEO_ADAPTER_HDTV}, //720x480p NTSCJ 60Hz
{0x880B0A02,1280,720,60,VIDEO_REGION_NTSCJ,VIDEO_ADAPTER_HDTV}, //1280x720p NTSCJ 60Hz
{0x880E0C03,1920,1080,60,VIDEO_REGION_NTSCJ,VIDEO_ADAPTER_HDTV}, //1920x1080i NTSCJ 60Hz

{0xC0060601,640,480,60,VIDEO_REGION_NTSCM,VIDEO_ADAPTER_VGA_SOG}, //640x480 SVGA 60Hz
{0xC0030303,800,600,60,VIDEO_REGION_NTSCM,VIDEO_ADAPTER_VGA_SOG}, //800x600 SVGA 60Hz
{0xC0040404,1024,768,60,VIDEO_REGION_NTSCM,VIDEO_ADAPTER_VGA_SOG}, //1024x768 SVGA 60Hz


To do this instead:
CODE

{0xC00B0A02,1280,720,60,VIDEO_REGION_NTSCJ,VIDEO_ADAPTER_VGA_SOG}, //1280x720p SVGA 60Hz
{0xC00E0C03,1920,1080,60,VIDEO_REGION_NTSCJ,VIDEO_ADAPTER_VGA_SOG}, //1920x1080i SVGA 60Hz


And to use this code:
CODE

AvSendTVEncoderOption((PVOID)VIDEO_BASE, VIDEO_ENC_VIDEOENABLE, false ? FALSE : TRUE, NULL);

do
    {
        Step = AvSetDisplayMode((PVOID)VIDEO_BASE, Step,
            dwMode, dwFormat, width*(bpp/8), VIDEO_FRAMEBUFFER);
    } while(Step);

AvSendTVEncoderOption((PVOID)VIDEO_BASE, VIDEO_ENC_VIDEOENABLE, true ? FALSE : TRUE, NULL);





#3 ldotsfan

ldotsfan

    X-S Messiah

  • Dev/Contributor
  • PipPipPipPipPipPipPip
  • 3,100 posts
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 03 July 2010 - 05:01 AM

Ref: openxdkman's posts:
1. http://forums.xbox-s...p;#entry4352494
2. Explanation:
QUOTE(openxdkman @ Mar 6 2009, 02:26 AM) View Post

the middle column is really height and width in pixel
it's the first column that has some flag telling if it's pal/ntsc etc...

the frequencies sent are hidden in the third column that is chipset related and hard to decipher

usually you select the line you want to try then output the third code to see what happens...
theoretically this third column shows all valid combination of bits the chipset will accept


Which of these are used by Xcalibur?

#4 ldotsfan

ldotsfan

    X-S Messiah

  • Dev/Contributor
  • PipPipPipPipPipPipPip
  • 3,100 posts
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 07 July 2010 - 04:48 AM

Ref, an old xbox linux mailing list archived post,

The rest of the values for xcalibur 720p and 1080i:

CODE

Width: 1280 Height: 720 Progressive: 1 Widescreen: 1
    0x02000000, 0x30004900, 0x00000000, 0x00000000,
    0x08000000, 0x75908D73, 0xBCC44B00, 0x00000000,
    0xFFFFFFFF, 0x00000000, 0x00000000, 0xFFFFFFFF,
    0x0F000000, 0x00000000, 0xFFFFFFFF, 0x01000000,
    0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
    0x03000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
    0x00000000, 0x00000000, 0x00000000, 0x01000000,
    0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x04000000,
    0x00000000, 0x00000000, 0x00000000, 0x00000000,
    0x00000000, 0x00000000, 0x00000000, 0x00000000,
    0x00000000, 0x00000000, 0x00000000, 0x00000000,
    0x00000000, 0x00000000, 0x00000000, 0x00000000,
    0x00000000, 0xFB001000, 0xDB016000, 0xE900E801,
    0x01000200, 0x02000300, 0xE801E700, 0x6200DA01,
    0x1000FB00, 0x00000000, 0xFC000E00, 0xE0015100,
    0xC600EC01, 0x01000200, 0x02000200, 0xEC01C500,
    0x5200E001, 0x0E00FC00, 0x04000000, 0x00000000,
    0x00000000, 0x04000000, 0x00000000, 0x00000000,
    0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
    0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
    0x0D025A03, 0x2594001E, 0x2000002D, 0xFFFFFFFF,
    0x0D025A03, 0x2594001E, 0x6000002D, 0xFFFFFFFF,
    0x10808000, 0xF0000000, 0x4E000000, 0x0DD22000,
    0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
    0x10000001, 0x20808000, 0x20808000, 0x20808000,
    0x20808000, 0x20808000, 0x20808000, 0xFFFFFFFF,
    0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
    0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
    0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF,
    0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
    0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
    0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
    0x06000000, 0x0F000000, 0xFFFFFFFF, 0xFFFFFFFF,
    0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
    0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
    0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
Width: 1920 Height: 1080 Progressive: 0 Widescreen: 1
    0x02000000, 0x30004000, 0x00000000, 0x00000000,
    0x08000000, 0xF9E1967B, 0x791A5100, 0x00000000,
    0xFFFFFFFF, 0x00000000, 0x00000000, 0xFFFFFFFF,
    0x0F000000, 0x00000000, 0xFFFFFFFF, 0x01000000,
    0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
    0x03000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
    0x00000000, 0x00000000, 0x00000000, 0x01000001,
    0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x04000000,
    0x00000000, 0x00000000, 0x00000000, 0x00000000,
    0x00000000, 0x00000000, 0x00000000, 0x00000000,
    0x00000000, 0x00000000, 0x00000000, 0x00000000,
    0x00000000, 0x00000000, 0x00000000, 0x00000000,
    0x00000000, 0x00000000, 0x00001A01, 0x00000000,
    0x00000000, 0x00000000, 0x00001A01, 0x00000000,
    0x00000000, 0x00000000, 0x00000000, 0x0000F000,
    0x00000000, 0x00000000, 0x00000000, 0x0000F000,
    0x00000000, 0x00000000, 0x00000000, 0x00000000,
    0x00000000, 0x00000000, 0x00000000, 0x00000000,
    0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
    0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
    0xEE027206, 0x1A68002D, 0xD2001050, 0xFFFFFFFF,
    0xEE027206, 0x1A68002D, 0x04011050, 0xFFFFFFFF,
    0x10808000, 0xF0000000, 0x34000000, 0xEEE22E00,
    0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
    0x10000001, 0x40000000, 0x40000000, 0x40000000,
    0x40000000, 0x40000000, 0x40000000, 0xFFFFFFFF,
    0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
    0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
    0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF,
    0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
    0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
    0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
    0x0B000000, 0x0F000000, 0xFFFFFFFF, 0xFFFFFFFF,
    0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
    0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
    0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,


#5 gyhaizl

gyhaizl

    X-S Enthusiast

  • Members
  • 3 posts
  • Xbox Version:v1.3
  • 360 version:v5.0 (360S - trinity)

Posted 13 July 2010 - 04:27 AM

1.6 Output
Hope to succeed

#6 ldotsfan

ldotsfan

    X-S Messiah

  • Dev/Contributor
  • PipPipPipPipPipPipPip
  • 3,100 posts
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 13 July 2010 - 01:59 PM

If you have additional information, it will help.

#7 ldotsfan

ldotsfan

    X-S Messiah

  • Dev/Contributor
  • PipPipPipPipPipPipPip
  • 3,100 posts
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 22 July 2010 - 05:33 AM

Some information on the GPU. http://web.archive.o.../docs/nv2a.html

#8 gyhaizl

gyhaizl

    X-S Enthusiast

  • Members
  • 3 posts
  • Xbox Version:v1.3
  • 360 version:v5.0 (360S - trinity)

Posted 23 December 2010 - 05:48 AM

someone can 1.6 vga out? thanks




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users