ducky.devices.svga module¶
SimpleVGA is very basic implementation of VGA-like device, with text and graphic modes.
-
class
ducky.devices.svga.
Char
[source]¶ Bases:
_ctypes.Structure
-
bg
¶ Structure/Union member
-
blink
¶ Structure/Union member
-
codepoint
¶ Structure/Union member
-
fg
¶ Structure/Union member
-
unused
¶ Structure/Union member
-
-
ducky.devices.svga.
DEFAULT_BOOT_MODE
= (t, 80, 25, 1)¶ Default boot mode
-
ducky.devices.svga.
DEFAULT_MEMORY_BANKS
= 8¶ Default number of memory banks
-
ducky.devices.svga.
DEFAULT_MEMORY_SIZE
= 65536¶ Default memory size, in bytes
-
ducky.devices.svga.
DEFAULT_MODES
= [(g, 320, 200, 1), (t, 80, 25, 2), (t, 80, 25, 1)]¶ Default list of available modes
-
ducky.devices.svga.
DEFAULT_PORT_RANGE
= 1008¶ Default address of command port
-
class
ducky.devices.svga.
Display
(machine, name, gpu=None, stream_out=None, *args, **kwargs)[source]¶ Bases:
ducky.devices.Device
-
class
ducky.devices.svga.
Mode
(_type, width, height, depth)[source]¶ Bases:
object
-
class
ducky.devices.svga.
SimpleVGA
(machine, name, port=None, memory_size=None, memory_address=None, memory_banks=None, modes=None, boot_mode=None, *args, **kwargs)[source]¶ Bases:
ducky.devices.IOProvider
,ducky.devices.Device
SimpleVGA is very basic implementation of VGA-like device, with text and graphic modes.
It has its own graphic memory (“buffer”), split into several banks of the same size. Always only one bank can be directly accessed, by having it mapped into CPU’s address space.
Parameters: - machine (ducky.machine.Machine) – machine this device belongs to.
- name (string) – name of this device.
- port (u16) – address of the command port.
- memory_size (int) – size of graphic memory.
- memory_address (u24) – address of graphic memory - to this address is graphic buffer mapped. Must be specified, there is no default value.
- memory_banks (int) – number of memory banks.
- modes (list) – list of
ducky.devices.svga.Mode
objects, list of supported modes. - boot_mode (tuple) – this mode will be set when device boots up.
-
class
ducky.devices.svga.
SimpleVGACommands
[source]¶ Bases:
enum.IntEnum
-
COLS
= <SimpleVGACommands.COLS: 33>¶
-
DEPTH
= <SimpleVGACommands.DEPTH: 35>¶
-
GRAPHIC
= <SimpleVGACommands.GRAPHIC: 32>¶
-
MEMORY_BANK_ID
= <SimpleVGACommands.MEMORY_BANK_ID: 48>¶
-
REFRESH
= <SimpleVGACommands.REFRESH: 2>¶
-
RESET
= <SimpleVGACommands.RESET: 32769>¶
-
ROWS
= <SimpleVGACommands.ROWS: 34>¶
-
-
class
ducky.devices.svga.
SimpleVGAMemoryPage
(dev, *args, **kwargs)[source]¶ Bases:
ducky.mm.ExternalMemoryPage
Memory page handling MMIO of sVGA device.
Parameters: dev (ducky.devices.svga.SimpleVGA) – sVGA device this page belongs to.