?? toaplan2.c
字號:
/******************************************************************************//* *//* TOAPLAN 68000 SYSTEM#2 *//* ---------------------- *//* CPU: 68000 (Z80) *//* SOUND: YM2151 M6295 (YM3812) *//* VIDEO: 320x240 TOAPLAN CUSTOM <3xBG0 1xSPR (1xFG0)> *//* *//******************************************************************************/#include "gameinc.h"#include "toaplan2.h"#include "fm.h"#include "2151intf.h"#include "3812intf.h"#include "decode.h"#include "debug.h"#include "sasound.h" // sample support routines#include "savegame.h"/************* FIX EIGHT *************/static struct DIR_INFO fix_eight_dirs[] ={ { "fix_eight", }, { "fixeight", }, { NULL, },};/* The bankswitch code is directly taken from mame. I am not familliar with this, and I have not much time right now... */static unsigned long PCMBanksize;static void raizing_oki6295_set_bankbase( int chip, int channel, int base ){ /* The OKI6295 ROM space is divided in four banks, each one indepentently controlled. The sample table at the beginning of the addressing space is divided in four pages as well, banked together with the sample data. */ unsigned char *rom = PCMROM + chip*PCMBanksize; /* copy the samples */ memcpy(rom + channel * 0x10000, rom + 0x40000 + base, 0x10000); /* and also copy the samples address table */ rom += channel * 0x100; memcpy(rom, rom + 0x40000 + base, 0x100); }static WRITE_HANDLER( raizing_okim6295_bankselect_0 ){ raizing_oki6295_set_bankbase( 0, 0, (data & 0x0f) * 0x10000); raizing_oki6295_set_bankbase( 0, 1, ((data >> 4) & 0x0f) * 0x10000);}static WRITE_HANDLER( raizing_okim6295_bankselect_1 ){ raizing_oki6295_set_bankbase( 0, 2, (data & 0x0f) * 0x10000); raizing_oki6295_set_bankbase( 0, 3, ((data >> 4) & 0x0f) * 0x10000);}static struct ROM_INFO fix_eight_roms[] ={ { "tp-026-1", 0x00080000, 0xf7b1746a, 0, 0, 0, }, { "tp-026-2", 0x00040000, 0x85063f1f, 0, 0, 0, }, { "tp-026-3", 0x00200000, 0xe5578d98, 0, 0, 0, }, { "tp-026-4", 0x00200000, 0xb760cb53, 0, 0, 0, }, { NULL, 0, 0, 0, 0, 0, },};static struct INPUT_INFO fix_eight_inputs[] ={ { KB_DEF_COIN1, MSG_COIN1, 0x01F010, 0x08, BIT_ACTIVE_1 }, { KB_DEF_COIN2, MSG_COIN2, 0x01F010, 0x10, BIT_ACTIVE_1 }, { KB_DEF_TILT, MSG_TILT, 0x01F010, 0x02, BIT_ACTIVE_1 }, { KB_DEF_SERVICE, MSG_SERVICE, 0x01F010, 0x01, BIT_ACTIVE_1 }, { KB_DEF_P1_START, MSG_P1_START, 0x01F010, 0x20, BIT_ACTIVE_1 }, { KB_DEF_P1_UP, MSG_P1_UP, 0x01F000, 0x01, BIT_ACTIVE_1 }, { KB_DEF_P1_DOWN, MSG_P1_DOWN, 0x01F000, 0x02, BIT_ACTIVE_1 }, { KB_DEF_P1_LEFT, MSG_P1_LEFT, 0x01F000, 0x04, BIT_ACTIVE_1 }, { KB_DEF_P1_RIGHT, MSG_P1_RIGHT, 0x01F000, 0x08, BIT_ACTIVE_1 }, { KB_DEF_P1_B1, MSG_P1_B1, 0x01F000, 0x10, BIT_ACTIVE_1 }, { KB_DEF_P1_B2, MSG_P1_B2, 0x01F000, 0x20, BIT_ACTIVE_1 }, { KB_DEF_P2_START, MSG_P2_START, 0x01F010, 0x40, BIT_ACTIVE_1 }, { KB_DEF_P2_UP, MSG_P2_UP, 0x01F004, 0x01, BIT_ACTIVE_1 }, { KB_DEF_P2_DOWN, MSG_P2_DOWN, 0x01F004, 0x02, BIT_ACTIVE_1 }, { KB_DEF_P2_LEFT, MSG_P2_LEFT, 0x01F004, 0x04, BIT_ACTIVE_1 }, { KB_DEF_P2_RIGHT, MSG_P2_RIGHT, 0x01F004, 0x08, BIT_ACTIVE_1 }, { KB_DEF_P2_B1, MSG_P2_B1, 0x01F004, 0x10, BIT_ACTIVE_1 }, { KB_DEF_P2_B2, MSG_P2_B2, 0x01F004, 0x20, BIT_ACTIVE_1 }, { KB_DEF_P3_START, MSG_P3_START, 0x01F008, 0x40, BIT_ACTIVE_1 }, { KB_DEF_P3_UP, MSG_P3_UP, 0x01F008, 0x01, BIT_ACTIVE_1 }, { KB_DEF_P3_DOWN, MSG_P3_DOWN, 0x01F008, 0x02, BIT_ACTIVE_1 }, { KB_DEF_P3_LEFT, MSG_P3_LEFT, 0x01F008, 0x04, BIT_ACTIVE_1 }, { KB_DEF_P3_RIGHT, MSG_P3_RIGHT, 0x01F008, 0x08, BIT_ACTIVE_1 }, { KB_DEF_P3_B1, MSG_P3_B1, 0x01F008, 0x10, BIT_ACTIVE_1 }, { KB_DEF_P3_B2, MSG_P3_B2, 0x01F008, 0x20, BIT_ACTIVE_1 }, { 0, NULL, 0, 0, 0 },};static struct DSW_DATA dsw_data_fix_eight_0[] ={ { "Max Players", 0x01, 0x02 }, { "2", 0x00, 0x00 }, { "3", 0x01, 0x00 }, { MSG_SCREEN, 0x02, 0x02 }, { MSG_NORMAL, 0x00, 0x00 }, { MSG_INVERT, 0x02, 0x00 }, { "Shooting Style", 0x04, 0x02 }, { "Fully-auto", 0x00, 0x00 }, { "Semi-auto", 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_2COIN_1PLAY, 0x10, 0x00 }, { MSG_3COIN_1PLAY, 0x20, 0x00 }, { MSG_4COIN_1PLAY, 0x30, 0x00 }, { MSG_COIN2, 0xC0, 0x04 }, { MSG_1COIN_2PLAY, 0x00, 0x00 }, { MSG_1COIN_3PLAY, 0x40, 0x00 }, { MSG_1COIN_4PLAY, 0x80, 0x00 }, { MSG_1COIN_6PLAY, 0xC0, 0x00 }, { NULL, 0, 0, },};static struct DSW_DATA dsw_data_fix_eight_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 }, { "500k and every 500k", 0x00, 0x00 }, { "300k and every 300k", 0x04, 0x00 }, { "300k only", 0x08, 0x00 }, { "None", 0x0C, 0x00 }, { MSG_LIVES, 0x30, 0x04 }, { "2", 0x00, 0x00 }, { "4", 0x10, 0x00 }, { "1", 0x20, 0x00 }, { "3", 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_fix_eight_2[] ={ { "Territory", 0x0F, 0x10 }, { "Europe", 0x09, 0x00 }, { "Korea (Taito)", 0x00, 0x00 }, { "Korea", 0x01, 0x00 }, { "Hong Kong (Taito)", 0x02, 0x00 }, { "Hong Kong", 0x03, 0x00 }, { "Taiwan (Taito)", 0x04, 0x00 }, { "Taiwan", 0x05, 0x00 }, { "Asia (Taito)", 0x06, 0x00 }, { "Asia", 0x07, 0x00 }, { "Europe (Taito)", 0x08, 0x00 }, { "USA (Taito America)", 0x0A, 0x00 }, { "USA", 0x0B, 0x00 }, { "Japan", 0x0E, 0x00 }, { "Japan (Taito)", 0x0F, 0x00 }, { NULL, 0, 0, },};static struct DSW_INFO fix_eight_dsw[] ={ { 0x01F08C, 0x00, dsw_data_fix_eight_0 }, { 0x01F090, 0x00, dsw_data_fix_eight_1 }, { 0x01F094, 0x00, dsw_data_fix_eight_2 }, { 0, 0, NULL, },};static struct VIDEO_INFO toaplan2_r270_video ={ DrawToaplan2, 320, 240, 32, VIDEO_ROTATE_270 | VIDEO_ROTATABLE,};static struct YM2151interface ym2151_interface ={ 1, // 1 chip 3580000, // dogyuun says 3.58MHz... { YM3012_VOL(160,OSD_PAN_LEFT,160,OSD_PAN_RIGHT) }, { NULL }, { NULL },};static struct OKIM6295interface m6295_interface ={ 1, // 1 chip { 27000000/10/132 }, // guessed { 0 }, // rom list { 220 },};static struct SOUND_INFO toaplan2_sound[] ={ { SOUND_YM2151S, &ym2151_interface, }, { SOUND_M6295, &m6295_interface, }, { 0, NULL, },};struct GAME_MAIN game_fix_eight ={ fix_eight_dirs, fix_eight_roms, fix_eight_inputs, fix_eight_dsw, NULL, LoadFixEight, clear_toaplan_2, &toaplan2_r270_video, ExecuteToaplan2Frame, "fixeight", "Fix Eight", NULL, COMPANY_ID_TOAPLAN, "TP026", 1992, NULL, GAME_SHOOT | GAME_PARTIALLY_WORKING,};/*************** KNUCLE BASH ***************/static struct DIR_INFO knuckle_bash_dirs[] ={ { "knuckle_bash", }, { "kbash", }, { NULL, },};static struct ROM_INFO knuckle_bash_roms[] ={ { "kbash01.bin", 0x00080000, 0x2965f81d, 0, 0, 0, }, { "kbash02.bin", 0x00008000, 0x4cd882a1, 0, 0, 0, }, { "kbash03.bin", 0x00200000, 0x32ad508b, 0, 0, 0, }, { "kbash04.bin", 0x00200000, 0xe493c077, 0, 0, 0, }, { "kbash05.bin", 0x00200000, 0xb84c90eb, 0, 0, 0, }, { "kbash06.bin", 0x00200000, 0x9084b50a, 0, 0, 0, }, { "kbash07.bin", 0x00040000, 0x3732318f, 0, 0, 0, }, { NULL, 0, 0, 0, 0, 0, },};static struct INPUT_INFO knuckle_bash_inputs[] ={ { KB_DEF_COIN1, MSG_COIN1, 0x01F018, 0x08, BIT_ACTIVE_1 }, { KB_DEF_COIN2, MSG_COIN2, 0x01F018, 0x10, BIT_ACTIVE_1 }, { KB_DEF_TILT, MSG_TILT, 0x01F018, 0x02, BIT_ACTIVE_1 }, { KB_DEF_SERVICE, MSG_SERVICE, 0x01F018, 0x01, BIT_ACTIVE_1 }, { KB_DEF_P1_START, MSG_P1_START, 0x01F018, 0x20, BIT_ACTIVE_1 }, { KB_DEF_P1_UP, MSG_P1_UP, 0x01F010, 0x01, BIT_ACTIVE_1 }, { KB_DEF_P1_DOWN, MSG_P1_DOWN, 0x01F010, 0x02, BIT_ACTIVE_1 }, { KB_DEF_P1_LEFT, MSG_P1_LEFT, 0x01F010, 0x04, BIT_ACTIVE_1 }, { KB_DEF_P1_RIGHT, MSG_P1_RIGHT, 0x01F010, 0x08, BIT_ACTIVE_1 }, { 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_knuckle_bash_0[] ={ { "Discount", 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_knuckle_bash_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 }, { "100k and every 400k", 0x00, 0x00 }, { "100k only", 0x04, 0x00 }, { "200k only", 0x08, 0x00 }, { "None", 0x0C, 0x00 }, { MSG_LIVES, 0x30, 0x04 }, { "2", 0x00, 0x00 }, { "4", 0x10, 0x00 }, { "1", 0x20, 0x00 }, { "3", 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_knuckle_bash_2[] ={ { "Territory", 0x0F, 0x10 }, { "Japan", 0x00, 0x00 }, { "USA, Europe (Atari)", 0x01, 0x00 }, { "Europe, USA (Atari)", 0x02, 0x00 }, { "Korea", 0x03, 0x00 }, { "Hong Kong", 0x04, 0x00 }, { "South East Asia", 0x06, 0x00 }, { "Taiwan", 0x07, 0x00 }, { "USA", 0x09, 0x00 }, { "Europe", 0x0A, 0x00 }, { NULL, 0, 0, },};static struct DSW_INFO knuckle_bash_dsw[] ={ { 0x01F004, 0x00, dsw_data_knuckle_bash_0 }, { 0x01F006, 0x00, dsw_data_knuckle_bash_1 }, { 0x01F008, 0x00, dsw_data_knuckle_bash_2 }, { 0, 0, NULL, },};static struct VIDEO_INFO toaplan2_video =
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -