BBC BASIC implementation of RANDU

2»

Comments

  • Soruk wrote: »
    The mouse is hidden when you press F12, but if you type BASIC then MOUSE ON it will reappear.
    Two completely different things. You're talking about the mouse pointer, I'm talking about the mouse position.

    Yes you can control whether the pointer is displayed using MOUSE ON etc. but you can still move the mouse, you just can't see it (and in the case of the RANDU program that's fine, you don't need to).

    But the issue with RPCEmu is that after pressing F12 you can't even move the mouse into the window, any attempt to do so instantly moves it to the bottom left corner (MOUSE x%,y%,b% always returns its position as 0,0).
  • Okay, my misunderstanding, sorry about that.

    It might be worth reporting your mouse issue here https://www.riscosopen.org/forum/forums/10 as if memory serves you already have a login to this forum?
  • Soruk wrote: »
    It might be worth reporting your mouse issue here https://www.riscosopen.org/forum/forums/10
    Thanks. I've done some more testing and it's a little more complicated than I thought. If I enter BASIC using F12 and then *basic the mouse pointer is invisible but I can move it. On the other hand if I use *configure lang. to start BASIC at boot time I can't move it into the window.

    You've confirmed that a real RISC PC allows you to move the mouse in BASIC, but is that definitely still true if BASIC is set as the boot-up language with *configure? The behaviour seems so deliberate that I wonder if perhaps you can't use the mouse then.
  • I will test that this weekend when I'm at my parents' home.
  • As promised...

  • Soruk wrote: »
    As promised...
    Thanks. The secret is the *pointer command, with RPCEmu that both displays the RISC OS pointer and allows you to move it. Without it, the pointer isn't displayed (which is no doubt right) but also you can't move the mouse into the window at all (which seems not right).
  • Soruk
    edited September 2023
    Yep. I already have *POINTER implemented in Matrix Brandy for a while, in this instance it's synonymous to MOUSE ON|OFF.

    If you don't want the pointer shown in your program, doing
    OSCLI "POINTER": MOUSE OFF
    
    ought to do the trick. As my little demo shows it still detects the mouse position even if the pointer isn't shown.

    If memory serves correctly, the "Follow host mouse" works by identifying which version of RISC OS is running then hot-patching the ROM code. It's possibly this that is affecting mouse movement before an initial *POINTER call
  • Soruk wrote: »
    If memory serves correctly, the "Follow host mouse" works by identifying which version of RISC OS is running then hot-patching the ROM code. It's possibly this that is affecting mouse movement before an initial *POINTER call
    Considering that to exclude the mouse from a window is a most unusual feature, and is probably being achieved by making SetCursorPos() API calls, I still find it hard to believe that it can happen 'by accident'.

    I've reported it at the RISC OS forum as you suggested,
Sign In or Register to comment.