View Single Post
Old 01 June 2010, 15:36   #9
absence
Registered User
 
Join Date: Mar 2009
Location: moon
Posts: 373
Quote:
Originally Posted by absence View Post
Does anyone know where these numbers come from and how accurate they are?
Turns out the numbers come from the OS itself (2.0+), as I found out with this, ahem, nice and well-written utility of mine:

Code:
    move.l    4,a6
    move.l    #gname,a1
    jsr    -408(a6)    ; oldopenlibrary
    move.l    d0,gbase
    move.l    #iname,a1
    jsr    -408(a6)    ; oldopenlibrary
    move.l    d0,ibase
    move.l    d0,a0
    move.l    60(a0),a0    ; firstscreen
    add.l    #44,a0        ; viewport
    move.l    gbase,a6
    jsr    -792(a6)    ; getvpmodeid
    move.l    d0,d2
    move.l    #$80000000,d1    ; dtag_disp
    move.l    #48,d0        ; size of dinfo
    move.l    #dinfo,a1
    move.l    #0,a0
    jsr    -756(a6)    ; getdisplayinfodata
    move.l    #dinfo,a0
    move.l    22(a0),d0    ; resolution
    rts

gbase:    dc.l    0
ibase:    dc.l    0
gname:    dc.b    'graphics.library',0
    even
iname:    dc.b    'intuition.library',0
    even
dinfo:    dc.l    0,0,0,0, 0,0,0,0, 0,0,0,0
As for their accuracy ... who can tell? Now that there are three possible pixel aspect ratios based on
  • tv standards
  • stretching the image to 4:3
  • the operating system,
the quest to satisfy my curiousity is at an end.
absence is offline  
 
Page generated in 0.09868 seconds with 11 queries