Previous Thread
Next Thread
Print Thread
Page 1 of 2 1 2
CD-i question #74314 11/12/11 07:32 PM
Joined: May 2010
Posts: 42
M
mesk Offline OP
Member
OP Offline
Member
M
Joined: May 2010
Posts: 42
Please forgive me if this has been asked\answered before,but I am curious as to why CD-i support is limited to PAL only?

Last edited by mesk; 11/12/11 08:34 PM.
Re: CD-i question [Re: mesk] #74318 11/12/11 09:03 PM
Joined: May 2009
Posts: 1,829
J
Just Desserts Offline
Very Senior Member
Offline
Very Senior Member
J
Joined: May 2009
Posts: 1,829
Originally Posted By mesk
Please forgive me if this has been asked\answered before,but I am curious as to why CD-i support is limited to PAL only?


Because to work on the current CD-i driver any further would be to polish a turd. I'll be happy to look into it if anyone ever procures dumps of the internal ROMs for the various peripheral MCUs that correspond to the specific CD-i board revision that MESS currently emulates, but beyond that I'd just be piling even more hacks on top of what is already a hack.

Re: CD-i question [Re: mesk] #74320 11/13/11 01:47 AM
Joined: May 2004
Posts: 1,602
H
Haze Offline
Very Senior Member
Offline
Very Senior Member
H
Joined: May 2004
Posts: 1,602
CDi could be improved without the need for internal ROMs.. IMHO internal ROMs even have the ability to make things worse.

From what I can see the games for the system are designed in a fairly abstract manner, near enough an old style sandbox, designed to survive hardware changes because Phillips designed it as the ultimate 'future-proof' multimedia system (however foolish that ended up being). There are probably a few key bugs in the implementation causing the vast majority of the problems.

It's an impressive driver, don't get me wrong, but from my own study of it I don't feel it actually *needs* the internal ROMsto improve compatibility, afaik the standalone CDi emu does fine without them.

Don't bother to reply with some trollish 'well do it then' response, this is just my opinion, and I think it would be a good, and realistic project for somebody new to MESS/MAME to attempt to improve, keeping doors open and all that.


Re: CD-i question [Re: mesk] #74321 11/13/11 02:23 AM
Joined: Mar 2001
Posts: 16,419
R
R. Belmont Offline
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,419
The standalone CD-i emu has major problems as well - I gather you haven't actually used it.

Re: CD-i question [Re: mesk] #74322 11/13/11 02:33 AM
Joined: May 2004
Posts: 1,602
H
Haze Offline
Very Senior Member
Offline
Very Senior Member
H
Joined: May 2004
Posts: 1,602
I've used it.. but the issues seem to be different to those in MAME/MESS.

I just get the impression that the belief that having the slave ROMs will fix the emulation is a bit of a false hope, if the problems are down to timings etc. then even having a proper CPU running might not solve that. Simply the CD controllers on their own can be complex beasts, just like floppy drives, as I've found with other systems. If anything it might just shift the problems elsewhere and lead to less certainty about which stage of the emulation is actually buggy.

Again, just my opinion, I'd love to be proved wrong, but I don't think this is an open and shut case of 'proper MCU dump will solve everything' and if the original system has a certain tolerance of different hardware then I imagine a lot of the issues will come down to some fundamental misunderstanding of things.

IOW I think once it's fixed those involved with it before will go "D'oh" as often happens in emulation ;-) Fresh eyes and all that. Besides, we should be encouraging people to look, not putting them off ;-)

Re: CD-i question [Re: mesk] #74324 11/13/11 02:59 AM
Joined: Mar 2001
Posts: 16,419
R
R. Belmont Offline
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,419
Agreed, but I'm not convinced "here's a driver where you have to work out the undocumented interactions between 3 undumped MCUs and an undocumented CD controller" is an ideal beginner's project. MESS still has plenty of stuff in the "emulate/find bugs in your favorite home computer from your childhood" category, and that's usually simpler unless you were a child in Japan ;-)

Re: CD-i question [Re: Haze] #74331 11/13/11 03:04 PM
Joined: May 2009
Posts: 1,829
J
Just Desserts Offline
Very Senior Member
Offline
Very Senior Member
J
Joined: May 2009
Posts: 1,829
Originally Posted By Haze
CDi could be improved without the need for internal ROMs.. IMHO internal ROMs even have the ability to make things worse.

From what I can see the games for the system are designed in a fairly abstract manner, near enough an old style sandbox, designed to survive hardware changes because Phillips designed it as the ultimate 'future-proof' multimedia system (however foolish that ended up being). There are probably a few key bugs in the implementation causing the vast majority of the problems.


I don't disagree with any of what you're saying. To be quite honest, it is a very simple system, at least the Mono-II. The real problem comes from the abstraction that you mentioned above. By virtue of all of these different games going through the same core I/O functions that are supplied by the BIOS, there is an enormous lack of test cases. You've been around for a while, I'm sure you know that having different games that hit the hardware in different ways are the bread and butter of figuring out unknown peripheral chips, same situation as the A'Can. When you have different games that all hit the hardware in the exact same way, though, it becomes much harder to divine the exact expected behaviour. frown

Originally Posted By Haze
It's an impressive driver, don't get me wrong, but from my own study of it I don't feel it actually *needs* the internal ROMsto improve compatibility, afaik the standalone CDi emu does fine without them.


It's pretty buggy in some respects, to be honest. As you said in your follow-up post, it's buggy in different ways than MAME. That said, I'm not keen on any particular MAME or MESS developer shouldering the blame for that one, because it's kind of hard to get implementation details right when the author of the only other CD-i emulator to run commercial games insists on spoon-feeding bits of peripheral code from his emulator that don't ever answer 100% of my questions. I'm basically hamstrung from both ends - I have a bunch of CD-i games that all hit the hardware in more or less the same way, and I have someone who has worked out more of the details than I who still tries to play his cards more or less close to his chest.

Originally Posted By Haze
Don't bother to reply with some trollish 'well do it then' response, this is just my opinion, and I think it would be a good, and realistic project for somebody new to MESS/MAME to attempt to improve, keeping doors open and all that.


Well, you know, I was actually going to say "I seem to recall you've looked at it in the past and have some input as to potential bugs, if you ever have a chance to hop on IRC, perhaps we could work together on CD-i specifically as long as neither of us brings up any topic outside of the pre-agreed-upon topic of CD-i," but I'm glad that you still think I'm some kind of horrible monster.

Re: CD-i question [Re: mesk] #74346 11/13/11 07:59 PM
Joined: Sep 2009
Posts: 223
C
CD-i Fan Offline
Senior Member
Offline
Senior Member
C
Joined: Sep 2009
Posts: 223
I don't see how you or anybody else is more hamstrung then I was when developing that "commercial" emu?

I have no more chip documentation then you do, in fact I originally had less since I worked on a different board (MiniMMC, it uses the (at the time) undocumented 2xVSC+VSD chips instead of the documented VDSC). My only "plus" is some years of headstart and a very good familiarity with the system as a developer.

It does make me wonder where MESS CD-i would be without me "spoonfeeding" those bits of source; I was under the impression that limiting your exposure to things that would only distract you was a good thing?

And in fact I enjoyed our discussions, I think both emulators ended up better as a result of it.

All of that aside, I sincerely believe that most current emulation bugs (in either emulator) would not be easily solved even with the contents of the internal ROMs; these bugs are probably only peripherally (no pun intended) related to the contents of those ROMs.

To get more insight into how "real" players work, you can just test them, most models are still fairly easily obtainable. That being said, I've only had to resort to this in a few cases (certainly less then five).

Getting back to the original question, I think there's only PAL support because JD hasn't figured out how to get the player into NTSC mode. I figured this out by disassembling the ROMs and working backwards. This wasn't very hard, but I'll save you the hassle: it's the return from the SLAVE port D command 0xF6 that determines the video mode. Return 0xF6 0x01 for NTSC, 0xF6 0x02 for PAL. The SLAVE determines this value from one of its input pins which is (depending on the player) set by an external pullup/pulldown resistor or a user-changable switch. I recently modified a consumer player to replace the installed resistor with a switch and it works fine, except that the carrier frequency is a little bit off (PAL and NTSC really need crystals with a slightly different frequency which my modification didn't handle). For more about this see this topic on the CDinteractive.co.uk Technical Support Forum.

The relevant source from CD-i Emulator is:

Originally Posted By "CD-i Emulator"
case PORTCMD(ePORT_D, SLAVE_F6):
  // Sent during boot to get video mode 1=NTSC 2=PAL
  SetReadData(ePORT_C, BYTE68K_SIZE + BYTE68K_SIZE, (SLAVE_F6 << 8) + m_nVideoMode);
  break;

If you like you may consider this another spoonfeed :-)

Re: CD-i question [Re: CD-i Fan] #74348 11/13/11 08:10 PM
Joined: Sep 2009
Posts: 223
C
CD-i Fan Offline
Senior Member
Offline
Senior Member
C
Joined: Sep 2009
Posts: 223
PS. To avoid misunderstandings based on terminology, what I call "SLAVE port D" corresponds to memory address 0x310007. And the return bytes are via SLAVE port C at 0x310005.

Last edited by CD-i Fan; 11/13/11 08:12 PM.
Re: CD-i question [Re: CD-i Fan] #74349 11/14/11 12:12 AM
Joined: May 2009
Posts: 1,829
J
Just Desserts Offline
Very Senior Member
Offline
Very Senior Member
J
Joined: May 2009
Posts: 1,829
Originally Posted By CD-i Fan
If you like you may consider this another spoonfeed :-)


I had found this out by pure happenstance when I was fiddling with the different magic numbers that MESS returns on different SLAVE chip ports. The reason why I never bothered adding it is because it seems pointless; hooray, more games can now boot so that they can crash miserably due to a duct-taped-together CDIC framework in MESS that makes the emulation hang, play static from time to time, or omit various sound effects or mis-time other audio cues because I have no idea how to fix my own implementation that I've cobbled together based on reluctant hand-outs. The constant air of "I know more than you, dance, my pretty, dance for your scraps" and the unwritten subtext that I am some hooligan who, if given unfettered access to the source code for CD-i Emu, would spread it far and wide, rather than the more accurate notion that I am someone who has spent the past 6 years shipping commercial game titles and who treats an NDA as gospel, is what led to the trailing off of my e-mails to you. I don't like being made to sing for my supper, and I certainly don't like being made to feel distrusted. Many closed-source emulators have shared their sources freely with MAMEdev and MESSdev, and none have been leaked by us. You are, thus far, the only person who has decided to share only small portions of code with a marionette's amount of strings attached.

I've spent numerous weekends' worth of my spare time trying to rectify these bugs. I've spent numerous weeks' worth of nights attempting the same. Heck, I even managed to get Zelda's Adventure to not hang after the first screen, but then Lemmings started crashing when it would try to play the first sound effect in-game, hooray! But then, now it's sounding like I'm starting to play the martyr game, too - the "I spent so much time on this, my burden is so great" card.

Thanks to MESS being perpetually kept in its lame-duck status because I can't mysteriously conjure up a CD-i player out of thin air on which to run tests, being as I can't afford anything except rent, food and meds right now, and thanks to me not having the inclination to spend weeks upon weeks doing redundant work reverse-engineering a two-decade-old dead console whose biggest claim to fame is having the worst Zelda and Mario games ever made, you will never have to worry about MESS competing with your surely burgeoning CD-i emulator business.

Originally Posted By CD-i Fan
And in fact I enjoyed our discussions, I think both emulators ended up better as a result of it.


You're absolutely right. Your emulator ended up better, able to support more games more consistently after some small question or other of mine. MESS, too, ended up better - better than nothing.

Originally Posted By CD-i Fan
It does make me wonder where MESS CD-i would be without me "spoonfeeding" those bits of source; I was under the impression that limiting your exposure to things that would only distract you was a good thing?


See above; it would likely be nowhere, but thanks to your generous help I have robbed Peter to pay Paul; now instead of people wondering aloud why MESS doesn't support CD-i, they wonder aloud why MESS supports CD-i so poorly. You seem to see CD-i emulation as a set of cards that must be played as closely to your chest as possible, throwing a card into the river only once everyone antes up. By contrast, I see the CD-i as a crap console that has only gone unemulated in an open manner for so long because people care so little about it. It's not a coincidence, in my opinion, that both more-popular and less-popular consoles and computers have been emulated in MESS. That both more-complex and less-complex systems have been emulated in both MESS and MAME.

I was interested in emulating the CD-i because despite not knowing the ins and outs of all of the different CD-i platforms that you have emulated, I sincerely doubt that any of them are more complex than the Nintendo 64, so it seemed like a pretty simple target to hit until I found out that because it was such a red-headed stepchild of a console, nobody ever bothered to leak any significant amount of register-level programming documentation, and the only other person to be interested in emulating the CD-i apparently sees it as a business, something to profit from, whether fiscally or intellectually.

Given the PR nightmare that has been trying to scrape together any of the pre-existing information on the CD-i, I think I am quite justified in my choice of just letting it sit there. Feel free to take your ball and go home if you want to, but if you ever decide to step out of the world of quid pro quo or even draw up an NDA for me to sign, I'll be sitting right here.

Page 1 of 2 1 2

Who's Online Now
1 registered members (Praxis), 138 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics8,734
Posts114,823
Members4,877
Most Online890
Jan 17th, 2020
Powered by UBB.threads™ PHP Forum Software 7.7.3