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

📄 toaplan2.c

📁 十七种模拟器源代码 非常有用的作课程设计不可缺少的
💻 C
📖 第 1 页 / 共 5 页
字号:
   { KB_DEF_P1_B1,        MSG_P1_B1,               0x01F010, 0x10, BIT_ACTIVE_1 },   { KB_DEF_P1_B2,        MSG_P1_B2,               0x01F010, 0x20, BIT_ACTIVE_1 },   { KB_DEF_P1_B3,        MSG_P1_B3,               0x01F010, 0x40, BIT_ACTIVE_1 },   { KB_DEF_P2_START,     MSG_P2_START,            0x01F018, 0x40, BIT_ACTIVE_1 },   { KB_DEF_P2_UP,        MSG_P2_UP,               0x01F014, 0x01, BIT_ACTIVE_1 },   { KB_DEF_P2_DOWN,      MSG_P2_DOWN,             0x01F014, 0x02, BIT_ACTIVE_1 },   { KB_DEF_P2_LEFT,      MSG_P2_LEFT,             0x01F014, 0x04, BIT_ACTIVE_1 },   { KB_DEF_P2_RIGHT,     MSG_P2_RIGHT,            0x01F014, 0x08, BIT_ACTIVE_1 },   { KB_DEF_P2_B1,        MSG_P2_B1,               0x01F014, 0x10, BIT_ACTIVE_1 },   { KB_DEF_P2_B2,        MSG_P2_B2,               0x01F014, 0x20, BIT_ACTIVE_1 },   { KB_DEF_P2_B3,        MSG_P2_B3,               0x01F014, 0x40, BIT_ACTIVE_1 },   { 0,                   NULL,                    0,        0,    0            },};static struct DSW_DATA dsw_data_dogyuun_0[] ={   { MSG_FREE_PLAY,              0x01, 0x02 },   { MSG_OFF,                 0x00, 0x00 },   { MSG_ON,                  0x01, 0x00 },   { MSG_SCREEN,              0x02, 0x02 },   { MSG_NORMAL,              0x00, 0x00 },   { MSG_INVERT,              0x02, 0x00 },   { MSG_TEST_MODE,           0x04, 0x02 },   { MSG_OFF,                 0x00, 0x00 },   { MSG_ON,                  0x04, 0x00 },   { MSG_DEMO_SOUND,          0x08, 0x02 },   { MSG_ON,                  0x00, 0x00 },   { MSG_OFF,                 0x08, 0x00 },   { MSG_COIN1,               0x30, 0x04 },   { MSG_1COIN_1PLAY,         0x00, 0x00 },   { MSG_1COIN_2PLAY,         0x10, 0x00 },   { MSG_2COIN_1PLAY,         0x20, 0x00 },   { MSG_2COIN_3PLAY,         0x30, 0x00 },   { MSG_COIN2,               0xC0, 0x04 },   { MSG_1COIN_1PLAY,         0x00, 0x00 },   { MSG_1COIN_2PLAY,         0x40, 0x00 },   { MSG_2COIN_1PLAY,         0x80, 0x00 },   { MSG_2COIN_3PLAY,         0xC0, 0x00 },   { NULL,                    0,    0,   },};static struct DSW_DATA dsw_data_dogyuun_1[] ={   { MSG_DIFFICULTY,          0x03, 0x04 },   { MSG_NORMAL,              0x00, 0x00 },   { MSG_EASY,                0x01, 0x00 },   { MSG_HARD,                0x02, 0x00 },   { MSG_HARDEST,             0x03, 0x00 },   { MSG_EXTRA_LIFE,          0x0C, 0x04 },   { "200k only",             0x00, 0x00 },   { "every 200k",            0x04, 0x00 },   { "400k only",             0x08, 0x00 },   { "None",                  0x0C, 0x00 },   { MSG_LIVES,               0x30, 0x04 },   { "3",                     0x00, 0x00 },   { "5",                     0x10, 0x00 },   { "2",                     0x20, 0x00 },   { "1",                     0x30, 0x00 },   { MSG_CHEAT,               0x40, 0x02 },   { MSG_OFF,                 0x00, 0x00 },   { MSG_ON,                  0x40, 0x00 },   { MSG_CONTINUE_PLAY,       0x80, 0x02 },   { MSG_ON,                  0x00, 0x00 },   { MSG_OFF,                 0x80, 0x00 },   { NULL,                    0,    0,   },};static struct DSW_DATA dsw_data_dogyuun_2[] ={   { "Version",               0x0F, 0x09 },   { "Japan",                 0x00, 0x00 },   { "America",               0x01, 0x00 },   { "America - Atari",       0x02, 0x00 },   { "Europe",                0x03, 0x00 },   { "Hong Kong",             0x04, 0x00 },   { "Korea",                 0x05, 0x00 },   { "Taiwan",                0x06, 0x00 },   { "SE Asia",               0x08, 0x00 },   { "Japan - Taito",         0x0F, 0x00 },   { NULL,                    0,    0,   },};static struct DSW_INFO dogyuun_dsw[] ={   { 0x01F08C, 0x00, dsw_data_dogyuun_0 },   { 0x01F090, 0x00, dsw_data_dogyuun_1 },   { 0x01F094, 0x00, dsw_data_dogyuun_2 },   { 0,        0,    NULL,      },};struct GAME_MAIN game_dogyuun ={   dogyuun_dirs,   dogyuun_roms,   dogyuun_inputs,   dogyuun_dsw,   NULL,   load_dogyuun,   clear_toaplan_2,   &toaplan2_r270_video,   ExecuteToaplan2Frame,   "dogyuun",   "Dogyuun",   "僪僊儏乕儞",   COMPANY_ID_TOAPLAN,   "TP022",   1991,   //toaplan2_sound,   NULL,   GAME_SHOOT,};/***********   WHOOPEE ***********/static struct DIR_INFO whoopee_dirs[] ={   { "whoopee", },   { NULL, },};static struct ROM_INFO whoopee_roms[] ={   {    "whoopee.1", 0x00020000, 0x28882e7e, 0, 0, 0, },   {    "whoopee.2", 0x00020000, 0x6796f133, 0, 0, 0, },   {   "ppbb08.bin", 0x00008000, 0x101c0358, 0, 0, 0, },   {  "tp025-4.bin", 0x00100000, 0xab97f744, 0, 0, 0, },   {  "tp025-3.bin", 0x00100000, 0x7b16101e, 0, 0, 0, }, //{   "ppbb07.bin", 0x00008000, 0x456dd16e, 0, 0, 0, },   {           NULL,          0,          0, 0, 0, 0, },};static struct INPUT_INFO whoopee_inputs[] ={   { KB_DEF_COIN1,        MSG_COIN1,               0x00E020, 0x08, BIT_ACTIVE_1 },   { KB_DEF_COIN2,        MSG_COIN2,               0x00E020, 0x10, BIT_ACTIVE_1 },   { KB_DEF_TILT,         MSG_TILT,                0x00E020, 0x02, BIT_ACTIVE_1 },   { KB_DEF_SERVICE,      MSG_SERVICE,             0x00E020, 0x01, BIT_ACTIVE_1 },   { KB_DEF_P1_START,     MSG_P1_START,            0x00E020, 0x20, BIT_ACTIVE_1 },   { KB_DEF_P1_UP,        MSG_P1_UP,               0x00E050, 0x01, BIT_ACTIVE_1 },   { KB_DEF_P1_DOWN,      MSG_P1_DOWN,             0x00E050, 0x02, BIT_ACTIVE_1 },   { KB_DEF_P1_LEFT,      MSG_P1_LEFT,             0x00E050, 0x04, BIT_ACTIVE_1 },   { KB_DEF_P1_RIGHT,     MSG_P1_RIGHT,            0x00E050, 0x08, BIT_ACTIVE_1 },   { KB_DEF_P1_B1,        MSG_P1_B1,               0x00E050, 0x10, BIT_ACTIVE_1 },   { KB_DEF_P1_B2,        MSG_P1_B2,               0x00E050, 0x20, BIT_ACTIVE_1 },   { KB_DEF_P2_START,     MSG_P2_START,            0x00E020, 0x40, BIT_ACTIVE_1 },   { KB_DEF_P2_UP,        MSG_P2_UP,               0x00E060, 0x01, BIT_ACTIVE_1 },   { KB_DEF_P2_DOWN,      MSG_P2_DOWN,             0x00E060, 0x02, BIT_ACTIVE_1 },   { KB_DEF_P2_LEFT,      MSG_P2_LEFT,             0x00E060, 0x04, BIT_ACTIVE_1 },   { KB_DEF_P2_RIGHT,     MSG_P2_RIGHT,            0x00E060, 0x08, BIT_ACTIVE_1 },   { KB_DEF_P2_B1,        MSG_P2_B1,               0x00E060, 0x10, BIT_ACTIVE_1 },   { KB_DEF_P2_B2,        MSG_P2_B2,               0x00E060, 0x20, BIT_ACTIVE_1 },   { 0,                   NULL,                    0,        0,    0            },};static struct DSW_DATA dsw_data_whoopee_0[] ={   { MSG_SCREEN,              0x02, 0x02 },   { MSG_NORMAL,              0x00, 0x00 },   { MSG_INVERT,              0x02, 0x00 },   { MSG_TEST_MODE,           0x04, 0x02 },   { MSG_OFF,                 0x00, 0x00 },   { MSG_ON,                  0x04, 0x00 },   { MSG_DEMO_SOUND,          0x08, 0x02 },   { MSG_ON,                  0x00, 0x00 },   { MSG_OFF,                 0x08, 0x00 },   { MSG_COIN1,               0x30, 0x04 },   { MSG_1COIN_1PLAY,         0x00, 0x00 },   { MSG_1COIN_2PLAY,         0x10, 0x00 },   { MSG_2COIN_1PLAY,         0x20, 0x00 },   { MSG_2COIN_3PLAY,         0x30, 0x00 },   { MSG_COIN2,               0xC0, 0x04 },   { MSG_1COIN_1PLAY,         0x00, 0x00 },   { MSG_1COIN_2PLAY,         0x40, 0x00 },   { MSG_2COIN_1PLAY,         0x80, 0x00 },   { MSG_2COIN_3PLAY,         0xC0, 0x00 },   { NULL,                    0,    0,   },};static struct DSW_DATA dsw_data_whoopee_1[] ={   { MSG_DIFFICULTY,          0x03, 0x04 },   { MSG_NORMAL,              0x00, 0x00 },   { MSG_EASY,                0x01, 0x00 },   { MSG_HARD,                0x02, 0x00 },   { MSG_HARDEST,             0x03, 0x00 },   { MSG_EXTRA_LIFE,          0x0C, 0x04 },   { "200k and every 300k",   0x00, 0x00 },   { "150k and every 200k",   0x04, 0x00 },   { "200k only",             0x08, 0x00 },   { "None",                  0x0C, 0x00 },   { MSG_LIVES,               0x30, 0x04 },   { "3",                     0x00, 0x00 },   { "5",                     0x10, 0x00 },   { "2",                     0x20, 0x00 },   { "1",                     0x30, 0x00 },   { MSG_CHEAT,               0x40, 0x02 },   { MSG_OFF,                 0x00, 0x00 },   { MSG_ON,                  0x40, 0x00 },   { NULL,                    0,    0,   },};static struct DSW_DATA dsw_data_whoopee_2[] ={   { "Language",              0x0F, 0x06 },   { "Japan/Whoopee",         0x00, 0x00 },   { "Asia/PipiBibi",         0x01, 0x00 },   { "HongKong/PipiBibi",     0x02, 0x00 },   { "Taiwan/PipiBibi",       0x03, 0x00 },   { "America/PipiBibi",      0x05, 0x00 },   { "Europe/PipiBibi",       0x07, 0x00 },   { NULL,                    0,    0,   },};static struct DSW_INFO whoopee_dsw[] ={   { 0x00E000, 0x00, dsw_data_whoopee_0 },   { 0x00E010, 0x00, dsw_data_whoopee_1 },   { 0x00E030, 0x00, dsw_data_whoopee_2 },   { 0,        0,    NULL,      },};static struct YM3812interface ym3812_interface ={   1,                   // 1 x YM3812   3000000,             // 3 MHz  (emu only)   { 200 },             // Volume (emu only)   { NULL }};static struct SOUND_INFO pipi_and_bibi_sound[] ={   { SOUND_YM3812,  &ym3812_interface,    },   { 0,             NULL,                 },};struct GAME_MAIN game_whoopee ={   whoopee_dirs,   whoopee_roms,   whoopee_inputs,   whoopee_dsw,   NULL,   LoadWhoopee,   clear_toaplan_2,   &toaplan2_video,   ExecuteToaplan2Frame,   "whoopee",   "Whoopee",   "僼乕價乕",   COMPANY_ID_TOAPLAN,   NULL,   1991,   pipi_and_bibi_sound,   GAME_PLATFORM | GAME_ADULT,};/*****************   PIPI AND BIBI *****************/static struct DIR_INFO pipi_and_bibi_dirs[] ={   { "pipi_and_bibi", },   { "pipibibi", },   { ROMOF("whoopee"), },   { CLONEOF("whoopee"), },   { NULL, },};static struct ROM_INFO pipi_and_bibi_roms[] ={   {   "ppbb08.bin", 0x00008000, 0x101c0358, 0, 0, 0, },   {   "ppbb01.bin", 0x00080000, 0x0fcae44b, 0, 0, 0, },   {   "ppbb02.bin", 0x00080000, 0x8bfcdf87, 0, 0, 0, },   {   "ppbb03.bin", 0x00080000, 0xabdd2b8b, 0, 0, 0, },   {   "ppbb04.bin", 0x00080000, 0x70faa734, 0, 0, 0, },   {   "ppbb05.bin", 0x00020000, 0x3d51133c, 0, 0, 0, },   {   "ppbb06.bin", 0x00020000, 0x14c92515, 0, 0, 0, }, //{   "ppbb07.bin", 0x00008000, 0x456dd16e, 0, 0, 0, },   {           NULL,          0,          0, 0, 0, 0, },};static struct INPUT_INFO pipi_and_bibi_inputs[] ={   { KB_DEF_COIN1,        MSG_COIN1,               0x00E02C, 0x08, BIT_ACTIVE_1 },   { KB_DEF_COIN2,        MSG_COIN2,               0x00E02C, 0x10, BIT_ACTIVE_1 },   { KB_DEF_TILT,         MSG_TILT,                0x00E02C, 0x02, BIT_ACTIVE_1 },   { KB_DEF_SERVICE,      MSG_SERVICE,             0x00E02C, 0x01, BIT_ACTIVE_1 },   { KB_DEF_P1_START,     MSG_P1_START,            0x00E02C, 0x20, BIT_ACTIVE_1 },   { KB_DEF_P1_UP,        MSG_P1_UP,               0x00E030, 0x01, BIT_ACTIVE_1 },   { KB_DEF_P1_DOWN,      MSG_P1_DOWN,             0x00E030, 0x02, BIT_ACTIVE_1 },   { KB_DEF_P1_LEFT,      MSG_P1_LEFT,             0x00E030, 0x04, BIT_ACTIVE_1 },   { KB_DEF_P1_RIGHT,     MSG_P1_RIGHT,            0x00E030, 0x08, BIT_ACTIVE_1 },   { KB_DEF_P1_B1,        MSG_P1_B1,               0x00E030, 0x10, BIT_ACTIVE_1 },   { KB_DEF_P1_B2,        MSG_P1_B2,               0x00E030, 0x20, BIT_ACTIVE_1 },   { KB_DEF_P2_START,     MSG_P2_START,            0x00E02C, 0x40, BIT_ACTIVE_1 },   { KB_DEF_P2_UP,        MSG_P2_UP,               0x00E034, 0x01, BIT_ACTIVE_1 },   { KB_DEF_P2_DOWN,      MSG_P2_DOWN,             0x00E034, 0x02, BIT_ACTIVE_1 },   { KB_DEF_P2_LEFT,      MSG_P2_LEFT,             0x00E034, 0x04, BIT_ACTIVE_1 },   { KB_DEF_P2_RIGHT,     MSG_P2_RIGHT,            0x00E034, 0x08, BIT_ACTIVE_1 },   { KB_DEF_P2_B1,        MSG_P2_B1,               0x00E034, 0x10, BIT_ACTIVE_1 },   { KB_DEF_P2_B2,        MSG_P2_B2,               0x00E034, 0x20, BIT_ACTIVE_1 },   { 0,                   NULL,                    0,        0,    0            },};static struct DSW_DATA dsw_data_pipi_and_bibi_2[] ={   { "Language",              0x0F, 0x06 },   { "Japan/Whoopee",         0x00, 0x00 },   { "Asia/PipiBibi",         0x01, 0x00 },   { "HongKong/PipiBibi",     0x02, 0x00 },   { "Taiwan/PipiBibi",       0x03, 0x00 },   { "America/PipiBibi",      0x05, 0x00 },   { "Europe/PipiBibi",       0x07, 0x00 },   { NULL,                    0,    0,   },};static struct DSW_INFO pipi_and_bibi_dsw[] ={   { 0x00E020, 0x00, dsw_data_whoopee_0 },   { 0x00E024, 0x00, dsw_data_whoopee_1 },   { 0x00E028, 0x07, dsw_data_pipi_and_bibi_2 },   { 0,        0,    NULL,      },};struct GAME_MAIN game_pipi_and_bibi ={   pipi_and_bibi_dirs,   pipi_and_bibi_roms,   pipi_and_bibi_inputs,   pipi_and_bibi_dsw,   NULL,   LoadPipiBibi,   clear_toaplan_2,   &toaplan2_video,   ExecuteToaplan2Frame,   "pipibibi",   "Pipi and Bibi's",   "僼乕價乕 (bootleg)",   COMPANY_ID_BOOTLEG,   NULL,   1991,   pipi_and_bibi_sound,   GAME_PLATFORM | GAME_ADULT,};/*************   TEKI PAKI *************/static struct DIR_INFO teki_paki_dirs[] ={   { "teki_paki", },   { "tekipaki", },   { NULL, },};

⌨️ 快捷键说明

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