From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 24819 invoked from network); 8 Feb 2021 03:05:15 -0000 Received: from 1ess.inri.net (216.126.196.35) by inbox.vuxu.org with ESMTPUTF8; 8 Feb 2021 03:05:15 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Received: from mail-pl1-f170.google.com ([209.85.214.170]) by 1ess; Sun Feb 7 19:48:53 -0500 2021 Received: by mail-pl1-f170.google.com with SMTP id j11so6900770plt.11 for <9front@9front.org>; Sun, 07 Feb 2021 16:48:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mforney-org.20150623.gappssmtp.com; s=20150623; h=message-id:to:from:date:subject; bh=ZkqwdOjboqAaQGLgSm4SSRE0KFQlrjiQAoM6mbSE6rA=; b=GAtS+yieq4FkWLc9NthoFYNrU7/wGjX2JJbMjJeUcSkMljFKwLC+pZK6VjfFMyK/7u o9EpmiZsyVlizpU6QtYrHmMH8cQFqwDBe0Dzy5CMryV2C8YF32ofba90FShyR2UF4CRa uCiTyGx0XnbPRzgRnMs00GStKxOB/tvx7RUVk8HYgcUxCC0Krt14+/KNGDapvmhN15hi NRK2Ewp//LcR/7muhWJ/2VrFI1W7fw+8Mm0b9zVZKoKik+o6JXDuhxydJ/hYEr4RG+XX OKV/qzdjNZM4WaeUtUW19ndAWXDfTGl18VihhqTQFWVcth9oRwfn53LDMtmM2A+7nB5B /vYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:to:from:date:subject; bh=ZkqwdOjboqAaQGLgSm4SSRE0KFQlrjiQAoM6mbSE6rA=; b=WLxwhDZq91gZwsCUYVKyZ8CwkOdgU45sTmnDmINj00otz7OIEje08BHf4oZxr3WXy+ n2v38jFpegPU0gIr4N73cY2/4VI9rpKrB33A1jK6eRx9043X6f+1DftN4tbSt/PBUYPN /SmPAPTFgxo5JVzCKczhEDtBMUwH46anfxu5KdT5kFQ0yxY/gRUt+mn8mh7/lo0E1tW7 XLoo0CWUIMbVmN3rLHsZ76+E4Noi0fWVsdDB6X9oQctxhgP6ZDKoFHMwUwjyict2nH9Y wFNP/QmVqN1ElJ90UZEQg8UG2lI7kVcgeBpd86Q4OHnKfJM+oA2uWfa9/qt3WnEofdSQ Ibsg== X-Gm-Message-State: AOAM531X/OzbgUGnD4dW6t5oQSqvtCyGMJ4icivaGGsaI9XMBC4Z7m4c J7yuZCsOmKwTb9n45V7TLalxmlgjBzv/sUFbQfQ= X-Google-Smtp-Source: ABdhPJxNzN03PdljJn3I/kHViNCwVhyrWnQLFSyn5bPE293jQVzR08zqejjMnxvrv3RNZ0FdbnwBXw== X-Received: by 2002:a17:903:230b:b029:dd:7cf1:8c33 with SMTP id d11-20020a170903230bb02900dd7cf18c33mr13938326plh.31.1612745321873; Sun, 07 Feb 2021 16:48:41 -0800 (PST) Return-Path: Received: from arrow.hsd1.ca.comcast.net (c-73-70-188-119.hsd1.ca.comcast.net. [73.70.188.119]) by smtp.gmail.com with ESMTPSA id b20sm3556213pfo.109.2021.02.07.16.48.41 for <9front@9front.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 07 Feb 2021 16:48:41 -0800 (PST) Message-ID: <6E7E5BB481C0829E09FCC1A4BB6964E7@arrow.hsd1.ca.comcast.net> To: 9front@9front.org From: Michael Forney Date: Mon, 08 Feb 2021 00:12:28 +0000 List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: lossless object-oriented singleton NoSQL framework software-scale backend Subject: [9front] games/gb: fix reversed audio channels Reply-To: 9front@9front.org Precedence: bulk The high bits correspond to the left channel, and the low bits to the right channel. Reference: https://gbdev.io/pandocs/#sound-control-registers diff 3fc115a6ff6eef65210fb78a51128958d2b55910 9d0249f7a978b4e84f3cd9083f787b4f3f533b41 --- a/sys/src/games/gb/apu.c Sun Feb 7 15:22:39 2021 +++ b/sys/src/games/gb/apu.c Sun Feb 7 16:12:28 2021 @@ -115,13 +115,13 @@ if(i == 2 ? ((reg[NR30] & 0x80) == 0) : ((*sndch[i].env & 0xf8) == 0)) continue; v = sndch[i].samp * 2 - 15; - if((cnth & 1<> 4 & 7); + ov0 *= 1 + (cntl >> 4 & 7); + ov1 *= 1 + (cntl & 7); } static void