Path: chuka.playstation.co.uk!news From: James Shaughnessy Newsgroups: scee.yaroze.programming.codewarrior Subject: Help with MWwrite() function Date: Thu, 08 Oct 1998 20:27:50 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 33 Message-ID: <361D1236.2107@manc.u-net.com> Reply-To: james@manc.u-net.com NNTP-Posting-Host: manc.u-net.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.0 (Win95; I) I would really appreciate help with this someone. Please! I have posted some of the relevant code below, in case it's obvious and to save you dloading the file and all that malarky. Anyhoo, the problem is that it currently saves 74000 bytes, as opposed to the required 73728 (ie. exactly 72Kb == 0x12000), even though the functions are being called with 0x12000 as data size. The file it creates is MYPAL.DAT if you select "Save PAL replays" and it's this that should be exactly 73728 bytes. Same for NTSC. http://www.netyaroze-europe.com/~shaughnj/ftp/help.zip // snippet from the cw_dsave program // Saves PAL-demo memory block to host in MetroWerks CodeWarrior void SaveRecordToHost() { int fd, bytes; char *filename1 = "mypal.dat"; void *data; data = (void *)(0x80196000); fd = MWopen(filename1, FCREAT); bytes = MWwrite(fd, data, 0x12000); // 0x12000 = 73728 bytes MWclose(fd); } I appreciate any help with this, Jim -- ----------------------------------------- James Shaughnessy james@manc.u-net.com http://www.netyaroze-europe.com/~shaughnj -----------------------------------------