Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BIOS boot animation not playing when no disk is inserted #587

Closed
LargeChips99 opened this issue Apr 9, 2022 · 4 comments · Fixed by #1427
Closed

BIOS boot animation not playing when no disk is inserted #587

LargeChips99 opened this issue Apr 9, 2022 · 4 comments · Fixed by #1427
Labels
bug Something isn't working

Comments

@LargeChips99
Copy link

Is your feature request related to a problem? Please describe.
On the real hardware when opening the disk tray or closing the disk tray it would do different behaviour depending on if you where in the bios or in a game.

Describe the solution you'd like:
The solution is instead of having just eject disk, you could add Open Tray then eject disk, Close Tray and Vice Versa, if the user wants it to be simplified they can disable it within settings.

Describe alternatives you've considered:
I have tried other emulators over the years, such as the libetro forks and DEmul but both of them have their own problems including, retroarch no longer supporting the tray functionality anymore, and DEmul no longer being updated and being closed source are major issues for me personally.

Additional Context:
This enhancement may fix issue: #189

@LargeChips99 LargeChips99 added the enhancement New feature or request label Apr 9, 2022
@flyinghead
Copy link
Owner

When pausing the game (Menu button) you can eject the disk:
image

After resuming and pausing again you have the possibility to insert the same or a different disk.

@LargeChips99
Copy link
Author

Thank You For Responding Quickly.

Even if you eject the disk at the bios menu, the bios still believes that the tray is open causing the bouncing dreamcast logo to not play.

when the tray is closed on the real hardware even with no disc inserted, it still does the bouncing logo before sending you to the bios main menu.

e.g.: https://www.youtube.com/watch?v=5lsrKZxiYVg at 0:35

@flyinghead flyinghead removed the enhancement New feature or request label Apr 13, 2022
@flyinghead flyinghead changed the title Add abillity to open and close the disk tray BIOS boot animation not playing when no disk is inserted Sep 26, 2022
@flyinghead flyinghead added the bug Something isn't working label Sep 26, 2022
@kihato
Copy link

kihato commented Feb 7, 2024

Github hash: e592650

I tested it as follows and it seems to work fine.
You can press the F10 key at any time while the animation is displayed.
However, since it is simple, it only works immediately after starting flycast.

commom.h

...
void PowerOnNoDisk();
...

common.cpp

...
void PowerOnNoDisk()
{
	NullDriveDiscType = NoDisk;
	gd_setdisc();
}
...

static bool doDiscSwap(const std::string& path)
{
	if (path.empty())
	{
		TermDrive();
		//NullDriveDiscType = NoDisk;
		return true;
	}
...

winmain.cpp

...
#include "imgread/common.h"
...
void UpdateInputState()
{
	FC_PROFILE_SCOPE;

	input_sdl_handle();
	if (GetAsyncKeyState(VK_F10))
		PowerOnNoDisk();
}

flyinghead added a commit that referenced this issue Feb 7, 2024
@flyinghead
Copy link
Owner

Should be fixed in the latest dev build.

Thank you for the prototype code!
I used a slightly different method by reusing the swapping disk code. At boot, if no disk is inserted, the gdrom drive is set to the busy state and the sense keys 4, 1, 2 (Drive is busy) are returned. The BIOS makes a single access to the gdrom, gets notified that the drive is busy, and then proceeds to display the boot animation.
a few seconds later, the BIOS accesses the gdrom again, gets notified that the drive is empty and display its menu. Interestingly, if your insert a disk during the boot animation, the disk is started as usual.

@flyinghead flyinghead linked a pull request Feb 27, 2024 that will close this issue
flyinghead added a commit that referenced this issue Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants