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
[Request] Support for SGB features. #223
Comments
Full SGB support is out of the question (that would involve writing a SNES emulator), but I'll see how much I can do without having to emulate the whole SNES. |
Aside from borders and colorization usually supported by other GB emus the main thing it uses from SNES is audio, so maybe just use the audio chip core from Higan or something (maybe even optionaly). Then everything would work except for Space Invaders invading. |
Borders/colors were also supported on Gameboy Advance hardware, FYI. |
Um, no they aren't. |
...? My GBA SP plays the Gameboy cartridges I own in color. |
I would at least like color support, the GBA didn't support borders but some games definitely pull SGB colors like Kirby's Dream Land 2. |
That was a GBC colour palette that are applied to certain games. The GBA/GBC never supported SGB colouration. |
SGB colors are kinda weird because of how they can apply to regions of the screen, such as this: In this screenshot, Squirtle is in the background, but so is the all of the text. SGB lets you change (IIRC) rectangular regions. Whereas a GBC can't do that unless it's using GBC-specific features. On GB games, it's just a whole-frame palette. |
There are four different palettes in SGB which can be chosen from per 8x8 tile. I found this document that explains them: You can also see eg. VBAGX source for reference: Games that have specific SGB support coded in can make use of these features. The Pokemon Blue supports monochrome GB and SGB. It seems common that games that support SGB only still specify custom colors for GB palettes rather than taking advantage of the more advanced SGB palette features, like Pokemon Blue does. I've never seen a real SGB, but based on Youtube vids, the SGB also packed built-in preprogrammed custom color GB palettes for older games like Super Mario Land. It would be an interesting undertaking trying to copy them all. |
Fair warning, a true SGB can upload and run SNES binaries on the actual SNES. The route to perfect SGB emulation is wrought with pedantics on how much to implement for SGB support short of bundling with a SNES emulator (see higan SGB support). |
@shinyquagsire23 GameBoy Color boot ROM has special purple coloring provided for Kirby 2, albeit not what the SGB has. You can also force it to use one you specify on logo start with special combos. |
I think "SGB support" translates to supporting the additional SGB palettes for games that can use them, and user-configurable palettes for GB games. |
I think simulating the colourization and borders is enough. Only a handful of games ever used the other features and only Space Invaders ever ran SNES code. |
SGB also can play sound effects on the SNES APU. |
taisel, it should be enough to emulate the SGB functions which are actually used by any actual, existing game. To be more practical, GBC support would be much, much more useful than SGB support. After all, there aren't many games which do not support GBC, but do support SGB and use it's advanced palette features. Simply having user-configurable GB palette (preferably with preconfigured SGB-like defaults for known games) would already fit the bill for most use cases. |
The obvious counter example is first Gen Pokemon. Also, GBC support is already in place by now. |
Sorry, I've never actually seen a real SGB (and a real GB 20+ years ago) and I've been under the impression that only it's palette features were actually used. I stand corrected; Google found this which states the same: https://tcrf.net/Super_Game_Boy_1_and_2#Unused_Sounds Should pay more attention before spouting shit on the Internet. :) Edit: SGB support would be nice either way. I first modified VBAGX to display monochrome palette in greenish tint akin to original instead of b/w (which brought back some very old memories), but seeing how the games look like on Youtube when played on SGB, I'd definitely prefer latter. VBAGX has support for SGB but only for games with SGB support. It fails miserably for some regular GB games and acts erratically to others, due to broken palette code. |
I agree with @endrift not wanting to fully support SGB features. A real GBA doesn't do this. Not even GBP for GCN. VBA-M or the VisualBoyAdvance line of emulators fakes the features. An emulator already fully supports SGB with cycle accuracy and that is bsnes/Higan, although I have had issues with Pokémon Yellow Version and that ROM is a good dump by the use of GoodTools to verify it. All other versions work fine, even Gold and Silver. |
Aaaaalmost done. Some of the color attribute (four of them actually) are still missing, but everything else is in place.
E2] Still missing:
|
It'd be a great Christmas to be able to play Pokemon Blue (just an example) in its SGB palette mode in mGBA and hopefully the libretro port as well (that'd be a game changer, the only GB emulator in RE with SGB palettes)! 😎 |
@bryc it’s already mostly done. Only a handful of less-used features are unimplemented. |
@endrift what SGB features have you implemented? Colors and borders? What about sound/music enhancements? |
@bryc Added support for ATTR_CHR and fixed some PAL commands; many of those issues you sent are fixed. |
Awesome!! Nice work, that fixed the issues with Battle Arena and Battle Crusher as well as DKL2 title screen. The remaining issues in that sample of tests:
Also other bugs I came across:
Hopefully those end up automagically fixed when the remaining ATTR functions are added ;) |
This is awesome! How can I use this in RetroArch? Where do I have to put the sgb_bios.bin? To be clear I just care about the color palettes. I'm using SGB borders with RetroArch's shaders feature which is alright. I just want a GB(C) rom to use this palette priority when booted with mGBA core:
|
I've fixed another issue that affects Castlevania Legends. Please retest other games. |
Great - Castlevania Legends is fixed. Pokemon Blue's SGB border seems fixed, but Donkey Kong Land 2's seems to regressed in the opposite way. There are now white pixels where there should be black (Pokemon Blue had white pixels that should have been black). Also palettes remain broken while running the gameplay demo/attract mode in Donkey Kong Land 2. These issues still remain:
I'll test more games this weekend and update this post. |
DKL2 borders should be fixed now. E] DKL2 attract should be fixed too. |
@bryc are there any remaining SGB issues you're aware of? I'm trying to find any game that uses ATTR_LIN so I can test it. |
Yes, that is ATTR_LIN! Thank you. |
I should have that bug fixed tonight, then this issue can be closed (file remaining issues separately). |
No problem! I'll make a new issue for any other bugs/quirks I find (in that build) |
ATTR_LIN added, and with that I'm done with the SGB features I'm planning to add (modulo bugfixes). |
Now that gameboy emulation is supported what do you think about adding SGB features like colouring and border support? How it works is documented in VBA-M
The text was updated successfully, but these errors were encountered: