1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-05-28 23:41:32 +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) {
accum += value * count;
sfrac += sinc * count;
while (sfrac >= 1) {
sfrac -= 1;
value *= sfrac;
this.addSingleSample(accum - value);
accum = value;
if (sfrac > 1) {
accum /= sfrac;
this.addSingleSample(accum * sinc);
sfrac -= Math.floor(sfrac);
accum *= sfrac;
}
}

View File

@ -4,7 +4,7 @@ import { Bus, BasicScanlineMachine, xorshift32, SavesState } from "../common/dev
import { KeyFlags } from "../common/emu"; // TODO
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 cpuCyclesPerFrame = 65*262;

View File

@ -2066,7 +2066,7 @@ function assembleNESASM(step:BuildStep) {
asym = FS.readFile(sympath, {'encoding':'utf8'});
} catch (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}
}
putWorkFile(binpath, aout);