Multi region disc

Yo, I got a bit deeper into segacd dev and i have a little question:

If i make a disc (region of the segacd) with a program that do:

-Copy *itself* into a unused part of ram (both cpu's)

-Jump on those parts

-Stop Disc, open tray

-(the user insert another disc and press start)

-Re-load TOC

-Load MainCPU bootcode @ correct place

-Load SubCPU bootcode @ correct place

-Set vdp and ram settings exactly like when boot sequence end

-Jump simultaneously on both boot code

I suspect it would work...

But i'm pretty sure there is an issue (or else, making a universal boot disc is a piece of cake).

Thank you for your answer

Bye

Fonzie
 
Hey my documentation ( http://www.retrodev.com/segacd.html ) on the boot process isn't that bad.

MainCPU is really easy. All you need to do is load the data indicated by offset 0x30 (location) and 0x34 (length, ignored by BIOS because of bug) to 0xFF0000 on the Genesis side and then jump to 0xFF0000. Unfortunately, the Sega logo code seems to be incompatible between Japan and everything else so you'll have to either hack this or just skip over it and try to insert an equivalent delay.

SubCPU is more complicated. 0x40 and 0x44 tell you what to load off the disc (to 0x6000 I believe), but there's more you have to do. There's a datastructure with multiple entry points that gets passed to a SubCPU BIOS call and then there's a link field which allows more of these structures to be loaded.

You don't jump to both pieces of code simultaneousy. The BIOS jumps to the Sega logo code first on the main processor and then goes about loading the SubCPU code off the disc.

VDP settings shouldn't be a big deal though.
 
Oki, i'll make an USA loader that reloads USA disc (an iso i made, so there will be only one entry point)... Maybe during the week...

Thx MOD, maybe i'll have to catch you about some values =P

But i don't think i'll enter the "sega logo" process twice anyway, i'll directly jump on the loaded code... Or there is an isssue?
 
You might end up with timing issues if you just jump on the code. The simplest solution would probably just have a VBlank counter that waits for a certain number of frames.
 
"waits for a certain number of frames."

I understood, the segacd part runs before md part =P i'll take this in count if it becomes an issue....

Well, the boot disc code is finished and ready to work (100% completed)

Just have a little issue cause (even if i reload the disc TOC), the cdread operations (to reload boot codes) are not allowed... In fact, seems i miss one function to "reactivate" the drive after open tray operation...

Damned, i'm so close of a result GRRRR....

I'll ask Steve about asap.

See you and thx.
 
Ok,

In fact i'm searching for the bios function that close the CDTRAY (used in the segacd model1 player screen)...

The bios function DRVINIT (that i curently use) is supposed to close the tray and read toc but it's not the case.

Does anybody knows the bios function that close the tray?

Thank you.

Bye

Fonzie
 
Back
Top