Page 1 of 2

Super Game Boy SNES core with MSU

Posted: Tue May 24, 2022 12:22 pm
by paulbnl
Finally convinced myself to try to combine the SNES and Gameboy cores so all Super Game Boy functions could work.

Well here it is. It is the SNES core modified to only support the Super Game Boy because it can't fit otherwise. Even Gameboy MSU works since the SNES MSU stuff is still used.

There are 3 speed choices. SGB1, SGB2 and SNES. The SGB2 option is the same speed as an original Game Boy. The SNES option makes the GB match the 60.09 SNES refresh rate to minimize stutter.

For the MSU stuff to work you need to replace the MiSTer file with the one in the zip file.
https://drive.google.com/file/d/1fJ9Yhz ... sp=sharing

Re: Super Game Boy SNES core with MSU

Posted: Tue May 24, 2022 1:17 pm
by skywalky
Amazing!!
Thank you

Re: Super Game Boy SNES core with MSU

Posted: Tue May 24, 2022 3:38 pm
by MorkMikael
thank you

Re: Super Game Boy SNES core with MSU

Posted: Tue May 24, 2022 4:03 pm
by mcj
Thank you so much for your efforts with this! Very excited to give this a go later today. I would hope that you would submit this to the MiSTer-devel so that this can be released for all. Again, thank you!!

Re: Super Game Boy SNES core with MSU

Posted: Tue May 24, 2022 4:14 pm
by FPGAzumSpass
Such an outstanding work to fit this and make it work, thank you so much for implementing it.

Re: Super Game Boy SNES core with MSU

Posted: Tue May 24, 2022 5:11 pm
by Kitrinx
Magnificent work Paul! All the edge cases seem to work, Space Invaders, audios, high colors, msu1. I didn't try games that support multi-tap.

My only suggestion is to add an aspect ratio for gameboy non-stretched aspect for people who prefer proper gameboy AR.

Great job!

Re: Super Game Boy SNES core with MSU

Posted: Tue May 24, 2022 5:12 pm
by Toya
paulbnl wrote: Tue May 24, 2022 12:22 pm Finally convinced myself to try to combine the SNES and Gameboy cores so all Super Game Boy functions could work.

Well here it is. It is the SNES core modified to only support the Super Game Boy because it can't fit otherwise. Even Gameboy MSU works since the SNES MSU stuff is still used.

There are 3 speed choices. SGB1, SGB2 and SNES. The SGB2 option is the same speed as an original Game Boy. The SNES option makes the GB match the 60.09 SNES refresh rate to minimize stutter.

For the MSU stuff to work you need to replace the MiSTer file with the one in the zip file.
https://drive.google.com/file/d/1fJ9Yhz ... sp=sharing
Thank you Paulbnl!

Re: Super Game Boy SNES core with MSU

Posted: Tue May 24, 2022 5:29 pm
by wark91
thanks a lot Paulbnl !!!!

Re: Super Game Boy SNES core with MSU

Posted: Tue May 24, 2022 5:45 pm
by SegaSnatcher
Absolutely fantastic work Paul!

Re: Super Game Boy SNES core with MSU

Posted: Tue May 24, 2022 7:57 pm
by retrossauro
I hope this turns into an official core eventually, because its amazing. This is the last use case of my real snes + fxpak pro that i (until now) couldn't replicate on MiSTer.

Guess I'm packing (and maybe later, selling) my snes consoles and games :)

Re: Super Game Boy SNES core with MSU

Posted: Tue May 24, 2022 8:19 pm
by tontonkaloun
Wonderful !!
Thank you

Re: Super Game Boy SNES core with MSU

Posted: Tue May 24, 2022 9:10 pm
by Denymetanol
Working perfect, many thanks ;-)

Re: Super Game Boy SNES core with MSU

Posted: Tue May 24, 2022 9:48 pm
by Reed_Solomon
Are save states still functional for GB/GBC games with this core?

Re: Super Game Boy SNES core with MSU

Posted: Wed May 25, 2022 2:19 am
by TLPD-AVW
Thanks for the core! While testing I found a small issue with one game. Tetris DX is supposed to have two different borders depending on the model of Super Game Boy. With the current core it doesn't load custom border at all, regardless if SGB1 or SGB2 rom is loaded.

Re: Super Game Boy SNES core with MSU

Posted: Wed May 25, 2022 2:40 am
by aberu
Paul, you are awesome as always. :) Much appreciated.

Re: Super Game Boy SNES core with MSU

Posted: Wed May 25, 2022 12:19 pm
by Captain Toad
Absolutely amazing! Thank you so much for this! Was at the top of my Mister wish list.

I noticed one issue. Sometimes when loading a game the core freezes with some minor white graphical error on the SGB border. Once I reboot and reload the core it's working again. Sometimes the second game I try, sometimes later on, and different games each time. All games I've tried are working otherwise, except for this random freeze.

Re: Super Game Boy SNES core with MSU

Posted: Wed May 25, 2022 9:26 pm
by southpaw
Thank you so much for this! This has been my most wanted core for a long time. SGB and SGB2 are such cool pieces of hardware.

Re: Super Game Boy SNES core with MSU

Posted: Thu May 26, 2022 2:31 pm
by KOLWE-X
Hi,
how does it work? I've downloaded the .rbf file and created a SGB folder in my games main folder. I can start the core and choose a gb rom, but the screen is still black. Nothing happens. What did I do wrong? Sorry for my bad english, it's not my native language.
Thanks in advance.

Re: Super Game Boy SNES core with MSU

Posted: Thu May 26, 2022 5:07 pm
by TLPD-AVW
KOLWE-X wrote: Thu May 26, 2022 2:31 pm Hi,
how does it work? I've downloaded the .rbf file and created a SGB folder in my games main folder. I can start the core and choose a gb rom, but the screen is still black. Nothing happens. What did I do wrong? Sorry for my bad english, it's not my native language.
Thanks in advance.
You need to load a Super Game Boy system rom (.sfc) first from the second menu option. Either Super Game Boy or Super Game Boy 2 works. After loading it once the core will remember it and will boot automatically with SGB rom loaded.

Re: Super Game Boy SNES core with MSU

Posted: Thu May 26, 2022 6:57 pm
by MorkMikael
would it be possible to add option to link the gameboy cores and the Super Game Boy system cores save folder to the same folder. since they have gameboys saves and super game boy saves in both.

Re: Super Game Boy SNES core with MSU

Posted: Thu May 26, 2022 7:16 pm
by paulbnl
FPGAzumSpass wrote: Tue May 24, 2022 4:14 pm Such an outstanding work to fit this and make it work, thank you so much for implementing it.
Removing the cartridge special chips freed up a lot of resources. The memory for the GBC part could also be removed like WRAM(24KB) and VRAM(8KB).

I used Sorgelig's SDRAM controller from the NES core which has different channels. So SNES and GB both use separate channels. It works perfectly with their async memory requests. Big thanks to Sorgelig :D
Kitrinx wrote: Tue May 24, 2022 5:11 pm Magnificent work Paul! All the edge cases seem to work, Space Invaders, audios, high colors, msu1. I didn't try games that support multi-tap.

My only suggestion is to add an aspect ratio for gameboy non-stretched aspect for people who prefer proper gameboy AR.
Today I tried Bomberman with multitap enabled and it worked fine with 3 players.

I pushed the code to GitHub and added the GB aspect ratio, Cheats and GB SNAC. I am not able to test GB SNAC though. In theory it should only be used with SGB2 speed.

Should we add it as a separate repo on MiSTer-devel or as a new branch on the SNES repo? Maybe the latter would make it easier to apply commits from the main SNES branch.

https://github.com/paulb-nl/SNES_MiSTer/tree/sgb
https://github.com/paulb-nl/Main_MiSTer/tree/sgb
Reed_Solomon wrote: Tue May 24, 2022 9:48 pm Are save states still functional for GB/GBC games with this core?
Save states have been removed. Not sure if they will be back.
Captain Toad wrote: Wed May 25, 2022 12:19 pm I noticed one issue. Sometimes when loading a game the core freezes with some minor white graphical error on the SGB border. Once I reboot and reload the core it's working again. Sometimes the second game I try, sometimes later on, and different games each time. All games I've tried are working otherwise, except for this random freeze.
Yes I have also seen this happen and I still have to investigate this but for me it freezes with a random garbage screen. One time it was fixed by switching the SGB bios.

Re: Super Game Boy SNES core with MSU

Posted: Thu May 26, 2022 8:12 pm
by aberu
I almost feel like making it a separate repo is better from a distribution angle but making it a different branch is better from a development angle which should usually be the priority.

Re: Super Game Boy SNES core with MSU

Posted: Thu May 26, 2022 8:56 pm
by Rahzadan
I think the commits to Main_MiSTer should remain in the main repo for that, but I agree that the SGB core should be a branch of SNES_MiSTer, and only use commits from SNES_MiSTer that would benefit the SGB core?

Re: Super Game Boy SNES core with MSU

Posted: Fri May 27, 2022 12:25 pm
by Rahzadan
Thinking more about this - I wonder if it would be possible to have the SGB core load into the FPGA only when a .GB rom is selected from within the regular SNES core, and have the SGB core otherwise hidden. This way it would be transparent to the end user, and still "feel" like they are using the regular SNES core, even though in the background, the SGB core is being used. Then if they open the menu and load a regular SNES Rom (sfc, smc, etc) then the regular SNES core would auto-load back into the FPGA.

Re: Super Game Boy SNES core with MSU

Posted: Fri May 27, 2022 8:38 pm
by Rahzadan
Found a bug. The core doesn't seem to be able to load .gb roms from within a zip. I have all my roms in 1 giant .zip, which hasn't been a problem before with any other core.

Re: Super Game Boy SNES core with MSU

Posted: Fri May 27, 2022 11:04 pm
by Kitrinx
Rahzadan wrote: Fri May 27, 2022 12:25 pm Thinking more about this - I wonder if it would be possible to have the SGB core load into the FPGA only when a .GB rom is selected from within the regular SNES core, and have the SGB core otherwise hidden. This way it would be transparent to the end user, and still "feel" like they are using the regular SNES core, even though in the background, the SGB core is being used. Then if they open the menu and load a regular SNES Rom (sfc, smc, etc) then the regular SNES core would auto-load back into the FPGA.
no, mister framework doesn't work that way

Re: Super Game Boy SNES core with MSU

Posted: Fri May 27, 2022 11:08 pm
by Kitrinx
paulbnl wrote: Thu May 26, 2022 7:16 pm Should we add it as a separate repo on MiSTer-devel or as a new branch on the SNES repo? Maybe the latter would make it easier to apply commits from the main SNES branch.
I don't think this is a good idea. The two cores that have a branch system like this (gba 2p and gb 2p) have both been problematic to maintain because of the unconventional setup, and are now both kind of behind despite the good intention of keeping them as branches. Having it as an individual core will ultimately be easier to maintain, and since it has it a unique purposes, needs less maintenance in general. For example, I doubt any future spu tweaks will matter at all to the behavior of super gameboy.

Re: Super Game Boy SNES core with MSU

Posted: Fri May 27, 2022 11:13 pm
by Kitrinx
paulbnl wrote: Thu May 26, 2022 7:16 pm
Yes I have also seen this happen and I still have to investigate this but for me it freezes with a random garbage screen. One time it was fixed by switching the SGB bios.
Maybe the sdram is not refreshing during the cart loading? I had problems with the sdram data decaying on the 7800 core if the core was paused for too long, perhaps it's related to that, and the bios is decaying.

Re: Super Game Boy SNES core with MSU

Posted: Sun May 29, 2022 11:37 am
by paulbnl
Maybe it is something like that but usually reloading the bios does not work and the core has to be restarted so it is unlikely that just the bios is decaying.

Re: Super Game Boy SNES core with MSU

Posted: Mon May 30, 2022 9:07 pm
by TwinFami
Did anyone actually get MSU working on here?

Tried the same exact files that were working on the SD2SNES Pro and nothing is working.

The regular Game Boy stuff works fine, but the MSU versions don't work at all.

Even changed the MiSTer main as instructed