}
/* allocate main memory framebuffer */
- if(resizefb(vm->xsz, vm->ysz, vm->bpp) == -1) {
+ if(demo_resizefb(vm->xsz, vm->ysz, vm->bpp) == -1) {
fprintf(stderr, "failed to allocate %dx%d (%d bpp) framebuffer\n", vm->xsz,
vm->ysz, vm->bpp);
set_text_mode();
static void blit_frame_lfb(void *pixels, int vsync)
{
- if(show_fps) dbg_fps(pixels);
+ demo_post_draw(pixels);
+
if(vsync) wait_vsync();
memcpy64(vpgaddr[frontidx], pixels, pgsize >> 3);
}
unsigned int pending;
unsigned char *pptr = pixels;
- if(show_fps) dbg_fps(pixels);
+ demo_post_draw(pixels);
if(vsync) wait_vsync();
pending = pgsize;
while(pending > 0) {
sz = pending > curmode->bank_size ? curmode->bank_size : pending;
- //memcpy64((void*)0xa0000, pptr, sz >> 3);
- memcpy((void*)0xa0000, pptr, sz);
+ memcpy((void*)phys_to_virt(0xa0000), pptr, sz);
pptr += sz;
pending -= sz;
vbe_setwin(0, ++offs);