mirror of
https://github.com/KrisKennaway/ii-pix.git
synced 2025-01-03 08:30:11 +00:00
Fix breakage in refactoring
This commit is contained in:
parent
a3433fd632
commit
4f8fe0c1e8
24
screen.py
24
screen.py
@ -79,16 +79,7 @@ class SHR320Screen:
|
|||||||
self.memory = dump
|
self.memory = dump
|
||||||
|
|
||||||
|
|
||||||
class DHGRScreen:
|
class BaseDHGRScreen:
|
||||||
X_RES = 560
|
|
||||||
Y_RES = 192
|
|
||||||
|
|
||||||
MODE = Mode.DOUBLE_HI_RES
|
|
||||||
|
|
||||||
def __init__(self):
|
|
||||||
self.main = np.zeros(8192, dtype=np.uint8)
|
|
||||||
self.aux = np.zeros(8192, dtype=np.uint8)
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def y_to_base_addr(y: int) -> int:
|
def y_to_base_addr(y: int) -> int:
|
||||||
"""Maps y coordinate to screen memory base address."""
|
"""Maps y coordinate to screen memory base address."""
|
||||||
@ -99,6 +90,17 @@ class DHGRScreen:
|
|||||||
|
|
||||||
return 1024 * c + 128 * b + 40 * a
|
return 1024 * c + 128 * b + 40 * a
|
||||||
|
|
||||||
|
|
||||||
|
class DHGRScreen(BaseDHGRScreen):
|
||||||
|
X_RES = 560
|
||||||
|
Y_RES = 192
|
||||||
|
|
||||||
|
MODE = Mode.DOUBLE_HI_RES
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
self.main = np.zeros(8192, dtype=np.uint8)
|
||||||
|
self.aux = np.zeros(8192, dtype=np.uint8)
|
||||||
|
|
||||||
def pack(self, bitmap: np.ndarray):
|
def pack(self, bitmap: np.ndarray):
|
||||||
"""Packs an image into memory format (8k AUX + 8K MAIN)."""
|
"""Packs an image into memory format (8k AUX + 8K MAIN)."""
|
||||||
# The DHGR display encodes 7 pixels across interleaved 4-byte sequences
|
# The DHGR display encodes 7 pixels across interleaved 4-byte sequences
|
||||||
@ -231,7 +233,7 @@ class DHGRNTSCScreen(DHGRScreen, NTSCScreen):
|
|||||||
NTSC_PHASE_SHIFT = 0
|
NTSC_PHASE_SHIFT = 0
|
||||||
|
|
||||||
|
|
||||||
class HGRNTSCScreen(NTSCScreen):
|
class HGRNTSCScreen(BaseDHGRScreen, NTSCScreen):
|
||||||
# Hi-Res really is 560 pixels horizontally, not 280 - but unlike DHGR
|
# Hi-Res really is 560 pixels horizontally, not 280 - but unlike DHGR
|
||||||
# you can only independently control about half of the pixels.
|
# you can only independently control about half of the pixels.
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user