📄 topland.c
字号:
/******************************************************************************//* *//* TOP LANDING (C) 1990 TAITO CORPORATION *//* *//******************************************************************************/#include "gameinc.h"#include "topland.h"#include "tc004vcu.h"#include "tc220ioc.h"#include "taitosnd.h"#ifdef RAINE_DEBUG#include "debug.h"#endif#include "sasound.h" // sample support routinesstatic struct DIR_INFO top_landing_dirs[] ={ { "top_landing", }, { "topland", }, { NULL, },};static struct ROM_INFO top_landing_roms[] ={ { "ic12_22.010", 0x00020000, 0x94279201, 0, 0, 0, }, { "ic13_24.010", 0x00020000, 0x845026c5, 0, 0, 0, }, { "ic13_40.010", 0x00020000, 0xdb872f7d, 0, 0, 0, }, { "ic1_13.010", 0x00020000, 0xb37dc3ea, 0, 0, 0, }, { "ic22_28.764", 0x00002000, 0xc4be68a6, 0, 0, 0, }, { "ic27_29.010", 0x00020000, 0xefdd5c51, 0, 0, 0, }, { "ic28_30.010", 0x00020000, 0x30e37cb8, 0, 0, 0, }, { "ic29_31.010", 0x00020000, 0x3feebfe3, 0, 0, 0, }, { "ic2_14.010", 0x00020000, 0x617948a3, 0, 0, 0, }, { "ic30_32.010", 0x00020000, 0x66806646, 0, 0, 0, }, { "ic31_18.010", 0x00020000, 0x3a4e687a, 0, 0, 0, }, { "ic34_42.512", 0x00010000, 0x389230e0, 0, 0, 0, }, { "ic35_21.764", 0x00002000, 0x5f38460d, 0, 0, 0, }, { "ic39_33.010", 0x00020000, 0x38786867, 0, 0, 0, }, { "ic3_15.010", 0x00020000, 0xe35ffe81, 0, 0, 0, }, { "ic40_34.010", 0x00020000, 0xa7e10ca4, 0, 0, 0, }, { "ic41_23.010", 0x00020000, 0xef3a971c, 0, 0, 0, }, { "ic42_25.010", 0x00020000, 0x1bd53a72, 0, 0, 0, }, { "ic43_41.010", 0x00020000, 0x28264798, 0, 0, 0, }, { "ic47_35.010", 0x00020000, 0xcba7bac5, 0, 0, 0, }, { "ic48_36.010", 0x00020000, 0x4259e76a, 0, 0, 0, }, { "ic4_16.010", 0x00020000, 0x203a5c27, 0, 0, 0, }, { "ic5_17.010", 0x00020000, 0x36447066, 0, 0, 0, }, { "ic6_20.764", 0x00002000, 0xa4afe958, 0, 0, 0, }, { NULL, 0, 0, 0, 0, 0, },};static struct INPUT_INFO top_landing_inputs[] ={ { KB_DEF_COIN1, MSG_COIN1, 0x055204, 0x04, BIT_ACTIVE_1 }, { KB_DEF_COIN2, MSG_COIN2, 0x055204, 0x08, BIT_ACTIVE_1 }, { KB_DEF_TILT, MSG_TILT, 0x055204, 0x20, BIT_ACTIVE_0 }, { KB_DEF_SERVICE, MSG_SERVICE, 0x055204, 0x10, BIT_ACTIVE_0 }, { KB_DEF_P1_START, MSG_P1_START, 0x055204, 0x40, BIT_ACTIVE_0 }, { KB_DEF_P1_B1, MSG_P1_B1, 0x055206, 0x08, BIT_ACTIVE_0 }, { KB_DEF_P1_B2, "Lever", 0x055206, 0x01, BIT_ACTIVE_0 }, { KB_DEF_P1_B3, "Handle X", 0x055206, 0x02, BIT_ACTIVE_0 }, { KB_DEF_P1_B4, "Handle Y", 0x055206, 0x04, BIT_ACTIVE_0 }, { KB_DEF_P1_B5, "Pedal L", 0x055206, 0x20, BIT_ACTIVE_0 }, { KB_DEF_P1_B6, "Pedal R", 0x055206, 0x10, BIT_ACTIVE_0 }, { 0, NULL, 0, 0, 0 },};static struct DSW_DATA dsw_data_top_landing_0[] ={ { MSG_DSWA_BIT1, 0x01, 0x02 }, { MSG_OFF, 0x01, 0x00 }, { MSG_ON, 0x00, 0x00 }, { MSG_DSWA_BIT2, 0x02, 0x02 }, { MSG_OFF, 0x02, 0x00 }, { MSG_ON, 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_DSWA_BIT5, 0x10, 0x02 }, { MSG_OFF, 0x10, 0x00 }, { MSG_ON, 0x00, 0x00 }, { MSG_DSWA_BIT6, 0x20, 0x02 }, { MSG_OFF, 0x20, 0x00 }, { MSG_ON, 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_INFO top_landing_dsw[] ={ { 0x055200, 0xFF, dsw_data_top_landing_0 }, { 0x055202, 0xFF, dsw_data_default_1 }, { 0, 0, NULL, },};static struct ROMSW_DATA romsw_data_top_landing_0[] ={ { "Taito Japan (Notice)", 0x00 }, { "Taito America", 0x01 }, { "Taito Japan", 0x02 }, { NULL, 0 },};static struct ROMSW_INFO top_landing_romsw[] ={ { 0x03FFFF, 0x02, romsw_data_top_landing_0 }, { 0, 0, NULL },};static struct VIDEO_INFO top_landing_video ={ DrawTopLanding, 512, 400, 64, VIDEO_ROTATE_NORMAL,};struct GAME_MAIN game_top_landing ={ top_landing_dirs, top_landing_roms, top_landing_inputs, top_landing_dsw, top_landing_romsw, LoadTopLanding, ClearTopLanding, &top_landing_video, ExecuteTopLandingFrame, "topland", "Top Landing", NULL, COMPANY_ID_TAITO, "B62", 1988, taito_ym2610_sound, GAME_MISC | GAME_NOT_WORKING,};static UINT8 *RAM_VIDEO;static UINT8 *RAM_COLOUR;static UINT8 *RAM_INPUT;static UINT8 *GFX_BG0;static UINT8 *GFX_BG0_SOLID;static UINT8 *GFX_FG0;static int BadReadWord(UINT32 address){#ifdef RAINE_DEBUG print_debug("Rw(%06x) [%06x]\n",address,s68000context.pc);#endif return(0xFFFF);}static void BadWriteByte(UINT32 address, UINT8 data){ #ifdef RAINE_DEBUG if(address!=0xA00200)print_debug("Wb(%06x,%02x) [%06x]\n",address,data,s68000context.pc); #endif}static void BadWriteWord(UINT32 address, UINT16 data){ #ifdef RAINE_DEBUG print_debug("Ww(%06x,%04x) [%06x]\n",address,data,s68000context.pc); #endif}void LoadTopLanding(void){ int ta,tb,tc; if(!(ROM=AllocateMem(0xC0000))) return; if(!(RAM=AllocateMem(0x80000))) return; if(!(GFX=AllocateMem(0x200000))) return; GFX_BG0 = GFX+0x000000; if(!load_rom("ic27_29.010", RAM, 0x20000)) return; // GFX tb=4; for(ta=0;ta<0x20000;ta+=16){ for(tc=0;tc<16;tc++){ GFX[tb+(tc<<4)]=RAM[ta+tc]&15; GFX[tb+(tc<<4)+1]=RAM[ta+tc]>>4; } tb+=256; } if(!load_rom("ic28_30.010", RAM, 0x20000)) return; // GFX tb=10; for(ta=0;ta<0x20000;ta+=16){ for(tc=0;tc<16;tc++){ GFX[tb+(tc<<4)]=RAM[ta+tc]&15; GFX[tb+(tc<<4)+1]=RAM[ta+tc]>>4; } tb+=256; } if(!load_rom("ic29_31.010", RAM, 0x20000)) return; // GFX tb=12; for(ta=0;ta<0x20000;ta+=16){ for(tc=0;tc<16;tc++){ GFX[tb+(tc<<4)]=RAM[ta+tc]&15; GFX[tb+(tc<<4)+1]=RAM[ta+tc]>>4; } tb+=256; } if(!load_rom("ic30_32.010", RAM, 0x20000)) return; // GFX tb=14; for(ta=0;ta<0x20000;ta+=16){ for(tc=0;tc<16;tc++){ GFX[tb+(tc<<4)]=RAM[ta+tc]&15; GFX[tb+(tc<<4)+1]=RAM[ta+tc]>>4; } tb+=256; } if(!load_rom("ic39_33.010", RAM, 0x20000)) return; // GFX tb=0; for(ta=0;ta<0x20000;ta+=16){ for(tc=0;tc<16;tc++){ GFX[tb+(tc<<4)]=RAM[ta+tc]&15; GFX[tb+(tc<<4)+1]=RAM[ta+tc]>>4; } tb+=256; } if(!load_rom("ic40_34.010", RAM, 0x20000)) return; // GFX tb=6; for(ta=0;ta<0x20000;ta+=16){ for(tc=0;tc<16;tc++){ GFX[tb+(tc<<4)]=RAM[ta+tc]&15; GFX[tb+(tc<<4)+1]=RAM[ta+tc]>>4; } tb+=256; } if(!load_rom("ic47_35.010", RAM, 0x20000)) return; // GFX tb=8; for(ta=0;ta<0x20000;ta+=16){ for(tc=0;tc<16;tc++){ GFX[tb+(tc<<4)]=RAM[ta+tc]&15; GFX[tb+(tc<<4)+1]=RAM[ta+tc]>>4; } tb+=256; } if(!load_rom("ic48_36.010", RAM, 0x20000)) return; // GFX tb=2; for(ta=0;ta<0x20000;ta+=16){ for(tc=0;tc<16;tc++){ GFX[tb+(tc<<4)]=RAM[ta+tc]&15;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -