English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 05 August 2009, 16:11   #1
Ratte
Registered User
 
Join Date: Sep 2008
Location: Germany
Posts: 331
Question need help with modeid-function

Any idea how to find out a modeid for the current displayed mode?
The function GetModeID is only good for a viewport, but not for the real monitor-output.
For example if i use dragable screens the GetModeID return the value from lets say PAL-NonLace, even if i have pulled down a screen in interlace in the front.
physicly the monitor is running in hires lace, but getmodeid returns hires nonlace.

is there any get"real"modeid out there?

(problems are also present with different monitorids .. super72, multiscan, etc.)

thanks

( asm-example-code ? )
Ratte is offline  
Old 05 August 2009, 16:35   #2
Asman
68k
 
Asman's Avatar
 
Join Date: Sep 2005
Location: Somewhere
Posts: 828
I'm don't understand something. You have screen without ViewPort or I'm missing something ?
Asman is offline  
Old 05 August 2009, 17:36   #3
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,534
Do you mean GetModeID() returns screen mode that software (which uses custom screen) asked to open, not the mode that is actually active? (if it was promoted or something similar)

I don't have much experience with this stuff but I may have some ideas..
Toni Wilen is offline  
Old 05 August 2009, 20:30   #4
Ratte
Registered User
 
Join Date: Sep 2008
Location: Germany
Posts: 331
i am tring to write a patch for the "makevport" from gfx.lib.
my code is taking the existing parameters view / viewport and use the function getmodeid with these inputs.
the result is stored until "makevport" is called for the next time.
everycall my code is comparing the actual MonitorID with the previous used MonitorID.
It works fine ... but if i play with the dragable screens, i wil get wirred results.
Lets say I have a PAL-HIRES-LACE on the top, than a Euro36 screen and at last HighGFX SuperHires-Laced.
In thise case, the Monitor is running in HghGFX-SuperHires-Lace and all other modes at the top of the monitortube are phisicly also in highgfx.
I mean the monitortube is allways running the resolution from the last GFXMode on teh display .. thats normal.
My problem is, that the function GetModeID is returning the falue from the first screen ... in this example PAL-HIRES-LACE, while the "tube" is working in HighGFX SuperHires-Lace.
Do I have to jump trough the viewextra-structur until i have found the "last" view and check this for the ModeID?
@Toni: Could you pls take a look at the graphics/makevport (...graphics/c/ diir) there<is something like a funktion "getrealvport" ... but i have big problems with C.
Or was it at LoadView ?!
I hope i made my problem understandable.
Finnaly i want to compare only MonitorID doring every MakeVPort-call.
I want to use it as a signal for a electronical monitor-switch, combined with p96/cgfx and amiga-chipset.
So far it work, but better dont play with dragable screens .... :P
Ratte is offline  
Old 05 August 2009, 20:41   #5
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,534
I think this is similar problem to my mouse pointer problem, it seems to be impossible to get absolute mouse coordinates in pixels, at least by using documented API or structures. Coordinates are always relative to current screen which only works as long as screen isn't dragged..
Toni Wilen is offline  
Old 14 August 2009, 18:17   #6
Ratte
Registered User
 
Join Date: Sep 2008
Location: Germany
Posts: 331
intuition coercion
could be good for some study

intbase -> firstscreen ...
Ratte is offline  
Old 17 August 2009, 00:57   #7
Ratte
Registered User
 
Join Date: Sep 2008
Location: Germany
Posts: 331
its working ...
http://www.a1k.org/forum/showthread.php?p=277026
sorry, i am too busy for a complete translation of my german comments



in short:

FIRSTSCREEN from INTUITIONBASE
FScreen=(IBase+$3c)

DISPLAYINFOHANDLE from FIRSTSCREEN
DIHandle=(FScreen+$16e)

calling gfx.lib GETDISPLAYINFODATA(DIHandle,Buffer,Size,tagID,(ID2))
buffersize must set to 96Bytes ($60)/tagID = MonitorInfo ($80002000)
result 0 = ignore output

otherwise read buffer+$4 for ScreenModeID from FirstScreen
SCID=(Buffer+$4)

cleanup the ScreenModeID to a real MonitorID
MonID=(SCID ... and.l #$ffff1000)

MonID is now like $21000 for PAL or $81000 for Super72 ...
Ratte is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
ACA620 freezer function demolition support.Other 15 21 February 2021 15:02
Function Key editor lopos2000 request.Apps 2 04 August 2006 14:18
Mouse Master-function sittingduck request.UAE Wishlist 8 26 February 2006 19:16
Search Function is BROKEN in v3.5 StrategyGamer project.EAB 30 11 August 2005 11:48
Snapshot function Eny- support.Apps 4 16 July 2004 08:52

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 17:03.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.07907 seconds with 13 queries