Gameboy core

https://github.com/MiSTer-devel/Main_MiSTer/wiki

Moderators: Mug UK, Zorro 2, Greenious, spiny, Sorgelig, Moderator Team

djsquare
Atari User
Atari User
Posts: 31
Joined: Thu Oct 18, 2018 2:01 am

Re: Gameboy core

Postby djsquare » Tue May 21, 2019 6:18 pm

brNX wrote:Hi

heads-up for those that didn't see it, added a workaround to the README to enable analog out (15KHz) for now until a better solution is found/implemented
have fun.

https://github.com/MiSTer-devel/Gameboy ... /ReadMe.md

Cheers


Thank you very much for posting this. I'll try it first thing when I get home from work

Hewhoisred
Atari freak
Atari freak
Posts: 51
Joined: Sun Dec 09, 2018 6:53 pm

Re: Gameboy core

Postby Hewhoisred » Tue May 21, 2019 6:31 pm

One caveat, if you use the custom video mode for analog you won't have the usual HDMI+analog (dual video). HDMI will effectively be disabled for this core.

brNX
Atari maniac
Atari maniac
Posts: 84
Joined: Wed Oct 24, 2018 10:22 pm
Location: Coimbra/Portugal

Re: Gameboy core

Postby brNX » Tue May 21, 2019 7:48 pm

Hewhoisred wrote:One caveat, if you use the custom video mode for analog you won't have the usual HDMI+analog (dual video). HDMI will effectively be disabled for this core.


thanks , I forgot to mention that

djsquare
Atari User
Atari User
Posts: 31
Joined: Thu Oct 18, 2018 2:01 am

Re: Gameboy core

Postby djsquare » Wed May 22, 2019 2:46 am

Alright, the Gameboy core is pretty good looking in RGB but I still like the LCD_Effect filter for HDMI. It's kinda strange because I prefer RGB over HDMI for all cores that support it but with Gameboy, I'm not 100% sure. It's always nice to have options though.

brNX
Atari maniac
Atari maniac
Posts: 84
Joined: Wed Oct 24, 2018 10:22 pm
Location: Coimbra/Portugal

Re: Gameboy core

Postby brNX » Wed May 22, 2019 7:44 pm

djsquare wrote:Alright, the Gameboy core is pretty good looking in RGB but I still like the LCD_Effect filter for HDMI. It's kinda strange because I prefer RGB over HDMI for all cores that support it but with Gameboy, I'm not 100% sure. It's always nice to have options though.


yeah, I'm a big fan of the lcd_effect filter

PhantombrainM
Captain Atari
Captain Atari
Posts: 184
Joined: Fri Mar 16, 2018 9:10 am

Re: Gameboy core

Postby PhantombrainM » Wed May 22, 2019 8:16 pm

LCD Filter...by the way...

...the normal Gameboy has black borders in the dot matrix while the gbc has white lines.
There are filters for both systems but...

I'd like to have the filters stored for each system, so you don't have to set it again and again when changing between gc and gbc.

This would also help other cores for example SMS... when I'm running the sms games I'd like scanlines, but when I play Gamegear I'd like lcd effects. But unfortunatly its not saveable.

Just an idea or something I came across for several months now I wanted to share.
Two beer or not two beer? - Shakesbeer.

Dirtbag
Atari User
Atari User
Posts: 35
Joined: Sat Oct 06, 2018 9:26 pm

Re: Gameboy core

Postby Dirtbag » Thu May 23, 2019 6:38 am

PhantombrainM wrote:LCD Filter...by the way...

...the normal Gameboy has black borders in the dot matrix while the gbc has white lines.
There are filters for both systems but...

I'd like to have the filters stored for each system, so you don't have to set it again and again when changing between gc and gbc.

This would also help other cores for example SMS... when I'm running the sms games I'd like scanlines, but when I play Gamegear I'd like lcd effects. But unfortunatly its not saveable.

Just an idea or something I came across for several months now I wanted to share.


Didn't the game gear use a CRT not a LCD?

ReedSolomon
Atari User
Atari User
Posts: 34
Joined: Tue Oct 09, 2018 1:52 am

Re: Gameboy core

Postby ReedSolomon » Thu May 23, 2019 7:05 am

Dirtbag wrote:Didn't the game gear use a CRT not a LCD?


No

reelbigeddy
Atarian
Atarian
Posts: 2
Joined: Sat Apr 20, 2019 1:26 am

Re: Gameboy core

Postby reelbigeddy » Mon Jun 03, 2019 4:38 pm

Can't seem to get any GBC roms running on the core. Game Boy roms are hit and miss, but usually work after a reset - no such luck with GBC.
Anything obvious I might be missing?

EDIT: For anyone else as dense as me, boot1.rom wasn't in the Gameboy folder. I knew it would be something obvious.

PhantombrainM
Captain Atari
Captain Atari
Posts: 184
Joined: Fri Mar 16, 2018 9:10 am

Re: Gameboy core

Postby PhantombrainM » Sat Jun 08, 2019 8:33 pm

brNX wrote:


@brNX: Your latest changes fix Super Mario Land 6 Golden Coins DX. Now Mario has finally two eyes! Thank you :)

Are in interested in bug reports by the way? I'm sorting some games and found 2 broken games:

1) Initial D Gaiden (Japan) (SGB Enhanced).gb -> Press Start (3x) -> Game hangs up. In Emulator its only possible to press 2x start. The third time there is an error sound and the menu is not selectable. I think this is why it hangs up on FPGA because it should not be selectable directly.

2) 4x4 World Trophy (Europe) (En,Fr,De,Es,It).gbc -> only white screen. The two splash screens and the language selection screen is missing.

If you are interested I'll check some games and make a list. If there is already enough to do and it's not important for you its also okay. :cheers:
Two beer or not two beer? - Shakesbeer.

brNX
Atari maniac
Atari maniac
Posts: 84
Joined: Wed Oct 24, 2018 10:22 pm
Location: Coimbra/Portugal

Re: Gameboy core

Postby brNX » Sat Jun 08, 2019 11:48 pm

PhantombrainM wrote:
brNX wrote:


@brNX: Your latest changes fix Super Mario Land 6 Golden Coins DX. Now Mario has finally two eyes! Thank you :)



Yeah finally caught that one, most GBC sprite glitches should be gone now hopefully.

Feel free to add them here and tag me or better yet add them to the github issues, I have a known list there that I try to keep updated.

I will work on the PPU next and try fix the remaining display bugs (hopefully once and for all), I took some time to work on tools to help me in simulation and will try to expand those now, they've been really helpful.

:cheers:

slingshot
Atari God
Atari God
Posts: 1150
Joined: Mon Aug 06, 2018 3:05 pm

Re: Gameboy core

Postby slingshot » Fri Jul 05, 2019 10:30 am

@brNX: I've tried the latest "GB games in GBC mode fix" change on MiST, assuming it should fix missing sprites in GBC mode for GB games. However in Xenon2 (again) it doesn't make a difference. Maybe I did something wrong, or the purpose of this patch was something else?

brNX
Atari maniac
Atari maniac
Posts: 84
Joined: Wed Oct 24, 2018 10:22 pm
Location: Coimbra/Portugal

Re: Gameboy core

Postby brNX » Fri Jul 05, 2019 12:36 pm

slingshot wrote:@brNX: I've tried the latest "GB games in GBC mode fix" change on MiST, assuming it should fix missing sprites in GBC mode for GB games. However in Xenon2 (again) it doesn't make a difference. Maybe I did something wrong, or the purpose of this patch was something else?


Sorry I may have missed something while implementing that, is xenon 2 buggy again? The fix was about the color palettes (you can check the screenshots here: https://github.com/MiSTer-devel/Gameboy ... /issues/45). Thanks for reporting I'll have a look tomorrow.

slingshot
Atari God
Atari God
Posts: 1150
Joined: Mon Aug 06, 2018 3:05 pm

Re: Gameboy core

Postby slingshot » Fri Jul 05, 2019 1:22 pm

brNX wrote:Sorry I may have missed something while implementing that, is xenon 2 buggy again? The fix was about the color palettes (you can check the screenshots here: https://github.com/MiSTer-devel/Gameboy ... /issues/45). Thanks for reporting I'll have a look tomorrow.


Not again, because it still OK in monochrome mode. But in forced color mode (look nice), the same old sprites are still missing. It's definitely not a palette issue.

brNX
Atari maniac
Atari maniac
Posts: 84
Joined: Wed Oct 24, 2018 10:22 pm
Location: Coimbra/Portugal

Re: Gameboy core

Postby brNX » Fri Jul 05, 2019 1:51 pm

slingshot wrote:Not again, because it still OK in monochrome mode. But in forced color mode (look nice), the same old sprites are still missing. It's definitely not a palette issue.


It's possibly triggering the incorrect flags ("isGBC_game") and leaves the GBC logic working (2nd vram bank, etc...), just like the regression I had in the GB mode in the past.

I'll test it out when I can (at work at the moment :lol: )

slingshot
Atari God
Atari God
Posts: 1150
Joined: Mon Aug 06, 2018 3:05 pm

Re: Gameboy core

Postby slingshot » Fri Jul 05, 2019 2:40 pm

brNX wrote:It's possibly triggering the incorrect flags ("isGBC_game") and leaves the GBC logic working (2nd vram bank, etc...), just like the regression I had in the GB mode in the past.

I'll test it out when I can (at work at the moment :lol: )

I can wait of course, thanks in advance!

slingshot
Atari God
Atari God
Posts: 1150
Joined: Mon Aug 06, 2018 3:05 pm

Re: Gameboy core

Postby slingshot » Sat Jul 06, 2019 9:46 am

brNX wrote:
It's possibly triggering the incorrect flags ("isGBC_game") and leaves the GBC logic working (2nd vram bank, etc...), just like the regression I had in the GB mode in the past.


I have no idea if it's fully correct or not, but this one fixes at least Xenon2:

Code: Select all

--- a/cores/gameboy/video.v
+++ b/cores/gameboy/video.v
@@ -97,7 +97,7 @@ sprites sprites (
        .addr     ( sprite_addr                 ),
        .dvalid   ( sprite_dvalid               ),
        .data     ( vram_data                   ),
-       .data1    ( isGBC?vram1_data:vram_data  ),
+       .data1    ( isGBC&&isGBC_game?vram1_data:vram_data  ),
 
        //gbc
        .pixel_cmap_gbc ( sprite_pixel_cmap_gbc ),

brNX
Atari maniac
Atari maniac
Posts: 84
Joined: Wed Oct 24, 2018 10:22 pm
Location: Coimbra/Portugal

Re: Gameboy core

Postby brNX » Sat Jul 06, 2019 11:49 am

slingshot wrote:
brNX wrote:
It's possibly triggering the incorrect flags ("isGBC_game") and leaves the GBC logic working (2nd vram bank, etc...), just like the regression I had in the GB mode in the past.


I have no idea if it's fully correct or not, but this one fixes at least Xenon2:

Code: Select all

--- a/cores/gameboy/video.v
+++ b/cores/gameboy/video.v
@@ -97,7 +97,7 @@ sprites sprites (
        .addr     ( sprite_addr                 ),
        .dvalid   ( sprite_dvalid               ),
        .data     ( vram_data                   ),
-       .data1    ( isGBC?vram1_data:vram_data  ),
+       .data1    ( isGBC&&isGBC_game?vram1_data:vram_data  ),
 
        //gbc
        .pixel_cmap_gbc ( sprite_pixel_cmap_gbc ),


I'm having a look in a minute , it's weird , that one shouldn't be needed because the logic GBC should be off in video.v but I maybe missed something, can I have a look at your code?
edit: yeah I can reproduce it here too, the fix you posted should do it

brNX
Atari maniac
Atari maniac
Posts: 84
Joined: Wed Oct 24, 2018 10:22 pm
Location: Coimbra/Portugal

Re: Gameboy core

Postby brNX » Sat Jul 06, 2019 11:57 am

@slingshot

ok , got it , yes I missed this part in the sprite.v https://github.com/MiSTer-devel/Gameboy ... rite.v#L62

Thanks a lot for reporting , guess Xenon 2 sets those bits for whatever reason.

edit: will also rename it to isGBC_game in sprites.v and sprite.v
edit2: PR sent https://github.com/MiSTer-devel/Gameboy_MiSTer/pull/53

Gamepimp
Atariator
Atariator
Posts: 24
Joined: Fri Nov 09, 2018 2:59 pm

Re: Gameboy core

Postby Gamepimp » Sat Jul 06, 2019 5:24 pm

I have a Sony CRT TV that takes 480p over component. I added the code below to my config file and was able to get the Gameboy core to display (very awesome btw :cheers:). Because the image size is set to 320x240, it creates a small window in the center of the TV. I thought I might be able to change the size of the window by modifying the video mode to 640,8,32,24,480,4,3,16,6048. That did increase the size of the window, but it was off center and the output seemed a bit choppy. I'm not all that familiar with the attributes expressed in that string. Are there other values that I can modify to resize the window appropriately? Also, I've been using the internal scaler for all other cores as this tends to give the best image on the TV. It looks like the code enables the VGA scaler for this core. However, none of the filters seem to work. I wanted to add scanlines to the GB games because my TV is considered "hi def" and doesn't really have them. Any ideas on how I might pull that off?

Code: Select all

[Gameboy]
video_mode=320,8,32,24,240,4,3,16,6048
vga_scaler=1
vsync_adjust=2
vscale_mode=1

brNX
Atari maniac
Atari maniac
Posts: 84
Joined: Wed Oct 24, 2018 10:22 pm
Location: Coimbra/Portugal

Re: Gameboy core

Postby brNX » Sat Jul 06, 2019 6:24 pm

Gamepimp wrote:I have a Sony CRT TV that takes 480p over component. I added the code below to my config file and was able to get the Gameboy core to display (very awesome btw :cheers:). Because the image size is set to 320x240, it creates a small window in the center of the TV. I thought I might be able to change the size of the window by modifying the video mode to 640,8,32,24,480,4,3,16,6048. That did increase the size of the window, but it was off center and the output seemed a bit choppy. I'm not all that familiar with the attributes expressed in that string. Are there other values that I can modify to resize the window appropriately? Also, I've been using the internal scaler for all other cores as this tends to give the best image on the TV. It looks like the code enables the VGA scaler for this core. However, none of the filters seem to work. I wanted to add scanlines to the GB games because my TV is considered "hi def" and doesn't really have them. Any ideas on how I might pull that off?

Code: Select all

[Gameboy]
video_mode=320,8,32,24,240,4,3,16,6048
vga_scaler=1
vsync_adjust=2
vscale_mode=1


you can probably try to set vscale_mode = 0 that should fill the screen , the problem is that it's not a good fit (scale 160x144 to 320x240), regarding the video_mode there are some calculators around the internet that can help you with, I'm not that familiar with it sorry.

slingshot
Atari God
Atari God
Posts: 1150
Joined: Mon Aug 06, 2018 3:05 pm

Re: Gameboy core

Postby slingshot » Sat Jul 06, 2019 7:45 pm



Works well, thank you!

BlockABoots
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 138
Joined: Sat Oct 20, 2018 3:20 pm

Re: Gameboy core

Postby BlockABoots » Sat Sep 28, 2019 12:22 pm

Whats happened to the LCD_effect filter, they used to look really good havent played the core for a good few months and none of the LCD Filters look reminiscent of the GB screen anymore?

Threepwood
Atari freak
Atari freak
Posts: 63
Joined: Thu Jan 10, 2019 10:06 am

Re: Gameboy core

Postby Threepwood » Sat Sep 28, 2019 12:42 pm

BlockABoots wrote:Whats happened to the LCD_effect filter, they used to look really good havent played the core for a good few months and none of the LCD Filters look reminiscent of the GB screen anymore?


I noticed this, too, yesterday. It looks like the lines are being duplicated a few times and blurred. They looked way better before.


Return to “MiSTer”

Who is online

Users browsing this forum: apolkosnik and 5 guests

cron