Commit graph

1873 commits

Author SHA1 Message Date
Ziemas 97deb82ec7 Support muting core output 2020-06-08 21:36:08 +02:00
Ziemas 268202a0c3 Don't alter provided reverb offsets
Pretty confident now that these are fine as is.
2020-06-08 21:36:08 +02:00
Ziemas 9cb23f6296 Add noise to savestate 2020-06-08 21:36:08 +02:00
Ziemas 0ac6740efe Make it actually sound like noise 2020-06-08 21:36:08 +02:00
Ziemas 547e7805a3 Noise generation (idk might change method later) 2020-06-08 21:36:08 +02:00
Ziemas fc33a9c7f8 Write out the rest of the memout buffers to memory 2020-06-08 21:36:08 +02:00
Ziemas 716864f6b5 Fix more dumb mistakes 2020-06-08 21:36:08 +02:00
Ziemas b1de75908c Support reads from ESAH/L 2020-06-08 21:36:08 +02:00
Ziemas 84517cdf31 Sort out some reg confusion 2020-06-08 21:36:08 +02:00
Ziemas 078a95a475 Fix dumb pitch mod mistake 2020-06-08 21:36:08 +02:00
Ziemas ed56d0e339 Remove leftovers 2020-06-08 21:36:07 +02:00
Ziemas c2664c470f Support reads from MMIX 2020-06-08 21:36:07 +02:00
Ziemas 27f0da600f Write core0 output and read it on core1
also slightly saner mixing
2020-06-08 21:36:07 +02:00
Ziemas 8474071841 Die on pitch modulation as it is untested
Clamp volume when mixing samples
2020-06-08 21:36:07 +02:00
Ziemas 78eedbceb6 test build fix 2020-06-08 21:36:07 +02:00
Ziemas 169b5d4a68 Make sure reverb samples don't overflow 2020-06-08 21:36:07 +02:00
Ziemas 760e143404 Fix up SPU save states 2020-06-08 21:36:07 +02:00
Ziemas 4e68fcf228 Wrap negative reverb buffer offsets 2020-06-08 21:36:07 +02:00
Ziemas 77ce9f732b Clear dma req when ADMA is actually finished 2020-06-08 21:36:07 +02:00
Ziemas 18539cb180 Don't skip voice crest offset 0x1FF 2020-06-08 21:36:07 +02:00
Ziemas 12030a8564 Disgusting reverb implementation
Also begin using MMIX for routing stuff (seems weird, TODO: check breath of fire)
2020-06-08 21:36:07 +02:00
Ziemas a00831d7f2 nocash style reverb reg names 2020-06-08 21:36:07 +02:00
Ziemas 74e9464c2f Start reverb work, pre-renames 2020-06-08 21:36:07 +02:00
Ziemas fb7792c6c3 Write out raw voice1 and 3 data to memory
And check for interrerupts
2020-06-08 21:36:07 +02:00
Ziemas 16cc79916e EVOL, AVOL regs 2020-06-08 21:36:07 +02:00
Ziemas b8c1d61817 Cast ADMA input before applying volume 2020-06-08 21:36:06 +02:00
Ziemas b813d81ae1 Simplify adpcm decoder 2020-06-08 21:36:06 +02:00
Ziemas 0ab22eca7b Move SPU to its own directory 2020-06-08 21:36:06 +02:00
Ziemas 6adde39866 Update ADSR params on register write.
Change exp decrease
2020-06-08 21:36:06 +02:00
Ziemas b240181fcd Clean up attempt made 2020-06-08 21:36:06 +02:00
Ziemas 3c867fd60b Volume sweep mode, wanna clean this up later
Unify this with ADSR some and split it out into it's own file later I
think. (spu_envelope.cpp/hpp maybe)
2020-06-08 21:36:06 +02:00
Ziemas 41f87a278d Shift volume to the right value
Ignore sweep mode for now.
2020-06-08 21:36:06 +02:00
Ziemas e46c7a667d Save MMIX register writes 2020-06-08 21:36:06 +02:00
Ziemas a7e7a03921 This looks slightly cleaner at least 2020-06-08 21:36:06 +02:00
Ziemas 08604718dc Implement BVOL, make SPU's read high regs.
Thanks ref

Also check IRQs when reading back ADMA data.
2020-06-08 21:36:05 +02:00
Ziemas 2a631fcf34 Probably best to initialize these 2020-06-08 21:36:05 +02:00
Ziemas 3c1e0c23fe Write ADMA to SPU Memory and then Mix it to output
Reworks the ADMA mechanism too, let's see how badly I did...

Having to edit serialize I realised why savestates are broken because
I've never looked in there, yet another thing to return to.
2020-06-08 21:36:05 +02:00
Ziemas aea5405a76 Actually switch phase properly on ENDX 2020-06-08 21:36:05 +02:00
Ziemas 600c100a3c Read all the bits of the asdr shift value 2020-06-08 21:36:05 +02:00
Ziemas b305d5c017 Setting sustain level high enough caused overflow
Switch to unsigned int for target since we only deal in positive values
for envelope anyway.
2020-06-08 21:36:05 +02:00
Ziemas 279b66e8f8 Printf on volume sweep mode 2020-06-08 21:36:05 +02:00
Ziemas d93807993a Mute voices if vmix state is off
Just kinda halfway implemented for now since we don't do effects.
2020-06-08 21:36:05 +02:00
Ziemas e7af3fde33 Effect area regs 2020-06-08 21:36:05 +02:00
Ziemas 45dbffd785 Write regs PMON and NON. 2020-06-08 21:36:05 +02:00
Ziemas 2bba9f71ac General cleanup of adsr stuff 2020-06-08 21:36:05 +02:00
Ziemas e9db8f8509 Turn off ADSR processing after end of release 2020-06-08 21:36:05 +02:00
Ziemas 216623ab8e Initial hacky ADSR crap 2020-06-08 21:36:05 +02:00
Ziemas ce15660e1d Gaussian interpolation 2020-06-08 21:36:05 +02:00
Ziemas 39ea29c109 This is not correct and didn't help as a temp hack 2020-06-08 21:36:04 +02:00
Ziemas 96acb28337 Clean up leftovers 2020-06-08 21:36:04 +02:00