1 2 3 4 5
19 20
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3809)
Joined: 11/30/2014
Posts: 2828
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?
Active player (261)
Joined: 12/13/2016
Posts: 352
One request for much later next year when you are looking at GBC. Can you try and get whatever improvements were made in https://github.com/Dabomstew/gambatte-speedrun available so that we can get console syncing Pokemon Gen 1 (maybe even gen 2) runs?
creaothceann
He/Him
Editor
Joined: 4/7/2005
Posts: 1874
Location: Germany
Alyosha wrote:
Anyone have any tips on how to track down memory management errors?
This was the only thing that helped me.
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3809)
Joined: 11/30/2014
Posts: 2828
Location: US
I found the problem. I allocated 4 bytes for four int sized values 8D
ruadath wrote:
One request for much later next year when you are looking at GBC. Can you try and get whatever improvements were made in https://github.com/Dabomstew/gambatte-speedrun available so that we can get console syncing Pokemon Gen 1 (maybe even gen 2) runs?
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.
Site Admin, Skilled player (1250)
Joined: 4/17/2010
Posts: 11475
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
Unless accuracy becomes what makes them desync, right?
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Fortranm
He/Him
Editor, Experienced player (878)
Joined: 10/19/2013
Posts: 1121
Added a fadeout upon hard reset to imitate the behavior of the Gameboy Player and Gameboy Interface software.
I doubt if this feature is considered "improvement". :P
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3809)
Joined: 11/30/2014
Posts: 2828
Location: US
feos wrote:
Unless accuracy becomes what makes them desync, right?
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.
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3809)
Joined: 11/30/2014
Posts: 2828
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, Reviewer, Skilled player (1353)
Joined: 9/12/2016
Posts: 1646
Location: Italy
What about input support for Kirby Tilt 'n' Tumble?
my personal page - my YouTube channel - my GitHub - my Discord: thunderaxe31 <Masterjun> if you look at the "NES" in a weird angle, it actually clearly says "GBA"
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3809)
Joined: 11/30/2014
Posts: 2828
Location: US
ThunderAxe31 wrote:
What about input support for Kirby Tilt 'n' Tumble?
That will be something that is added with color gameboy support. EDIT: Thanks to Shonumi on NesDev for pointing me in the right direction, garbled screens on Kirby and Wrestling are now fixed. EDIT2: I also fixed Teen Jeopardy and Prehistoric Man music. Remaining: -Pinball Fantasies -Beast Fighter Tests: -naughtyemu -dycptest2 - hblank_ly_scx_timing-GS - intr_2_mode0_timing_sprites With these improvements I'm now pretty confidently ahead of Gambatte in accuracy, although not in capability. I have asked on NesDev regarding Beast Fighter. The game works fine in both GB and CGB on actual hardware, but no one quite knows why the status bar isn't showing up in emulator. That one will liekly need a test ROM to work out. LIJI32 (Sameboy author) seems to have cracked the case of Pinball Fantasies some time ago, so I'll just have to implement the logic described there (I think, I haven't studied exactly what the proposed behaviour is.)
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3809)
Joined: 11/30/2014
Posts: 2828
Location: US
With some help from gekkio I fixed naughtyemu. I also got caught up on a couple newer tests just recently released. Progress is reasonably steady but emulator performance is starting to take a hit. I might take some time and go over the code again and look for obvious speed improvements. This hasn't really benefitted me at all in the past, but maybe I'll find something this time, I'm really hoping to stay at 4x speed at least.
Editor, Expert player (2328)
Joined: 5/15/2007
Posts: 3931
Location: Germany
I noticed emu.setregister() and emu.totalexecutedcycles() aren't supported in Gambatte, so I was wondering if there will be support for these in GBHawk?
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3809)
Joined: 11/30/2014
Posts: 2828
Location: US
MUGG wrote:
I noticed emu.setregister() and emu.totalexecutedcycles() aren't supported in Gambatte, so I was wondering if there will be support for these in GBHawk?
Yes, eventually there will be. Right now I am working on the sprite test. I hope to be passing it by year end, it seems doable.
Editor, Expert player (2328)
Joined: 5/15/2007
Posts: 3931
Location: Germany
Playing the latest interim (Build e92a45599). "No audio" issue 1) Play GB Volley Fire 2) On the title screen, save a state 3) A+B+Start+Select 4) load the state If done correctly, there is no sound. Needs core reboot or actually finishing the softreset to recover the sound. Sometimes the game recovers the audio by itself. This issue can happen in some other games too (Bubble Ghost). In the case of Volley Fire, if you continue on the (muted) title screen, it will fade and softlock on a white screen... This issue happens in GBHawk, but does not happen in Gambatte. Alternate way to do it: 1) Play any GB game 2) Save a state 3) reboot core and hold loadstate hotkey to load a state right after emulation starts If done correctly, there is no sound. Savestate problem It looks like GBHawk and Gambatte share savestates. So states saved in one core can be loaded in the other. Sometimes it works, but other times I get an error and the emu closes.
System.IO.EndOfStreamException: Über das Ende des Datenstroms hinaus kann nicht gelesen werden.
   bei System.IO.BinaryReader.FillBuffer(Int32 numBytes)
   bei System.IO.BinaryReader.ReadInt32()
   bei BizHawk.Common.Serializer.Sync(String name, Int32& val)
   bei BizHawk.Emulation.Common.Components.LR35902.LR35902.SyncState(Serializer ser)
   bei BizHawk.Emulation.Cores.Nintendo.GBHawk.GBHawk.SyncState(Serializer ser)
   bei BizHawk.Client.Common.BinaryStateLoader.GetLump(BinaryStateLump lump, Boolean abort, Action`2 callback)
   bei BizHawk.Client.Common.BinaryStateLoader.GetCoreState(Action`1 callbackBinary, Action`1 callbackText)
   bei BizHawk.Client.Common.SavestateManager.LoadStateFile(String path, String name)
   bei BizHawk.Client.EmuHawk.MainForm.LoadState(String path, String userFriendlyStateName, Boolean fromLua, Boolean supressOSD)
   bei BizHawk.Client.EmuHawk.MainForm.LoadQuickSave(String quickSlotName, Boolean fromLua, Boolean supressOSD)
   bei BizHawk.Client.EmuHawk.MainForm.CheckHotkey(String trigger)
   bei BizHawk.Client.EmuHawk.MainForm.<ProcessInput>b__94_0(Boolean current, String trigger)
   bei System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable`1 source, TAccumulate seed, Func`3 func)
   bei BizHawk.Client.EmuHawk.MainForm.ProcessInput()
   bei BizHawk.Client.EmuHawk.MainForm.ProgramRunLoop()
   bei BizHawk.Client.EmuHawk.Program.SubMain(String[] args)
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3809)
Joined: 11/30/2014
Posts: 2828
Location: US
Audio: Fixed, thanks for the report. Savestate: They were never meant to share savestates, so I implemented the same logic NESHawk / QuickNES uses to seperate their states. Should be fixed now.
Editor
Joined: 3/31/2010
Posts: 1466
Location: Not playing Puyo Tetris
Gambatte's sprite rendering is incorrect for GB Games. Is this expected to happen?
When TAS does Quake 1, SDA will declare war. The Prince doth arrive he doth please.
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3809)
Joined: 11/30/2014
Posts: 2828
Location: US
hegyak wrote:
Gambatte's sprite rendering is incorrect for GB Games. Is this expected to happen?
(I replied to this on GitHub but it seemed worth it to put a similar reply here.) It's actually the background that isn't rendering here, but that's besides the point. It's not expected, and actually I totally forgot that even happened. Being able to load GB games in GBC mode in gambatte was a derivative of having BIOS support. Originally Gambatte did not have this capability (I had to load up 1.13.1 to even realize this was the case.) So, I reverted it so that GB games will not load into GBC mode in Gambatte, they will only load into GB mode. In the event that a GBCHawk core ever comes into existence, the ability to play GB games in GBC mode will be once again added.
Editor
Joined: 3/31/2010
Posts: 1466
Location: Not playing Puyo Tetris
Alyosha wrote:
(I replied to this on GitHub but it seemed worth it to put a similar reply here.) It's actually the background that isn't rendering here, but that's besides the point. It's not expected, and actually I totally forgot that even happened. Being able to load GB games in GBC mode in gambatte was a derivative of having BIOS support. Originally Gambatte did not have this capability (I had to load up 1.13.1 to even realize this was the case.) So, I reverted it so that GB games will not load into GBC mode in Gambatte, they will only load into GB mode. In the event that a GBCHawk core ever comes into existence, the ability to play GB games in GBC mode will be once again added.
Thank you. I wanted to make sure that wasn't supposed to happen. I am still looking forward to GBHawk and GBCHawk (Eventually? Hopefully).
When TAS does Quake 1, SDA will declare war. The Prince doth arrive he doth please.
Skilled player (1738)
Joined: 9/17/2009
Posts: 4980
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
I'm not sure if it's fixed in the latest interim build, but when using GBHawk, 2 things: 1. When I first changed cores, I noticed I had to reenter my controller settings again. 2. For the game Bishoujo Senshi Sailormoon R (Japan), in TAStudios using this core, sometimes the audio mysterious becomes mute, and the only way to make it on again is to reset the core. Edit: Also it appears the input file generated by Gambette v GBHawk is a bit different. In Gambette it's
[Input]
LogKey:#Up|Down|Left|Right|Start|Select|B|A|Power|
GBHawk
[Input]
LogKey:#P1 Right|P1 Left|P1 Up|P1 Down|P1 A|P1 B|P1 Select|P1 Start|P1 Power|
It's just a minor change, but makes copypasting a bit trickier. Probably could autoconvert between the 2 with a script.
Editor, Reviewer, Skilled player (1353)
Joined: 9/12/2016
Posts: 1646
Location: Italy
jlun2 wrote:
It's just a minor change, but makes copypasting a bit trickier. Probably could autoconvert between the 2 with a script.
A simple regex code with Notepad++ would do. By the way, while I like the "P1" thingy, I'd like to recommend to stick with the old sorting. Not only that would avoid confusion with movies made with gambatte, but moreover it's counter-intuitive to put Right before Left.
my personal page - my YouTube channel - my GitHub - my Discord: thunderaxe31 <Masterjun> if you look at the "NES" in a weird angle, it actually clearly says "GBA"
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3809)
Joined: 11/30/2014
Posts: 2828
Location: US
jlun2 wrote:
I'm not sure if it's fixed in the latest interim build, but when using GBHawk, 2 things: 1. When I first changed cores, I noticed I had to reenter my controller settings again. 2. For the game Bishoujo Senshi Sailormoon R (Japan), in TAStudios using this core, sometimes the audio mysterious becomes mute, and the only way to make it on again is to reset the core. Edit: Also it appears the input file generated by Gambette v GBHawk is a bit different.
1. I'm not entirely sure what you mean by this, can you give some more details? 2. I'm not seeing any issues, I'll need some more specific reproduction steps for this one. (And make sure it's on the most recent dev build) Controller: I kept the 'P1' prefixes for now, but I put the controller ordering back to those of gambatte for consistency.
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3809)
Joined: 11/30/2014
Posts: 2828
Location: US
With the latest commit to GBHawk I can now passs the test intr_2_mode0_timing_sprites.gb. This is a gruelling test which requires accurately emulating cycles lost to sprite evaluation. My current implementation is only an algorithmic approach. I don't know what each cycle does, but the total cycles are accounted for accurately (at least to the extent possible with the currently available tests. With this, I can pass every one of Gekkio's tests except an obscure OAM bus conflict one and the tests dealing with the serial port since I haven't implemented it yet. Pinball Fantasies still doesn't work. I know that the problem and the solution are, but I need some new tests in order to implement it correctly. I think LIJI28 (Sameboy author) was working on some. At this point I am pretty confident in declaring GBHawk ready for TASing. This should be considered only phase one though. A lot more work is needed and many edge case tests need to be done before I can declare this core 'cycle accurate.' At this point though, it is a solid foundation on which to further develop it into a truly accurate GameBoy core.
Editor
Joined: 3/31/2010
Posts: 1466
Location: Not playing Puyo Tetris
Serial Port? Do you mean the Link Cable Port?
When TAS does Quake 1, SDA will declare war. The Prince doth arrive he doth please.
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3809)
Joined: 11/30/2014
Posts: 2828
Location: US
hegyak wrote:
Serial Port? Do you mean the Link Cable Port?
Yes. I actually have all the logic implemented since several games require it to at least nominally function, I just don't have any protocol to actually hook it up to anything. Maybe I'll just copy whatever is done for Gambatte but I haven't looked at it yet.
Skilled player (1738)
Joined: 9/17/2009
Posts: 4980
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
I'm not sure if it's just my computer, but when I was using TAStudios with GBHawk, saving a tasproj file (the Sailor Moon run to be specific) took a long time for some reason. Loading a branch also took a while. Is that normal? Saving seems to take shorter amounts of time when using the mgba core for GBA game TASing.
1 2 3 4 5
19 20