Page 1 of 1

Wav length in Move.w

Posted: Sun Feb 06, 2011 10:17 pm
by Munkyears
Havent posted in here for a while.. Hope everything is good with you all :)

Anyway, being playing around lately with moving values into memory

Trouble is i'm having difficulty with one thing

Was playing around with drx's wav playing code and new that was fairly simple.. well after much playing around mainly optimising it. I just can't get how i can specify the length of the wav

Code: Select all

move.w 	#SoundEnd-SoundStart,($a00043).l	;wav length
was given in the template
but the value is too large to fit into a word

what else or how can i possibly move a length of the wav value into something more manageable

Thanks

Posted: Mon Feb 07, 2011 3:12 am
by Chilly Willy
That wouldn't work anyway - you can only read/write bytes to the Z80 sram. Most people use little endian format in the Z80 ram since the Z80 is LE. So you would normally store the LSB of the length, then the MSB to the next location.

Posted: Mon Feb 07, 2011 11:00 am
by Munkyears
i see now, I scrapped it as there is technically no need to specify a length of time, It's a case of when the memory runs out, simply empty it replace with another track or just end it

Thanks