AminetAminet
Search:
84782 packages online
About
Recent
Browse
Search
Upload
Setup
Services

util/misc/SetAgnus.lha

Mirror:Random
Showing: ppc-morphos icongeneric icon
No screenshot available
Short:Removes an incompatibility between Amithlon and PPaint
Author:Joerg van de Loo
Uploader:joergloo aol com (Joerg van de Loo)
Type:util/misc
Version:1.0
Architecture:i386-amithlon
Date:2003-11-30
Download:util/misc/SetAgnus.lha - View contents
Readme:util/misc/SetAgnus.readme
Downloads:852

Makes  it  possible  to  use  PPaint  under Amithlon with screens and images
greater than 1008 pixels in width. No more 800x600 screen limit.

WARNING: DANGER: ATTENTION:

	!!! THIS PROGRAM IS A HACK !!!

	!!! THE  AUTHOR TAKES NO RESPONSIBLE FOR ITS RELIABLITY - ALL USE IS
	    AT YOUR OWN RISK !!!

	"SetAgnus"  can  lead to crashes in case a program relies on results
	set in GfxBase related variables.
	It  is,  and was always a better behaviour to query the display info
	database instead of direct "peeking" the GfxBase.
	This  program  "pokes" directly into GfxBase in order to allow other
	programs  not  querying the display info database to get more likely
	results.

	WARNING:

	!!! PROGRAMS  BANGING  WITH  THE  HARDWARE DIRECTLY WILL IMMEDIATELY
	    FAIL WHEN THIS PROGRAM HAS MODIFIED FLAGS SET IN GFXBASE !!!

	Background:
		PPaint  asks  for  a special flag set in GfxBase which tells
		that so called "BIG BLITS" can be used.
		Since  Amithlon emulates a normal Agnus Chip Set as found in
		old A500 computers, this flag isn't set.
		SetAgnus  now  sets  this  flag  - although no "FatAgnus" is
		installed nor can be emulated. Hence, it's dangerous...


	How to get rid of 800x600 screens only?

	Go to your CLI or Shell and enter:

	1> setagnus

	That's all.

	Afterward  you call PPaint normally - but you can now use any screen
	size!
	You  are  also  able to choose a default screen with any screen size
	supported  by  your gfx-card hardware, but pay attention: before you
	can use PPaint with such screens, "SetAgnus" has to be called.

	So, enter somewhere in your "startup-sequence" or "user-startup":

	SetAgnus >NIL:

	in order allowing PPaint permanently dealing with big screens.


	--------------------------------------------------------------------

	Source code: (since it is so tiny...)


/*
	WARNING:	THIS IS A (BAD) HACK

	Normally, PPaint isn't able to display images/screens with more than 1008 pixels in width on Amithlon,
	because it checks whether GFXF_BIG_BLITS is enabled (GfxBase). This program now will set this flag
	without care (it cannot care, since no real ECS/AA hardware is installed) and since PPaint relies on
	this flag, it now will open the desired screen without displaying any message.

	You may place a call to SetAgnus in your "startup-sequence" right behind the "SetPatch" call:

	....
	....
	C:MountAmigaHDDs >NIL:
	EndIf

	SetPatch QUIET					! <<<< !
	SetAgnus >NIL:					! <<<< !

	C:Version >NIL:
	....
	....

	SetAgnus should be placed in your C: drawer...

	Written 2003 ONIX, public domain.
*/


#include <graphics/gfxbase.h>

extern struct GfxBase *GfxBase;

int main( int argc, char **argv)
{
	printf( "GfxBase ChipRev0 original set to: %s, %s, %s, %s\n",
		(GfxBase->ChipRevBits0 & GFXF_HR_AGNUS)  ? "HiRes Agnus" : "Normal Agnus",
		(GfxBase->ChipRevBits0 & GFXF_HR_DENISE) ? "HiRes Denise" : "Normal Denise",
		(GfxBase->ChipRevBits0 & GFXF_AA_ALICE)  ? "AA Alice" : "Not AA",
		(GfxBase->ChipRevBits0 & GFXF_AA_ALICE)  ? "AA Lisa" : "Not AA");


	GfxBase->DisplayFlags = PAL | REALLY_PAL;	// Amithlon uses PAL all the time
	GfxBase->ChipRevBits0 = SETCHIPREV_AA; 		// Say, we're AA (not only FAT-Agnus)

	printf( "GfxBase DisplayFlags set to: %s, %s\n", (GfxBase->DisplayFlags & PAL)  ? "PAL" : "NTSC", (GfxBase->DisplayFlags & REALLY_PAL)  ? "REALLY_PAL" : "NTSC");
	printf( "GfxBase ChipRev0 set to: %s, %s, %s, %s\n",
		(GfxBase->ChipRevBits0 & GFXF_HR_AGNUS)  ? "HiRes Agnus" : "Normal Agnus",
		(GfxBase->ChipRevBits0 & GFXF_HR_DENISE) ? "HiRes Denise" : "Normal Denise",
		(GfxBase->ChipRevBits0 & GFXF_AA_ALICE)  ? "AA Alice" : "Not AA",
		(GfxBase->ChipRevBits0 & GFXF_AA_ALICE)  ? "AA Lisa" : "Not AA");

	if (GfxBase->ChipRevBits0 & GFXF_BIG_BLITS)
		printf( "PPaint is now able to deal with big blits > 1008 pixels in width\n");
	else
		printf( "PPaint isn't able to deal with big blits...\n");
}


Contents of util/misc/SetAgnus.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO     CRC       STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]                 1358    1694  80.2% -lh5- a22b Nov 16  2003 SetAgnus.info
[generic]                 3687    5768  63.9% -lh5- 388f Nov 16  2003 SetAgnus/SetAgnus
[generic]                 1845    4081  45.2% -lh5- 1f42 Nov 16  2003 SetAgnus/SetAgnus.readme
[generic]                  355     613  57.9% -lh5- 7da8 Nov 16  2003 SetAgnus/SetAgnus.readme.info
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total         4 files    7245   12156  59.6%            Nov 30  2003
Page generated in 0.02 seconds
Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>