Search found 884 matches

by Eke
Mon Jun 03, 2019 6:30 pm
Forum: Mega/SegaCD
Topic: Questions on writing a new Mega CD emulator
Replies: 117
Views: 7602573

Re: Questions on writing a new Mega CD emulator

You are welcome. Gens and Picodrive sourcecode were also quite helpful to me when I was trying to figure some of these things or clarify some stuff so I am glad this can be helpful to others in return. That's also why I always try to comment the code as much as possible and indicate stuff that were ...
by Eke
Sun Jun 02, 2019 12:41 pm
Forum: Mega/SegaCD
Topic: Questions on writing a new Mega CD emulator
Replies: 117
Views: 7602573

Re: Questions on writing a new Mega CD emulator

I already told you (I think at least) but when this was written, there were barely any documentation about CDD and it was implemented to be mostly optimized while still working fine with all existing BIOS / game software. CDD emulation code is therefore definitively not accurate to how the real micr...
by Eke
Wed May 22, 2019 9:02 pm
Forum: Mega/SegaCD
Topic: Questions on writing a new Mega CD emulator
Replies: 117
Views: 7602573

Re: Questions on writing a new Mega CD emulator

And reading STAT3 will clear the pending status bit, but won't actually suppress an interrupt that was queued to trigger later? Well, that is likely incorrect in my code actually (you can see there is commented code which clear the pending int5 flag when !DECI is set and CDC irq line is disactivate...
by Eke
Wed May 22, 2019 9:38 am
Forum: Mega/SegaCD
Topic: Questions on writing a new Mega CD emulator
Replies: 117
Views: 7602573

Re: Questions on writing a new Mega CD emulator

how does the BIOS get correct TOC information if the lead-in area hasn't already been read in? I would think you'd have to wait N milliseconds for the drive head to seek to the beginning of the disc, plus two more seconds after starting the disc reading before you could query TOC information via 0x...
by Eke
Tue May 21, 2019 11:52 pm
Forum: Mega/SegaCD
Topic: Questions on writing a new Mega CD emulator
Replies: 117
Views: 7602573

Re: Questions on writing a new Mega CD emulator

:P Genesis Plus GX seems to start in the "reading TOC" (0x9) mode when the system is reset and a disc is inserted. The BIOS then sends a "stop" (0x1) command, which GX lets the BIOS read back once, and then it switches to "reading TOC" mode again. This was based on the status infos described in Stef...
by Eke
Fri May 10, 2019 6:36 am
Forum: Mega/SegaCD
Topic: Questions on writing a new Mega CD emulator
Replies: 117
Views: 7602573

Re: Questions on writing a new Mega CD emulator

hopefully some helpful stuff towards Sega CD emulation. That's a great release, with a lot of interesting manuals but there does not seem to be any unknown Genesis or Sega CD hardware documentation in there (I can not tell for Saturn emulation though). It adds a few Genesis / Sega CD Technical Bull...
by Eke
Mon May 06, 2019 8:14 am
Forum: Mega/SegaCD
Topic: Questions on writing a new Mega CD emulator
Replies: 117
Views: 7602573

Re: Questions on writing a new Mega CD emulator

And it raises another question: should the subchannels be stored in the deinterleaved or in the interleaved form? They are interleaved on the CD itself and certain drives are able to output the raw interleaved subs in certain modes. For the record, Mega-CD gate-array stores subcode data in raw (int...
by Eke
Sat May 04, 2019 1:12 pm
Forum: Mega/SegaCD
Topic: Questions on writing a new Mega CD emulator
Replies: 117
Views: 7602573

Re: Questions on writing a new Mega CD emulator

I agree, and I'm all for supporting a full image format with leadin/leadout sectors if that's ever possible to get these dumped more accurately than current TOC infos reported in cue/ccd/toc/etc files if concerned people ends up with one that is 'perfect' enough for everybody. Personally, I also hav...
by Eke
Sat May 04, 2019 11:59 am
Forum: Mega/SegaCD
Topic: Questions on writing a new Mega CD emulator
Replies: 117
Views: 7602573

Re: Questions on writing a new Mega CD emulator

So then as I presume the Mega CD BIOS expects to be able to read the raw TOC data, No, it doesn't. BIOS only reads the TOC data through CDD command/status. Q channel raw data is decoded by CD DSP chip and sent to CDD micro-controller (through SUBQ signal) which extracts the TOC infos from it while ...
by Eke
Fri May 03, 2019 8:44 am
Forum: Mega/SegaCD
Topic: Questions on writing a new Mega CD emulator
Replies: 117
Views: 7602573

Re: Questions on writing a new Mega CD emulator

There are a few interesting defines iib that file, to improve CDD emulation accuracy. ;;various timeout values IRQTIMEOUT EQU 2 ;number of ms before HSCK required after IRQ HSCKTIMEOUT EQU 3 ;number of ms to complete status/command sequence H2ITIMEOUT EQU 3 ;number of ms to wait for handshake from t...
by Eke
Fri May 03, 2019 6:47 am
Forum: Mega/SegaCD
Topic: Questions on writing a new Mega CD emulator
Replies: 117
Views: 7602573

Re: Questions on writing a new Mega CD emulator

Wow, this is very interesting piece of information, thank you Nemesis ! I just had a look at segaemu.asm file and it indeed seems to be direct emulation of CDD hardware (maybe more ?), including CDCK/HOCK communication protocol with gate-array, handling of commands, status responses, TOC extraction ...
by Eke
Thu May 02, 2019 2:49 pm
Forum: Mega/SegaCD
Topic: Questions on writing a new Mega CD emulator
Replies: 117
Views: 7602573

Re: Questions on writing a new Mega CD emulator

Indeed you are right; my mistake, that would be on sub-CPU side only.
by Eke
Thu May 02, 2019 6:27 am
Forum: Mega/SegaCD
Topic: Questions on writing a new Mega CD emulator
Replies: 117
Views: 7602573

Re: Questions on writing a new Mega CD emulator

I really don't have a clue how to emulate this. Looking at your load() function code, you could easily emulate this by using an alternate read() function to read from cpu space, something like this (also missing mega cd hardware condition check but you get the idea): uint16 VDP::DMA::readbus(uint24...
by Eke
Wed May 01, 2019 10:06 pm
Forum: Mega/SegaCD
Topic: Questions on writing a new Mega CD emulator
Replies: 117
Views: 7602573

Re: Questions on writing a new Mega CD emulator

I see that GPGX is caching some stuff when starting a new block render Yes, to optimize rendering, I precalculate all the parameters that remain unchanged and initialize address pointers when the gfx operation is triggered rather than recalculating or reading again everything on each line, assuming...
by Eke
Wed May 01, 2019 6:25 am
Forum: Mega/SegaCD
Topic: Questions on writing a new Mega CD emulator
Replies: 117
Views: 7602573

Re: Questions on writing a new Mega CD emulator

X'Eye and Wondermega1/2 BIOS are compatible with Genesis Plus GX using the exact same CDD emulation model as with other models so I don't think CDD programs are incompatible or even so much different but rather that they are all based on the same source, with some added internal functions to support...