Skip to content

NTSC ​

NTSC related constants

Variables ​

ReturnNameDescription
const longCLOCK_FREQUENCY staticClock frequency in Hz.
const longCYCLES_PER_SECOND staticCPU cycles per seconds.
const doubleASPECT_RATIO staticPixel aspect ratio.
const longHBLANK_CYCLES_LEFT staticLeft HBLANK width in cycles.
const longBORDER_CYCLES_LEFT staticLeft border width in cycles.
const longCANVAS_CYCLES staticMain canvas width in cycles.
const longBORDER_CYCLES_RIGHT staticRight border width in cycles.
const longHBLANK_CYCLES_RIGHT staticRight HBLANK width in cycles.
const longCYCLES_PER_LINE static13 + 4 + 40 + 4 + 4
const longHBLANK_PIXELS_LEFT staticLeft HBLANK width in pixels.
const longBORDER_PIXELS_LEFT staticLeft border width in pixels.
const longCANVAS_PIXELS staticMain canvas width in pixels.
const longBORDER_PIXELS_RIGHT staticRight border width in pixels.
const longHBLANK_PIXELS_RIGHT staticRight HBLANK width in pixels.
const longFIRST_VISIBLE_PIXEL static104
const longVISIBLE_PIXELS static32 + 320 + 32
const longLAST_VISIBLE_PIXEL static104 + 32 + 320 + 31
const longPIXELS_PER_LINE static104 + 32 + 320 + 32 + 32
const longFIRST_VISIBLE_LINE staticFirst line after VBLANK.

CLOCK_FREQUENCY ​

static

cpp
const long CLOCK_FREQUENCY = 1022727

Defined in Infrastructure/Constants.h:64

Clock frequency in Hz.


CYCLES_PER_SECOND ​

static

cpp
const long CYCLES_PER_SECOND = CLOCK_FREQUENCY

Defined in Infrastructure/Constants.h:65

CPU cycles per seconds.


ASPECT_RATIO ​

static

cpp
const double ASPECT_RATIO = 0.7500

Defined in Infrastructure/Constants.h:68

Pixel aspect ratio.


HBLANK_CYCLES_LEFT ​

static

cpp
const long HBLANK_CYCLES_LEFT = 13

Defined in Infrastructure/Constants.h:71

Left HBLANK width in cycles.


BORDER_CYCLES_LEFT ​

static

cpp
const long BORDER_CYCLES_LEFT = 4

Defined in Infrastructure/Constants.h:72

Left border width in cycles.


CANVAS_CYCLES ​

static

cpp
const long CANVAS_CYCLES = 40

Defined in Infrastructure/Constants.h:73

Main canvas width in cycles.


BORDER_CYCLES_RIGHT ​

static

cpp
const long BORDER_CYCLES_RIGHT = 4

Defined in Infrastructure/Constants.h:74

Right border width in cycles.


HBLANK_CYCLES_RIGHT ​

static

cpp
const long HBLANK_CYCLES_RIGHT = 4

Defined in Infrastructure/Constants.h:75

Right HBLANK width in cycles.


CYCLES_PER_LINE ​

static

cpp
const long CYCLES_PER_LINE = 65

Defined in Infrastructure/Constants.h:78

13 + 4 + 40 + 4 + 4


HBLANK_PIXELS_LEFT ​

static

cpp
const long HBLANK_PIXELS_LEFT = 104

Defined in Infrastructure/Constants.h:81

Left HBLANK width in pixels.


BORDER_PIXELS_LEFT ​

static

cpp
const long BORDER_PIXELS_LEFT = 32

Defined in Infrastructure/Constants.h:82

Left border width in pixels.


CANVAS_PIXELS ​

static

cpp
const long CANVAS_PIXELS = 320

Defined in Infrastructure/Constants.h:83

Main canvas width in pixels.


BORDER_PIXELS_RIGHT ​

static

cpp
const long BORDER_PIXELS_RIGHT = 32

Defined in Infrastructure/Constants.h:84

Right border width in pixels.


HBLANK_PIXELS_RIGHT ​

static

cpp
const long HBLANK_PIXELS_RIGHT = 32

Defined in Infrastructure/Constants.h:85

Right HBLANK width in pixels.


FIRST_VISIBLE_PIXEL ​

static

cpp
const long FIRST_VISIBLE_PIXEL = 104

Defined in Infrastructure/Constants.h:88

104


VISIBLE_PIXELS ​

static

cpp
const long VISIBLE_PIXELS = 384

Defined in Infrastructure/Constants.h:89

32 + 320 + 32


LAST_VISIBLE_PIXEL ​

static

cpp
const long LAST_VISIBLE_PIXEL = 487

Defined in Infrastructure/Constants.h:90

104 + 32 + 320 + 31


PIXELS_PER_LINE ​

static

cpp
const long PIXELS_PER_LINE = 520

Defined in Infrastructure/Constants.h:91

104 + 32 + 320 + 32 + 32


FIRST_VISIBLE_LINE ​

static

cpp
const long FIRST_VISIBLE_LINE = 16

Defined in Infrastructure/Constants.h:94

First line after VBLANK.