Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I6GYB-0004M9-7g for qemu-devel@nongnu.org; Wed, 04 Jul 2007 21:54:31 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I6GY9-0004JG-2g for qemu-devel@nongnu.org; Wed, 04 Jul 2007 21:54:30 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I6GY8-0004Io-Sc for qemu-devel@nongnu.org; Wed, 04 Jul 2007 21:54:28 -0400 Received: from web30014.mail.mud.yahoo.com ([209.191.69.31]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1I6GY8-0008Qk-Bh for qemu-devel@nongnu.org; Wed, 04 Jul 2007 21:54:28 -0400 Date: Thu, 5 Jul 2007 13:54:27 +1200 (NZST) From: thematrixeatsyou MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <391121.61536.qm@web30014.mail.mud.yahoo.com> Subject: [Qemu-devel] [Bug report] [0.9.0 x86/Linux] Sine / Cosine emulated incorrectly for QuickBasic 4.5 Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hey there, I've been doing a bit of programming with QuickBasic using MS-DOS 6.22 running under QEMU 0.9.0/x86/Linux. It's all fine and dandy except for one (big) problem: sin() and cos() don't work correctly. Here's a demonstration: http://nonlogic.org/dump/bin/1183539319-glitchy.exe It works fine on a real PC, and even VMWare, but not under QEMU. I'm pretty sure it's QEMU, as I don't have the problem running it under QBasic 1.0, which I hear *emulates* sin() and cos(). But, let's face it, compared with QuickBasic 4.5, QBasic 1.0 sucks. What happens under QEMU is, after drawing 1/8, it draws the third 1/8 when it should be drawing the second 1/8, and vice versa. Same goes with the sixth and seventh 1/8s. Here's the source code: CONST pi = 3.141592653589793# CONST p256 = pi / 128 SCREEN 13 FOR i = 0 TO 31 PALETTE 0 + i, i * &H10101 PALETTE 32 + i, i * &H2 PALETTE 64 + i, i * &H200 PALETTE 96 + i, i * &H202 PALETTE 128 + i, i * &H20000 PALETTE 160 + i, i * &H20002 PALETTE 192 + i, i * &H20200 PALETTE 224 + i, i * &H20202 NEXT FOR i = 0 TO 256 PSET (i, 0), i px = 160 + SIN(i * p256) * 80 py = 100 + -COS(i * p256) * 80 PSET (px, py), i t = TIMER DO: LOOP WHILE TIMER - t < .01 NEXT Note that it breaks with ANY use of sin() or cos() under QB4.5. --GreaseMonkey Send instant messages to your online friends http://au.messenger.yahoo.com