Super Game Boy SNES core with MSU

paulbnl
Core Developer
Posts: 205
Joined: Sun May 24, 2020 8:48 pm
Has thanked: 18 times
Been thanked: 196 times

Super Game Boy SNES core with MSU

Unread post 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
skywalky
Posts: 5
Joined: Thu Jun 11, 2020 10:20 am
Been thanked: 1 time

Re: Super Game Boy SNES core with MSU

Unread post by skywalky »

Amazing!!
Thank you
MorkMikael
Posts: 96
Joined: Thu Jun 04, 2020 9:01 pm
Has thanked: 16 times
Been thanked: 19 times

Re: Super Game Boy SNES core with MSU

Unread post by MorkMikael »

thank you
User avatar
mcj
Posts: 12
Joined: Mon May 25, 2020 12:59 am
Location: New York, NY
Has thanked: 2 times
Been thanked: 13 times
Contact:

Re: Super Game Boy SNES core with MSU

Unread post 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!!
Discord: mcj#2197 | Twitter: @mcjxmcj
FPGAzumSpass
Core Developer
Posts: 379
Joined: Sat May 23, 2020 12:55 pm
Has thanked: 38 times
Been thanked: 381 times

Re: Super Game Boy SNES core with MSU

Unread post by FPGAzumSpass »

Such an outstanding work to fit this and make it work, thank you so much for implementing it.
User avatar
Kitrinx
Core Developer
Posts: 185
Joined: Sat May 23, 2020 2:14 am
Location: NYC
Has thanked: 1 time
Been thanked: 147 times
Contact:

Re: Super Game Boy SNES core with MSU

Unread post 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!
Toya
Posts: 65
Joined: Tue Jun 08, 2021 9:59 pm
Has thanked: 5 times
Been thanked: 23 times

Re: Super Game Boy SNES core with MSU

Unread post 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!
User avatar
wark91
Core Developer
Posts: 334
Joined: Sun May 24, 2020 8:34 pm
Has thanked: 447 times
Been thanked: 94 times

Re: Super Game Boy SNES core with MSU

Unread post by wark91 »

thanks a lot Paulbnl !!!!
User avatar
SegaSnatcher
Posts: 163
Joined: Sun May 24, 2020 9:18 pm
Has thanked: 36 times
Been thanked: 43 times

Re: Super Game Boy SNES core with MSU

Unread post by SegaSnatcher »

Absolutely fantastic work Paul!
retrossauro
Posts: 9
Joined: Wed Jul 15, 2020 3:42 pm
Has thanked: 2 times

Re: Super Game Boy SNES core with MSU

Unread post 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 :)
User avatar
tontonkaloun
Posts: 354
Joined: Sun May 24, 2020 7:38 pm
Has thanked: 152 times
Been thanked: 51 times

Re: Super Game Boy SNES core with MSU

Unread post by tontonkaloun »

Wonderful !!
Thank you
Denymetanol
Posts: 1
Joined: Mon May 25, 2020 11:24 am

Re: Super Game Boy SNES core with MSU

Unread post by Denymetanol »

Working perfect, many thanks ;-)
User avatar
Reed_Solomon
Posts: 65
Joined: Sun May 24, 2020 7:37 pm
Has thanked: 40 times
Been thanked: 8 times

Re: Super Game Boy SNES core with MSU

Unread post by Reed_Solomon »

Are save states still functional for GB/GBC games with this core?
User avatar
TLPD-AVW
Posts: 96
Joined: Sat Jul 11, 2020 9:59 am
Has thanked: 17 times
Been thanked: 33 times

Re: Super Game Boy SNES core with MSU

Unread post 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.
User avatar
aberu
Core Developer
Posts: 1142
Joined: Tue Jun 09, 2020 8:34 pm
Location: Longmont, CO
Has thanked: 244 times
Been thanked: 388 times
Contact:

Re: Super Game Boy SNES core with MSU

Unread post by aberu »

Paul, you are awesome as always. :) Much appreciated.
birdybro~
Captain Toad
Posts: 1
Joined: Sun May 24, 2020 7:41 pm

Re: Super Game Boy SNES core with MSU

Unread post 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.
southpaw
Posts: 8
Joined: Sat Apr 16, 2022 3:01 pm
Been thanked: 3 times

Re: Super Game Boy SNES core with MSU

Unread post 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.
KOLWE-X
Posts: 10
Joined: Thu May 26, 2022 2:29 pm
Has thanked: 1 time

Re: Super Game Boy SNES core with MSU

Unread post 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.
User avatar
TLPD-AVW
Posts: 96
Joined: Sat Jul 11, 2020 9:59 am
Has thanked: 17 times
Been thanked: 33 times

Re: Super Game Boy SNES core with MSU

Unread post 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.
MorkMikael
Posts: 96
Joined: Thu Jun 04, 2020 9:01 pm
Has thanked: 16 times
Been thanked: 19 times

Re: Super Game Boy SNES core with MSU

Unread post 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.
paulbnl
Core Developer
Posts: 205
Joined: Sun May 24, 2020 8:48 pm
Has thanked: 18 times
Been thanked: 196 times

Re: Super Game Boy SNES core with MSU

Unread post 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.
User avatar
aberu
Core Developer
Posts: 1142
Joined: Tue Jun 09, 2020 8:34 pm
Location: Longmont, CO
Has thanked: 244 times
Been thanked: 388 times
Contact:

Re: Super Game Boy SNES core with MSU

Unread post 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.
birdybro~
Rahzadan
Posts: 25
Joined: Sat Oct 17, 2020 3:13 am
Has thanked: 1 time
Been thanked: 4 times

Re: Super Game Boy SNES core with MSU

Unread post 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?
Rahzadan
Posts: 25
Joined: Sat Oct 17, 2020 3:13 am
Has thanked: 1 time
Been thanked: 4 times

Re: Super Game Boy SNES core with MSU

Unread post 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.
Rahzadan
Posts: 25
Joined: Sat Oct 17, 2020 3:13 am
Has thanked: 1 time
Been thanked: 4 times

Re: Super Game Boy SNES core with MSU

Unread post 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.
User avatar
Kitrinx
Core Developer
Posts: 185
Joined: Sat May 23, 2020 2:14 am
Location: NYC
Has thanked: 1 time
Been thanked: 147 times
Contact:

Re: Super Game Boy SNES core with MSU

Unread post 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
User avatar
Kitrinx
Core Developer
Posts: 185
Joined: Sat May 23, 2020 2:14 am
Location: NYC
Has thanked: 1 time
Been thanked: 147 times
Contact:

Re: Super Game Boy SNES core with MSU

Unread post 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.
User avatar
Kitrinx
Core Developer
Posts: 185
Joined: Sat May 23, 2020 2:14 am
Location: NYC
Has thanked: 1 time
Been thanked: 147 times
Contact:

Re: Super Game Boy SNES core with MSU

Unread post 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.
paulbnl
Core Developer
Posts: 205
Joined: Sun May 24, 2020 8:48 pm
Has thanked: 18 times
Been thanked: 196 times

Re: Super Game Boy SNES core with MSU

Unread post 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.
TwinFami
Posts: 9
Joined: Sun May 24, 2020 8:51 pm
Has thanked: 1 time
Been thanked: 1 time

Re: Super Game Boy SNES core with MSU

Unread post 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
Post Reply