JP1 Remotes Forum Index JP1 Remotes


FAQFAQ SearchSearch 7 days of topics7 Days MemberlistMemberlist UsergroupsUsergroups RegisterRegister
ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in

Apple TV in XBMC mode for 6131 help
Goto page 1, 2, 3, 4, 5  Next
 
Post new topic   Reply to topic    JP1 Remotes Forum Index -> JP1 - Beginners
View previous topic :: View next topic  
Author Message
deadken



Joined: 21 Jan 2005
Posts: 8

                    
PostPosted: Fri Feb 27, 2009 3:44 am    Post subject: Apple TV in XBMC mode for 6131 help Reply with quote

Hello,

I've got an Apple TV and it took me all of 30 seconds to realize the benefits of dumping the main interface and using XBMC instead.

Anyway, I've got the 6131 working fine for the normal 6 button ATV remote, but XBMC, realizing the limitations of the remote, adds sequences so you can mimic a real remote.

The main approach is to start a sequence with a long Menu Press, 400 ms, followed by two keys.

For example, Pause is defined by Hold Menu, up, down.

I can't quite figure out how to handle these sequences. The most straight forward approach would be via Macros, but I don't seem to have the ability to do a long press with the old extender. Ideally, the standard Apple TV protocol file could be modified to have the Menu Hold, then I think I could handle the rest, but I'm not sure how to do this.

Any pointers?
Back to top
View user's profile Send private message
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 21238
Location: Chicago, IL

                    
PostPosted: Fri Feb 27, 2009 5:40 pm    Post subject: Reply with quote

If, like me, you have no idea what an "Apple TV" is and what the XBMC option is, here's what I've found from some quick research.

First off, an "Apple TV" is not a TV set made by Apple as I had assumed, it sounds like it's software that runs on an Apple Mac. XBMC sounds like some sort of hack/add-on that has been developed independently.

Here's a link with some additional info:
http://xbmc.org/wiki/?title=XBMC_for_Mac_on_Apple_TV

As far as finding some info regarding deadken's issue with the buttons, the best i could find is this...
http://xbmc.org/forum/showthread.php?t=38434

I see that I created an upgrade for the "Apple TV" back in April 2007, which I loaded into the TV folder (because I assumed it was a TV), so I will move it to the Misc folder:
http://www.hifi-remote.com/forums/dload.php?action=file&file_id=4481

And here's the PB file for the custom protocol:
http://www.hifi-remote.com/forums/dload.php?action=file&file_id=6306

Here's the original thread where the Apple TV protocol was decoded:
http://www.hifi-remote.com/forums/viewtopic.php?t=8175

It shouldn't be too hard to re-write the executor so that it will generate a "held" signal when requested and there are enough spare bits in the OBC that the trigger can be stored there. I don't know when I could get to this though.
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
tildajones



Joined: 14 Jun 2008
Posts: 31
Location: Nashville, TN

                    
PostPosted: Sun Nov 29, 2009 10:59 pm    Post subject: Reply with quote

Hate to bump an old thread, but I am looking to do the exact same thing. So, I felt that tracking all work toward this effect in the same thread is the way to go.

Has anyone made in progress on using the new Universal remote mode in XBMC on an Apple TV?

If it is possible to fully utilize my URC-8811 in XBMC on an ATV, I will snatch up a couple of these units.

Here is a thread for the Harmony remotes that does provide some insight:
http://xbmc.org/forum/showthread.php?t=39209

Also, it may be helpful to enable verbose output in the XBMCHelper:
killall XBMCHelper
./XBMC.app/Contents/Resources/XBMC/XBMCHelper --verbose --universal
Back to top
View user's profile Send private message
vickyg2003
Site Admin


Joined: 20 Mar 2004
Posts: 7073
Location: Florida

                    
PostPosted: Mon Nov 30, 2009 8:38 am    Post subject: Reply with quote

I've done a bit of research on this, but I'm not following this very well.

It appears that there is a hardware hack for this unit that loads XMBC into the Apple TV player.

The original remote has 6 commands and the hardware hack will interpret a long keypress + 2 additional key presses(?) to get you to directly to a given function. The original poster wanted to put these in a macro, I assume this would be a DSM macro, and since the first key needs to be held, the protocol would need to be hacked.

Quote:
The_Robman wrote:
It shouldn't be too hard to re-write the executor so that it will generate a "held" signal when requested and there are enough spare bits in the OBC that the trigger can be stored there. I don't know when I could get to this though.


I assume since there are only 6 codes to work with that if I dig farther I'll see that the original 6 commands are grouped together so that a few bits are available for to hold parameter.

Now my question in all of this is whether a macro approach is going to work? How many commands are we talking about?
I'd like to see a complete list of the Apple XMBC commands, before working on a protocol upgrade. I think that information might be found in the RAR file in the link above but I can't open RAR files.
_________________
Remember to provide feedback to let us know how the problem was solved and share your upgrades.

Tip: When creating an upgrade, always include ALL functions from the oem remote, even if you never plan on assigning them to a button. Complete function lists makes an upgrade more helpful to others.
Back to top
View user's profile Send private message Visit poster's website
tildajones



Joined: 14 Jun 2008
Posts: 31
Location: Nashville, TN

                    
PostPosted: Mon Nov 30, 2009 2:59 pm    Post subject: Reply with quote

You are mostly correct. It is not a hardware mod; it is a software mod. The user creates a patchstick (on a USB thumb drive) that includes the XBMC application on it. The ATV is then booted with the patchstick connected, and the patches are applied.

http://code.google.com/p/atvusb-creator/

The original remote has 6 buttons with 12 keypress commands (I believe -- long press for each button). The XBMCHelper has been modified to accept a new universal mode ir where a user can send multiple keypresses within 500ms and the unit will interpret as a single command.

http://code.google.com/p/atv-xbmc-launcher/wiki/UniversalMode

You can buy refurbished 40GB ATVs from Apple for $149. These units seem like great HTPCs for very little money. I have been running XBMC on xboxes for years and love the interface. My JP1 remotes take full advantage of the numerous key mappings in XBMC, and I simply do not want to be limited by Apple's six button ir receiver (from what I have read the IR receiver is limited by software to only respond to the known Apple signals).

I am not the most proficient when it comes to this JP1 stuff; so, any help here would be greatly appreciated.
Back to top
View user's profile Send private message
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 21238
Location: Chicago, IL

                    
PostPosted: Mon Nov 30, 2009 6:22 pm    Post subject: Reply with quote

Vicky asked me to jump in and offer my 2 cents, so here goes.

The original remote sends a signal very similar to NEC1 where the data portion gets sent once, then if the button is held down a string with no data gets repeatedly sent until the button is released. So the remote does not send a different OBC when the button is held.

The buttons are overloaded so that when they are held down they do something different to when they are pressed and released. We created an upgrade for this a while back which gives the user the ability to separate the short press functions from the long press functions:

KM:
http://www.hifi-remote.com/forums/dload.php?action=file&file_id=2663

PB:
http://www.hifi-remote.com/forums/dload.php?action=file&file_id=2664

In this upgrade, the long hold buttons are generated by adding 128 to the OBC of the original button. For example, the OBC for PLAY is 5 and the OBC for POWER-OFF (which is PLAY held) is 133 (ie, 128 + 5).

Therefore, if you want to take the macro approach, use that upgrade as a starting point.

If you want a new custom executor that takes care of everything for you, that will be a bit harder.

The special functions all start with the MENU button being held, followed by regular presses of two buttons. There are just 6 regular buttons, which means you would need 3 bits to identify each button.

Therefore, one approach would be to modify the current executor as follows:

First, you could supply the hex codes for the 6 regular buttons via fixed data. This would increase the number of fixed bytes from 3 to 9 so you would need to set it back to 3 in the code.

Bit0 has already been re-purposed as the flag that indicates long presses are needed, so that could remain in place.

Bit1 appears to be used to make the hold time even longer. I don't see a need to keep this, so let's re-use this to indicate that a special combo is needed. Therefore, when bit1 is set, you should send the MENU-HOLD command, followed by two more regular press buttons.

So first, send the MENU button and repeat it 17 times (if 17 isn't enough, try 22).

To determine the first regular button to send, load the OBC byte to a scratch register and mask it so that only the 3 rightmost bits are still present, then use this as an index to load the correct fixed byte into place as the OBC byte and send the signal.

To determine the 2nd regular button to send, load the OBC byte to a scratch register, then rotate it right three times, then mask the same three bits and use this as an index to send the correct fixed byte into place as the OBC byte and send the signal.
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
vickyg2003
Site Admin


Joined: 20 Mar 2004
Posts: 7073
Location: Florida

                    
PostPosted: Mon Nov 30, 2009 7:07 pm    Post subject: Reply with quote

Thanks for the link to the upgrade. I was looking at the wrong one.

I read this several times. It looks like an elegant solution. I'm glad I asked for your input.
_________________
Remember to provide feedback to let us know how the problem was solved and share your upgrades.

Tip: When creating an upgrade, always include ALL functions from the oem remote, even if you never plan on assigning them to a button. Complete function lists makes an upgrade more helpful to others.
Back to top
View user's profile Send private message Visit poster's website
vickyg2003
Site Admin


Joined: 20 Mar 2004
Posts: 7073
Location: Florida

                    
PostPosted: Tue Dec 01, 2009 6:53 am    Post subject: Reply with quote

Tilda, with your urc-8811 and the upgrade for the ipod dock, you can get this working with DSM (device specific macros). If you want to pursue this as an upgrade, I can try to get this running, but it will be a trial and error type thing. Which way do you want to pursue?
_________________
Remember to provide feedback to let us know how the problem was solved and share your upgrades.

Tip: When creating an upgrade, always include ALL functions from the oem remote, even if you never plan on assigning them to a button. Complete function lists makes an upgrade more helpful to others.
Back to top
View user's profile Send private message Visit poster's website
tildajones



Joined: 14 Jun 2008
Posts: 31
Location: Nashville, TN

                    
PostPosted: Wed Dec 02, 2009 10:39 pm    Post subject: Reply with quote

I'm open to trying anything.

I have made a few remote master upgrade files in the past. Obviously, nothing as complex as what we are talking about here.

I do have a question about the macro solution. I do not see a place in remote master where you can assign macros; so, I suspect macros are assigned via ir. Is this correct? If so, the macro tab in ir does not appear to be specific to a particular remote mode(read TV, RCVR, DVD, etc). How do I make sure that a macro assigned to the play button of my 8811 only fires when the remote is in CD mode?
Back to top
View user's profile Send private message
vickyg2003
Site Admin


Joined: 20 Mar 2004
Posts: 7073
Location: Florida

                    
PostPosted: Thu Dec 03, 2009 6:23 am    Post subject: Reply with quote

tildajones wrote:
I'm open to trying anything.

I have made a few remote master upgrade files in the past. Obviously, nothing as complex as what we are talking about here.


Yeah, you and me both. To do this via an upgrade is going to be a real challenge. I think its doable, its just a stretch for me, especially in the s3c8 language.


Quote:

I do have a question about the macro solution. I do not see a place in remote master where you can assign macros; so, I suspect macros are assigned via ir. Is this correct?


Yes the macros would need to be assigned via IR.

Quote:

If so, the macro tab in ir does not appear to be specific to a particular remote mode(read TV, RCVR, DVD, etc). How do I make sure that a macro assigned to the play button of my 8811 only fires when the remote is in CD mode?


DSM (Device Specific Macros) on the 8811 are constructed using a special protocol that was written by our members. I'm pretty sure it installs with the extender. I don't know if there is a DSM for the unextended version of this remote.

You could do this with regular macros, but then it would be global so you'd lose the keys for regular use.

The xmbc upgrade is going to be a challenge and I didn't want to even try it if nobody was going to test it.
_________________
Remember to provide feedback to let us know how the problem was solved and share your upgrades.

Tip: When creating an upgrade, always include ALL functions from the oem remote, even if you never plan on assigning them to a button. Complete function lists makes an upgrade more helpful to others.
Back to top
View user's profile Send private message Visit poster's website
vickyg2003
Site Admin


Joined: 20 Mar 2004
Posts: 7073
Location: Florida

                    
PostPosted: Fri Dec 04, 2009 12:07 pm    Post subject: Reply with quote

Hi Rob,
Quote:
To determine the first regular button to send, load the OBC byte to a scratch register and mask it so that only the 3 rightmost bits are still present, then use this as an index to load the correct fixed byte into place as the OBC byte and send the signal.


I'm having a little trouble with that creepy S3C8+ language. The original protocol uses W1 for a scratch register. I'm finding that the contents of W1 can cause the signal to be corrupt when it sent.

So what registers can be used as scratch registers?
_________________
Remember to provide feedback to let us know how the problem was solved and share your upgrades.

Tip: When creating an upgrade, always include ALL functions from the oem remote, even if you never plan on assigning them to a button. Complete function lists makes an upgrade more helpful to others.
Back to top
View user's profile Send private message Visit poster's website
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 21238
Location: Chicago, IL

                    
PostPosted: Fri Dec 04, 2009 3:06 pm    Post subject: Reply with quote

OK, before we start, let's look at how the fixed data is used in the old executor

fixed
R03 = byte1
R04 = byte2
R05 = byte4

variable
R06 = byte3 (OBC)

and now let's plan how it will be used in the new executor

R03 = "50" - up
R04 = "30" - down
R05 = "90" - left
R06 = "60" - right
R07 = "A0" - play
R08 = "C0" - menu

R09 = "77" - byte1
R0A = "E1" - byte2
R0B = "C2" - byte4

variable
R0C = byte3 (OBC)

FYI: the byte3 and byte4 data is swapped before the signal is sent.

We're going to want the OBC scratch register to survive the call to the XMITIR, so we will use W6 in the new logic as this is the only scratch register that I know of that will survive a call to XMITIR, all the others will get over-written.

Also, as we're going to be sending multiple "buttons", we'll need to turn off the repeat flag (R29 bit0) as default and then turn it on when it's needed.

Now, let's look at the PB file that I referenced earlier.

1) FF02 - Change the fixed bytes from 3 to 9.
2) FF06 - turn off repeat, change from 4D to 4C (ie, 01001100)
3) Add 6 to the DCBUF displacements
4) Because we've added 6 bytes of fixed data, we'll need to add code to make sure that the XMITIR engine ignores them. We can do this by moving 6 to R01.
5) In the "Normal:" section, we should turn the repeat flag back on. We do this by flipping bit0 of register R29 (or PF0 as it's known in PB).
6) The 3rd and 4th bytes are swapped before the signal is sent and the code that does this is in the "Normal:" section. We'll need to move the first part of this code up to earlier in the code as we need it to be performed before we do our new logic. So, move the first line in Normal to the line after the "Get OBC" line.

Now, that's the prep work done, next we need to add our new logic. As I mentioned before, we are going to re-purpose the bit1 logic that currently sets the repeats to 22. So we are going to delete the following line and add all of our new logic in this spot:
Code:
LD    MinRpt,#22   ;set repeats to 22


The new logic should be something like this:
1) Send the MENU button
2) Grab the first 3 bits from the OBC byte and use them as an index to grab the code for the 1st button
3) Send the button
4) Grab the next 3 bits from the OBC byte and use them as an index to grab the code for the 2nd button
3) Drop into the Normal logic to send the button.

I've done this using PB so you can try it out. I only changed the S3C8 code, so if it works, you'll have to do the HCS08 code.

http://www.hifi-remote.com/forums/dload.php?action=file&file_id=7604
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
vickyg2003
Site Admin


Joined: 20 Mar 2004
Posts: 7073
Location: Florida

                    
PostPosted: Fri Dec 04, 2009 4:38 pm    Post subject: Reply with quote

Thanks Rob, as always your help was greatly appreciated.

Since your first post had all 10 bytes of the data buffer full, (and I didn't know about W6) I could't figure out how to preserve the OBC between key presses. So I had taken a slightly different approach to this by embedding the 6 raw keys inside the protocol, so I could have wiggle room in the databuffer to save settings. But my first attempt sent a crazy signal, and I couldn't figure out why, but it turned out that I had a different variable in W1 and as a result the signal was coming out really screwy. That made me very wary of trying any registers.

I'll study your code and see what it does.

Thanks you!
_________________
Remember to provide feedback to let us know how the problem was solved and share your upgrades.

Tip: When creating an upgrade, always include ALL functions from the oem remote, even if you never plan on assigning them to a button. Complete function lists makes an upgrade more helpful to others.
Back to top
View user's profile Send private message Visit poster's website
tildajones



Joined: 14 Jun 2008
Posts: 31
Location: Nashville, TN

                    
PostPosted: Fri Dec 04, 2009 6:13 pm    Post subject: Reply with quote

Wow!..... just WOW!

You are so far beyond my JP1 knowledge; I'm glad I can contribute something to this cause. I'll be happy to test any upgrades you want to throw my way.
Back to top
View user's profile Send private message
vickyg2003
Site Admin


Joined: 20 Mar 2004
Posts: 7073
Location: Florida

                    
PostPosted: Fri Dec 04, 2009 8:04 pm    Post subject: Reply with quote

Tilda, Its going to take a while to get this up and running, don't expect anything before next weekend. Make sure to click on the "Notify me " checkbox, so you'll be notified when things happen in this thread.

Could you to find some technical information for me. I need to know how long the menu key needs to be held down, and how much time the multi-part signals have to fit in.
_________________
Remember to provide feedback to let us know how the problem was solved and share your upgrades.

Tip: When creating an upgrade, always include ALL functions from the oem remote, even if you never plan on assigning them to a button. Complete function lists makes an upgrade more helpful to others.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic       JP1 Remotes Forum Index -> JP1 - Beginners All times are GMT - 5 Hours
Goto page 1, 2, 3, 4, 5  Next
Page 1 of 5

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

Powered by phpBB © 2001, 2005 phpBB Group
Top 7 Advantages of Playing Online Slots The Evolution of Remote Control