log in | register | forums
Show:
Go:
Forums
Username:

Password:

User accounts
Register new account
Forgot password
Forum stats
List of members
Search the forums

Advanced search
Recent discussions
- Elsear brings super-fast Networking to Risc PC/A7000/A7000+ (News:)
- Latest hardware upgrade from RISCOSbits (News:)
- RISCOSbits releases a new laptop solution (News:4)
- Announcing the TIB 2024 Advent Calendar (News:2)
- RISC OS London Show Report 2024 (News:1)
- Code GCC produces that makes you cry #12684 (Prog:39)
- Rougol November 2024 meeting on monday (News:)
- Drag'n'Drop 14i1 edition reviewed (News:)
- WROCC November 2024 talk o...ay - Andrew Rawnsley (ROD) (News:2)
- October 2024 News Summary (News:3)
Latest postings RSS Feeds
RSS 2.0 | 1.0 | 0.9
Atom 0.3
Misc RDF | CDF
 
View on Mastodon
@www.iconbar.com@rss-parrot.net
Site Search
 
Article archives
Acorn Arcade forums: Programming: more wimpmessage agony...
 
  more wimpmessage agony...
  midnightTrooper (22:16 12/1/2004)
  jmb (22:29 12/1/2004)
    midnightTrooper (00:12 13/1/2004)
      rich (10:01 13/1/2004)
        midnightTrooper (14:01 13/1/2004)
 
Lewis Westbury Message #49611, posted by midnightTrooper at 22:16, 12/1/2004
Member
Posts: 147
Ok. So I send DigitalCD a message asking for controller information (so I can get a handle for the controllers so I can use DCDUtils to command them):


DEF PROCsendDCDUtilsTrigger
messageBlock%!0 = 24
messageBlock%!12 = 0
messageBlock%!16 = &5327E
messageBlock%!20 = 0
SYS "Wimp_SendMessage",17,messageBlock%,0
ENDPROC

The doc that I think I'm conforming to is at: http://lgw21.sid.cam.ac.uk/MMKeyboard

So DigitalCD replies with a message that I can't make head nor tail of:
block%!20 isn't =0, and
block%!24 is too big to be a controller index

Anyone got an idea what I'm doing wrong?
Thanks,

Lewis

[Edited by midnightTrooper at 22:16, 12/1/2004]
  ^[ Log in to reply ]
 
JMB Message #49613, posted by jmb at 22:29, 12/1/2004, in reply to message #49611
Member
Posts: 467
well.., given those docs, you shouldn't be sending reason code 0 to DCD.

You probably want reason code 1. (ie messageBlock%!20 = 1) and then messageBlock%!24 = 0..n where n is the maximum controller window.

HTH

#include "std_disclaimer.h"
  ^[ Log in to reply ]
 
Lewis Westbury Message #49617, posted by midnightTrooper at 00:12, 13/1/2004, in reply to message #49613
Member
Posts: 147
So here's what it looks like now:

DEF PROCsendDCDUtilsTrigger
messageBlock%!0 = 28
messageBlock%!16 = &5327E
messageBlock%!20 = 1
messageBlock%!24 = 0
SYS "Wimp_SendMessage",17,messageBlock%,0
ENDPROC

I'm getting block%!20=-64 in the response. Presumably that means I'm still doing something wrong...
  ^[ Log in to reply ]
 
Richard Goodwin Message #49623, posted by rich at 10:01, 13/1/2004, in reply to message #49617
Rich
Dictator for life
Posts: 6828
It's been a while, but I did some work on controlling DCD from BASIC.

http://www.houseofmabel.com/programs/archives/webdesk_alpha.arc

You want to look at "remote" in the "cgi-bin" directory. It should be able to change volume, stop, start or skip tracks, and read the name of the track.

Not sure about the status of the rest of the suite, but if you want to try it, you need a web server (e.g. WebJames*). This suite was an excercise in a) controlling a RiscPC remotely and b) writing CGIs in BASIC.

* If you use WebJames, it uses its own strange CGI format unless you reconfigure it to use "proper" CGI on the cgi-bin directory IIRC

________
RichGCheers,
Rich.
  ^[ Log in to reply ]
 
Lewis Westbury Message #49635, posted by midnightTrooper at 14:01, 13/1/2004, in reply to message #49623
Member
Posts: 147
Cheers. I'm been messing around with remote control by webjames/cgi/BASIC quite a bit these days.

I'll take a look and see what I need to do. From a quick glance it seems as if I don't even need to send any WimpMessages: DCDUtils_GetPlayerInfo looks like it does what I want anyway! :o

It's been a while, but I did some work on controlling DCD from BASIC.

http://www.houseofmabel.com/programs/archives/webdesk_alpha.arc

You want to look at "remote" in the "cgi-bin" directory. It should be able to change volume, stop, start or skip tracks, and read the name of the track.

Not sure about the status of the rest of the suite, but if you want to try it, you need a web server (e.g. WebJames*). This suite was an excercise in a) controlling a RiscPC remotely and b) writing CGIs in BASIC.

* If you use WebJames, it uses its own strange CGI format unless you reconfigure it to use "proper" CGI on the cgi-bin directory IIRC
  ^[ Log in to reply ]
 

Acorn Arcade forums: Programming: more wimpmessage agony...