📄 infones_mapper.h
字号:
/****************************************************************************************************************
*
* Project : GameCD Player
* Module : Game Emulator
*
* Copyright : (c) 2004, Samsung India Software Operations,
* All Rights Reserved.
* This software is the confidential and proprietary information
* of Samsung Electronics, Inc. (Confidential Information). You
* shall not disclose such Confidential Information and shall use
* it only in accordance with the terms of the license agreement
* you entered into with Samsung Electronics.
*
* File : Svcd/GEmu/InfoNES_Mapper.h
* Date : 11th of May, 2004
*
* Author(s) :
* Girish K S - girishks@samsung.com
*
* Department : System LSI Division, SISO.
*
* Platform : S5H5002 DVD Player, ARM9TDMI
* Compiler : armcc version 2.5.1
*
* File Desc. : Header file for InfoNES_Mapper.c
*
* History :
*
****************************************************************************************************************/
/*===================================================================*/
/* */
/* InfoNES_Mapper.h : InfoNES Mapper Function */
/* */
/* 2000/05/16 InfoNES Project ( based on NesterJ and pNesX ) */
/* */
/*===================================================================*/
#ifndef InfoNES_MAPPER_H_INCLUDED
#define InfoNES_MAPPER_H_INCLUDED
#include "basic_typedefs.h"
#include "infones_common.h"
/*-------------------------------------------------------------------*/
/* Macros */
/*-------------------------------------------------------------------*/
/* The address of 8Kbytes unit of the ROM */
//#define ROMPAGE(a) &ROM[ (a) * 0x2000 ]
//Vinay_9908
//BYTE * ROM_FUNC(DWORD );
//#define ROMPAGE(a) ROM_FUNC(a )
//#define ROMPAGE(x, a) { unsigned long c = a; unsigned long index = (c * 0x2000); x = (&ROM[index]); }
/* From behind the ROM, the address of 8kbytes unit */
#define ROMLASTPAGE(a) (BYTE *)&(ROM[ (unsigned long)(((unsigned long)NesHeader.byRomSize * 0x4000ul) - (( (a) + 1 ) * 0x2000ul)) ])
//#define ROMLASTPAGE(a) (unsigned long)(ROM + (((NesHeader.byRomSize * 4) - (( (a) + 1 ) * 2)) )* 0x1000)
//#define ROMLASTPAGE(a) &ROM[ (NesHeader.byRomSize * 0x4000) - 0x2000 ]
//#define ROMLASTPAGE(a) &ROM[ (unsigned long)(0x2000 * ((NesHeader.byRomSize << 1) - ( (a) + 1 ))) ]
/* The address of 1Kbytes unit of the VROM */
#define VROMPAGE(a) &(VROM[(unsigned long) ((unsigned long)(a) * 0x400) ])
/* The address of 1Kbytes unit of the CRAM */
#define CRAMPAGE(a) &(PPURAM[ 0x0000 +(unsigned long)(((a)&0x1F) * 0x400) ])
/* The address of 1Kbytes unit of the VRAM */
#define VRAMPAGE(a) &(PPURAM[(unsigned long) (0x2000 +(unsigned long)( (a) * 0x400) )])
/* Translate the pointer to ChrBuf into the address of Pattern Table */
#define PATTBL(a) ( ( (a) - ChrBuf ) >> 2 )
/*-------------------------------------------------------------------*/
/* Macros ( Mapper specific ) */
/*-------------------------------------------------------------------*/
/* The address of 8Kbytes unit of the Map5 ROM */
#define Map5_ROMPAGE(a) &(Map5_Wram[ (unsigned long)(( (a) & 0x07 ) * 0x2000) ])
/* The address of 1Kbytes unit of the Map6 Chr RAM */
#define Map6_VROMPAGE(a) &(Map6_Chr_Ram[ (unsigned long)((a) * 0x400 )])
/* The address of 1Kbytes unit of the Map19 Chr RAM */
#define Map19_VROMPAGE(a) &(Map19_Chr_Ram[ (unsigned long)((a) * 0x400 ]))
/* The address of 1Kbytes unit of the Map85 Chr RAM */
#define Map85_VROMPAGE(a) &(Map85_Chr_Ram[ (unsigned long)((a) * 0x400 )])
/*-------------------------------------------------------------------*/
/* Table of Mapper initialize function */
/*-------------------------------------------------------------------*/
/*-------------------------------------------------------------------*/
/*-------------------------------------------------------------------*/
/* Function prototypes */
/*-------------------------------------------------------------------*/
void Map0_Init(void);
void Map0_Write( WORD wAddr, BYTE byData );
void Map0_Sram( WORD wAddr, BYTE byData );
void Map0_Apu( WORD wAddr, BYTE byData );
BYTE Map0_ReadApu( WORD wAddr );
void Map0_VSync(void);
void Map0_HSync(void);
void Map0_PPU( WORD wAddr );
void Map0_RenderScreen( BYTE byMode );
void Map1_Init(void);
void Map1_Write( WORD wAddr, BYTE byData );
void Map1_set_ROM_banks(void);
void Map2_Init(void);
void Map2_Write( WORD wAddr, BYTE byData );
void Map3_Init(void);
void Map3_Write( WORD wAddr, BYTE byData );
void Map4_Init(void);
void Map4_Write( WORD wAddr, BYTE byData );
void Map4_HSync(void);
void Map4_Set_CPU_Banks(void);
void Map4_Set_PPU_Banks(void);
#if 0
void Map5_Init();
void Map5_Write( WORD wAddr, BYTE byData );
void Map5_Apu( WORD wAddr, BYTE byData );
BYTE Map5_ReadApu( WORD wAddr );
void Map5_HSync();
void Map5_RenderScreen( BYTE byMode );
void Map5_Sync_Prg_Banks( void );
void Map6_Init();
void Map6_Write( WORD wAddr, BYTE byData );
void Map6_Apu( WORD wAddr, BYTE byData );
void Map6_HSync();
void Map7_Init();
void Map7_Write( WORD wAddr, BYTE byData );
void Map8_Init();
void Map8_Write( WORD wAddr, BYTE byData );
void Map9_Init();
void Map9_Write( WORD wAddr, BYTE byData );
void Map9_PPU( WORD wAddr );
void Map10_Init();
void Map10_Write( WORD wAddr, BYTE byData );
void Map10_PPU( WORD wAddr );
void Map11_Init();
void Map11_Write( WORD wAddr, BYTE byData );
void Map13_Init();
void Map13_Write( WORD wAddr, BYTE byData );
void Map15_Init();
void Map15_Write( WORD wAddr, BYTE byData );
void Map16_Init();
void Map16_Write( WORD wAddr, BYTE byData );
void Map16_HSync();
void Map17_Init();
void Map17_Apu( WORD wAddr, BYTE byData );
void Map17_HSync();
void Map18_Init();
void Map18_Write( WORD wAddr, BYTE byData );
void Map18_HSync();
void Map19_Init();
void Map19_Write( WORD wAddr, BYTE byData );
void Map19_Apu( WORD wAddr, BYTE byData );
BYTE Map19_ReadApu( WORD wAddr );
void Map19_HSync();
void Map21_Init();
void Map21_Write( WORD wAddr, BYTE byData );
void Map21_HSync();
void Map22_Init();
void Map22_Write( WORD wAddr, BYTE byData );
void Map23_Init();
void Map23_Write( WORD wAddr, BYTE byData );
void Map23_HSync();
void Map24_Init();
void Map24_Write( WORD wAddr, BYTE byData );
void Map24_HSync();
void Map25_Init();
void Map25_Write( WORD wAddr, BYTE byData );
void Map25_Sync_Vrom( int nBank );
void Map25_HSync();
void Map26_Init();
void Map26_Write( WORD wAddr, BYTE byData );
void Map26_HSync();
void Map32_Init();
void Map32_Write( WORD wAddr, BYTE byData );
void Map33_Init();
void Map33_Write( WORD wAddr, BYTE byData );
void Map33_HSync();
void Map34_Init();
void Map34_Write( WORD wAddr, BYTE byData );
void Map34_Sram( WORD wAddr, BYTE byData );
void Map40_Init();
void Map40_Write( WORD wAddr, BYTE byData );
void Map40_HSync();
void Map41_Init();
void Map41_Write( WORD wAddr, BYTE byData );
void Map41_Sram( WORD wAddr, BYTE byData );
void Map42_Init();
void Map42_Write( WORD wAddr, BYTE byData );
void Map42_HSync();
void Map43_Init();
void Map43_Write( WORD wAddr, BYTE byData );
void Map43_Apu( WORD wAddr, BYTE byData );
BYTE Map43_ReadApu( WORD wAddr );
void Map43_HSync();
void Map44_Init();
void Map44_Write( WORD wAddr, BYTE byData );
void Map44_HSync();
void Map44_Set_CPU_Banks();
void Map44_Set_PPU_Banks();
void Map45_Init();
void Map45_Sram( WORD wAddr, BYTE byData );
void Map45_Write( WORD wAddr, BYTE byData );
void Map45_HSync();
void Map45_Set_CPU_Bank4( BYTE byData );
void Map45_Set_CPU_Bank5( BYTE byData );
void Map45_Set_CPU_Bank6( BYTE byData );
void Map45_Set_CPU_Bank7( BYTE byData );
void Map45_Set_PPU_Banks();
void Map46_Init();
void Map46_Sram( WORD wAddr, BYTE byData );
void Map46_Write( WORD wAddr, BYTE byData );
void Map46_Set_ROM_Banks();
void Map47_Init();
void Map47_Sram( WORD wAddr, BYTE byData );
void Map47_Write( WORD wAddr, BYTE byData );
void Map47_HSync();
void Map47_Set_CPU_Banks();
void Map47_Set_PPU_Banks();
void Map48_Init();
void Map48_Write( WORD wAddr, BYTE byData );
void Map48_HSync();
void Map49_Init();
void Map49_Sram( WORD wAddr, BYTE byData );
void Map49_Write( WORD wAddr, BYTE byData );
void Map49_HSync();
void Map49_Set_CPU_Banks();
void Map49_Set_PPU_Banks();
void Map50_Init();
void Map50_Apu( WORD wAddr, BYTE byData );
void Map50_HSync();
void Map51_Init();
void Map51_Sram( WORD wAddr, BYTE byData );
void Map51_Write( WORD wAddr, BYTE byData );
void Map51_Set_CPU_Banks();
void Map57_Init();
void Map57_Write( WORD wAddr, BYTE byData );
void Map58_Init();
void Map58_Write( WORD wAddr, BYTE byData );
void Map60_Init();
void Map60_Write( WORD wAddr, BYTE byData );
void Map62_Init();
void Map62_Write( WORD wAddr, BYTE byData );
void Map64_Init();
void Map64_Write( WORD wAddr, BYTE byData );
void Map65_Init();
void Map65_Write( WORD wAddr, BYTE byData );
void Map65_HSync();
void Map66_Init();
void Map66_Write( WORD wAddr, BYTE byData );
void Map67_Init();
void Map67_Write( WORD wAddr, BYTE byData );
void Map67_HSync();
void Map68_Init();
void Map68_Write( WORD wAddr, BYTE byData );
void Map68_SyncMirror();
void Map69_Init();
void Map69_Write( WORD wAddr, BYTE byData );
void Map69_HSync();
void Map70_Init();
void Map70_Write( WORD wAddr, BYTE byData );
void Map71_Init();
void Map71_Write( WORD wAddr, BYTE byData );
void Map72_Init();
void Map72_Write( WORD wAddr, BYTE byData );
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -