mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 07:17:45 -04:00
debug bgm player, sound code refactoring
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@598 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
40644bfedd
commit
7b3f44c6b6
12 changed files with 161 additions and 86 deletions
29
pico/pico.c
29
pico/pico.c
|
@ -258,35 +258,6 @@ static __inline void SekRunM68k(int cyc)
|
|||
#endif
|
||||
}
|
||||
|
||||
|
||||
// to be called on 224 or line_sample scanlines only
|
||||
static __inline void getSamples(int y)
|
||||
{
|
||||
#if SIMPLE_WRITE_SOUND
|
||||
if (y != 224) return;
|
||||
PsndRender(0, PsndLen);
|
||||
if (PicoWriteSound) PicoWriteSound(PsndLen);
|
||||
PsndClear();
|
||||
#else
|
||||
static int curr_pos = 0;
|
||||
|
||||
if(y == 224) {
|
||||
if(emustatus & 2)
|
||||
curr_pos += PsndRender(curr_pos, PsndLen-PsndLen/2);
|
||||
else curr_pos = PsndRender(0, PsndLen);
|
||||
if (emustatus&1) emustatus|=2; else emustatus&=~2;
|
||||
if (PicoWriteSound) PicoWriteSound(curr_pos);
|
||||
// clear sound buffer
|
||||
PsndClear();
|
||||
}
|
||||
else if(emustatus & 3) {
|
||||
emustatus|= 2;
|
||||
emustatus&=~1;
|
||||
curr_pos = PsndRender(0, PsndLen/2);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#include "pico_cmn.c"
|
||||
|
||||
int z80stopCycle;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue