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

📄 liquidk.c

📁 十七种模拟器源代码 非常有用的作课程设计不可缺少的
💻 C
📖 第 1 页 / 共 2 页
字号:
/******************************************************************************//*                                                                            *//*                    LIQUID KIDS (C) 1990 TAITO CORPORATION                  *//*                                                                            *//******************************************************************************/#include "gameinc.h"#include "liquidk.h"#include "tc100scn.h"#include "tc200obj.h"#include "tc220ioc.h"#include "sasound.h"		// sample support routines#include "taitosnd.h"#ifdef RAINE_DEBUG#include "debug.h"#endifstatic struct DIR_INFO liquid_kids_dirs[] ={   { "liquid_kids", },   { "liquidk", },   { NULL, },};static struct ROM_INFO liquid_kids_roms[] ={   {  "lk_obj0.bin", 0x00080000, 0x67cc3163, 0, 0, 0, },   {  "lk_obj1.bin", 0x00080000, 0xd2400710, 0, 0, 0, },   {   "lk_scr.bin", 0x00080000, 0xc3364f9b, 0, 0, 0, },   {   "lk_snd.bin", 0x00080000, 0x474d45a4, 0, 0, 0, },   {     "lq09.bin", 0x00020000, 0x6ae09eb9, 0, 0, 0, },   {     "lq10.bin", 0x00020000, 0x50bef2e0, 0, 0, 0, },   {     "lq11.bin", 0x00020000, 0x42d2be6e, 0, 0, 0, },   {     "lq12.bin", 0x00020000, 0xcb16bad5, 0, 0, 0, },   {     "lq08.bin", 0x00010000, 0x413c310c, 0, 0, 0, },   {           NULL,          0,          0, 0, 0, 0, },};static struct INPUT_INFO liquid_kids_inputs[] ={   { KB_DEF_COIN1,        MSG_COIN1,               0x03210E, 0x04, BIT_ACTIVE_0 },   { KB_DEF_COIN2,        MSG_COIN2,               0x03210E, 0x08, BIT_ACTIVE_0 },   { KB_DEF_TILT,         MSG_TILT,                0x03210E, 0x01, BIT_ACTIVE_0 },   { KB_DEF_SERVICE,      MSG_SERVICE,             0x03210E, 0x02, BIT_ACTIVE_0 },   { KB_DEF_P1_START,     MSG_P1_START,            0x032104, 0x80, BIT_ACTIVE_0 },   { KB_DEF_P1_UP,        MSG_P1_UP,               0x032104, 0x01, BIT_ACTIVE_0 },   { KB_DEF_P1_DOWN,      MSG_P1_DOWN,             0x032104, 0x02, BIT_ACTIVE_0 },   { KB_DEF_P1_LEFT,      MSG_P1_LEFT,             0x032104, 0x04, BIT_ACTIVE_0 },   { KB_DEF_P1_RIGHT,     MSG_P1_RIGHT,            0x032104, 0x08, BIT_ACTIVE_0 },   { KB_DEF_P1_B1,        MSG_P1_B1,               0x032104, 0x10, BIT_ACTIVE_0 },   { KB_DEF_P1_B2,        MSG_P1_B2,               0x032104, 0x20, BIT_ACTIVE_0 },   { KB_DEF_P2_START,     MSG_P2_START,            0x032106, 0x80, BIT_ACTIVE_0 },   { KB_DEF_P2_UP,        MSG_P2_UP,               0x032106, 0x01, BIT_ACTIVE_0 },   { KB_DEF_P2_DOWN,      MSG_P2_DOWN,             0x032106, 0x02, BIT_ACTIVE_0 },   { KB_DEF_P2_LEFT,      MSG_P2_LEFT,             0x032106, 0x04, BIT_ACTIVE_0 },   { KB_DEF_P2_RIGHT,     MSG_P2_RIGHT,            0x032106, 0x08, BIT_ACTIVE_0 },   { KB_DEF_P2_B1,        MSG_P2_B1,               0x032106, 0x10, BIT_ACTIVE_0 },   { KB_DEF_P2_B2,        MSG_P2_B2,               0x032106, 0x20, BIT_ACTIVE_0 },   { 0,                   NULL,                    0,        0,    0            },};static struct DSW_DATA dsw_data_liquid_kids_0[] ={   { MSG_DSWA_BIT1,           0x01, 0x02 },   { MSG_OFF,                 0x01, 0x00 },   { MSG_ON,                  0x00, 0x00 },   { 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_COINAGE,               0x30, 0x04 },   { "1/1; 1/2",              0x30, 0x00 },   { "1/2; 1/1",              0x20, 0x00 },   { "2/1; 1/1",              0x10, 0x00 },   { "3/1; 1/1",              0x00, 0x00 },   { MSG_DSWA_BIT7,           0x40, 0x02 },   { MSG_OFF,                 0x40, 0x00 },   { MSG_ON,                  0x00, 0x00 },   { MSG_DSWA_BIT8,           0x80, 0x02 },   { MSG_OFF,                 0x80, 0x00 },   { MSG_ON,                  0x00, 0x00 },   { NULL,                    0,    0,   },};static struct DSW_DATA dsw_data_liquid_kids_1[] ={   { MSG_DSWB_BIT1,           0x01, 0x02 },   { MSG_OFF,                 0x01, 0x00 },   { MSG_ON,                  0x00, 0x00 },   { MSG_DSWB_BIT2,           0x02, 0x02 },   { MSG_OFF,                 0x02, 0x00 },   { MSG_ON,                  0x00, 0x00 },   { "Bonus at",              0x0C, 0x04 },   { "30k, 100k",             0x0C, 0x00 },   { "30k, 150k",             0x08, 0x00 },   { "50k, 250k",             0x04, 0x00 },   { "50k, 350k",             0x00, 0x00 },   { "Extra Lives",           0x30, 0x04 },   { "2",                     0x30, 0x00 },   { "1",                     0x20, 0x00 },   { "3",                     0x10, 0x00 },   { "4",                     0x00, 0x00 },   { "Continue Play",         0x40, 0x02 },   { MSG_ON,                  0x40, 0x00 },   { MSG_OFF,                 0x00, 0x00 },   { MSG_DSWB_BIT8,           0x80, 0x02 },   { MSG_OFF,                 0x80, 0x00 },   { MSG_ON,                  0x00, 0x00 },   { NULL,                    0,    0,   },};static struct DSW_INFO liquid_kids_dsw[] ={   { 0x032100, 0xFF, dsw_data_liquid_kids_0 },   { 0x032102, 0xFF, dsw_data_liquid_kids_1 },   { 0,        0,    NULL,      },};static struct ROMSW_DATA romsw_data_liquid_kids_0[] ={   { "Taito Japan (Japanese)", 0x01 },   { "Taito America",          0x02 },   { "Taito Japan",            0x03 },   { NULL,                     0    },};static struct ROMSW_INFO liquid_kids_romsw[] ={   { 0x07FFFF, 0x03, romsw_data_liquid_kids_0 },   { 0,        0,    NULL },};static struct VIDEO_INFO liquid_kids_video ={   DrawLiquidKids,   320,   224,   32,   VIDEO_ROTATE_NORMAL| VIDEO_ROTATABLE,};struct GAME_MAIN game_liquid_kids ={   liquid_kids_dirs,   liquid_kids_roms,   liquid_kids_inputs,   liquid_kids_dsw,   liquid_kids_romsw,   LoadLiquidKids,   ClearLiquidKids,   &liquid_kids_video,   ExecuteLiquidKidsFrame,   "liquidk",   "Liquid Kids",   "儈僘僶僋靛朻尟",   COMPANY_ID_TAITO,   "C49",   1990,   taito_ym2610_sound,   GAME_PLATFORM,};static UINT8 *RAM_VIDEO;static UINT8 *RAM_SCROLL;static UINT8 *RAM_OBJECT;static UINT8 *RAM_INPUT;static UINT8 *GFX_BG0;static UINT8 *GFX_BG0_SOLID;static UINT8 *GFX_SPR;static UINT8 *GFX_SPR_SOLID;static void BadWriteWord(UINT32 address, UINT16 data){#ifdef RAINE_DEBUG      if(address!=0x340000) print_debug("Ww(%06x,%04x) [%06x]\n",address,data,s68000context.pc);#endif}void LoadLiquidKids(void){   int ta,tb;   if(!(RAM=AllocateMem(0x80000))) return;   RAMSize=0x50000;   if(!(GFX=AllocateMem(0x100000+0x200000))) return;   GFX_BG0 = GFX+0x000000;   GFX_SPR = GFX+0x100000;   tb=0;   if(!load_rom("lk_scr.bin", RAM, 0x80000)) return;   for(ta=0;ta<0x80000;ta+=2){      GFX[tb+0]=RAM[ta+1]>>4;      GFX[tb+1]=RAM[ta+1]&15;      GFX[tb+2]=RAM[ta+0]>>4;      GFX[tb+3]=RAM[ta+0]&15;      tb+=4;   }   tb=0;   if(!load_rom("lk_obj0.bin", RAM, 0x80000)) return;   for(ta=0;ta<0x80000;ta++){      GFX_SPR[tb++]=RAM[ta]&15;      GFX_SPR[tb++]=RAM[ta]>>4;   }   if(!load_rom("lk_obj1.bin", RAM, 0x80000)) return;   for(ta=0;ta<0x80000;ta++){      GFX_SPR[tb++]=RAM[ta]&15;      GFX_SPR[tb++]=RAM[ta]>>4;   }   for(ta=0x1D3100;ta<0x1D3400;ta++){			// Sprite Mask things (yuck!)      GFX_SPR[ta]=0;   }   for(ta=0x011900;ta<0x011A00;ta++){			// Sprite Mask things (yuck!)      GFX_SPR[ta]=0;   }   if(!(RAM=AllocateMem(0x40000+0x10000))) return;   if(!(ROM=AllocateMem(0x80000))) return;   if(!load_rom("lq09.bin", RAM, 0x20000)) return;   for(ta=0;ta<0x20000;ta++){      ROM[ta+ta]=RAM[ta];   }   if(!load_rom("lq11.bin", RAM, 0x20000)) return;   for(ta=0;ta<0x20000;ta++){      ROM[ta+ta+1]=RAM[ta];   }   if(!load_rom("lq10.bin", RAM, 0x20000)) return;   for(ta=0;ta<0x20000;ta++){      ROM[ta+ta+0x40000]=RAM[ta];

⌨️ 快捷键说明

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