2019-05-03 17:11:43 +02:00
|
|
|
#include <gint/display.h>
|
2020-07-02 15:48:19 +02:00
|
|
|
#include <gint/drivers/r61524.h>
|
2020-07-13 17:47:21 +02:00
|
|
|
#include "render-cg.h"
|
2019-05-03 17:11:43 +02:00
|
|
|
|
2022-05-04 21:08:52 +02:00
|
|
|
/* dupdate(): Push the video RAM to the display driver */
|
2019-05-03 17:11:43 +02:00
|
|
|
void dupdate(void)
|
|
|
|
{
|
2022-05-04 21:08:52 +02:00
|
|
|
/* If triple buffering is enabled, don't wait for the DMA to finish */
|
|
|
|
uint16_t *vram_1, *vram_2;
|
|
|
|
dgetvram(&vram_1, &vram_2);
|
|
|
|
int method = (vram_1 == vram_2) ? R61524_DMA_WAIT : R61524_DMA;
|
|
|
|
|
|
|
|
r61524_display(gint_vram, 0, 224, method);
|
2020-02-23 15:49:55 +01:00
|
|
|
|
2023-01-29 21:40:50 +01:00
|
|
|
gint_call(dupdate_get_hook());
|
2021-08-11 01:12:00 +02:00
|
|
|
|
2022-05-04 21:08:52 +02:00
|
|
|
/* Switch buffers if triple buffering is enabled */
|
2020-02-23 15:49:55 +01:00
|
|
|
dvram_switch();
|
2019-07-04 17:46:26 +02:00
|
|
|
}
|
2023-01-25 16:26:04 +01:00
|
|
|
__attribute__((alias("dupdate")))
|
|
|
|
void _WEAK_dupdate(void);
|