From c5ee885e0fb9957899ae61b5ee8437d1586a2069 Mon Sep 17 00:00:00 2001 From: dgrfactory <46675013+dgrfactory@users.noreply.github.com> Date: Wed, 29 Jan 2020 23:05:47 +0900 Subject: [PATCH] v2.18.1 (#15) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * v2.18.1 * [設定] に [シーク時間] メニューを追加。 * シーク時間が秒単位の場合は、秒表示に変更。 * v2.18.0 で、一部の曲において冒頭の音が鳴らない不具合を修正。 * 一部処理を最適化。 * SPCPLAY.EXE v2.18.0 の言語設定が適用されない不具合を修正。 * v2.18.1 * ラベル調整 * v2.18.1 * README 更新 --- README.md | 42 +++++++++++---------- snesapu.dll/APU.asm | 6 +-- snesapu.dll/DSP.asm | 34 +++++++++++------ snesapu.dll/version.rc | 10 ++--- spccmd.exe/spccmd.dpr | 2 +- spccmd.exe/spccmd.rc | 2 +- spcplay.exe/spcplay.dpr | 83 +++++++++++++++++++++++++---------------- spcplay.exe/spcplay.rc | 10 ++--- 8 files changed, 112 insertions(+), 77 deletions(-) diff --git a/README.md b/README.md index 4beab81..9d5fa6f 100644 --- a/README.md +++ b/README.md @@ -3,46 +3,50 @@ ## 概要 SNES SPC700 Player と改良版 SNESAPU.DLL 一式のソースコードです。 -アプリの詳細については、[デグレファクトリーのサイト](https://dgrfactory.jp/spcplay/index.html)をご覧ください。 +アプリの詳細については、[デグレファクトリーのサイト (日本語)](https://dgrfactory.jp/spcplay/index.html) をご覧ください。 -## spcplay.exe +## Overview -**SNES SPC700 Player:** -スーパーファミコンの音楽ファイル (SPC) をパソコン上で再生するための SPC 専用プレイヤーです。 -Win32API を直接使用しているので、軽量・軽快に動作します。 +Source codes of SNES SPC700 Player and improved SNESAPU.DLL. +If you want to see details of this software, please visit [release page (in English)](https://github.com/dgrfactory/spcplay/releases). -コンパイルに必要なソフト: dcc32 (Delphi6 UP2 RTL3 で動作確認済) +## How to build + +### spcplay.exe + +Frontend for using SNESAPU.DLL. +Required software: dcc32 (Delphi6 UP2 RTL3) ``` rc.exe /l 0x411 /fo spcplay.res /d "NDEBUG" spcplay.rc dcc32.exe spcplay.dpr ``` -## snesapu.dll - -**改良版SNESAPU.DLL:** -再現性と音質に定評がある Alpha-II Productions 製の SNESAPU.DLL v2.0 をベースに、最新版 v3.0 の一部機能や独自拡張機能を取り込んでいます。 +### snesapu.dll -コンパイルに必要なソフト: VC++ (VC++6 SP6 で動作確認済), nasm (Netwide Assembler) +SNES SPC700 emulator. (forks from [Alpha-II Productions](https://www.alpha-ii.com/)) +Required softwares: VC++ (VC++6 SP6), nasm (Netwide Assembler) ``` nasm.exe -D WIN32 -D STDCALL -O2 -w-macro-params -f win32 -o .\Release\SPC700.obj SPC700.asm nasm.exe -D WIN32 -D STDCALL -O2 -w-macro-params -f win32 -o .\Release\DSP.obj DSP.asm nasm.exe -D WIN32 -D STDCALL -O2 -w-macro-params -f win32 -o .\Release\APU.obj APU.asm -rc.exe /l 0x411 /fo Release\version.res /d "NDEBUG" version.rc +rc.exe /l 0x411 /fo .\Release\version.res /d "NDEBUG" version.rc cl.exe @option\snesapu-cl.txt link.exe @option\snesapu-link.txt ``` -※他プレイヤー用をビルドする場合は、thirdparty ディレクトリの中身を本体にコピーして、snesapu-link.txt の代わりに snesapu-3rd-link.txt を使用。 - -## spccmd.exe +for 3rd-party players: +``` +copy /y thirdparty\* . + : (nasm, rc, cl) +link.exe @option\snesapu-3rd-link.txt +``` -**SNES SPC700 Player 外部コマンド拡張ツール:** -SNES SPC700 Player をコマンドラインで操作するアプリです。 -コマンドによる再生・停止操作、SPC700 や DSP のデバッグ、G.I.M.I.C 等の転送プログラムのシミュレーション等が行えます。 +### spccmd.exe -コンパイルに必要なソフト: dcc32 (Delphi6 UP2 RTL3 で動作確認済) +Software that operates spcplay.exe on the command line. +Required software: dcc32 (Delphi6 UP2 RTL3) ``` rc.exe /l 0x411 /fo spccmd.res /d "NDEBUG" spccmd.rc diff --git a/snesapu.dll/APU.asm b/snesapu.dll/APU.asm index da1b88d..e18b049 100644 --- a/snesapu.dll/APU.asm +++ b/snesapu.dll/APU.asm @@ -19,7 +19,7 @@ ;59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ; ; Copyright (C) 2003-2006 Alpha-II Productions -; Copyright (C) 2003-2019 degrade-factory +; Copyright (C) 2003-2020 degrade-factory ;=================================================================================================== CPU 386 @@ -48,9 +48,9 @@ SECTION .data ALIGN=32 ; ----- degrade-factory code [2019/07/15] ----- apuOpt DD (CPU_CYC << 24) | (DEBUG << 16) | (DSPINTEG << 17) | (VMETERM << 8) | (VMETERV << 9) | (1 << 10) | (STEREO << 11) \ | (HALFC << 1) | (CNTBK << 2) | (SPEED << 3) | (IPLW << 4) | (DSPBK << 5) | (INTBK << 6) - apuDllVer DD 21800h ;SNESAPU.DLL Current Version + apuDllVer DD 21861h ;SNESAPU.DLL Current Version apuCmpVer DD 11000h ;SNESAPU.DLL Backwards Compatible Version - apuVerStr DD "2.18.0 (build 6694)" ;SNESAPU.DLL Current Version (32byte String) + apuVerStr DD "2.18.1 (build 6862)" ;SNESAPU.DLL Current Version (32byte String) DD 8 ; ----- degrade-factory code [END] ----- diff --git a/snesapu.dll/DSP.asm b/snesapu.dll/DSP.asm index d9d8f71..47d9b75 100644 --- a/snesapu.dll/DSP.asm +++ b/snesapu.dll/DSP.asm @@ -19,7 +19,7 @@ ;59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ; ; Copyright (C) 1999-2006 Alpha-II Productions -; Copyright (C) 2003-2019 degrade-factory +; Copyright (C) 2003-2020 degrade-factory ;=================================================================================================== CPU 386 @@ -892,9 +892,6 @@ USES ECX,EBX,EDI Mov [volMainR],EAX Mov [volEchoL],EAX Mov [volEchoR],EAX -; ----- degrade-factory code [2009/03/08] ----- - Call ResetVol -; ----- degrade-factory code [END] ----- ;Erase noise settings -------------------- Mov [nRate],EAX @@ -917,9 +914,10 @@ USES ECX,EBX,EDI Mov [echoFBCT],EAX Mov [4+echoFBCT],EAX -; ----- degrade-factory code [2009/03/08] ----- +; ----- degrade-factory code [2020/01/05] ----- + Call ResetVol Call ResetEcho - Call ResetLow + Call ResetLow ;EAX is 0, after call ResetLow ; ----- degrade-factory code [END] ----- Mov EDI,firTaps ;Reset filter coefficients @@ -1498,8 +1496,9 @@ USES ALL Sub CL,10h JNC short .NextTap -; ----- degrade-factory code [2009/03/08] ----- +; ----- degrade-factory code [2020/01/05] ----- Call ResetVol + Call ResetKON ; ----- degrade-factory code [END] ----- ENDP @@ -1685,6 +1684,10 @@ USES ECX,EDX,EBX Mov AL,[dsp+evolR] Call InitReg +; ----- degrade-factory code [2020/01/05] ----- + ;Call ResetVol ;Don't call ResetVol to smooth fade-out +; ----- degrade-factory code [END] ----- + ENDP @@ -2042,7 +2045,7 @@ USES ESI JZ ChgGain ; No, It's in gain mode ChgAtt: -; ----- degrade-factory code [2012/06/09] ----- +; ----- degrade-factory code [2019/08/20] ----- Cmp dword [EBX+eVal],D_MAX ;Did envelope reach destination value? JGE short .ChgDec ; Yes, change decay mode @@ -2051,7 +2054,7 @@ ChgAtt: Mov AL,byte [ESI+adsr] And AL,0Fh - ShL AL,1 ;Adjust AL to index rateTab + Add AL,AL ;Adjust AL to index rateTab Inc AL Cmp AL,1Fh ;Is there an attack? JE short .NoAtt ; Yes @@ -2701,6 +2704,15 @@ RKOn: ; ----- degrade-factory code [END] ----- Ret +; ----- degrade-factory code [2020/01/05] ----- +ResetKON: +%if INTBK && DSPINTEG + XOr CH,CH ;Set CH = 0 for use with CatchKOn + CatchKOn +%endif + Ret +; ----- degrade-factory code [END] ----- + ;============================================ ;Voice volume @@ -3195,9 +3207,9 @@ ENDP Mov EAX,[nRate] Add [nAcc],EAX JNC short %%NoNInc -; ----- degrade-factory code [2016/04/17] ----- +; ----- degrade-factory code [2019/08/20] ----- Mov EAX,[nSeed] - ShL EAX,1 + Add EAX,EAX JNS short %%NoiseOK XOr EAX,40001h diff --git a/snesapu.dll/version.rc b/snesapu.dll/version.rc index 93dc807..85f2fd4 100644 --- a/snesapu.dll/version.rc +++ b/snesapu.dll/version.rc @@ -1,6 +1,6 @@ 1 VERSIONINFO - FILEVERSION 2,18,0,6694 - PRODUCTVERSION 2,18,0,0 + FILEVERSION 2,18,1,6862 + PRODUCTVERSION 2,18,1,0 FILEFLAGSMASK 0x3fL FILEFLAGS 0x8L FILEOS 0x10004L @@ -12,11 +12,11 @@ BEGIN BLOCK "041103A4" BEGIN VALUE "FileDescription", "SNES SPC700 Emulator\0" - VALUE "FileVersion", "2.18.0 (build 6694)\0" - VALUE "LegalCopyright", "Copyright (C) 1999-2008 Alpha-II Productions; (C) 2003-2019 degrade-factory.\0" + VALUE "FileVersion", "2.18.1 (build 6862)\0" + VALUE "LegalCopyright", "Copyright (C) 1999-2008 Alpha-II Productions; (C) 2003-2020 degrade-factory.\0" VALUE "LegalTrademarks", "SNES is a registered trademark of Nintendo.\0" VALUE "ProductName", "SNESAPU\0" - VALUE "ProductVersion", "2.18.0\0" + VALUE "ProductVersion", "2.18.1\0" VALUE "URL", "http://dgrfactory.jp/\0" END END diff --git a/spccmd.exe/spccmd.dpr b/spccmd.exe/spccmd.dpr index affeb68..034f3e8 100644 --- a/spccmd.exe/spccmd.dpr +++ b/spccmd.exe/spccmd.dpr @@ -44,7 +44,7 @@ // GNU ʌOp_񏑃o[W 2 ̃hLǵAt LICENSE ɂ܂B // // -// Copyright (C) 2003-2019 degrade-factory. All rights reserved. +// Copyright (C) 2003-2020 degrade-factory. All rights reserved. // // ================================================================================================= program spccmd; diff --git a/spccmd.exe/spccmd.rc b/spccmd.exe/spccmd.rc index 28d4ec9..74ccad1 100644 --- a/spccmd.exe/spccmd.rc +++ b/spccmd.exe/spccmd.rc @@ -13,7 +13,7 @@ BEGIN BEGIN VALUE "FileDescription", "SNES SPC700 Player external command tool\0" VALUE "FileVersion", "1.5.1 (build 4212)\0" - VALUE "LegalCopyright", "Copyright (C) 2008-2019 degrade-factory.\0" + VALUE "LegalCopyright", "Copyright (C) 2008-2020 degrade-factory.\0" VALUE "LegalTrademarks", "SNES is a registered trademark of Nintendo.\0" VALUE "ProductVersion", "1.5.1\0" VALUE "URL", "http://dgrfactory.jp/\0" diff --git a/spcplay.exe/spcplay.dpr b/spcplay.exe/spcplay.dpr index 4d78917..21f7c7a 100644 --- a/spcplay.exe/spcplay.dpr +++ b/spcplay.exe/spcplay.dpr @@ -852,6 +852,7 @@ type cmSetupOption: CMENU; // j[ NX (ݒ - gݒ) cmSetupTime: CMENU; // j[ NX (ݒ - t) cmSetupOrder: CMENU; // j[ NX (ݒ - t) + cmSetupSeek: CMENU; // j[ NX (ݒ - V[N) cmSetupInfo: CMENU; // j[ NX (ݒ - \) cmSetupPriority: CMENU; // j[ NX (ݒ - {Dx) cmList: CMENU; // j[ NX (vCXg) @@ -2325,8 +2326,8 @@ const DEFAULT_TITLE: string = 'SNES SPC700 Player'; SPCPLAY_TITLE = '[ SNES SPC700 Player ]' + CRLF + ' SPCPLAY.EXE v'; SNESAPU_TITLE = '[ SNES SPC700 Emulator ]' + CRLF + ' SNESAPU.DLL v'; - SPCPLAY_VERSION = '2.18.0 (build 6694)'; - SNESAPU_VERSION = $21800; + SPCPLAY_VERSION = '2.18.1 (build 6862)'; + SNESAPU_VERSION = $21861; APPLINK_VERSION = $02170500; CBE_DSPREG = $1; @@ -2851,15 +2852,19 @@ const MENU_SETUP_ORDER = 61; MENU_SETUP_ORDER_SIZE = 6; MENU_SETUP_ORDER_BASE = 610; - MENU_SETUP_INFO = 62; + MENU_SETUP_SEEK = 62; + MENU_SETUP_SEEK_SIZE = 5; + MENU_SETUP_SEEK_BASE = 620; // +10 + MENU_SETUP_SEEK_VALUE: array[0..MENU_SETUP_SEEK_SIZE - 1] of longword = (1000, 2000, 3000, 4000, 5000); + MENU_SETUP_INFO = 63; MENU_SETUP_INFO_SIZE = 9; - MENU_SETUP_INFO_BASE = 620; - MENU_SETUP_INFO_RESET = 619; - MENU_SETUP_PRIORITY = 63; + MENU_SETUP_INFO_BASE = 630; + MENU_SETUP_INFO_RESET = 629; + MENU_SETUP_PRIORITY = 64; MENU_SETUP_PRIORITY_SIZE = 6; - MENU_SETUP_PRIORITY_BASE = 630; + MENU_SETUP_PRIORITY_BASE = 640; MENU_SETUP_PRIORITY_VALUE: array[0..MENU_SETUP_PRIORITY_SIZE - 1] of longword = (REALTIME_PRIORITY_CLASS, HIGH_PRIORITY_CLASS, ABOVE_NORMAL_PRIORITY_CLASS, NORMAL_PRIORITY_CLASS, BELOW_NORMAL_PRIORITY_CLASS, IDLE_PRIORITY_CLASS); - MENU_SETUP_TOPMOST = 640; + MENU_SETUP_TOPMOST = 650; MENU_LIST_PLAY = 700; MENU_LIST_PLAY_SELECT = 701; MENU_LIST_PLAY_SIZE = 6; @@ -2984,17 +2989,18 @@ const STR_MENU_SETUP_MUTE: array[0..1] of pchar = ('`l ~[g(&M)', 'Channel &Mute'); STR_MENU_SETUP_NOISE: array[0..1] of pchar = ('`l mCY(&N)', 'Channel &Noise'); STR_MENU_SETUP_SWITCH_CHANNEL: array[0..1] of pchar = ('`l ', 'Channel '); - STR_MENU_SETUP_OPTION: array[0..1] of pchar = ('gݒ(&X)', 'E&xpansion'); + STR_MENU_SETUP_OPTION: array[0..1] of pchar = ('gݒ(&X)', 'E&xpansion Flags'); STR_MENU_SETUP_TIME: array[0..1] of pchar = ('t(&T)', 'Play &Time'); STR_MENU_SETUP_TIME_DISABLE: array[0..1] of pchar = ('(&D)', '&Disable'); STR_MENU_SETUP_TIME_ID666: array[0..1] of pchar = ('&ID666 ݒlgp', 'Enable &ID666 Time'); STR_MENU_SETUP_TIME_DEFAULT: array[0..1] of pchar = ('ftHglgp(&E)', '&Enable Default Time'); - STR_MENU_SETUP_TIME_START: array[0..1] of pchar = ('Jnʒuݒ(&S)', 'Set &Start Mark'); - STR_MENU_SETUP_TIME_LIMIT: array[0..1] of pchar = ('Iʒuݒ(&L)', 'Set &Limit Mark'); - STR_MENU_SETUP_TIME_RESET: array[0..1] of pchar = ('ʒuZbg(&R)', '&Reset Mark'); + STR_MENU_SETUP_TIME_START: array[0..1] of pchar = ('Jnʒuݒ(&S)', 'Set &Start Position Mark'); + STR_MENU_SETUP_TIME_LIMIT: array[0..1] of pchar = ('Iʒuݒ(&L)', 'Set &Limit Position Mark'); + STR_MENU_SETUP_TIME_RESET: array[0..1] of pchar = ('ʒuZbg(&R)', '&Reset Position Marks'); STR_MENU_SETUP_ORDER: array[0..1] of pchar = ('t(&O)', 'Play &Order'); STR_MENU_SETUP_INFO: array[0..1] of pchar = ('\(&A)', 'I&nformation Viewer'); - STR_MENU_SETUP_INFO_RESET: array[0..1] of pchar = ('`l\(&H)', '&Hide Mute Channel'); + STR_MENU_SETUP_INFO_RESET: array[0..1] of pchar = ('`l\(&H)', '&Hide Muted Channels'); + STR_MENU_SETUP_SEEK: array[0..1] of pchar = ('V[N(&K)', 'See&k Time'); STR_MENU_SETUP_PRIORITY: array[0..1] of pchar = ('Dx(&U)', 'CP&U Priority'); STR_MENU_SETUP_TOPMOST: array[0..1] of pchar = ('ɎOɕ\(&W)', 'Al&ways on Top'); STR_MENU_LIST_PLAY: array[0..1] of pchar = ('tJn(&P)', '&Play'); @@ -3041,14 +3047,19 @@ const STR_MENU_SETUP_INFO_SUB: array[0..1] of array[0..MENU_SETUP_INFO_SIZE - 1] of pchar = ( ('OtBbN CWP[^(&G)', '~LT[(&M)', '`l 1 (&C)', '`l 2 (&A)', '`l 3 (&N)', '`l 4 (&E)', '&SPC 1', 'S&PC 2', 'Script&700 fobO'), ('&Graphic Indicator', '&Mixer', '&Channel 1', 'Ch&annel 2', 'Cha&nnel 3', 'Chann&el 4', '&SPC Tags 1', 'S&PC Tags 2', 'Script&700 Debug')); + STR_MENU_SETUP_SEEK_SUB: array[0..1] of array[0..MENU_SETUP_SEEK_SIZE - 1] of pchar = ( + ('&1 b', '&2 b', '&3 b', '&4 b', '&5 b'), + ('&1 s', '&2 s', '&3 s', '&4 s', '&5 s')); STR_MENU_SETUP_PRIORITY_SUB: array[0..1] of array[0..MENU_SETUP_PRIORITY_SIZE - 1] of pchar = ( ('A^C(&R)', '(&H)', 'Wȏ(&A)', 'W(&N)', 'Wȉ(&B)', '(&L)'), ('&Realtime', '&High', '&Above Normal', '&Normal', '&Below Normal', '&Low')); STR_MENU_LIST_PLAY_SUB: array[0..1] of array[0..MENU_LIST_PLAY_SIZE - 1] of pchar = ( ('(&N)', 'O(&P)', '_(&M)', 'Vbt(&H)', 'ŏ(&F)', 'Ōォ(&L)'), ('&Next Item', '&Previous Item', 'Rando&m', 'S&huffle', '&First Item', '&Last Item')); - STR_MENU_SETUP_PERCENT: array[0..1] of string = (' ', ' %'); - STR_MENU_SETUP_MSEC: array[0..1] of string = (' ms', ' ms'); + STR_MENU_SETUP_PERCENT: array[0..1] of string = ('', '%'); + STR_MENU_SETUP_SEC1: array[0..1] of string = ('b', 's'); + STR_MENU_SETUP_SEC2: array[0..1] of string = ('sec', 's '); + STR_MENU_SETUP_MSEC: array[0..1] of string = ('ms', 'ms'); STR_BUTTON_OPEN = 'OPEN'; STR_BUTTON_SAVE = 'SAVE'; STR_BUTTON_PLAY = 'PLAY'; @@ -3074,10 +3085,10 @@ const TITLE_MAIN_HEADER: array[0..1] of string = (' - ', ' - '); TITLE_INFO_HEADER: array[0..1] of string = ('s ', '< '); TITLE_INFO_FOOTER: array[0..1] of string = (' t', ' >'); - TITLE_INFO_SEPARATE_HEADER: array[0..1] of string = ('EgUx ', 'Separate = '); - TITLE_INFO_FEEDBACK_HEADER: array[0..1] of string = ('tB[hobN]x ', 'Echo Feedback = '); - TITLE_INFO_SPEED_HEADER: array[0..1] of string = ('tx ', 'Speed = '); - TITLE_INFO_AMP_HEADER: array[0..1] of string = (' ', 'Volume = '); + TITLE_INFO_SEPARATE_HEADER: array[0..1] of string = ('EgUx ', 'Separate '); + TITLE_INFO_FEEDBACK_HEADER: array[0..1] of string = ('tB[hobN]x ', 'Echo Feedback '); + TITLE_INFO_SPEED_HEADER: array[0..1] of string = ('tx ', 'Speed '); + TITLE_INFO_AMP_HEADER: array[0..1] of string = (' ', 'Volume '); TITLE_INFO_SEEK_HEADER: array[0..1] of string = ('V[N ', 'Seek '); TITLE_INFO_PLUS: array[0..1] of string = ('{', '+'); TITLE_INFO_MINUS: array[0..1] of string = ('|', '-'); @@ -5090,7 +5101,7 @@ begin cmMenu.CreatePopupMenu(); // j[ eLXgݒ for I := 0 to nSize - 1 do begin - sBuffer := Concat('&', IntToStr(STR_MENU_SETUP_PER_INTEGER[PerIndex[I]]), STR_MENU_SETUP_PERCENT[Status.dwLanguage]); + sBuffer := Concat('&', IntToStr(STR_MENU_SETUP_PER_INTEGER[PerIndex[I]]), ' ', STR_MENU_SETUP_PERCENT[Status.dwLanguage]); if longbool(TipIndex[I]) then sBuffer := Concat(sBuffer, #9, STR_MENU_SETUP_TIP[Status.dwLanguage][TipIndex[I]]); cmMenu.AppendMenu(dwBase + I, pchar(sBuffer), true); end; @@ -5591,6 +5602,8 @@ begin cmSetupTime.AppendMenu(MENU_SETUP_TIME_RESET, STR_MENU_SETUP_TIME_RESET[Status.dwLanguage]); // tj[쐬 SetMenuTextAndTip(cmSetupOrder, MENU_SETUP_ORDER_SIZE, MENU_SETUP_ORDER_BASE, STR_MENU_SETUP_ORDER_SUB[Status.dwLanguage], true); + // V[Nԃj[쐬 + SetMenuTextAndTip(cmSetupSeek, MENU_SETUP_SEEK_SIZE, MENU_SETUP_SEEK_BASE, STR_MENU_SETUP_SEEK_SUB[Status.dwLanguage], true); // \j[쐬 SetMenuTextAndTip(cmSetupInfo, MENU_SETUP_INFO_SIZE, MENU_SETUP_INFO_BASE, STR_MENU_SETUP_INFO_SUB[Status.dwLanguage], true); cmSetupInfo.AppendSeparator(); @@ -5617,6 +5630,7 @@ begin cmSetup.AppendSeparator(); cmSetup.AppendMenu(MENU_SETUP_TIME, STR_MENU_SETUP_TIME[Status.dwLanguage], cmSetupTime.hMenu); cmSetup.AppendMenu(MENU_SETUP_ORDER, STR_MENU_SETUP_ORDER[Status.dwLanguage], cmSetupOrder.hMenu); + cmSetup.AppendMenu(MENU_SETUP_SEEK, STR_MENU_SETUP_SEEK[Status.dwLanguage], cmSetupSeek.hMenu); cmSetup.AppendMenu(MENU_SETUP_INFO, STR_MENU_SETUP_INFO[Status.dwLanguage], cmSetupInfo.hMenu); cmSetup.AppendMenu(MENU_SETUP_PRIORITY, STR_MENU_SETUP_PRIORITY[Status.dwLanguage], cmSetupPriority.hMenu); cmSetup.AppendSeparator(); @@ -5829,7 +5843,6 @@ begin Writeln(fsFile, Concat(BUFFER_SEEKINT_, IntToStr(Option.dwSeekInt))); Writeln(fsFile, Concat(BUFFER_SEEKMAX_, IntToStr(Option.dwSeekMax))); Writeln(fsFile, Concat(BUFFER_SEEKNUM_, IntToStr(Option.dwSeekNum))); - Writeln(fsFile, Concat(BUFFER_SEEKTIME, IntToStr(Option.dwSeekTime))); Writeln(fsFile, Concat(BUFFER_SPEEDTUN, IntToStr(Option.dwSpeedTun))); Writeln(fsFile, Concat(BUFFER_VOLCOLOR, IntToStr(Option.dwVolumeColor))); Writeln(fsFile, Concat(BUFFER_VOLSPEED, IntToStr(Option.dwVolumeSpeed))); @@ -5856,6 +5869,7 @@ begin Writeln(fsFile, Concat(BUFFER_PLAYTYPE, IntToStr(Option.dwPlayOrder))); Writeln(fsFile, Concat(BUFFER_PRIORITY, IntToStr(Option.dwPriority))); Writeln(fsFile, Concat(BUFFER_RATE____, IntToStr(Option.dwRate))); + Writeln(fsFile, Concat(BUFFER_SEEKTIME, IntToStr(Option.dwSeekTime))); Writeln(fsFile, Concat(BUFFER_SEPARATE, IntToStr(Option.dwSeparate))); Writeln(fsFile, Concat(BUFFER_SPEED___, IntToStr(Option.dwSpeedBas))); Writeln(fsFile, Concat(BUFFER_TOP_____, IntToStr(NormalRect.top + ScreenRect.top))); @@ -5923,6 +5937,8 @@ begin cmSetupTime.Free(); cmSetupOrder.DeleteMenu(); cmSetupOrder.Free(); + cmSetupSeek.DeleteMenu(); + cmSetupSeek.Free(); cmSetupInfo.DeleteMenu(); cmSetupInfo.Free(); cmSetupPriority.DeleteMenu(); @@ -8865,7 +8881,7 @@ begin INFO_CHANNEL_4: sInfo := Concat(sInfo, CRLF, ' Src Addr Loop Read Src Addr Loop Read'); end; case Option.dwInfo of - INFO_MIXER: sInfo := Concat(sInfo, CRLF, 'MasterLv : L= R= EchoLv : L= R=', CRLF, 'Delay : ( ', STR_MENU_SETUP_MSEC[Status.dwLanguage], ') Feedback : ( ', STR_MENU_SETUP_PERCENT[Status.dwLanguage], ')', CRLF, 'SrcAddr : - _ EchoAddr : -', CRLF, 'DSPFlags : R= M= E= NoiseClk : Hz', CRLF, 'FIR :'); + INFO_MIXER: sInfo := Concat(sInfo, CRLF, 'MasterLv : L= R= EchoLv : L= R=', CRLF, 'Delay : ( ms) Feedback : ( ', STR_MENU_SETUP_PERCENT[Status.dwLanguage], ')', CRLF, 'SrcAddr : - _ EchoAddr : -', CRLF, 'DSPFlags : R= M= E= NoiseClk : Hz', CRLF, 'FIR :'); INFO_CHANNEL_1, INFO_CHANNEL_2, INFO_CHANNEL_3, INFO_CHANNEL_4: sInfo := Concat(sInfo, CRLF, '1 : 5 :', CRLF, '2 : 6 :', CRLF, '3 : 7 :', CRLF, '4 : 8 :'); INFO_SCRIPT700: sInfo := Concat(sInfo, CRLF, 'Port In : Out :', CRLF, 'Work 0-3 :', CRLF, ' 4-7 :', CRLF, 'CmpParam : Wait :', CRLF, 'UsedSize : (Ptr= Data= SP= )'); end; @@ -8887,9 +8903,9 @@ begin if not bytebool(Spc.Hdr.TagFormat) or not longbool(Spc.Hdr.dwSongLen) then sInfo := Concat(sInfo, '(Unknown)') else begin sBuffer := IntToStr(Spc.Hdr.dwSongLen); - sInfo := Concat(sInfo, sBuffer, ' sec', StringOfChar(' ', 10 - Length(sBuffer))); + sInfo := Concat(sInfo, sBuffer, ' ', STR_MENU_SETUP_SEC2[Status.dwLanguage], StringOfChar(' ', 10 - Length(sBuffer))); if not longbool(Spc.Hdr.dwFadeLen) then sInfo := Concat(sInfo, '(No Fadeout)') - else sInfo := Concat(sInfo, 'FadeTime : ', IntToStr(Spc.Hdr.dwFadeLen), ' ms'); + else sInfo := Concat(sInfo, 'FadeTime : ', IntToStr(Spc.Hdr.dwFadeLen), ' ', STR_MENU_SETUP_MSEC[Status.dwLanguage]); end; end; INFO_SPC_2: begin @@ -9001,6 +9017,7 @@ begin cmSetupTime.SetMenuEnable(MENU_SETUP_TIME_LIMIT, Status.bPlay and Option.bPlayTime); cmSetupTime.SetMenuEnable(MENU_SETUP_TIME_RESET, Status.bOpen and Status.bTimeRepeat); for I := 0 to MENU_SETUP_ORDER_SIZE - 1 do cmSetupOrder.SetMenuCheck(MENU_SETUP_ORDER_BASE + I, Option.dwPlayOrder = longword(I)); + for I := 0 to MENU_SETUP_SEEK_SIZE - 1 do cmSetupSeek.SetMenuCheck(MENU_SETUP_SEEK_BASE + I, Option.dwSeekTime = MENU_SETUP_SEEK_VALUE[I]); for I := 0 to MENU_SETUP_INFO_SIZE - 1 do cmSetupInfo.SetMenuCheck(MENU_SETUP_INFO_BASE + I, Option.dwInfo = longword(I)); cmSetupInfo.SetMenuCheck(MENU_SETUP_INFO_RESET, Option.bVolumeReset); for I := 0 to MENU_SETUP_PRIORITY_SIZE - 1 do begin @@ -9058,7 +9075,6 @@ procedure CWINDOWMAIN.UpdateTitle(dwFlag: longword); var dwInfo: longword; sInfo: string; - sPlus: string; begin // ^CgXVȂꍇ͏I if not longbool(Status.dwTitle) then exit; @@ -9074,14 +9090,16 @@ begin if longbool(dwInfo) then begin sInfo := Concat(sInfo, TITLE_INFO_HEADER[Status.dwLanguage]); case dwInfo of - TITLE_INFO_SEPARATE: sInfo := Concat(sInfo, TITLE_INFO_SEPARATE_HEADER[Status.dwLanguage], IntToStr(Status.dwInfo), STR_MENU_SETUP_PERCENT[Status.dwLanguage]); - TITLE_INFO_FEEDBACK: sInfo := Concat(sInfo, TITLE_INFO_FEEDBACK_HEADER[Status.dwLanguage], IntToStr(Status.dwInfo), STR_MENU_SETUP_PERCENT[Status.dwLanguage]); - TITLE_INFO_SPEED: sInfo := Concat(sInfo, TITLE_INFO_SPEED_HEADER[Status.dwLanguage], IntToStr(Status.dwInfo), STR_MENU_SETUP_PERCENT[Status.dwLanguage]); - TITLE_INFO_AMP: sInfo := Concat(sInfo, TITLE_INFO_AMP_HEADER[Status.dwLanguage], IntToStr(Status.dwInfo), STR_MENU_SETUP_PERCENT[Status.dwLanguage]); + TITLE_INFO_SEPARATE: sInfo := Concat(sInfo, TITLE_INFO_SEPARATE_HEADER[Status.dwLanguage], IntToStr(Status.dwInfo), ' ', STR_MENU_SETUP_PERCENT[Status.dwLanguage]); + TITLE_INFO_FEEDBACK: sInfo := Concat(sInfo, TITLE_INFO_FEEDBACK_HEADER[Status.dwLanguage], IntToStr(Status.dwInfo), ' ', STR_MENU_SETUP_PERCENT[Status.dwLanguage]); + TITLE_INFO_SPEED: sInfo := Concat(sInfo, TITLE_INFO_SPEED_HEADER[Status.dwLanguage], IntToStr(Status.dwInfo), ' ', STR_MENU_SETUP_PERCENT[Status.dwLanguage]); + TITLE_INFO_AMP: sInfo := Concat(sInfo, TITLE_INFO_AMP_HEADER[Status.dwLanguage], IntToStr(Status.dwInfo), ' ', STR_MENU_SETUP_PERCENT[Status.dwLanguage]); TITLE_INFO_SEEK: begin - if Status.dwInfo >= 0 then sPlus := TITLE_INFO_PLUS[Status.dwLanguage] - else sPlus := TITLE_INFO_MINUS[Status.dwLanguage]; - sInfo := Concat(sInfo, TITLE_INFO_SEEK_HEADER[Status.dwLanguage], sPlus, IntToStr(Abs(Status.dwInfo)), STR_MENU_SETUP_MSEC[Status.dwLanguage]); + sInfo := Concat(sInfo, TITLE_INFO_SEEK_HEADER[Status.dwLanguage]); + if Status.dwInfo >= 0 then sInfo := Concat(sInfo, TITLE_INFO_PLUS[Status.dwLanguage]) + else sInfo := Concat(sInfo, TITLE_INFO_MINUS[Status.dwLanguage]); + if longbool(Abs(Status.dwInfo) mod 1000) then sInfo := Concat(sInfo, IntToStr(Abs(Status.dwInfo)), STR_MENU_SETUP_MSEC[Status.dwLanguage]) + else sInfo := Concat(sInfo, IntToStr(longword(Trunc(Abs(Status.dwInfo) / 1000))), ' ', STR_MENU_SETUP_SEC1[Status.dwLanguage]); end; end; sInfo := Concat(sInfo, TITLE_INFO_FOOTER[Status.dwLanguage], TITLE_MAIN_HEADER[Status.dwLanguage]); @@ -10021,6 +10039,7 @@ begin // CWP[^ĕ` cwWindowMain.PostMessage(WM_APP_MESSAGE, WM_APP_REDRAW, NULL); end; + MENU_SETUP_SEEK_BASE: Option.dwSeekTime := MENU_SETUP_SEEK_VALUE[wParam - MENU_SETUP_SEEK_BASE]; MENU_SETUP_INFO_BASE: begin SetChangeInfo(true, wParam - MENU_SETUP_INFO_BASE); exit; // UpdateMenu sȂ diff --git a/spcplay.exe/spcplay.rc b/spcplay.exe/spcplay.rc index afaf3b8..e7e68b6 100644 --- a/spcplay.exe/spcplay.rc +++ b/spcplay.exe/spcplay.rc @@ -2,8 +2,8 @@ MAINICON ICON DISCARDABLE "spcplay.ico" MAINBMP BITMAP DISCARDABLE "spcplay.bmp" 1 VERSIONINFO - FILEVERSION 2,18,0,6694 - PRODUCTVERSION 2,18,0,0 + FILEVERSION 2,18,1,6862 + PRODUCTVERSION 2,18,1,0 FILEFLAGSMASK 0x3fL FILEFLAGS 0x8L FILEOS 0x10004L @@ -15,11 +15,11 @@ BEGIN BLOCK "041103A4" BEGIN VALUE "FileDescription", "SNES SPC700 Player\0" - VALUE "FileVersion", "2.18.0 (build 6694)\0" - VALUE "LegalCopyright", "Copyright (C) 2003-2019 degrade-factory.\0" + VALUE "FileVersion", "2.18.1 (build 6862)\0" + VALUE "LegalCopyright", "Copyright (C) 2003-2020 degrade-factory.\0" VALUE "LegalTrademarks", "SNES is a registered trademark of Nintendo.\0" VALUE "ProductName", "SPCPLAY\0" - VALUE "ProductVersion", "2.18.0\0" + VALUE "ProductVersion", "2.18.1\0" VALUE "URL", "http://dgrfactory.jp/\0" END END