📄 deadconx.c
字号:
/****************************************************************************** * * * DEAD CONNECTION (C) 1991 TAITO CORPORATION * * * ****************************************************************************** Dead Connection Japan removed becuase the only difference in the roms were the Taito Region byte. This byte is set with the ROM Version routine so this set becomes redundant and null if you use it and set the ROM version to something else*/#include "gameinc.h"#include "deadconx.h"#include "tc006vcu.h"#include "tc200obj.h"#include "f3system.h"#include "taitosnd.h"#include "debug.h"#include "sasound.h" // sample support routinesstatic struct DIR_INFO dead_connection_dirs[] ={ { "dead_connection", }, { "deadconx", }, { NULL, },};static struct ROM_INFO dead_connection_roms[] ={ { "d28-01.rom", 0x00100000, 0x181d7b69, 0, 0, 0, }, { "d28-02.rom", 0x00100000, 0xd301771c, 0, 0, 0, }, { "d28-03.rom", 0x00100000, 0xa1804b52, 0, 0, 0, }, { "d28-04.rom", 0x00080000, 0xdcabc26b, 0, 0, 0, }, { "d28-05.rom", 0x00080000, 0x862f9665, 0, 0, 0, }, { "d28-06.rom", 0x00040000, 0x5b4bff51, 0, 0, 0, }, { "d28-08.rom", 0x00040000, 0x4c872bd9, 0, 0, 0, }, { "d28-09.rom", 0x00040000, 0x143a0cc1, 0, 0, 0, }, { "d28-10.rom", 0x00010000, 0x40805d74, 0, 0, 0, }, { "d28-12.rom", 0x00040000, 0x9b74e631, 0, 0, 0, }, { NULL, 0, 0, 0, 0, 0, },};static struct INPUT_INFO dead_connection_inputs[] ={ { KB_DEF_COIN1, MSG_COIN1, 0x034104, 0x01, BIT_ACTIVE_0 }, { KB_DEF_COIN2, MSG_COIN2, 0x034104, 0x02, BIT_ACTIVE_0 }, { KB_DEF_COIN3, MSG_COIN3, 0x034104, 0x04, BIT_ACTIVE_0 }, { KB_DEF_COIN4, MSG_COIN4, 0x034104, 0x08, BIT_ACTIVE_0 }, { KB_DEF_TILT, MSG_TILT, 0x034104, 0x80, BIT_ACTIVE_0 }, { KB_DEF_SERVICE, MSG_SERVICE, 0x034104, 0x70, BIT_ACTIVE_0 }, { KB_DEF_P1_START, MSG_P1_START, 0x03410A, 0x80, BIT_ACTIVE_0 }, { KB_DEF_P1_UP, MSG_P1_UP, 0x03410A, 0x01, BIT_ACTIVE_0 }, { KB_DEF_P1_DOWN, MSG_P1_DOWN, 0x03410A, 0x02, BIT_ACTIVE_0 }, { KB_DEF_P1_LEFT, MSG_P1_LEFT, 0x03410A, 0x04, BIT_ACTIVE_0 }, { KB_DEF_P1_RIGHT, MSG_P1_RIGHT, 0x03410A, 0x08, BIT_ACTIVE_0 }, { KB_DEF_P1_B1, MSG_P1_B1, 0x03410A, 0x10, BIT_ACTIVE_0 }, { KB_DEF_P1_B2, MSG_P1_B2, 0x03410A, 0x20, BIT_ACTIVE_0 }, { KB_DEF_P2_START, MSG_P2_START, 0x03410C, 0x80, BIT_ACTIVE_0 }, { KB_DEF_P2_UP, MSG_P2_UP, 0x03410C, 0x01, BIT_ACTIVE_0 }, { KB_DEF_P2_DOWN, MSG_P2_DOWN, 0x03410C, 0x02, BIT_ACTIVE_0 }, { KB_DEF_P2_LEFT, MSG_P2_LEFT, 0x03410C, 0x04, BIT_ACTIVE_0 }, { KB_DEF_P2_RIGHT, MSG_P2_RIGHT, 0x03410C, 0x08, BIT_ACTIVE_0 }, { KB_DEF_P2_B1, MSG_P2_B1, 0x03410C, 0x10, BIT_ACTIVE_0 }, { KB_DEF_P2_B2, MSG_P2_B2, 0x03410C, 0x20, BIT_ACTIVE_0 }, { KB_DEF_P3_START, MSG_P3_START, 0x03410E, 0x80, BIT_ACTIVE_0 }, { KB_DEF_P3_UP, MSG_P3_UP, 0x03410E, 0x01, BIT_ACTIVE_0 }, { KB_DEF_P3_DOWN, MSG_P3_DOWN, 0x03410E, 0x02, BIT_ACTIVE_0 }, { KB_DEF_P3_LEFT, MSG_P3_LEFT, 0x03410E, 0x04, BIT_ACTIVE_0 }, { KB_DEF_P3_RIGHT, MSG_P3_RIGHT, 0x03410E, 0x08, BIT_ACTIVE_0 }, { KB_DEF_P3_B1, MSG_P3_B1, 0x03410E, 0x10, BIT_ACTIVE_0 }, { KB_DEF_P3_B2, MSG_P3_B2, 0x03410E, 0x20, BIT_ACTIVE_0 }, { KB_DEF_P4_START, MSG_P4_START, 0x034110, 0x80, BIT_ACTIVE_0 }, { KB_DEF_P4_UP, MSG_P4_UP, 0x034110, 0x01, BIT_ACTIVE_0 }, { KB_DEF_P4_DOWN, MSG_P4_DOWN, 0x034110, 0x02, BIT_ACTIVE_0 }, { KB_DEF_P4_LEFT, MSG_P4_LEFT, 0x034110, 0x04, BIT_ACTIVE_0 }, { KB_DEF_P4_RIGHT, MSG_P4_RIGHT, 0x034110, 0x08, BIT_ACTIVE_0 }, { KB_DEF_P4_B1, MSG_P4_B1, 0x034110, 0x10, BIT_ACTIVE_0 }, { KB_DEF_P4_B2, MSG_P4_B2, 0x034110, 0x20, BIT_ACTIVE_0 }, { 0, NULL, 0, 0, 0 },};static struct DSW_DATA dsw_data_dead_connection_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_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_dead_connection_1[] ={ { MSG_DIFFICULTY, 0x03, 0x04 }, { MSG_NORMAL, 0x03, 0x00 }, { MSG_EASY, 0x02, 0x00 }, { MSG_HARD, 0x01, 0x00 }, { MSG_HARDEST, 0x00, 0x00 }, { MSG_DSWB_BIT3, 0x04, 0x02 }, { MSG_OFF, 0x04, 0x00 }, { MSG_ON, 0x00, 0x00 }, { "Damage", 0x18, 0x04 }, { MSG_NORMAL, 0x18, 0x00 }, { "Small", 0x10, 0x00 }, { "Big", 0x08, 0x00 }, { "Biggest", 0x00, 0x00 }, { MSG_DSWB_BIT6, 0x20, 0x02 }, { MSG_OFF, 0x20, 0x00 }, { MSG_ON, 0x00, 0x00 }, { MSG_DSWB_BIT7, 0x40, 0x02 }, { MSG_OFF, 0x40, 0x00 }, { MSG_ON, 0x00, 0x00 }, { "Game Type", 0x80, 0x02 }, { "1 Player", 0x80, 0x00 }, { "Multiplayer", 0x00, 0x00 }, { NULL, 0, 0, },};static struct DSW_INFO dead_connection_dsw[] ={ { 0x034100, 0xFF, dsw_data_dead_connection_0 }, { 0x034102, 0xFF, dsw_data_dead_connection_1 }, { 0, 0, NULL, },};static struct ROMSW_DATA romsw_data_dead_connection_0[] ={ { "Taito Japan (Japanese)", 0x01 }, { "Taito America", 0x02 }, { "Taito Japan", 0x03 }, { NULL, 0 },};static struct ROMSW_INFO dead_connection_romsw[] ={ { 0x07FFFF, 0x03, romsw_data_dead_connection_0 }, { 0, 0, NULL },};static struct VIDEO_INFO dead_connection_video ={ DrawDeadConnection, 320, 224, 48, VIDEO_ROTATE_NORMAL | VIDEO_ROTATABLE,};struct GAME_MAIN game_dead_connection ={ dead_connection_dirs, dead_connection_roms, dead_connection_inputs, dead_connection_dsw, dead_connection_romsw, LoadDeadConnection, ClearDeadConnection, &dead_connection_video, ExecuteDeadConnectionFrame, "deadconx", "Dead Connection", NULL, COMPANY_ID_TAITO, "D28", 1992, taito_ym2610_sound, GAME_SHOOT,};static UINT8 *RAM_BG0;static UINT8 *RAM_BG1;static UINT8 *RAM_BG2;static UINT8 *RAM_BG3;//static UINT8 *RAM_BG4;static UINT8 *RAM_SCR0;static UINT8 *RAM_SCR1;static UINT8 *RAM_SCR2;static UINT8 *RAM_SCR3;static UINT8 *RAM_SCR4;static UINT32 SCR0_XOFS;static UINT32 SCR1_XOFS;static UINT32 SCR2_XOFS;static UINT32 SCR3_XOFS;static UINT32 SCR4_XOFS;static UINT32 SCR0_YOFS;static UINT32 SCR1_YOFS;static UINT32 SCR2_YOFS;static UINT32 SCR3_YOFS;static UINT32 SCR4_YOFS;static UINT8 *GFX_BG0;static UINT8 *GFX_BG0_SOLID;static UINT8 *GFX_SPR;static UINT8 *GFX_SPR_SOLID;static int BadReadWord(UINT32 address){#ifdef RAINE_DEBUG print_debug("Rw(%06x) [%06x]\n",address,s68000context.pc);#endif return(0xFFFF);}static void BadWriteWord(UINT32 address, UINT16 data){ #ifdef RAINE_DEBUG if(address!=0x800000) print_debug("Ww(%06x,%04x) [%06x]\n",address,data,s68000context.pc); #endif}void LoadDeadConnection(void){ int ta,tb; UINT8 *TMP; if(!(GFX=AllocateMem(0x600000))) return; if(!(TMP=AllocateMem(0x100000))) return; // TEMP BUFFER GFX_BG0=GFX+0x000000; GFX_SPR=GFX+0x200000; tb=0; if(!load_rom_index(0, TMP, 0x100000)) return; // 16x16 SPRITES ($4000) for(ta=0;ta<0x100000;ta++,tb+=2){ GFX_SPR[tb+0]=TMP[ta]&15; GFX_SPR[tb+1]=TMP[ta]>>4; } if(!load_rom_index(1, TMP, 0x100000)) return; // 16x16 SPRITES for(ta=0;ta<0x100000;ta++,tb+=2){ GFX_SPR[tb+0]=TMP[ta]&15; GFX_SPR[tb+1]=TMP[ta]>>4; } tb=0; if(!load_rom_index(3, TMP, 0x80000)) return; // 16x16 TILES ($2000) for(ta=0;ta<0x80000;ta+=2,tb+=8){ GFX_BG0[tb+0]=TMP[ta]&15;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -