Silly Question: Can the TVR010 codes be remapped?

radiosparks

Member
Howdy!

I might be shooting myself in the foot with this question.

Can the TVR010 simulation be remapped with different result codes?

WHY?
Because I don't have SONY TV remote to work with. I DO have a SONY CD/TUNER remote that works with IRIN.
This will reduce the programming cycle I have now with a code upload to a PICAXE.

Here are the following response codes from IRIN:

Code:
/* SONY CD/TUNER PLAYER IR REMOTE CODES */
          SWITCH SET       
BUTTON    CD    TUNER    TVR010
     1    0     0        0
     2    1     1        1
     3    2     2        2
     4    3     3        3
     5    4     4        4
     6    5     5        5
     7    6     6        6
     8    7     7        7
     9    8     8        8
    10   32     9        9
   10+   39              missing
 1/ALL   44              missing
   A-B   42              missing
SHUFFLE  53              missing
   |<<   48    19       19
   >>|   49    18       18
    <<   58              missing 
    >>   59              missing
     >   50    15        missing
    ||   57              missing
    []   56    47        missing

P.S. I like the forum editor. It's has some neat properties.

 

kfjl

Member
Hi,
This is the silly questions thread, right? I think no one has replied to you because no one understands what you want.
So, two silly questions to clarify:
You have a Sony CD/Tuner remote that works with irin, but you don't want to use it. Why? If you want it to be blue like the discontinued TVR010, why not paint it?
What's a programming cycle, and why are small ones better than full-size ones?
 

radiosparks

Member
Ya, I see the confusion. It's not an April Fools joke.

1) I have a SONY remote that works with IRIN. Doesn't put out the same codes.
2) The IDE simulator has a TVR010 modeled and sends it's own codes.

What I would like to know if I could replace the simulator codes with my remote codes?


This would make testing using the simulator more practical than downloading code to a real PICAXE and testing. Saves my time as downloading is slow.

I think that's a better question.
 

kfjl

Member
I use axepad with linux so I don't have a simulator, so I can't answer your question.
However, I see from your first post that 12 of the codes sent in tuner mode are the same as the TVR010 codes.
Do you really need more than 12 buttons?
If you do, you could try rummaging around in your file system in search of a config file that might give you what you want.
Or buy a pillow and do real downloads...
:)
 

hippy

Technical Support
Staff member
I don't know of any way to change the codes the TVR010 pop-up emits when a simulation is run, but it is possible to have your program respond to different codes when run under simulation and when on your actual hardware.

The following will for example allow the SHUFFLE button on your physical remote control to be detected, and allow the "X" button on the simulated TVR010 pop-up to act as if it were a SHUFFLE button -

Code:
#Picaxe 08M2
#Terminal 4800

#ifdef SIMULATING
  ; Keycodes from the TVR010
  Symbol SHUFFLE = 20          ; Key "X" on TVR010 acts as SHUFFLE
#else
  ; Keycodes from the Sony CD/Tuner remote
  Symbol SHUFFLE = 53
#endif

MainLoop:
  Do
    IrIn C.3, b0
    Select Case b0
      Case SHUFFLE
        SerTxd("You pressed the SHUFFLE key", CR, LF)
      Else
         SerTxd("You pressed the key with keycode ", #b0, CR, LF)
    End Select
  Loop
You can make that mapping easier by creating a list of the TVR010 codes -
Code:
Symbol TVR010_POWER   = 21
Symbol TVR010_UP      = 16
Symbol TVR010_DOWN    = 17
Symbol TVR010_LEFT    = 19
Symbol TVR010_RIGHT   = 18
Symbol TVR010_BAR     = 96
Symbol TVR010_PYRAMID = 54
Symbol TVR010_CROSS   = 37
Symbol TVR010_X       = 20
Symbol TVR010_MINUS   = 98
Symbol TVR010_PLUS    = 11
Then assign the ones you want from those -
Code:
Symbol SHUFFLE      = TVR010_X
Symbol FAST_FORWARD = TVR010_PLUS
 

radiosparks

Member
Thank-you Hippy,

That's the missing bit of info.

I knew I've read it somewhere about pre-processor and conditional directives, SIMULATING is not described in the PDF version of the manual.
Should have checked the online manual.

My project is pretty well completed already (most of the coding is done and tested). Just have to solder it up and mount it in a project box.

One bug I forgot about ... 8 bit integers roll over ... I was wondering why I was getting 255 zeros being sent to the terminal. Solved it.

Amazing what an 08M2 can do.

#ifdef SIMULATING
; Keycodes from the TVR010
Symbol SHUFFLE = 20 ; Key "X" on TVR010 acts as SHUFFLE
#else
; Keycodes from the Sony CD/Tuner remote
Symbol SHUFFLE = 53
#endif
 
Top