adding ym2413

squashed commits:
YM2413追加中
一通り実装したけどポートへの書き込み方が不明でまだ音が出ない
細かい修正(未テスト)
resetで初期化されるのをなんとかしたい
sound 初期化と終了を追加してみた
SN76496を参考にYM2413のアップデート方法を変更してみた
stereoフラグをアップデートサイズに変更
処理順番を整理したら音が出た
stateセーブに対応してみた
addition: Support for the Japanese Mark-III extended FM sound source unit
This commit is contained in:
hiroshica 2020-02-24 13:42:53 +09:00 committed by kub
parent 7980d47767
commit a2f24bfa7b
17 changed files with 221 additions and 56 deletions

View file

@ -434,6 +434,7 @@ struct PicoSound
unsigned int dac_pos; // last DAC position in Q20
unsigned int fm_pos; // last FM position in Q20
unsigned int psg_pos; // last PSG position in Q16
unsigned int ym2413_pos; // last YM2413 position
};
// run tools/mkoffsets pico/pico_int_offs.h if you change these
@ -897,10 +898,13 @@ PICO_INTERNAL_ASM void wram_2M_to_1M(unsigned char *m);
PICO_INTERNAL_ASM void wram_1M_to_2M(unsigned char *m);
// sound/sound.c
PICO_INTERNAL void PsndInit(void);
PICO_INTERNAL void PsndExit(void);
PICO_INTERNAL void PsndReset(void);
PICO_INTERNAL void PsndStartFrame(void);
PICO_INTERNAL void PsndDoDAC(int cycle_to);
PICO_INTERNAL void PsndDoPSG(int line_to);
PICO_INTERNAL void PsndDoYM2413(int line_to);
PICO_INTERNAL void PsndDoFM(int line_to);
PICO_INTERNAL void PsndClear(void);
PICO_INTERNAL void PsndGetSamples(int y);