VGA does not look too MOUSE
Ahmet YILDIZ
Posts: 4
Hello
I've got a problem
Propeller with a mouse and a monitor I want to use low resulation
I've done in the example works in a normal mouse X, Y kordinatlarını can read, can read Nang button is pressed but the mouse does not appear on the screen.
"VGA_1280x1024_Tile_Driver_With_Cursor" sample program is working with the same routine, but my mouse low resulasyon and letters should be large.
I would be glad if it helps.
CON
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
cols = 80
rows = 64
tiles = cols * rows
spacetile = $220
VAR
long col, row, color
long boxcolor, boxptr
long array[noparse][[/noparse]tiles/2]
long cursor[noparse][[/noparse]1+32]
long cursor_x, cursor_y, cursor_col, cursor_def
OBJ
text : "vga_text"
mouse :"mouse"
PUB start | i,flag , Flag2
text.start(16)
'start mouse and set bound parameters
mouse.start(24, 25)
mouse.bound_limits(0, 0, 0, 799, 639, 0)
mouse.bound_scales(1, -1, 0)
mouse.bound_preset(400,320,0)
repeat
'set mouse cursor according to area
cursor_def := 1 '0
cursor_col := $FC 'F0
'update mouse position
cursor_x := mouse.bound_x
cursor_y := mouse.bound_y
text.str(string($A,7,$B,7,"X := "))
text.hex(cursor_x,4)
text.str(string($A,7,$B,8,"Y := "))
text.hex(cursor_y,4)
text.str(string($A,7,$B,9,"Button := "))
text.hex(mouse.buttons,2)
I've got a problem
Propeller with a mouse and a monitor I want to use low resulation
I've done in the example works in a normal mouse X, Y kordinatlarını can read, can read Nang button is pressed but the mouse does not appear on the screen.
"VGA_1280x1024_Tile_Driver_With_Cursor" sample program is working with the same routine, but my mouse low resulasyon and letters should be large.
I would be glad if it helps.
CON
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
cols = 80
rows = 64
tiles = cols * rows
spacetile = $220
VAR
long col, row, color
long boxcolor, boxptr
long array[noparse][[/noparse]tiles/2]
long cursor[noparse][[/noparse]1+32]
long cursor_x, cursor_y, cursor_col, cursor_def
OBJ
text : "vga_text"
mouse :"mouse"
PUB start | i,flag , Flag2
text.start(16)
'start mouse and set bound parameters
mouse.start(24, 25)
mouse.bound_limits(0, 0, 0, 799, 639, 0)
mouse.bound_scales(1, -1, 0)
mouse.bound_preset(400,320,0)
repeat
'set mouse cursor according to area
cursor_def := 1 '0
cursor_col := $FC 'F0
'update mouse position
cursor_x := mouse.bound_x
cursor_y := mouse.bound_y
text.str(string($A,7,$B,7,"X := "))
text.hex(cursor_x,4)
text.str(string($A,7,$B,8,"Y := "))
text.hex(cursor_y,4)
text.str(string($A,7,$B,9,"Button := "))
text.hex(mouse.buttons,2)
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
My Prop Products:· http://www.rayslogic.com/Propeller/Products/Products.htm
When you post samples of your code, paste your code between these two tags except remove ALL of the empty spaces
[noparse][[/noparse] code ]
[noparse][[/noparse] / code ]
It seems to me that your REPEAT loop should have some code that tells it to read the mouse position on every loop. Does mouse.bound do that?
Post Edited (ElectricAye) : 4/30/2010 1:27:03 PM GMT