Threading CDDA KOS operations

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
Post Reply
User avatar
fox68k
DC Developer
DC Developer
Posts: 49
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Tue Aug 03, 2004 11:01 am
Has thanked: 0
Been thanked: 0
Contact:

Threading CDDA KOS operations

Post by fox68k »

I was wondering if there is any way to avoid system stalls when doing CDDA operations with KOS. This is, changing audio track, stopping, and so on. The DC gets stalled during a short time, and this is annoying :cry:

Thanks in advance.
- fox68k -
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Post by BlackAura »

Not really. If you're using a single-threaded program, that will happen, and there's no way out of it unless you want to rewrite all the low level CD access code yourself.

That said, you could (probably) have the CDDA controls in another thread. That thread simply wakes up, tries to change the CD track, and (assuming the CDDA code is written correctly) goes back to sleep until the CD is ready, leaving the CPU for your main thread.
User avatar
Quzar
Dream Coder
Dream Coder
Posts: 7497
Joined: Wed Jul 31, 2002 12:14 am
Location: Miami, FL
Has thanked: 4 times
Been thanked: 9 times
Contact:

Post by Quzar »

it doesnt barely skip at all when cdda loads its mostly when accessing the CD for data. if there was a gd-rom dma channel that sure would help things.
"When you post fewer lines of text than your signature, consider not posting at all." - A Wise Man
User avatar
fox68k
DC Developer
DC Developer
Posts: 49
Joined: Tue Aug 03, 2004 11:01 am
Has thanked: 0
Been thanked: 0
Contact:

Post by fox68k »

There should be a way to avoid skipping in NeoGeo CD emulators. Game skipping in the middle of playing is somewhat cumbersome.
- fox68k -
Post Reply