For discussions about development of TAPs, patches and other software for the Toppy

Moderator: Technical

deangelj
Frequent contributor
Posts: 316
Joined: Tue Mar 29, 2005 10:33 pm
Location: Sydney, Australia

Post by deangelj »

Will try to test today but if not I should be able to on the weekend.

Thanks.
John
R2-D2
Frequent contributor
Posts: 12148
Joined: Mon Dec 18, 2006 11:15 am
Contact:

Post by R2-D2 »

Any feedback on this?
deangelj
Frequent contributor
Posts: 316
Joined: Tue Mar 29, 2005 10:33 pm
Location: Sydney, Australia

Post by deangelj »

I must apologise for not providing feedback on this - the main reason is that I've transitioned to a new laptop (Vista based) and have been trying to sort out a few issues, as well as work commitments. I probably won't get a chance to look at this until next weekend.

cheers,
R2-D2
Frequent contributor
Posts: 12148
Joined: Mon Dec 18, 2006 11:15 am
Contact:

Post by R2-D2 »

Is this dead, then? I'll remove it from the PatchPack if it is.
deangelj
Frequent contributor
Posts: 316
Joined: Tue Mar 29, 2005 10:33 pm
Location: Sydney, Australia

Post by deangelj »

I have to sincerely apologise for the lack of progress on this - I haven't done any work on the PVR for some months - other events have taken over my spare time. Totally understand if you want to end the support for this.

Thank you for the work you did. Maybe it will help someone else in the future.

cheers,
John
R2-D2
Frequent contributor
Posts: 12148
Joined: Mon Dec 18, 2006 11:15 am
Contact:

Post by R2-D2 »

It's just not something I can test. I think you're the only person who was interested in any of this, so I doubt it'll be missed.
R2-D2
Frequent contributor
Posts: 12148
Joined: Mon Dec 18, 2006 11:15 am
Contact:

Post by R2-D2 »

I've updated [Cb] V3 to include an additional fix for USB reading. In order to get the USB part of the TAP API working reliably via a TAP you need:
  1. [Cb] V3 to fix the general callback issue when there's more than one TAP active.
  2. [Uc] to allow the USB read callback to re-register itself (to prevent missed packets).
  3. Remember to register a read callback (using TAP_Usb_Read/TAP_Usb_PacketRead) before sending each data/reply packet (i.e. before using TAP_Usb_Write/TAP_Usb_PacketWrite) if you're expecting a reply/data.
Strictly speaking, you can do without [Uc] if you just use the callbacks to signal changes back the TAP's Idle event handler (like the Topfield example), rather than using them to actually sending data/reply packets (which is much more efficient).

I've lost count of the bugs in Topfield's USBTest example. I'd be happy to knock up a better example if anyone is interested.
cazlar
Frequent contributor
Posts: 121
Joined: Sat Mar 26, 2005 10:25 pm
Location: Back in Sydney!

Post by cazlar »

I just wanted to resurrect this old thread to thank you all for these patches. Years ago (literally) I was fiddling around with direct USB communications and had a TAP/Mac app combo (called VirtualRemote) that sent remote control commands via USB (as well as nifty stuff like sending mini screenshots back to the Mac). Unfortunately, it only worked when it was the only TAP, and crashed randomly even then, so it was pretty useless. :(

While I've been living overseas, you guys have fixed all the bugs though! Now I'm back in Australia, I just tried it the other day using [Cb] (not sure what version, and not sure if my TAP code followed the tip in the previous post or not), but it now works! I updated the Mac app to be a universal app etc, you can check it out on my website if you want a play.

However, be advised that I currently use the TF5000 internal key codes and I'm led to believe a few keys codes are different on the UK models (not sure about German ones?). I think I may have the list of differences somewhere, or if someone could point me in the right direction that would be great.

So thanks again! I'm fiddling with the idea that I may even be able to make a small iPhone app to talk to the linked mac via wifi, which then talks to the TAP via usb, (ie an iPhone Toppy remote, albeit via a quite circuitous route).
R2-D2
Frequent contributor
Posts: 12148
Joined: Mon Dec 18, 2006 11:15 am
Contact:

Post by R2-D2 »

cazlar wrote:However, be advised that I currently use the TF5000 internal key codes and I'm led to believe a few keys codes are different on the UK models (not sure about German ones?).
It's only the TF5800 that is different, and for TAP_GenerateEvent() you'll need to reverse the normal mapping of keys that's applied. See EMJB's Key Handling Guide.

For example, on the TF5800 the Exit button has been moved and if you press it a TAP will (correctly) see RKEY_Exit sent to TAP_EventHandler(), but to have that action executed by TAP_GenerateEvent() you need to pass RKEY_AudioTrk.

As well as a few moved buttons the arrow buttons have been separated from the P+/- and V+/- actions. Each extra button generates the same thing to TAP_EventHandler() (e.g. both P+ and up arrow generate RKEY_ChUp). RemoteExtender and the [Re] patch help TAP_EventHandler() distinguish these using extra data in param2. To do up arrow via TAP_GenerateEvent() you send RKEY_ChUp, but to generate P+ you send RKEY_Subt. Note that only some TAPs bother to distinguish these.

There are no extra buttons on the TF5800 remote so some of the TF5000 ones have been lost, like Subtitle (now accessed via an options menu opened by Opt, which is where Sleep was).

The side-by-side comparison of the TF5000/TF5800 remotes should make the changes a little easier to understand.
cazlar
Frequent contributor
Posts: 121
Joined: Sat Mar 26, 2005 10:25 pm
Location: Back in Sydney!

Post by cazlar »

Thanks for the info. I was playing around yesterday and got the iPhone remote app working (well, changing channels at least, I still need to hook up all the other buttons properly). So it works as a proof-of-concept at the very least :)
Post Reply