Thank you for that.
I was also wondering about the general case. Figured it would be quicker to just write a super basic program (see below) rather than start testing other pieces of software.
I've tested this on an A3000 (running OS3.1 w/ MNT ZZ9000) and an A4000 (running OS3.2 UAEGFX in FS-UAE) and works as expected.
On AROS m68k, the good news is the system doesn't lock up, but regardless of if I start in a PAL mode or an RTG mode the screen is squished, see attached image.
Any thoughts, or some place where I can read up more on this?
#include <proto/exec.h>
#include <exec/types.h>
#include <clib/intuition_protos.h>
#include <proto/graphics.h>
#include <stdio.h>
struct IntuitionBase *IntuitionBase;
struct GfxBase* gfxBase;
struct NewScreen new_screen = {
0, 0,
640, 256,
8,
0, 1,
HIRES,
CUSTOMSCREEN|SCREENQUIET,
NULL,
(UBYTE *) "My Test Screen",
NULL,
NULL
};
struct Screen *my_screen;
struct RastPort *rast_port;
char *LeftMouse = (char *) 0xbfe001;
void InitAll();
void CloseAll();
void DrawTestSquare(WORD x, WORD y, UBYTE c);
int main() {
printf("Starting screen test\n");
InitAll();
printf("InitAll Complete\n");
rast_port = &my_screen->RastPort;
DrawTestSquare(0, 0, 1);
DrawTestSquare(630, 0, 1);
DrawTestSquare(0, 246, 1);
DrawTestSquare(630, 246, 1);
printf("Waiting for left mouse click...\n");
while((*LeftMouse & 0x40) == 0x40) {
}
printf("Let's close everything down\n");
CloseAll();
return TRUE;
}
void InitAll() {
if (!(IntuitionBase = (struct IntuitionBase *) OpenLibrary("intuition.library", 0L))) {
printf("Intuition library cannot be found!\n");
CloseAll() ;
exit(FALSE);
}
if((gfxBase = (struct GfxBase*) OpenLibrary("graphics.library", 0)) == NULL) {
printf("No Graphics!!\n");
exit(FALSE);
}
if (!(my_screen = (struct Screen *) OpenScreen(&new_screen))) {
printf("Screen cannot be opened!\n");
exit(FALSE);
}
}
void CloseAll() {
if(my_screen) {
CloseScreen(my_screen);
}
if(IntuitionBase) {
CloseLibrary((struct Library*)IntuitionBase);
}
if(gfxBase) {
CloseLibrary((struct Library*)gfxBase);
}
}
void DrawTestSquare(WORD x, WORD y, UBYTE c) {
SetAPen(rast_port, c);
Move(rast_port, x, y);
WORD points[10] = {x, y, x+9, y, x+9, y+9, x, y+9, x, y};
PolyDraw(rast_port, 5, &points);
}