Professional Web Applications Themes

how to reset time base register? (os 9) - Mac Programming

ok, this time i don't mind answering the inevitable question "why would anyone want to do that?". i'm the hardware/software guy for a couple of electromechanical and video art installations based on older mac hardware, under os 9. one of them uses orbit quickcams, a small usb camera with a built-in pan/tilt capability. i found one, and only one, third- party driver for this unit under os 9, which works great, except for one small matter. there's a bug such that the driver disables the video after 1/2 hour, even though a valid, paid-for serial number has been entered. repeated ...

  1. #1

    Default how to reset time base register? (os 9)

    ok, this time i don't mind answering the inevitable question
    "why would anyone want to do that?".
    i'm the hardware/software guy for a couple of electromechanical
    and video art installations based on older mac hardware, under os 9.
    one of them uses orbit quickcams, a small usb camera with a
    built-in pan/tilt capability. i found one, and only one, third-
    party driver for this unit under os 9, which works great, except
    for one small matter. there's a bug such that the driver disables
    the video after 1/2 hour, even though a valid, paid-for serial
    number has been entered. repeated pleas to the driver people
    have been met with a deafening silence. now i can't blame them,
    twenty bucks is not enough to motivate the time required to repair
    old software. but i'm left with a real problem. i don't have
    the time or money to follow the crowd and switch to linux, the
    stuff is built, and i have to overcome the 1/2 hour time limit
    if the setup is going to sit in an exhibition.

    one unpleasant option is to learn some PPC assembler, and go through
    the driver with a disassembler looking for the validation code,
    and jump over it. but i'm pretty sure the driver uses UpTime(),
    which looks at the time base register (TBR), and it occured to me
    that if i could reset this register every 15 minutes the driver
    would be none the wiser. this is a dedicated machine, and it doesn't
    matter if the time zone for abu dhabi gets messed up. a preliminary
    google search indicates that this might be possible, but i thought
    i'd ask for any sample code or advice before i spend (any more)
    time on this problem.

    thanks!

    rob shaw
    rob Guest

  2. #2

    Default Re: how to reset time base register? (os 9)

    rob shaw wrote: 

    Even if you could reset the timer I'm not sure it would work, and it
    might also have unpleasant side-effects. Painful though it might be I
    think the best solution would be to hack the driver to remove the
    time-out check.

    Paul
    Paul Guest

  3. #3

    Default Re: how to reset time base register? (os 9)

    In article <cybermesa.com>,
    com (rob shaw) wrote:
     

    Why are you pretty sure about that?

    If you are sure about that, it should be not too hard to set a
    breakpoint (you do know how to use MacsBug, don't you?) on UpTime to
    find out from where it is called, then patch around that.

    If you are not so sure, have you considered the following to see whether
    they fix your problem?
    - calling LMSetTicks (equivalent to directly writing to the low memory
    'Ticks' variable (a long at 0x016A))
    - directly writing to the low memory 'Time' (a long at 0x020C), which
    counts seconds since January 1, 1904
     

    It might be easier to patch the UpTime system call.

    Reinder
    Reinder Guest

  4. Moderated Post

    Default Re: how to reset time base register? (os 9)

    Removed by Administrator
    rob Guest
    Moderated Post

  5. #5

    Default Re: how to reset time base register? (os 9)

    rob shaw wrote: 

    heck man, i don't think you have anything to apologize for. personally,
    i'd like to hear if you got it working or not, and how. i am unclear on
    the ultimate outcome, after reading your second post.
    Jhnny Guest

Similar Threads

  1. SWF Register data in a data base by means of PHP
    By Anuack in forum Macromedia Dynamic HTML
    Replies: 0
    Last Post: February 11th, 02:47 AM
  2. Replies: 3
    Last Post: October 17th, 02:23 PM
  3. AirPort Base Station hard reset failure?
    By Rafa Lahuerta in forum Mac Networking
    Replies: 5
    Last Post: October 3rd, 11:21 AM
  4. webcam causes airport base station reset ?
    By Monica in forum Mac Networking
    Replies: 0
    Last Post: August 9th, 08:46 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139