Commit Graph

14 Commits

Author SHA1 Message Date
kris 45ce98d6ef Generate iivision.dbg file which is read by transcoder 2023-01-17 12:25:01 +00:00
kris 6c2f8278ce Oops, 34 ticks is the "neutral" position, not 36. Update duty cycles
during slow path.  This removes the slight buzz audible during periods
of silence.
2019-07-14 22:03:26 +01:00
kris 722e9c5d70 s/BIT TICK/STA TICK/
It doesn't functionally matter since I'm not using any conditional
opcodes in the fast path anyway, but STA removes these side-effects.

Earlier I had mistakenly thought that STA absolute did a
read-before-write on 6502, but this is not the case
(verified with visual6502.org)
2019-07-11 14:40:05 +01:00
kris e2a8bd9b4d Update IP addresses to 10.0.0.0/8 network 2019-06-26 11:24:07 +01:00
kris b0e83d2faf Clear the (D)HGR display before showing it, so we don't see garbage
during startup.

Clear keyboard strobe before exiting.
2019-06-20 21:23:18 +01:00
kris 0c44fe634f Remove stray comment 2019-04-25 21:29:38 +01:00
kris 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.

Move towards the convention of using upper-case labels for system use
(soft switches etc) and lower-case for program use.
2019-04-25 16:25:36 +01:00
KrisKennaway e80e10924c
Update main.s
Fix last-minute typo
2019-03-28 23:29:10 +00:00
kris 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

Optimize the socket buffer management
- Since we're guaranteeing 2K frame padding, the low byte is always 0
- Remove some vestiges of the Uthernet TCP demo code - AFAICT there
  isn't a need to compare high and low bytes of the S0RXRSR, this
  was just being used as a (slightly risky) check that they were both
  not equal (presumably to 0)
- (h/t Oliver Schmidt <ol.sc@web.de>) it turns out that the W5100
  automatically wraps the address pointer at the end of the 8k RX/TX
  buffer space, so since we're using 8k buffers we don't need any of the
  pointer/mask arithmetic to make sure we don't stray outside this range
- Instead, we can just save the W5100 address pointer before we start
  doing the stream buffer management and restore it when we're ready
  to read from the stream again.
- Moreover, since we know the low-byte is 0 we don't even need to
  save it.

This gives us enough free cycles to implement a keypress check.  For
now any key will pause the video and any other key resume it.

We still have a whole 16 cycles left over while maintaining the 36/37
cycle tick cadence.

We've saved 73 cycles of "dead time" though, i.e. the
op_ack + CHECKRECV + op_nop "slow path" now takes 2*73 rather than 3*73
cycles.  This should result in better audio quality.
2019-03-28 23:08:52 +00:00
kris 10fa4bc72d Proof of concept DHGR encoding/playback
- Every time we process an ACK opcode, toggle page 1/page 2 soft
  switches to steer subsequent writes between MAIN and AUX memory
- while I'm here, squeeze out some unnecessary operations from the
  buffer management

On the player side, this is implemented by maintaining two screen
memory maps, and alternating between opcode streams for each of them.
This is using entirely the wrong colour model for errors, but
surprisingly it already works pretty well in practise (and the frame
rate is acceptable on test videos)

DHGR/HGR could be made runtime selectable by adding a header byte that
determines whether to set the DHGR soft switches before initiating
the decode loop.

While I'm in here, fix op_terminate to clear keyboard strobe before
waiting.
2019-03-27 21:37:06 +00:00
kris 8ffc8efaac Install RESET handler that exits to ProDOS
Implement op_terminate which waits for a keypress and then exits.
2019-03-23 21:45:13 +00:00
kris 7164f20eab Oops fix byte ordering for port 2019-03-21 16:35:12 +00:00
kris d55ee0e170 Rename binary 2019-03-21 16:23:56 +00:00
kris 4ae5e7a153 Move player to new location 2019-03-21 16:09:23 +00:00