From mint-bounce@lists.fishpool.fi Mon Dec 7 05:48:18 2009 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=eNmr9h/AwZBifTrYIhpnyeIlAEdflvG/kSH4Mn9WAS4=; b=ZLaqHKFp0hpC157E2+UjDWn3sHaZUk5YdyV8UfFjLLD5r1omBQ6GgJ2L77iFCVNvyg nuI2SuwOgAFCCTZDhKmGkOs5l4K2Ijl0tHro+xvsb7Hbf/2c78wNy2HjeW+nQ1yhwTc0 pZYc+yiRAwRdO5K0c8LSdDBCkIzkN48IGFAkI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; b=qTA0GGA4HT/3/nbNtMvLGYRFldITuXoK4m3WdWSc/AwY3zYcZB1V2dvM24h6j1d0Yz ++1Z8d61rYXHoisAc+bkdYISCslE3cdlDOw2Z4UxKrD9sf8UhnUzCC8WcFNy4HxJX26t OJi7HKYyzTEZiM4bdmRUDp6WDGfS9w5Be1QtA= Message-ID: <4B1CDCD3.70201@freesbee.fr> Date: Mon, 07 Dec 2009 11:45:39 +0100 From: =?ISO-8859-1?Q?Vincent_Rivi=E8re?= User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: mint Subject: Re: [MiNT] XaAES sources for FreeMiNT 1.16.3 References: <11a6f2b10911270646s6ceab50i915d71aeb27f6be9@mail.gmail.com> <11a6f2b10911280905x3e0bed79w6911af74cce455e@mail.gmail.com> <11a6f2b10911281010t6c5780abnc26d088776ab1afd@mail.gmail.com> <11a6f2b10911281226n17c678c2q9052207e62206518@mail.gmail.com> <11a6f2b10911281304o32549012oae0b09887d570c05@mail.gmail.com> <11a6f2b10911281336q6ad74b7au657ac40469b28d8@mail.gmail.com> <11a6f2b10912070147g2fbbe909u466a57ae8b89456c@mail.gmail.com> In-Reply-To: <11a6f2b10912070147g2fbbe909u466a57ae8b89456c@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: vincent.riviere@freesbee.fr Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: List-subscribe: List-owner: List-post: Paul Wratt wrote: > this is the kernel, so "standard" SpareMint Libs used to compile MiNT > code: > if (screen.planes > 8) > { > MFDB scr, dst; > struct rgb_1000 srgb, rgb; > short pxy[8]; > union { unsigned short w[64]; unsigned long l[32];} b; > > (*v->api->wr_mode)(v, MD_REPLACE); > (*v->api->l_type)(v, 1); > (*v->api->l_ends)(v, 0, 0); > (*v->api->l_width)(v, 1); > > vq_color(v->handle, 0, 1, (short *)&srgb); > // display("saved %04d, %04d, %04d", srgb.red, srgb.green, srgb.blue); > rgb.red = 1000; > rgb.green = 1000; > rgb.blue = 0; > vs_color(v->handle, 0, (short *)&rgb); > (*v->api->line)(v, 0, 0, 0, 0, 0); > > > scr.fd_addr = NULL; > > dst.fd_addr = &b; > dst.fd_w = 1; > dst.fd_h = 1; > dst.fd_wdwidth = 1; > dst.fd_stand = 1; > dst.fd_nplanes = screen.planes; > dst.fd_r1 = dst.fd_r2 = dst.fd_r3 = 0; > > pxy[0] = 0; > pxy[1] = 0; > pxy[2] = 0; > pxy[3] = 0; > pxy[4] = 0; > pxy[5] = 0; > pxy[6] = 0; > pxy[7] = 0; > > vro_cpyfm(v->handle, S_ONLY, pxy, &scr, &dst); > > vs_color(v->handle, 0, (short *)&srgb); > > switch (screen.planes) > { Oh, I see 2 things that require attention in this code: 1) The union used for the "b" variable. It looks like the standard clean way to get rid of that damn "dereferencing type-punned pointer will break strict-aliasing rules" warning with GCC 4.x, as I told you yesterday. This is clean, but when introducing such syntax, a lot of care must be taken to avoid potential regressions. 2) Call to vro_cpyfm(). This function was buggy in older ARAnyM version due to an SDL bug. I absolutely don't say there is something wrong in this code, but the facts I have indicated must be kept in memory while looking for strange behaviours. I recall you that CVS has an "history" feature to see what changed in any source file. -- Vincent Rivière