English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System

 
 
Thread Tools
Old 31 January 2016, 11:28   #1
grond
Registered User
 
Join Date: Jun 2015
Location: Germany
Posts: 1,924
open chunky screen

How can I open a chunky screen on a gfx card through the operating system (more specifically P96)? I assume that the P96 software patches the relevant OS functions so I believe that BestModeIDA() should work at least for modes related to the original Amiga screenmodes (e.g. 8bit CLUT in 320x200 without special modes like EHB). If this were not the case, software that was not aware of graphics cards (but coded in an OS compliant way) could not run on a picasso screen. I have seen some example code that opens a Picasso-Library and then calls some functions from that. This would mean that I have to write code for different ways of opening a screen depending on the gfx subsystem and its drivers. I understand that of course not all features offered by typical graphics cards can be supported through the standard OS functions. So what is the preferred way?
grond is offline  
Old 31 January 2016, 12:06   #2
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 7,026
On classic AmigaOS you should stick with CGX because CGX programs also work on P96 while P96 programs don't work on CGX.

If you require a gfx card, you should use CGX functions to find a suitable mode ID. If you fail to open cybergraphics.library, then there is no gfx card in the system.

If you don't require a gfx card, you should not care about chunky/planar. Just use graphics.library functions for everything. Never touch a bitmap directly, use AllocBitMap or OpenScreenTags to create bitmaps and GetBitMapAttr to query information. Use Blt#? or Read/WritePixelArray8 functions to move data around. Keep away from struct BitMap.
thomas is offline  
Old 31 January 2016, 20:08   #3
grond
Registered User
 
Join Date: Jun 2015
Location: Germany
Posts: 1,924
Thanks a lot, that is helpful.

What if I want to have the option to either use c2p code or write directly in chunky I guess I would want to query the screenmode I get for whether it is chunky or planar? Like call BestModeIDA() with say 320x200, 8 bit CLUT and find out whether it is an AGA screenmode or an RTG screenmode I got?
grond is offline  
Old 01 February 2016, 18:31   #4
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 7,026
IsCyberModeID(display_id) will give you TRUE if the mode is from CyberGraphics.

With GetCyberIDAttr() you can determine the pixel format.

With graphics.library only you can't tell, at least for <= 8 bit. If depth is > 8 bit, then it's surely a gfx card mode. And if BMA_FLAGS contains BMF_INTERLEAVED then it's surely a planar bitmap.
thomas is offline  
Old 01 February 2016, 21:43   #5
grond
Registered User
 
Join Date: Jun 2015
Location: Germany
Posts: 1,924
Thanks again! I wondered whether the rtg libraries had introduced some new tags that would be understood by a presumably patched BestModeIDA. You are referring to cybergraphics functions. Am I right in understanding that this would again work with picasso cards? Could there be users that have a picasso card but no cybergraphics?
grond is offline  
Old 01 February 2016, 22:06   #6
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 7,026
Surely they don't have cybergraphics but nevertheless they have cybergraphics.library because picasso96 emulates cybergraphics.library.
thomas is offline  
Old 02 February 2016, 13:28   #7
grond
Registered User
 
Join Date: Jun 2015
Location: Germany
Posts: 1,924
This seems to imply that apollo could just as well go the cybergraphics route (following AROS) instead of picasso. Interesting...
grond is offline  
Old 02 February 2016, 16:31   #8
Samurai_Crow
Total Chaos forever!
 
Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,200
Both P96 and CGX 4 are backward compatible with CGX 3 APIs adding only two incompatible ways of implementing overlay. Since overlay effects use texture blitting on modern graphics cards, those features can be safely removed.
Samurai_Crow 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
Open Screen / Open Font AGS Coders. System 7 02 March 2014 05:08
Open Amiga Game Database - Open Beta FrodeSolheim support.FS-UAE 3 01 May 2013 22:37
Chunky looking Graphics. Washac support.Hardware 8 09 February 2010 17:52
Chunky to planar pmc Coders. Tutorials 11 15 September 2009 16:20
Need a small win98 prog, to open and close a directX screen... keropi Retrogaming General Discussion 9 25 April 2008 18:43

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 06:36.

Top

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