Post subject: Proposed Rule: SMS runs should use a system BIOS
Alyosha
He/Him
Editor, Expert player (3532)
Joined: 11/30/2014
Posts: 2729
Location: US
To my knowledge, all Sega Master System consoles contained a BIOS. The most common for USA/EU would be 1.3. Currently we allow publications of runs that don't use the BIOS (it isn't required for the system to work, but does exist on all consoles.) I think it should be a rule that all SMS runs should use the start up BIOS. This issue seems to have perpetuated since the early days of SMS/GG emulation since the BIOS isn't needed for games to work, and most GG consoles (which had almost identical components) did not contain any BIOS either. But since I'm not aware of any commercial non-BIOS SMS's, I think it's time to enforce a rule about it.
Fortranm
He/Him
Editor, Experienced player (780)
Joined: 10/19/2013
Posts: 1116
Doesn't this rule give Game Gear an edge over SMS when a game is available on both platforms?
Alyosha
He/Him
Editor, Expert player (3532)
Joined: 11/30/2014
Posts: 2729
Location: US
Fortranm wrote:
Doesn't this rule give Game Gear an edge over SMS when a game is available on both platforms?
I guess you could just discount the BIOS time, it's pretty easy to keep track of. Also there are multiple BIOSes, and I'm not sure if there is any preference or reason to choose a particular one.
Spikestuff
They/Them
Editor, Publisher, Expert player (2299)
Joined: 10/12/2011
Posts: 6337
Location: The land down under.
Just like GB/C should. (I'm just saying)
WebNations/Sabih wrote:
+fsvgm777 never censoring anything.
Disables Comments and Ratings for the YouTube account. Something better for yourself and also others.
Alyosha
He/Him
Editor, Expert player (3532)
Joined: 11/30/2014
Posts: 2729
Location: US
Spikestuff wrote:
Just like GB/C should. (I'm just saying)
I never noticed that it is not included on runs before 0_0 This does seem like something that should be stricter. There is a rule that says roughly 'use a real BIOS and not a hacked one', and BIOS skipping is basically a hacked BIOS of zero length / time that instantly advances to game execution, maybe it just needs to be enforced.
Noxxa
They/Them
Moderator, Expert player (4139)
Joined: 8/14/2009
Posts: 4083
Location: The Netherlands
Do current TAS emulators for GB/GBC even allow starting runs from BIOS? If not, that obviously would need to happen first before we can do anything. Even if it is, it will be hard to strictly enforce turning on BIOS for Game Boy runs, at least in any short term manner. It's like deprecating an emulator, and such processes typically take a long time (easily several months or years) for all TASers to transition through.
http://www.youtube.com/Noxxa <dwangoAC> This is a TAS (...). Not suitable for all audiences. May cause undesirable side-effects. May contain emulator abuse. Emulator may be abusive. This product contains glitches known to the state of California to cause egg defects. <Masterjun> I'm just a guy arranging bits in a sequence which could potentially amuse other people looking at these bits <adelikat> In Oregon Trail, I sacrificed my own family to save time. In Star trek, I killed helpless comrades in escape pods to save time. Here, I kill my allies to save time. I think I need help.
Warepire
He/Him
Editor
Joined: 3/2/2010
Posts: 2174
Location: A little to the left of nowhere (Sweden)
Adding GB(C) BIOS support should be easy, I've done it with an emulator I wrote. I can hold the hand of anyone that wants to add the support to BizHawk. (I don't have the time to configure the environment etc)
Alyosha
He/Him
Editor, Expert player (3532)
Joined: 11/30/2014
Posts: 2729
Location: US
Mothrayas wrote:
Do current TAS emulators for GB/GBC even allow starting runs from BIOS? If not, that obviously would need to happen first before we can do anything. Even if it is, it will be hard to strictly enforce turning on BIOS for Game Boy runs, at least in any short term manner. It's like deprecating an emulator, and such processes typically take a long time (easily several months or years) for all TASers to transition through.
Looks like it's not yet an option in BizHawk. SMS does have that option though (and is the intent of this thread) What about for that system? No time like the present!
Warepire wrote:
Adding GB(C) BIOS support should be easy, I've done it with an emulator I wrote. I can hold the hand of anyone that wants to add the support to BizHawk. (I don't have the time to configure the environment etc)
I'll probably look into doing this in the near future. It looks pretty easy (just have the BIOS loaded and start from $00 instead of $100.) If I need help I'll be sure to ask. For SMS, BizHawk is only a couple lines of code away from insisting on a BIOS instead of just giving the option, so that isn't tough.
Warepire
He/Him
Editor
Joined: 3/2/2010
Posts: 2174
Location: A little to the left of nowhere (Sweden)
Alyosha wrote:
Warepire wrote:
Adding GB(C) BIOS support should be easy, I've done it with an emulator I wrote. I can hold the hand of anyone that wants to add the support to BizHawk. (I don't have the time to configure the environment etc)
I'll probably look into doing this in the near future. It looks pretty easy (just have the BIOS loaded and start from $00 instead of $100.) If I need help I'll be sure to ask.
Yeah, that's pretty much it. Take note of the undocumented 50th CPU register (at least on Monochrome GB, GBC should be similar). It's a sort of "BIOS done" flag. EDIT: Need to remember numbers properly.
Noxxa
They/Them
Moderator, Expert player (4139)
Joined: 8/14/2009
Posts: 4083
Location: The Netherlands
Alyosha wrote:
SMS does have that option though (and is the intent of this thread) What about for that system? No time like the present! <snip> For SMS, BizHawk is only a couple lines of code away from insisting on a BIOS instead of just giving the option, so that isn't tough.
I don't want to immediately enforce a hard ban site-wise (since that might mess up some people/projects), but I do think it's a good idea to promote using the SMS BIOS for any new SMS TAS projects (such as any started from this thread), and enforcing using it in new BizHawk versions (at least for movie recording). Then the problem should sort itself out over time.
http://www.youtube.com/Noxxa <dwangoAC> This is a TAS (...). Not suitable for all audiences. May cause undesirable side-effects. May contain emulator abuse. Emulator may be abusive. This product contains glitches known to the state of California to cause egg defects. <Masterjun> I'm just a guy arranging bits in a sequence which could potentially amuse other people looking at these bits <adelikat> In Oregon Trail, I sacrificed my own family to save time. In Star trek, I killed helpless comrades in escape pods to save time. Here, I kill my allies to save time. I think I need help.
Editor, Player (68)
Joined: 1/18/2008
Posts: 663
The issue of version will need to be decided. Because bootup times between versions vary, games using the R register in randomness calculations can result in very different outputs. Other than what could be copied into RAM with different BIOS versions, I'm not aware of any other impact BIOS will have. But these two are already very important. v1.3 is the most "common" and the first / original retail version. These are arbitrary points for using it as a base. But what if the TAS is for a built-in game in a later BIOS? Should there be exceptions for this case? I would hope it isn't a "fastest BIOS" search... but who knows, maybe some game has an exploit that is more useful with a certain BIOS version? I've done some testing on console with Alex Kidd in Miracle World on a v1.3 USA unit and found, if I remember, about 16 possible variations of randomness in powerups. None of these variations matched the emulator. I would need to test again to see if I delayed the emulator to match the frame count of the console...I don't have any notes about that written down.
true on twitch - lsnes windows builds 20230425 - the date this site is buried
MarbleousDave
He/Him
Player (12)
Joined: 9/12/2009
Posts: 1555
The Game Gear and Model 2 Genesis/Mega Drive have a BIOS file in the form of a Trade Mark Security System. The latest Master System BIOS includes Sonic the Hedgehog built in. The Japanese equivalent the Sega Mk III also has a BIOS built in.
Alyosha
He/Him
Editor, Expert player (3532)
Joined: 11/30/2014
Posts: 2729
Location: US
True wrote:
The issue of version will need to be decided. Because bootup times between versions vary, games using the R register in randomness calculations can result in very different outputs. Other than what could be copied into RAM with different BIOS versions, I'm not aware of any other impact BIOS will have. But these two are already very important. v1.3 is the most "common" and the first / original retail version. These are arbitrary points for using it as a base. But what if the TAS is for a built-in game in a later BIOS? Should there be exceptions for this case? I would hope it isn't a "fastest BIOS" search... but who knows, maybe some game has an exploit that is more useful with a certain BIOS version? I've done some testing on console with Alex Kidd in Miracle World on a v1.3 USA unit and found, if I remember, about 16 possible variations of randomness in powerups. None of these variations matched the emulator. I would need to test again to see if I delayed the emulator to match the frame count of the console...I don't have any notes about that written down.
For version I don't think emulation accuracy is at the point where we can reliably tell the difference, and loading times by themselves can always be discounted. As for built in games, Vecna had the foresight to make it so that you can load BIOSes as you would ordinary ROMs as well, so any of the built in games should be accessible already.
PikachuMan wrote:
The Game Gear and Model 2 Genesis/Mega Drive have a BIOS file in the form of a Trade Mark Security System.
Not all GGs had the TMSS, so for that one at least I think we can spare people the tedium of having to wait through that screen.
Editor
Joined: 3/10/2010
Posts: 899
Location: Sweden
I could've sworn that we had a rule that the timing starts when the game code begins running. Can't seem to find such a thing. This point haven't been explored enough.
Alyosha
He/Him
Editor, Expert player (3532)
Joined: 11/30/2014
Posts: 2729
Location: US
Well I tried putting a boot rom loader in gambatte, I got it loading but I got a buggy result. I'm not really sure what its doing to get the title messed up like that, but doing the obvious thing of swapping out the first 256 bytes of the rom with the bios obviously is not sufficient. Oh well, I don't think I'll put any more effort into it, maybe once gambatte is replaced someday we'll have native suppport for it.
Warepire
He/Him
Editor
Joined: 3/2/2010
Posts: 2174
Location: A little to the left of nowhere (Sweden)
What I did was having the DMG bootstrapper in an array, and then choosing based on register 50 which array to read when accessing the ROM region of the memory map. Basically, that should have worked. EDIT: If you can share your code, I could maybe have a look?
Alyosha
He/Him
Editor, Expert player (3532)
Joined: 11/30/2014
Posts: 2729
Location: US
Warepire wrote:
What I did was having the DMG bootstrapper in an array, and then choosing based on register 50 which array to read when accessing the ROM region of the memory map. Basically, that should have worked. EDIT: If you can share your code, I could maybe have a look?
Yeah, that's exactly what I did. I created a copy of the default rom mapping and put the BIOS in the first 256 bytes. It loads and runs as intended, but the screen gets corrupted for some unknown reason. Maybe there is some configuration in gambatte on start up that i'm not aware of that is throwing things off. I'm not familioar enough with gameboy architecture though to guess what it might be. Also, it's pretty obvious from gambatte's code that they never really intended to use the boot rom, it was quite a mess getting it in there.
Editor, Emulator Coder, Site Developer
Joined: 5/11/2011
Posts: 1108
Location: Murka
Alyosha wrote:
Also, it's pretty obvious from gambatte's code that they never really intended to use the boot rom, it was quite a mess getting it in there.
The boot rom had never been dumped when gambatte was built
Alyosha
He/Him
Editor, Expert player (3532)
Joined: 11/30/2014
Posts: 2729
Location: US
Ok I fixed it, turns out gambatte was turning on the screen in the initial conditions, so writes to VRAM were getting blocked. Now just a little more cleanup and I should be able to add this as a capability to BizHawk.
Editor, Player (68)
Joined: 1/18/2008
Posts: 663
I wrote my replies and then they were lost...let's try again...
Alyosha wrote:
For version I don't think emulation accuracy is at the point where we can reliably tell the difference, and loading times by themselves can always be discounted.
On the contrary. On Z80 the R register is 0 at reset. So on emulators now without BIOS, they start at 0. However with BIOS, this register will increment. So regardless of cycle accuracy, this register won't match based on BIOS or not. It has nothing to do with emulation accuracy. And many games use this register as part of randomness routine.
Alyosha wrote:
As for built in games, Vecna had the foresight to make it so that you can load BIOSes as you would ordinary ROMs as well, so any of the built in games should be accessible already.
Except this isn't how one would usually play these games...they'd use the original machine, not a copy of the BIOS of that machine on a different machine...
true on twitch - lsnes windows builds 20230425 - the date this site is buried
Warepire
He/Him
Editor
Joined: 3/2/2010
Posts: 2174
Location: A little to the left of nowhere (Sweden)
Alyosha wrote:
--image-- Ok I fixed it, turns out gambatte was turning on the screen in the initial conditions, so writes to VRAM were getting blocked. Now just a little more cleanup and I should be able to add this as a capability to BizHawk.
Woohoo! Well done.
Joined: 10/28/2013
Posts: 130
Location: United States
What about the Model 1 Genesis/Mega Drive? Did that have any kind of a BIOS for SMS games?
Alyosha
He/Him
Editor, Expert player (3532)
Joined: 11/30/2014
Posts: 2729
Location: US
True wrote:
On the contrary. On Z80 the R register is 0 at reset. So on emulators now without BIOS, they start at 0. However with BIOS, this register will increment. So regardless of cycle accuracy, this register won't match based on BIOS or not. It has nothing to do with emulation accuracy. And many games use this register as part of randomness routine. Except this isn't how one would usually play these games...they'd use the original machine, not a copy of the BIOS of that machine on a different machine...
Ah ok I see what you mean now. As for built in games, I worded that poorly, it does indeed just use the BIOS file, not a file on top of another file.
goldenband wrote:
What about the Model 1 Genesis/Mega Drive? Did that have any kind of a BIOS for SMS games?
Good question, I have no idea. Ok I just made the PR to bring Boot Rom loading into BizHawk and Gambatte, it works for both GB and GBC. Right now it is strictly optional, but my hope is that it will start to be used for TASes and hopefully required eventually. EDIT: done!
MESHUGGAH
Other
Skilled player (1889)
Joined: 11/14/2009
Posts: 1349
Location: 𝔐𝔞𝔤𝑦𝔞𝔯
Just a few informations from http://segaretro.org/BIOS and another sms website: - SMS has various BIOSes, all other Sega 8-bit home systems (SG-1000, SC-3000, Mark III) has no BIOS. - Early Game Gear systems has no BIOS, "newer" Majesco Game Gears has a BIOS (that blue screen right at the start of the video https://www.youtube.com/watch?v=PDuIYTeYOBo) Note: some other websites claim that this is the same BIOS used on later game gear consoles and incorrectly labelled as "Majesco". quote from true (few posts above): "The issue of version will need to be decided. Because bootup times between versions vary, games using the R register in randomness calculations can result in very different outputs." - I think bootup time difference (caused by using a different BIOS strictly for this) shouldn't be enough reason to beat/obsolete a movie - Impact of BIOS on a game. My voice would be that if a BIOS has zero impact on the game, it should be skipped. The Genesis one is a true example. According to the first link, "Once the game is loaded, the TMSS ROM is mapped out of the system address space, making it inaccessible to the game program." edit: more detailed informations for true's Alex Kidd post, google search for Development AlexKiddInMiracleWorld-SMS (no linking to copyrighted stuffs)
PhD in TASing 🎓 speedrun enthusiast ❤🚷🔥 white hat hacker ▓ black box tester ░ censorships and rules...
Editor, Skilled player (1172)
Joined: 9/27/2008
Posts: 1085
I just remembered Final Fantasy Legend. That game has an unusual RNG in which its effects can be seen in real-time almost trivially, and real-time runs essentially plan things based on a particularly static RNG. It's very consistent on console, put it in a GB and you get different results from putting it in a GBC due to some start-up timing differences. If you use the D-pad to change colors during start-up in GBC, delaying the BIOS will give yet more possible starting RNG outcomes, though of course the player will have a hard time predicting the results. I'm not sure what sort of RNG we'd get without BIOS emulation, but there's almost no chance Final Fantasy Legend will have the right RNG like on console without it. Progress is already going forward here, so I'm just handing over a data point to think about. Still, it seemed relevant to me.