cf7716d068Tidy a bit
kris
2022-07-22 11:39:05 +0100
f64b1a6e2c- parametrize frame size. 4KB has too much buffering though - Correct speaker model to apply coefficients for a square wave impulse - Parametrize speaker scaling factor - Flush wav file output after 1MB
kris
2022-07-09 11:20:03 +0100
e79ed985bcSupport 11 cycle cadence using STA $BFFF,Y(=31). This slightly improves quality
kris
2022-07-08 23:28:35 +0100
11afaa152b- Only use the minimal player, quality is better and we don't often need more than 6 cycle gaps - Generate 1-cycle EOF opcodes for now, but we'll need to tweak further. - Generate both duty cycle orderings (a,b) and (b,a) since we anchor the EOF opcodes with a STA $C030 at the beginning - Sort EOF by total length so it's clearer when looking at the usage profile which ones are needed
kris
2022-06-28 22:06:38 +0100
e0908a9cedWIP - refactor player generation to be a) deterministic b) use opcodes_6502 c) statically enumerate a minimal set of opcode sequences. Since we're giving up on using arbitrary opcode combinations this is much simpler, and maybe more correct.
kris
2022-06-25 15:14:17 +0100
bc032ae3caAutogenerate eof with speaker opcode interleaving
kris
2022-06-21 22:32:12 +0100
cb5de62cc8Look ahead beyond the EOF opcodes for better prediction quality
kris
2022-06-21 21:33:19 +0100
a48e7b796cOops, EOF opcodes weren't being padded
kris
2022-06-11 21:13:36 +0100
b1bd8f7b19Don't need most EOF
kris
2022-06-11 17:39:57 +0100
13fb60fed0Add a lot of EOF variants - quality is good but they're mostly not used
kris
2022-06-11 17:27:52 +0100
b97a625d7dWorking version of encoder. This reproduces the clicking that happens from end-of-frame, so we will need a new strategy
kris
2022-05-16 21:11:17 +0100
33ce46a19cSecond order difference equation for damped harmonic oscillator, from "Signal processing in C"
kris
2022-05-16 10:43:40 +0100
daee564255Rename slowpath opcode to end_of_frame to better describe what it does.
kris
2020-12-28 22:42:34 +0000
ccba51eeadAdd support for targeting 6502, for which the JMP (indirect) opcode takes 5 cycles instead of 6.
kris
2020-12-28 13:23:57 +0000
38280e7d93Add more audio file types
kris
2020-12-28 13:23:18 +0000
d4bc2d45e5Parametrize options by command-line flags
kris
2020-12-28 12:54:44 +0000
4090c502a8Add back preprocess_audio for converting audio sample rate. It's faster to do this once when converting an audio file many times.
kris
2020-12-28 12:54:39 +0000
4666171aaaCount and report on the number of speaker toggles/sec during encoding.
kris
2020-12-28 12:30:29 +0000
a1a1f33c21Add partial support for 4-cycle NOP; NOP opcode pairs
kris
2020-12-28 12:29:05 +0000
93b63db558Use the correct effective clock rate for a PAL Apple II, taking into account the long cycle.
kris
2020-12-24 14:43:00 +0000
0bb7871355Allow padding out the full $300 page with opcodes, sorted by the number of non-NOP opcodes to give the most opportunities for speaker actuation.
kris
2020-12-24 14:40:26 +0000
c776b3cbe2Refactor to allow passing in other opcode sequences
kris
2020-12-07 21:06:00 +0000
706ba54f5bFurther significant optimizations: - Switch some matrices to column-major order, since they usually have more rows than columns. This turns out to be slightly faster. - Precompute more of the speaker trajectory formula, since most of it only depends on the matrix of applied voltages (which only depends on frame_offset).
kris
2020-12-07 20:48:15 +0000
54369a620fWrap line
kris
2020-12-07 20:48:05 +0000
194da9a509Check in generated player using NOP, NOP3 and STA opcodes, to max cycle length 19. This seems to give the best quality so far.
kris
2020-12-07 20:40:00 +0000
1cf1ed25bbDon't start opcode sequences with NOPs, the encoder mostly avoids these so they just waste space without improving quality.
kris
2020-12-07 20:38:58 +0000
b8de1d4f7bFix a serious bug in cycle_lookahead, it was not flipping the opcode voltage schedule based on the last value of the previous opcode.
kris
2020-12-07 20:34:57 +0000
468d47966dOptimize encoder by memoizing better, and expanding the recurrence relation for the difference equation to use a closed-form solution that can be vectorized better. This is now about 3x faster.
kris
2020-12-03 14:02:36 +0000
ccc8594c45Clean up more.
kris
2020-10-15 20:28:26 +0100
76d6bc8426Integrate generated player code
kris
2020-10-15 14:27:37 +0100
659d9906bdGenerates player audio code and encoder representation, by enumerating all combinations of 6502 opcodes and deduplicating.
kris
2020-08-25 21:54:46 +0100
8122f65dc6Optimize memory and speed.
kris
2020-08-25 20:46:00 +0100
938fbae488Optimize evolve() by expanding recurrence relation
kris
2020-08-24 22:28:28 +0100
5fb995c435Credit Scott in README
1mhz
kris
2020-08-16 23:19:48 +0100
4767ee51fdFixup player timings and opcode variants for 65c02 timings since JMP (indirect) takes 5 cycles not 6! It should be possible to also accommodate 6502 timings in a followup.
kris
2020-08-16 23:15:30 +0100
9e0e1fcbcbOne more fix
kris
2020-08-15 23:24:25 +0100
790c2bc1ecRevise and update
kris
2020-08-15 23:22:27 +0100
86cd1e11141MHz encoder and player
kris
2020-08-13 22:08:50 +0100
eeeb457b23Add an example file. This was encoded with lookahead 11.
kris
2020-08-12 22:10:38 +0100