TV position, code change

  • Morten Olesen
    Morten Olesen

    Ok I know that it isn't possible to change position via parameters from the command line, but since It can be done in in the position tab via the gui I got the idea to just hard code some new defaults ...
    So in 'back_nvidia.c' I changed :

    static int bnv_view_tv_x = 0;
    static int bnv_view_tv_y = 0;


    static int bnv_view_tv_x = -3;
    static int bnv_view_tv_y = -5;

    now everythin compiles, but even though I use the newly compiled version of nvtv it does not give me the correct offset before I go to the position tab and enters -3 & -5 manualy and press apply.

    So either those values are never used or im in the wrong file... ( ehh well or they aren't what I belive them to be )

    A little background :
    Im using:
    geforce 2 Ultra
    nvidias closedsource drivers
    nvtvd -N  as root ( I've also tried using the newly compiled nvtvd, but with same result )
    ./nvtv -N -X -t -r 768,576 -s Large -S PAL

    Any one have any clue how to do this?
    Or is it even possible?

    In case you wonder why I want to do this it becourse the box im using nvtv on is not normaly equipped with mouse or keyboard so it's quite a hazzle to use gui tools...

    • Morten Olesen
      Morten Olesen

      My net connection died shortly after posting the above - not having anything to do I startede trying to decifer the source code and found a way to modify it to accept offset from the commandline:

      In nvtv.c, find this line:
      "static OptIntDecl opt_set_list [] = {"
      In this structure insert:
         {"TV_Hoffset",     min: -50, max: 50, SET_FIELD(tv_hoffset)},
        {"TV_Voffset",       min: -50, max: 50, SET_FIELD(tv_voffset)},

      before the line:
      "  {NULL}"

      That is all... nvtv now accepts two new --set parameters TV_Hoffset, TV_Voffset for repectivly Horisontal and Vertical offset.

      A couple of warnings:
      The range -50 to 50 it in no way representative for what you video card will tolerate, so dont use values the gui wont allow..

      Since this change was so simple, im thinking Dirk properly has reasons for not including it as a option from the commandline, most properly the feature isn't supported on some chips or somthing - so use with care

      I cant guarentee this will work for you, or even that it will not harm your card, so use this at your own risk..

    • hakrz1

      thanks i found this helpful :)

    • naysayer

      THANK YOU!
      I use an nvidia geforce3, and my TV needs a -70 horizontal offset line up correctly. I had to enter a horizontal offset manually all the time, and it was rather annoying.

      I used your patch, and now via an icon that runs a commandline setting, it turns on my TV and jumps to the right offset position too!

      I use Ubuntu edgy eft, and here's what I did:
      got the nvtv source.
      pasted into nvtv.c  (you used max 50, but my TV needs 70)
        {"TV_Hoffset", min: -70, max: 70, SET_FIELD(tv_hoffset)},
        {"TV_Voffset", min: -70, max: 70, SET_FIELD(tv_voffset)},

      apt-get install libxxf86vm-dev pciutils-dev xlibs-dev
      ./configure --without-gtk --without-debug
      cd src; make ;

      now I can do
      nvtv -t -S NTSC -s Huge -r 800,600 --set TV_Hoffset:-70 --set TV_Voffset:0
      and its great!