Page 2 of 2
Re: VAG Example (VAG DEMO)
Posted: April 5th, 2018, 11:06 am
by Administrator
Again, there are no CD-ROM load functions. It won't work unless you code them in. It was written for use with CAETLA or CATFLAP since the VAG file is loaded directly into memory.
Re: VAG Example (VAG DEMO)
Posted: April 5th, 2018, 12:18 pm
by MrQuetch
Shadow wrote: April 5th, 2018, 11:06 am
Again, there are no CD-ROM load functions. It won't work unless you code them in. It was written for use with CAETLA or CATFLAP since the VAG file is loaded directly into memory.
My apologies. I understand that. What I meant to ask was how I would go about coding them in?
Re: VAG Example (VAG DEMO)
Posted: April 5th, 2018, 1:39 pm
by Administrator
I think there's an example of how to load from the CD somewhere on the forums. If not, code one up yourself or use the code from some of the homebrew programs.
You're looking for the function(s) "CdRead", "CdRead2" or "CdReadFile".
Re: VAG Example (VAG DEMO)
Posted: November 26th, 2018, 1:10 am
by ycelik
First of all, Shadow, thanks for the example.
I only have one question about the sample: I can only seem to make it work with a limited amount of files.
I do alter the VAG_DATA_SIZE according to the .vag file in question; however, I just cannot hear anything.
The included pedobear.vag file works. However, any other file I offer does not; even the LION.VAG and GUITAR.VAG files included in the official SDK data folder.
On the other hand, very peculiar, the ui4.vag included in Orion's psxlib does play. Moreover, if I take his .wav file and convert it to another vag file via Vagedit, it still works (as of yet only tested on emulators).
There is no rhyme or reason to why I cannot get things to work with my own .vag files or the official .vag files.(the included test.vag also does not work).
All files are in mono and 22 khz.
Re: VAG Example (VAG DEMO)
Posted: November 26th, 2018, 4:14 am
by Administrator
The files in the SDK may be corrupted. Also, be sure you're not exceeding the memory limit or addressing scheme. Best to also use VAGTOOL to play them back to see if they work. Otherwise, make your own from WAV files using VAGTOOL and try that.
Re: VAG Example (VAG DEMO)
Posted: November 26th, 2018, 6:45 pm
by ycelik
You know, I had thought of the possibility of corrupt SDK Vag files, and therefore tried to convert a .wav file I had to .Vag with the Vagedit tool. However, that also did not work. Anyhow, after your comment I gave it another go with different .wav files, and, what do you know: it worked. Finally! The last element missing in my game: sound. Anyways, thanks for the comment.
Shadow wrote: November 26th, 2018, 4:14 am
The files in the SDK may be corrupted. Also, be sure you're not exceeding the memory limit or addressing scheme. Best to also use VAGTOOL to play them back to see if they work. Otherwise, make your own from WAV files using VAGTOOL and try that.