Wav length in Move.w

For anything related to sound (YM2612, PSG, Z80, PCM...)

Moderator: BigEvilCorporation

Post Reply
Munkyears
Very interested
Posts: 54
Joined: Sat Mar 21, 2009 4:24 pm
Location: Sheffield, England

Wav length in Move.w

Post by Munkyears » Sun Feb 06, 2011 10:17 pm

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
To be this good takes ages, To be this good takes Stef, Kanedafr, ChillyWilly & everyone who has helped me discover what hardwork is!

Dive into the SpritesMind! :)

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Mon Feb 07, 2011 3:12 am

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.

Munkyears
Very interested
Posts: 54
Joined: Sat Mar 21, 2009 4:24 pm
Location: Sheffield, England

Post by Munkyears » Mon Feb 07, 2011 11:00 am

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
To be this good takes ages, To be this good takes Stef, Kanedafr, ChillyWilly & everyone who has helped me discover what hardwork is!

Dive into the SpritesMind! :)

Post Reply