GBDK 2020 Docs 4.4.0 API Documentation for GBDK 2020

Functions | Variables
hblankcpy.h File Reference
`#include <stdint.h>`

Go to the source code of this file.

## Functions
void | hblank_copy_vram (const uint8_t *sour, uint8_t count)
void | hblank_cpy_vram (const uint8_t *sour, uint8_t count)
void | hblank_copy (uint8_t *dest, const uint8_t *sour, uint16_t size)

## Variables
uint8_t * | hblank_copy_destination

## Function Documentation

## ◆ hblank_copy_vram()

void hblank_copy_vram | ( | const uint8_t * | sour,
|  | uint8_t | count
| ) |  |

HBlank stack copy routine

Parameters

  sour | Source address to copy from
  count | Number of 16 byte chunks to copy

Performs the required STAT_REG, IE_REG, IF_REG manipulation when called and restores STAT_REG and IE_REG on exit (unlike hblank_cpy_vram()).

Before calling:

- Set the destination using hblank_copy_destination
- Interrupts must be disabled

See also
  hblank_cpy_vram, hblank_copy_destination, hblank_copy

## ◆ hblank_cpy_vram()

void hblank_cpy_vram | ( | const uint8_t * | sour,
|  | uint8_t | count
| ) |  |

HBlank stack copy routine

Parameters

  sour | Source address to copy from
  count | Number of 16 byte chunks to copy

Unlike hblank_copy_vram() does not perform the required STAT_REG, IE_REG, IF_REG manipulation, nor does it restore STAT_REG and IE_REG on exit.

Before calling:

- Set the destination using hblank_copy_destination
- Interrupts must be properly configured
- Interrupts must be disabled

See also
  hblank_copy_vram, hblank_copy_destination, hblank_copy

## ◆ hblank_copy()

void hblank_copy | ( | uint8_t * | dest,
|  | const uint8_t * | sour,
|  | uint16_t | size
| ) |  |
| inline

HBlank stack copy routine (must be called with interrupts disabled!)

Parameters

  dest | destination pointer
  sour | source pointer
  size | number of bytes to copy (rounded to 16-byte chunks)

Performs a fast vram safe copy of data during HBlank.

## Variable Documentation

## ◆ hblank_copy_destination

uint8_t* hblank_copy_destination
| extern

Destination address for hblank copy routine