Lightpen Class Reference

`#include <lightpen.h>`

## Public Member Functions

void | setScreenSize (unsigned int height, unsigned int width)
void | reset ()
uint8_t | getX () const
uint8_t | getY () const
bool | retrigger (unsigned int lineCycle, unsigned int rasterY)
bool | trigger (unsigned int lineCycle, unsigned int rasterY)
void | untrigger ()

## Detailed Description

Lightpen

## Member Function Documentation

## getX()

uint8_t Lightpen::getX | ( |  | ) | const

inline

Return the low byte of x coordinate.

## getY()

uint8_t Lightpen::getY | ( |  | ) | const

inline

Return the low byte of y coordinate.

## reset()

void Lightpen::reset | ( |  | ) |

inline

Reset the lightpen.

## retrigger()

bool Lightpen::retrigger | ( | unsigned int | lineCycle,
|  | unsigned int | rasterY
| ) |  |

inline

Retrigger lightpen on vertical blank.

Parameters

  lineCycle | current line cycle
  rasterY | current y raster position

Returns
  true if an IRQ should be triggered

## setScreenSize()

void Lightpen::setScreenSize | ( | unsigned int | height,
|  | unsigned int | width
| ) |  |

inline

Set Vic screen size.

Parameters

  height | number of raster lines
  width | number of cycles per line

## trigger()

bool Lightpen::trigger | ( | unsigned int | lineCycle,
|  | unsigned int | rasterY
| ) |  |

inline

Trigger lightpen from CIA.

Parameters

  lineCycle | current line cycle
  rasterY | current y raster position

Returns
  true if an IRQ should be triggered

## untrigger()

void Lightpen::untrigger | ( |  | ) |

inline

Untrigger lightpen from CIA.

The documentation for this class was generated from the following file:

- lightpen.h