📄 solfigtr.c
字号:
/******************************************************************************//* *//* SOLITARY FIGHTER (C) 1990 TAITO CORPORATION *//* *//******************************************************************************/#include "gameinc.h"#include "solfigtr.h"#include "tc100scn.h"#include "tc110pcr.h"#include "tc200obj.h"#include "tc220ioc.h"#include "sasound.h" // sample support routines#include "taitosnd.h"static struct DIR_INFO solitary_fighter_dirs[] ={ { "solitary_fighter", }, { "solfigtr", }, { NULL, },};static struct ROM_INFO solitary_fighter_roms[] ={ { "c91-01", 0x00100000, 0x0f3f4e00, 0, 0, 0, }, { "c91-02", 0x00100000, 0xe14ab98e, 0, 0, 0, }, { "c91-03", 0x00100000, 0x8965da12, 0, 0, 0, }, { "c91-04", 0x00080000, 0x390b1065, 0, 0, 0, }, { "c91-05", 0x00040000, 0xc1260e7c, 0, 0, 0, }, { "c91-07", 0x00010000, 0xe471a05a, 0, 0, 0, }, { "c91-09", 0x00040000, 0xd82b5266, 0, 0, 0, }, { NULL, 0, 0, 0, 0, 0, },};static struct INPUT_INFO solitary_fighter_inputs[] ={ { KB_DEF_COIN1, MSG_COIN1, 0x03A10E, 0x04, BIT_ACTIVE_0 }, { KB_DEF_COIN2, MSG_COIN2, 0x03A10E, 0x08, BIT_ACTIVE_0 }, { KB_DEF_TILT, MSG_TILT, 0x03A10E, 0x01, BIT_ACTIVE_0 }, { KB_DEF_SERVICE, MSG_SERVICE, 0x03A10E, 0x02, BIT_ACTIVE_0 }, { KB_DEF_P1_START, MSG_P1_START, 0x03A104, 0x80, BIT_ACTIVE_0 }, { KB_DEF_P1_UP, MSG_P1_UP, 0x03A104, 0x01, BIT_ACTIVE_0 }, { KB_DEF_P1_DOWN, MSG_P1_DOWN, 0x03A104, 0x02, BIT_ACTIVE_0 }, { KB_DEF_P1_LEFT, MSG_P1_LEFT, 0x03A104, 0x04, BIT_ACTIVE_0 }, { KB_DEF_P1_RIGHT, MSG_P1_RIGHT, 0x03A104, 0x08, BIT_ACTIVE_0 }, { KB_DEF_P1_B1, MSG_P1_B1, 0x03A104, 0x10, BIT_ACTIVE_0 }, { KB_DEF_P1_B2, MSG_P1_B2, 0x03A104, 0x20, BIT_ACTIVE_0 }, { KB_DEF_P1_B3, MSG_P1_B3, 0x03A104, 0x40, BIT_ACTIVE_0 }, { KB_DEF_P2_START, MSG_P2_START, 0x03A106, 0x80, BIT_ACTIVE_0 }, { KB_DEF_P2_UP, MSG_P2_UP, 0x03A106, 0x01, BIT_ACTIVE_0 }, { KB_DEF_P2_DOWN, MSG_P2_DOWN, 0x03A106, 0x02, BIT_ACTIVE_0 }, { KB_DEF_P2_LEFT, MSG_P2_LEFT, 0x03A106, 0x04, BIT_ACTIVE_0 }, { KB_DEF_P2_RIGHT, MSG_P2_RIGHT, 0x03A106, 0x08, BIT_ACTIVE_0 }, { KB_DEF_P2_B1, MSG_P2_B1, 0x03A106, 0x10, BIT_ACTIVE_0 }, { KB_DEF_P2_B2, MSG_P2_B2, 0x03A106, 0x20, BIT_ACTIVE_0 }, { KB_DEF_P2_B3, MSG_P2_B3, 0x03A106, 0x40, BIT_ACTIVE_0 }, { 0, NULL, 0, 0, 0 },};static struct DSW_DATA dsw_data_solitary_fighter_0[] ={ { MSG_SCREEN, 0x02, 0x02 }, { MSG_NORMAL, 0x02, 0x00 }, { MSG_INVERT, 0x00, 0x00 }, { MSG_TEST_MODE, 0x04, 0x02 }, { MSG_OFF, 0x04, 0x00 }, { MSG_ON, 0x00, 0x00 }, { MSG_DEMO_SOUND, 0x08, 0x02 }, { MSG_ON, 0x08, 0x00 }, { MSG_OFF, 0x00, 0x00 }, { MSG_COIN1, 0x30, 0x04 }, { MSG_1COIN_1PLAY, 0x30, 0x00 }, { MSG_2COIN_1PLAY, 0x20, 0x00 }, { MSG_3COIN_1PLAY, 0x10, 0x00 }, { MSG_4COIN_1PLAY, 0x00, 0x00 }, { MSG_COIN2, 0xC0, 0x04 }, { MSG_1COIN_2PLAY, 0xC0, 0x00 }, { MSG_1COIN_3PLAY, 0x80, 0x00 }, { MSG_1COIN_4PLAY, 0x40, 0x00 }, { MSG_1COIN_6PLAY, 0x00, 0x00 }, { NULL, 0, 0, },};struct DSW_DATA dsw_data_solitary_fighter_1[] ={ { MSG_DIFFICULTY, 0x03, 0x04 }, { MSG_NORMAL, 0x03, 0x00 }, { MSG_EASY, 0x02, 0x00 }, { MSG_HARD, 0x01, 0x00 }, { MSG_HARDEST, 0x00, 0x00 }, { NULL, 0, 0, },};static struct DSW_INFO solitary_fighter_dsw[] ={ { 0x03A100, 0xFF, dsw_data_solitary_fighter_0 }, { 0x03A102, 0xFF, dsw_data_solitary_fighter_1 }, { 0, 0, NULL, },};static struct ROMSW_DATA romsw_data_solitary_fighter_0[] ={ { "Taito Japan (notice)", 0x01 }, { "Taito America", 0x02 }, { "Taito Japan", 0x03 }, { NULL, 0 },};static struct ROMSW_INFO solitary_fighter_romsw[] ={ { 0x03FFFF, 0x03, romsw_data_solitary_fighter_0 }, { 0, 0, NULL },};static struct VIDEO_INFO solitary_fighter_video ={ draw_solitary_fighter, 320, 224, 32, VIDEO_ROTATE_NORMAL| VIDEO_ROTATABLE,};struct GAME_MAIN game_solitary_fighter ={ solitary_fighter_dirs, solitary_fighter_roms, solitary_fighter_inputs, solitary_fighter_dsw, solitary_fighter_romsw, load_solitary_fighter, clear_solitary_fighter, &solitary_fighter_video, execute_solitary_fighter_frame, "solfigtr", "Solitary Fighter", "僟僀僲儗僢僋僗", COMPANY_ID_TAITO, "C91", 1990, taito_ym2610_sound, GAME_BEAT,};static UINT8 *RAM_VIDEO;static UINT8 *RAM_SCROLL;static UINT8 *RAM_OBJECT;static UINT8 *RAM_COLOUR;static UINT8 *RAM_INPUT;static UINT8 *GFX_BANK;static UINT8 *GFX_BG0;static UINT8 *GFX_BG0_SOLID;static UINT8 *GFX_SPR;static UINT8 *GFX_SPR_SOLID;static void solitary_fighter_ioc_0_wb(UINT32 offset, UINT8 data){ switch(offset & 6){ case 0: tc0220ioc_wb(0, data); break; case 2: tc0220ioc_wb(2, data); break; case 4: tc0220ioc_wb(8, data); break; default: break; }}static void solitary_fighter_ioc_0_ww(UINT32 offset, UINT16 data){ solitary_fighter_ioc_0_wb(offset, (UINT8) (data & 0xFF));}static UINT8 solitary_fighter_ioc_0_rb(UINT32 offset){ switch(offset & 6){ case 0: return tc0220ioc_rb(0); break; case 2: return tc0220ioc_rb(2); break; case 4: return tc0220ioc_rb(8); break; default: return 0xFF; break; }}static UINT16 solitary_fighter_ioc_0_rw(UINT32 offset){ return solitary_fighter_ioc_0_rb(offset);}static void solitary_fighter_ioc_1_wb(UINT32 offset, UINT8 data){ switch(offset & 6){ case 0: tc0220ioc_wb(4, data); break; case 2: tc0220ioc_wb(6, data); break; case 4: tc0220ioc_wb(14, data); break; default: break; }}static void solitary_fighter_ioc_1_ww(UINT32 offset, UINT16 data){ solitary_fighter_ioc_1_wb(offset, (UINT8) (data & 0xFF));}static UINT8 solitary_fighter_ioc_1_rb(UINT32 offset){ switch(offset & 6){ case 0: return tc0220ioc_rb(4); break; case 2: return tc0220ioc_rb(6); break; case 4: return tc0220ioc_rb(14); break; default: return 0xFF; break; }}static UINT16 solitary_fighter_ioc_1_rw(UINT32 offset){ return solitary_fighter_ioc_1_rb(offset);}void load_solitary_fighter(void){ int ta,tb; if(!(GFX=AllocateMem(0x200000+0x400000))) return; if(!(RAM=AllocateMem(0x100000))) return; GFX_BG0 =GFX+0x000000; GFX_SPR =GFX+0x200000; tb=0;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -