Gameboy core
Gameboy core
Hello,
I create a topic for the Mister Gameboy core as it seems there is only the original one for Mist.
Sorgelig released a new version today that is much improved compared to the one of March.
With the version of March I had tested 3 games:
Tetris: seemed OK
Super Mario Land: could only play the first 2-3 levels before the core would reset
Gargoyle's Quest: would only play the intro, not playable
Blargg's tests: no test would pass
Today's version:
Super Mario Land: no longer resets after a few levels
Gargoyle's Quest: playable
Blargg's tests: 12 tests pass
I have put the results for Blargg's tests there: http://emulation.gametechwiki.com/index.php/GB/C_Tests
Thanks to brNX and sorgelig for the work on this core.
I create a topic for the Mister Gameboy core as it seems there is only the original one for Mist.
Sorgelig released a new version today that is much improved compared to the one of March.
With the version of March I had tested 3 games:
Tetris: seemed OK
Super Mario Land: could only play the first 2-3 levels before the core would reset
Gargoyle's Quest: would only play the intro, not playable
Blargg's tests: no test would pass
Today's version:
Super Mario Land: no longer resets after a few levels
Gargoyle's Quest: playable
Blargg's tests: 12 tests pass
I have put the results for Blargg's tests there: http://emulation.gametechwiki.com/index.php/GB/C_Tests
Thanks to brNX and sorgelig for the work on this core.
Re: Mister Gameboy core
Hi,
you're welcome.
Most of the games I tested now go in-game and the majority of those are playable.
There are still some video and audio issues to iron out (e.g., final fantasy legend 1 and 2 , mario picross and micro machines have corrupted graphics ).
Cheers
you're welcome.
Most of the games I tested now go in-game and the majority of those are playable.
There are still some video and audio issues to iron out (e.g., final fantasy legend 1 and 2 , mario picross and micro machines have corrupted graphics ).
Cheers
Re: Mister Gameboy core
R-Type doesn't mute the sound between stages or when you restart.
-
- Obsessive compulsive Atari behavior
- Posts: 143
- Joined: Sat Oct 20, 2018 3:20 pm
Re: Mister Gameboy core
Have noticed the audio in Double Dragon 2 and Super Hunchback doesnt sound correct, the pitch seems to alternating and sounds odd
Last edited by BlockABoots on Mon Nov 19, 2018 4:01 pm, edited 1 time in total.
Re: Mister Gameboy core
Just tested it on BGB, a chime is also missing before muting the sound when pausing the game. Will investigate.Sorgelig wrote:R-Type doesn't mute the sound between stages or when you restart.
Re: Mister Gameboy core
Actually it's not only in pauses. Anywhere in R-Type where music is supposed to be muted, it sounds the last note.
Re: Mister Gameboy core
I noticed GB runs at 36khz rather than 15khz, like line doubling is always on. Is this intentional?
Re: Mister Gameboy core
Ok, found where this was happening , the original author of the sound code assumed that the 2 square wave channels only changed registers before the channels where triggered,so the volume register was stuck at the last value, this is wrong you can change any register at any given time. I fixed the looping sound but still haven't figured out why the "chime" isn't playing.Sorgelig wrote:Actually it's not only in pauses. Anywhere in R-Type where music is supposed to be muted, it sounds the last note.
I will read up on the sound channels/generators and try to fix a few more things before submitting a PR.
It probably came from the original code, maybe @Sorgelig can elaborate on that.kitrinx wrote:I noticed GB runs at 36khz rather than 15khz, like line doubling is always on. Is this intentional?
Re: Mister Gameboy core
this is from original Gameboy core. This is not TV console so basically it's not exactly must have TV compatible frequencies.kitrinx wrote:I noticed GB runs at 36khz rather than 15khz, like line doubling is always on. Is this intentional?
Probably original author made it as VGA 800x600 core.
Re: Mister Gameboy core
According to info i found the Horizontal freq of original Gameboy is about 9.6KHz. It's not compatible with TV standard. Even being multiplied twice, you will get something like 19KHz and still not compatible with TV.
So, the core has 4x of original horizontal freq and about VGA compatible.
So, the core has 4x of original horizontal freq and about VGA compatible.
Re: Mister Gameboy core
PR sent with Audio Fixes , the length counter stop conditions were wrong, this should fix a lot of looping sound issues. Parodius' sound for instance went from totally annoying to "ok" sounding
.
I've been using Blargg's test roms to debug the APU, the first 2 tests now pass but I am stuck at 03, if someone has knowledge about those tests, especially test 2 and 3 of 03-trigger.gb, I would be grateful if they could explain it here.
The Noise channel (4) is still often "wrong", I think the LFSR is being mistakenly switched to the 7 bit mode (the ocean waves of legend of zelda's intro sound too "metallic").
I implemented a dummy serial port that always returns "not connected" and triggers the interrupt, this fixes Alleyway and probably other games too.
Final Fantasy Legends 1 and 2 seem to be fixed after I changed the LY==LYC interrupt to trigger earlier, Mario's Picross is now also playable, but it still has some minor graphical issues (probably timing related).
Cheers

I've been using Blargg's test roms to debug the APU, the first 2 tests now pass but I am stuck at 03, if someone has knowledge about those tests, especially test 2 and 3 of 03-trigger.gb, I would be grateful if they could explain it here.
The Noise channel (4) is still often "wrong", I think the LFSR is being mistakenly switched to the 7 bit mode (the ocean waves of legend of zelda's intro sound too "metallic").
I implemented a dummy serial port that always returns "not connected" and triggers the interrupt, this fixes Alleyway and probably other games too.
Final Fantasy Legends 1 and 2 seem to be fixed after I changed the LY==LYC interrupt to trigger earlier, Mario's Picross is now also playable, but it still has some minor graphical issues (probably timing related).
Cheers
Re: Mister Gameboy core
Hello,
I have 16 entities not defined when trying to compile the core.
I just open Gameboy.qpf and compile.
Is there something one has to configure before attempting to compile?
Thanks
I have 16 entities not defined when trying to compile the core.
I just open Gameboy.qpf and compile.
Is there something one has to configure before attempting to compile?
Thanks
Re: Mister Gameboy core
Hi,
yup that should be it, did you install the Cyclone V Device Support?
yup that should be it, did you install the Cyclone V Device Support?
Re: Mister Gameboy core
Yes I have installed Cyclone V support.
I think I had a path issue, I had cloned the repository in a sub sub sub directory.
When putting the repo under /git I can compile.
Thanks
I think I had a path issue, I had cloned the repository in a sub sub sub directory.
When putting the repo under /git I can compile.
Thanks
Re: Mister Gameboy core
Regarding tests 2 and 3 of 03-trigger.gb I have had a look at the source and here is my understanding of the test.
The length counter does not decrement if the wave channel is triggered after about half of length period.
Length period is 4194304/256Hz = 16384
Half length period is = 16384/2 = 8192 clocks
test 2 sets a length of 2 and delays by 8256 clocks (a little bit after half length period) before triggering, length is initially at 2 and stays at 2 after the trigger (I guess he loads the expected value in a).
test 3 sets a length of 2 and delays by 7900 clocks (a little bit before half length period) before triggering, length is initially at 2 but decrements to 1 after the trigger (again I guess a is the expected value here).
test_chan:
set_test 2,"Enabling in second half of length period ","shouldn't clock length"
call begin
wchn 1,-2 ; length = 2
delay_clocks 8256 ; delay until beginning of second half of length period
wchn 4,$40 ; enable
ld a,2
call end_nodelay
set_test 3,"Enabling in first half of length period should clock length"
call begin
wchn 1,-2 ; length = 2
delay_clocks 7900 ; delay until near-end of first half of length period
wchn 4,$40 ; enable
ld a,1
call end_nodelay
The length counter does not decrement if the wave channel is triggered after about half of length period.
Length period is 4194304/256Hz = 16384
Half length period is = 16384/2 = 8192 clocks
test 2 sets a length of 2 and delays by 8256 clocks (a little bit after half length period) before triggering, length is initially at 2 and stays at 2 after the trigger (I guess he loads the expected value in a).
test 3 sets a length of 2 and delays by 7900 clocks (a little bit before half length period) before triggering, length is initially at 2 but decrements to 1 after the trigger (again I guess a is the expected value here).
test_chan:
set_test 2,"Enabling in second half of length period ","shouldn't clock length"
call begin
wchn 1,-2 ; length = 2
delay_clocks 8256 ; delay until beginning of second half of length period
wchn 4,$40 ; enable
ld a,2
call end_nodelay
set_test 3,"Enabling in first half of length period should clock length"
call begin
wchn 1,-2 ; length = 2
delay_clocks 7900 ; delay until near-end of first half of length period
wchn 4,$40 ; enable
ld a,1
call end_nodelay
Re: Mister Gameboy core
Hi
thx @widge, should have probably posted here that meanwhile I understood those tests.
My latest PR passes most of Blargg's Sound tests and fixes issues with the noise channel and the channel 1 sweep unit (square 1), among other improvements we finally have "waves" in the Legend of Zelda intro, Mega man's "drums" sound good and the "pew pew"
sound works in Solar Striker.
The APU still needs some bug catching, when pausing R-type the "chime" (channel 1) still doesn't ring and in some games the square and wave channels sometimes sounds off.
Cheers
thx @widge, should have probably posted here that meanwhile I understood those tests.
My latest PR passes most of Blargg's Sound tests and fixes issues with the noise channel and the channel 1 sweep unit (square 1), among other improvements we finally have "waves" in the Legend of Zelda intro, Mega man's "drums" sound good and the "pew pew"

The APU still needs some bug catching, when pausing R-type the "chime" (channel 1) still doesn't ring and in some games the square and wave channels sometimes sounds off.
Cheers
Re: Mister Gameboy core
Good news, the core is definitely going in the right direction 

Re: Mister Gameboy core
Yeah! I'm happy this core development is caught by brNX.
Re: Mister Gameboy core
Hi
PR sent with fixes for the last couple of issues, it should fix most of the pitch related issues and the missing sounds.
R-Type finally has the missing chime while entering the pause screen and the shooting sound sounds correct, the sound while catching a mushroom or another power-up in Super Mario Land 2 sound correctly now, likewise when catching the coins.
@BlockABoots I also tested Double dragon 2 and super hunchback and I think they now sound correct.
The APU should now be more or less complete, I still hear a few rare crackling sound issues in some games (Gargoyle's Quest and Batman) but this problem could come from elsewhere.
Cheers
PR sent with fixes for the last couple of issues, it should fix most of the pitch related issues and the missing sounds.
R-Type finally has the missing chime while entering the pause screen and the shooting sound sounds correct, the sound while catching a mushroom or another power-up in Super Mario Land 2 sound correctly now, likewise when catching the coins.
@BlockABoots I also tested Double dragon 2 and super hunchback and I think they now sound correct.
The APU should now be more or less complete, I still hear a few rare crackling sound issues in some games (Gargoyle's Quest and Batman) but this problem could come from elsewhere.
Cheers
Re: Mister Gameboy core
Hi .
I have problems with the image in the last release ( 20181130) ,the image begins to blink randomly, sometimes it recovers alone and sometimes it does not.
Even sometimes it starts blinking just at load the core ,whitout load any game
I have problems with the image in the last release ( 20181130) ,the image begins to blink randomly, sometimes it recovers alone and sometimes it does not.
Even sometimes it starts blinking just at load the core ,whitout load any game
- remowilliams
- Captain Atari
- Posts: 256
- Joined: Mon Apr 02, 2007 1:49 am
Re: Mister Gameboy core
I have observed the same blinking video (HDMI/vsync_adjust=1) in Gameboy_20181130. Running SMW it was blinking randomly every few seconds or so, entering the first tunnel and remaining there for a bit caused the blinking to go absolutely stroboscopic. This is not occurring in Gameboy_20181118.
Re: Mister Gameboy core
I confirm the stroboscopic effect on this new release.
Re: Mister Gameboy core
Hi guys
I can confirm I have the same issue from the begining actually,
I am compiling the master branch from git right now to see if it is a problem on my end.
It is weird because the video code wasn't changed between versions.
I can confirm I have the same issue from the begining actually,
I am compiling the master branch from git right now to see if it is a problem on my end.
It is weird because the video code wasn't changed between versions.
Re: Mister Gameboy core
Yup, compiled the time limited version using the "full" scaler, looks ok on my end.
Sorgelig can you please check what's going on on your side when you have the time, maybe a corrupt file while uploading ?
Sorgelig can you please check what's going on on your side when you have the time, maybe a corrupt file while uploading ?
Re: Mister Gameboy core
Probably this core got metastability issue. It's probably not good design of video part.
This problem may appear and disappear between builds even if only unrelated to video code had been changed.
I've just applied PR from Kitrinx providing more palettes.
I will compile it and will see if this build will be better.
Bay anyway, video part most likely need to be improved to provide more stable video.
This problem may appear and disappear between builds even if only unrelated to video code had been changed.
I've just applied PR from Kitrinx providing more palettes.
I will compile it and will see if this build will be better.
Bay anyway, video part most likely need to be improved to provide more stable video.