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 ... 11, 12, 13
 
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: 6913
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: 18047
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: 6913
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: 18047
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: 18047
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: 6913
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: 18047
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!
Back to top
View user's profile Send private message Visit poster's website
vickyg2003
Site Admin


Joined: 20 Mar 2004
Posts: 6913
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: 18047
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: 18047
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: 6913
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: 18047
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
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 ... 11, 12, 13
Page 13 of 13

 
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
Get Smart! the band's official homepage Rockabilly Central