diff --git a/src/engine/platform/ga20.cpp b/src/engine/platform/ga20.cpp index 5e246b9b..91b03d59 100644 --- a/src/engine/platform/ga20.cpp +++ b/src/engine/platform/ga20.cpp @@ -72,9 +72,9 @@ void DivPlatformGA20::acquire(short* bufL, short* bufR, size_t start, size_t len } } ga20.sound_stream_update(ga20Buf, 1); - bufL[h]=(ga20Buf[0][h]+ga20Buf[1][h]+ga20Buf[2][h]+ga20Buf[3][h])<<4; + bufL[h]=(ga20Buf[0][h]+ga20Buf[1][h]+ga20Buf[2][h]+ga20Buf[3][h]); for (int i=0; i<4; i++) { - oscBuf[i]->data[oscBuf[i]->needle++]=ga20Buf[i][h]<<6; + oscBuf[i]->data[oscBuf[i]->needle++]=ga20Buf[i][h]; } } } @@ -345,12 +345,8 @@ void DivPlatformGA20::reset() { chan[i]=DivPlatformGA20::Channel(); chan[i].std.setEngine(parent); // keyoff all channels - chWrite(i,0,0); - chWrite(i,1,0); - chWrite(i,2,0xff); - chWrite(i,3,0xff); - chWrite(i,4,1); chWrite(i,5,0); + chWrite(i,6,0); } } @@ -439,7 +435,7 @@ void DivPlatformGA20::renderSamples(int sysID) { sampleOffGA20[i]=memPos; for (int j=0; jdata8[j])^0x80; + unsigned char val=((unsigned char)(s->data8[j]))^0x80; sampleMem[memPos++]=CLAMP(val,1,255); } // write end of sample marker @@ -452,6 +448,7 @@ void DivPlatformGA20::renderSamples(int sysID) { } else { sampleLoaded[i]=true; } + // allign to 16 byte memPos=(memPos+0xf)&~0xf; } sampleMemLen=memPos; diff --git a/src/engine/platform/ga20.h b/src/engine/platform/ga20.h index 95fc78cc..462a8e87 100644 --- a/src/engine/platform/ga20.h +++ b/src/engine/platform/ga20.h @@ -29,25 +29,18 @@ class DivPlatformGA20: public DivDispatch, public iremga20_intf { struct Channel: public SharedChannel { int prevFreq; unsigned int audPos; - int prevBank; int sample; - int panning, prevPan; bool volumeChanged, setPos; - int resVol, lvol, rvol; + int resVol; int macroVolMul; Channel(): - SharedChannel(15), + SharedChannel(255), prevFreq(-1), audPos(0), - prevBank(-1), sample(-1), - panning(255), - prevPan(-1), volumeChanged(false), setPos(false), - resVol(15), - lvol(15), - rvol(15), + resVol(255), macroVolMul(64) {} }; Channel chan[4];