Code Monkey home page Code Monkey logo

spcplay's People

Contributors

dgrfactory avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spcplay's Issues

Translations

有任何方法可以把程式翻譯成其他語言嗎?
Is there a way that can translate the program to other language?

Failure to emulate echo buffer volume-related overflow effect from FIR coefficeints

Once again, I am merely forwarding a playback difference report from the Discord servers that I am in, since I myself don't use the player because of a platform incompatibility.

This is related to #23, except instead of a playback failure, it is a failure to emulate an overflow effect (by wraparound, instead of clamping) in the echo buffer related to the FIR coefficients. An example SPC file straight out of Super Famicompo 3 has been attached, since the difference in question occurs immediately at the beginning.

Here is the SPC file in question in a .zip file.

I actually gave it a quick go on my SD2SNES Pro/FXPak Pro cartridge on a 2/1/3 North American SNES/SFC unit and confirmed the bug in question. Feel free to double check the playback on your own SPU (SHVC-SOUND unit).

Exporting as wav files skips the salience

when you export the audio channel as a .wav all audio channels will skip the silence and it causes all the audio channel samples to be out of sync. if possible could the author fix the time skip when converting a audio channel to .wav

JMP [ABS+X] ($1F) で ABS+X の値が 0xFFFF の場合、ARAM $0000 の値が 0x00 として処理される。

平素より、大変お世話になっております。
仮に私の計算が正しいとしても、このような命令を実行する可能性はドライバの不具合を除いて 0 であると思われ、修正する必要があるのかどうか疑問なレベルですが、ご報告いたします。

MOVW ($BA) や MOV ($E7) の 16 ビットメモリ読み込みをチェックしましたところ、実効アドレスが $00FF や $01FF の場合はその次のアドレスを上位バイトとして読み込んでいるようですので、JMP ($1F) も $FFFF と $0000 をそれぞれ下位・上位バイトとしたアドレスにジャンプすると予想して命令実行後の PC の値を計算しました。
しかし、APU.asm の [pAPURAM + 0x10000] は InitAPU で 0 に初期化されたまま更新されていません (?) ので、SNESAPU.DLL v2.18.4.7350 の PC には 0x0000 ~ 0x00FF の範囲の値が設定されるようです。

EA0
EA1
EA2

もし動作変更なさる場合は、他の命令と同じように PC への設定が 16 ビットアクセスのみで実現できるように、メモリへのデータ転送命令実行時に [pAPURAM + 0x10000] へ [pAPURAM + 0x00000] の値をコピーする処理を追加してくださいますか。
#エコーによる $0000 の書き換えをどうするのかという問題が発生しますが…

test_spc.zip

SETP ($40) を実行すると PSW の I フラグに 0 が設定される。

平素より、大変お世話になっております。

SETP ($40) を実行いたしますと、PSW の P フラグに 1 が、更に I フラグに 0 が設定されるのを確認いたしました。

#動作は問題ございませんが、RETI ($7F) の PSW に関するコメントは実際の動作と異なるようです。 (I = 1, 他 = ?)

Linux 上での動作不具合

概要

Linux 環境で SNES SPC700 Player を動作させた場合、以下の不具合を確認しています。

  • 24 ビット, 32 ビット出力を行うと、大音量のノイズが発生することがある。
  • プレイリストが通常より若干高くなり、ボタンと干渉する。
  • SPCPLAY.EXE を置く場所によって、ファイルをドロップしても正常に認識できない場合がある。
  • まれにキーボードの操作ができなくなることがある。
  • プレイリストからのドラッグ&ドロップ機能が働かない。
  • キーボード ショートカットが本来の動作と異なる場合がある。

Summary

The following problems have been observed when running the SNES SPC700 Player on Linux.

  • When 24-bit or 32-bit output is used, loud noise may occur.
  • The playlist is slightly higher than usual and interferes with the buttons.
  • The file may not be recognized properly when dropped.
  • In rare cases, keyboard operation may be disabled.
  • The drag&drop function from the playlist does not work.
  • Keyboard shortcuts may not work as they should.

Failure to emulate echo buffer volume-related overflow effect from FIR coefficents part 2

Here I am again, forwarding more playback differences. This is the sequel to #37.

This particular song is the next test case (it uses a different set of FIR coefficients, as I had refined the distortion effect from the past two songs): https://battleofthebits.com/arena/Entry/Stop_+Duck_+Rock+and+Roll/60690/

The overflow effect appears to have been emulated incorrectly, as this song's distortion effect came out more as static noise instead of the intended distortion effect that was being done (the feedback parameter was also being fooled around in the middle of the song). To make matters worse, the static lasts throughout the entire song instead of actually stopping as intended.

The .spc file is mirrored here in a .zip file.

Player stops playing upon FIR coefficient overflowing during playback

I caught an interesting hardware bug relating to how the echo buffer can be used for an unusual kind of distortion effect that I was exploiting with my own music twice now relating to deliberately overflowing the FIR coefficents with an EDL of zero (and a non-zero EFB, though I made sure to keep it under just enough control to ger the desired effect). I'm don't actually use the player myself due to a platform incompatibility, but two of my Battle of the Bits entries have been getting reports of stopping the SPC the moment my distortion effects start playing. They are Extra Distortion Mania and New Wave Beat: the former made with SNESMod, the latter made with AddMusicKFF, a fork of AddMusicK that I created.

For Extra Distortion Mania, the track cuts off at 0:18, and for New Wave Beat, the track cuts off at 1:36. In both cases, it is because I started to use my distortion effects. Notably, it only happens once the audio starts to output: merely writing these kind of values to the DSP registers is not what causes the program to stop playing the SPCs.

https://battleofthebits.org/arena/Entry/Extra+Distortion+Mania/27243/
https://battleofthebits.org/arena/Entry/New+Wave+Beat/43032/

I have mirrored the original SPC files in a zip file here. The renders on Battle of the Bits contains the intended result.

SNESAPUCallbackProc で直前の命令サイクルぴったりで終了したことにする機能が欲しい。

機能追加要望

SetSPCDbg または SNESAPUCallbackProc に SetSPCDbg の SPC_RETURN の機能と更に SPC700.asm の clkLeft を 0 にするフラグが欲しい。

背景

SPC700 のステップ実行やブレークポイントを実装すると、想定外の動作のためどうしても避けることができない不具合が発生してしまうのを回避するため。 SNESAPUCallbackProc (effect = CBE_S700FCH) の戻り値では時間が経過しない。
→ SetSPCDbg (SetSPCDbg= SPC_TRACE | SPC_RETURN) では clkLeft が 0 にならないので、SeekAPU (time = 64000) を実行し 0.5 秒経過後に SPC_RETURN すると 次の SeekAPU (time = 64000) が SeekAPU (time = 96000) になってしまう。
→ 1 命令ずつ実行で回避可能になるが、DSP エミュレーションが(一部 ?)実行されない ?

極端に短い時間を設定して EmuAPU でエミュレーションを実行すると、DSP のエミュレーションが(一部 ?)実行されない。

不具合の内容

極端に短い時間を設定して EmuAPU でエミュレーションを続けると、DSP のエミュレーションが(一部 ?)実行されない。

実行環境

Windows 8.1 Update1
SNESAPU v2.18.1

再現手順

  1. len に SPC700 の命令を一つ分など極端に短い時間を設定し、EmuAPU を連続で実行する。

  2. キーオンされて時間が経過しても *Voice::bCur, DSPVoice::envx, DSPVoice::outx の値が変化しない。

その他

  • t64Cnt は増加し続けているので DSP.asm の CatchUp で即 .Done とはならないはず ?

画像

約 1 秒実行
  • キーオン設定後約 20Ts でRead の値が Addr の値に変化しますが、以降は変化しません。

[STUPID] On Linux using Wine build 7613 saving does not work

This is a bit weird for one reason: I'm using Wine instead of running it natively on Windows. However, saving does work on previous versions (such as 2.19.1_7540) so I blame the program.

The exact problem: When trying to save to a .wav file the program gives me the error 252.

How to reproduce it:

  1. Open an spc file.
  2. Try to save a wav file.
  3. Get the error 252.

I will test this on Windows as soon as possible, and post a comment.

Exporting as .wav while in endless playback mode ignores ID666 length tags

Hello! I found a little oddity while exporting .spc files as .wav while having the option for endless playback enabled. Basically, every time I use the .wav export function, I get an audio file that's exactly 2 minutes and 11 seconds (default time?), which doesn't happen when I enable the option for ID666 play time.

While this barely an issue, it's worth noting that the previous stable release seemed to use the ID666 tags to determine the length of the song before exporting it to .wav, even in endless playback mode.

[snesapu.dll] scr700lbl に保存される値ではスクリプト領域かデータ領域の判別ができないため予期しないアドレスにジャンプする可能性がある。

平素よりお世話になっております。

スクリプト領域のラベルは

spcplay/snesapu.dll/APU.asm

Lines 1105 to 1114 in 71fe12b

.LABEL:
Inc ECX ;ECX++
Mov AL,[ECX] ;AL = [ECX]
Cmp AL,3Ah ;Is char ":"?
JE short .LABEL2 ; Yes
Call GetScript700Number ;Parse Number (EAX = result) ; :[LABEL]
JZ .NORMALERROR ; Failure
And EAX,1023 ;EAX &= 1023
Mov [scr700lbl+EAX*4],EBX ;Label[EAX] = EBX

データ領域のラベルは

spcplay/snesapu.dll/APU.asm

Lines 2044 to 2054 in 71fe12b

.DATALABEL:
Inc ECX ;ECX++
Mov AL,[ECX] ;AL = [ECX]
Call GetScript700Number ;Parse Number (EAX = result) ; :[LABEL]
JZ .DATAERROR ; Failure
And EAX,1023 ;EAX &= 1023
Mov EDX,EBX ;EDX = EBX
Sub EDX,[scr700dat] ;EDX -= Data Offset
Inc EDX ;EDX++
Mov [scr700lbl+EAX*4],EDX ;Label[EAX] = EDX

で、それぞれの領域の先頭からの相対アドレスが保存されますが、どちらの領域のラベルか判別不能なため、(意図せずに)データ領域のラベルを使用してジャンプ可能です。

動作検証スクリプト

  • 20220401_02.700 読み込み直後
    1
  • 20220401_02.700 実行終了時 (Debugger Script700 ウィンドウ : SP の値は誤り・スクリプト領域の命令をマークして前回の PP の値を検索するため最下行スクリプト表示も誤り)
    2

[spcplay.exe] 名前を付けて保存のダイアログでファイルの種類にかかわらず保存ファイル名に ファイル名.spc が設定される場合がある。

ファイル保存時のファイルの選択ダイアログのファイル名には、最後に読み込んだ SPC ファイルのファイル名またはタイトルが保存するファイル名として設定されますが、タイトルが存在せず かつ ファイル名が短い(?)場合、ファイルの種類にかかわらず ファイル名.spc がファイル名として指定されるようです。

Windows Vista 上での動作不具合

概要

Windows Vista 環境で SNES SPC700 Player を動作させた場合、以下の動作不具合を確認しています。

  • サウンドインジケータの描画が遅くなる。

Summary

The following problems have been observed when running the SNES SPC700 Player on Windows Vista.

  • Drawing of sound indicator becomes slow.

[APU.asm] EmuAPU で 2147483648 サイクル以上を指定すると負の値と判定され EmuSPC が実行できず、更に cycLeft が上書きされる。

平素よりお世話になっております。

仕様では EmuAPU の len の型は u32 ですが、

spcplay/snesapu.dll/APU.asm

Lines 488 to 498 in cd9d358

Mov EAX,[len]
Mul ECX ;cycles = (APU_CLK * len) / smpREmu
Div dword [smpREmu]
Add EAX,[cycLeft]
JLE short .NoCycles
Jmp short .Samples
.Cycles:
Mov EAX,[len]
Add EAX,[cycLeft]
JLE short .NoCycles

サンプル数の場合は 491 行、サイクル数の場合は 497 行の EAX + cycLeft で 2147483648 サイクル以上を指定しますと負の値と判定され、EmuSPC が実行されず

spcplay/snesapu.dll/APU.asm

Lines 520 to 521 in cd9d358

.NoCycles:
Mov [cycLeft],EAX

更に 521 行で cycLeft が EAX + cycLeft で上書きされてしまうようです。

Initializing application is failed. (ERROR 119)

When trying to build the spcplay.exe frontend it seems to compile ok but I get the following error every time I run the resulting exe "Initializing application is failed. (ERROR 119)"

Is this related to the version of dcc32 used? Can you share more information on how to set up a working dev environment for this project? You mention Delphi6 UP2 RTL3 in the readme, but I'm not certain where to obtain this software or how to get it running on a modern system.

Suggestion: ability to slow down SPCs down to 1% instead of 25% and speed them up to 800% instead of 400%

The title should be self-explanatory. By adding this useful feature, we might be able to, to say, more precisely catch the values of strong frequency-based effects (such as tremolo and pitch bends) in SPCs for which there's no dedicated engine documentation or tools to extract the MML data from or see if there are very slight tick desyncs which cannot be perceived even when slowed down to 25%. Thanks in advance!

Volume issue

I used the latest pre-release build of SPCplay and some songs (such as the Dr. Mario config theme from Tetris & Dr. Mario, as well as the title themes from Extra Innings and Smash Tennis). This issue was present on older builds and I'm surprised how it wasn't fixed in years.

tcall reads $FFC0-$FFFF as normal RAM memory regardless of IPL ROM flag

in spcplay, tcall seems to ignore the r flag at $F1 (r-ba-210) which controls if $FFC0-$FFFF is IPL ROM or normal RAM, always treating it as the latter. this spcplay quirk is apparently not real SNES behaviour.

i stumbled upon this while trying to narrow down the cause of my spc files playing fine on spcplay, but not on anything else (i.e. foobar, and discord bots generating empty mp3 files out of my spc files). when i replaced every instance of tcall on my driver with generic call commands, it worked fine, and with help from KungFuFurby who used bsnes+, i discovered disabling the previously said flag would allow tcall to work properly so i can only blame spcplay for innacuracy here

Request: New debug information layout

Hello! I compose SNES music with AddMusicK and the EarthBound Music Editor, and I'd love there to be a new debug view, or possibly a seperate window launched from one of the menus, that looks like this:

S#  ADSR/GAIN TUNING
00: FF F0 B8  0380
01: FF E0 B8  0300
02: FF F2 B8  0260
(information for the rest of the loaded samples goes here)

== DELAY PARAMETERS ==
CHANNELS: 3F | VOLUME: 2A 2A
DELAY: 03 | FEEDBACK: 20
FIR FILTER: 34 33 00 D9 E5 01 FC E6

To construct an instrument table in AddMusicK and EBMusEd, you need the ADSR and tuning data in this format - this kind of hexadecimal layout would make recreating this data in new musical arrangements much easier. Is something like this feasible in a future release?

Issues with transitions from decay to sustain

In the emulators that I tested with, while the note is in the "decay" mode, if the ADSR's sustain value changes mid-note and its changed sustain value is higher (which causes less decay time), the decay time still has to decay to its initial sustain value, despite the higher sustain value that causes less decay time.

However, in SPCPlay, when the sustain value gets higher mid-note while the note is decaying, it skips the decay and goes straight into sustain/release, which is inaccurate.

Adding the -h flag on the spccmd.exe outputs jibberish

I wanted to check what the spccmd.exe had for commands, so I tried to get help from the program by appending the -h flag to the command line.

This makes the program spew gibberish except some characters. From reading the source code I believe the issue lie with the program trying to output Japanese characters into command line which doesn't know how to deal with it.

Attached is a screenshot of windows powershell when I tried to run the command ./spccmd.exe -h
image

Feature request - Piano roll viewer

I was thinking of this visualizer to be added:
image
While the music may be a tracker format and does not know the notes in advance like a midi file, it at least knows the notes currently being played. This is why notes that have been played are displayed as a "rain" (named after miditrail) only to be displayed under the piano keys.
Source: https://www.youtube.com/watch?v=igP51SMfCYA

Possible Echo/DSP bug or inacuraccy?

Hello, this is something I noticed a long time ago: I have a SPC that constantly updates the FIR Filter along some other echo parameters, and at one point, the echo in the kick drum channel is disabled so that it isn't affected by the FIR Filter any further, however, bsnes and many other emulators and players still output the first kick note with echo even after I disabled it, whereas SPCplay does not. I was wondering if it could be some kind of inaccurate emulation regarding SPCplay?
I have attached two audio files (including two extra ones with the kick isolated) and the original SPC file, the event occurs at 0:08.
spcplay echo.zip

32,000Hz 以外で一部の曲で実機と極端に異なる音が出力される

概要

サンプリングレートを 32,000 Hz 以外に設定した場合、一部の曲で実機と極端に異なる音が出力されることがあります。
以下の作品で不具合を確認しています。

  • 緋王伝 魔物達との誓い
  • 蓬莱学園の冒険!!

Summary

When the sampling rate is set to a value other than 32,000 Hz, some songs may output sounds extremely different from those of the actual device.
I have confirmed the problem with the following games.

  • Hioden: Mamono-tachi tono Chikai
  • Hourai Gakuen no Bouken!

音量が負に設定されている曲でフェードアウト後に音量が0にならない

概要

音量が負に設定されている曲を演奏中、フェードアウトが終了しても、完全に音量が0になりません。

発生条件

以下のすべての条件に一致する場合に発生します。

  • SNESAPU.DLL v2.18.0 (build 6694) 以上を使用している。
  • マスタ音量、エコー音量のいずれかが負に設定されている (疑似サラウンド)。
  • 拡張設定で「サラウンド無効」(OPTION_NOSURROUND) が設定されていない。
  • SNESAPU のフェードアウト機能を使用する、または、フェードアウト動作を行う曲を演奏する。

原因

クリックノイズ防止アルゴリズムの不具合。

対応状況

v2.18.3 以降で対応予定です。
v2.18.3 (build 7206) で対応しました。
https://github.com/dgrfactory/spcplay/releases

SNESAPUCallbackで設定するコールバック関数 effect = CBE_DSPREG の仕様がサイトの説明と異なる。

不具合の内容

SNESAPUCallbackProc で設定するコールバック関数 effect = CBE_DSPREG の仕様が @dgrfactory 様のサイトの説明では

addr | DSP レジスタのアドレス (0x00~0x7F)

となっていますが、実際はアドレスの範囲チェック前に呼び出されるため 0x80 - 0xFF の値を指定可能になっています。
想定していないアプリは誤動作や異常終了する可能性があります。

DSP レジスタアドレス 0x80 への書き込み要求

[Request] Add toggleable dark theme

I've noticed that spcplay has a define WIN10DARK that's commented out. I have not seen what spcplay in a dark theme looks like, as I'm unable to build the executable, but having a dark theme available would be very welcome. Can this feature be uncommented and exposed as a toggleable setting?

機能追加要望 [Script700] サウンドドライバが特定の入力ポートを読み込むまで待機するコマンドが欲しい。

目的

  • 転送時間を短くするために、スクリプトで反映させた入力ポートの値をすべて読み込む前に出力ポート o0 に値を書き込むサウンドドライバの待ち時間を短縮したい。
  • 初回・2 回目以降で待ち時間が変化する場合でもコマンド一つで解決できるようにしてコード量を削減したい。

コマンド

特定のポートを読み込むまで待機 [入力ポート]

サウンドドライバは bsnes などエミュレータでは正しく演奏されることを確認済です。
ご検討よろしくお願いいたします。

Reading file error because of file name

For exmple:
When opening a file on non-Japanese operating systems, and the file name contains Japanese characters, the program will not be able to read the file.
And if you open a file with Chinese characters on a non-Chinese system, it will show the same error.

SPCPlay triggers several antiviruses in VirusTotal

Apologies for not using Japanese, but watashi do not speak nihongu

Ever since version 2.19.2 (mostly because i am lazy and did not test versions before that) the spcplay zip archive / individual exe components trigger at least 1 antivirus in virustotal, if they provide detail it's usually a trojan.

Example scans:
2.19.2 zip - https://www.virustotal.com/gui/file/a7885ac661c9105f322275175af9de9570c287e97ed63bfca8f4379f616bc996
2.19.3 zip - https://www.virustotal.com/gui/file/e92c0df5c94f53088f0d62cd0e6adeb2bcfe6a7c50088b43db6a889b2d44193d
2.19.4 zip - https://www.virustotal.com/gui/file/be8ddd2bbf14e0e64053bb212ba790292938124dee558de19c468197c9d43bee
2.19.4 spcplay.exe - https://www.virustotal.com/gui/file/92aa50575eeef2eb0cc143762c73ba613db970bfdcdd9e619881879d793f40a6

Steps to reproduce:

  1. Get an spcplay zip, spcplay exe or spccmd exe
  2. Upload it to https://www.virustotal.com
  3. Enjoy the malware!

Exporting separate channels timing issue

When i export separate channels, it seems the timing is off.

For instance: Secret of the Forest from Chrono Trigger. When you export channel 1, 2, 3 and 4 separately and merge them back together (in my DAW), the arpeggiator notes are locked on the same grid instead of doing the 4-step arpeggiator. See image attached.

It seems they all start at the exact same beat instead of having the small offset it should need. When i export them as a group, it sounds fine.

In other words: it seems like the start time is off when you export a separate channel (missing the right offset). Maybe it's skipping the silence and goes right to the first sample?

Please advise, thank you.

Hopefully this make it bit more clear what i mean looking at the waveforms in my DAW:

Wrong render:

wrong

.

How it should be:

right

SPC700.asm の ResetSPC で ARAM $00E1 の値が 0x80 で上書きされる。

ResetSPC の Enable ROM reading のコメントがある行の命令 Mov byte [EAX-0Fh],80h で ARAM $00E1 の値が 0xFF から 0x80 に上書きされるようです。

#Timer status is preserved, other bits are reset のコメントがある行の次の行の命令 Or byte [EAX+1],80h で既に IPL ROM 読み込みフラグがオンに設定されているようです。

Exporting separate channels using spccmd

Having to manually click to mute and unmute each channel, and then saving with a different file name to export each channel as its own file can be annoying, so preferably there should be a way in spccmd to easily specify which channels should be played when exporting to WAV with the -cw option.
Then to output all channels as it's own file, you could just do a for /L from 1 to 8 in CMD.

Incorrect handling of BRK ($0F) opcode

When the BRK instruction is encountered, the PC should be pushed, the PSW should be pushed, and the Break flag should be set. However, spcplay will set the Break flag before the PSW is pushed, meaning that the PSW pushed to stack (and the PSW restored when RETI is called) has the Break flag set also, resulting in it never being cleared until power is turned off. I'm aware that this is somewhat of a non-issue, seeing as the Break flag isn't used whatsoever, but it's still erroneous, so I figured it worthwhile to point out.

[質問] LadpX または LadpY マクロを使用するオペコードのポインタ取得処理について

先日は 16 ビットデータアクセスの件でご修正いただき、誠にありがとうございます。
#27@dgrfactory 様の検証内容に関する質問内容でございますこと心より謝罪申し上げます。

MOVW YA,dp などのオペランドに dp を使用する 16 ビットデータを処理する命令ではダイレクトページを超えないメモリ参照が行われるのを確認いたしましたが、MOV A,[dp+X] などのポインタ値を取得する命令の場合ポインタ値取得時にダイレクトページを超えるのが正しい処理でよろしいでしょうか。

お手数をおかけしますが、ご回答いただけますと幸いです。

他のプロセッサやエミュレータの動作
  1. RP2A03 (d,x) Indexed indirect https://wiki.nesdev.com/w/index.php/CPU_addressing_modes
  2. bsnes 64d4844 (May 26, 2021)・snes9x 9398d21 (May 27, 2021)・Mesen-S 89199f2 (Jul 9, 2020) はポインタ値を取得する命令もダイレクトページを超えないメモリ参照
  3. https://ux.getuploader.com/gnilda/download/25 (ダウンロードパスワード : spc) 適用後の ROM を snes9x 1.53 で実行 (オペコード $E7 が snesapu.dll と同じ仕様)

必要最小限の APU サイクルで EmuAPU を利用し SPC700 の命令を一つ分実行すると、GetSPCRegs の PC の値が想定した値と異なる値になる。

不具合の内容

必要最小限の APU サイクルで EmuAPU を利用し SPC700 の命令を一つ分実行すると、GetSPCRegs の PC の値が想定した値と異なる値になる。

実行環境

Windows 8.1 Update1
SNESAPU v2.18.1

再現手順

  1. LoadSPCFile で SPC ファイルを読み込む。

  2. GetSPCRegs で PC の値を取得する。

  3. PC の指す APU メモリの値を取得し、次の命令の実行に必要な APU サイクル数 [*1] と、実行後の PC の値 [*2] を計算する。

  4. EmuAPU (len = [*1]) を実行する。

  5. GetSPCRegs で PC の値を取得し、[*2] の値と比較すると異なる値である。

回避策

再現手順 4 で EmuAPU (len = [*1] - 1) と EmuAPU (len = 1) を実行する。

ただし時間が短すぎるためか、 DSP のエミュレーションは実行されないようである(#17)。

画像

機能追加要望 [Script700] 対応プレイヤーにコールバックを利用してブレークポイントを設定するコマンドが欲しい。

目的

  • サウンドドライバのファンクションを利用して演奏に必要なデータを転送した状態のスナップショットを保存するために、Script700 のコマンドで SPC700 の動作を停止させたい。

スナップショット作成手順

  • Script700 でデータをすべて転送する。
  • 転送終了時に Script700 のコマンドでプレイヤーのコールバック関数を利用してブレークポイントを設定する。
  • SPC700 の動作が停止している状態のスナップショットを保存する。

コマンド

ブレークポイント設定コマンド [ブレークポイントを設定するアドレス]

実行ファイルと違いスクリプトであれば spcplay.exe (と転送用のデータのみ)で実行可能ですので、ハードルが低いかなと…
以上です。ご検討よろしくお願いいたします。


コマンドを修正しました。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.