Rewriting the BIOS

Ask anything your want about Mega/SegaCD programming.

Moderator: Mask of Destiny

Post Reply
FireRat
Newbie
Posts: 9
Joined: Wed Jan 03, 2018 11:47 pm

Rewriting the BIOS

Post by FireRat » Fri Jun 14, 2019 6:33 pm

Hello.
I have plans for rewriting the MCD BIOS in the future. The idea is to keep it clean from any copyright infringement. To achieve this goal, and thanks to DarkMorford's disassembly which I haven't yet read, I could ask a friend to document it, so I can rewrite it from the ground up. "Clean room" practice. Whenever I get to it, I'd open a public github repository with the source code, under whatever license that allows anyone do whatever they want to it (I'm really not an expert in laws and these things, though). Hopefully the final ROM would be region-free and boot the game almost right away, with a small window to open the BRAM manager and ask to insert a disc if necessary.
The good thing is, that all SubCPU entry points (which consist in jumps to the actual routines) and IDs are already documented, and I trust that every MCD blindly follow them. The bad thing is, that SubCPU side is compressed in Kosinski, and said file is at different locations depending of the region/version.

Considering Pier Solar got away with detecting BIOS version to pick the proper address to decompress from, how "legal" would it be to compress it in Kosinski to a known address, and handle it with vladikcomper's alternative decompressor?. That is, for the sake of supporting current Mode1 software.
Or, I can go my own way, and compress it through Sik's SLZ, or just leave it uncompressed. Either case would end up in another, different address, but I can leave a common entry point so newer Mode1 software (if any) can init the MCD easier including the SubProgram, or just for sending the SubCPU side of BIOS to PRAM (minimalistic). Actual Mode 2 would see no difference.

User avatar
Sik
Very interested
Posts: 855
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Re: Rewriting the BIOS

Post by Sik » Sat Jun 15, 2019 2:07 am

Decompressing the existing BIOS in the firmware should be OK since it's the one the user already provided legally. Albeit this is what lawyers are for :​v (chances of Sega caring are probably zero anyway). Incidentally, it seems the BIOS is always located at a 32KB boundary, except in the case of the LaserActive, so that could help making it look cleaner? (Flux and Wonder Library straight up hardcode the address, so it's not like there was a cleaner official approach lol)

Making a new free BIOS would be probably nicer long term (and remove forced region lockout in the process), but you'll need to deal with this first:
https://gendev.spritesmind.net/forum/vi ... f=5&t=3045

(totally not a shameless plug asking for help :​P)
Sik is pronounced as "seek", not as "sick".

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest