#include "PAGECTRL.h"

#include <msdos.cf>


PAGE rp[2],vp;
static unsigned short vram[320*256];

unsigned short *GetVirtualVRAM(void)
{
	return vram;
}

void SetUpPage320x240_320x240(void)
{
	YGH_initPage(&rp[0],SEG_VRAMP,0x0    ,512,256);
	YGH_initPage(&rp[1],SEG_VRAMP,0x40000,512,256);
	YGH_initPage(&vp,SEG_VIRTU,ADR(vram),320,240);
	YGH_clearPage(&rp[0],0x0f);
	YGH_clearPage(&rp[1],0x0f);
	YGH_clearPage(&vp,0x0f);
	YGH_viewPort(&rp[0],0,0,319,239);
	YGH_viewPort(&rp[1],0,0,319,239);
	YGH_viewPort(&vp,0,0,319,239);
}

void SetUpPage256x256_256x256(void)
{
	YGH_initPage(&rp[0],SEG_VRAMP,0x0    ,256,256);
	YGH_initPage(&rp[1],SEG_VRAMP,0x40000,256,256);
	YGH_initPage(&vp,SEG_VIRTU,ADR(vram),256,256);
	YGH_clearPage(&rp[0],0x0f);
	YGH_clearPage(&rp[1],0x0f);
	YGH_clearPage(&vp,0x0f);
	YGH_viewPort(&rp[0],0,0,255,255);
	YGH_viewPort(&rp[1],0,0,255,255);
	YGH_viewPort(&vp,0,0,255,255);
}

