mirror of
https://github.com/KrisKennaway/ii-vision.git
synced 2025-07-19 03:24:05 +00:00
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.
This commit is contained in:
@@ -76,13 +76,18 @@ class Ack(Opcode):
|
||||
"""Instructs player to perform TCP stream + buffer management."""
|
||||
COMMAND = OpcodeCommand.ACK
|
||||
|
||||
def __init__(self, aux_active: bool):
|
||||
self.aux_active = aux_active
|
||||
|
||||
def emit_data(self) -> Iterator[int]:
|
||||
# Dummy bytes to pad out TCP frame
|
||||
yield 0xff
|
||||
# Flip $C054 or $C055 soft-switches to steer subsequent writes to
|
||||
# MAIN/AUX screen memory
|
||||
yield 0x54 if self.aux_active else 0x55
|
||||
# Dummy byte to pad out TCP frame
|
||||
yield 0xff
|
||||
|
||||
def __data_eq__(self, other):
|
||||
return True
|
||||
return self.aux_active == other.aux_active
|
||||
|
||||
|
||||
class BaseTick(Opcode):
|
||||
|
Reference in New Issue
Block a user