Path: chuka.playstation.co.uk!news From: "Rikki Prince" Newsgroups: scee.yaroze.freetalk.english Subject: Eureka! (kind of) Date: Sun, 21 Jul 2002 16:34:23 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 64 Message-ID: NNTP-Posting-Host: pc-62-31-230-115-ba.blueyonder.co.uk X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.3018.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300 I think I've worked out where the problem is. It was another part of code, relating to the workspace, and I must have worked the pointers out wrong, and I can't work out how to fix it, so I'm going to need some help here. Below I'm going to paste in all the relevant bits of code (structs and functions). /*---------------------Code starts here--------------------------*/ typedef struct { int RUNNING, SCREEN; int scrnW, scrnH; GsOT ot[2]; GsOT_TAG *otTag; long otLength; int ab; PACKET *gpuPacket[2]; int tvMode; int red, green, blue; } rpGAMEINFO; void rpInitGameStruct(rpGAMEINFO *game, int RUNNING, int scrnW, int scrnH, long otLength, long maxPackets, int tvMode, int red, int green, int blue) { game->RUNNING = RUNNING; game->scrnW = scrnW; game->scrnH = scrnH; game->otLength = otLength; game->otTag = (GsOT_TAG *)malloc(sizeof(GsOT_TAG)*2*(1<<(game->otLength))); game->gpuPacket[0] = (PACKET *)malloc(sizeof(PACKET)*maxPackets); game->gpuPacket[1] = (PACKET *)malloc(sizeof(PACKET)*maxPackets); game->tvMode = tvMode; game->red = red; game->green = green; game->blue = blue; } void rpGraphicsLoopStart(int *ab, PACKET *gpuPacket, GsOT *ot) { *ab = GsGetActiveBuff(); GsSetWorkBase((PACKET *)gpuPacket[*ab]); GsClearOt(0, 0, &ot[*ab]); } /*---------------------Code ends here--------------------------*/ If I create: rpGAMEINFO thisGame; and initialise it using: rpInitGameStruct(&thisGame, 1, 320, 256, 1, 48000, MODE_PAL, 0, 0, 0); what do I pass to rpGraphics LoopStart for the 2nd argument? I was passing thisGame.gpuPacket[0], but I've established that this is where the problem is. Can anyone work out (and possibly explain) what I need to pass to the function, please? Thanks a lot to everyone for their past and hopefully future help :-) Cheers, Rikki