Jump to content

[Start aTV] Apple TV Front Row Launcher (with bholland's Apple IR Emulation)


dcpark
 Share

21 posts in this topic

Recommended Posts

Hi, InsanelyMac users!

 

as you know, aTV Front Row has a restriction for the screen resolution (stuck at its own fixed 1280x...)

when running. and i'm so disgusted with this, i've made a simple workaround, aTV Front Row launcher.

 

* prerequisite: a working aTV Front Row installed as /System/Library/CoreServices/Front Row.app

(you can refer to http://forum.insanelymac.com/index.php?showtopic=46680 by DsurioN.)

 

* it goes like this:

- get the current screen resolution information from your desktop before running aTV Front Row.

- and then run VirtualIRCommand on background to control aTV Front Row with your keyboard.

- finally launch aTV Front Row and set back to the original screen resolution after a few seconds.

- enjoy aTV Front Row above than 1280x resolution, as far as your gfx card can support it!

 

* if you want to quit aTV Front Row and stop emulation, just press "ESC".

(note: be careful to press "ESC", since it will immediately kill the process!)

 

* AppleIREmulator included is based on bholland's Apple IR Remote Emulation Driver v0.2,

http://brandon-holland.com/irkeyboardemu.html ,credit goes to him as a matter of course.

 

* to install 'Start aTV' on your desktop: run 'sudo ./Install.sh' at a terminal

(run 'sudo ./Uninstall.sh' at a terminal for complete uninstallation)

 

* tip: you can adjust the delay time for resolution-rollback (default: 4 seconds)

by editting '~/Desktop/Start aTV.app/Contents/MacOS/Start aTV' script.

 

-- edit --

Updated: VirtualIRCommand, you can catch an event from your own remote and control with it!

here goes how-to:

1. get VirtualIRCommand.zip and extract it into your favorite place.

2. open a terminal and go to VirtualIRCommand/build/Release/, and then type

$ sudo chmod 4755 VirtualIRCommand

$ sudo chown 0:0 VirtualIRCommand

(from now on, you can run VirtualIRCommand without 'sudo' things.)

3. run VirtualIRCommand and watch what it prints out when you press a button on your remote.

$ ./VirtualIRCommand

(now press a button on your remote and/or keyboard)

=> VirtualIRCommand: Catched an event - value: 0x??

(this is the hex value to be mapped for emulation! remember it.)

then, press Ctrl+C to quit VirtualIRCommand (or simply ESC).

4. modify main.c for your own remote control and rebuild it!

you can see 'case 0x??: // Remote::XXX's at the bottom of main.c..

defaults are for my own remote, you might change these values

with your own values catched from the above step 3.

5. now, you're ready for control aTV Front Row with your own remote.

copy the new binary file at build/Release/VirtualIRCommand of your own

into your favorate place(e.g.: /Applications/Utilities/VirtualIRCommand)

then repair ownership&permission as step 2 ('chomod 4755'.. 'chown 0:0')

 

* note1: if you can catch hex values from your remote and don't know how

to do with, please let me know the values of your choice for each of six

buttons to be mapped. then i'll build a binary for you, if you want. :)

 

* note2: our hope bholland are working hard on a preference pane for you

to handle button mappings with easy. :hysterical: so, please wait

until then, or you can play with my hard-cord way for the time bing.

 

--

best regards

dAVId

AppleTV_FR_Launcher.zip

VirtualIRCommand.zip

Link to comment
Share on other sites

Hi, InsanelyMac users!

 

as you know, aTV Front Row has a restriction for the screen resolution (stuck at its own fixed 1280x...)

when running. and i'm so disgusted with this, i've made a simple workaround, aTV Front Row launcher.

 

* prerequisite: a working aTV Front Row installed as /System/Library/CoreServices/Front Row.app

(you can refer to http://forum.insanelymac.com/index.php?showtopic=46680 by DsurioN.)

 

* it goes like this:

- get the current screen resolution information from your desktop before running aTV Front Row.

- and then run VirtualIRCommand on background to control aTV Front Row with your keyboard.

- finally launch aTV Front Row and set back to the original screen resolution after a few seconds.

- enjoy aTV Front Row above than 1280x resolution, as far as your gfx card can support it!

 

* if you want to quit aTV Front Row and stop emulation, just press "ESC".

(note: be careful to press "ESC", since it will immediately kill the process!)

 

* AppleIREmulator included is based on bholland's Apple IR Remote Emulation Driver v0.2,

http://brandon-holland.com/irkeyboardemu.html ,credit goes to him as a matter of course.

 

* to install 'Start aTV' on your desktop: run 'sudo ./Install.sh' at a terminal

(run 'sudo ./Uninstall.sh' at a terminal for complete uninstallation)

 

* tip: you can adjust the delay time for resolution-rollback (default: 4 seconds)

by editting '~/Desktop/Start aTV.app/Contents/MacOS/Start aTV' script.

 

--

best regards

dAVId

 

Dude, the only thing you did is steal ohter peoples work and glue them together, great job :P

Link to comment
Share on other sites

Dude, the only thing you did is steal ohter peoples work and glue them together, great job ;)

 

thanks for your cynical interest. :whistle: i'm a newbie to mac os, and i just searched the above feature, then made a crude

solution for it, want to share my findings with others like me. my appreciate if it is useful to someone else except you. :P

i stated clearly credits of things and where it came from. was i wrong? :rolleyes: anyway, really thanks for your comment! bye~

 

-- edit1: another newbie want to share his findings with stolen ATIinject things... stop it?

http://forum.insanelymac.com/index.php?s=&...st&p=354004

-- edit2: PascalW, i happened to read someone said to you an important thing at..

http://forum.insanelymac.com/index.php?s=&...st&p=348382

You sound very arrogant. Not the best way to get people to develop something for you!
i wish that you should keep his advice in your mind!
Link to comment
Share on other sites

ok, this main.c is my modified source code used at VirtualIRCommand part of

the above 'Start aTV'. you can refer to my post for the description of it from...

http://www.hackint0sh.org/forum/showpost.p...mp;postcount=42

please refer to the attached source file, it is a slight modification of bholland's KeyboardReader(originally by bikedude808). it can get the event from a remote control as well as an usb keyboard. in order to make your remote to work, you should know the button id's(in hex value) for any six buttons of your choice in your remote control, and add those value to the InterruptReportCallbackFunction at the bottom of main.c... and that's all.

 

but usaully, the button id's of arrow keys on a keyboard and arrow buttons on a remote control are same, so you shoud map the other remote control buttons for navigation except arrow buttons(since they are already in use by the keyboard). in my sample codes, i mapped my remote control buttons like this:

- 'Stop' button of my remote => 'Menu' button of Apple Remote.

- 'Play' button of my remote => 'Play' button of Apple Remote.

- 'Skip Fwd(Next)' button of my remote => 'Right' button of Apple Remote.

- 'F.Rewind' button of my remote => 'Left' button of Apple Remote.

- 'F.Foward' button of my remote => 'Minus/Down' button of Apple Remote.

- 'Pause' button of my remote => 'Plus/Up' button of Apple Remote.

 

i know it is somewhat weird mappings, but this layout is fit for my own remote control.:) and any kind of remote control has those buttons in common values, first of all, you can test your remote control's stop, pause, play, etc.. and see what happens. or you can use your own button id's for that.

 

fyi: comments 'Jungfrau' in the source code refers my own remote control(built-in on my system). actually 'Jungfrau' is the code-name of our project TVPC (you can see the review for it at http://www.notegear.com/Content/Content_Re...=533&kind=2 , if you can read korean. :) )

 

tip: you can use hclient(in WinDDK) to get your remote control buttons' id on windows. in fact, i'm a newcomer on the mac os.. don't know which tools are good for investigate hid devices.. maybe 'hid explorer' at ADC is good enough on mac os..:confused: when i'm accustomed to develop on mac os environment, will go further.. :P

 

best regards,

david

 

@PascalW: some people including me want to resolve the restricted screen resolution of aTV Front Row, and my crude 'Start aTV' launcher is a kind of workaround as i said, even though it is based on other's work.

could you show us a solution of your "regular tactics", e.g. directly hacking the Finder(or Front Row) binary or so, without using any "stolen thing"(:according to your theory) :) ?

if you could, it would be much better!

 

thanks,

david

main.zip

Link to comment
Share on other sites

Dude, the only thing you did is steal ohter peoples work and glue them together, great job :rolleyes:

 

I am pretty sure it was and it is sarcastic said , come on! :angel:

Other tha this big thanks to you , dcpark , this afternoon I take some time for give it a go. :)

Link to comment
Share on other sites

hey its a good guide nonetheless! :(

 

the only thing i dislike about brandon's IR Emulator is that if you're watching something for while, you have to type in your password (for sudo) and i sometime forget and think "did the Emulator it stop working (??)" plus i'd recommend to have terminal focused before running aTV so when you hit the spacebars and arrows and stuff, you don't do any finder damage (like rename your drive " ").

Link to comment
Share on other sites

hey its a good guide nonetheless! ^_^

 

the only thing i dislike about brandon's IR Emulator is that if you're watching something for while, you have to type in your password (for sudo) and i sometime forget and think "did the Emulator it stop working (??)" plus i'd recommend to have terminal focused before running aTV so when you hit the spacebars and arrows and stuff, you don't do any finder damage (like rename your drive " ").

 

yes, you're right.

as you can see at the above main.c file attached, i've removed the 'sudo' command on VirtualIRCommand part

of 'Start aTV', so you don't need to type in any 'sudo' things to pass an IR command to VirtualIRReceiver part.

and it runs as a background process when you run 'Start aTV'. also you can quit both 'aTV Front Row' and 'the

keyboard emulation' with 'ESC' key. sometimes a simple modification gives a little bit more usability, i think. :D

thanks for your feedback!

Link to comment
Share on other sites

wait I'm confused a little. where do i put main.c? i have a Keyspan Remote for Front Row but it doesn't work with bholland's aTV Emu. Can you rephrase how to map out keystrokes.

 

The only tiny mod i did to your Start aTV app is add

 

<key>NSUIElement</key>
<string>1</string>

 

to hide the dock icon. :P

 

@lunchandamovie: please get the VirtualIRCommand.zip xcode project file. it has the same main.c file as the above.

you can modify InnterruptReportCallbackFuncion at the bottom of main.c to be matched with your remote controller.

(hex values commented 'Jungfrau' is for my own remote control inboxed on my system, and you can modify these.)

and then rebuild this project and catch a binary file VirtualIRCommand at build/release directory, and replace the old

one(/Applications/Utilities/VirtualIRCommand) with it, then 'sudo chown 4755' and 'sudo chown 0:0' to this new binary

file before running. :)

 

btw, i visited keyspan site you wrote and read specifications for your remote control. according to its specifications,

since the remote appears to your computer as a 'basic keyboard' and it also generate the same keystroke as a

standard keyboard with this mappings:

-------------------------------------------------

+/- ...... Up/Down Arrow Keys

Previous Track ...... Left/Right Arrow Keys

Next Track ...... Left/Right Arrow Keys

Play/Pause ...... Spacebar

Menu ...... Command+Esc

Mute ...... Mute Key (Mac Specific)

Eject ...... Eject Key (Mac Specific)

Sleep ...... Command+Option+Eject

-------------------------------------------------

i think you don't need to modify any code of main.c (because your remote generate all the same keystrokes

as those of keyboard.) first of all, run VirtualIRCommand on a terminal and check if it responds with your remote:

(at your terminal prompt)$ /Applications/Utilities/VirtualIRCommand

if you can see any messages like "VirtualIRCommand: Sending..." when you press a button of your remote,

this proves that your remote can work with VirtualIRCommand. if not, you may need to catch your own hex values

from your remote and then modify main.c as described above, rebuild and so on... sorry i have no such a remote

as yours in my hand, my answer is somewhat obscure. :o good luck to you!

 

--

* edit: i've missed something. looking carefully into mappings of your remote, i noticed that the play/pause button

on your remote generate the keystroke of 'Spacebar'(0x2c in hex value), which is already reserved for emulating

'Menu' button of Apple Remote... conflicting each other, oops! :o so, you need to change two things at main.c...

1. change 'case 0x2c: // Keyboard::Spacebar' into 'case YOUR_OWN_HEX_VALUE_FOR_MENU_BTN:'

in fact, the 'Menu' button on your remote will generate the keystroke of 'Cmd+Esc' which is already

reserved for launching Front Row on Mac OS X system, as you know. but after loading aTV Front Row,

it will not work without emulation since aTV Front Row would accept only those event from Apple Remote. :P

(sorry but you need to find out the hid hex value for the MENU button on your own remote to get it work.)

2. change 'case 0x28: // Keyboard::Return' into 'case 0x2c: // Keyboard::Spacebar' (in short, 0x28 => 0x2c)

in order to get the keystroke of 'Spacebar' instead of 'Return' for the Play/Pause button on your remote.

 

hope this help...

 

* edit: removed VirtualIRCommand.zip attached. it moved up to the first post with more descriptions.

please refer to and have a try for it.

 

best regards,

david

Link to comment
Share on other sites

Thank you thank you very much, david. :( This is very much new for me. What should I use to find out my hex value for each keystroke on my remote? My remote actually sends several occurrences of an event each time:

 

^[[BVirtualIRCommand: Sending [AppleRemote::MINUS]...
VirtualIRCommand: Sending [AppleRemote::MINUS]...
VirtualIRCommand: Sending [AppleRemote::MINUS]...
VirtualIRCommand: Sending [AppleRemote::MINUS]...
VirtualIRCommand: Sending [AppleRemote::MINUS]...
VirtualIRCommand: Sending [AppleRemote::MINUS]...
VirtualIRCommand: Sending [AppleRemote::MINUS]...
^[[AVirtualIRCommand: Sending [AppleRemote::PLUS]...
VirtualIRCommand: Sending [AppleRemote::PLUS]...
VirtualIRCommand: Sending [AppleRemote::PLUS]...
VirtualIRCommand: Sending [AppleRemote::PLUS]...
VirtualIRCommand: Sending [AppleRemote::PLUS]...
VirtualIRCommand: Sending [AppleRemote::PLUS]...
VirtualIRCommand: Sending [AppleRemote::PLUS]...
VirtualIRCommand: Sending [AppleRemote::PLUS]...
VirtualIRCommand: Sending [AppleRemote::PLUS]...
VirtualIRCommand: Sending [AppleRemote::PLUS]...

 

Also, it doesn't matter too much that I use another button to launch aTV (such as Sleep or Eject) so that Menu will work in aTV.

Link to comment
Share on other sites

Dude, the only thing you did is steal ohter peoples work and glue them together, great job :whistle:

 

Dude, what was the point of this post? dcpark clearly said he'd just hacked something together which works, and clearly credited the original developers (like bholland etc). Its not like he's claiming to be Teh No. 1 ub3r-l337 haxX0r g0d.

 

Personal attacks like this add nothing to the community and only work to dissuade people from contributing at all. And it makes you look like a troll.

 

Many people - myself included - can make good use of dcpark's post.

 

On the other hand, its been suggested you were joking. If this is so, then I apologise, but your post should perhaps have been better written to make it clear you were not serious.

Link to comment
Share on other sites

Dude, what was the point of this post? dcpark clearly said he'd just hacked something together which works, and clearly credited the original developers (like bholland etc). Its not like he's claiming to be Teh No. 1 ub3r-l337 haxX0r g0d.

 

Personal attacks like this add nothing to the community and only work to dissuade people from contributing at all. And it makes you look like a troll.

 

Many people - myself included - can make good use of dcpark's post.

 

On the other hand, its been suggested you were joking. If this is so, then I apologise, but your post should perhaps have been better written to make it clear you were not serious.

 

It wasn't a joke. But I said it a little bit more rude then intended, as I read it now. So I aplogise for saying it that rude. I just wondered what use it has to just glue all other peoples work together, but it looks like you've put in some own code too. I commented before I knew what you did exactly. Shouldn't have done that perhaps.

Link to comment
Share on other sites

I have a MBP and installed the Start aTV thing, but I don't see how to run appleTV Front Row in 1440x900. In addition to this, the IR Emulation driver seems to mess my keyboard controls, even when I don't use Front Row/appleTV. Everytime I hit the up or down arrow keys, it raises and declines the volume! Is that a normal issue? Can anybody explain me how to get rid of this, let me use my Apple Remote and get the thing to work under my native screen resolution?

Link to comment
Share on other sites

I have a MBP and installed the Start aTV thing, but I don't see how to run appleTV Front Row in 1440x900. In addition to this, the IR Emulation driver seems to mess my keyboard controls, even when I don't use Front Row/appleTV. Everytime I hit the up or down arrow keys, it raises and declines the volume! Is that a normal issue? Can anybody explain me how to get rid of this, let me use my Apple Remote and get the thing to work under my native screen resolution?

 

@ Cyman: as MacBook Pro already has a built-in Apple IR Receiver, actually there's no need to emulate Apple Remote.

the only purpose of emulation is to utilize your keyboard on aTV Front Row. but there is known issue that volume can

be adjusted when you press up/down keys on your keyboard. in order to avoid this, sorry but you had better give up

keyboard emulation and just use Apple Remote for aTV Front Row on your MBP. ;)

attached VirtualIRCommand is for MBP, which does only launch aTV Front Row when you run 'Start aTV.app' and does

no more emulation. if you want this, please get attached and extract it, open a terminal and move to the extracted...

(at a terminal $) sudo cp -f VirtualIRCommand /Applications/Utilities/VirtualIRCommand

(at a terminal $) sudo chmod 4755 /Application/Utilities/VirtualIRCommand

(at a terminal $) sudo chown 0:0 /Application/Utilities/VirtualIRCommand

 

and for the resolution issue, i think Start aTV can't catch excact time to rollback the screen resolution on your system.

please edit the delay time at '~/Desktop/Start aTV.app/Contents/MacOS/Start aTV' script with your favorite editor...

(around the bottom of 'Start aTV' script) 'sleep 4' => increase/decrease the delay time in seconds to fit your system.

crude way but try it. :) i hope this helps.

 

@ PascalW: i've almost forgotten about it. please never mind... and thank you very much for your warm response. :D

 

best regards,

david

VirtualIRCommand_MBP.zip

Link to comment
Share on other sites

I have a MBP and installed the Start aTV thing, but I don't see how to run appleTV Front Row in 1440x900. In addition to this, the IR Emulation driver seems to mess my keyboard controls, even when I don't use Front Row/appleTV. Everytime I hit the up or down arrow keys, it raises and declines the volume! Is that a normal issue? Can anybody explain me how to get rid of this, let me use my Apple Remote and get the thing to work under my native screen resolution?

 

I used reccomendation from bholland at Hackint0sh and removed rcd.app from /System/Library/CoreServices/rcd.app

That solved volume up/down problem for me.

Link to comment
Share on other sites

attached VirtualIRCommand is for MBP, which does only launch aTV Front Row when you run 'Start aTV.app' and does

no more emulation. if you want this, please get attached and extract it, open a terminal and move to the extracted...

(at a terminal $) sudo cp -f VirtualIRCommand /Applications/Utilities/VirtualIRCommand

(at a terminal $) sudo chmod 4755 /Application/Utilities/VirtualIRCommand

(at a terminal $) sudo chown 0:0 /Application/Utilities/VirtualIRCommand

 

Is the up-mentioned command just an example or does the VirtualIRCommand have to be placed in the Applications/Utilities folder?

I extracted your file to the desktop and therefore changed the path in the terminal command.

 

It seems I am just not smart enough to get how it's done. The volume still tunrs up and down when pushing the up and down arrow keys of my keyboard. I guess I didn't apply your VirtualIRCommand for MBPs correctly.

Furthermore I need some detailed explanations to this:

 

#!/bin/sh
#
# Start aTV: Apple TV FR2.0 Launcher by David C. Park
#   Run Apple TV FR2.0 keeping your current resolution,
#   with full Apple Remote emulation by your keyboard.
#
# Emulation  mappings: Keyboard -> Apple Remote
#   Spacebar -> MENU(Back), Return -> Play/Pause (OK)
#   Up/Down/Left/Right -> +/-/Left/Right (Navigation)
#   * Escape -> Quit Apple TV FR2.0 & VirtualIRCommand


# Get the current screen resolution before running Apple TV FR2.0
cscreen -l | grep "1 " > ~/.r.txt

# Run VirtualIRCommand to control Apple TV FR2.0 by your keyboard
/Applications/Utilities/VirtualIRCommand -startAtv &
# Specify -startAtv option in order to launch Apple TV FR2.0

# Set back to the original screen resolution after 4 seconds delay
sleep 10
cscreen -d `cat ~/.r.txt | awk '{print $2}'` -x `cat ~/.r.txt | awk '{print $3}'` -y `cat ~/.r.txt | awk '{print $4}'` -r `cat ~/.r.txt | awk '{print $5}'`

# Clean up the temporary file for your original screen resolution
rm -f ~/.r.txt

 

I can't figure what needs to be done to run aTV Front Row in my actual screen resolution... please enlighten me!

Link to comment
Share on other sites

i'm guessing no help? :censored2:

 

It is really easy.

 

1. Download BHolland´s AppleIREmulator.kext ver 0.2

2. Download loc[a]lhost´s RemoteControl.zip

3. Download Remote Buddy (Keyspan supported)

4. Install everything

5. Make Apple Scripts to control Backrow for Remote Buddy

 

It´ll work perfect.

More info: http://www.hackint0sh.org/forum/showthread.php?t=662

Link to comment
Share on other sites

I used reccomendation from bholland at Hackint0sh and removed rcd.app from /System/Library/CoreServices/rcd.app

That solved volume up/down problem for me.

 

Is it safe to delete the file? I mean it is a system file, isn't it?

 

Anyway the resolution problems I described still persist. Would you mind to explain the content of the text file (also quoted) that comes with the Start aTV.app?

Link to comment
Share on other sites

Is it safe to delete the file? I mean it is a system file, isn't it?

 

Anyway the resolution problems I described still persist. Would you mind to explain the content of the text file (also quoted) that comes with the Start aTV.app?

 

Deleting rcd.app did not break my system, but make a backup just in case.

I don´t use start aTV.app. I use aTV Finder modified and renamed to FrontRow + Manta TR1 IR receiver + Apple remote + BHolland´s AppleIREmulator.kext ver 0.2 + loc[a]lhost´s RemoteControl + TwistedMelon Mira + Apple scripts for Mira to controll aTV.

 

As for resolution. I run aTV at 1280x960. 800x600 also works.

Link to comment
Share on other sites

 Share

×
×
  • Create New...