Game & Watch Core

Xbytez
Site Admin
Posts: 479
Joined: Wed May 20, 2020 3:36 pm
Has thanked: 227 times
Been thanked: 805 times

Re: Game & Watch Core

Unread post by Xbytez »

Another update from Pierco, this is looking mighty fine!

User avatar
Reed_Solomon
Posts: 65
Joined: Sun May 24, 2020 7:37 pm
Has thanked: 40 times
Been thanked: 8 times

Re: Game & Watch Core

Unread post by Reed_Solomon »

Xbytez wrote: Mon May 16, 2022 8:00 pm Another update from Pierco, this is looking mighty fine!
Makes me wonder if there will be Tate mode.
User avatar
LamerDeluxe
Top Contributor
Posts: 1239
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 887 times
Been thanked: 284 times

Re: Game & Watch Core

Unread post by LamerDeluxe »

That looks absolutely fantastic! Really looking forward to trying this version.
Next up: MiSTer piezo speaker add-on :D
Xbytez
Site Admin
Posts: 479
Joined: Wed May 20, 2020 3:36 pm
Has thanked: 227 times
Been thanked: 805 times

Re: Game & Watch Core

Unread post by Xbytez »

Another update for the Game & Watch core.




If you wish to help with testing the latest release of the Game & Watch core a pre-compiled RBF is available if you are a subscriber of Pierco's Patreon.

Pierco's Pateon:
https://www.patreon.com/pierco

If you wish to compile and test the core yourself, Pierco has also pushed latest sources to the Game & Watch repository.

Game & Watch Core Repository:
https://github.com/pcornier/GnW_MiSTer
User avatar
LamerDeluxe
Top Contributor
Posts: 1239
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 887 times
Been thanked: 284 times

Re: Game & Watch Core

Unread post by LamerDeluxe »

Absolutely loving the fast progress on this core. It almost looks as though it was filmed from an actual G&W display.

EDIT: I built the core, but I don't have bin files for it (the old dkjr.bin doesn't work on this version). I've been mucking around with the generator.html a bit, using MAME G&W ROMs and artwork. I have no idea which value to put in the time location parameter. Button settings would be trial and error.

The only thing I've achieved so far is a bin with the background being displayed with white LCD images that only remove the background.

EDIT 2:
Oh cool, now I'm getting proper black LCD graphics somehow. Seems like you might have to use bkg2 instead of 1. Game is not working though, probably because of the time location parameter.

EDIT 3:
Awesome! I got DKjr working! Buttons are incorrect, as expected. Time location parameter is the default 14 value.
Using BG2 and SVG1.

EDIT 4:
Got the correct buttons now, there's a bit of logic to them, if you realize that it is a matrix. Man this new core looks fantastic. Audio clearly still needs fixing.
Xbytez
Site Admin
Posts: 479
Joined: Wed May 20, 2020 3:36 pm
Has thanked: 227 times
Been thanked: 805 times

Re: Game & Watch Core

Unread post by Xbytez »

Another update for this core has been pushed to GitHUb.

User avatar
LamerDeluxe
Top Contributor
Posts: 1239
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 887 times
Been thanked: 284 times

Re: Game & Watch Core

Unread post by LamerDeluxe »

That is great, I was going to ask if that was possible and here it is already. Adding up-scaling filters already helped a bit.

I was able to convert some dual-screen games as well. The tool is not difficult to use once you get the hang of it. The only problem I have is that some games show white LCD graphics instead of black, for some reason.

EDIT: I converted Snoopy Tennis with the updated tool, it looks amazing, I don't see any pixels anymore. Also, it seems like the white LCD graphics problem is gone now.

EDIT 2: I'm getting a mix of black and white LCD graphics (with what looks like anti-aliasing pixels around them) with Mario Bros. Could be my source files.

EDIT 3: This also happens with games that converted correctly with the previous version, like Donkey Kong Jr., Donkey Kong 1 and 2. Mario Bros and Life Boat are also affected. The artifacts seem to be graphics that are triggered at the wrong time and look like only anti-aliasing pixels.
User avatar
lomdar67
Posts: 184
Joined: Sun May 24, 2020 8:27 pm
Has thanked: 14 times
Been thanked: 9 times

Re: Game & Watch Core

Unread post by lomdar67 »

This is the first time I'm trying to compile a core. I'm getting a few errors. Can anyone help me out?

Code: Select all

Info (12128): Elaborating entity "sdram" for hierarchy "emu:emu|sdram:sdram"
Info (12128): Elaborating entity "ddram" for hierarchy "emu:emu|ddram:ddram"
Error (12006): Node instance "pll_hdmi" instantiates undefined entity "pll_hdmi". Ensure that required library paths are specified correctly, define the specified entity, or change the instantiation. If this entity represents Intel FPGA or third-party IP, generate the synthesis files for the IP.
Error (12006): Node instance "pll_cfg" instantiates undefined entity "pll_cfg". Ensure that required library paths are specified correctly, define the specified entity, or change the instantiation. If this entity represents Intel FPGA or third-party IP, generate the synthesis files for the IP.
Error (12006): Node instance "pll_audio" instantiates undefined entity "pll_audio". Ensure that required library paths are specified correctly, define the specified entity, or change the instantiation. If this entity represents Intel FPGA or third-party IP, generate the synthesis files for the IP.
Error (12006): Node instance "pll" instantiates undefined entity "pll". Ensure that required library paths are specified correctly, define the specified entity, or change the instantiation. If this entity represents Intel FPGA or third-party IP, generate the synthesis files for the IP.
Info (144001): Generated suppressed messages file C:/Users/mf/Downloads/GnW_MiSTer-master/output_files/GnW.map.smsg
Error: Quartus Prime Analysis & Synthesis was unsuccessful. 4 errors, 19 warnings
	Error: Peak virtual memory: 6391 megabytes
	Error: Processing ended: Tue May 24 16:36:48 2022
	Error: Elapsed time: 00:01:22
	Error: Total CPU time (on all processors): 00:01:36
Error (293001): Quartus Prime Full Compilation was unsuccessful. 6 errors, 21 warnings
We raise hopes here...until they're old enough to fend for themselves.
--Mike Callahan
User avatar
jurkevicz
Posts: 34
Joined: Mon Jan 31, 2022 2:49 am
Has thanked: 27 times
Been thanked: 13 times

Re: Game & Watch Core

Unread post by jurkevicz »

Same thing happened to me. I'll wait until it's release. Looking forward to this.
User avatar
lomdar67
Posts: 184
Joined: Sun May 24, 2020 8:27 pm
Has thanked: 14 times
Been thanked: 9 times

Re: Game & Watch Core

Unread post by lomdar67 »

Okay, maybe it's the wrong version of Quartus... I'm re-downloading an try again. ;-)
We raise hopes here...until they're old enough to fend for themselves.
--Mike Callahan
User avatar
LamerDeluxe
Top Contributor
Posts: 1239
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 887 times
Been thanked: 284 times

Re: Game & Watch Core

Unread post by LamerDeluxe »

I'm using 17.0.2
User avatar
lamarax
Top Contributor
Posts: 472
Joined: Wed Nov 11, 2020 6:28 pm
Has thanked: 33 times
Been thanked: 202 times

Re: Game & Watch Core

Unread post by lamarax »

LamerDeluxe wrote: Fri May 20, 2022 3:05 pm I converted Snoopy Tennis with the updated tool, it looks amazing
Hi LamerDeluxe!

I succumb to my inability to understand the use of tool. Here's what I'm trying with, Tropical Fish:

tfish_example.jpg
tfish_example.jpg (327.81 KiB) Viewed 10885 times

In this picture, I've already uploaded the (single) .svg from the MAME set on top of the background.png, but it won't show either as a preview, nor it would display when I load the exported .bin in the core. Not to mention the control settings (K1-K4 x S1-S6); I mean I get they represent a matrix, but in this particular example, there 're only two buttons directions: left and right 🤔

Could you please post an explanation of how you figured it out in layman's terms?

[edit] Hmm, I think I can see now as far as inputs are concerned; S1-S6 correspond to the number of available buttons, and K1-K4 correspond to the positioning of the LCD segments, right? err... no? Oh, it's the other way round, isn't it?
User avatar
lomdar67
Posts: 184
Joined: Sun May 24, 2020 8:27 pm
Has thanked: 14 times
Been thanked: 9 times

Re: Game & Watch Core

Unread post by lomdar67 »

jurkevicz wrote: Tue May 24, 2022 2:46 pm Same thing happened to me. I'll wait until it's release. Looking forward to this.
It's working fine with 17.0.0
We raise hopes here...until they're old enough to fend for themselves.
--Mike Callahan
User avatar
LamerDeluxe
Top Contributor
Posts: 1239
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 887 times
Been thanked: 284 times

Re: Game & Watch Core

Unread post by LamerDeluxe »

lamarax wrote: Tue May 24, 2022 4:18 pm
LamerDeluxe wrote: Fri May 20, 2022 3:05 pm I converted Snoopy Tennis with the updated tool, it looks amazing
Hi LamerDeluxe!

I succumb to my inability to understand the use of tool. Here's what I'm trying with, Tropical Fish:

In this picture, I've already uploaded the (single) .svg from the MAME set on top of the background.png, but it won't show either as a preview, nor it would display when I load the exported .bin in the core. Not to mention the control settings (K1-K4 x S1-S6); I mean I get they represent a matrix, but in this particular example, there 're only two buttons directions: left and right 🤔

Could you please post an explanation of how you figured it out in layman's terms?

[edit] Hmm, I think I can see now as far as inputs are concerned; S1-S6 correspond to the number of available buttons, and K1-K4 correspond to the positioning of the LCD segments, right? err... no? Oh, it's the other way round, isn't it?
If you are using Firefox, it doesn't work correctly with it, for some reason, giving this exact problem. I had problems with hanging scaling buttons in Chrome, right now the best bet is using Edge. Fuzz discovered all of that.

The correct button assignments can be looked up in the MAME G&W sourcecode: https://github.com/mamedev/mame/blob/ma ... _sm510.cpp
Search for the section of a game in the code, use the order the controls are set there, in reading order in the converter tool UI (left to right then up to down). Often occurring is 'time, game b, game a, alarm', in that order. Buttons are often named slightly differently in the code.

Right now there are problems with anti-aliasing pixels showing in the wrong places, with some of the games. To turn off anti-aliasing use 0 as the mask expansion setting.

For dual-screen games, use bg1 and bg2 plus svg1 and svg2, scale and place them by hand. It would be handy to have options to scale and place them with dedicated buttons (and then finetune by hand).
Jegriva
Posts: 83
Joined: Wed Mar 10, 2021 10:06 pm
Has thanked: 51 times
Been thanked: 9 times

Re: Game & Watch Core

Unread post by Jegriva »

Analog video out?
User avatar
LamerDeluxe
Top Contributor
Posts: 1239
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 887 times
Been thanked: 284 times

Re: Game & Watch Core

Unread post by LamerDeluxe »

Jegriva wrote: Tue May 24, 2022 6:36 pm Analog video out?
I didn't get a signal out of it.
MrMister1985
Posts: 49
Joined: Sun Jan 09, 2022 5:21 pm
Has thanked: 19 times

Re: Game & Watch Core

Unread post by MrMister1985 »

Oh Wow! Can't wait for this release! The MisTer community is amazing! :)
User avatar
lamarax
Top Contributor
Posts: 472
Joined: Wed Nov 11, 2020 6:28 pm
Has thanked: 33 times
Been thanked: 202 times

Re: Game & Watch Core

Unread post by lamarax »

LamerDeluxe wrote: Tue May 24, 2022 6:23 pm If you are using Firefox, it doesn't work correctly with it, for some reason, giving this exact problem. I had problems with hanging scaling buttons in Chrome, right now the best bet is using Edge. Fuzz discovered all of that.

The correct button assignments can be looked up in the MAME G&W sourcecode: https://github.com/mamedev/mame/blob/ma ... _sm510.cpp
Search for the section of a game in the code, use the order the controls are set there, in reading order in the converter tool UI (left to right then up to down). Often occurring is 'time, game b, game a, alarm', in that order. Buttons are often named slightly differently in the code.

Right now there are problems with anti-aliasing pixels showing in the wrong places, with some of the games. To turn off anti-aliasing use 0 as the mask expansion setting.

For dual-screen games, use bg1 and bg2 plus svg1 and svg2, scale and place them by hand. It would be handy to have options to scale and place them with dedicated buttons (and then finetune by hand).
Thanks to your clear instructions, I've managed to convert every SM510 MCU game that's currently supported by the core!

You're right; quite some patience is needed to scale layers correctly, and the AA mask indeed produces artifacts on screen. I think using a median interpolation filter alleviates that problem.

I wish I'd be free to share the fruits of my labor here, but I don't want to be banned ;)
NB: This is the core you want to assess input lag; try Oil Panic :P
User avatar
LamerDeluxe
Top Contributor
Posts: 1239
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 887 times
Been thanked: 284 times

Re: Game & Watch Core

Unread post by LamerDeluxe »

lamarax wrote: Wed May 25, 2022 8:00 pm
LamerDeluxe wrote: Tue May 24, 2022 6:23 pm If you are using Firefox, it doesn't work correctly with it, for some reason, giving this exact problem. I had problems with hanging scaling buttons in Chrome, right now the best bet is using Edge. Fuzz discovered all of that.

The correct button assignments can be looked up in the MAME G&W sourcecode: https://github.com/mamedev/mame/blob/ma ... _sm510.cpp
Search for the section of a game in the code, use the order the controls are set there, in reading order in the converter tool UI (left to right then up to down). Often occurring is 'time, game b, game a, alarm', in that order. Buttons are often named slightly differently in the code.

Right now there are problems with anti-aliasing pixels showing in the wrong places, with some of the games. To turn off anti-aliasing use 0 as the mask expansion setting.

For dual-screen games, use bg1 and bg2 plus svg1 and svg2, scale and place them by hand. It would be handy to have options to scale and place them with dedicated buttons (and then finetune by hand).
Thanks to your clear instructions, I've managed to convert every SM510 MCU game that's currently supported by the core!

You're right; quite some patience is needed to scale layers correctly, and the AA mask indeed produces artifacts on screen. I think using a median interpolation filter alleviates that problem.

I wish I'd be free to share the fruits of my labor here, but I don't want to be banned ;)
NB: This is the core you want to assess input lag; try Oil Panic :P
Great to hear that! I was also able to convert all supported games. Scaling correctly takes time, though the real games weren't that precise either.

I don't know how AA is currently done, I'd personally just use supersampling. Not sure why the wrong graphics would get drawn with only AA pixels. The games that work well with AA look amazing though.
jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: Game & Watch Core

Unread post by jca »

Today: update to the core but sadly black screen for me (HDMI).
User avatar
NML32
Posts: 298
Joined: Sun May 24, 2020 6:57 pm
Has thanked: 301 times
Been thanked: 51 times

Re: Game & Watch Core

Unread post by NML32 »

jca wrote: Fri Jun 03, 2022 6:04 pm Today: update to the core but sadly black screen for me (HDMI).
On the Github page, there is a link to the ROMs.
https://github.com/MiSTer-devel/GnW_MiSTer
jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: Game & Watch Core

Unread post by jca »

I know and I got them before getting a black eye screen.
jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: Game & Watch Core

Unread post by jca »

I don't know what happened:
After this test I loaded other cores to see if it was not a MISTer problem where sometimes the screen get screwed (although it does not seems to happen any longer), tried again still with no luck. I still had a very old GnW in my Unofficial folder just to see, it gave me a very colorful messed up screen (no surprise), went back to the latest release and now the roms display properly. I no point did I reboot MISTer. Go figure!
Rawls
Posts: 6
Joined: Mon Aug 24, 2020 7:41 pm
Has thanked: 11 times
Been thanked: 1 time

Re: Game & Watch Core

Unread post by Rawls »

This core is fantastic, thanks so much.

It's great fun to play Tropical Fish. I'd love if someone could build Octopus, which is another of my favourites.
User avatar
jurkevicz
Posts: 34
Joined: Mon Jan 31, 2022 2:49 am
Has thanked: 27 times
Been thanked: 13 times

Re: Game & Watch Core

Unread post by jurkevicz »

Great News! I was really looking forward to this release.
User avatar
Alkadian
Top Contributor
Posts: 728
Joined: Thu May 28, 2020 9:55 am
Has thanked: 294 times
Been thanked: 119 times

Re: Game & Watch Core

Unread post by Alkadian »

Great news! Many thanks for this new fantastic core!
User avatar
pgimeno
Top Contributor
Posts: 710
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 277 times
Been thanked: 226 times

Re: Game & Watch Core

Unread post by pgimeno »

Thanks so much to pierco for this release!

I'm having some visual glitches in the DKjr screen, where the borders of some sprites are activated by a different sprite. Is that a problem with the .bin file?
User avatar
LamerDeluxe
Top Contributor
Posts: 1239
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 887 times
Been thanked: 284 times

Re: Game & Watch Core

Unread post by LamerDeluxe »

pgimeno wrote: Fri Jun 03, 2022 9:02 pm Thanks so much to pierco for this release!

I'm having some visual glitches in the DKjr screen, where the borders of some sprites are activated by a different sprite. Is that a problem with the .bin file?
It is a problem with the anti-aliasing functionality. When converting a game yourself, set the mask expansion value of the generator tool to zero to remove the anti-aliasing.

I've just submitted a pull request for the readme file, explaining how to convert games yourself.
User avatar
Waifu4Life
Posts: 271
Joined: Fri Jun 19, 2020 5:30 am
Has thanked: 21 times
Been thanked: 47 times

Re: Game & Watch Core

Unread post by Waifu4Life »

Nice, thanks!
pbsk8
Posts: 289
Joined: Mon Dec 28, 2020 4:23 pm
Has thanked: 75 times
Been thanked: 33 times

Re: Game & Watch Core

Unread post by pbsk8 »

NML32 wrote: Fri Jun 03, 2022 6:21 pm
jca wrote: Fri Jun 03, 2022 6:04 pm Today: update to the core but sadly black screen for me (HDMI).
On the Github page, there is a link to the ROMs.
https://github.com/MiSTer-devel/GnW_MiSTer
only those 10 games are supported by now? Or can I get more roms from mame romset?
Post Reply