mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2024-11-22 14:33:51 +00:00
updates for apple2 spkr accuracy
This commit is contained in:
parent
99d32a17aa
commit
bc58a43473
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user