📄 hitice.c
字号:
/******************************************************************************//* *//* HIT THE ICE (C) 1990 TAITO CORPORATION *//* *//******************************************************************************/#include "gameinc.h"#include "hitice.h"#include "tc180vcu.h"#include "tc220ioc.h"#include "sasound.h" // sample support routines#include "taitosnd.h"static struct DIR_INFO hit_the_ice_dirs[] ={ { "hit_the_ice", }, { "hitice", }, { NULL, },};static struct ROM_INFO hit_the_ice_roms[] ={ { "c59-08.rom", 0x00010000, 0xd3cbc10b, 0, 0, 0, }, { "c59-02.rom", 0x00080000, 0xaffb5e07, 0, 0, 0, }, { "c59-03.rom", 0x00080000, 0x9e513048, 0, 0, 0, }, { "ad-pcm01.rom", 0x00020000, 0x46ae291d, 0, 0, 0, }, { "c59-09.rom", 0x00010000, 0xe243e3b0, 0, 0, 0, }, { "c59-10.rom", 0x00020000, 0xe4ffad15, 0, 0, 0, }, { "c59-11.rom", 0x00010000, 0x4d4dfa52, 0, 0, 0, }, { "c59-12.rom", 0x00020000, 0xa080d7af, 0, 0, 0, }, { NULL, 0, 0, 0, 0, 0, },};static struct INPUT_INFO hit_the_ice_inputs[] ={ { KB_DEF_COIN1, MSG_COIN1, 0x026106, 0x10, BIT_ACTIVE_0 }, { KB_DEF_COIN2, MSG_COIN2, 0x026106, 0x20, BIT_ACTIVE_0 }, { KB_DEF_TILT, MSG_TILT, 0x026106, 0x01, BIT_ACTIVE_0 }, { KB_DEF_SERVICE, MSG_SERVICE, 0x026106, 0x02, BIT_ACTIVE_0 }, { KB_DEF_P1_START, MSG_P1_START, 0x026106, 0x04, BIT_ACTIVE_0 }, { KB_DEF_P1_UP, MSG_P1_UP, 0x02610E, 0x01, BIT_ACTIVE_0 }, { KB_DEF_P1_DOWN, MSG_P1_DOWN, 0x02610E, 0x02, BIT_ACTIVE_0 }, { KB_DEF_P1_LEFT, MSG_P1_LEFT, 0x02610E, 0x04, BIT_ACTIVE_0 }, { KB_DEF_P1_RIGHT, MSG_P1_RIGHT, 0x02610E, 0x08, BIT_ACTIVE_0 }, { KB_DEF_P1_B1, MSG_P1_B1, 0x026104, 0x01, BIT_ACTIVE_0 }, { KB_DEF_P1_B2, MSG_P1_B2, 0x026104, 0x02, BIT_ACTIVE_0 }, { KB_DEF_P1_B3, MSG_P1_B3, 0x026104, 0x04, BIT_ACTIVE_0 }, { KB_DEF_P2_START, MSG_P2_START, 0x026106, 0x08, BIT_ACTIVE_0 }, { KB_DEF_P2_UP, MSG_P2_UP, 0x02610E, 0x10, BIT_ACTIVE_0 }, { KB_DEF_P2_DOWN, MSG_P2_DOWN, 0x02610E, 0x20, BIT_ACTIVE_0 }, { KB_DEF_P2_LEFT, MSG_P2_LEFT, 0x02610E, 0x40, BIT_ACTIVE_0 }, { KB_DEF_P2_RIGHT, MSG_P2_RIGHT, 0x02610E, 0x80, BIT_ACTIVE_0 }, { KB_DEF_P2_B1, MSG_P2_B1, 0x026104, 0x08, BIT_ACTIVE_0 }, { KB_DEF_P2_B2, MSG_P2_B2, 0x026104, 0x10, BIT_ACTIVE_0 }, { KB_DEF_P2_B3, MSG_P2_B3, 0x026104, 0x20, BIT_ACTIVE_0 }, { KB_DEF_P3_START, MSG_P3_START, 0x026200, 0x80, BIT_ACTIVE_0 }, { KB_DEF_P3_UP, MSG_P3_UP, 0x026200, 0x01, BIT_ACTIVE_0 }, { KB_DEF_P3_DOWN, MSG_P3_DOWN, 0x026200, 0x02, BIT_ACTIVE_0 }, { KB_DEF_P3_LEFT, MSG_P3_LEFT, 0x026200, 0x04, BIT_ACTIVE_0 }, { KB_DEF_P3_RIGHT, MSG_P3_RIGHT, 0x026200, 0x08, BIT_ACTIVE_0 }, { KB_DEF_P3_B1, MSG_P3_B1, 0x026200, 0x10, BIT_ACTIVE_0 }, { KB_DEF_P3_B2, MSG_P3_B2, 0x026200, 0x20, BIT_ACTIVE_0 }, { KB_DEF_P3_B3, MSG_P3_B3, 0x026200, 0x40, BIT_ACTIVE_0 }, { KB_DEF_P4_START, MSG_P4_START, 0x026201, 0x80, BIT_ACTIVE_0 }, { KB_DEF_P4_UP, MSG_P4_UP, 0x026201, 0x01, BIT_ACTIVE_0 }, { KB_DEF_P4_DOWN, MSG_P4_DOWN, 0x026201, 0x02, BIT_ACTIVE_0 }, { KB_DEF_P4_LEFT, MSG_P4_LEFT, 0x026201, 0x04, BIT_ACTIVE_0 }, { KB_DEF_P4_RIGHT, MSG_P4_RIGHT, 0x026201, 0x08, BIT_ACTIVE_0 }, { KB_DEF_P4_B1, MSG_P4_B1, 0x026201, 0x10, BIT_ACTIVE_0 }, { KB_DEF_P4_B2, MSG_P4_B2, 0x026201, 0x20, BIT_ACTIVE_0 }, { KB_DEF_P4_B3, MSG_P4_B3, 0x026201, 0x40, BIT_ACTIVE_0 }, { 0, NULL, 0, 0, 0 },};static struct DSW_DATA dsw_data_hit_the_ice_0[] ={ { "Max Players", 0x01, 0x02 }, { "4", 0x01, 0x00 }, { "2", 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_COINAGE, 0x70, 0x08 }, { MSG_1COIN_1PLAY, 0x70, 0x00 }, { MSG_2COIN_1PLAY, 0x60, 0x00 }, { MSG_3COIN_1PLAY, 0x50, 0x00 }, { MSG_1COIN_3PLAY, 0x40, 0x00 }, { MSG_1COIN_2PLAY, 0x30, 0x00 }, { MSG_1COIN_5PLAY, 0x20, 0x00 }, { MSG_1COIN_4PLAY, 0x10, 0x00 }, { MSG_1COIN_6PLAY, 0x00, 0x00 }, { MSG_DSWA_BIT8, 0x80, 0x02 }, { MSG_OFF, 0x80, 0x00 }, { MSG_ON, 0x00, 0x00 }, { NULL, 0, 0, },};static struct DSW_INFO hit_the_ice_dsw[] ={ { 0x026100, 0xFF, dsw_data_hit_the_ice_0 }, { 0x026102, 0xFF, dsw_data_default_1 }, { 0, 0, NULL, },};static struct ROMSW_DATA romsw_data_hit_the_ice_0[] ={ { "Taito", 0x01 }, { "Williams Electronics", 0x02 }, { "Taito Japan", 0x03 }, { NULL, 0 },};static struct ROMSW_INFO hit_the_ice_romsw[] ={ { 0x05FFFF, 0x02, romsw_data_hit_the_ice_0 }, { 0, 0, NULL },};struct GAME_MAIN game_hit_the_ice ={ hit_the_ice_dirs, hit_the_ice_roms, hit_the_ice_inputs, hit_the_ice_dsw, hit_the_ice_romsw, LoadHitTheIce, ClearHitTheIce, &b_system_r180_video, ExecuteHitTheIceFrame, "hitice", "Hit the Ice", "僸僢僩僕傾僀僗", COMPANY_ID_WILLIAMS, "C59", 1990, taito_ym2203_m6295_sound, GAME_SPORTS,};/*Todo:- Pixel Layer (not the B-System one, this one is larger and scrollable).- BG2 (FG0) is scrolled (8 pixels too high in test hatch).*/static UINT8 *RAM_INPUT;static UINT8 *RAM_VIDEO;static UINT8 *RAM_COLOUR;static UINT8 *GFX_BG0;static UINT8 *GFX_BG0_SOLID;static UINT8 *GFX_BG2;static UINT8 *GFX_BG2_SOLID;void LoadHitTheIce(void){ int ta,tb,tc; RAMSize=0x38000+0x80000; if(!(ROM=AllocateMem(0x60000))) return; if(!(RAM=AllocateMem(RAMSize))) return; if(!(GFX=AllocateMem(0x240000))) return; GFX_BG0 = GFX+0x000000; GFX_BG2 = GFX+0x200000; if(!load_rom("c59-03.rom", RAM, 0x80000)) return; tb=0; for(ta=0;ta<0x80000;ta+=2){ tc=RAM[ta+0]; GFX[tb+0]=((tc&0x80)>>7)<<3; GFX[tb+1]=((tc&0x40)>>6)<<3; GFX[tb+2]=((tc&0x20)>>5)<<3; GFX[tb+3]=((tc&0x10)>>4)<<3; GFX[tb+4]=((tc&0x08)>>3)<<3; GFX[tb+5]=((tc&0x04)>>2)<<3; GFX[tb+6]=((tc&0x02)>>1)<<3; GFX[tb+7]=((tc&0x01)>>0)<<3; tc=RAM[ta+1]; GFX[tb+0]|=((tc&0x80)>>7)<<2; GFX[tb+1]|=((tc&0x40)>>6)<<2; GFX[tb+2]|=((tc&0x20)>>5)<<2; GFX[tb+3]|=((tc&0x10)>>4)<<2; GFX[tb+4]|=((tc&0x08)>>3)<<2; GFX[tb+5]|=((tc&0x04)>>2)<<2; GFX[tb+6]|=((tc&0x02)>>1)<<2; GFX[tb+7]|=((tc&0x01)>>0)<<2; tb+=16; if((tb&0x7F)==0){tb-=0x78;} else{if((tb&0x7F)==8){tb-=8;}} } for(ta=0;ta<0x10000;ta+=2){ tc=RAM[ta+0]; GFX[tb+0]=((tc&0x80)>>7)<<3; GFX[tb+1]=((tc&0x40)>>6)<<3; GFX[tb+2]=((tc&0x20)>>5)<<3; GFX[tb+3]=((tc&0x10)>>4)<<3; GFX[tb+4]=((tc&0x08)>>3)<<3; GFX[tb+5]=((tc&0x04)>>2)<<3; GFX[tb+6]=((tc&0x02)>>1)<<3; GFX[tb+7]=((tc&0x01)>>0)<<3;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -