?? toaplan1.c
字號:
/******************************************************************************//* *//* TOAPLAN 68000 SYSTEM#1 *//* ---------------------- *//* CPU: 68000 Z80 <PROTECTED> *//* SOUND: YM3812 *//* VIDEO: 320x240 TOAPLAN CUSTOM <4xBG0 1xSPR> *//* *//******************************************************************************/#include "gameinc.h"#include "toaplan1.h"#include "3812intf.h"#include "debug.h"#include "sasound.h" // sample support routinesstatic struct DIR_INFO vimana_dirs[] ={ { "vimana", }, { NULL, },};static struct ROM_INFO vimana_roms[] ={ { "vim07.bin", 0x00020000, 0x1efaea84, REGION_ROM1, 0x000000, LOAD_8_16, }, { "vim08.bin", 0x00020000, 0xe45b7def, REGION_ROM1, 0x000001, LOAD_8_16, }, { "vim6.bin", 0x00020000, 0x2886878d, REGION_GFX1, 0x000000, LOAD_NORMAL, }, { "vim5.bin", 0x00020000, 0x61a63d7a, REGION_GFX1, 0x020000, LOAD_NORMAL, }, { "vim4.bin", 0x00020000, 0xb0515768, REGION_GFX1, 0x040000, LOAD_NORMAL, }, { "vim3.bin", 0x00020000, 0x0b539131, REGION_GFX1, 0x060000, LOAD_NORMAL, }, { "vim1.bin", 0x00080000, 0xcdde26cd, REGION_GFX2, 0x000000, LOAD_NORMAL, }, { "vim2.bin", 0x00080000, 0x1dbfc118, REGION_GFX2, 0x080000, LOAD_NORMAL, }, { NULL, 0, 0, 0, 0, 0, },};static struct INPUT_INFO vimana_inputs[] ={ { KB_DEF_COIN1, MSG_COIN1, 0x023003, 0x08, BIT_ACTIVE_1 }, { KB_DEF_COIN2, MSG_COIN2, 0x023003, 0x10, BIT_ACTIVE_1 }, { KB_DEF_TILT, MSG_TILT, 0x023003, 0x02, BIT_ACTIVE_1 }, { KB_DEF_SERVICE, MSG_SERVICE, 0x023003, 0x01, BIT_ACTIVE_1 }, { KB_DEF_P1_START, MSG_P1_START, 0x023003, 0x20, BIT_ACTIVE_1 }, { KB_DEF_P1_UP, MSG_P1_UP, 0x023004, 0x01, BIT_ACTIVE_1 }, { KB_DEF_P1_DOWN, MSG_P1_DOWN, 0x023004, 0x02, BIT_ACTIVE_1 }, { KB_DEF_P1_LEFT, MSG_P1_LEFT, 0x023004, 0x04, BIT_ACTIVE_1 }, { KB_DEF_P1_RIGHT, MSG_P1_RIGHT, 0x023004, 0x08, BIT_ACTIVE_1 }, { KB_DEF_P1_B1, MSG_P1_B1, 0x023004, 0x10, BIT_ACTIVE_1 }, { KB_DEF_P1_B2, MSG_P1_B2, 0x023004, 0x20, BIT_ACTIVE_1 }, { KB_DEF_P2_START, MSG_P2_START, 0x023003, 0x40, BIT_ACTIVE_1 }, { KB_DEF_P2_UP, MSG_P2_UP, 0x023005, 0x01, BIT_ACTIVE_1 }, { KB_DEF_P2_DOWN, MSG_P2_DOWN, 0x023005, 0x02, BIT_ACTIVE_1 }, { KB_DEF_P2_LEFT, MSG_P2_LEFT, 0x023005, 0x04, BIT_ACTIVE_1 }, { KB_DEF_P2_RIGHT, MSG_P2_RIGHT, 0x023005, 0x08, BIT_ACTIVE_1 }, { KB_DEF_P2_B1, MSG_P2_B1, 0x023005, 0x10, BIT_ACTIVE_1 }, { KB_DEF_P2_B2, MSG_P2_B2, 0x023005, 0x20, BIT_ACTIVE_1 }, { 0, NULL, 0, 0, 0 },};static struct DSW_DATA dsw_data_rally_bike_0[] ={ { MSG_CABINET, 0x01, 0x02 }, { MSG_UPRIGHT, 0x00, 0x00 }, { MSG_TABLE, 0x01, 0x00 }, { MSG_SCREEN, 0x00, 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_rally_bike_1[] ={ { MSG_DIFFICULTY, 0x00, 0x04 }, { MSG_NORMAL, 0x00, 0x00 }, { MSG_EASY, 0x01, 0x00 }, { MSG_HARD, 0x02, 0x00 }, { MSG_HARDEST, 0x03, 0x00 }, { "Unknown", 0x04, 0x02 }, { MSG_OFF, 0x00, 0x00 }, { MSG_ON, 0x04, 0x00 }, { "Unknown", 0x04, 0x02 }, { MSG_OFF, 0x00, 0x00 }, { MSG_ON, 0x04, 0x00 }, { "Territory/Copyright", 0x20, 0x04 }, { "World/Taito Corp Japan",0x20, 0x00 }, { "USA/Taito America", 0x10, 0x00 }, { "Japan/Taito Corp", 0x00, 0x00 }, { "USA/Taito America (Romstar)", 0x30, 0x00 }, { "Dipsw display", 0x00, 0x02 }, { MSG_OFF, 0x00, 0x00 }, { MSG_ON, 0x40, 0x00 }, { "Continue", 0x80, 0x02 }, { MSG_ON, 0x00, 0x00 }, { MSG_OFF, 0x80, 0x00 }, { NULL, 0, 0, },};static struct DSW_DATA dsw_data_hellfire_0[] ={ { MSG_UNUSED, 0x01, 0x02 }, { MSG_OFF, 0x00, 0x00 }, { MSG_ON, 0x01, 0x00 }, { MSG_SCREEN, 0x00, 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_truxton_1[] ={ { MSG_DIFFICULTY, 0x03, 0x04 }, { MSG_NORMAL, 0x00, 0x00 }, { MSG_EASY, 0x01, 0x00 }, { MSG_HARD, 0x02, 0x00 }, { MSG_HARDEST, 0x03, 0x00 }, { "Extra Life", 0x00, 0x04 }, { "50K, every 150K", 0x04, 0x00 }, { "70K, every 200K", 0x00, 0x00 }, { "100K only", 0x08, 0x00 }, { "none", 0x0C, 0x00 }, { "Lives", 0x00, 0x04 }, { "2", 0x30, 0x00 }, { "3", 0x00, 0x00 }, { "4", 0x20, 0x00 }, { "5", 0x10, 0x00 }, { "Dipsw display", 0x00, 0x02 }, { MSG_OFF, 0x00, 0x00 }, { MSG_ON, 0x40, 0x00 }, { "Continue", 0x80, 0x02 }, { MSG_ON, 0x00, 0x00 }, { MSG_OFF, 0x80, 0x00 }, { NULL, 0, 0, },};static struct DSW_DATA dsw_data_hellfire_1[] ={ { MSG_DIFFICULTY, 0x03, 0x04 }, { MSG_NORMAL, 0x00, 0x00 }, { MSG_EASY, 0x01, 0x00 }, { MSG_HARD, 0x02, 0x00 }, { MSG_HARDEST, 0x03, 0x00 }, { "Extra Life", 0x00, 0x04 }, { "70K, every 200K", 0x00, 0x00 }, { "50K, every 250K", 0x04, 0x00 }, { "100K only", 0x08, 0x00 }, { "200k only", 0x0C, 0x00 }, { "Lives", 0x00, 0x04 }, { "2", 0x30, 0x00 }, { "3", 0x00, 0x00 }, { "4", 0x20, 0x00 }, { "5", 0x10, 0x00 }, { "Invulnerability", 0x00, 0x02 }, { MSG_OFF, 0x00, 0x00 }, { MSG_ON, 0x40, 0x00 }, { MSG_UNUSED, 0x80, 0x02 }, { MSG_ON, 0x00, 0x00 }, { MSG_OFF, 0x80, 0x00 }, { NULL, 0, 0, },};static struct DSW_DATA dsw_data_fire_shark_1[] ={ { MSG_DIFFICULTY, 0x03, 0x04 }, { MSG_NORMAL, 0x00, 0x00 }, { MSG_EASY, 0x01, 0x00 }, { MSG_HARD, 0x02, 0x00 }, { MSG_HARDEST, 0x03, 0x00 }, { "Extra Life", 0x00, 0x04 }, { "70K, every 150K", 0x00, 0x00 }, { "50K, every 200K", 0x04, 0x00 }, { "100K only", 0x08, 0x00 }, { "None", 0x0C, 0x00 }, { "Lives", 0x00, 0x04 }, { "2", 0x30, 0x00 }, { "3", 0x00, 0x00 }, { "4", 0x20, 0x00 }, { "5", 0x10, 0x00 }, { "Invulnerability", 0x00, 0x02 }, { MSG_OFF, 0x00, 0x00 }, { MSG_ON, 0x40, 0x00 }, { MSG_UNUSED, 0x80, 0x02 }, { MSG_ON, 0x00, 0x00 }, { MSG_OFF, 0x80, 0x00 }, { NULL, 0, 0, },};static struct DSW_DATA dsw_data_vimana_2[] ={ { "Language", 0x0F, 0x10 }, { "0", 0x00, 0x00 }, { "1", 0x01, 0x00 }, { "2", 0x02, 0x00 }, { "3", 0x03, 0x00 }, { "4", 0x04, 0x00 }, { "5", 0x05, 0x00 }, { "6", 0x06, 0x00 }, { "7", 0x07, 0x00 }, { "8", 0x08, 0x00 }, { "9", 0x09, 0x00 }, { "A", 0x0A, 0x00 }, { "B", 0x0B, 0x00 }, { "C", 0x0C, 0x00 }, { "D", 0x0D, 0x00 }, { "E", 0x0E, 0x00 }, { "F", 0x0F, 0x00 }, { NULL, 0, 0, },};static struct DSW_INFO vimana_dsw[] ={ { 0x023000, 0x00, dsw_data_hellfire_0 }, { 0x023001, 0x00, dsw_data_default_1 }, { 0x023002, 0x00, dsw_data_vimana_2 }, { 0, 0, NULL, },};static struct GFX_LAYOUT tilelayout ={ 8,8, /* 8x8 */ 16384, /* 16384 tiles */ 4, /* 4 bits per pixel */ { 3*8*0x20000, 2*8*0x20000, 1*8*0x20000, 0*8*0x20000 }, { 0, 1, 2, 3, 4, 5, 6, 7 }, { 0, 0x08, 0x10, 0x18, 0x20, 0x28, 0x30, 0x38 }, 64};static struct GFX_LAYOUT rallybik_spr_layout ={ 16,16, /* 16*16 sprites */ 2048, /* 2048 sprites */ 4, /* 4 bits per pixel */ { 0*2048*32*8, 1*2048*32*8, 2*2048*32*8, 3*2048*32*8 }, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16, 8*16, 9*16, 10*16, 11*16, 12*16, 13*16, 14*16, 15*16 }, 32*8 /* every sprite takes 32 consecutive bytes */};static struct GFX_LAYOUT vm_tilelayout ={ 8,8, /* 8x8 */ 32768, /* 32768 tiles */ 4, /* 4 bits per pixel */ { 8*0x80000+8, 8*0x80000, 8, 0 }, { 0, 1, 2, 3, 4, 5, 6, 7 }, { 0, 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70 }, 128};static struct GFX_LIST toaplan1_gfx[] ={ { REGION_GFX1, &tilelayout, }, { REGION_GFX2, &tilelayout, }, { 0, NULL, },};static struct GFX_LIST rally_bike_gfx[] ={ { REGION_GFX1, &tilelayout, }, { REGION_GFX2, &rallybik_spr_layout, }, { 0, NULL, },};static struct GFX_LIST outzone_gfx[] ={ { REGION_GFX1, &vm_tilelayout, }, { REGION_GFX2, &tilelayout, }, { 0, NULL, },};static struct GFX_LIST vimana_gfx[] ={ { REGION_GFX1, &tilelayout, }, { REGION_GFX2, &vm_tilelayout, }, { 0, NULL, },};static struct VIDEO_INFO toaplan1_video ={ DrawToaplan1, 320, 240, 32, VIDEO_ROTATE_NORMAL | VIDEO_ROTATABLE, toaplan1_gfx,};static struct VIDEO_INFO toaplan1_r270_video ={ DrawToaplan1, 320, 240, 32, VIDEO_ROTATE_270 | VIDEO_ROTATABLE, toaplan1_gfx,};static struct VIDEO_INFO rally_bike_video ={ DrawToaplan1, 320, 240, 32, VIDEO_ROTATE_270 | VIDEO_ROTATABLE, rally_bike_gfx,};static struct VIDEO_INFO outzone_video ={ DrawToaplan1, 320, 240, 32, VIDEO_ROTATE_270 | VIDEO_ROTATABLE, outzone_gfx,};static struct VIDEO_INFO vimana_video ={ DrawToaplan1, 320, 240, 32, VIDEO_ROTATE_270 | VIDEO_ROTATABLE, vimana_gfx,};static struct YM3812interface ym3812_interface ={ 1, // 1 chip 3600000, // 3.6 MHz (3.5?) { 255 }, // volume { NULL }};static struct SOUND_INFO toaplan1_sound[] ={ { SOUND_YM3812, &ym3812_interface, }, { 0, NULL, },};struct GAME_MAIN game_vimana ={ vimana_dirs, vimana_roms, vimana_inputs, vimana_dsw, NULL, load_vimana, clear_vimana, &vimana_video, ExecuteToaplan1Frame, "vimana", "Vimana", NULL, COMPANY_ID_TOAPLAN, "TP019", 1991, NULL, GAME_SHOOT,};static struct DIR_INFO vimana_alt_dirs[] ={ { "vimana2", }, { ROMOF("vimana"), }, { CLONEOF("vimana"), }, { NULL, },};static struct ROM_INFO vimana_alt_roms[] ={ { "vimana07.bin", 0x00020000, 0x5a4bf73e, REGION_ROM1, 0x000000, LOAD_8_16, }, { "vimana08.bin", 0x00020000, 0x03ba27e8, REGION_ROM1, 0x000001, LOAD_8_16, }, { "vim6.bin", 0x00020000, 0x2886878d, REGION_GFX1, 0x000000, LOAD_NORMAL, }, { "vim5.bin", 0x00020000, 0x61a63d7a, REGION_GFX1, 0x020000, LOAD_NORMAL, }, { "vim4.bin", 0x00020000, 0xb0515768, REGION_GFX1, 0x040000, LOAD_NORMAL, }, { "vim3.bin", 0x00020000, 0x0b539131, REGION_GFX1, 0x060000, LOAD_NORMAL, }, { "vim1.bin", 0x00080000, 0xcdde26cd, REGION_GFX2, 0x000000, LOAD_NORMAL, }, { "vim2.bin", 0x00080000, 0x1dbfc118, REGION_GFX2, 0x080000, LOAD_NORMAL, }, { NULL, 0, 0, 0, 0, 0, },};
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -