Better MegaCD manual scans from "Sphere, INC"

Ask anything your want about Mega/SegaCD programming.

Moderator: Mask of Destiny

Post Reply
Nemesis
Very interested
Posts: 773
Joined: Wed Nov 07, 2007 1:09 am
Location: Sydney, Australia

Better MegaCD manual scans from "Sphere, INC"

Post by Nemesis » Wed Feb 16, 2011 3:51 am

Everyone here is probably familiar with the "Rex Sabio" scans of the official MegaCD programming manuals:
http://nemesis.hacking-cult.org/MegaDri ... Manual.zip
Does anyone know about some rescanned pages from "Sphere, INC" though? Check them out here:
http://nemesis.hacking-cult.org/MegaDri ... ereINC.zip

While crawling the web for documentation, I came across these files on ElBarto's webspace. I've asked him, and he doesn't know where he got them. Has anyone else ever seen these files? Does anyone know where they came from?

I'm very interested in the original source for these scans, as the MegaCD manual from Rex Sabio isn't exactly great. The original document was obviously sent over fax, and some parts of it, particularly the shaded sections of various tables, can be very hard or impossible to read. Page 4 of the hardware manual is also completely missing. The Sphere INC version of this manual seems to be much better, with the scans being of an original, non-faxed version. Despite having the same date and version number at the bottom of the page, the Rex Sabio version also seems to be an earlier version of the manual, possibly a pre-publication version, with some hand-made corrections visible on the Rex Sabio version, with the correct information being part of the original printout on the Sphere INC version. The Sphere INC version also includes additional hand-made corrections for errors which weren't picked up in the Rex Sabio version. See pages 22, 24, and 25 for some examples of this.

I'm interested if there are any more pages which have been scanned from this better copy of the manual, and if not, I'm interested in getting in touch with the owner of this manual and seeing if we can get some high quality (preferrably png) scans of the entire manual. I'm also very interested in getting a scan of the missing page 4 if possible. Does anyone know who might be in possession of this document, and where it first surfaced?

Chilly Willy
Very interested
Posts: 2854
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Wed Feb 16, 2011 6:05 am

Sphere, Inc. is almost certainly the company owned by UK media baron Robert Maxwell, who bought Nexa and Spectrum HoloByte in 1991. They did some Master System and Genesis games, so they'd certainly have had the manuals. No idea beyond that... probably this came from someone buying "stuff" auctioned from Nexa or Spectrum HoloByte, with the name indicating the time being after the two were bought and merged.

sega16
Very interested
Posts: 251
Joined: Sat Jan 29, 2011 3:16 pm
Location: U.S.A.

Post by sega16 » Wed Feb 16, 2011 10:57 pm

In the zip file did you include all the pages you found because it seems to be missing alot of pages.

Nemesis
Very interested
Posts: 773
Joined: Wed Nov 07, 2007 1:09 am
Location: Sydney, Australia

Post by Nemesis » Thu Feb 17, 2011 12:45 am

Those are all the files that ElBarto had. Here's where I found those files originally:
http://www.megadrive.org/~elbarto/md/Do ... are%20New/

It looks like someone re-scanned some pages which were especially bad from the Sphere INC version, just as a suppliment to the existing Rex Sabio version.

Eke
Very interested
Posts: 864
Joined: Wed Feb 28, 2007 2:57 pm
Contact:

Post by Eke » Fri Oct 14, 2011 1:18 pm

While analyzing the available manuals (not the re-scanned one since that part is specifically missing) I noted that there was some contradiction on how main CPU can write protect sub CPU PRG-RAM ($A12002 register):

- Hardware Manual (p.58 ) states that each 512-bytes sections in $00000-$1FFFF range can be write-protected.

- Software Development Manual (p.33) states that each 256-bytes sections in $00000-$0FFFF range can be write-protected.

Does anyone know which one is right ?

HardWareMan
Very interested
Posts: 732
Joined: Sat Dec 15, 2007 7:49 am
Location: Kazakhstan, Pavlodar

Post by HardWareMan » Fri Oct 14, 2011 1:44 pm

Maybe this error in the use of "byte" Instead of the "word"? If we bear in mind that 512 bytes is 256 words - that's all right.

TascoDLX
Very interested
Posts: 256
Joined: Tue Feb 06, 2007 8:18 pm

Post by TascoDLX » Fri Oct 14, 2011 9:40 pm

I haven't tested it explicitly, but it should be 512-byte segments. The bios invariably sets the write-protect value to 0x2A in order to protect 0x0000 thru 0x53FF. Incidently, this range is good for the original sub bios, though later versions of it extend past 0x53FF (<= 0x57FF).

Eke
Very interested
Posts: 864
Joined: Wed Feb 28, 2007 2:57 pm
Contact:

Post by Eke » Sat Oct 15, 2011 9:01 am

Thank you.
Do you know if I can find the uncompressed BIOS in bin format somewhere, to disassemble it myself ? I know there is already a disassembled text version available but i am more comfortable with IDA to analyze code flow.

TascoDLX
Very interested
Posts: 256
Joined: Tue Feb 06, 2007 8:18 pm

Post by TascoDLX » Sat Oct 15, 2011 9:30 pm

As always, there's the one at Eidolon's: scd_100_us.zip. It's a memory snapshot that includes the sub bios (the first 22KB), the bios SP and its PCM module.

If you're looking for a particular version, it should be easy enough to extract.

Eke
Very interested
Posts: 864
Joined: Wed Feb 28, 2007 2:57 pm
Contact:

Post by Eke » Mon Oct 17, 2011 10:14 am

Oh yes, indeed, I forgot about that one, thanks. I also noticed I had scd_110.bin in my folders.

I have a semi off-topic question about BIOS disassembly: are the interrupt callbacks routines copied by the SUB-CPU BIOS during its initialization or is the MAIN CPU BOOT ROM decompressing them later ? I can't figure when there are being copied, yet the SUB_CPU BIOS is expecting CDD interrupt to trigger some flags on startup...

ElBarto
Very interested
Posts: 160
Joined: Wed Dec 13, 2006 10:29 am
Contact:

Post by ElBarto » Mon Oct 17, 2011 12:10 pm

You'll probably find the answer in here : http://www.megadrive.org/~elbarto/md/Me ... -15398.asm
It isn't the last version of my disasm but it might helps you.

Eke
Very interested
Posts: 864
Joined: Wed Feb 28, 2007 2:57 pm
Contact:

Post by Eke » Mon Oct 17, 2011 12:52 pm

Thanks, I did not have analyzed the Main CPU BOOT ROM yet but this might become handy.

Actually, the scd_110.bin file I had is actually the same BIOS as scd_100 from Eidolon, but with interrupt handlers properly copied this time.

There is also PROGRAM.OUT from Bart Trzynadlowski which is actually SUB-CPU BIOS v2.00 (for SegaCD II) and also have interrupt handler code (except GFX an Timer interrupts).

KanedaFr
Administrateur
Posts: 1132
Joined: Tue Aug 29, 2006 10:56 am
Contact:

Post by KanedaFr » Mon Oct 17, 2011 1:43 pm

You'll find how to get the raw data from this thread.
I was able to extract main/sub/z80 driver/z80 data & pcm data myself, using tsdc I think.

I also made a special version of M.IDA for CD (memory model, cdc mode ...) but never found the time to finish it....

Nemesis
Very interested
Posts: 773
Joined: Wed Nov 07, 2007 1:09 am
Location: Sydney, Australia

Post by Nemesis » Tue Oct 18, 2011 8:08 am

I can give you an easy way to find and decompress the sub-cpu bios files from any MegaCD bios file, without knowing where the compressed data is. There are two "standard" compression formats used by Sega for the Mega Drive, which were no doubt provided as libraries for developers to use in their own code. They were both cracked and compressors/decompressors written for them as part of the efforts in the Sonic hacking scene, since both these compression schemes were heavily used in the Sonic games. The two formats are generally known as follows:
1. Kozinski compression. An LZ77 based algorithm, used for many types of data.
2. Nemesis compression. A shannon-fano based algorithm, specifically intended for achieving high compression of VDP pattern data.
You'll find these two compression methods, especially Nemesis compression, used in hundreds of games for the Mega Drive, as well as the official bios files for the MegaCD, and the Genesis TMSS bios. Kozinski compression is used to compress the sub-cpu bios, as well as the sub-cpu boot program.

Back in the day when I was heavily involved in the Sonic hacking community, I wrote some nifty algorithms to scan through any given file, and locate all potential archives within those files that were compressed using either Kozinski or Nemesis compression. The tools work quite well. They will locate all valid archives with 100% accuracy, however, the Kozinski search tool may locate "bogus" archives with very small sizes (eg, 10 bytes), which happen to appear as real archives out of random data.

You can download the tools from here:
http://info.sonicretro.org/Nemesis_MD_Programs
Within the archive, you'll find kozsrch.exe, which you can use to locate and decompress the sub-cpu bios from the main MegaCD bios rom. Run that on the bios, and it'll automatically locate and decompress all the archives into a subdirectory.

KanedaFr
Administrateur
Posts: 1132
Joined: Tue Aug 29, 2006 10:56 am
Contact:

Post by KanedaFr » Tue Oct 18, 2011 8:44 am

yep, I use a GUI which incluse several tools for (un)compress to these formats (and yes, there is your name is the credits).
It's how I extracted the data...

Post Reply