⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dinorex.c

📁 十七种模拟器源代码 非常有用的作课程设计不可缺少的
💻 C
📖 第 1 页 / 共 2 页
字号:
/******************************************************************************//*                                                                            *//*                    DINO REX (C) 1992 TAITO CORPORATION                     *//*                                                                            *//******************************************************************************/#include "gameinc.h"#include "dinorex.h"#include "tc100scn.h"#include "tc200obj.h"#include "tc220ioc.h"#include "sasound.h"		// sample support routines#include "taitosnd.h"/******************   DINO REX WORLD ******************/static struct DIR_INFO dino_rex_dirs[] ={   { "dino_rex", },   { "dinorex", },   { NULL, },};static struct ROM_INFO dino_rex_roms[] ={   { "drex_06m.rom", 0x00100000, 0x52f62835, 0, 0, 0, },   { "drex_02m.rom", 0x00200000, 0x6c304403, 0, 0, 0, },   { "drex_03m.rom", 0x00200000, 0xfc9cdab4, 0, 0, 0, },   { "drex_04m.rom", 0x00100000, 0x3800506d, 0, 0, 0, },   { "drex_05m.rom", 0x00100000, 0xe2ec3b5d, 0, 0, 0, },   { "drex_01m.rom", 0x00200000, 0xd10e9c7d, 0, 0, 0, },   { "drex_07m.rom", 0x00100000, 0x28262816, 0, 0, 0, },   { "drex_08m.rom", 0x00080000, 0x377b8b7b, 0, 0, 0, },   {  "drex_12.rom", 0x00010000, 0x8292c7c1, 0, 0, 0, },   {  "drex_14.rom", 0x00080000, 0xe6aafdac, 0, 0, 0, },   {  "drex_16.rom", 0x00080000, 0xcedc8537, 0, 0, 0, },   {           NULL,          0,          0, 0, 0, 0, },};static struct INPUT_INFO dino_rex_inputs[] ={   { KB_DEF_COIN1,        MSG_COIN1,               0x04300E, 0x04, BIT_ACTIVE_0 },   { KB_DEF_COIN2,        MSG_COIN2,               0x04300E, 0x08, BIT_ACTIVE_0 },   { KB_DEF_TILT,         MSG_TILT,                0x04300E, 0x01, BIT_ACTIVE_0 },   { KB_DEF_SERVICE,      MSG_SERVICE,             0x04300E, 0x02, BIT_ACTIVE_0 },   { KB_DEF_P1_START,     MSG_P1_START,            0x043004, 0x80, BIT_ACTIVE_0 },   { KB_DEF_P1_UP,        MSG_P1_UP,               0x043004, 0x01, BIT_ACTIVE_0 },   { KB_DEF_P1_DOWN,      MSG_P1_DOWN,             0x043004, 0x02, BIT_ACTIVE_0 },   { KB_DEF_P1_LEFT,      MSG_P1_LEFT,             0x043004, 0x04, BIT_ACTIVE_0 },   { KB_DEF_P1_RIGHT,     MSG_P1_RIGHT,            0x043004, 0x08, BIT_ACTIVE_0 },   { KB_DEF_P1_B1,        MSG_P1_B1,               0x043004, 0x10, BIT_ACTIVE_0 },   { KB_DEF_P1_B2,        MSG_P1_B2,               0x043004, 0x20, BIT_ACTIVE_0 },   { KB_DEF_P2_START,     MSG_P2_START,            0x043006, 0x80, BIT_ACTIVE_0 },   { KB_DEF_P2_UP,        MSG_P2_UP,               0x043006, 0x01, BIT_ACTIVE_0 },   { KB_DEF_P2_DOWN,      MSG_P2_DOWN,             0x043006, 0x02, BIT_ACTIVE_0 },   { KB_DEF_P2_LEFT,      MSG_P2_LEFT,             0x043006, 0x04, BIT_ACTIVE_0 },   { KB_DEF_P2_RIGHT,     MSG_P2_RIGHT,            0x043006, 0x08, BIT_ACTIVE_0 },   { KB_DEF_P2_B1,        MSG_P2_B1,               0x043006, 0x10, BIT_ACTIVE_0 },   { KB_DEF_P2_B2,        MSG_P2_B2,               0x043006, 0x20, BIT_ACTIVE_0 },   { 0,                   NULL,                    0,        0,    0            },};static struct DSW_DATA dsw_data_dino_rex_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,   },};static struct DSW_DATA dsw_data_dino_rex_1[] ={   { MSG_DIFFICULTY,          0x03, 0x04 },   { MSG_NORMAL,              0x03, 0x00 },   { MSG_EASY,                0x02, 0x00 },   { MSG_HARD,                0x01, 0x00 },   { MSG_HARDEST,             0x00, 0x00 },   { "Damage",                0x0C, 0x04 },   { MSG_NORMAL,              0x0C, 0x00 },   { "Small",                 0x08, 0x00 },   { "Big",                   0x04, 0x00 },   { "Biggest",               0x00, 0x00 },   { "Timer",                 0x10, 0x02 },   { MSG_NORMAL,              0x10, 0x00 },   { "Fast",                  0x00, 0x00 },   { "Match Type",            0x20, 0x02 },   { "Best of 3",             0x20, 0x00 },   { "Single",                0x00, 0x00 },   { "2 Player Mode",         0x40, 0x02 },   { "Upright",               0x40, 0x00 },   { "Cocktail",              0x00, 0x00 },   { "Upright Controls",      0x80, 0x02 },   { "Dual",                  0x80, 0x00 },   { "Single",                0x00, 0x00 },   { NULL,                    0,    0,   },};static struct DSW_INFO dino_rex_dsw[] ={   { 0x043000, 0xFF, dsw_data_dino_rex_0 },   { 0x043002, 0xFF, dsw_data_dino_rex_1 },   { 0,        0,    NULL,      },};/*static struct ROMSW_DATA romsw_data_dino_rex_0[] ={   { "Taito Japan (Japanese)", 0x01 },   { "Taito America",          0x02 },   { "Taito Worldwide",        0x03 },   { NULL,                     0    },};static struct ROMSW_INFO dino_rex_romsw[] ={   { 0x07FFFF, 0x03, romsw_data_dino_rex_0 },   { 0,        0,    NULL },};*/static struct VIDEO_INFO dino_rex_video ={   DrawDinoRex,   320,   224,   32,   VIDEO_ROTATE_NORMAL| VIDEO_ROTATABLE,};struct GAME_MAIN game_dino_rex ={   dino_rex_dirs,   dino_rex_roms,   dino_rex_inputs,   dino_rex_dsw,   NULL,   LoadDinoRex,   ClearDinoRex,   &dino_rex_video,   ExecuteDinoRexFrame,   "dinorex",   "Dino Rex",   "僟僀僲儗僢僋僗",   COMPANY_ID_TAITO,   "D39",   1992,   taito_ym2610_sound,   GAME_BEAT,};/***************   DINO REX US ***************/static struct DIR_INFO dino_rex_us_dirs[] ={   { "dino_rex_us", },   { "dinorexu", },   { ROMOF("dinorex"), },   { CLONEOF("dinorex"), },   { NULL, },};static struct ROM_INFO dino_rex_us_roms[] ={   { "drex_06m.rom", 0x00100000, 0x52f62835, 0, 0, 0, },   { "drex_02m.rom", 0x00200000, 0x6c304403, 0, 0, 0, },   { "drex_03m.rom", 0x00200000, 0xfc9cdab4, 0, 0, 0, },   { "drex_04m.rom", 0x00100000, 0x3800506d, 0, 0, 0, },   { "drex_05m.rom", 0x00100000, 0xe2ec3b5d, 0, 0, 0, },   { "drex_01m.rom", 0x00200000, 0xd10e9c7d, 0, 0, 0, },   { "drex_07m.rom", 0x00100000, 0x28262816, 0, 0, 0, },   { "drex_08m.rom", 0x00080000, 0x377b8b7b, 0, 0, 0, },   {  "drex_12.rom", 0x00010000, 0x8292c7c1, 0, 0, 0, },   {  "drex_14.rom", 0x00080000, 0xe6aafdac, 0, 0, 0, },   { "drex_16u.rom", 0x00080000, 0xfe96723b, 0, 0, 0, },   {           NULL,          0,          0, 0, 0, 0, },};static struct DSW_DATA dsw_data_dino_rex_us_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 },   { "Price to Continue",     0xC0, 0x04 },   { "Same as Start",         0xC0, 0x00 },   { MSG_1COIN_1PLAY,         0x80, 0x00 },   { MSG_2COIN_1PLAY,         0x40, 0x00 },   { MSG_3COIN_1PLAY,         0x00, 0x00 },   { NULL,                    0,    0,   },};static struct DSW_INFO dino_rex_us_dsw[] ={   { 0x043000, 0xFF, dsw_data_dino_rex_us_0 },   { 0x043002, 0xFF, dsw_data_dino_rex_1 },   { 0,        0,    NULL,      },};struct GAME_MAIN game_dino_rex_us ={   dino_rex_us_dirs,   dino_rex_us_roms,   dino_rex_inputs,   dino_rex_us_dsw,   NULL,   LoadDinoRex,   ClearDinoRex,   &dino_rex_video,   ExecuteDinoRexFrame,   "dinorexu",   "Dino Rex (US)",   "僟僀僲儗僢僋僗 (US)",   COMPANY_ID_TAITO,   "D39",   1992,   taito_ym2610_sound,   GAME_BEAT,};/******************   DINO REX JAPAN ******************/static struct DIR_INFO dino_rex_jp_dirs[] ={   { "dino_rex_jp", },   { "dinorexj", },   { ROMOF("dinorex"), },   { CLONEOF("dinorex"), },   { NULL, },};static struct ROM_INFO dino_rex_jp_roms[] ={   { "drex_06m.rom", 0x00100000, 0x52f62835, 0, 0, 0, },   { "drex_02m.rom", 0x00200000, 0x6c304403, 0, 0, 0, },   { "drex_03m.rom", 0x00200000, 0xfc9cdab4, 0, 0, 0, },   { "drex_04m.rom", 0x00100000, 0x3800506d, 0, 0, 0, },   { "drex_05m.rom", 0x00100000, 0xe2ec3b5d, 0, 0, 0, },   { "drex_01m.rom", 0x00200000, 0xd10e9c7d, 0, 0, 0, },   { "drex_07m.rom", 0x00100000, 0x28262816, 0, 0, 0, },   { "drex_08m.rom", 0x00080000, 0x377b8b7b, 0, 0, 0, },   {  "drex_12.rom", 0x00010000, 0x8292c7c1, 0, 0, 0, },   {  "drex_14.rom", 0x00080000, 0xe6aafdac, 0, 0, 0, },   {   "d39_13.rom", 0x00080000, 0xae496b2f, 0, 0, 0, },   {           NULL,          0,          0, 0, 0, 0, },};static struct DSW_DATA dsw_data_dino_rex_jp_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_1COIN_2PLAY,         0x20, 0x00 },   { MSG_2COIN_1PLAY,         0x10, 0x00 },   { MSG_3COIN_1PLAY,         0x00, 0x00 },   { MSG_COIN2,               0xC0, 0x04 },   { MSG_1COIN_1PLAY,         0xC0, 0x00 },   { MSG_1COIN_2PLAY,         0x80, 0x00 },   { MSG_2COIN_1PLAY,         0x40, 0x00 },   { MSG_3COIN_1PLAY,         0x00, 0x00 },   { NULL,                    0,    0,   },};static struct DSW_INFO dino_rex_jp_dsw[] ={   { 0x043000, 0xFF, dsw_data_dino_rex_jp_0 },   { 0x043002, 0xFF, dsw_data_dino_rex_1 },   { 0,        0,    NULL,      },};struct GAME_MAIN game_dino_rex_jp ={   dino_rex_jp_dirs,   dino_rex_jp_roms,   dino_rex_inputs,   dino_rex_jp_dsw,   NULL,   LoadDinoRex,   ClearDinoRex,   &dino_rex_video,   ExecuteDinoRexFrame,   "dinorexj",   "Dino Rex (Japan)",   "僟僀僲儗僢僋僗 (Japan)",   COMPANY_ID_TAITO,   "D39",   1992,   taito_ym2610_sound,   GAME_BEAT,};static UINT8 *RAM_INPUT;static UINT8 *RAM_VIDEO;static UINT8 *RAM_SCROLL;static UINT8 *GFX_BG0;static UINT8 *GFX_BG0_SOLID;static UINT8 *GFX_SPR;static UINT8 *GFX_SPR_SOLID;void LoadDinoRex(void){   int ta,tb,tc;   if(!(RAM=AllocateMem(0x80000))) return;   if(!(ROM=AllocateMem(0x300000))) return;   if(!(GFX=AllocateMem(0x200000+0xC00000))) return;   GFX_BG0 = GFX + 0x000000;   GFX_SPR = GFX + 0x200000;   if(!load_rom("drex_06m.rom", ROM, 0x100000)) return;   tb = 0;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -