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
Joined: Tue Aug 03, 2004 11:01 am
Has liked: 0
Been liked: 0
Contact:

Threading CDDA KOS operations

Post by fox68k » Wed Apr 06, 2005 7:51 am

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 liked: 0
Been liked: 0

Post by BlackAura » Wed Apr 06, 2005 10:06 am

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: 7491
Joined: Wed Jul 31, 2002 12:14 am
Location: Miami, FL
Has liked: 0
Been liked: 3 times
Contact:

Post by Quzar » Wed Apr 06, 2005 7:41 pm

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 liked: 0
Been liked: 0
Contact:

Post by fox68k » Fri Apr 08, 2005 9:09 am

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