
Then I made it into 1ch driver and started to optimize it. Now the single channel stuff runs at blazing 37KHz

Moderator: BigEvilCorporation
A simple add or shift take 4 cycles (if working on register only).TmEE co.(TM) wrote:Which is faster, shift or add ?Stef wrote:Using signed 8 bits sample permit to keep the quality of 8 bits sample and have only an extra "add $80" instruction.
6 Khz isn't that bad to start with. I started mine with a bit more then i optimised up to 14 KhzTmEE co.(TM) wrote:I almost finished my 2ch driver and the result was like 6KHz or so![]()
Then I made it into 1ch driver and started to optimize it. Now the single channel stuff runs at blazing 37KHz. There are some thing left to do (commands, sample end detection), but I'll upload it on Monday. I won't give out the source yet (little messed up, even I don't understand it).
Stef wrote:Very nice tune =) Sound like sort of amiga Turrican.
Mega Turrican ? the genesis version one ? well strange i didn't recognized it... I almost know all MT tuneTmEE co.(TM) wrote:Stef wrote:Very nice tune =) Sound like sort of amiga Turrican.
Actually its a tune from Mega TurricanI chose it, because it does 2ch mixing aswell @ 15KHz like yours
I NEED more KHz, because cymbals(vital part of metal) don't sound very good if not playedback at high sample rate.Pascal wrote:well it's nice to have more khzbut more khz mean more rom space :s my game is 200ko for 2.2 mo of audio samples :s
Actually i want to add a variable sample rate feature (as the one channel player) but first i want to optimise the 2ch player a bit, having a maximum of 16 Khz would be pretty nicePascal wrote:well it's nice to have more khzbut more khz mean more rom space :s my game is 200ko for 2.2 mo of audio samples :s
JR are faster when the branchement isn't taken, it's why i reorganised my code to avoid branchement when possible. When i can't avoid them, i'm using JPAnyway, I managed to improve my soon to be 2ch player, and now it plays @ 41 KHz!!!
Stef, I noticed lots of JRs in your code, JR slower than JP (I'm not sure if in all cases) on Z80. AS maybe optimizing those to JPs but I'm not sure. I lost 1KHzif I changed just one JR to JP !!!
I did 2 different driver :You change bank for every sample, that just kills sampling rate in my driver implementation41KHz turns to 18... how fast does your driver go if you play only one channel (2nd disabled) and change bank only if required ???