From 5b4f24aa0cdb811cf865f4648ef6d93c11ee87f3 Mon Sep 17 00:00:00 2001 From: nmlgc Date: Thu, 4 Jan 2024 02:56:00 +0100 Subject: [PATCH] [Decompilation] [th03/th04/th05] Music Room: Move titles and files to C land MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Featuring a return of the recently developed `$ -` tech, along with some unfortunate PI breaks窶ヲ But hey, at least it makes sense to start out with this move! Part of P0264, funded by [Anonymous] and Blue Bolt. --- th02/op/cmt_load.c | 3 + th02/op/m_music.cpp | 30 ++ th02/op/music.asm | 4 +- th02/op/music_cmt_load[data].asm | 2 - th02/op/polygons[data].asm | 1 - th02/op_01.cpp | 5 +- th02/op_06.cpp | 58 +--- th02/shiftjis/bgm.hpp | 22 ++ th02/shiftjis/fns.hpp | 2 + th02/shiftjis/music.hpp | 42 +++ th03/shiftjis/bgm.hpp | 23 ++ th03/shiftjis/fns.hpp | 1 + th03/shiftjis/music.hpp | 48 +++ th03_op.asm | 107 +----- th04/shiftjis/bgm.hpp | 26 ++ th04/shiftjis/music.hpp | 54 +++ th04_op.asm | 115 +------ th05/op/music_cmt_load.asm | 2 +- th05/shiftjis/bgm.hpp | 26 ++ th05/shiftjis/music.hpp | 277 +++++++++++++++ th05_op.asm | 571 ++----------------------------- 21 files changed, 626 insertions(+), 793 deletions(-) delete mode 100644 th02/op/music_cmt_load[data].asm delete mode 100644 th02/op/polygons[data].asm create mode 100644 th02/shiftjis/bgm.hpp create mode 100644 th02/shiftjis/music.hpp create mode 100644 th03/shiftjis/bgm.hpp create mode 100644 th03/shiftjis/fns.hpp create mode 100644 th03/shiftjis/music.hpp create mode 100644 th04/shiftjis/bgm.hpp create mode 100644 th04/shiftjis/music.hpp create mode 100644 th05/shiftjis/bgm.hpp create mode 100644 th05/shiftjis/music.hpp diff --git a/th02/op/cmt_load.c b/th02/op/cmt_load.c index 6c2cb3ba..612e1628 100644 --- a/th02/op/cmt_load.c +++ b/th02/op/cmt_load.c @@ -1,6 +1,9 @@ #define MUSIC_CMT_LEN MUSIC_CMT_LINE_COUNT * MUSIC_CMT_LINE_LEN char music_cmt[MUSIC_CMT_LINE_COUNT][MUSIC_CMT_LINE_LEN]; +#undef MUSIC_CMT_FN +#define MUSIC_CMT_FN (const char *)(MK_FP(_DS, 0x0C13)) + void pascal near music_cmt_load(int track) { int i; diff --git a/th02/op/m_music.cpp b/th02/op/m_music.cpp index e69de29b..21180d62 100644 --- a/th02/op/m_music.cpp +++ b/th02/op/m_music.cpp @@ -0,0 +1,30 @@ +#include "platform.h" +#include "shiftjis.hpp" +#if (GAME == 5) + #include "th05/shiftjis/music.hpp" + + int game_sel = (GAME_COUNT - 1); + extern const int TRACK_COUNT[GAME_COUNT] = { 14, 18, 24, 28, 23 }; +#else + #if (GAME == 4) + #include "th04/shiftjis/music.hpp" + #elif (GAME == 3) + #include "th03/shiftjis/music.hpp" + #elif (GAME == 2) + #include "th02/shiftjis/music.hpp" + #endif +#endif + +// Polygon state +// ------------- + +bool polygons_initialized = false; +// ------------- + +// Selection state +// --------------- + +#if (GAME <= 4) + uint8_t track_playing = 0; +#endif +// --------------- diff --git a/th02/op/music.asm b/th02/op/music.asm index 09d8361b..637419e6 100644 --- a/th02/op/music.asm +++ b/th02/op/music.asm @@ -170,7 +170,7 @@ polygons_update_and_render proc near push bp mov bp, sp push si - cmp polygons_initialized, 0 + cmp _polygons_initialized, 0 jnz loc_A752 xor si, si ; Hack (jmp loc_A746) @@ -233,7 +233,7 @@ loc_A745: loc_A746: cmp si, POLYGONS_RENDERED jl loc_A6B5 - mov polygons_initialized, 1 + mov _polygons_initialized, 1 loc_A752: xor si, si diff --git a/th02/op/music_cmt_load[data].asm b/th02/op/music_cmt_load[data].asm deleted file mode 100644 index 191e82e5..00000000 --- a/th02/op/music_cmt_load[data].asm +++ /dev/null @@ -1,2 +0,0 @@ -public _aMUSIC_TXT -_aMUSIC_TXT db 'MUSIC.TXT',0 diff --git a/th02/op/polygons[data].asm b/th02/op/polygons[data].asm deleted file mode 100644 index b9be5e5f..00000000 --- a/th02/op/polygons[data].asm +++ /dev/null @@ -1 +0,0 @@ -polygons_initialized db 0 diff --git a/th02/op_01.cpp b/th02/op_01.cpp index c1369bf3..a9d159c4 100644 --- a/th02/op_01.cpp +++ b/th02/op_01.cpp @@ -32,6 +32,7 @@ extern "C" { #include "th02/snd/snd.h" } #include "th02/gaiji/gaiji.h" +#include "th02/shiftjis/fns.hpp" #include "th02/op/op.h" #include "th02/op/menu.hpp" @@ -166,10 +167,10 @@ void op_animate(void) if(snd_midi_possible) { door_x = snd_midi_active; snd_midi_active = true; - snd_load("op.m", SND_LOAD_SONG); + snd_load(BGM_MENU_MAIN_FN, SND_LOAD_SONG); } snd_midi_active = false; - snd_load("op.m", SND_LOAD_SONG); + snd_load(BGM_MENU_MAIN_FN, SND_LOAD_SONG); snd_midi_active = door_x; } diff --git a/th02/op_06.cpp b/th02/op_06.cpp index c17a1d38..18044713 100644 --- a/th02/op_06.cpp +++ b/th02/op_06.cpp @@ -22,54 +22,21 @@ extern "C" { } #include "th02/shiftjis/fns.hpp" +extern const shiftjis_t* MUSIC_CHOICES[17]; +extern const char* MUSIC_FILES[15]; +extern uint8_t track_playing; + static const int MUSIC_CMT_LINE_LEN = 42; static const int MUSIC_CMT_LINE_COUNT = 20; -#define TRACK_COUNT sizeof(MUSIC_FILES) / sizeof(MUSIC_FILES[0]) #define SEL_QUIT TRACK_COUNT + 1 #define MUSIC_POLYGONS 16 -const shiftjis_t *MUSIC_TITLES[] = { - "NO.1 東方封魔録 〜浄土曼荼羅", - "NO.2   博麗 〜Eastern Wind ", - "NO.3   End of Daylight  ", - "NO.4      幻夢界    ", - "NO.5 ひもろぎ、むらさきにもえ", - "NO.6  東方封魔録 〜幽幻乱舞", - "NO.7   She's in a temper!! ", - "NO.8     やみのちから   ", - "NO.9     死を賭して   ", - "NO.10     恋色マジック   ", - "NO.11 Complete Darkness ", - "NO.12   遠野の森    ", - "NO.13 昔話わんだーらんど ", - "NO.14   エキストララブ ", - "NO.15 戦車むすめのみるゆめ ", - "    ", - "   Quit " -}; - -const char *MUSIC_FILES[] = { - "op.m", - "stage0.m", - "stage1.m", - "stage2.m", - "stage3.m", - "stage4.m", - "boss1.m", - "boss4.m", - "boss2.m", - "boss3.m", - "mima.m", - "end1.m", - "ending.m", - "stage5.m", - "boss5.m" -}; +#define TRACK_COUNT sizeof(MUSIC_FILES) / sizeof(MUSIC_FILES[0]) // Polygon state -char initialized = 0; +extern bool polygons_initialized; screen_point_t points[10]; screen_point_t pos[MUSIC_POLYGONS]; point_t move_speed[MUSIC_POLYGONS]; @@ -86,18 +53,18 @@ void pascal near draw_track(unsigned char sel, unsigned char color) page_t other_page = (1 - music_page); graph_accesspage(other_page); graph_putsa_fx( - 16, ((sel + 6) * GLYPH_H), (color | FX_WEIGHT_BOLD), MUSIC_TITLES[sel] + 16, ((sel + 6) * GLYPH_H), (color | FX_WEIGHT_BOLD), MUSIC_CHOICES[sel] ); graph_accesspage(music_page); graph_putsa_fx( - 16, ((sel + 6) * GLYPH_H), (color | FX_WEIGHT_BOLD), MUSIC_TITLES[sel] + 16, ((sel + 6) * GLYPH_H), (color | FX_WEIGHT_BOLD), MUSIC_CHOICES[sel] ); } void pascal near draw_tracks(unsigned char sel) { int i; - for(i = 0; i < sizeof(MUSIC_TITLES) / sizeof(MUSIC_TITLES[0]); i++) { + for(i = 0; i < sizeof(MUSIC_CHOICES) / sizeof(MUSIC_CHOICES[0]); i++) { draw_track(i, (i == sel) ? V_WHITE : 3); } } @@ -160,11 +127,11 @@ inline int polygon_vertex_count(int i) { void pascal near polygons_update_and_render(void) { int i; - if(!initialized) { + if(!polygons_initialized) { for(i = 0; i < MUSIC_POLYGONS; i++) { polygon_init(i, (rand() % (RES_Y * 16)), (4 - (rand() & 7))); } - initialized = 1; + polygons_initialized = true; } for(i = 0; i < MUSIC_POLYGONS; i++) { polygon_build( @@ -267,7 +234,6 @@ void pascal near draw_cmt(int track) void pascal musicroom(void) { - static unsigned char track_playing = 0; music_page = 1; palette_black(); @@ -277,7 +243,7 @@ void pascal musicroom(void) graph_clear(); graph_accesspage(1); - pi_load_put_8_free(0, "op3.pi"); + pi_load_put_8_free(0, reinterpret_cast(MK_FP(_DS, 0x0C1D))); music_sel = track_playing; draw_tracks(music_sel); graph_copy_page(0); diff --git a/th02/shiftjis/bgm.hpp b/th02/shiftjis/bgm.hpp new file mode 100644 index 00000000..6ebbe95a --- /dev/null +++ b/th02/shiftjis/bgm.hpp @@ -0,0 +1,22 @@ +// Central BGM title definitions for TH02 +// -------------------------------------- +// For consistency, these IDs use the typical OST order and the one shown in +// TH05's Music Room, not the clustered stages-then-bosses order in TH02's +// Music Room. + +#define TH02_01 "東方封魔録 〜浄土曼荼羅" +#define TH02_02 "  博麗 〜Eastern Wind " +#define TH02_03 "  She's in a temper!! " +#define TH02_04 "  End of Daylight  " +#define TH02_05 "    やみのちから   " +#define TH02_06 "     幻夢界    " +#define TH02_07 "    死を賭して   " +#define TH02_08 "ひもろぎ、むらさきにもえ" +#define TH02_09 "     恋色マジック   " +#define TH02_10 " 東方封魔録 〜幽幻乱舞" +#define TH02_11 " Complete Darkness " +#define TH02_12 "   エキストララブ " +#define TH02_13 " 戦車むすめのみるゆめ " +#define TH02_14 "   遠野の森    " +#define TH02_15 " 昔話わんだーらんど " +#define TH02_QT "   Quit " // ZUN quirk: Not quite centered. diff --git a/th02/shiftjis/fns.hpp b/th02/shiftjis/fns.hpp index ae26082c..e638fe25 100644 --- a/th02/shiftjis/fns.hpp +++ b/th02/shiftjis/fns.hpp @@ -1,3 +1,5 @@ #define PF_FN "東方封魔.録" #define MUSIC_CMT_FN "MUSIC.TXT" #define SHIFTJIS_FN "MIKOFT.bft" + +#define BGM_MENU_MAIN_FN "op.m" diff --git a/th02/shiftjis/music.hpp b/th02/shiftjis/music.hpp new file mode 100644 index 00000000..0f243d14 --- /dev/null +++ b/th02/shiftjis/music.hpp @@ -0,0 +1,42 @@ +#include "th02/shiftjis/bgm.hpp" +#include "th02/shiftjis/fns.hpp" + +// ZUN quirk: TH02 first lists all 5 stage themes of the main game, followed by +// all 5 boss themes. +const shiftjis_t* MUSIC_CHOICES[] = { + "NO.1 " TH02_01, + "NO.2 " TH02_02, + "NO.3 " TH02_04, + "NO.4 " TH02_06, + "NO.5 " TH02_08, + "NO.6 " TH02_10, + "NO.7 " TH02_03, + "NO.8 " TH02_05, + "NO.9 " TH02_07, + "NO.10 " TH02_09, + "NO.11 " TH02_11, + "NO.12 " TH02_14, + "NO.13 " TH02_15, + "NO.14 " TH02_12, + "NO.15 " TH02_13, + "    ", // ZUN bloat + " " TH02_QT, +}; + +const char* MUSIC_FILES[] = { + BGM_MENU_MAIN_FN, + "stage0.m", + "stage1.m", + "stage2.m", + "stage3.m", + "stage4.m", + "boss1.m", + "boss4.m", + "boss2.m", + "boss3.m", + "mima.m", + "end1.m", + "ending.m", + "stage5.m", + "boss5.m\0MUSIC.TXT\0op3.pi", +}; diff --git a/th03/shiftjis/bgm.hpp b/th03/shiftjis/bgm.hpp new file mode 100644 index 00000000..fbf4f773 --- /dev/null +++ b/th03/shiftjis/bgm.hpp @@ -0,0 +1,23 @@ +// Central BGM title definitions for TH03 +// -------------------------------------- + +#define TH03_01 "  夢は時空を越えて " +#define TH03_02 "     Selection " +#define TH03_03 " 東方妖恋談 " +#define TH03_04 " Reincarnation " +#define TH03_05 " Dim. Dream " +#define TH03_06 "Tabula rasa 〜空白少女 " +#define TH03_07 "  Maniacal Princess " +#define TH03_08 " 夢消失 〜Lost Dream " +#define TH03_09 " 夢幻遊戯 〜Dream War " +#define TH03_10 "魔法決戦!〜Fight it out!" +#define TH03_11 "   Sailor of Time " +#define TH03_12 " Strawberry Crisis!! " +#define TH03_13 " 非統一魔法世界論 " +#define TH03_14 "  魔法鐘愛 " +#define TH03_15 "  久遠の夢 " +#define TH03_16 " 東方の青い空 " +#define TH03_17 " 永遠の満月 " +#define TH03_18 " Maple Dream... " +#define TH03_19 " 霊人の休日 " +#define TH03_QT "   Quit " diff --git a/th03/shiftjis/fns.hpp b/th03/shiftjis/fns.hpp new file mode 100644 index 00000000..ea3c1ba6 --- /dev/null +++ b/th03/shiftjis/fns.hpp @@ -0,0 +1 @@ +#define BGM_MENU_MAIN_FN "op.m" diff --git a/th03/shiftjis/music.hpp b/th03/shiftjis/music.hpp new file mode 100644 index 00000000..1f09887f --- /dev/null +++ b/th03/shiftjis/music.hpp @@ -0,0 +1,48 @@ +#include "th03/shiftjis/bgm.hpp" +#include "th03/shiftjis/fns.hpp" + +const shiftjis_t* MUSIC_CHOICES[] = { + "NO.1 " TH03_01, + "NO.2 " TH03_02, + "NO.3 " TH03_03, + "NO.4 " TH03_04, + "NO.5 " TH03_05, + "NO.6 " TH03_06, + "NO.7 " TH03_07, + "NO.8 " TH03_08, + "NO.9 " TH03_09, + "NO.10 " TH03_10, + "NO.11 " TH03_11, + "NO.12 " TH03_12, + "NO.13 " TH03_13, + "NO.14 " TH03_14, + "NO.15 " TH03_15, + "NO.16 " TH03_16, + "NO.17 " TH03_17, + "NO.18 " TH03_18, + "NO.19 " TH03_19, + "    ", // ZUN bloat + " " TH03_QT, +}; + +const char* MUSIC_FILES[] = { + BGM_MENU_MAIN_FN, + "select.m", + "00mm.m", + "01mm.m", + "02mm.m", + "03mm.m", + "04mm.m", + "05mm.m", + "06mm.m", + "dec.m", + "07mm.m", + "08mm.m", + "demo1.m", + "demo2.m", + "demo3.m", + "demo4.m", + "demo5.m", + "ed.m", + "score.m\0MUSIC.TXT\0op3.pi", +}; diff --git a/th03_op.asm b/th03_op.asm index 2803df1d..67b7b042 100644 --- a/th03_op.asm +++ b/th03_op.asm @@ -1354,7 +1354,7 @@ var_1 = byte ptr -1 mov ah, 0 shl ax, 2 mov bx, ax - pushd _MUSIC_TITLES[bx] + pushd _MUSIC_CHOICES[bx] call graph_putsa_fx graph_accesspage _music_page push 16 @@ -1371,7 +1371,7 @@ var_1 = byte ptr -1 mov ah, 0 shl ax, 2 mov bx, ax - pushd _MUSIC_TITLES[bx] + pushd _MUSIC_CHOICES[bx] call graph_putsa_fx leave retn 4 @@ -1457,7 +1457,7 @@ loc_AC15: call pi_palette_apply pascal, 0 call pi_put_8 pascal, large 0, 0 freePISlotLarge 0 - mov al, music_track_playing + mov al, _track_playing mov _music_sel, al call draw_tracks pascal, word ptr _music_sel call graph_copy_page pascal, 0 @@ -1466,11 +1466,11 @@ loc_AC15: call screen_back_B_snap call cmt_back_snap graph_accesspage 1 - mov al, music_track_playing + mov al, _track_playing mov ah, 0 call draw_cmt pascal, ax graph_accesspage 0 - mov al, music_track_playing + mov al, _track_playing mov ah, 0 call draw_cmt pascal, ax mov PaletteTone, 100 @@ -1547,7 +1547,7 @@ loc_AD52: add sp, 6 kajacall KAJA_SONG_PLAY mov al, _music_sel - mov music_track_playing, al + mov _track_playing, al mov ah, 0 call draw_cmt pascal, ax call music_flip @@ -3321,94 +3321,13 @@ SHARED ends extern _SinTable8:word:256 extern _CosTable8:word:256 -public _MUSIC_TITLES -_MUSIC_TITLES label dword - dd aNo_1B@cVOul ; "NO.1  夢は時空を越えて " - dd aNo_2B@B@Select ; "NO.2     Selection " - dd aNo_3Umx ; "NO.3 東方妖恋談 " - dd aNo_4Reincarnat ; "NO.4 Reincarnation " - dd aNo_5Dim_Dream ; "NO.5 Dim. Dream " - dd aNo_6TabulaRasa ; "NO.6 Tabula rasa 〜空白少女 " - dd aNo_7B@Maniacal ; "NO.7   Maniacal Princess " - dd aNo_8CPOBLostDr ; "NO.8 夢消失 〜Lost Dream " - dd aNo_9CMCvlyBDre ; "NO.9 夢幻遊戯 〜Dream War " - dd aNo_10Cvc@mirab ; "NO.10 魔法決戦!〜Fight it out!" - dd aNo_11B@SailorO ; "NO.11   Sailor of Time " - dd aNo_12Strawberr ; "NO.12 Strawberry Crisis!! " - dd aNo_13F ; "NO.13 非統一魔法世界論 " - dd aNo_14B@cvc@pri ; "NO.14  魔法鐘愛 " - dd aNo_15B@lviuvC ; "NO.15  久遠の夢 " - dd aNo_16Umx ; "NO.16 東方の青い空 " - dd aNo_17IiiuvCumo ; "NO.17 永遠の満月 " - dd aNo_18MapleDrea ; "NO.18 Maple Dream... " - dd aNo_19CRlvLxu ; "NO.19 霊人の休日 " - dd aB@b@ ; "    " - dd aB@b@vpvxvivf ; "   Quit " -public _MUSIC_FILES -_MUSIC_FILES label dword - dd aOp_m_0 ; "op.m" - dd aSelect_m_0 ; "select.m" - dd a00mm_m ; "00mm.m" - dd a01mm_m ; "01mm.m" - dd a02mm_m ; "02mm.m" - dd a03mm_m ; "03mm.m" - dd a04mm_m ; "04mm.m" - dd a05mm_m ; "05mm.m" - dd a06mm_m ; "06mm.m" - dd aDec_m ; "dec.m" - dd a07mm_m ; "07mm.m" - dd a08mm_m ; "08mm.m" - dd aDemo1_m ; "demo1.m" - dd aDemo2_m ; "demo2.m" - dd aDemo3_m ; "demo3.m" - dd aDemo4_m ; "demo4.m" - dd aDemo5_m ; "demo5.m" - dd aEd_m ; "ed.m" - dd aScore_m ; "score.m" -include th02/op/polygons[data].asm -music_track_playing db 0 -aNo_1B@cVOul db 'NO.1  夢は時空を越えて ',0 -aNo_2B@B@Select db 'NO.2     Selection ',0 -aNo_3Umx db 'NO.3 東方妖恋談 ',0 -aNo_4Reincarnat db 'NO.4 Reincarnation ',0 -aNo_5Dim_Dream db 'NO.5 Dim. Dream ',0 -aNo_6TabulaRasa db 'NO.6 Tabula rasa 〜空白少女 ',0 -aNo_7B@Maniacal db 'NO.7   Maniacal Princess ',0 -aNo_8CPOBLostDr db 'NO.8 夢消失 〜Lost Dream ',0 -aNo_9CMCvlyBDre db 'NO.9 夢幻遊戯 〜Dream War ',0 -aNo_10Cvc@mirab db 'NO.10 魔法決戦!〜Fight it out!',0 -aNo_11B@SailorO db 'NO.11   Sailor of Time ',0 -aNo_12Strawberr db 'NO.12 Strawberry Crisis!! ',0 -aNo_13F db 'NO.13 非統一魔法世界論 ',0 -aNo_14B@cvc@pri db 'NO.14  魔法鐘愛 ',0 -aNo_15B@lviuvC db 'NO.15  久遠の夢 ',0 -aNo_16Umx db 'NO.16 東方の青い空 ',0 -aNo_17IiiuvCumo db 'NO.17 永遠の満月 ',0 -aNo_18MapleDrea db 'NO.18 Maple Dream... ',0 -aNo_19CRlvLxu db 'NO.19 霊人の休日 ',0 -aB@b@ db '    ',0 -aB@b@vpvxvivf db '   Quit ',0 -aOp_m_0 db 'op.m',0 -aSelect_m_0 db 'select.m',0 -a00mm_m db '00mm.m',0 -a01mm_m db '01mm.m',0 -a02mm_m db '02mm.m',0 -a03mm_m db '03mm.m',0 -a04mm_m db '04mm.m',0 -a05mm_m db '05mm.m',0 -a06mm_m db '06mm.m',0 -aDec_m db 'dec.m',0 -a07mm_m db '07mm.m',0 -a08mm_m db '08mm.m',0 -aDemo1_m db 'demo1.m',0 -aDemo2_m db 'demo2.m',0 -aDemo3_m db 'demo3.m',0 -aDemo4_m db 'demo4.m',0 -aDemo5_m db 'demo5.m',0 -aEd_m db 'ed.m',0 -aScore_m db 'score.m',0 -include th02/op/music_cmt_load[data].asm -aOp3_pi db 'op3.pi',0 + extern _MUSIC_CHOICES:dword + extern _MUSIC_FILES:dword + extern _track_playing:byte + extern _polygons_initialized:byte + _aMUSIC_TXT = (aOp3_pi - 10) + aOp3_pi = ($ - 7) + aOpwin_bft db 'opwin.bft',0 aOp_m db 'op.m',0 aTl01_pi db 'TL01.PI',0 diff --git a/th04/shiftjis/bgm.hpp b/th04/shiftjis/bgm.hpp new file mode 100644 index 00000000..c94571fb --- /dev/null +++ b/th04/shiftjis/bgm.hpp @@ -0,0 +1,26 @@ +// Central BGM title definitions for TH04 +// -------------------------------------- + +#define TH04_01 " 幻想郷 〜 Lotus Land Story" +#define TH04_02 " Witching Dream " +#define TH04_03 " Selene's light " +#define TH04_04 "装飾戦 〜 Decoration Battle" +#define TH04_05 " Break the Sabbath " +#define TH04_06 " 紅響曲 〜 Scarlet Phoneme " +#define TH04_07 " Bad Apple!! " +#define TH04_08 " 霊戦 〜 Perdition crisis " +#define TH04_09 " アリスマエステラ " +#define TH04_10 " 少女綺想曲 〜 Capriccio " +#define TH04_11 " 星の器 〜 Casket of Star " +#define TH04_12 " Lotus Love " +#define TH04_13 "眠れる恐怖 〜Sleeping Terror" +#define TH04_14 " Dream Land " +#define TH04_15 " 幽夢 〜 Inanimate Dream " +#define TH04_16 " 禁じざるをえない遊戯 " +#define TH04_17 "メイド幻想 〜 Icemilk Magic" +#define TH04_18 " かわいい悪魔 〜 Innocence " +#define TH04_19 " Days " +#define TH04_20 " Peaceful " +#define TH04_21 " Arcadian Dream " +#define TH04_22 " 幻想の住人 " +#define TH04_QT "   Quit " diff --git a/th04/shiftjis/music.hpp b/th04/shiftjis/music.hpp new file mode 100644 index 00000000..f572e917 --- /dev/null +++ b/th04/shiftjis/music.hpp @@ -0,0 +1,54 @@ +#include "th04/shiftjis/bgm.hpp" +#include "th04/shiftjis/fnshared.hpp" + +const shiftjis_t* MUSIC_CHOICES[] = { + "No.1 " TH04_01, + "No.2 " TH04_02, + "No.3 " TH04_03, + "No.4 " TH04_04, + "No.5 " TH04_05, + "No.6 " TH04_06, + "No.7 " TH04_07, + "No.8 " TH04_08, + "No.9 " TH04_09, + "No.10 " TH04_10, + "No.11 " TH04_11, + "No.12 " TH04_12, + "No.13 " TH04_13, + "No.14 " TH04_14, + "No.15 " TH04_15, + "No.16 " TH04_16, + "No.17 " TH04_17, + "No.18 " TH04_18, + "No.19 " TH04_19, + "No.20 " TH04_20, + "No.21 " TH04_21, + "No.22 " TH04_22, + " ", // ZUN bloat + " " TH04_QT, +}; + +const char* MUSIC_FILES[] = { + BGM_MENU_MAIN_FN, + "st00", + "st10", + "st00b", + "st01", + "st01b", + "st02", + "st02b", + "st03", + "st03c", + "st03b", + "st04", + "st04b", + "st05", + "st05b", + "st06", + "st06b", + "st06c", + "end1", + "end2", + "staff", + "name", +}; diff --git a/th04_op.asm b/th04_op.asm index b7fb0689..0fd45c09 100644 --- a/th04_op.asm +++ b/th04_op.asm @@ -98,7 +98,7 @@ var_1 = byte ptr -1 mov ah, 0 shl ax, 2 mov bx, ax - pushd _MUSIC_TITLES[bx] + pushd _MUSIC_CHOICES[bx] call graph_putsa_fx graph_accesspage _music_page push 16 @@ -114,7 +114,7 @@ var_1 = byte ptr -1 mov ah, 0 shl ax, 2 mov bx, ax - pushd _MUSIC_TITLES[bx] + pushd _MUSIC_CHOICES[bx] call graph_putsa_fx leave retn 4 @@ -314,7 +314,7 @@ _musicroom proc near call pi_palette_apply pascal, 0 call pi_put_8 pascal, large 0, 0 freePISlotLarge 0 - mov al, music_track_playing + mov al, _track_playing mov _music_sel, al call draw_tracks pascal, word ptr _music_sel call graph_copy_page pascal, 0 @@ -322,7 +322,7 @@ _musicroom proc near graph_accesspage 1 graph_showpage 0 call screen_back_B_snap - mov al, music_track_playing + mov al, _track_playing mov ah, 0 call draw_cmt pascal, ax mov PaletteTone, 100 @@ -390,7 +390,7 @@ loc_C4E4: jz short loc_C533 kajacall KAJA_SONG_FADE, 32 mov al, _music_sel - mov music_track_playing, al + mov _track_playing, al mov ah, 0 call draw_cmt pascal, ax mov al, _music_sel @@ -1178,104 +1178,13 @@ SHARED ends extern _graph_putsa_fx_func:word include th04/zunsoft[data].asm -public _MUSIC_TITLES -_MUSIC_TITLES label dword - dd aNo_1MSzlBLotus ; "No.1 幻想郷 〜 Lotus Land Story" - dd aNo_2WitchingDr ; "No.2 Witching Dream " - dd aNo_3SeleneSLig ; "No.3 Selene's light " - dd aNo_4Sxp ; "No.4 装飾戦 〜 Decoration Battle" - dd aNo_5BreakTheSa ; "No.5 Break the Sabbath " - dd aNo_6NglLBScarl ; "No.6 紅響曲 〜 Scarlet Phoneme " - dd aNo_7BadApple ; "No.7 Bad Apple!! " - dd aNo_8CRab@bPerd ; "No.8 霊戦 〜 Perdition crisis " - dd aNo_9GagkgxgGgg ; "No.9 アリスマエステラ " - dd aNo_10Pnpcuyszl ; "No.10 少女綺想曲 〜 Capriccio " - dd aNo_11RpvKab@bC ; "No.11 星の器 〜 Casket of Star " - dd aNo_12LotusLove ; "No.12 Lotus Love " - dd aNo_13CVVslXBSl ; "No.13 眠れる恐怖 〜Sleeping Terror" - dd aNo_14DreamLand ; "No.14 Dream Land " - dd aNo_15ChcB@bIna ; "No.15 幽夢 〜 Inanimate Dream " - dd aNo_16LVVVsv ; "No.16 禁じざるをえない遊戯 " - dd aNo_17GbgcghmSz ; "No.17 メイド幻想 〜 Icemilk Magic" - dd aNo_18Vivavvvvi ; "No.18 かわいい悪魔 〜 Innocence " - dd aNo_19Days ; "No.19 Days " - dd aNo_20Peaceful ; "No.20 Peaceful " - dd aNo_21ArcadianD ; "No.21 Arcadian Dream " - dd aNo_22MSzvPzrl ; "No.22 幻想の住人 " - dd asc_105B2 ; " " - dd aB@b@vpvxvivf ; "   Quit " -public _MUSIC_FILES -_MUSIC_FILES label dword - dd aOp_2 ; "op" - dd aSt00 ; "st00" - dd aSt10 ; "st10" - dd aSt00b ; "st00b" - dd aSt01 ; "st01" - dd aSt01b ; "st01b" - dd aSt02 ; "st02" - dd aSt02b ; "st02b" - dd aSt03 ; "st03" - dd aSt03c ; "st03c" - dd aSt03b ; "st03b" - dd aSt04 ; "st04" - dd aSt04b ; "st04b" - dd aSt05 ; "st05" - dd aSt05b ; "st05b" - dd aSt06 ; "st06" - dd aSt06b ; "st06b" - dd aSt06c ; "st06c" - dd aEnd1 ; "end1" - dd aEnd2 ; "end2" - dd aStaff ; "staff" - dd aName_0 ; "name" -include th02/op/polygons[data].asm -music_track_playing db 0 -aNo_1MSzlBLotus db 'No.1 幻想郷 〜 Lotus Land Story',0 -aNo_2WitchingDr db 'No.2 Witching Dream ',0 -aNo_3SeleneSLig db 'No.3 Selene',27h,'s light ',0 -aNo_4Sxp db 'No.4 装飾戦 〜 Decoration Battle',0 -aNo_5BreakTheSa db 'No.5 Break the Sabbath ',0 -aNo_6NglLBScarl db 'No.6 紅響曲 〜 Scarlet Phoneme ',0 -aNo_7BadApple db 'No.7 Bad Apple!! ',0 -aNo_8CRab@bPerd db 'No.8 霊戦 〜 Perdition crisis ',0 -aNo_9GagkgxgGgg db 'No.9 アリスマエステラ ',0 -aNo_10Pnpcuyszl db 'No.10 少女綺想曲 〜 Capriccio ',0 -aNo_11RpvKab@bC db 'No.11 星の器 〜 Casket of Star ',0 -aNo_12LotusLove db 'No.12 Lotus Love ',0 -aNo_13CVVslXBSl db 'No.13 眠れる恐怖 〜Sleeping Terror',0 -aNo_14DreamLand db 'No.14 Dream Land ',0 -aNo_15ChcB@bIna db 'No.15 幽夢 〜 Inanimate Dream ',0 -aNo_16LVVVsv db 'No.16 禁じざるをえない遊戯 ',0 -aNo_17GbgcghmSz db 'No.17 メイド幻想 〜 Icemilk Magic',0 -aNo_18Vivavvvvi db 'No.18 かわいい悪魔 〜 Innocence ',0 -aNo_19Days db 'No.19 Days ',0 -aNo_20Peaceful db 'No.20 Peaceful ',0 -aNo_21ArcadianD db 'No.21 Arcadian Dream ',0 -aNo_22MSzvPzrl db 'No.22 幻想の住人 ',0 -asc_105B2 db ' ',0 -aB@b@vpvxvivf db '   Quit ',0 -aOp_2 db 'op',0 -aSt00 db 'st00',0 -aSt10 db 'st10',0 -aSt00b db 'st00b',0 -aSt01 db 'st01',0 -aSt01b db 'st01b',0 -aSt02 db 'st02',0 -aSt02b db 'st02b',0 -aSt03 db 'st03',0 -aSt03c db 'st03c',0 -aSt03b db 'st03b',0 -aSt04 db 'st04',0 -aSt04b db 'st04b',0 -aSt05 db 'st05',0 -aSt05b db 'st05b',0 -aSt06 db 'st06',0 -aSt06b db 'st06b',0 -aSt06c db 'st06c',0 -aEnd1 db 'end1',0 -aEnd2 db 'end2',0 -aStaff db 'staff',0 -aName_0 db 'name',0 + + extern _MUSIC_CHOICES:dword + extern _MUSIC_FILES:dword + extern _track_playing:byte + extern _polygons_initialized:byte + aOp_2 = ($ - 118) + include th04/op/music_cmt_load[data].asm aMusic_pi db 'music.pi',0 aGensou_scr db 'GENSOU.SCR',0 diff --git a/th05/op/music_cmt_load.asm b/th05/op/music_cmt_load.asm index 54fdcf58..9f35c71a 100644 --- a/th05/op/music_cmt_load.asm +++ b/th05/op/music_cmt_load.asm @@ -7,7 +7,7 @@ music_cmt_load proc pascal near mov word ptr @@fn+2, ds mov word ptr @@fn, offset _a_Music0_txt les bx, @@fn - mov al, byte ptr music_game + mov al, byte ptr _game_sel add al, '0' mov es:[bx+6], al call file_ropen pascal, word ptr @@fn+2, bx diff --git a/th05/shiftjis/bgm.hpp b/th05/shiftjis/bgm.hpp new file mode 100644 index 00000000..aaed2a73 --- /dev/null +++ b/th05/shiftjis/bgm.hpp @@ -0,0 +1,26 @@ +// Central BGM title definitions for TH05 +// -------------------------------------- + +#define TH05_01 " 怪綺談 〜 Mystic Square " +#define TH05_02 " Dream Express " +#define TH05_03 " 魔法陣 〜 Magic Square " +#define TH05_04 " 夢想時空 " +#define TH05_05 " 霊天 〜 Spiritual Heaven " +#define TH05_06 " Romantic Children " +#define TH05_07 " プラスチックマインド " +#define TH05_08 " メイプルワイズ " +#define TH05_09 "禁断の魔法 〜 Forbidden Magic" +#define TH05_10 " 真紅の少女 〜 Crimson Dead!!" +#define TH05_11 " 裏切りの少女 〜 Judas Kiss " +#define TH05_12 " the Last Judgement " +#define TH05_13 " 悲しき人形 〜 Doll of Misery" +#define TH05_14 " 世界の果て 〜 World's End " +#define TH05_15 " 神話幻想 〜 Infinite Being " +#define TH05_16 " 不思議の国のアリス " +#define TH05_17 " the Grimoire of Alice " +#define TH05_18 " 神社 " +#define TH05_19 " Endless " +#define TH05_20 " 久遠の楽園 " +#define TH05_21 " Mystic Dream " +#define TH05_22 " Peaceful Romancer " +#define TH05_23 " 魂の休らむ所 " diff --git a/th05/shiftjis/music.hpp b/th05/shiftjis/music.hpp new file mode 100644 index 00000000..feb32e7f --- /dev/null +++ b/th05/shiftjis/music.hpp @@ -0,0 +1,277 @@ +#include "th02/shiftjis/bgm.hpp" +#include "th03/shiftjis/bgm.hpp" +#include "th04/shiftjis/bgm.hpp" +#include "th05/shiftjis/bgm.hpp" + +static const unsigned int GAME_COUNT = 5; +static const unsigned int TRACKS_MAX = 30; + +const shiftjis_t* LABEL_UP = " ------ ▲ ------ "; +const shiftjis_t* LABEL_DOWN = " ------ ▼ ------ "; + +// ZUN bug: TH03's list is the only one that correctly aligns this label. +#define LABEL_QUIT "タイトルに戻る" + +// ZUN bloat +const shiftjis_t* LABEL_UNUSED = " ---------------- "; + +const shiftjis_t* LABEL_GAME[GAME_COUNT] = { + " 第1弾 東方靈異伝 Arrange ver ", + " 第2弾 東方封魔録 Special MIX ", + " 第3弾 東方夢時空 Special MIX ", + " 第4弾 東方幻想郷 Special MIX ", + " 第5弾 東方怪綺談 MysticSquare ", +}; + +const shiftjis_t* MUSIC_CHOICES[GAME_COUNT][TRACKS_MAX] = {{ + // Only 7 of the 14 tracks have identical strings in TH01: + // * 永遠の巫女 + // * 東方怪奇談 + // * 天使伝説 + // * Oriental Magician + // * 破邪の小太刀 + // * 魔鏡 + // * アイリス + // And even those are differently spaced and centered in that game. Reusing + // their strings would just make both arrays harder to read, and would make + // it impossible to see the center alignment. + "No.1 A Sacred Lot ", + "No.2 永遠の巫女 ", + "No.3 The Positive and Negative ", + "No.4 Highly Responsive to Prayers ", + "No.5 東方怪奇談 ", + "No.6 天使伝説 ", + "No.7 Oriental Magician ", + "No.8 破邪の小太刀 ", + "No.9 魔鏡 ", + "No.10 the Legend of KAGE ", + "No.11 いざ、倒れ逝くその時まで ", + "No.12 Civilization of Magic ", + "No.13 星幽天使 ", + "No.14 アイリス ", + " " LABEL_QUIT " ", +}, { + "No.1 " TH02_01 " ", + "No.2 " TH02_02 " ", + "No.3 " TH02_03 " ", + "No.4 " TH02_04 " ", + "No.5 " TH02_05 " ", + "No.6 " TH02_06 " ", + "No.7 " TH02_07 " ", + "No.8 " TH02_08 " ", + + // ZUN bug: This track presents the only alignment inconsistency between + // the original game and the TH05 Music Room. This particular track wasn't + // correctly centered in TH02, and this only slightly moves the title to + // the position it was intended to be. + // Given ZUN's track record when it comes to these inconsistencies, it's a + // miracle that all other TH05 strings remained identical, down to even the + // precise mixture of fullwidth and halfwidth spaces... + "No.9 " TH02_09 " ", + + "No.10 " TH02_10 " ", + "No.11 " TH02_11 " ", + "No.12 " TH02_12 " ", + "No.13 " TH02_13 " ", + "No.14 " TH02_14 " ", + "No.15 " TH02_15 " ", + "未使用.1 博麗神社境内 ", + "未使用.2  陽落ちて   ", + "未使用.3  封魔終演   ", + " " LABEL_QUIT " ", +}, { + "No.1 " TH03_01 " ", + "No.2 " TH03_02 " ", + "No.3 " TH03_03 " ", + "No.4 " TH03_04 " ", + "No.5 " TH03_05 " ", + "No.6 " TH03_06 " ", + "No.7 " TH03_07 " ", + "No.8 " TH03_08 " ", + "No.9 " TH03_09 " ", + "No.10 " TH03_10 " ", + "No.11 " TH03_11 " ", + "No.12 " TH03_12 " ", + "No.13 " TH03_13 " ", + "No.14 " TH03_14 " ", + "No.15 " TH03_15 " ", + "No.16 " TH03_16 " ", + "No.17 " TH03_17 " ", + "No.18 " TH03_18 " ", + "No.19 " TH03_19 " ", + "No.20 勝利デモ ", + "No.21 ゲームオーバー ", + "未使用.1 時の風 ", + "未使用.2 スターボウドリーム ", + "未使用.3 Phantasmagoria ", + " " LABEL_QUIT " ", +}, { + "No.1 " TH04_01 " ", + "No.2 " TH04_02 " ", + "No.3 " TH04_03 " ", + "No.4 " TH04_04 " ", + "No.5 " TH04_05 " ", + "No.6 " TH04_06 " ", + "No.7 " TH04_07 " ", + "No.8 " TH04_08 " ", + "No.9 " TH04_09 " ", + "No.10 " TH04_10 " ", + "No.11 " TH04_11 " ", + "No.12 " TH04_12 " ", + "No.13 " TH04_13 " ", + "No.14 " TH04_14 " ", + "No.15 " TH04_15 " ", + "No.16 " TH04_16 " ", + "No.17 " TH04_17 " ", + "No.18 " TH04_18 " ", + "No.19 " TH04_19 " ", + "No.20 " TH04_20 " ", + "No.21 " TH04_21 " ", + "No.22 " TH04_22 " ", + "未使用.1 Lotus Road ", + "未使用.2 Dreamy pilot ", + "未使用.3 Incomplete Plot ", + "未使用.4 Border Land ", + "未使用.5 Magic Shop of Raspberry ", + "未使用.6 Crescent Dream ", + " " LABEL_QUIT " ", +}, { + "No.1 " TH05_01, + "No.2 " TH05_02, + "No.3 " TH05_03, + "No.4 " TH05_04, + "No.5 " TH05_05, + "No.6 " TH05_06, + "No.7 " TH05_07, + "No.8 " TH05_08, + "No.9 " TH05_09, + "No.10 " TH05_10, + "No.11 " TH05_11, + "No.12 " TH05_12, + "No.13 " TH05_13, + "No.14 " TH05_14, + "No.15 " TH05_15, + "No.16 " TH05_16, + "No.17 " TH05_17, + "No.18 " TH05_18, + "No.19 " TH05_19, + "No.20 " TH05_20, + "No.21 " TH05_21, + "No.22 " TH05_22, + "No.23 " TH05_23, + " " LABEL_QUIT " ", +}}; + +const char* MUSIC_FILES[GAME_COUNT][TRACKS_MAX] = {{ + "r_00", + "r_01", + "r_02", + "r_03", + "r_04", + "r_05", + "r_06", + "r_07", + "r_08", + "r_09", + "r_10", + "r_11", + "r_12", + "r_13", +}, { + "h_op", + "h_st00", + "h_st00b", + "h_st01", + "h_st01b", + "h_st02", + "h_st02b", + "h_st03", + "h_st03b", + "h_st04", + "h_st04b", + "h_st05", + "h_st05b", + "h_end", + "h_staff", + "h_ng00", + "h_ng01", + "h_ng02", +}, { + "y_op", + "y_select", + "y_00mm", + "y_01mm", + "y_02mm", + "y_03mm", + "y_04mm", + "y_05mm", + "y_06mm", + "y_dec", + "y_07mm", + "y_08mm", + "y_demo1", + "y_demo2", + "y_demo3", + "y_demo4", + "y_demo5", + "y_ed", + "y_score", + "y_win", + "y_over", + "y_ng00", + "y_ng01", + "y_ng02", +}, { + "g_op", + "g_st00", + "g_st10", + "g_st00b", + "g_st01", + "g_st01b", + "g_st02", + "g_st02b", + "g_st03", + "g_st03c", + "g_st03b", + "g_st04", + "g_st04b", + "g_st05", + "g_st05b", + "g_st06", + "g_st06b", + "g_st06c", + "g_end1", + "g_end2", + "g_staff", + "g_name", + "g_ng00", + "g_ng01", + "g_ng02", + "g_ng03", + "g_ng04", + "g_ng05", +}, { + "op", + "st00", + "st00b", + "st01", + "st01b", + "st02", + "st02b", + "st03", + "st03b", + "st03c", + "st03d", + "st04", + "st04b", + "st05", + "st05b", + "st06", + "st06b", + "ed00", + "ed01", + "ed02", + "staff", + "exed", + "name", +}}; diff --git a/th05_op.asm b/th05_op.asm index 214f956f..7693a807 100644 --- a/th05_op.asm +++ b/th05_op.asm @@ -139,14 +139,14 @@ loc_BF05: mov [bp+var_5], 3 loc_BF14: - mov bx, music_game + mov bx, _game_sel imul bx, 78h mov al, [bp+arg_2] mov ah, 0 shl ax, 2 add bx, ax - mov ax, word ptr _MUSIC_TITLES+2[bx] - mov dx, word ptr _MUSIC_TITLES[bx] + mov ax, word ptr _MUSIC_CHOICES+2[bx] + mov dx, word ptr _MUSIC_CHOICES[bx] mov [bp+var_2], ax mov [bp+var_4], dx add si, 96 @@ -204,13 +204,13 @@ loc_BF6B: add ax, 2 cmp ax, si jg short loc_BF55 - call graph_putsa_fx pascal, (12 shl 16) or 80, 5, large [MUSICROOM_UP] - call graph_putsa_fx pascal, (12 shl 16) or 288, 5, large [MUSICROOM_DOWN] + call graph_putsa_fx pascal, (12 shl 16) or 80, 5, large [_LABEL_UP] + call graph_putsa_fx pascal, (12 shl 16) or 288, 5, large [_LABEL_DOWN] push (12 shl 16) or 32 push 3 - mov bx, music_game + mov bx, _game_sel shl bx, 2 - pushd dword ptr MUSICROOM_GAME[bx] + pushd dword ptr _LABEL_GAME[bx] call graph_putsa_fx pop si pop bp @@ -382,9 +382,9 @@ _musicroom proc near mov word_1403A, 0 mov word_1403C, 0 mov _music_sel, 0 - mov bx, music_game + mov bx, _game_sel add bx, bx - mov ax, MUSICROOM_TRACKCOUNTS[bx] + mov ax, _TRACK_COUNT[bx] mov musicroom_trackcount, ax mov byte_13E96, 0 call cdg_free_all @@ -521,34 +521,34 @@ loc_C652: loc_C666: test _key_det.lo, low INPUT_LEFT jz short loc_C680 - dec music_game - cmp music_game, 0 + dec _game_sel + cmp _game_sel, 0 jge short loc_C698 - mov music_game, 4 + mov _game_sel, 4 jmp short loc_C698 ; --------------------------------------------------------------------------- loc_C680: test _key_det.lo, low INPUT_RIGHT jz short loc_C6E3 - inc music_game - cmp music_game, 5 + inc _game_sel + cmp _game_sel, 5 jl short loc_C698 - mov music_game, 0 + mov _game_sel, 0 loc_C698: mov _music_sel, 0 mov word_1403C, 0 mov word_1403A, 0 - mov bx, music_game + mov bx, _game_sel add bx, bx - mov ax, MUSICROOM_TRACKCOUNTS[bx] + mov ax, _TRACK_COUNT[bx] mov musicroom_trackcount, ax push 0 call sub_C441 kajacall KAJA_SONG_FADE, 32 call draw_cmt pascal, 0 - mov bx, music_game + mov bx, _game_sel imul bx, 78h call snd_load pascal, dword ptr _MUSIC_FILES[bx], SND_LOAD_SONG kajacall KAJA_SONG_PLAY @@ -578,7 +578,7 @@ loc_C6F1: mov al, _music_sel mov ah, 0 call draw_cmt pascal, ax - mov bx, music_game + mov bx, _game_sel imul bx, 78h mov al, _music_sel mov ah, 0 @@ -1033,529 +1033,16 @@ SHARED ends include th04/zunsoft[data].asm -MUSICROOM_UP dd aMUSICROOM_UP - ; " ------ ▲ ------ " -MUSICROOM_DOWN dd aMUSICROOM_DOWN - ; " ------ ▼ ------ " - dd asc_104D5 ; " ---------------- " -MUSICROOM_GAME dd aMUSICROOM_TH01 - dd aMUSICROOM_TH02 - dd aMUSICROOM_TH03 - dd aMUSICROOM_TH04 - dd aMUSICROOM_TH05 -public _MUSIC_TITLES -_MUSIC_TITLES label dword - dd aTH01_01 ; "No.1 A Sacred Lot " - dd aTH01_02 ; "No.2 永遠の巫女 " - dd aTH01_03 ; "No.3 The Positive and Negative " - dd aTH01_04 ; "No.4 Highly Responsive to Prayers " - dd aTH01_05 - dd aTH01_06 ; "No.6 天使伝説 " - dd aTH01_07 ; "No.7 Oriental Magician " - dd aTH01_08 ; "No.8 破邪の小太刀 " - dd aTH01_09 ; "No.9 魔鏡 " - dd aTH01_10 ; "No.10 the Legend of KAGE " - dd aTH01_11 ; "No.11 いざ、倒れ逝くその時まで " - dd aTH01_12 ; "No.12 Civilization of Magic " - dd aTH01_13 ; "No.13 星幽天使 " - dd aTH01_14 ; "No.14 アイリス " - dd aMUSICROOM_QUIT1 ; " タイトルに戻る " - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd aTH02_01 - dd aTH02_02 ; "No.2   博麗 〜Eastern Wind " - dd aTH02_03 ; "No.3   She's in a temper!! " - dd aTH02_04 ; "No.4   End of Daylight  " - dd aTH02_05 ; "No.5     やみのちから   " - dd aTH02_06 ; "No.6      幻夢界     " - dd aTH02_07 - dd aTH02_08 ; "No.8 ひもろぎ、むらさきにもえ " - dd aTH02_09 - dd aTH02_10 - dd aTH02_11 ; "No.11 Complete Darkness " - dd aTH02_12 ; "No.12   エキストララブ " - dd aTH02_13 ; "No.13 戦車むすめのみるゆめ " - dd aTH02_14 ; "No.14   遠野の森    " - dd aTH02_15 - dd aTH02_16 ; "未使用.1 博麗神社境内 " - dd aTH02_17 ; "未使用.2  陽落ちて   " - dd aTH02_18 ; "未使用.3  封魔終演   " - dd aMUSICROOM_QUIT1 ; " タイトルに戻る " - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd aTH03_01 - dd aTH03_02 ; "No.2     Selection " - dd aTH03_03 - dd aTH03_04 ; "No.4 Reincarnation " - dd aTH03_05 ; "No.5 Dim. Dream " - dd aTH03_06 - dd aTH03_07 ; "No.7   Maniacal Princess " - dd aTH03_08 ; "No.8 夢消失 〜Lost Dream " - dd aTH03_09 ; "No.9 夢幻遊戯 〜Dream War " - dd aTH03_10 ; "No.10 魔法決戦!〜Fight it out! " - dd aTH03_11 ; "No.11   Sailor of Time " - dd aTH03_12 ; "No.12 Strawberry Crisis!! " - dd aTH03_13 - dd aTH03_14 ; "No.14  魔法鐘愛 " - dd aTH03_15 ; "No.15  久遠の夢 " - dd aTH03_16 - dd aTH03_17 ; "No.17 永遠の満月 " - dd aTH03_18 ; "No.18 Maple Dream... " - dd aTH03_19 - dd aTH03_20 ; "No.20 勝利デモ " - dd aTH03_21 ; "No.21 ゲームオーバー " - dd aTH03_22 ; "未使用.1 時の風 " - dd aTH03_23 ; "未使用.2 スターボウドリーム " - dd aTH03_24 ; "未使用.3 Phantasmagoria " - dd aMUSICROOM_QUIT2 ; " タイトルに戻る " - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd aTH04_01 ; "No.1 幻想郷 〜 Lotus Land Story " - dd aTH04_02 ; "No.2 Witching Dream " - dd aTH04_03 ; "No.3 Selene's light " - dd aTH04_04 - dd aTH04_05 ; "No.5 Break the Sabbath " - dd aTH04_06 ; "No.6 紅響曲 〜 Scarlet Phoneme " - dd aTH04_07 ; "No.7 Bad Apple!! " - dd aTH04_08 ; "No.8 霊戦 〜 Perdition crisis " - dd aTH04_09 ; "No.9 アリスマエステラ " - dd aTH04_10 ; "No.10 少女綺想曲 〜 Capriccio " - dd aTH04_11 ; "No.11 星の器 〜 Casket of Star " - dd aTH04_12 ; "No.12 Lotus Love " - dd aTH04_13 ; "No.13 眠れる恐怖 〜Sleeping Terror " - dd aTH04_14 ; "No.14 Dream Land " - dd aTH04_15 ; "No.15 幽夢 〜 Inanimate Dream " - dd aTH04_16 - dd aTH04_17 ; "No.17 メイド幻想 〜 Icemilk Magic " - dd aTH04_18 ; "No.18 かわいい悪魔 〜 Innocence " - dd aTH04_19 ; "No.19 Days " - dd aTH04_20 ; "No.20 Peaceful " - dd aTH04_21 ; "No.21 Arcadian Dream " - dd aTH04_22 ; "No.22 幻想の住人 " - dd aTH04_23 ; "未使用.1 Lotus Road " - dd aTH04_24 ; "未使用.2 Dreamy pilot " - dd aTH04_25 ; "未使用.3 Incomplete Plot " - dd aTH04_26 ; "未使用.4 Border Land " - dd aTH04_27 ; "未使用.5 Magic Shop of Raspberry " - dd aTH04_28 ; "未使用.6 Crescent Dream " - dd aMUSICROOM_QUIT1 ; " タイトルに戻る " - dd 0 - dd aTH05_01 - dd aTH05_02 ; "No.2 Dream Express " - dd aTH05_03 ; "No.3 魔法陣 〜 Magic Square " - dd aTH05_04 - dd aTH05_05 ; "No.5 霊天 〜 Spiritual Heaven " - dd aTH05_06 ; "No.6 Romantic Children " - dd aTH05_07 ; "No.7 プラスチックマインド " - dd aTH05_08 ; "No.8 メイプルワイズ " - dd aTH05_09 ; "No.9 禁断の魔法 〜 Forbidden Magic" - dd aTH05_10 ; "No.10 真紅の少女 〜 Crimson Dead!!" - dd aTH05_11 ; "No.11 裏切りの少女 〜 Judas Kiss " - dd aTH05_12 ; "No.12 the Last Judgement " - dd aTH05_13 ; "No.13 悲しき人形 〜 Doll of Misery" - dd aTH05_14 ; "No.14 世界の果て 〜 World's End " - dd aTH05_15 ; "No.15 神話幻想 〜 Infinite Being " - dd aTH05_16 ; "No.16 不思議の国のアリス " - dd aTH05_17 ; "No.17 the Grimoire of Alice " - dd aTH05_18 ; "No.18 神社 " - dd aTH05_19 ; "No.19 Endless " - dd aTH05_20 ; "No.20 久遠の楽園 " - dd aTH05_21 ; "No.21 Mystic Dream " - dd aTH05_22 ; "No.22 Peaceful Romancer " - dd aTH05_23 ; "No.23 魂の休らむ所 " - dd aMUSICROOM_QUIT1 ; " タイトルに戻る " - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 -public _MUSIC_FILES -_MUSIC_FILES label dword - dd aR_00 ; "r_00" - dd aR_01 ; "r_01" - dd aR_02 ; "r_02" - dd aR_03 ; "r_03" - dd aR_04 ; "r_04" - dd aR_05 ; "r_05" - dd aR_06 ; "r_06" - dd aR_07 ; "r_07" - dd aR_08 ; "r_08" - dd aR_09 ; "r_09" - dd aR_10 ; "r_10" - dd aR_11 ; "r_11" - dd aR_12 ; "r_12" - dd aR_13 ; "r_13" - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd aH_op ; "h_op" - dd aH_st00 ; "h_st00" - dd aH_st00b ; "h_st00b" - dd aH_st01 ; "h_st01" - dd aH_st01b ; "h_st01b" - dd aH_st02 ; "h_st02" - dd aH_st02b ; "h_st02b" - dd aH_st03 ; "h_st03" - dd aH_st03b ; "h_st03b" - dd aH_st04 ; "h_st04" - dd aH_st04b ; "h_st04b" - dd aH_st05 ; "h_st05" - dd aH_st05b ; "h_st05b" - dd aH_end ; "h_end" - dd aH_staff ; "h_staff" - dd aH_ng00 ; "h_ng00" - dd aH_ng01 ; "h_ng01" - dd aH_ng02 ; "h_ng02" - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd aY_op ; "y_op" - dd aY_select ; "y_select" - dd aY_00mm ; "y_00mm" - dd aY_01mm ; "y_01mm" - dd aY_02mm ; "y_02mm" - dd aY_03mm ; "y_03mm" - dd aY_04mm ; "y_04mm" - dd aY_05mm ; "y_05mm" - dd aY_06mm ; "y_06mm" - dd aY_dec ; "y_dec" - dd aY_07mm ; "y_07mm" - dd aY_08mm ; "y_08mm" - dd aY_demo1 ; "y_demo1" - dd aY_demo2 ; "y_demo2" - dd aY_demo3 ; "y_demo3" - dd aY_demo4 ; "y_demo4" - dd aY_demo5 ; "y_demo5" - dd aY_ed ; "y_ed" - dd aY_score ; "y_score" - dd aY_win ; "y_win" - dd aY_over ; "y_over" - dd aY_ng00 ; "y_ng00" - dd aY_ng01 ; "y_ng01" - dd aY_ng02 ; "y_ng02" - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd aG_op ; "g_op" - dd aG_st00 ; "g_st00" - dd aG_st10 ; "g_st10" - dd aG_st00b ; "g_st00b" - dd aG_st01 ; "g_st01" - dd aG_st01b ; "g_st01b" - dd aG_st02 ; "g_st02" - dd aG_st02b ; "g_st02b" - dd aG_st03 ; "g_st03" - dd aG_st03c ; "g_st03c" - dd aG_st03b ; "g_st03b" - dd aG_st04 ; "g_st04" - dd aG_st04b ; "g_st04b" - dd aG_st05 ; "g_st05" - dd aG_st05b ; "g_st05b" - dd aG_st06 ; "g_st06" - dd aG_st06b ; "g_st06b" - dd aG_st06c ; "g_st06c" - dd aG_end1 ; "g_end1" - dd aG_end2 ; "g_end2" - dd aG_staff ; "g_staff" - dd aG_name ; "g_name" - dd aG_ng00 ; "g_ng00" - dd aG_ng01 ; "g_ng01" - dd aG_ng02 ; "g_ng02" - dd aG_ng03 ; "g_ng03" - dd aG_ng04 ; "g_ng04" - dd aG_ng05 ; "g_ng05" - dd 0 - dd 0 - dd aH_op+2 - dd aH_st00+2 - dd aH_st00b+2 - dd aH_st01+2 - dd aH_st01b+2 - dd aH_st02+2 - dd aH_st02b+2 - dd aH_st03+2 - dd aH_st03b+2 - dd aG_st03c+2 - dd aSt03d ; "st03d" - dd aH_st04+2 - dd aH_st04b+2 - dd aH_st05+2 - dd aH_st05b+2 - dd aG_st06+2 - dd aG_st06b+2 - dd aEd00 ; "ed00" - dd aEd01 ; "ed01" - dd aEd02 ; "ed02" - dd aH_staff+2 - dd aExed ; "exed" - dd aG_name+2 - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 - dd 0 -music_game dw 4 -MUSICROOM_TRACKCOUNTS dw 14,18,24,28,23 -include th02/op/polygons[data].asm -aMUSICROOM_UP db ' ------ ▲ ------ ',0 -aMUSICROOM_DOWN db ' ------ ▼ ------ ',0 -asc_104D5 db ' ---------------- ',0 -aMUSICROOM_TH01 db ' 第1弾 東方靈異伝 Arrange ver ',0 -aMUSICROOM_TH02 db ' 第2弾 東方封魔録 Special MIX ',0 -aMUSICROOM_TH03 db ' 第3弾 東方夢時空 Special MIX ',0 -aMUSICROOM_TH04 db ' 第4弾 東方幻想郷 Special MIX ',0 -aMUSICROOM_TH05 db ' 第5弾 東方怪綺談 MysticSquare ',0 -aTH01_01 db 'No.1 A Sacred Lot ',0 -aTH01_02 db 'No.2 永遠の巫女 ',0 -aTH01_03 db 'No.3 The Positive and Negative ',0 -aTH01_04 db 'No.4 Highly Responsive to Prayers ',0 -aTH01_05 db 'No.5 東方怪奇談 ',0 -aTH01_06 db 'No.6 天使伝説 ',0 -aTH01_07 db 'No.7 Oriental Magician ',0 -aTH01_08 db 'No.8 破邪の小太刀 ',0 -aTH01_09 db 'No.9 魔鏡 ',0 -aTH01_10 db 'No.10 the Legend of KAGE ',0 -aTH01_11 db 'No.11 いざ、倒れ逝くその時まで ',0 -aTH01_12 db 'No.12 Civilization of Magic ',0 -aTH01_13 db 'No.13 星幽天使 ',0 -aTH01_14 db 'No.14 アイリス ',0 -aMUSICROOM_QUIT1 db ' タイトルに戻る ',0 -aTH02_01 db 'No.1 東方封魔録 〜浄土曼荼羅 ',0 -aTH02_02 db 'No.2   博麗 〜Eastern Wind ',0 -aTH02_03 db 'No.3   She',27h,'s in a temper!! ',0 -aTH02_04 db 'No.4   End of Daylight  ',0 -aTH02_05 db 'No.5     やみのちから   ',0 -aTH02_06 db 'No.6      幻夢界     ',0 -aTH02_07 db 'No.7     死を賭して    ',0 -aTH02_08 db 'No.8 ひもろぎ、むらさきにもえ ',0 -aTH02_09 db 'No.9     恋色マジック   ',0 -aTH02_10 db 'No.10  東方封魔録 〜幽幻乱舞 ',0 -aTH02_11 db 'No.11 Complete Darkness ',0 -aTH02_12 db 'No.12   エキストララブ ',0 -aTH02_13 db 'No.13 戦車むすめのみるゆめ ',0 -aTH02_14 db 'No.14   遠野の森    ',0 -aTH02_15 db 'No.15 昔話わんだーらんど ',0 -aTH02_16 db '未使用.1 博麗神社境内 ',0 -aTH02_17 db '未使用.2  陽落ちて   ',0 -aTH02_18 db '未使用.3  封魔終演   ',0 -aTH03_01 db 'No.1  夢は時空を越えて ',0 -aTH03_02 db 'No.2     Selection ',0 -aTH03_03 db 'No.3 東方妖恋談 ',0 -aTH03_04 db 'No.4 Reincarnation ',0 -aTH03_05 db 'No.5 Dim. Dream ',0 -aTH03_06 db 'No.6 Tabula rasa 〜空白少女 ',0 -aTH03_07 db 'No.7   Maniacal Princess ',0 -aTH03_08 db 'No.8 夢消失 〜Lost Dream ',0 -aTH03_09 db 'No.9 夢幻遊戯 〜Dream War ',0 -aTH03_10 db 'No.10 魔法決戦!〜Fight it out! ',0 -aTH03_11 db 'No.11   Sailor of Time ',0 -aTH03_12 db 'No.12 Strawberry Crisis!! ',0 -aTH03_13 db 'No.13 非統一魔法世界論 ',0 -aTH03_14 db 'No.14  魔法鐘愛 ',0 -aTH03_15 db 'No.15  久遠の夢 ',0 -aTH03_16 db 'No.16 東方の青い空 ',0 -aTH03_17 db 'No.17 永遠の満月 ',0 -aTH03_18 db 'No.18 Maple Dream... ',0 -aTH03_19 db 'No.19 霊人の休日 ',0 -aTH03_20 db 'No.20 勝利デモ ',0 -aTH03_21 db 'No.21 ゲームオーバー ',0 -aTH03_22 db '未使用.1 時の風 ',0 -aTH03_23 db '未使用.2 スターボウドリーム ',0 -aTH03_24 db '未使用.3 Phantasmagoria ',0 -aMUSICROOM_QUIT2 db ' タイトルに戻る ',0 -aTH04_01 db 'No.1 幻想郷 〜 Lotus Land Story ',0 -aTH04_02 db 'No.2 Witching Dream ',0 -aTH04_03 db 'No.3 Selene',27h,'s light ',0 -aTH04_04 db 'No.4 装飾戦 〜 Decoration Battle ',0 -aTH04_05 db 'No.5 Break the Sabbath ',0 -aTH04_06 db 'No.6 紅響曲 〜 Scarlet Phoneme ',0 -aTH04_07 db 'No.7 Bad Apple!! ',0 -aTH04_08 db 'No.8 霊戦 〜 Perdition crisis ',0 -aTH04_09 db 'No.9 アリスマエステラ ',0 -aTH04_10 db 'No.10 少女綺想曲 〜 Capriccio ',0 -aTH04_11 db 'No.11 星の器 〜 Casket of Star ',0 -aTH04_12 db 'No.12 Lotus Love ',0 -aTH04_13 db 'No.13 眠れる恐怖 〜Sleeping Terror ',0 -aTH04_14 db 'No.14 Dream Land ',0 -aTH04_15 db 'No.15 幽夢 〜 Inanimate Dream ',0 -aTH04_16 db 'No.16 禁じざるをえない遊戯 ',0 -aTH04_17 db 'No.17 メイド幻想 〜 Icemilk Magic ',0 -aTH04_18 db 'No.18 かわいい悪魔 〜 Innocence ',0 -aTH04_19 db 'No.19 Days ',0 -aTH04_20 db 'No.20 Peaceful ',0 -aTH04_21 db 'No.21 Arcadian Dream ',0 -aTH04_22 db 'No.22 幻想の住人 ',0 -aTH04_23 db '未使用.1 Lotus Road ',0 -aTH04_24 db '未使用.2 Dreamy pilot ',0 -aTH04_25 db '未使用.3 Incomplete Plot ',0 -aTH04_26 db '未使用.4 Border Land ',0 -aTH04_27 db '未使用.5 Magic Shop of Raspberry ',0 -aTH04_28 db '未使用.6 Crescent Dream ',0 -aTH05_01 db 'No.1 怪綺談 〜 Mystic Square ',0 -aTH05_02 db 'No.2 Dream Express ',0 -aTH05_03 db 'No.3 魔法陣 〜 Magic Square ',0 -aTH05_04 db 'No.4 夢想時空 ',0 -aTH05_05 db 'No.5 霊天 〜 Spiritual Heaven ',0 -aTH05_06 db 'No.6 Romantic Children ',0 -aTH05_07 db 'No.7 プラスチックマインド ',0 -aTH05_08 db 'No.8 メイプルワイズ ',0 -aTH05_09 db 'No.9 禁断の魔法 〜 Forbidden Magic',0 -aTH05_10 db 'No.10 真紅の少女 〜 Crimson Dead!!',0 -aTH05_11 db 'No.11 裏切りの少女 〜 Judas Kiss ',0 -aTH05_12 db 'No.12 the Last Judgement ',0 -aTH05_13 db 'No.13 悲しき人形 〜 Doll of Misery',0 -aTH05_14 db 'No.14 世界の果て 〜 World',27h,'s End ',0 -aTH05_15 db 'No.15 神話幻想 〜 Infinite Being ',0 -aTH05_16 db 'No.16 不思議の国のアリス ',0 -aTH05_17 db 'No.17 the Grimoire of Alice ',0 -aTH05_18 db 'No.18 神社 ',0 -aTH05_19 db 'No.19 Endless ',0 -aTH05_20 db 'No.20 久遠の楽園 ',0 -aTH05_21 db 'No.21 Mystic Dream ',0 -aTH05_22 db 'No.22 Peaceful Romancer ',0 -aTH05_23 db 'No.23 魂の休らむ所 ',0 -aR_00 db 'r_00',0 -aR_01 db 'r_01',0 -aR_02 db 'r_02',0 -aR_03 db 'r_03',0 -aR_04 db 'r_04',0 -aR_05 db 'r_05',0 -aR_06 db 'r_06',0 -aR_07 db 'r_07',0 -aR_08 db 'r_08',0 -aR_09 db 'r_09',0 -aR_10 db 'r_10',0 -aR_11 db 'r_11',0 -aR_12 db 'r_12',0 -aR_13 db 'r_13',0 -aH_op db 'h_op',0 -aH_st00 db 'h_st00',0 -aH_st00b db 'h_st00b',0 -aH_st01 db 'h_st01',0 -aH_st01b db 'h_st01b',0 -aH_st02 db 'h_st02',0 -aH_st02b db 'h_st02b',0 -aH_st03 db 'h_st03',0 -aH_st03b db 'h_st03b',0 -aH_st04 db 'h_st04',0 -aH_st04b db 'h_st04b',0 -aH_st05 db 'h_st05',0 -aH_st05b db 'h_st05b',0 -aH_end db 'h_end',0 -aH_staff db 'h_staff',0 -aH_ng00 db 'h_ng00',0 -aH_ng01 db 'h_ng01',0 -aH_ng02 db 'h_ng02',0 -aY_op db 'y_op',0 -aY_select db 'y_select',0 -aY_00mm db 'y_00mm',0 -aY_01mm db 'y_01mm',0 -aY_02mm db 'y_02mm',0 -aY_03mm db 'y_03mm',0 -aY_04mm db 'y_04mm',0 -aY_05mm db 'y_05mm',0 -aY_06mm db 'y_06mm',0 -aY_dec db 'y_dec',0 -aY_07mm db 'y_07mm',0 -aY_08mm db 'y_08mm',0 -aY_demo1 db 'y_demo1',0 -aY_demo2 db 'y_demo2',0 -aY_demo3 db 'y_demo3',0 -aY_demo4 db 'y_demo4',0 -aY_demo5 db 'y_demo5',0 -aY_ed db 'y_ed',0 -aY_score db 'y_score',0 -aY_win db 'y_win',0 -aY_over db 'y_over',0 -aY_ng00 db 'y_ng00',0 -aY_ng01 db 'y_ng01',0 -aY_ng02 db 'y_ng02',0 -aG_op db 'g_op',0 -aG_st00 db 'g_st00',0 -aG_st10 db 'g_st10',0 -aG_st00b db 'g_st00b',0 -aG_st01 db 'g_st01',0 -aG_st01b db 'g_st01b',0 -aG_st02 db 'g_st02',0 -aG_st02b db 'g_st02b',0 -aG_st03 db 'g_st03',0 -aG_st03c db 'g_st03c',0 -aG_st03b db 'g_st03b',0 -aG_st04 db 'g_st04',0 -aG_st04b db 'g_st04b',0 -aG_st05 db 'g_st05',0 -aG_st05b db 'g_st05b',0 -aG_st06 db 'g_st06',0 -aG_st06b db 'g_st06b',0 -aG_st06c db 'g_st06c',0 -aG_end1 db 'g_end1',0 -aG_end2 db 'g_end2',0 -aG_staff db 'g_staff',0 -aG_name db 'g_name',0 -aG_ng00 db 'g_ng00',0 -aG_ng01 db 'g_ng01',0 -aG_ng02 db 'g_ng02',0 -aG_ng03 db 'g_ng03',0 -aG_ng04 db 'g_ng04',0 -aG_ng05 db 'g_ng05',0 -aSt03d db 'st03d',0 -aEd00 db 'ed00',0 -aEd01 db 'ed01',0 -aEd02 db 'ed02',0 -aExed db 'exed',0 + extern _LABEL_UP:dword + extern _LABEL_DOWN:dword + extern _LABEL_GAME:dword + extern _MUSIC_CHOICES:dword + extern _MUSIC_FILES:dword + extern _game_sel:word + extern _TRACK_COUNT:word:5 + extern _polygons_initialized:byte + aH_op = ($ - 530) + include th05/op/music_cmt_load[data].asm aMusic_pi db 'music.pi',0 aMusic_dat db 'music.dat',0