/*******************************************************************************
	[MainBoard.h]

	Copyright (C) 2004 Ki

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
*******************************************************************************/
#ifndef MAIN_BOARD_H
#define MAIN_BOARD_H

#include <stdio.h>
#include "TypeDefs.h"
#include "CPU.h"
#include "VDC.h"
#include "APU.h"
#include "PSG.h"
#include "IntCtrl.h"
#include "Timer.h"
#include "Cartridge.h"
#include "JoyPad.h"
#include "Mouse.h"
#include "MB128.h"
#include "CDROM.h"
#include "ADPCM.h"


enum RamType
{
	MAINBOARD_MAINRAM = 0,
	MAINBOARD_BUFFERRAM,
	MAINBOARD_ARCADERAM
};


BOOL
MAINBOARD_Init(
	const char*		pGameName);

void
MAINBOARD_Deinit();

void
MAINBOARD_Pause(
	BOOL	bPause);

//Kitao追加
void
MAINBOARD_PauseNoMessage(
	BOOL	bPause);

BOOL
MAINBOARD_SaveBRAM(
	const char*		pathName);

BOOL
MAINBOARD_LoadBRAM(
	const char*		pathName);


void
MAINBOARD_Reset();


void
MAINBOARD_AdvanceFrame();

Sint32
MAINBOARD_AdvanceInstruction();


//Kitao追加
void
MAINBOARD_ResetFastForwardingCount();


BOOL
MAINBOARD_ChangeScreenMode(
	Sint32		screenWidth,
	Sint32		screenHeight,
	Sint32		magnification,
	BOOL		bFullScreen,
	Uint32		bFullScreenColor); //Kitao更新。bFullScreenColor…フルスクリーン時のbitsPerPixel


BOOL
MAINBOARD_ChangeSoundMode(
	Uint32		bufferSize,
	Uint32		sampleRate,
	Uint32		masterVolume,
	BOOL		bReverb);

BOOL
MAINBOARD_SaveState(
	FILE*		p);

BOOL
MAINBOARD_LoadState(
	FILE*		p);

void
MAINBOARD_ChangeMemoryValue(
	Sint32		ramType,
	Uint32		addr,
	Uint8		data);

//Kitao追加
void
MAINBOARD_ScreenUpdate(
	BOOL	bVsync);

//Kitao追加
void
MAINBOARD_ScreenEncord();

//Kitao追加
void
MAINBOARD_ScreenUpdateFast();

//Kitao追加
void
MAINBOARD_DrawScreenshot();

//Kitao追加
void
MAINBOARD_ScreenClear();

//Kitao追加
BOOL
MAINBOARD_GetPause();

//Kitao追加
void
MAINBOARD_SetBigSoundBuffer(
	Sint32 n);

//Kitao追加
Sint32
MAINBOARD_GetMagnification();

//Kitao追加
Sint32
MAINBOARD_GetScanLine();

//Kitao追加
void
MAINBOARD_SetSuperGrafx(
	Sint32	superGrafx);

//Kitao追加
Sint32
MAINBOARD_GetSuperGrafx();

//Kitao追加
void
MAINBOARD_SetArcadeCard(
	BOOL	arcadeCard);

//Kitao追加
BOOL
MAINBOARD_GetArcadeCard();

//Kitao追加
void
MAINBOARD_SetBackupFull(
	BOOL	backupFull);

//Kitao追加
BOOL
MAINBOARD_GetBackupFull();

//Kitao追加
void
MAINBOARD_SetStretched(
	BOOL	bStretched,
	BOOL	bVStretched);

//Kitao追加
Uint32
MAINBOARD_GetStateVersion();

//Kitao追加
BOOL
MAINBOARD_LoadScreenBuf(
	FILE*		p);

//Kitao追加
void
MAINBOARD_RestoreScreenBuf();

//Kitao追加
void
MAINBOARD_ResetFastForwardingCount();

//Kitao追加
void
MAINBOARD_SetFastForwarding(
	Sint32	fastForwarding,
	BOOL	bSoundAjust,
	BOOL	bReset);

//Kitao追加
Sint32
MAINBOARD_GetFastForwarding();

//Kitao追加
Sint32
MAINBOARD_GetFastForwardingR();

//Kitao追加
BOOL
MAINBOARD_GetSystemInit();

//Kitao追加
void
MAINBOARD_TG16BitConvert();

//Kitao追加
void
MAINBOARD_OverDumpedConvert();

//Kitao追加
void
MAINBOARD_IncSystemTime();

//Kitao追加
void
MAINBOARD_SetGradiusII();

//Kitao追加
int
MAINBOARD_GetProcessingDelay();

//Kitao追加
int
MAINBOARD_GetDisplayedFrames();

//Kitao追加
void
MAINBOARD_ResetPrevTvW();

//Kitao追加
BOOL
MAINBOARD_GetResolutionChange();

//Kitao追加
void
MAINBOARD_SetResolutionChange(
	BOOL	bResolutionChange);

//Kitao追加
Sint32
MAINBOARD_GetShowOverscanTop();

//Kitao追加
Sint32
MAINBOARD_GetShowOverscanBottom();

//Kitao追加
Sint32
MAINBOARD_GetShowOverscanLeft();

//Kitao追加
Sint32
MAINBOARD_GetShowOverscanRight();

//Kitao追加
BOOL
MAINBOARD_GetShowOverscan();

//Kitao追加
void
MAINBOARD_SetShowOverscanTop(
	Sint32	showOverscanTop);

//Kitao追加
void
MAINBOARD_SetShowOverscanBottom(
	Sint32	showOverscanBottom);

//Kitao追加
void
MAINBOARD_SetShowOverscanLeft(
	Sint32	showOverscanLeft);

//Kitao追加
void
MAINBOARD_SetShowOverscanRight(
	Sint32	showOverscanRight);

//Kitao追加
BOOL
MAINBOARD_GetFourSplitScreen();

//Kitao追加
BOOL
MAINBOARD_GetMonoColor();

//Kitao追加
Sint32
MAINBOARD_GetForceMonoColor();

//Kitao追加
void
MAINBOARD_SetForceMonoColor(
	Sint32	forceMonoColor);

//Kitao追加
Uint8*
MAINBOARD_GetpMainRam();

//Kitao追加
void
MAINBOARD_WriteROM(
	Uint32		mpr,
	Uint32		addr,
	Uint8		data);

//Kitao追加
void
MAINBOARD_SetContinuousWriteValue(
	BOOL		bContinuous,
	Uint32		mpr,
	Uint32		addr,
	Uint8		data);

//Kitao追加
BOOL
MAINBOARD_GetSystemCard();


#endif /* MAIN_BOARD_H */
