2019-02-21 20:58:38 +01:00
|
|
|
#include <gint/display.h>
|
|
|
|
#include <gint/drivers/t6k11.h>
|
2020-07-13 17:47:21 +02:00
|
|
|
#include "render-fx.h"
|
2019-02-21 20:58:38 +01:00
|
|
|
|
|
|
|
/* Standard video RAM for fx9860g is 1 bit per pixel */
|
2021-04-23 18:50:20 +02:00
|
|
|
GSECTION(".bss") GALIGNED(32) static uint32_t fx_vram[256];
|
2019-02-21 20:58:38 +01:00
|
|
|
|
2019-10-27 08:14:42 +01:00
|
|
|
/* Here is the definition of the VRAM pointer, exposed in <gint/display.h> */
|
2020-07-10 16:36:05 +02:00
|
|
|
uint32_t *gint_vram = fx_vram;
|
2019-02-21 20:58:38 +01:00
|
|
|
|
2020-07-13 13:49:07 +02:00
|
|
|
/* The current rendering mode */
|
|
|
|
struct rendering_mode const *dmode = NULL;
|
|
|
|
|
2021-08-11 01:12:00 +02:00
|
|
|
/* dupdate(): Push the video RAM to the display driver */
|
2019-02-21 20:58:38 +01:00
|
|
|
void dupdate(void)
|
|
|
|
{
|
2021-08-11 01:12:00 +02:00
|
|
|
bool run_default = true;
|
|
|
|
|
2020-07-13 13:49:07 +02:00
|
|
|
if(dmode && dmode->dupdate)
|
|
|
|
{
|
2021-08-11 01:12:00 +02:00
|
|
|
/* Call the overridden dupdate(), but continue if it returns
|
2020-07-13 13:49:07 +02:00
|
|
|
non-zero (this is used when stopping the gray engine) */
|
|
|
|
int rc = dmode->dupdate();
|
2021-08-11 01:12:00 +02:00
|
|
|
run_default = (rc != 0);
|
|
|
|
}
|
|
|
|
if(run_default)
|
|
|
|
{
|
|
|
|
t6k11_display(gint_vram, 0, 64, 16);
|
2020-07-13 13:49:07 +02:00
|
|
|
}
|
2019-07-04 17:46:26 +02:00
|
|
|
|
2021-08-11 01:12:00 +02:00
|
|
|
gint_call_t hook = dupdate_get_hook();
|
|
|
|
if(hook.function) gint_call(hook);
|
2019-07-04 17:46:26 +02:00
|
|
|
}
|