Editor, Experienced Forum User, Published Author, Expert player
(3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Fixed:
-Link's Awakening
-Super Hunchback
-Altered Space
Remaining:
-PinBall Fantasies
-Teen Jeopardy
-Kirby's Dreamland / HAL Wrestling (Same bug i believe)
-Prehistoric Man intro audio
-Beast Fighter
Tests:
-naughtyemu
-dycptest2
- hblank_ly_scx_timing-GS
- intr_2_mode0_timing_sprites
If anyone is aware of any other bugs please let me know.
Editor, Experienced Forum User, Published Author, Expert player
(3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Of course. Overall the gameboy hardware seems less tempermental then NES, so my hope here is that this work can lead to many more console verifications.
Which leads me to the first real roadblock in the development process. I've been working on the test rom hblank_ly_scx_timing-GS. This test rom tests the timing of HBlank interrupts in the presence of x-scroll. The test itself is not that challenging, mainly because I built the core already knowing that I would need to pass it, so I planned out the architecture ahead of time.
Unfortunately, when it came time to actually run it, it failed.
It turns out I needed to add 2 clock ticks delay to the interrupt firing to get it to pass. This seems unnatural, and I'm not aware of any reason why it should be true. Furthermore, the test dycptest2 indicates that some combination of write timing and ppu latching is off by 3 clock ticks.
Since timings in the gameboy usually occur in multiples of 4, values of 2 and 3 are difficult to resolve. So, it seems I still have a long way to go here.
Editor, Experienced Forum User, Published Author, Expert player
(3602)
Joined: 11/30/2014
Posts: 2752
Location: US
This is a fascinating challenge. I wonder if any academic type of work has been done on anything like this. It seems relatively easy to speculate on what strategies might be best suited to win quickly (like samurai goroh has) but I can't think of an easy to determine what game is the fastest possible.
Good luck at any rate Warp.
Editor, Experienced Forum User, Published Author, Expert player
(3602)
Joined: 11/30/2014
Posts: 2752
Location: US
1,3,4:
I remember seeing something about how Korean stuff is unique, but I haven't gotten a chance to really study it.
That and the BIOS stuff I will sort out at some point. They aren't high priority but I'll keep it on my todo list.
2:
Man, this one was tough to track down. Subtly wrong savestate bugs like this are always a headache. It's fixed now though, make sure to clear out your greenzones after getting the dev build.
Editor, Experienced Forum User, Published Author, Expert player
(3602)
Joined: 11/30/2014
Posts: 2752
Location: US
I found the problem. I allocated 4 bytes for four int sized values 8D
The goal for this emulator is accuracy, so yeah if / when I get around to CGB I'll be trying for enough accuracy so runs will sync on hardware. I'd want to get accurate enough so MrWint's pokemon ACE runs on real hardware honestly.
Editor, Experienced Forum User, Published Author, Expert player
(3602)
Joined: 11/30/2014
Posts: 2752
Location: US
I have restored the operation of the GPU Viewer for GBHawk, Gambatte, and Sameboy, which seems to have gotten broken somewhere around 2.0.
There's some kind of memory leak in it though. I haven't found a 100% consistent way to replicate it but it crashes with a corrupted heap error sometimes after switching between cores, so, that's bad.
If I can get that sorted out this will be another helpful tool in diagnosing the remaining graphical glitches. Anyone have any tips on how to track down memory management errors?
Editor, Experienced Forum User, Published Author, Expert player
(3602)
Joined: 11/30/2014
Posts: 2752
Location: US
The audio and frame difference issues are due to gambatte using 'use equal length frames' by default.
The Gameboy can have 'frames' (time bewteen VBLanks) that are arbitrarily long since it's not locked to a video standard like normal consoles. When these types of frames happen, typically during loading, BizHawk doesn't know how much longer a frame was then a normal frame, so it just plays the audio like it was 1 normal frame, cutting off notes and speeding things up.
Typically for TASing though you want frames that always start / end on VBlank since that leads to consistent input timing.
So, it's a trade off. Right now GBHawk only has VBlank based frames for ease of testing, so those issues won't be immediately fixed. It kind of sucks, but BizHawk doesn't have a good way to deal with it that I know of.
Editor, Experienced Forum User, Published Author, Expert player
(3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Ok, I finally found the Fix for Roger Rabbit. That game uses every available cycle for drawing and didn't leave enough time to restore access to VRAM.
Anyway, with that here is the list of issues I am currently aware of. Let me know if I need to add anything:
- Link's Awakening title effect
- Super Hunchback title effect
- Altered Space excess sprites
- Beast Fighter, no status bar (it expects window tile location to be at the bottom of the screen even though it wasn't turned on, not sure if it even works on hardware.)
Tests failed:
- hblank_ly_scx_timing-GS
- intr_2_mode0_timing_sprites
I think that's it. Making a lot of progress. Now the hard part starts figuring out those last 2 tests. (I also fail the OAM bug test, but since I don't know the corruption pattern I can't really implement it, the tests only do a checksum. Needs hardware testing.)
Editor, Experienced Forum User, Published Author, Expert player
(3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Tastyfish has implmented the keyboard. So, this and several other games needing the keyboard can now be played.
Tastyfish has also implemented several other features for the SMS/GG core recently including lightgun for anyone who might be interested in trying these out.
Editor, Experienced Forum User, Published Author, Expert player
(3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Fixed, thanks for the report. (Although I was certain I remembered accounting for this already. Maybe I only thought about doing it but never did it?) 0_0
Editor, Experienced Forum User, Published Author, Expert player
(3602)
Joined: 11/30/2014
Posts: 2752
Location: US
- The core picker is in Config->Cores only at the moment
- I dont even know where to look for the gamepad config 8D
- For now it's GB only. When GB is close to 100% maybe I'll upgrade to GBC. A lot of the trickier stuff still remains to be done.
I just implemented MBC3, so Pokemon Red and Blue should now be playable.
Editor, Experienced Forum User, Published Author, Expert player
(3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Thanks for the continued (and detailed) testing.
Yeah many of the remaining bugs are ppu timing glitches. I'll have to look at Samurai showdown though.
Actually I was bored of staring at trace logs so I decided to implement the first unlicensed mapper, Sachen MMC2 (as defined by tauwasser): https://web.archive.org/web/20170803195356/https://wiki.tauwasser.eu/view/Sachen_Mappers
This makes Beast Fighter work (although the status bar is broken at the moment.)
So, I'll be implementing unlicensed stuff as I have the motivation and can find info about the mapper.
If anyone has a specific unlicensed game they want implemented (I know there were a few in the first page) it would greatly speed up implementation if you could link to a mapper spec.
EDIT:
Fixed:
Lawnmower Man
Samurai Showdown
Th Final Fantasy legend
EDIT2:
Fixed: Audio squeel, zerd no densetsu, X (proto), GOAL!
Editor, Experienced Forum User, Published Author, Expert player
(3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Lot's of new fixes just committed.
Fixed: Malibu Beach Volleyball, Castle Quest, Double Dragon 3, F1 pole poisition.
Working on: Goal!, Roger Rabbit, The Final Fantasy Legend
As usual, games are using all kinds of different tricks to do things, so I'm getting a lot of good test cases out of all of this.
Editor, Experienced Forum User, Published Author, Expert player
(3602)
Joined: 11/30/2014
Posts: 2752
Location: US
I committed another round of updates that fixes Wario Blast as well as Bomberman and mortal kombat.
Malibu Beach Volleyball looks interesting, thanks for pointing that out, might provide a hint for Roger Rabbit as well.
Link's awakening is probably a PPU timing bug that will have to wait all the basics are done and I can focus on the minute details.
Editor, Experienced Forum User, Published Author, Expert player
(3602)
Joined: 11/30/2014
Posts: 2752
Location: US
I guess they don't like emulators! The game expects to be unable to read RAM during DMA. I had the rough outlines of this implemented, but now it's implemented completely so the game runs.
I'll think about adding that option later once most of the main GB bugs are stomped out.
I thought I took that out, but listening to it again I do still hear a faint high pitched buzz. I'll look into it.
Editor, Experienced Forum User, Published Author, Expert player
(3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Metroid 2 - Fixed
Mario Land - Fixed
Transitions (HAL Wrestling, etc.) - Fixed
Roger Rabbit - Don't know yet, it's just MBC 1
Pokemon - Needs MBC3 with RTC, not implemented yet.
Other things I noticed:
Bomberman: Can't select mode
Mortal Kombat: Freezes
Bomberman 2: Can't move right/left
Making progress!
Editor, Experienced Forum User, Published Author, Expert player
(3602)
Joined: 11/30/2014
Posts: 2752
Location: US
The test ROMs only test things can be measured in the APU registers. There are a lot of other behaviours that aren't testable. You basically just have to play games and track down the bugs until it sounds right.
The coin bug was pretty simple. The screeching sound in Barbie is trickier. The game is setting frequency as high as possible. Presumably this gets filtered out somewhere along the way. Gambatte appears to be cheating and just setting volume to zero for these high frequencies. Normally they wouldn't even be audbile, but since the ouput is only sampled every so often, they get aliased down into the audible range. So that kind of sucks. I'll have to add in some checks to keep that from happening.
Thanks for the continued testing everyone. I see that Samus is missing in Metroid 2, but I don't see the bugs fsvgm777 describes in mario Land 2. Is that in level 1-1 or some other level?
Editor, Experienced Forum User, Published Author, Expert player
(3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Fixed the controllers, sloppy mistake by me there.
Fixed audio desync in kwirk.
Removed all BIOS code from Gambatte entirely, so I'm really hoping that fixes any random crashes.
I'll try and track down those audio bugs next (and adjust the volume, which is really just multplying the output by a larger number.)
Not sure about SGB support, it would be really nice, but the parts that need to use snes hardware would be tricky.
EDIT: Audio fixed, I think, I increased the volume too.
EDIT2: Actually I noticed the coin sound in mario land 2 is way off, I'll try to fix that next.
Editor, Experienced Forum User, Published Author, Expert player
(3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Dang still crashes? That's annoying.
I think I'll have to burn down all my Gambatte changes (they aren't relevent at this point anyway.)
That will teach me to try to modify code that I only vaguely understand.
Editor, Experienced Forum User, Published Author, Expert player
(3602)
Joined: 11/30/2014
Posts: 2752
Location: US
Thanks for the testing. Yeah any reports are helpful, don't assume I know anything! 8D
I fixed the BIOS and controller initialization issues.
Hmmm, I'll have to look into those audio issues, the test ROM tested everything except the volume envelope pretty thoroughly, so maybe I messed up something there.