1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2025-02-16 17:30:27 +00:00

updates for apple2 spkr accuracy

This commit is contained in:
Steven Hugg 2020-07-15 15:41:09 -05:00
parent 99d32a17aa
commit bc58a43473
3 changed files with 7 additions and 7 deletions

View File

@ -482,11 +482,11 @@ export var SampleAudio = function(clockfreq) {
this.feedSample = function(value, count) { this.feedSample = function(value, count) {
accum += value * count; accum += value * count;
sfrac += sinc * count; sfrac += sinc * count;
while (sfrac >= 1) { if (sfrac > 1) {
sfrac -= 1; accum /= sfrac;
value *= sfrac; this.addSingleSample(accum * sinc);
this.addSingleSample(accum - value); sfrac -= Math.floor(sfrac);
accum = value; accum *= sfrac;
} }
} }

View File

@ -4,7 +4,7 @@ import { Bus, BasicScanlineMachine, xorshift32, SavesState } from "../common/dev
import { KeyFlags } from "../common/emu"; // TODO import { KeyFlags } from "../common/emu"; // TODO
import { hex, lzgmini, stringToByteArray, RGBA, printFlags } from "../common/util"; import { hex, lzgmini, stringToByteArray, RGBA, printFlags } from "../common/util";
const cpuFrequency = 1023000; const cpuFrequency = 1022727;
const cpuCyclesPerLine = 65; // approx: http://www.cs.columbia.edu/~sedwards/apple2fpga/ const cpuCyclesPerLine = 65; // approx: http://www.cs.columbia.edu/~sedwards/apple2fpga/
const cpuCyclesPerFrame = 65*262; const cpuCyclesPerFrame = 65*262;

View File

@ -2066,7 +2066,7 @@ function assembleNESASM(step:BuildStep) {
asym = FS.readFile(sympath, {'encoding':'utf8'}); asym = FS.readFile(sympath, {'encoding':'utf8'});
} catch (e) { } catch (e) {
console.log(e); console.log(e);
errors.push({line:0,msg:"No symbol table generated, maybe segment overflow?"}); errors.push({line:0,msg:"No symbol table generated, maybe missing ENDM or segment overflow?"});
return {errors:errors} return {errors:errors}
} }
putWorkFile(binpath, aout); putWorkFile(binpath, aout);