MiSTer-devel / Gameboy_MiSTer

Gameboy for MiSTer
103 stars 48 forks source link

Feature Request: Super Game Boy + Game Boy Color hybrid mode #161

Closed SerjTargarien closed 1 year ago

SerjTargarien commented 3 years ago

Even if it wasn't possible in real hardware, some software emulators like BGB and Goomba Color implement a mode that can load the Super Game Boy border feature in Game Boy Color games.

Its use case was for now was to load both the border and the full color set in Game Boy compatible black cartridges, but a romhack was updated this week to use this border functionality dynamically, as seen in this changelog: https://github.com/ShockSlayer/ccdocs/blob/master/docs/changelogs/2_4_0_Changelog.md

It would be amazing if this could be implemented into the Game Boy MiSTer core.

paulb-nl commented 3 years ago

I have added Super Game Boy + GBC to the core. It works well with Gameboy games in GBC mode or a GBC game like Azure Dreams which sends the border even in GBC mode.

The Crystal clear hack doesn't implement SGB transfers correctly so it doesn't work. It should wait 5 frames after the frame in which the SGB command is sent but it waits slightly less than a frame in total. Also when it updates the border in game it doesn't disable sprites so the transfer is corrupted by the sprites.

I have made an ips patch to make it wait longer but in game border updates are still broken. Apply it on the SGB enabled Crystal clear rom. crystal-clear-2.4.0_sgb_wait.ips.zip

Here is the core if you want to try it: Gameboy_sgb_gbc.rbf.zip

SerjTargarien commented 3 years ago

Testing it right now with the patched rom. Everything is updating properly for me for now. Will keep testing for a while and report back with my findings.

EDIT: Yes, the graphics corrupt after entering and exiting the Pokedex or getting a new badge. Otherwise they work properly during normal gameplay.

I tested some other games and it's a good addition to the main core, will it eventually make it there?

SerjTargarien commented 3 years ago

After some more testing today I found out the GBC + SGB settings corrupts the graphics in Game and Watch Gallery 2 and Game and Watch Gallery 3, deeming them unplayable. I'll test a few more games to see if that's the case in more instances.

I may just document my findings and report here with a Pastebin document if it's useful.

https://pastebin.com/RA6nBm8D

I'm using the nightly build that was dropped today.

paulb-nl commented 3 years ago

This feature will be in the next release.

I think it is unavoidable that some games will have issues when they detect SGB in GBC mode.

SerjTargarien commented 3 years ago

Thanks, Paul. I'll still be documenting my findings in case they can be useful for finding a pattern for working or non-working games in the future.

deshayzilla commented 2 years ago

I'm trying to get this to work with the latest version of Crystal Clear and it doesn't seem to be working correctly.

SegaSnatcher commented 2 years ago

A Link's Awakening DX does not show the border in GBC mode when enabling GBC+Super Gameboy feature. There is a work around though. You start the game in normal GB mode and then run the game again in GBC mode as the border is kept.

paulb-nl commented 1 year ago

This has been added with bc82226ff4840ed86467bc4a5bba5a0cfdd68826

I saw that the changelog of Crystal clear says that they are now disabling sprites when changing the border so the last version should be working correctly.