English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 26 August 2009, 04:02   #1
NovaCoder
Registered User
 
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,400
A progressive 320x200 VGA screen on AGA

Ok, this seems to do what I want. It tries to open a VGA 320x200 screen (using a 320x240 mode...natch), if the user hasn't got the approprite monitor driver it will then find the best matching 320x200 mode.

Code:
ULONG mode = BestModeID(BIDTAG_NominalWidth, 320,
                 BIDTAG_NominalHeight, 200,
                 BIDTAG_DesiredWidth, 320,
                 BIDTAG_DesiredHeight, 200,
                 BIDTAG_Depth, TBITPLANES,
                 BIDTAG_MonitorID, VGA_MONITOR_ID,
                 TAG_END);

   if(mode == INVALID_ID) {
    mode = BestModeID(BIDTAG_NominalWidth, 320,
                 BIDTAG_NominalHeight, 200,
                 BIDTAG_DesiredWidth, 320,
                 BIDTAG_DesiredHeight, 200,
                 BIDTAG_Depth, TBITPLANES,
                 TAG_END);
 }

 if(mode == INVALID_ID) {
  CloseScreen(screen);
  errorexit();
 }

screen = OpenScreenTags(NULL,
  SA_DisplayID, mode,
  SA_Width,  320,
  SA_Height,  200,
  SA_Depth,  TBITPLANES,
  SA_Type,  CUSTOMSCREEN,
  SA_Overscan, OSCAN_STANDARD,
  SA_ShowTitle, FALSE,
  SA_Exclusive, TRUE,
  TAG_END);

 if(screen == NULL)
  errorexit();

 window = OpenWindowTags(NULL,
  WA_Left, 0,
  WA_Top, 0,
  WA_Width, screen->Width,
  WA_Height, screen->Height,
  WA_Title, NULL,
  WA_CustomScreen, screen,
  WA_Borderless, TRUE,
  WA_DragBar, FALSE,
  WA_Activate, TRUE,
  WA_SmartRefresh, TRUE,
  WA_Backdrop, TRUE,
  WA_NoCareRefresh, TRUE,
  WA_IDCMP, IDCMP_RAWKEY,
  TAG_END);

 if(window==NULL)
 { 
  CloseScreen(screen);
  errorexit();
 }

Last edited by NovaCoder; 28 August 2009 at 01:03.
NovaCoder 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
Using the VGA adapter and what screen modes. burf2000 support.Hardware 18 03 September 2012 15:09
VGA Screen on ClassicWB OS39 amigappc project.ClassicWB 2 27 December 2010 15:06
320x200 games in 4:3-format or letterboxed? john4p Retrogaming General Discussion 28 13 July 2010 17:35
Nova's 1200 AGA>VGA ...Zetr0 violated! NovaCoder Hardware pics 20 01 September 2009 09:45
AGA-VGA-Scandoubler questions cybernoid support.Hardware 6 06 February 2007 13:41

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 11:29.

Top

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