Detecting the bios

Ask anything your want about Megadrive/Genesis programming.

Moderator: BigEvilCorporation

Pascal
Very interested
Posts: 200
Joined: Wed Nov 29, 2006 11:29 am
Location: Belgium
Contact:

Detecting the bios

Post by Pascal » Tue Jan 16, 2007 2:53 pm

hello all ;)

I was thinking a bit about the md homebrewn legality, knowing that the megadrive is back on track commercialy with all those virtual consoles and megadrive compilation game.

What's worrying me is the message "produced or licensed by sega" which is displayed by the md2 bios... Maybe you don't know, but on the dreamcast scene, it was used to display a screen which deny that previous sentence. Is there a way to detect that the rom was launched by the bios and so display a denying sentence ?

Maybe by checking the version register, but i don't know if version 1 is really a md2 with bios or just the revision of md1 with the protection scheme, and it seems a bit inaccurate.

thanks in advance ^^

ob1
Very interested
Posts: 463
Joined: Wed Dec 06, 2006 9:01 am
Location: Aix-en-Provence, France

Post by ob1 » Tue Jan 16, 2007 3:50 pm

I think it doesn't help, but the licence thing is only on Genesis 2, isn't it ?

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: Detecting the bios

Post by Stef » Tue Jan 16, 2007 4:23 pm

Pascal wrote:hello all ;)

I was thinking a bit about the md homebrewn legality, knowing that the megadrive is back on track commercialy with all those virtual consoles and megadrive compilation game.

What's worrying me is the message "produced or licensed by sega" which is displayed by the md2 bios... Maybe you don't know, but on the dreamcast scene, it was used to display a screen which deny that previous sentence. Is there a way to detect that the rom was launched by the bios and so display a denying sentence ?

Maybe by checking the version register, but i don't know if version 1 is really a md2 with bios or just the revision of md1 with the protection scheme, and it seems a bit inaccurate.

thanks in advance ^^
A "safe" solution could be to always display the message :p
I'm not sure about the version register...

ob1
Very interested
Posts: 463
Joined: Wed Dec 06, 2006 9:01 am
Location: Aix-en-Provence, France

Re: Detecting the bios

Post by ob1 » Tue Jan 16, 2007 4:29 pm

Stef wrote:A "safe" solution
and simple !!!
Last edited by ob1 on Tue Jan 16, 2007 8:08 pm, edited 1 time in total.

Pascal
Very interested
Posts: 200
Joined: Wed Nov 29, 2006 11:29 am
Location: Belgium
Contact:

Post by Pascal » Tue Jan 16, 2007 7:02 pm

but where's the fun ??? ;-)

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Tue Jan 16, 2007 7:15 pm

:D

ob1
Very interested
Posts: 463
Joined: Wed Dec 06, 2006 9:01 am
Location: Aix-en-Provence, France

Post by ob1 » Tue Jan 16, 2007 8:08 pm

Bien vu. No play, no gain.

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Wed Jan 17, 2007 6:32 am

Try my TMSS patcher on your ROM, I have noticed, that patched ROMs will run, but the "produced by ..." message does not appear.
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

Pascal
Very interested
Posts: 200
Joined: Wed Nov 29, 2006 11:29 am
Location: Belgium
Contact:

Post by Pascal » Wed Jan 17, 2007 7:59 am

thanks i gonna try it. i noticed you just inserted

move.l #$53454741,($A14000).l at 0x1e0

i was doing the write of the 'sega' chars also, how is it gonna disable the bios ?

EDIT oki, you always write it, are you sure it won't crash on early MD ? coz that reg adress is maybe write only

ob1
Very interested
Posts: 463
Joined: Wed Dec 06, 2006 9:01 am
Location: Aix-en-Provence, France

Post by ob1 » Wed Jan 17, 2007 8:05 am

This address is read only, only on the first model of Genesis. It was a prototype and was not released. Thus, we can consider that $A14000 will always be writable.

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Wed Jan 17, 2007 8:30 am

Pascal wrote:EDIT oki, you always write it, are you sure it won't crash on early MD ? coz that reg adress is maybe write only
Yes it will crash the early MDs but that utility is for running old games on new MDs (Alex Kidd for example). I didn't make it check if newer system is used as I thought that the code gets too big and won't fit in the header.

If you reset the system, "produced by..." does not appear, maybe the BIOS thinks that everything is already set up and reset happened and nothing needs to be displayed ?
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Wed Jan 17, 2007 8:35 am

ob1 wrote:This address is read only, only on the first model of Genesis. It was a prototype and was not released. Thus, we can consider that $A14000 will always be writable.
I'm not so sure about it, I'll ask Deven Gallo, he owns $h1Tload of MDs.
My pirate MD1 (which fried quite some time ago) would have probably crashed as that thing didn't have any BIOS and it's components had identical pinouts with the ones used in early real MDs It was VERY well done copy which acted EXACTLY like my real MD2 now.
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

Pascal
Very interested
Posts: 200
Joined: Wed Nov 29, 2006 11:29 am
Location: Belgium
Contact:

Post by Pascal » Wed Jan 17, 2007 8:54 am

thanks !! :p i gonna dissasemble the bios, i'm sure it leaves trace in the ram

ob1
Very interested
Posts: 463
Joined: Wed Dec 06, 2006 9:01 am
Location: Aix-en-Provence, France

Post by ob1 » Wed Jan 17, 2007 8:56 am

In his Sega Genesis hardware notes (http://cgfm2.emuviews.com/txt/gen-hw.txt), Charles MacDonald states
- Games must write the text 'SEGA' to A14000h if the lower four
bits of the version register return 01h.
- Writing 01h to A14101h disables the OS ROM and swaps in the cart ROM.
- The OS ROM checks for 'SEGA' or ' SEGA' at offset 100h in the cart ROM.

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Wed Jan 17, 2007 9:22 am

More correct would be : Must write "SEGA" if the version reg returns <> 0

MDs without BIOS exist, why else I wrote the TMSS patcher
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

Post Reply