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 22876 invoked from network); 3 Feb 2021 10:10:07 -0000 Received: from 1ess.inri.net (216.126.196.35) by inbox.vuxu.org with ESMTPUTF8; 3 Feb 2021 10:10:07 -0000 Received: from mail-pg1-f173.google.com ([209.85.215.173]) by 1ess; Wed Feb 3 04:07:00 -0500 2021 Received: by mail-pg1-f173.google.com with SMTP id o16so16887800pgg.5 for <9front@9front.org>; Wed, 03 Feb 2021 01:06:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mforney-org.20150623.gappssmtp.com; s=20150623; h=from:message-id:to:date:subject:mime-version :content-transfer-encoding; bh=n2Ogn04Qip//HGGs1lwUo+YH3cSX2QMi5TcaghjDvZQ=; b=pdvjlt7ZihqYGsG3YMghCUtCSMQqM3IGjiLeHDfibbJztPskt8GeAemMVqsSzfv7Fu lkSTUT40GWfBcdKT91K0ngTwI7FiuhwB2EeepssA3FdQgQZw9cL7q0Wkuf6oMmnQ+ojN mAvjKJzZeDMCfBGXMk/PePC0vY/1D2+qnisXMQ+LWRooCbgHFCyHxhuFCcAFX+Ul2r1Y 1OlhzcE96Vsl4bHkSvlWg/GyQN32oJpQ3fOlzj2T6OOZZzR8ZNcC/gRH2/G4OuE+a+x5 zuPtUWhY63f9FTNyx2cV3bA05e10u3+HH8cE+IkYrcHl0sgRRItYIAgWJ2naAko1y7il XhzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:to:date:subject:mime-version :content-transfer-encoding; bh=n2Ogn04Qip//HGGs1lwUo+YH3cSX2QMi5TcaghjDvZQ=; b=N5947tgFW4zNF9yAH6BHrbFRTe1HM5C1ZhuAUtvfZjtO/eaQhJJxb3Y7NVshx9fG7h +koYpH/atI6xsDiTcZsx1YEKUS8dWZo+lJhJ9FUJgQytR51qoC/2g/yfgwCFiSAKJTlq +CaUHCWl2MtoUSrjcrn/EnRLvmOSSTD4/M7CA6qqfEg8JsR9fhMy2UPp9KjCUp+CNAbG kL2ExapEKPlB1It/ioV8DZbLv1FbxxSuvOpsRsqXcE5quxf9g23M4FFHjBtIbV3jMYS8 3gEd059Ec/aepCLiVfozVzPr9XK6bI+7BDFfouXdws7pUlx6vrDdrSScwXyEScg5nqYH Dc2g== X-Gm-Message-State: AOAM532NHQFnIBOMTjj1DNHwoNL0AZWrvJuCp01x2BFbuIsLJnrxtuv3 LwhPtPZOfa8Br9/jOQXzJC5j9edI6o5wrWUWoaU= X-Google-Smtp-Source: ABdhPJy92RECNjtnFOYGjjnnDrahIvWgK34EgYEyuTrIoKyAlHNESDxCoAzC0rbJjEc1wWyr/0QRGQ== X-Received: by 2002:a63:8f4c:: with SMTP id r12mr2530119pgn.311.1612343209240; Wed, 03 Feb 2021 01:06:49 -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 n128sm1790945pga.55.2021.02.03.01.06.48 for <9front@9front.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 03 Feb 2021 01:06:48 -0800 (PST) From: Michael Forney Message-ID: To: 9front@9front.org Date: Wed, 03 Feb 2021 08:46:52 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: deep-learning reduce/map cache Subject: [9front] [PATCH] games/gb: fix timer divider for input clock 0 Reply-To: 9front@9front.org Precedence: bulk According to [0], input clock 0 should divide by 1024=2¹⁰, not 2¹². This caused audio to run at quarter-speed in one game I tried. [0] https://gbdev.io/pandocs/#ff07-tac-timer-control-r-w --- diff 07a27ca966dafa2cf22d97ccb2519d16604bdc81 7d37c636636253b74d3d2260e991cd78664ce1e9 --- a/sys/src/games/gb/ev.c Fri Jan 29 01:31:59 2021 +++ b/sys/src/games/gb/ev.c Wed Feb 3 00:46:52 2021 @@ -8,7 +8,7 @@ extern Event evsamp, chev[4]; Event *events[NEVENT] = {&evhblank, &evtimer, &evenv, &evsamp, &chev[0], &chev[1], &chev[2], &chev[3]}; Event *elist; -static int timshtab[4] = {12, 4, 6, 8}, timsh; +static int timshtab[4] = {10, 4, 6, 8}, timsh; ulong timclock; Var evvars[] = {VAR(timsh), VAR(timclock), {nil, 0, 0}};