Page 1 of 1

Rewriting the BIOS

Posted: Fri Jun 14, 2019 6:33 pm
by FireRat
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.

Re: Rewriting the BIOS

Posted: Sat Jun 15, 2019 2:07 am
by Sik
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: ... f=5&t=3045

(totally not a shameless plug asking for help :​P)