I don't know if it helps, but Sonic CD uses this method, after 3 frames(or more, I don't remember) there's lots of "nothing". I guess, they used this to get some speed. Personally I don't use dummy data. Well, thing is on CD, lots of space, why not.Fonzie wrote:Steve told me to put dummy data to reach maximum bitrate and avoid any seeking problem between each chunk of 1second fmv... That would work but it is extremely "sad" method.
CDROM reading speed
Moderator: Mask of Destiny
-
- Very interested
- Posts: 2442
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
Mida sa loed ? Nagunii aru ei saa
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
Yeah, i would like to avoid dummy... haha
Could someone add a feature in genskmod to log every D0 data at each 0x5f22 jump (subcpu 68000) in a .txt file ,it would be extremely usefull to know how the games do
So far, i think Bugblaster uses the dummy thing too...
I have another idea that would let loading two seconds of FMV in the buffer but it would require the fallowing :
-Do not use anymore the 128KB*2 Flip flop ram.
-Use BusRequest to dma 96tiles periodicaly from subcpu ram to VRAM (with finger crossed that it wouldn't slowdown the cdrom read rate).
I just wonder if any FMV engine do that (DMA from SubCpu ram to VRAM while subcpu is reading data off disc). Any idea?
Could someone add a feature in genskmod to log every D0 data at each 0x5f22 jump (subcpu 68000) in a .txt file ,it would be extremely usefull to know how the games do
So far, i think Bugblaster uses the dummy thing too...
I have another idea that would let loading two seconds of FMV in the buffer but it would require the fallowing :
-Do not use anymore the 128KB*2 Flip flop ram.
-Use BusRequest to dma 96tiles periodicaly from subcpu ram to VRAM (with finger crossed that it wouldn't slowdown the cdrom read rate).
I just wonder if any FMV engine do that (DMA from SubCpu ram to VRAM while subcpu is reading data off disc). Any idea?
Okay
I read that the cdrom exact speed is 75sectors a second
So I put 75sectors / second bitrate and it worked on real hardware
No need to pause/unpause or anything like that now
I fear that if the disc is scratched, the bitrate would slowdown => big glitches in the pcm playback...
But I hope it is a safe method for use in a real game... I hope :'(
http://www.genny4ever.net/temp/yatta_eqxpro8.mov
So, from what i've experimented, seeking or pause/unpause takes around 0.5 second if well done... So if you want to read a stream that require more than 0.4-0.5 second reading per second (around 50KB/sec), it cannot work on real hardware
Thank you all for all your advices.
Now I start to think that all the compression schemes I had to implement to make a mad VBR are quite useless, that's uber sad... LOL
Actualy, with a 75sectors/second bitrate, it could be possible to rise to 14fps FMV. But 10fps would be more reasonable (was 8fps actualy)
I read that the cdrom exact speed is 75sectors a second
So I put 75sectors / second bitrate and it worked on real hardware
No need to pause/unpause or anything like that now
I fear that if the disc is scratched, the bitrate would slowdown => big glitches in the pcm playback...
But I hope it is a safe method for use in a real game... I hope :'(
http://www.genny4ever.net/temp/yatta_eqxpro8.mov
So, from what i've experimented, seeking or pause/unpause takes around 0.5 second if well done... So if you want to read a stream that require more than 0.4-0.5 second reading per second (around 50KB/sec), it cannot work on real hardware
Thank you all for all your advices.
Now I start to think that all the compression schemes I had to implement to make a mad VBR are quite useless, that's uber sad... LOL
Actualy, with a 75sectors/second bitrate, it could be possible to rise to 14fps FMV. But 10fps would be more reasonable (was 8fps actualy)
-
- Very interested
- Posts: 616
- Joined: Thu Nov 30, 2006 6:30 am
Oh, so you were trying to pause the disc while you went and did something else for a while and then unpaused it afterwords because you didn't have an exact 75 sector/second data rate? No wonder you were having speed problems.
You're never going to get anywhere near full speed on the Sega CD CD-ROM drive unless you're reading a continuous stream of data. From the physical limitations of a 1X drive alone you could be looking at a .1 to .2 second delay just waiting for the disc to spin around to the right position again.
You're never going to get anywhere near full speed on the Sega CD CD-ROM drive unless you're reading a continuous stream of data. From the physical limitations of a 1X drive alone you could be looking at a .1 to .2 second delay just waiting for the disc to spin around to the right position again.
I don't think you need to worry. None of the commercial FMV games handled disc errors very well from what I recall.I fear that if the disc is scratched, the bitrate would slowdown => big glitches in the pcm playback...
But I hope it is a safe method for use in a real game... I hope :'(
haha, i'm a bit stupid... sorryOh, so you were trying to pause the disc while you went and did something else for a while and then unpaused it afterwords because you didn't have an exact 75 sector/second data rate? No wonder you were having speed problems.
The advantage of 75sectors per second is that i can seek anywhere in my video file With VBR, it was impossible.
Thx for the confirm, I added error detection... It says "error" but don't try any work around yetI don't think you need to worry. None of the commercial FMV games handled disc errors very well from what I recall.
Okay, new issue
In fact, my previous code was synchronized with the PCM playback...
My maincpu code was displaying a bit faster than pcm playback and loading was also requested around the playback.
Now that I had (thx to your advices) synchronized with the cdrom fullspeed (suposely 75sectors per seconds)... I still let my display bit faster. But i get big trouble to get the pcm working correctly... If you get what i mean...
My actual pcm technique uses two banks of 16KB each (1second each), so, when one bank is played, i reload the other one...
To make the synch, i just wait that the pcm chip go from one bank to another.
As you may understood, i cannot use this method anymore (since it appear that the pcm plays a bit faster than the loading).
I had in mind a trick that would consist of slowdowning the pcm playback if the pcm buffer comes "too empty". And get it normal speed when it comes "too full" (if too full, i have to wait more, not good for loading synchro).
Do you think its a good idea?
In fact, my previous code was synchronized with the PCM playback...
My maincpu code was displaying a bit faster than pcm playback and loading was also requested around the playback.
Now that I had (thx to your advices) synchronized with the cdrom fullspeed (suposely 75sectors per seconds)... I still let my display bit faster. But i get big trouble to get the pcm working correctly... If you get what i mean...
My actual pcm technique uses two banks of 16KB each (1second each), so, when one bank is played, i reload the other one...
To make the synch, i just wait that the pcm chip go from one bank to another.
As you may understood, i cannot use this method anymore (since it appear that the pcm plays a bit faster than the loading).
I had in mind a trick that would consist of slowdowning the pcm playback if the pcm buffer comes "too empty". And get it normal speed when it comes "too full" (if too full, i have to wait more, not good for loading synchro).
Do you think its a good idea?
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
I'm probably missing something but just in case :Fonzie wrote:Okay, new issue
In fact, my previous code was synchronized with the PCM playback...
My maincpu code was displaying a bit faster than pcm playback and loading was also requested around the playback.
Now that I had (thx to your advices) synchronized with the cdrom fullspeed (suposely 75sectors per seconds)... I still let my display bit faster. But i get big trouble to get the pcm working correctly... If you get what i mean...
My actual pcm technique uses two banks of 16KB each (1second each), so, when one bank is played, i reload the other one...
To make the synch, i just wait that the pcm chip go from one bank to another.
As you may understood, i cannot use this method anymore (since it appear that the pcm plays a bit faster than the loading).
I had in mind a trick that would consist of slowdowning the pcm playback if the pcm buffer comes "too empty". And get it normal speed when it comes "too full" (if too full, i have to wait more, not good for loading synchro).
Do you think its a good idea?
what not use more than 2 buffer ? what about a circular 4 or 8 buffers ?
it's typically what i'm doing with all sound playback stuff : using a circular buffer where one is read, another is write and others buffer permit you some delay in fill compute. More you have buffer, more lag you can support
Haha, i think you missed something But yeah, i'm using a sort of circular buffer divided into two big loading banks of 1second each one (reloaded per chunck of 256bytes while reading data from disc, a mad system)...
My problem is that my audio streaming is fixed to the cdrom speed.... So after, lets say 20seconds, if there is a little speed difference, the pcm buffer gets stuck
I fixed it by slowdowning the playback when the pcm buffer is too empty and it works... but sounds a bit distord at some points LOL, like old road avenger game LOL
My problem is that my audio streaming is fixed to the cdrom speed.... So after, lets say 20seconds, if there is a little speed difference, the pcm buffer gets stuck
I fixed it by slowdowning the playback when the pcm buffer is too empty and it works... but sounds a bit distord at some points LOL, like old road avenger game LOL
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
ah ok i got itFonzie wrote:Haha, i think you missed something But yeah, i'm using a sort of circular buffer divided into two big loading banks of 1second each one (reloaded per chunck of 256bytes while reading data from disc, a mad system)...
My problem is that my audio streaming is fixed to the cdrom speed.... So after, lets say 20seconds, if there is a little speed difference, the pcm buffer gets stuck
I fixed it by slowdowning the playback when the pcm buffer is too empty and it works... but sounds a bit distord at some points LOL, like old road avenger game LOL
There is no way of perfectly synchronise cd speed and your audio stream by choosing a 1/75s multiplier output rate for your audio sample rate (11025, 15000 for example) ? anyway if your method works, it's ok
No prob , I think i'll try to find a good "speedup" ratio... that isn't noticable
The official documentation about the pcm chips is simply insane... All the addresses are wrong... and the "sample rate" registers are absolutely mad (i could find good values, but it was by checking allmost all possibilities).
But, wouldn't the segacd beeing a great system for DJ's ? oversampling and downsampling channels is simply amazing... we can make some scratch, reverb... And the segacd ram can store a lot of samples... I'm surprised that no segacd games did experimental things with it.
The official documentation about the pcm chips is simply insane... All the addresses are wrong... and the "sample rate" registers are absolutely mad (i could find good values, but it was by checking allmost all possibilities).
But, wouldn't the segacd beeing a great system for DJ's ? oversampling and downsampling channels is simply amazing... we can make some scratch, reverb... And the segacd ram can store a lot of samples... I'm surprised that no segacd games did experimental things with it.