Commit Graph

  • bf45f8e841
    Merge 895fca15d0 into 757e312602 Andrea 2023-07-07 01:57:21 +0100
  • 757e312602
    Link to kfest 2022 presentation master KrisKennaway 2023-07-06 22:19:06 +0100
  • 895fca15d0 Some additions to .gitignore. Andrea Odetti 2023-05-13 20:14:43 +0100
  • ab93b5c3f6 Add ability to output the 1MHz square wave. Andrea Odetti 2023-05-13 20:11:24 +0100
  • 5c6b23c206 Add default for lookahead_cycles. Andrea Odetti 2023-05-13 20:05:59 +0100
  • 8a44c69069 Fix usage of nullcontext. Andrea Odetti 2023-05-13 20:05:21 +0100
  • ca6973f2a2
    Merge pull request #1 from KrisKennaway/1mhz-opt-osc KrisKennaway 2022-07-22 15:01:01 +0100
  • 2dff0c242c
    Merge branch 'master' into 1mhz-opt-osc 1mhz-opt-osc KrisKennaway 2022-07-22 14:58:47 +0100
  • a7c8a2ff2b Add links and update to reference slot 3 kris 2022-07-22 14:53:00 +0100
  • cf24da1228 Add example audio file kris 2022-07-22 14:52:10 +0100
  • 5abad38314 Improve comments kris 2022-07-22 14:36:09 +0100
  • 9129cdccfe Rename toggles to voltages; get working again kris 2022-07-22 14:32:01 +0100
  • 2907ba583d Tidy kris 2022-07-22 14:30:54 +0100
  • 893e872da4 Tidy kris 2022-07-22 14:29:31 +0100
  • b243e7afb4 Overhaul README kris 2022-07-22 14:28:48 +0100
  • 30c79accd7 Add a requirements.txt kris 2022-07-22 12:22:56 +0100
  • 5d628aec0f Tidy kris 2022-07-22 12:22:45 +0100
  • e4f20ea9c7 Tidy kris 2022-07-22 12:12:46 +0100
  • 183781da60 Tidy kris 2022-07-22 12:02:35 +0100
  • cf7716d068 Tidy 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
  • e79ed985bc Support 11 cycle cadence using STA $BFFF,Y(=31). This slightly improves quality kris 2022-07-08 23:28:35 +0100
  • a356f6a3a7 It works! kris 2022-07-04 11:03:19 +0100
  • cea66fe916 Generate stage 3 jump tables kris 2022-07-04 09:46:56 +0100
  • 21c2257e5c Tidy kris 2022-07-03 23:11:30 +0100
  • 8eeb26379d Oops, add missing file kris 2022-07-03 23:11:20 +0100
  • 6ff35df1ae Oops, add build file for lookahead.pyx kris 2022-07-03 23:10:43 +0100
  • 233e94d94f Tidy kris 2022-07-03 23:09:04 +0100
  • f65aaba765 Write out wav files incrementally during processing kris 2022-07-03 22:42:45 +0100
  • 2e3e51bb99 Chunk the output resampling to limit memory use kris 2022-07-03 22:33:01 +0100
  • 18a16999b0 Tweak to handle full audio files without crashing kris 2022-07-03 22:32:36 +0100
  • a9e7a1bbff Implement (10,10) eof duty cycle as a special case kris 2022-07-02 21:59:08 +0100
  • 6772b579ca Dramatically reduce memory use kris 2022-07-02 21:20:16 +0100
  • 0d217e9326 Improved quality and speed kris 2022-07-02 20:53:02 +0100
  • d153119231 Allow writing out a noise wav file containing the difference between input and output audio kris 2022-07-02 16:50:42 +0100
  • 535656aceb Working! kris 2022-07-02 14:15:41 +0100
  • 2a20bebb37 Tidy kris 2022-07-02 11:43:35 +0100
  • 3458d3a1de Assert combined EOF operations have the expected (a, b) cadence kris 2022-07-02 11:42:36 +0100
  • 2016e4a5f1 Tidy kris 2022-07-02 10:58:38 +0100
  • 622583696d Simplify player op generation kris 2022-07-02 10:52:23 +0100
  • efb66e03d8 Begin to rework player operation generation kris 2022-07-02 10:05:21 +0100
  • 695ddb2c10 Checkpoint kris 2022-07-02 00:27:27 +0100
  • 445ec18f34 WIP - tidy and compute the minimum duty cycle for variants that have a STA $C030 in stage 2 trampoline kris 2022-07-01 23:17:25 +0100
  • 47c7f441cf WIP - generate 3 stage EOF trampoline parametrized by (a, b) duty cycles kris 2022-07-01 22:22:38 +0100
  • c33e835f7a Simulate at clock speed and downsample output kris 2022-06-28 22:09:42 +0100
  • 9a9434e9aa Tweak kris 2022-06-28 22:09:21 +0100
  • d2cdceb04e Regenerate kris 2022-06-28 22:09:09 +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
  • 346c647c40 Tweaks kris 2022-06-28 22:04:57 +0100
  • 73ef91b5ad Simulate PWM audio filtered through speaker kris 2022-06-26 21:48:33 +0100
  • 804ce60434 Clean up some more and restore fake EOF opcodes kris 2022-06-25 15:26:14 +0100
  • efa63a5ab2 Tidy kris 2022-06-25 15:15:40 +0100
  • e0908a9ced WIP - 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
  • bc032ae3ca Autogenerate eof with speaker opcode interleaving kris 2022-06-21 22:32:12 +0100
  • cb5de62cc8 Look ahead beyond the EOF opcodes for better prediction quality kris 2022-06-21 21:33:19 +0100
  • a48e7b796c Oops, EOF opcodes weren't being padded kris 2022-06-11 21:13:36 +0100
  • b1bd8f7b19 Don't need most EOF kris 2022-06-11 17:39:57 +0100
  • 13fb60fed0 Add a lot of EOF variants - quality is good but they're mostly not used kris 2022-06-11 17:27:52 +0100
  • 1552715b49 Optimized EOF sequence kris 2022-06-04 14:53:33 +0100
  • fbd6b956d1 Checkpoint working player kris 2022-06-04 14:06:52 +0100
  • 8ea4f150ad Checkpoint - trying to mitigate EOF clicking kris 2022-05-24 22:19:40 +0100
  • b97a625d7d Working 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
  • 33ce46a19c Second order difference equation for damped harmonic oscillator, from "Signal processing in C" kris 2022-05-16 10:43:40 +0100
  • 929ea026d9 Format comment 1mhz-opt kris 2020-12-29 14:33:22 +0000
  • daee564255 Rename slowpath opcode to end_of_frame to better describe what it does. kris 2020-12-28 22:42:34 +0000
  • ccba51eead Add support for targeting 6502, for which the JMP (indirect) opcode takes 5 cycles instead of 6. kris 2020-12-28 13:23:57 +0000
  • 38280e7d93 Add more audio file types kris 2020-12-28 13:23:18 +0000
  • d4bc2d45e5 Parametrize options by command-line flags kris 2020-12-28 12:54:44 +0000
  • 4090c502a8 Add 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
  • 4666171aaa Count and report on the number of speaker toggles/sec during encoding. kris 2020-12-28 12:30:29 +0000
  • a1a1f33c21 Add partial support for 4-cycle NOP; NOP opcode pairs kris 2020-12-28 12:29:05 +0000
  • 089591737f Regen kris 2020-12-24 14:44:19 +0000
  • cef38dae59 Comment nit kris 2020-12-24 14:44:09 +0000
  • 4701dc14f1 Regen kris 2020-12-24 14:43:51 +0000
  • 93b63db558 Use the correct effective clock rate for a PAL Apple II, taking into account the long cycle. kris 2020-12-24 14:43:00 +0000
  • 0bb7871355 Allow 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
  • c776b3cbe2 Refactor to allow passing in other opcode sequences kris 2020-12-07 21:06:00 +0000
  • baca499d3b Checkpoint kris 2020-12-07 20:58:34 +0000
  • f1b6983dda Last minute tweaks kris 2020-12-07 20:58:18 +0000
  • 706ba54f5b Further 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
  • 54369a620f Wrap line kris 2020-12-07 20:48:05 +0000
  • 194da9a509 Check 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
  • 1cf1ed25bb Don'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
  • b8de1d4f7b Fix 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
  • 468d47966d Optimize 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
  • ccc8594c45 Clean up more. kris 2020-10-15 20:28:26 +0100
  • 76d6bc8426 Integrate generated player code kris 2020-10-15 14:27:37 +0100
  • 22babbaa73 Parametrize normalization percentage kris 2020-10-15 13:08:33 +0100
  • 3ef80ec6cf Overhaul README to describe current status. Still some work needed. kris 2020-10-15 11:31:25 +0100
  • f17db175a5 Simplify kris 2020-08-25 21:57:42 +0100
  • 659d9906bd Generates player audio code and encoder representation, by enumerating all combinations of 6502 opcodes and deduplicating. kris 2020-08-25 21:54:46 +0100
  • 8122f65dc6 Optimize memory and speed. kris 2020-08-25 20:46:00 +0100
  • 938fbae488 Optimize evolve() by expanding recurrence relation kris 2020-08-24 22:28:28 +0100
  • 7a4a36af6b Checkpoint WIP kris 2020-08-24 21:27:24 +0100
  • 5fb995c435 Credit Scott in README 1mhz kris 2020-08-16 23:19:48 +0100
  • 4767ee51fd Fixup 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
  • 9e0e1fcbcb One more fix kris 2020-08-15 23:24:25 +0100
  • 790c2bc1ec Revise and update kris 2020-08-15 23:22:27 +0100
  • 86cd1e1114 1MHz encoder and player kris 2020-08-13 22:08:50 +0100
  • eeeb457b23 Add an example file. This was encoded with lookahead 11. kris 2020-08-12 22:10:38 +0100