Commit Graph

  • 2156522d0f Add a .gitignore file kris 2019-06-12 21:50:27 +0100
  • b84f40308b Add TODO about Opcode.apply being currently unused kris 2019-06-12 21:42:17 +0100
  • 721eb3112d Fix bug with DHGR bank switching: we were emitting the last writes to a bank after switching to the new one, which caused video corruption. kris 2019-06-12 21:37:30 +0100
  • 0c44fe634f Remove stray comment kris 2019-04-25 21:29:38 +0100
  • 782156967b Add --video_mode HGR|DHGR option to support both video modes uniformly. kris 2019-04-25 17:38:04 +0100
  • a188216f90 Add a video Mode enum. kris 2019-04-25 16:28:25 +0100
  • de8747ff37 Emit the video header and add an assertion to help make sure we don't break the stream framing. kris 2019-04-25 16:28:06 +0100
  • 2a76e3d48f Add a HEADER opcode that emits the 7-byte video header, used to select the playback mode (HGR/DHGR). kris 2019-04-25 16:26:38 +0100
  • 6bde085d5e Introduce a 7-byte video header and use it to select between HGR and DHGR playback modes. Actually the only difference is whether to initialize (D)HGR display since everything else is steered by the video stream. 6 of these bytes are currently unused, but it is convenient to pad to the same length as the TICK opcode so that it does not complicate the ACK stream framing. kris 2019-04-25 16:25:36 +0100
  • aaf56e6ec5 Merge remote-tracking branch 'origin/dhgr' into dhgr kris 2019-03-28 23:48:40 +0000
  • 33ac880d29 Improve comment about stream padding kris 2019-03-28 23:47:38 +0000
  • e80e10924c
    Update main.s KrisKennaway 2019-03-28 23:29:10 +0000
  • fa6c2bb25d Minor cleanups: - Use a safe ZP address instead of $00 - Use dec instead of hex for IP address bytes - Remove some unused Uthernet/W5100 defines kris 2019-03-28 23:08:52 +0000
  • 10fa4bc72d Proof of concept DHGR encoding/playback kris 2019-03-27 21:37:06 +0000
  • d4a27444c6 Merge remote-tracking branch 'origin/master' kris 2019-03-24 00:15:16 +0000
  • 21a4ac0186 Fix video termination logic kris 2019-03-24 00:14:41 +0000
  • bb3f2e4a4c
    Add some more details KrisKennaway 2019-03-24 00:03:04 +0000
  • 403915d783
    Create README.md KrisKennaway 2019-03-23 23:48:55 +0000
  • dd422d1156 Fix tests kris 2019-03-23 22:05:36 +0000
  • 13fb9c3125 Clean up module and abort import if we are unable to find the address of an opcode. kris 2019-03-23 22:01:49 +0000
  • 531a6ae345 Allow player to exit cleanly - can't emit Terminate opcode in the middle of the bytestream - pad the TCP stream to next 2k boundary when emitting terminate opcode, since the player will block until receiving this much data. kris 2019-03-23 21:46:35 +0000
  • 8ffc8efaac Install RESET handler that exits to ProDOS kris 2019-03-23 21:45:13 +0000
  • 8174d853f9 Downsize image using LANCZOS resampler. kris 2019-03-22 00:06:29 +0000
  • f37d07914d Print input frame rate, and default to every_n_video_frames=2 which gives better quality without compromising frame rate too much. kris 2019-03-21 23:25:51 +0000
  • eebbccf711 Add some docstrings kris 2019-03-21 22:56:45 +0000
  • fe10f98128 Support skipping frames from the input video to increase output image quality at the expense of frame rate. kris 2019-03-21 22:43:02 +0000
  • 8bdad22162 Stop ticking cycles as part of emitting the opcodes, we are counting them externally in audio.py now. kris 2019-03-21 22:42:09 +0000
  • ce078f493f Start to flesh out function docstrings, add some more type annotations. kris 2019-03-21 22:41:05 +0000
  • da2e2476e7 Rename tests and clean up a bit. Still don't pass. kris 2019-03-21 17:21:43 +0000
  • 5a5c761183 Remove _END from opcode. kris 2019-03-21 17:15:44 +0000
  • 84e14efc57 Fix kris 2019-03-21 16:51:33 +0000
  • 5411793ea4 factor out State and CycleCounter to a new machine module and rename kris 2019-03-21 16:48:02 +0000
  • cf493e782c Add module docstrings kris 2019-03-21 16:42:47 +0000
  • 5d4148daaf No need to store opcode _END any more kris 2019-03-21 16:35:42 +0000
  • 7164f20eab Oops fix byte ordering for port kris 2019-03-21 16:35:12 +0000
  • fb47e48e4a Fix imports and point to player debug symbols kris 2019-03-21 16:24:40 +0000
  • d55ee0e170 Rename binary kris 2019-03-21 16:23:56 +0000
  • bbfcacd674 Move transcoder to new location kris 2019-03-21 16:10:16 +0000
  • 4ae5e7a153 Move player to new location kris 2019-03-21 16:09:23 +0000
  • 2f88408c23 Style kris 2019-03-21 16:04:26 +0000
  • 0d54f182f5 Whitespace kris 2019-03-21 16:02:18 +0000
  • 44c1216542 Rename byte_to_colour_string -> byte_to_nominal_colour_string and introduce an attempt at post-processing the colour artefacting that results in coalescing adjacent '1' bits into white pixels. This is an incomplete modeling even of this artefact, let alone the other various fringing weirdness that happens for e.g. NTSC rendering (which is not faithfully reproduced by Apple //GS RGB display, so hard for me to test further) kris 2019-03-21 15:59:56 +0000
  • 4c168721bb - Don't hardcode clock speed kris 2019-03-21 15:57:09 +0000
  • 8f6aa019b6 Remove old player kris 2019-03-21 15:43:09 +0000
  • 065d9dddf8 Move server file into subdir kris 2019-03-21 15:37:51 +0000
  • 0732e2c067 Remove unneeded assert kris 2019-03-21 15:36:29 +0000
  • c4ed5f3d0a Remove files no longer in use. kris 2019-03-21 15:35:55 +0000
  • c8942ba138 Add cc65's LOADER.SYSTEM to the base disk image so we can use it to bootstrap the player. kris 2019-03-21 15:28:41 +0000
  • 341c645c12 Reorder a bit to put the configurable bits at the top. kris 2019-03-21 15:27:24 +0000
  • c53cf76df0 Switch to argparse and parametrize some flags kris 2019-03-21 15:26:00 +0000
  • 0a9e83fa22 Listen on all interfaces, switch to port 1977 and use argparse instead of sys.argv. kris 2019-03-21 15:25:06 +0000
  • 92e1247c63 Add more comments and clean up timings for op_ack. Magically, this all fits in exact multiples of 36/37 ticks! kris 2019-03-15 22:42:33 +0000
  • b3ba069b2d - Improve comments and clean up a bit kris 2019-03-15 22:18:03 +0000
  • fffd05f4d1 Don't schedule a NOP for TCP frame padding; instead just have the ACK include the 2 dummy reads. kris 2019-03-15 21:09:45 +0000
  • 7343aa39ed Fix kris 2019-03-15 21:08:31 +0000
  • 2092ef0926 - Add some comments kris 2019-03-15 21:08:06 +0000
  • 4cb45efb2c Remove old video-only opcode support. kris 2019-03-14 23:05:47 +0000
  • d90b865b16 Style cleanups kris 2019-03-14 23:05:15 +0000
  • 01ffd034eb Move edit distance functions into separate module and clean up partially. kris 2019-03-14 22:32:52 +0000
  • e0ac37fe4a Style kris 2019-03-14 22:31:07 +0000
  • 976e26f159 Vectorize the computation of diff weights, by precomputing a map of all possible weights. We encode the two 8-bit inputs into a single 16 bit value instead of dealing with an array of tuples. kris 2019-03-14 22:08:50 +0000
  • ede453d292 Remove vestige of standalone audio encoder. kris 2019-03-14 21:52:57 +0000
  • 19ffa000f9 fix kris 2019-03-14 21:45:40 +0000
  • ea58c2f5b9 style kris 2019-03-14 21:45:28 +0000
  • cd17dce267 Normalize audio by tasting the first 10M of the audio stream and computing the 2.5%ile and 97.5%ile values, i.e. so that <2.5% of audio samples will clip. kris 2019-03-14 21:40:09 +0000
  • 2d410a4b13 Take filename to serve from argv. kris 2019-03-14 21:38:12 +0000
  • 9c68a6a369 Take input and output filenames from argv. kris 2019-03-14 21:37:43 +0000
  • 718dc15cf2 Add some tests for edit_weight and byte_to_colour_string kris 2019-03-10 23:07:44 +0000
  • 7db5c1c444 Read video frame rate and encode a new frame when the cycle count has ticked past the appropriate time. kris 2019-03-10 22:42:31 +0000
  • aed439c0b3 Optimize some more to fit in memory! kris 2019-03-10 21:57:05 +0000
  • 6b969476a0 Try to even out tick timings during ACK/slow path kris 2019-03-10 21:04:20 +0000
  • 4598709a7d Add custom cc65 config that makes space for a LOWCODE segment from 0x800-0x2000 kris 2019-03-09 22:35:56 +0000
  • 4310034993 Unmodified version of Apple2BuildPipeline kris 2019-03-09 22:31:56 +0000
  • 3fa9d510b5 Construct opcodes and classes for all of the TICK_x_PAGE_y kris 2019-03-07 23:08:01 +0000
  • c00300147e Integrated audio + video player! kris 2019-03-07 23:07:24 +0000
  • f133bb0008 Can fit in 7 more pages kris 2019-03-07 16:04:01 +0000
  • 99c7f6db34 Construct opcodes and classes for all of the TICK_x_PAGE_y kris 2019-03-07 15:56:04 +0000
  • 318a64ad56 Move to 0x4000 for now kris 2019-03-07 15:53:35 +0000
  • 5bd0352491 Parametrize opcodes as macros kris 2019-03-07 15:20:43 +0000
  • 7832333b27 Build as SYSTEM file and load at 0x800. Need to work out how to avoid loading over screen page. kris 2019-03-05 23:41:06 +0000
  • df25fce067 Fix up all but two of the off-by-one tick counts. This uses the trick of temporarily violating the X=0 invariant (which is only required in the tick_6 opcode tail path to steal an extra cycle) to reorder a STA $2000,Y outside of the tick loop. kris 2019-03-05 23:20:17 +0000
  • 8c23824aa6 Optimize more. Should now fit in main memory?! kris 2019-03-05 22:44:39 +0000
  • 3cd44cd891 Optimize down to about 42k required for full set of page opcodes - enough to fit in AUX RAM but still room to go, hopefully will be able to fit in MAIN? kris 2019-03-05 22:22:35 +0000
  • 12d48b664a Prototype audio-only player, which uses a different strategy for scheduling audio + video. kris 2019-03-05 21:05:41 +0000
  • 340a3005d8 Support old-style opcodes that use relative branch addressing, and new cycle-counted tick opcodes that use absolute addressing. kris 2019-03-05 20:51:05 +0000
  • 2f12407d3c Extract audio channel from movie file and emit 5-bit audio opcodes at 14KHz. kris 2019-03-05 20:47:34 +0000
  • 6e2c83c1e5 Introduction more general notion of update priority used to increase weight of diffs that persist across multiple frames. kris 2019-03-04 23:09:00 +0000
  • d3522c817f Randomize tie-breaker when pages etc have the same weight, so we don't consistently prefer larger numbers. kris 2019-03-03 23:25:10 +0000
  • a6f32886cd Refactor the various representations of screen memory (bitmap, (x,y) bytemap, (page,offset) memory map) - add a FlatMemoryMap that is a linear 8K array - add converter methods and default constructors that allow converting between them - use MemoryMap as the central representation used by the video encoder kris 2019-03-03 22:21:28 +0000
  • 80402f25a5 - Allow HGR ROM entry point - Don't trap unexpected entrypoint when crossing between regions via RTS - Implement TICK handler - Improve status printing in CPU loop kris 2019-02-27 22:46:53 +0000
  • 90f696b8e4 Bare-bones py65-based simulator for Apple //e with Uthernet (i.e. simulating the W5100). This will hopefully be useful for troubleshooting and testing player behaviour more precisely, e.g. kris 2019-02-27 22:26:35 +0000
  • 2b3343f374 Encode audio file into cycle timings and emit tick opcodes. Amazingly, even the naive opcode implementation works! kris 2019-02-27 14:49:21 +0000
  • 9d4edc6c4a Compute median frame similarity. This turns out not to be a great metric though, because it doesn't penalize artifacts like colour fringing, or diffs that persist across many frames. kris 2019-02-27 14:10:39 +0000
  • 4840efc41e In HeuristicPageFirstScheduler, don't use a deterministic ordering of pages and content, since we may never get around to some of them across many frames. Instead weight by total xor weight for the page, (page, content) tuple and offset list kris 2019-02-27 14:09:42 +0000
  • 0ac905a7aa Use decoder symbol table to populate start/end addresses for opcodes. kris 2019-02-27 12:10:56 +0000
  • c139e8bf1b Write symbol table to .dbg file when assembling player kris 2019-02-27 12:10:14 +0000
  • 86066fec61 Makefile kris 2019-02-24 00:04:13 +0000
  • 9da18f0ecc Initial working version of video player. kris 2019-02-24 00:03:36 +0000
  • 1b54c9c864 Video() is now aware of target frame rate, and will continue to emit opcodes until the cycle budget for the frame is exhausted. kris 2019-02-23 23:52:25 +0000
  • cc6c92335d Implement a much more efficient mechanism for mapping an array between (x, y) indexing and (page, offset) indexing. This uses numpy to construct a new array by indexing into the old one. kris 2019-02-23 23:44:29 +0000