Shop OBEX P1 Docs P2 Docs Learn Events
Mouse cursor for TV&VGA — Parallax Forums

Mouse cursor for TV&VGA

RaymanRayman Posts: 14,162
edited 2007-11-21 13:20 in Propeller 1
I think I just realized that there's no built-in mouse cursor support for the basic VGA or TV drivers.· Guess I was spoiled with the 1024x768 XGA driver...

Anybody already made a version of these drivers that draws the cursor?· Or, is there a better way (without using Graphics)?

Comments

  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2007-11-21 01:19
    Rayman,

    What are you trying for? Adding the mouse.spin with a cursor routine seems to be
    straightforward enough.. Are you attempting to adapt your text/window driver to
    TV? (That would be interesting.. [noparse]:)[/noparse] I've got some plot routines in my working
    copy of AiGeneric that I'm using for NES cursor/pointer.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Buttons . . . check. Dials . . . check. Switches . . . check. Little colored lights . . . check.

    — Calvin, of 'Calvin and Hobbes.
  • RaymanRayman Posts: 14,162
    edited 2007-11-21 02:09
    I'm just looking for an easy way to draw the mouse cursor on the screen when using TV.SPIN or VGA.SPIN... (without using Graphics). The XGA driver starts a new cog with code to do the mouse drawing...
  • potatoheadpotatohead Posts: 10,260
    edited 2007-11-21 05:02
    Doing this with the TV driver is *tough* It should be possible to modify the other VGA drivers to make use of the cursor COG.

    Essentially, what happens is TWO video generators are set to output to the same set of pins. This overlays the cursor signal with the VGA signal. A timing loop is used for position and that's about it for VGA.

    On the TV, syncing the pixels and color artifacts is a lot tougher to get right. It is the same idea however.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!
  • DiablodeMorteDiablodeMorte Posts: 238
    edited 2007-11-21 05:20
    I'm pretty new to the propeller(And spent most of yesterday[noparse][[/noparse]wow, it's already tommorrow, i mean today, i need sleep] building myself a crappy cursor application) and excuse me if you idea seems dumb but why you you just use the mouse.spin to find the current X and Y of the mouse, and then output a "X" or something like a cursor onto the screen word that makes up the TV screen. That was I did and it seemed to work!

    -Again, please excuse my current dumb-ness of the propeller!
  • RaymanRayman Posts: 14,162
    edited 2007-11-21 13:20
    DM: I've done exactly that for a couple apps where I want to save a cog, but I used a color trick to have two tiles represent the cursor (like VBDOS). But, what I want is a mouse pointer (like Windows). This is difficult because it can span multiple tiles and you have to remember what was there to restore it... I think it could be done using XOR functions, like you do for a sprite in 2d gaming, but I was hoping this was done already...

    Well, I guess the simple solution for me is to do like I did before and manually show a whole tile or two as the mouse...
Sign In or Register to comment.