Project

General

Profile

Actions

Bug #637

open

Amiga coordinates reading Y Mouse using Print ym

Added by malcolm harvey almost 4 years ago. Updated almost 4 years ago.

Status:
Feedback
Priority:
Normal
Target version:
-
Start date:
01/26/2021
Due date:
% Done:

0%

Estimated time:
Affected version:

Description

Currently, there seams to be a change which has effected the display output of reading the mouse using
Print ym in Amiga mode. PC mode seams to work ok using same routine. Default Amiga/AOZ.

In Amiga mode regardless of #useHardwareCoordinates:False or #useHardwareCoordinates:True or
//#useHardwareCoordinates tag not in use at all, it only happily displays Print xm at 120 on the
left edge. The ym or Print ym displays always 400 start top, it should if working correctly
as with the PC mode display 40 top edge without the #useHardwareCoordinates tag to be logical.

Without this, in Amiga mode currently, the vertical start jumps from 400-999 10 pixels at a time then
starts or gets to at showing under that or the 999th pixel, a 100 pixel position vertically from there
changing to at 1 pixel at a time which it should then to the end of the canvas. Not workable.
But again it should be 40 at the top always for Amiga people.

Note: You can get around this by using, Print Using "####";ym but there must be something
different or not right default in the Amiga mode if in the PC mode the same code works as it should X or Y
or displays properly 120 X and 40 Y start using just Print y Mouse or Print x Mouse in conjunction with
#useHardwareCoordinates:False. Ok If the Amiga mode is not using the #useHardwareCoordinates its not working
as then it should be 40 default vert top. Something is amiss.
Note: I also think that the #useHardwareCoordinates:False tag should work or be active in Amiga mode
so people know what's going on either way if not.

1) //(aoz)

#manifest:"pc"
#speed:"fair"
#tvStandard:"pal"
#useHardwareCoordinates:False

do

screen 0
xm=X Mouse
ym=Y Mouse

//screen 1
locate 2,2:Print xm
locate 2,3:Print ym

loop

do

screen 0
xm=X Mouse
ym=Y Mouse

//screen 1
locate 2,2:Print xm
locate 2,3:Print ym

loop

//-----------------*

2) (Amiga)

#manifest:"amiga"
#speed:"fair"
#tvStandard:"pal"
//#useHardwareCoordinates:False

do

screen 0
xm=X Mouse
ym=Y Mouse

//screen 1
locate 2,2:Print xm
locate 2,3:Print ym

loop

Actions #1

Updated by malcolm harvey almost 4 years ago

(Update) the first example should really have had #manifest:"aoz" for it to work in that example #manifest:"aoz"
Note: I have had this working showing 40 top vert in Beta2 by selecting either manifest pc or manifest aoz
but other times it does not work, currently random in conjunction with the #useHardwareCoordinates:False tag anyways.
Possibly also it does not work without using Print Using "####";ym format at all, I cant be sure.

Actions #2

Updated by Brian Flanagan almost 4 years ago

  • Status changed from New to Feedback

You're correct, that you should use "aoz" (or nothing) since the "pc" manifest has been deprecated. ("aoz" is the default).
NOTE: Currently, #useHardwareCoordinates is ignored in the Amiga manifest.

In AOZ mode, by default, the mouse positioning uses Screen coordinates, and the default screen size is 1280 x 1024 (soon to be 1920 x 1080).
In Amiga mode, by default, the mouse positioning uses Hardware coordinates, and the default screen size is 320 x 256.

You can use the X Screen() and Y Screen() functions in both manifests to convert the mouse coordinates into Screen coordinates (even though in Amiga mode it uses Hardware coordinates, and in AOZ mode, it uses Screen coordinates).

For example:

#manifest:"amiga"
#speed:"fair"
#tvStandard:"pal"

Palette 0,$FFFFFF,$FF0000,$00FF00,$0000FF
Pen 1 : Paper 0 : Ink 1 : Cls 0

Box 0,0 To Screen Width-1,Screen Height-1 ' Show the edges of the current screen.

Do
    screen 0
    xm=X Screen(X Mouse) ' convert hardware X coordinate to Screen coordinate.
    ym=Y Screen(Y Mouse) ' convert hardware Y coordinate to Screen coordinate.
    If xm<0 Or xm > Screen Width-1 Then Pen 2 Else Pen 1
    Locate 2,2:Print Using "-####";xm
    If ym<0 Or ym> Screen Height-1 Then Pen 2 Else Pen 1
    Locate 2,3:Print Using "-####";ym
Loop

Just comment the #manifest tag to see the AOZ results.

Actions #3

Updated by malcolm harvey almost 4 years ago

Ok, Well I guess I have too ways of doing it then. (Amiga Mode).
That will certainly fix any issues people have. Gotta be happy that.

In Amiga mode 1...Gives me yeah 120,40 start top left (320x256)
using..

xm=X Mouse
ym=Y Mouse

locate 10,20 : Print using "####";xm
locate 10,21 : Print using "####";ym

Or

In Amiga mode 2...Gives me yeah 0,0 start top left (320x256)
using..

xm=X Screen(X Mouse)
ym=Y Screen(Y Mouse)

Locate 10,21 : Print Using "-####";xm
Locate 10,21 : Print Using "-####";ym

Actions

Also available in: Atom PDF