Sonic and Sega Retro Message Board: High-Quality Sonic 1 PCM Music - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
Loading News Feed...
 

High-Quality Sonic 1 PCM Music Using WAV files as level music in Sonic 1

#16 User is offline Master3k 

Posted 20 August 2008 - 08:26 AM

  • Yeah, bye.
  • Posts: 278
  • Joined: 25-July 07
  • Gender:Male
  • Wiki edits:27
Omaigawd, great work, that's awesome.

Thanks for sharing this.

#17 User is offline Trunks 

Posted 20 August 2008 - 11:42 AM

  • AGAIN TRY
  • Posts: 1292
  • Joined: 20-February 08
  • Gender:Male
  • Location:San Antonio, TX
  • Project:Sure to be Ban'd, The Bancast, Trunks & Soto, iLove
  • Wiki edits:30
Sounds like GBA quality music. I dig it a lot, a lot of potential to be had. There are a ton of little quick clips and stuff that play during gameplay which are an annoyance, but I'm sure it'd work.

#18 User is offline Overlord 

Posted 20 August 2008 - 02:11 PM

  • "I am Death, not Taxes. I turn up only once."
  • Posts: 12399
  • Joined: 12-January 03
  • Gender:Male
  • Location:Berkshire, England
  • Project:VGDB
  • Wiki edits:3,204
Very nice stuff!

#19 User is offline DalekSam 

Posted 22 August 2008 - 06:58 AM

  • woop woop yo ass too fat
  • Posts: 1753
  • Joined: 19-February 08
  • Gender:Male
  • Location:Northern Ireland, Belfast
  • Project:nothing
  • Wiki edits:165
How exactly does this work? Do you rename the wav extention to bin, or make the asm file include the wav file instead? I'm confused ;)

#20 User is offline Flygon 

Posted 22 August 2008 - 07:04 AM

  • Totally me irl
  • Posts: 2126
  • Joined: 10-February 06
  • Gender:Not Telling
  • Location:Victoria, Australia
  • Project:Cleavage
  • Wiki edits:10
You rename the WAV file to something for example.

The engine can tell the difference between a PCM file and an SMPS file, all you have to do is call the WAV file music81.bin and wallah, instant Green Hill Zone music.

#21 User is offline DalekSam 

Posted 22 August 2008 - 07:27 AM

  • woop woop yo ass too fat
  • Posts: 1753
  • Joined: 19-February 08
  • Gender:Male
  • Location:Northern Ireland, Belfast
  • Project:nothing
  • Wiki edits:165
Ahh, but if I do that I get a rom size of 1 KB. Why is this?

#22 User is offline TmEE 

Posted 22 August 2008 - 08:19 AM

  • Watermelons are good stuff
  • Posts: 1488
  • Joined: 06-January 08
  • Gender:Male
  • Location:Estonia, Rapla City
  • Project:Mélodie, Radical Rat, Cannon Cat, SMStrk
  • Wiki edits:11
Just 22KHz :P I remember when I wrote my first MD WAV player on Z80, 8KHz power :/ Now my latest piece of Z80 code can do 52KHz 2x software mixed PCM channels (single channel playback goes up to 110KHz).

anyway, nice work, not many people can get high sampling rates and good quality out of MD using Z80 ;)

There's actually a 4channel PCM player on MD too, but the quality is not too good (6-bit samples don't sound too good :/ )
This post has been edited by TmEE: 22 August 2008 - 08:25 AM

#23 User is offline Sonic 65 

Posted 22 August 2008 - 11:50 AM

  • Posts: 1155
  • Joined: 09-October 04
  • Gender:Male
  • Project:Dustin Wyatt's Epic Jailbreak
  • Wiki edits:13

View PostDalekSam, on Aug 22 2008, 08:27 AM, said:

Ahh, but if I do that I get a rom size of 1 KB. Why is this?


Your WAV file is probably too big. Rompad.exe does this when the ROM is over 4096MB.

Also, the engine can't tell the difference between a PCM and SMPS file automatically. That's why the whole "PlayMusic81" subroutine is added; you'll have to change that subroutine if you want song $82 to be PCM instead.


TmEE said:

Just 22KHz :P I remember when I wrote my first MD WAV player on Z80, 8KHz power :/ Now my latest piece of Z80 code can do 52KHz 2x software mixed PCM channels (single channel playback goes up to 110KHz).

anyway, nice work, not many people can get high sampling rates and good quality out of MD using Z80 smile.gif

There's actually a 4channel PCM player on MD too, but the quality is not too good (6-bit samples don't sound too good :/ )


Well, playing anything above 22KhZ on the MD is probably a waste, IMO, due to large filesize. I've seen your 64KhZ PCM demo; my driver has some optimizations which that one doesn't (e.g. not using add,adc for incrementing). In the source, I actually made a small mistake; I RRCAd for the last bank bit, when I didn't really have to (not doing it for the second-to-last one makes the sound crack for some reason).

And I was actually thinking about releasing this when it could only play at 16KhZ, but then I had an epiphany that you didn't have to change the bank every loop. =P
This post has been edited by Sonic 65: 22 August 2008 - 11:51 AM

#24 User is offline TmEE 

Posted 22 August 2008 - 02:23 PM

  • Watermelons are good stuff
  • Posts: 1488
  • Joined: 06-January 08
  • Gender:Male
  • Location:Estonia, Rapla City
  • Project:Mélodie, Radical Rat, Cannon Cat, SMStrk
  • Wiki edits:11
The great rates I have are achieved by changing bank as little as possible :v:

Anything over 22KHz is a waste on MD really... but the faster your code is (the higher rate is possible and) the more time it can have for other stuff such as background music and sound effects management (though in Sonic1, you have these things handled by the 68K... which is a waste on MD IMHO).

Tip : make use of 256, you can have MAD optimizations around 256 :) Two Hundred Fifty Six is the key of my sound engine, without it, what I've achieved is not possible. The power of 256 -> http://pouet.net/prod.php?which=51277

#25 User is offline Mad Echidna 

Posted 24 August 2008 - 03:28 PM

  • Gone
  • Posts: 5203
  • Joined: 13-January 03
  • Gender:Male
  • Wiki edits:4
Has anyone tried this on Picodrive yet?

#26 User is offline Shibunoa 

Posted 24 August 2008 - 05:29 PM

  • Posts: 329
  • Joined: 19-July 08
  • Gender:Male
  • Location:Italy
  • Wiki edits:28
I tried it both on PicoDrive 1.45 for Windows and 1.35 for Linux, and this works quite well, but often the synthesizer is screwed up when it's playing the PCM music.

#27 User is offline Mad Echidna 

Posted 24 August 2008 - 05:47 PM

  • Gone
  • Posts: 5203
  • Joined: 13-January 03
  • Gender:Male
  • Wiki edits:4
The synthisizer? Could you explain further?

If it works in Picodrive on linux, I suppose that it will work OK on PSP, since the PSP version is a direct port from GP2X.

#28 User is offline Hitaxas 

Posted 24 August 2008 - 08:24 PM

  • SEGA: Sorry Classic Sonic, we are sending you back to 1994
  • Posts: 1352
  • Joined: 30-September 07
  • Gender:Male
  • Location:Litchfield, CT
  • Project:Sonic: Super Deformed (head director) - Slowly working on it.
  • Wiki edits:196
It works fine for me on Picodrive for the psp.

If I were to add this PCM driver to S2, how could I fix this?

assembling s2.asm
PASS 1
s2.macrosetup.asm(201)
s2.sounddriver.asm(2807)
> > >s2.asm(91860): error: invalid symbol name
> > > 0xFF0000
> > >			move.b #(((Music81+$34)&0xFF0000)>>16),($a0003c).l;location -
$__xxxx
> > >s2.asm(91861): error: invalid symbol name
> > > 0xFF00
> > >			move.b #(((Music81+$34)&0xFF00)>>8),($a0003b).l;location - $xx
__xx
> > >s2.asm(91862): error: invalid symbol name
> > > 0xFF
> > >			move.b #((Music81+$34)&0xFF),($a0003a).l;location - $xxxx__
> > >s2.asm(91864): error: invalid symbol name
> > > 0xFF0000
> > >			move.b #(((Music82-Music81)&0xFF0000)>>16),($a0003f).l;length
- $__xxxx
> > >s2.asm(91865): error: invalid symbol name
> > > 0xFF00
> > >			move.b #(((Music82-Music81)&0xFF00)>>8),($a0003e).l;length - $
xx__xx
> > >s2.asm(91866): error: invalid symbol name
> > > 0xFF
> > >			move.b #((Music82-Music81)&0xFF),($a0003d).l;length - $xxxx__
> > >s2.asm(93751): error: addressing mode not allowed here
> > >				 lea (Z802),a0
s2.asm(93783)

16.64 seconds assembly time

  96791 lines source file
 126439 lines incl. macro expansions
	  1 pass
	  7 errors
	  0 warnings
Press any key to continue . . .


EDIT: Also, how friggin' tiny does the WAV have to be? I've got the one I want down from 18.3MB to 61KB, and still can't get a rom to compile in S1
This post has been edited by Hitaxas: 24 August 2008 - 11:09 PM

#29 User is offline shobiz 

Posted 25 August 2008 - 01:36 AM

  • Posts: 863
  • Joined: 27-March 05
  • Gender:Male
  • Location:Karachi, Pakistan
  • Wiki edits:4,411
Hitaxas, why are you using 0x for hex numbers? :S Replace all instances of 0x with $, it should be fine then.

#30 User is offline Hitaxas 

Posted 25 August 2008 - 02:38 AM

  • SEGA: Sorry Classic Sonic, we are sending you back to 1994
  • Posts: 1352
  • Joined: 30-September 07
  • Gender:Male
  • Location:Litchfield, CT
  • Project:Sonic: Super Deformed (head director) - Slowly working on it.
  • Wiki edits:196
Thanks, It works in S2 now.
But I need a good audio converter, because all my WAVs come out sounding like crap on this driver, no matter what I have everything set to.

  • 3 Pages +
  • 1
  • 2
  • 3
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users