S3C8 OpCode
Moderator: Moderators
-
Ironbreeze
- Posts: 16
- Joined: Wed Jun 16, 2004 8:54 am
S3C8 OpCode
I discovered the world of JP1 four days ago, and man has it made an impact. It allowed me to do what I needed/wanted to be done with a $31 remote instead of the $100+ remotes. But now I have bags under my eyes from staying up to the wee hours of the morning learning all the cool things that can be done, my wife is threatening to leave me because "I love the remote more than her." etc... So first off, a thanks goes out to all you jp1 pioneers... seriously, this is very cool stuff.
Ok, on to my question...
I'm attempting to write my own protocol (custom extender), I need to load a register with a relative address (relative to the current execution point). I'm looking at the SC38-instruction-set doc, but can't seem to find the opcode that would allow me to do this. Worse case scenerario (i.e. more instructions) would be to get the pc (program counter) or the ip (instruction pointer) and move that to the src register then sub the desired relative offset. But one, I'm not clear on the difference between the IP and the CP (which do I want?), and 2 I'm not sure how to access either of their values.
Can any of you geeks out there help a fellow geek out?
Thanks
Ok, on to my question...
I'm attempting to write my own protocol (custom extender), I need to load a register with a relative address (relative to the current execution point). I'm looking at the SC38-instruction-set doc, but can't seem to find the opcode that would allow me to do this. Worse case scenerario (i.e. more instructions) would be to get the pc (program counter) or the ip (instruction pointer) and move that to the src register then sub the desired relative offset. But one, I'm not clear on the difference between the IP and the CP (which do I want?), and 2 I'm not sure how to access either of their values.
Can any of you geeks out there help a fellow geek out?
Thanks
What are you using for an assembler? Are you using the S3C8asm that I wrote?
You shouldn't be computing a relative address like that at run time. A protocol is always loaded into the same place (in ram) to be executed, so the address wouldn't vary. The assembler supports expressions that cand be used to compute the relative address.
You shouldn't be computing a relative address like that at run time. A protocol is always loaded into the same place (in ram) to be executed, so the address wouldn't vary. The assembler supports expressions that cand be used to compute the relative address.
-
Ironbreeze
- Posts: 16
- Joined: Wed Jun 16, 2004 8:54 am
Actually I'm not using the assembler, but have it. Kudos for taking the time to write one. I will most definately use it for future development.
But for right now I'm just hand coding the op codes into IR. Here's the jist of what I'm trying to do...
I'm attempting to write a protocol that will allow me to display a custom message on the LCD. For my first pass this will simply be a fixed message of my choosing. BTW, this is for the RS15-2116. The code so far looks like this.
where FF05 will be used as the storage space for the message. But when IR uploads this to the remote, then it won't really be address FF05, correct? So thats why I'm looking for a relative postion to the current executing instruction, as opposed to the direct address pointer of the C6 C4 FF 05 command.
Or, does IR by some chance take care of calculating the true (eventual) address of FF05? It kinda occurred to me that this might be the case, since protocols can and do move in the eeprom Raw Data if I were to delete a protocol preceeding it.
I may be going about this all wrong. As mentioned earlier, I'm a bit sleep deprived at the moment.
But for right now I'm just hand coding the op codes into IR. Here's the jist of what I'm trying to do...
I'm attempting to write a protocol that will allow me to display a custom message on the LCD. For my first pass this will simply be a fixed message of my choosing. BTW, this is for the RS15-2116. The code so far looks like this.
Code: Select all
FF00: 00 00 DB 00H, 00H
FF02: 01 DB 01H
FF03: 8B 10 JR FF15H //jump over message data
FF05: 00 00 DEC R00 //custom message data starts here
FF07: 00 00 DEC R00
FF09: 00 00 DEC R00
FF0B: 00 00 DEC R00
FF0D: 00 00 DEC R00
FF0F: 00 00 DEC R00
FF11: 00 00 DEC R00
FF13: 00 00 DEC R00
FF15: C6 C4 FF 05 LDW RC4, #FF05H //Load message address into display register
FF19: E6 92 00 LD R92, #00H //clear icons
FF1C: F6 0E B0 CALL 0EB0H //call LCD display function
FF1F: AF RET
Or, does IR by some chance take care of calculating the true (eventual) address of FF05? It kinda occurred to me that this might be the case, since protocols can and do move in the eeprom Raw Data if I were to delete a protocol preceeding it.
I may be going about this all wrong. As mentioned earlier, I'm a bit sleep deprived at the moment.
When that protocol executes that data will be at address FF05.Ironbreeze wrote: where FF05 will be used as the storage space for the message. But when IR uploads this to the remote, then it won't really be address FF05, correct?
IR loads it into the eeprom, which is not in the remote's address space at all. Each time the remote uses the protocol, it copies the protocol from eeprom to ram. It always will be loaded at the beginning of ram, which in that model is FF00.
-
Ironbreeze
- Posts: 16
- Joined: Wed Jun 16, 2004 8:54 am
-
The Robman
- Site Owner
- Posts: 21944
- Joined: Fri Aug 01, 2003 9:37 am
- Location: Chicago, IL
- Contact:
Just FYI, someone once wrote an executor that displays custom messages on the screen of an RCU810 remote, which might make for interesting reading for you, here it is: RCU810KCU.zip
This particular upgrade relies on the data in the EEPROM being where it's supposed to be because the executor overlays itself with data from the EEPROM.
This particular upgrade relies on the data in the EEPROM being where it's supposed to be because the executor overlays itself with data from the EEPROM.
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
-
Ironbreeze
- Posts: 16
- Joined: Wed Jun 16, 2004 8:54 am
Thanks Robman, I grabbed a copy of it and I'll definately check it out. So much to learn and so little time.
pH7-jp1,
That brings me to another thing I'm a bit confused on. I've downloaded the 2117/2116 extender from the yahoo files section, and have it installed. But unless I'm not understanding something it appears to be the 2116 Extender 1 which from what I can tell doesn't have a method to display custom messages, except the LCD_SAT, LCD_DVD, etc keys. But, I've seen numerous post of peeps saying they have the 2116 Ext 2 installed. Where can I get the 2116 Extender 2? Or do I already have the right files and just need to do something to enable the extnder 2 functionality. Sorry if this is a stupid question, if it is I'm falling back on the sleep deprived excuse.

pH7-jp1,
That brings me to another thing I'm a bit confused on. I've downloaded the 2117/2116 extender from the yahoo files section, and have it installed. But unless I'm not understanding something it appears to be the 2116 Extender 1 which from what I can tell doesn't have a method to display custom messages, except the LCD_SAT, LCD_DVD, etc keys. But, I've seen numerous post of peeps saying they have the 2116 Ext 2 installed. Where can I get the 2116 Extender 2? Or do I already have the right files and just need to do something to enable the extnder 2 functionality. Sorry if this is a stupid question, if it is I'm falling back on the sleep deprived excuse.
Writing my own is definately a big part of the fun in all this. Practicality has been passed at this point (my remote does everything I could have expected one remote to do). The rest is just for fun and the whole "Oh neat" aspect.unless of course that is the whole purpose (to write your own code).
-
Nils_Ekberg
- Expert
- Posts: 1689
- Joined: Sat Aug 02, 2003 2:08 pm
- Location: Near Albany, NY
-
Ironbreeze
- Posts: 16
- Joined: Wed Jun 16, 2004 8:54 am
-
Ironbreeze
- Posts: 16
- Joined: Wed Jun 16, 2004 8:54 am
-
The Robman
- Site Owner
- Posts: 21944
- Joined: Fri Aug 01, 2003 9:37 am
- Location: Chicago, IL
- Contact:
Hey IB, while you may have already got your remote to do what you were hoping to make it do, don't let that stop you from getting into the S3C8 code a bit deeper. Who knows what else you might want to make the remote do that it currently can't, there's always room for more hackers.
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
-
Ironbreeze
- Posts: 16
- Joined: Wed Jun 16, 2004 8:54 am
You bet. Being that I'm on day 6 of learning this new world of JP1, I haven't really come up with any original ideas that someone here hasn't already come up with. But give me time, I'm sure I'll come up with something and start to play with it some. Now whether the idea has any actual practicality is another matter
.
On another note, I'm fluent in Delphi. We've used it here (the software company I work for) to develop our product since the Delphi 2 days, but just recently switched to C# for all new development, due to consolidation of various companies in our field. IOW, a bunch of us competitors were bought up to make one larger company and that led to a handful of different development teams all programming in different languages. So we got together and decided C# (.net) would be what we all would adopt and use from that point forward.
So anyway, I have Delphi 7 and could probably be of more help there if the need arises. Particularly seeing that you guys could run circles around me in the S3C8 arena (for the time being
). Is the Delphi/IR an area that could use another chef, or are there already enough in the kitchen? 
If my services could be used, I've only been able to locate the IR 4.01 source, is the newer source available?
Thanks,
IB
Edit:
Of course currently I have more jp1 questions than answers, so I doubt I'll be of much help any time soon. That realization kinda hit me after reading a post on an IR request (three times), and still didn't understand it completely
. "The What and Why of JP-1" has been instrumental in helping me understand the data formats, but I've still a long ways to go. As you can probably gather, I'm eager to contribute and looking forward to the point that I can.
On another note, I'm fluent in Delphi. We've used it here (the software company I work for) to develop our product since the Delphi 2 days, but just recently switched to C# for all new development, due to consolidation of various companies in our field. IOW, a bunch of us competitors were bought up to make one larger company and that led to a handful of different development teams all programming in different languages. So we got together and decided C# (.net) would be what we all would adopt and use from that point forward.
So anyway, I have Delphi 7 and could probably be of more help there if the need arises. Particularly seeing that you guys could run circles around me in the S3C8 arena (for the time being
If my services could be used, I've only been able to locate the IR 4.01 source, is the newer source available?
Thanks,
IB
Edit:
Of course currently I have more jp1 questions than answers, so I doubt I'll be of much help any time soon. That realization kinda hit me after reading a post on an IR request (three times), and still didn't understand it completely