Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - ZGB library for the SMS/GG

Reply to topic
Author Message
  • Joined: 09 Aug 2021
  • Posts: 131
Reply with quote
ZGB library for the SMS/GG
Post Posted: Sun Feb 25, 2024 8:20 pm
Me and @bbbbbr recently ported the @Zalo's ZGB library. Now it allows to compile projects for the different Game Boy clones (Mega Duck, Analogue Pocket .pocket format) and the Game Gear. For now Game Gear library is lacking some features like SFX and music, and also there are no platform-dependent assets yet, but that is on my todo list. As well as the SMS support. For those who are interested, links below.

ZGB library: https://github.com/untoxa/ZGB/tree/develop
  View user's profile Send private message
  • Joined: 09 Aug 2021
  • Posts: 131
Reply with quote
Post Posted: Sun Feb 25, 2024 8:26 pm
Last edited by toxa on Mon Feb 26, 2024 7:08 am; edited 1 time in total
The first ported ZGB game is "Kaiju Feeder" by @Zalo.

Game source files: https://github.com/untoxa/Kaiju-Feeder

ROM file updated 2024-02-26
image.png (19.96 KB)
Title screen
image.png
image2.png (13.39 KB)
Change level banner
image2.png
image3.png (21.55 KB)
Gameplay
image3.png
KaijuFeeder.zip (16.4 KB)
ROM file

  View user's profile Send private message
  • Joined: 29 Mar 2012
  • Posts: 886
  • Location: Spain
Reply with quote
Post Posted: Sun Feb 25, 2024 10:17 pm
Wonderful to see such a nice progress!!
  View user's profile Send private message
  • Joined: 09 Aug 2021
  • Posts: 131
Reply with quote
Post Posted: Mon Feb 26, 2024 9:51 am
Sushi Nights by Monis Games, the #GBCOMPO21 entry! Time countdown is not showing yet, and a few more improvements yet to go, but... it is working!

Game sources are available here: https://github.com/untoxa/SushiNights
image.png (24.88 KB)
Title screen
image.png
image (1).png (17.05 KB)
Gameplay
image (1).png
image (2).png (14.74 KB)
Level finished
image (2).png
SushiNights.zip (27.44 KB)
ROM file

  View user's profile Send private message
  • Joined: 09 Aug 2021
  • Posts: 131
Reply with quote
Post Posted: Mon Feb 26, 2024 9:55 am
If someone want to help me with the 4bpp Game Gear graphics or music/sfx - you are very welcome. Also SMS ZGB port suggestions.
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 3828
  • Location: Stockholm, Sweden
Reply with quote
Post Posted: Mon Feb 26, 2024 12:49 pm
Is 4 grays the only option 'out of the box'?
  View user's profile Send private message Visit poster's website
  • Joined: 09 Aug 2021
  • Posts: 131
Reply with quote
Post Posted: Mon Feb 26, 2024 5:31 pm
sverx wrote
Is 4 grays the only option 'out of the box'?

Of course not. Those two games were DMG and i simply miss colorful assets. Something might not be fully tested yet, but should work.
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 3828
  • Location: Stockholm, Sweden
Reply with quote
Post Posted: Mon Feb 26, 2024 5:50 pm
toxa wrote
Of course not. Those two games were DMG and i simply miss colorful assets.


OK, I didn't express myself correctly. What I meant is - is there some alternative palette one can select when playing games that were created on a monochromatic 2bpp system?
Several years ago Haroldook and I tried to create a compatibility layer for (the old) GBDK and one could either use grayscale or 'greenscale' (is it a word?)...
  View user's profile Send private message Visit poster's website
  • Joined: 23 Jan 2010
  • Posts: 439
Reply with quote
Post Posted: Mon Feb 26, 2024 6:21 pm
Quote
As well as the SMS support.

This is wonderful and i hope that your to do list be soon!


Quote
If someone want to help me with the 4bpp Game Gear graphics or music/sfx - you are very welcome. Also SMS ZGB port suggestions
Slogra could help you in this department. I have a question: The GB game not have colors but the dev not could give a pallete layout in how to simulate the colors for game? So port it for GG/SMS would be more easy, not?
  View user's profile Send private message
  • Joined: 09 Aug 2021
  • Posts: 131
Reply with quote
Post Posted: Mon Feb 26, 2024 10:53 pm
sverx wrote
OK, I didn't express myself correctly. What I meant is - is there some alternative palette one can select when playing games that were created on a monochromatic 2bpp system?

Sorry, i don't get your question. When compiling ZGB project for the game gear, it is not 2bpp anymore. You put in 4bpp assets, recompile and here we go. Or just load the other palette if you want to keep the original assets.
  View user's profile Send private message
  • Joined: 09 Aug 2021
  • Posts: 131
Reply with quote
Post Posted: Mon Feb 26, 2024 10:55 pm
segarule wrote
The GB game not have colors but the dev not could give a pallete layout in how to simulate the colors for game? So port it for GG/SMS would be more easy, not?

you don't need to "simulate colors". we just need the native game gear assets. in PNG format.
  View user's profile Send private message
  • Joined: 09 Aug 2021
  • Posts: 131
Reply with quote
Post Posted: Tue Feb 27, 2024 8:08 am
as you can see, spritesheets are in PNG format and look this way. they might be redrawn in 16 colors, put into the platform-specific subfoldres and recompile. also game should set that palette in the code of course.
bubble.png (216 B)
bubble sprite
bubble.png
playermenu.png (714 B)
menu sprites
playermenu.png

  View user's profile Send private message
  • Joined: 29 Mar 2012
  • Posts: 886
  • Location: Spain
Reply with quote
Post Posted: Tue Feb 27, 2024 8:40 am
and what about the fixed screens? (game over, etc)

I may have a look and try to add 4bpp resources.
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 3828
  • Location: Stockholm, Sweden
Reply with quote
Post Posted: Tue Feb 27, 2024 9:17 am
toxa wrote
Sorry, i don't get your question. When compiling ZGB project for the game gear, it is not 2bpp anymore. You put in 4bpp assets, recompile and here we go. Or just load the other palette if you want to keep the original assets.


Yes, I was wondering if one could have the game with the original 2bpp assets mapped to a different palette, to retain the style of a GB game.
No worries.
  View user's profile Send private message Visit poster's website
  • Joined: 23 Jan 2010
  • Posts: 439
Reply with quote
Post Posted: Tue Feb 27, 2024 9:59 am
toxa wrote
as you can see, spritesheets are in PNG format and look this way. they might be redrawn in 16 colors, put into the platform-specific subfoldres and recompile. also game should set that palette in the code of course.

You mean that i can take the assets and give to it colors of my choice with 16 colors pallete?
  View user's profile Send private message
  • Joined: 29 Mar 2012
  • Posts: 886
  • Location: Spain
Reply with quote
Post Posted: Tue Feb 27, 2024 10:38 am
segarule wrote
toxa wrote
as you can see, spritesheets are in PNG format and look this way. they might be redrawn in 16 colors, put into the platform-specific subfoldres and recompile. also game should set that palette in the code of course.

You mean that i can take the assets and give to it colors of my choice with 16 colors pallete?


yes, you can. Are you going to have a look? (So then I'll skip)
  View user's profile Send private message
  • Joined: 23 Jan 2010
  • Posts: 439
Reply with quote
Post Posted: Tue Feb 27, 2024 10:47 am
kusfo wrote
segarule wrote
toxa wrote
as you can see, spritesheets are in PNG format and look this way. they might be redrawn in 16 colors, put into the platform-specific subfoldres and recompile. also game should set that palette in the code of course.

You mean that i can take the assets and give to it colors of my choice with 16 colors pallete?


yes, you can. Are you going to have a look? (So then I'll skip)

No. When i put the question is to know if anyone can redraw the colors. "I" not mean me in particular but anyone. You can continue helping toxa.
  View user's profile Send private message
  • Joined: 29 Mar 2012
  • Posts: 886
  • Location: Spain
Reply with quote
Post Posted: Tue Feb 27, 2024 10:51 am
I mean, I'm not a very good artist, but I can do something acceptable
  View user's profile Send private message
  • Joined: 09 Aug 2021
  • Posts: 131
Reply with quote
Post Posted: Tue Feb 27, 2024 1:22 pm
Last edited by toxa on Tue Feb 27, 2024 1:29 pm; edited 1 time in total
sverx wrote
Yes, I was wondering if one could have the game with the original 2bpp assets mapped to a different palette, to retain the style of a GB game.No worries.

that is a simple as calling set_bkg_palette()/set_sprite_palette() somewhere in the beginning of game state initialization callback(s). before this line, for instance: https://github.com/untoxa/SushiNights/blob/master/src/StateSplashZGB.c#L15
  View user's profile Send private message
  • Joined: 09 Aug 2021
  • Posts: 131
Reply with quote
Post Posted: Tue Feb 27, 2024 1:24 pm
kusfo wrote
and what about the fixed screens? (game over, etc)

situation is a bit different, but in general should work similar way. working on that on the ZGB side.
  View user's profile Send private message
  • Joined: 09 Aug 2021
  • Posts: 131
Reply with quote
Post Posted: Tue Feb 27, 2024 1:28 pm
Sushi Nights update. As said before, colorizing is just putting the platform specific assets.
image.png (15.94 KB)
screenshot
image.png
SushiNights.zip (28.31 KB)
ROM file

  View user's profile Send private message
  • Joined: 09 Aug 2021
  • Posts: 131
Reply with quote
Post Posted: Wed Mar 06, 2024 6:41 pm
now with the VGM sound effects! automatically converted from the VGM files of the game assets.
SushiNights.zip (29.51 KB)
ROM file

  View user's profile Send private message
  • Joined: 09 Aug 2021
  • Posts: 131
Reply with quote
Super Princess 2092 Exodus
Post Posted: Fri Mar 15, 2024 9:09 am
Another ZGB game ported to the Game Gear: Super Princess 2092 Exodus. Missing SFX, music and final credit text. Also colorful assets.
image.png (23.61 KB)
menu screen
image.png
image2.png (22.29 KB)
Level title
image2.png
image3.png (30.01 KB)
In-game screen
image3.png
GBJAM2016.zip (28.3 KB)
ROM file

  View user's profile Send private message
  • Joined: 09 Aug 2021
  • Posts: 131
Reply with quote
ZGB binary releases
Post Posted: Sat Mar 23, 2024 10:37 am
ZGB library github repo now has CI builds of the ZGB library for the most popular operating systems: windows, linux, macos. You can download them here: https://github.com/untoxa/ZGB/actions/workflows/zgb_build_and_package.yml under the "ZGB Build and Package" link (you must be logged on to github to see the build artifacts.

Those builds contain the ZGB library, all necessary tools built for the selected platform, project template, docs, and also bundled matching GBDK-2020 release for convenience. All you need is GNU Make (plus mingw/msys or the modern WSL for windows) and python3 for some few python tools in the ZGB toolchain. Then you just set a couple of environment variables: GBDK_HOME and ZGB_PATH and you are ready!

Also the latest version integrates support for the furnace music modules with the help of the wonderful driver written by Joe Kennedy: https://www.smspower.org/forums/20045-BanjoSMSMusicAndSfxDriverUsingFurnace github: https://github.com/joffb/banjo

Example projects may be seen in this topic above. Hope you like it. Looking forward for your new homebrew projects.
splash_zgb.png (1.53 KB)
ZGB logo
splash_zgb.png

  View user's profile Send private message
  • Joined: 29 Mar 2012
  • Posts: 886
  • Location: Spain
Reply with quote
Post Posted: Mon Mar 25, 2024 7:11 am
Great!
We may port the old ChainBreak that @ManuSegura did for the GB some time ago! :-D
  View user's profile Send private message
  • Joined: 09 Aug 2021
  • Posts: 131
Reply with quote
Post Posted: Mon Mar 25, 2024 7:49 am
It is not necessary to port anything game boy. I mean ZGB is not just for porting the game boy games or projects. You can make whatever new ORIGINAL games. More to say, ZGB/GBDK-2020 is better and more convenient game making library, than any other existing for the SMS/GG.
  View user's profile Send private message
Reply to topic



Back to the top of this page

Back to SMS Power!