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

Microsoft MCE Keyboard Remote
Goto page Previous  1, 2, 3 ... 12, 13, 14, 15, 16  Next
 
Post new topic   Reply to topic    JP1 Remotes Forum Index -> JP1 - Keyboards
View previous topic :: View next topic  
Author Message
vickyg2003
Site Admin


Joined: 20 Mar 2004
Posts: 7073
Location: Florida

                    
PostPosted: Mon Oct 02, 2017 6:41 pm    Post subject: Reply with quote

Okay I don't know what I'm doing wrong. I even rebooted my machine, and this is what I'm seeing. I even did it from a different browser and saved it under a new name in a different folder.


http://getzweb.net/random/wrongdate.JPG

Note the date in the zip file is different than the date on the download page.

I even opened it, and looked at the PB and I'm still seeing the very big leadout time unless you patched it a different way than just copying and pasting the line that I recommended and tested.
_________________
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: 21200
Location: Chicago, IL

                    
PostPosted: Mon Oct 02, 2017 7:27 pm    Post subject: Reply with quote

That file is called MCE Combo-1.zip, mine is called MCE Combo.zip

Here, I've created version called MCE new combo for Vicky.zip and done a new upload, just in case there's a caching issue.
http://www.hifi-remote.com/forums/dload.php?action=file&file_id=14725

(and just FYI, I created that file at work and am now at home, so I had to download it first myself in order to re-load it).
_________________
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: Tue Oct 03, 2017 10:12 am    Post subject: Reply with quote

The 1 was just an indication that I did it more than once. Even unzipping it from a fresh boot, different browser put a date on it of 9/27

The new file has a 10/2 date so I do know I'm testing the correct file.


I tested the combo KM, with the protocol included in the KM Sheet as well as the protocol directly from protocol builder. They both worked the regular mouse and shifted and regular keyboard commands but with both protocols, Left Test 1 and Left Test 2 DID NOT WORK.

Upon looking at the protocol I see that you added mouse on as total

Code:

   LDW   RR1C,#5800h   ;set Leadout off=45056 uS
   LD   R28,#CEh   ;switch to OffAsTotal

instead of the recalculated timeout that I supplied before
Code:

   LDW   RR1C,#2e66h   ;set Leadout off=23756 uS


3 bytes is 3 bytes.

I started looking at this for JP1.2. Is there any reason you use the actual registers instead of the easily translated DCBUF (Device Command Buffer) addressing that PB supports? I am mildly dyslexic. I know you can't really understand what that is like, but it is a real handicap when it comes to this work. I'm okay with reading, if it doesn't make sense, I reread it more carefully, but numbers give me problems, hex and binary are really difficult for me to process.

Hex Example
1F8
I ALWAYS see this as 158 unless I isolate one letter number at a time.

Dealing with the register numbers takes lots of mental work for me. It is just as difficult as all the machinations we have to go through to get things into IR to get a timing summary so that we can dump it into notepad, so we can do find and replace, but its all going on in my head. As you know I CAN do it, but it is really really difficult.[/code]
_________________
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: 21200
Location: Chicago, IL

                    
PostPosted: Tue Oct 03, 2017 11:03 am    Post subject: Reply with quote

vickyg2003 wrote:
Left Test 1 and Left Test 2 DID NOT WORK.
Ok, I will take another look at those.

vickyg2003 wrote:
Upon looking at the protocol I see that you added mouse on as total

Code:

   LDW   RR1C,#5800h   ;set Leadout off=45056 uS
   LD   R28,#CEh   ;switch to OffAsTotal

instead of the recalculated timeout that I supplied before
Code:

   LDW   RR1C,#2e66h   ;set Leadout off=23756 uS

See, that's why I asked you to just edit the protocol yourself, rather than me try and interpret what you said, so what I did was just copy your code from your mouse PB file. If you recall, when I didn't originally notice that you used OffAsTotal, you corrected me and I added it. I think the shorter time thing was earlier than that. Either way, what is your current position on the leadout?

vickyg2003 wrote:
3 bytes is 3 bytes.

You lost me there.

vickyg2003 wrote:
I started looking at this for JP1.2. Is there any reason you use the actual registers instead of the easily translated DCBUF (Device Command Buffer) addressing that PB supports?

Yeah, I started writing executors long before the DCBUF thing came out and I never quite got used to it, so I always switch back to registers as I have all of those memorized. For example R03-R0C are the inputs, R10/R11 are the lengths of fixed/var, R12/R13 are the #bits, R28+ holds the data block codes, etc.
_________________
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
The Robman
Site Owner


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

                    
PostPosted: Tue Oct 03, 2017 6:22 pm    Post subject: Reply with quote

I didn't have the checksum quite right, so I fixed it. I also went back and tried to re-read everything you said about the mouse leadout time and using or not using total and I think I got what you're asking for this time, which is do NOT use Total and set the time to 23756. If that is still not right, PLEASE update the protocol yourself and cut out the middle man.

I also had PB generate the labels so you can read the code easier.

I have updated the regular combo file here:
http://www.hifi-remote.com/forums/dload.php?action=file&file_id=14702

and assuming that you're still having issues with caching, I have deleted the other "just for Vicky" version of the combo and have created a new one here:
http://www.hifi-remote.com/forums/dload.php?action=file&file_id=14727
_________________
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: Tue Oct 03, 2017 6:59 pm    Post subject: Reply with quote

The Robman wrote:
I didn't have the checksum quite right, so I fixed it. I also went back and tried to re-read everything you said about the mouse leadout time and using or not using total and I think I got what you're asking for this time, which is do NOT use Total and set the time to 23756. If that is still not right, PLEASE update the protocol yourself and cut out the middle man.
. Yes use the 23756 as the leadout time so you don't have to use another 3 bytes of instructions to change the protocol flags.

On your last copy i really tried to understand the checksum bytes. I hope to be able to get the jp1.2 version as well.


Quote:

I also had PB generate the labels so you can read the code easier.

Your minion really appreciates that.
_________________
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: 21200
Location: Chicago, IL

                    
PostPosted: Tue Oct 03, 2017 7:35 pm    Post subject: Reply with quote

vickyg2003 wrote:
On your last copy i really tried to understand the checksum bytes. I hope to be able to get the jp1.2 version as well.


Use my MCE.xls spreadsheet as a guide, especially the "Checksum" tab.
http://www.hifi-remote.com/forums/dload.php?action=file&file_id=14692

This is going to seem more complicated than it really is, but hopefully, once you get it, you'll see how simple it really is. But here's a high level overview.

As you know, each bit in the checksum is an XOR of a combination of bits from the 16-bit data stream, regardless of whether it's the 8-8 data for the keyboard or the 7-7-2 data for the mouse.

Now look at it from the point of view (POV) of the bits in the data stream. Each bit is used in one or more checksum bits. On the spreadsheet, if you look left to right, you are seeing it from the POV of the checksum, but if you look at it vertically, you are seeing it from the POV of the data. So, taking the first data bit (OBC bit7) as an example, it is used in the 1st, 3rd and 5th bits (checksum bits 7/5/3), so if that bit is set, we should XOR the value 1 with those bits in the checksum.

So, what I do in the code is, when I process the first data bit, I check if it's set, if it isn't I skip to the next bit, but if it is, I XOR "10101" with the checksum. The 2nd data bit is used in the 1st and 3rd checksum bits, so when I process the 2nd data bit, if it's set, I will XOR "10100" with the checksum.

So, how do I know which pattern to use for each data bit? That's where the extra data that I put in the data block comes into play, and the magic ingredient there was the LDCD command that I found.

First, the extra data in the data block is:
dw A8A0h
dw 9890h
dw 8878h
dw 7068h
dw 6058h
dw 5048h
dw 3830h
dw 2818h

where you'll notice that A8 is "10101-000" in binary, and A0 is "10100-000", and you'll remember that those are the first 2 checksum strings that I just mentioned a moment ago.

So, back to the LDCD command. To use that, you first have to load a memory address into a scratch register (ie, one of the Wx or RCx guys), then you can load the data at that address into another scratch register.

Here's the relevant code from my PB file:
Code:
LDW  WW2,#FF29h    ;get the address of the last checksum key
LDCD W6,@W2        ;load the next checksum key

This is saying, load the address "FF29" into W2 (and W3 as it's a "word"), then use W2 to load the data at that address into W6. The last byte of my data block data is "18h", so that LDCD statement will load the value "18h" into W6.

The other cool thing with LDCD is that, when you use it, it automatically decreases the address that you used, so I start with FF29 as my address, then as soon as I do the LDCD move, the address in W2 becomes FF28.

Here's the checksum code
Code:
        CLR  W1            ;clear the checksum result
        LDW  WW2,#FF29h    ;get the address of the last checksum key
        LD   W8,#10h       ;set loop count to 16
Loop:   LDCD W6,@W2        ;load the next checksum key
        RRC  W4            ;rotate the input data right by 1
        RRC  W5            ;LSB ends up in CARRY
        JRNC Loop2         ;skip XOR if CARRY not set
        XOR  W1,W6         ;XOR the key with the running result
Loop2:  DJNZ W8,Loop

That code is saying (line by line)..
1. Clear the checksum, which I am holding in W1
2. Load the starting address (ie, the end of the checksum data block)
3. Use W8 as an index and set it to 16 (the number of data bits)
4. Grab the byte at W2 (ie, FF29), load it into W6 and reduce W2 by 1
5. Rotate the left byte of input data right by 1 bit (with the right bit falling into CARRY)
6. Rotate the CARRY bit into the right byte of input data, with the right bit of that byte falling into CARRY.
7. If CARRY is clear, skip #8 below
8. XOR the data in W6 (from #4 above) with W1 (the checksum)
9. Reduce the index by 1, and if it's not 0, loop back to step 4 above.

Those 2 "rotate" statements mean that I am rotating the entire 16 bit string right each time, with the right most bit falling into the CARRY and if the CARRY is set, I XOR the checksum. When the checksum routine is finished, I still have the original CARRY bit in there, so I need to rotate it one more time to get W4 and W5 back to their original values. I do this because I use them to help re-arrange the mouse data.

The biggest problem that I see in trying to port this to HCS08 is finding a version of LDCD in that assembler.


_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!


Last edited by The Robman on Wed Feb 19, 2020 5:26 pm; edited 1 time in total
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 Oct 03, 2017 8:58 pm    Post subject: Reply with quote

Thanks for the explanation.

A spot test of the keys looks good. arrows, drags, shifted keys, test lefts, crtrl combos.
Do you need a more thorough test? Like every single key or are you confident?
_________________
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: 21200
Location: Chicago, IL

                    
PostPosted: Tue Oct 03, 2017 9:13 pm    Post subject: Reply with quote

That's good enough, if at least 1 keyboard button, 1 mouse button and the left tests all work, that confirms it works.

Is there anything else we need to do to improve the mouse buttons, or are they all good "as is"?

Of course, how you put all this into a remote and make it useful is another matter! Smile
_________________
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
The Robman
Site Owner


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

                    
PostPosted: Tue Oct 03, 2017 10:45 pm    Post subject: Reply with quote

I've added an RM file in the regular folder for this. Just S3C8 at this time.
http://www.hifi-remote.com/forums/dload.php?action=file&file_id=14728
_________________
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: Wed Oct 04, 2017 11:14 am    Post subject: Reply with quote

The_Robman wrote:
The biggest problem that I see in trying to port this to HCS08 is finding a version of LDCD in that assembler.


How very kind and generous of you, Laughing, I think the biggest problem in the mix is me getting my head around this. I studied your explanation again this morning. It is making more sense, but it is going to take me quite some time, because I have to intellectually understand this.

I can't just translate it, because the assemblers are just so different. You have all those registers, I have an accumulator and an H:X combination addressing register.

Quote:
Of course, how you put all this into a remote and make it useful is another matter!

It really depends on the user and which remote they use.

When trying to get my head around this whole thing one of the first things I did was program my entertainment passwords into a Nevo so that I can pick up a remote and just punch a soft button for my remotes.

Of course anybody could open notepad, find the right remote out of the 14 sitting on my desk right now, and then push the button and see the password. Not very secure, but really easy to enter.

Another thought that passed through my head would be to use your multiplex-on-steroids method on an EXTENDED JP1 remote. The Atlas Ocap that has the letters above the numbers would be an excellent candidate. Use only ONE keymove assigned to SWAP where swap changes the a multiplexing protocol where there are the numbers let you swap between 10 different key sets or mouse functions. ...

Setup 1
1 .
2 a
3 d
4 g
5 j
6 m
7 p
8 t
9 w
0 Space

Setup #2 would be
1 ?
2 b
3 e
4 h
5 k
6 n
7 q
8 t
9 w
0 Space
_________________
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: 21200
Location: Chicago, IL

                    
PostPosted: Wed Oct 04, 2017 1:41 pm    Post subject: Reply with quote

vickyg2003 wrote:
The_Robman wrote:
The biggest problem that I see in trying to port this to HCS08 is finding a version of LDCD in that assembler.

How very kind and generous of you, Laughing, I think the biggest problem in the mix is me getting my head around this. I studied your explanation again this morning. It is making more sense, but it is going to take me quite some time, because I have to intellectually understand this.

I can't just translate it, because the assemblers are just so different. You have all those registers, I have an accumulator and an H:X combination addressing register.

I can't help you with the HCS08 assembler as I've never taken the time to study it, but I can help you with the overall concept. As you can (hopefully) see, I'm quite good at explaining things, so if you have questions about anything that I wrote, I can probably walk you through it. We could even have a phone call if that would help. But yeah, only having 2 registers to play with is a major limitation, I was forgetting about that.
_________________
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 Oct 20, 2017 10:50 am    Post subject: Reply with quote

Rob and I had part of this discussion in a PM on other matters, and I thought I'd bring it out here to complete this thread, since I was looking for this information and couldn't find it.

The Robman wrote:
vickyg2003 wrote:
The Robman wrote:
Have you given any thought to how you want to tackle that MCE one?

Yes instead of the vertical approach the horizontal approach works better with the single accumulator.

So what is the horizontal approach? Back we had to deal with the 4DTV protocol, Kevin Timmerman wrote a horizontal executor which worked, but OMG was it complicated, it was all... shift it right, add 1, shift it left, multiply by 3, shift it right, xor something, etc, etc. Like, there was no way UEI would even consider taking it on, then suddenly I had a light bulb moment of looking at it vertically and putting the bit patterns into the fixed data bytes and voila, I had a simple executor that would be adaptable to a similar signal with a different checksum pattern.

So what is the high level approach that you're thinking of taking for this? And is there an example of a complicated HCS08 executor that you can point me to? One where the S3C8 version used lots of scratch registers.

The Robman wrote:
I think I get it. So your "key" will be five 16-bit strings that replicate the strings in my spreadsheet, so something like this...

11111000-00000000
00000111-00110000
11000111-10001110
00110110-10101101
10101101-10011011

Then when you say "mask", you mean you will AND them with the remote data and then count how many bits remain set. In the spreadsheet, I add them together and then MOD(2) them, but in assembler, you will shift right and catch the carry bit. Is there an easy way to count the bits, or do you have to do that manually? My S3C8 code would have been bigger if I had to count the bits, doing it the vertical way I don't need to count, I can just XOR. I guess you could count by shifting into carry and then adding carry to an accumulator, is that how you do it?

So, where are you going to store the 10 byte key? Are you saying that you can use the DCBUF for that? I'm not used to that terminology, which is why I always work with registers when I do it, but isn't DCBUF the fixed data that gets passed into the executor? Is that how you're going to do it, pass the key in as fixed data? That's how I did it for the 4DTV, but then I only had a 4-bit checksum and 8-bit data, so I could store the key in 4 bytes (ie, 8 half byte chunks). I only have 10 bytes of fixed+variable data in S3C8.

Yes, that was my thought. I compiled it and its 150 bytes and still buggy, but I have been studying the vertical method, and I did pull out the Variable and Vector worksheet and it looks like yours will be doable too. The PD (Protocol Data Variables) for the combo version end at pd0D, but the HCS08 irengine will load them through pd1F so I do have enough area there to load the checksum bytes. That does mean that I don't have to jump through the hoops that I was envisioning.

The combo protocol is bigger than the separate MCE Mouse protocol, and the MCE Keyboard protocol combines, so the only remotes that I know of where using the modern screen ones where Each device upgrade uses a separate device mode, like the Nevos, Xsights, and Monster.
Back to top
View user's profile Send private message Visit poster's website
legzrwheelz



Joined: 05 Feb 2020
Posts: 17

                    
PostPosted: Tue Feb 18, 2020 12:56 pm    Post subject: comnination keys Reply with quote

hello, awesome work Vicky and Rob. First post, long time lurker.
I am trying to figure out a way to create combination keys such as alt+F4. I see that Ctrl+alt+Del was able to be made...so how would I do that for the following
alt+F4
Ctrl+alt+b
Ctrl+alt+n
Now then, i am using a tool called "advance mce remote mapper" which allows me to completely customize all buttons on an mce remote through registry edits, but it will take away certain functionality by replacing buttons with my choice of shortcuts and key combos. However, I would rather have a discrete button like I was able to do with my Harmony. I have tried teaching my xsight color from my harmony, but it doesn't actually learn the signal... even though it says it has. Which is bittersweet for me. The reason I am switching to the xsight after years of harmony use, There is an absolutely terrible delay using harmony remotes with rc6 receivers. So I would rather not teach that delay to this remote. Now, I have used my camera phone to determine whether or not its actually sending any signal but it is not. SO that is why I come here today asking this. Thanks in advance for any and all input
Back to top
View user's profile Send private message
The Robman
Site Owner


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

                    
PostPosted: Tue Feb 18, 2020 2:32 pm    Post subject: Reply with quote

If you download the RMDU file for this, there are instructions in it:
Quote:
We've included some of the shifted, etc buttons in the Function list, but you can add more if you like. Notice that the byte2 is 0 for all the regular buttons. To add a shifted or CTRL+ type function, create a new entry with the same OBC code as the regular button, and use one of the following modifier code values for the byte 2:
1 = CTRL
2 = Shift
4 = ALT
8 = Windows

For example, if you want to add CTRL+C (copy) or CTRL+V (paste), look up the codes for C and V (which are 6 and 25, then change the byte2 to 1 and voila.

If you want to do a combination of buttons, like CTRL+ALT+DELETE, all you need to do is add the modifier codes together. For CTRL+ALT+DELETE, CTRL+ALT=5 and DELETE=76, so CTRL+ALT+DELETE is obc=76, byte=5.

So, for the three combo buttons that you want:
alt+F4
Ctrl+alt+b
Ctrl+alt+n

First, get the button codes of the basic buttons:
F4 = 61
b = 5
n = 17

The modifying buttons are:
alt = 4
ctrl = 1

Therefore, the combos are:
alt+F4 = obc:61, obc2: 4
Ctrl+alt+b obc:5, obc2: 5
Ctrl+alt+n obc:17, obc2: 5
_________________
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
Display posts from previous:   
Post new topic   Reply to topic       JP1 Remotes Forum Index -> JP1 - Keyboards All times are GMT - 5 Hours
Goto page Previous  1, 2, 3 ... 12, 13, 14, 15, 16  Next
Page 13 of 16

 
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