2020-10-16 18:41:34 +00:00
|
|
|
package screen
|
|
|
|
|
2021-03-14 17:46:52 +00:00
|
|
|
import (
|
|
|
|
"image"
|
|
|
|
"image/color"
|
|
|
|
)
|
|
|
|
|
2020-10-17 11:42:31 +00:00
|
|
|
// Base Video Modes
|
2020-10-16 18:41:34 +00:00
|
|
|
const (
|
|
|
|
VideoBaseMask uint16 = 0x1f
|
|
|
|
VideoText40 uint16 = 0x01
|
|
|
|
VideoGR uint16 = 0x02
|
|
|
|
VideoHGR uint16 = 0x03
|
|
|
|
VideoText80 uint16 = 0x08
|
|
|
|
VideoDGR uint16 = 0x09
|
|
|
|
VideoDHGR uint16 = 0x0a
|
|
|
|
VideoText40RGB uint16 = 0x10
|
|
|
|
VideoMono560 uint16 = 0x11
|
|
|
|
VideoRGBMix uint16 = 0x12
|
|
|
|
VideoRGB160 uint16 = 0x13
|
|
|
|
VideoSHR uint16 = 0x14
|
2021-03-14 17:46:52 +00:00
|
|
|
VideoVidex uint16 = 0x15
|
2020-10-17 11:42:31 +00:00
|
|
|
)
|
2020-10-16 18:41:34 +00:00
|
|
|
|
2020-10-17 11:42:31 +00:00
|
|
|
// Mix text video mdes modifiers
|
|
|
|
const (
|
2020-10-16 18:41:34 +00:00
|
|
|
VideoMixTextMask uint16 = 0x0f00
|
|
|
|
VideoMixText40 uint16 = 0x0100
|
|
|
|
VideoMixText80 uint16 = 0x0200
|
|
|
|
VideoMixText40RGB uint16 = 0x0300
|
2020-10-17 11:42:31 +00:00
|
|
|
)
|
2020-10-16 18:41:34 +00:00
|
|
|
|
2020-10-17 11:42:31 +00:00
|
|
|
// Other video mode modifiers
|
|
|
|
const (
|
2020-10-16 18:41:34 +00:00
|
|
|
VideoModifiersMask uint16 = 0xf000
|
|
|
|
VideoSecondPage uint16 = 0x1000
|
2021-03-01 23:19:18 +00:00
|
|
|
VideoAltText uint16 = 0x2000
|
2020-10-16 18:41:34 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// VideoSource provides the info to build the video output
|
|
|
|
type VideoSource interface {
|
|
|
|
// GetCurrentVideoMode returns the active video mode
|
|
|
|
GetCurrentVideoMode() uint16
|
|
|
|
// GetTextMemory returns a slice to the text memory pages
|
|
|
|
GetTextMemory(secondPage bool, ext bool) []uint8
|
|
|
|
// GetVideoMemory returns a slice to the video memory pages
|
|
|
|
GetVideoMemory(secondPage bool, ext bool) []uint8
|
|
|
|
// GetCharactePixel returns the pixel as output by the character generator
|
2021-03-01 23:19:18 +00:00
|
|
|
GetCharacterPixel(char uint8, rowInChar int, colInChar int, isAltText bool, isFlashedFrame bool) bool
|
2020-10-16 18:41:34 +00:00
|
|
|
// GetSuperVideoMemory returns a slice to the SHR video memory
|
|
|
|
GetSuperVideoMemory() []uint8
|
2021-03-14 17:46:52 +00:00
|
|
|
// GetCardImage returns an image provided by a card, like the videx card
|
|
|
|
GetCardImage(light color.Color) *image.RGBA
|
2020-10-16 18:41:34 +00:00
|
|
|
}
|