🇪🇸 Spain
Joined: 6/27/2025
Posts: 3
Location: 🇪🇸 Spain
Congrats, but you still have some sprite bugs:
Alyosha
He/Him
Editor, Emulator Coder, Expert player (4626)
Location: US
Joined: 11/30/2014
Posts: 3002
Location: US
cirote3 wrote:
Congrats, but you still have some sprite bugs:
Thanks for the report, it seems I didn't have the proper fix to the sprite issue. I fixed it correctly and backported to 2.3.2, so the current download of 2.3.2 should be good now.
Alyosha
He/Him
Editor, Emulator Coder, Expert player (4626)
Location: US
Joined: 11/30/2014
Posts: 3002
Location: US
I fixed RTC emulation and now pass all of the tests by CasualPokePlayer. I think a lot of things are still wrong, but this now runs a lot closer to how the actual chip works so is improvable in the future if more tests are made.
Alyosha
He/Him
Editor, Emulator Coder, Expert player (4626)
Location: US
Joined: 11/30/2014
Posts: 3002
Location: US
Link to video I console verified Rockman Zero 2. With a few other NES games I recently verified, this brings us too 490 current verified runs, only 10 to go to get to 500!
Alyosha
He/Him
Editor, Emulator Coder, Expert player (4626)
Location: US
Joined: 11/30/2014
Posts: 3002
Location: US
I still want to eventually get 4 player linking working, but since the performance will be ~30 fps I decided to try doing some multi-threading on the 2-player linked core to see what, if any, improvements I might expect. It turns out instead of an improvement I got big performance penalty, from 60 fps to 20 fps. I guess not enough work is done in a single cycle to offset the synchronization overhead. I would have to do some kind of bulk processing of cycles to make it worth while, but it's not worth breaking my one cycle at a time rule for. So based off that for 4 players it might just break even with single threaded, not really worth it. I think it was a worth while experiment though. I'm not exactly a multi-threading mastermind but at least now I have some idea of when I can expect it to be useful.
Alyosha
He/Him
Editor, Emulator Coder, Expert player (4626)
Location: US
Joined: 11/30/2014
Posts: 3002
Location: US
I've been rewriting GBHawk as a C++ core so that all my cores have the same architecture. I've managed to get linking working in a much more compact way in the new core. I'll take what I learned in this process to redo the GBA linking for 4 players eventually. I've also moved my NES core here as experimental so that everything is in the same place, no point having things spread out to multiple projects. I've also added blank cores for SNES and N64. No clue when I might actually develop them, but I've found that when I'm too tired to do core development I can still make progress on the infrastructure stuff that doesn't take a lot of brain power largely copy paste from the other cores. I've also removed a LOT of stuff from the front end code as I try to shrink and simplify it. Eventually I will move to the same lua structure as current BizHawk which will be another simplification. Now that the GBHawk rewrite is done I can get back to GBA linking improvements and work on a new release.
Alyosha
He/Him
Editor, Emulator Coder, Expert player (4626)
Location: US
Joined: 11/30/2014
Posts: 3002
Location: US
I've been reworking my linking code to closer match how hardware works. This results in much more bookkeeping on the core side but much simpler linking logic. Now I match the current mGBA serial tests to my GBP, as well as have code that is much easier to improve when I start to implement the other linking modes. As I was working on this I came across this cool video of a demo that streams video from one GBA to another: Link to video This isn't quite working yet on GBAHawk. I'm not sure if I will try to fix it for this release or save it for the next one. Flevoriux has also recently released a new version of the painful sprite horizontal mosaic test that I currently don't pass. I haven't looked into the details of this one yet, hopefully this doesn't break my increasingly strained pixel pipeline.
Alyosha
He/Him
Editor, Emulator Coder, Expert player (4626)
Location: US
Joined: 11/30/2014
Posts: 3002
Location: US
I was actually able to fix both of the above issues without too much trouble. Additionally I fixed a recent accuracy coin test to get to 139/139. I've been going over my list of previously verified movies to make sure I haven't broken anything, as well as checking linking against known working test cases before. So far so good with no regressions.
Alyosha
He/Him
Editor, Emulator Coder, Expert player (4626)
Location: US
Joined: 11/30/2014
Posts: 3002
Location: US
I redid the open bus emulation in GBAHawk and it now passes the openbuster test and my own new tests. This was a pretty big refactor and cost a bit of performance, but is now very transparent when and how the bus is being updated. This also cleaned up the DMA code a bit, which is necessary for when I have to separate reads and writes for edge cases when DMA is disabled in between them.
Alyosha
He/Him
Editor, Emulator Coder, Expert player (4626)
Location: US
Joined: 11/30/2014
Posts: 3002
Location: US
My goal for GBAHawk is for everything to run at minimum 2x speed on my computer. My test case for this is the main menu of Advance Wars 2, which has several layers active, lots of sprites, DMA's happening, and doesn't use halt so code is running the whole time. Even on 2.3.2 this scene ran under 2x, averaging around 112., and the situation has gotten quite bad in master at around 105. So I took some time to address this by optimizing the CPU code. It turns out a lot of savings could be had. Originally, I split CPU execution into 3 main code blocks, decode, execute, and cycle type specifics (i.e. reading from memory, branching, etc). Over time the code has evolved so that the separation between decode and execute was pretty artificial. This was due mostly to handling halt and DMA in a different way. So I decided to merge them together into a single step and clean up the whole thing. This actually resulted in a sizable performance improvement. The Advance Wars 2 main menu now runs closer to 115 fps, with still some room for improvements. I'm going to try to get to 120 for next release. This is still very slow. Mesen has comparable accuracy and runs the same scene at ~370 fps on my computer. This is just the limits of my architecture though, and 120 is probably about as fast as I'm ever going to get. These changes also make the edge case msr encodings much easier to deal with, which is a nice added benefit. I will probably deal with those after this next release.
Alyosha
He/Him
Editor, Emulator Coder, Expert player (4626)
Location: US
Joined: 11/30/2014
Posts: 3002
Location: US
I finally managed to figure out why the Snood TAS I was puzzled by crashes on console. On this frame, the same frame that crashes on console, the game turns off DMA 2 after a audio FIFO reload is triggered but before it starts (there is a few cycles in between the two events.) I'm not entirely sure of the details yet, but this evidently triggers a crash. Presumably this is what GBA Tek refers to as: "DMA lockup when stopping while starting ???" I'm not entirely sure yet how I will handle this in emulator, the behavior observed on console seems very complicated. I'll probably just trigger a jam state for now. I'll put together a test to demonstrate the crash.
Alyosha
He/Him
Editor, Emulator Coder, Expert player (4626)
Location: US
Joined: 11/30/2014
Posts: 3002
Location: US
GBAHawk v3.0.0 is now released! This version has numerous core / accuracy improvements including: - Open bus accuracy improvements - RTC accuracy improvements - Linking accuracy improvements - Emulates FIFO DMA lock up - Emulates coprocessor 14 instructions returning open bus - Adds user created DB entries - Adds 5 level light sensor controls - rewritten ARM7TDMI execution loop Additionally I have rewritten the GB core into C++ a core with plans to renew work on it when I get the chance. This release also includes my NESHawk2 core as experimental. Note that currently it ONLY loads NES2.0 headered ROMs and WILL respect whatever is in the ROM header. Additionally it only supports NTSC NES currently, not PAL or Famicom behaviors. It is currently 140/141 AccuracyCoin tests passing as well as all the other relevant accuracy tests. There have also been many code changes throughout the project as I continue to try and shrink and simplify the code base. Finally thanks to Github contributor coolbho3k for some bug fixes.
Alyosha
He/Him
Editor, Emulator Coder, Expert player (4626)
Location: US
Joined: 11/30/2014
Posts: 3002
Location: US
65C816: PC, machine code, mnemonic, operands, registers (A, X, Y, SP, P), flags (NVTBDIZCR)  Cycles      SL     F Cycle      
008000:  78           SEI                  A:0000 X:0000 Y:0000 SP:01FE P:34  nvMXdIzcR  Cy:              35 LY:  0 F-Cy:               0   
008001:  9C 00 42     STZ $4200            A:0000 X:0000 Y:0000 SP:01FE P:34  nvMXdIzcR  Cy:              50 LY:  0 F-Cy:               0   
008004:  9C 0C 42     STZ $420C            A:0000 X:0000 Y:0000 SP:01FE P:34  nvMXdIzcR  Cy:              74 LY:  0 F-Cy:               0   
008007:  9C 0B 42     STZ $420B            A:0000 X:0000 Y:0000 SP:01FE P:34  nvMXdIzcR  Cy:              98 LY:  0 F-Cy:               0   
00800A:  9C 40 21     STZ $2140            A:0000 X:0000 Y:0000 SP:01FE P:34  nvMXdIzcR  Cy:             122 LY:  0 F-Cy:               0   
00800D:  9C 41 21     STZ $2141            A:0000 X:0000 Y:0000 SP:01FE P:34  nvMXdIzcR  Cy:             146 LY:  0 F-Cy:               0   
008010:  9C 42 21     STZ $2142            A:0000 X:0000 Y:0000 SP:01FE P:34  nvMXdIzcR  Cy:             170 LY:  0 F-Cy:               0   
008013:  9C 43 21     STZ $2143            A:0000 X:0000 Y:0000 SP:01FE P:34  nvMXdIzcR  Cy:             194 LY:  0 F-Cy:               0   
008016:  A9 80        LDA #$80             A:0000 X:0000 Y:0000 SP:01FE P:34  nvMXdIzcR  Cy:             218 LY:  0 F-Cy:               0   
008018:  8D 00 21     STA $2100            A:0080 X:0000 Y:0000 SP:01FE P:B4  NvMXdIzcR  Cy:             230 LY:  0 F-Cy:               0   
00801B:  18           CLC                  A:0080 X:0000 Y:0000 SP:01FE P:B4  NvMXdIzcR  Cy:             254 LY:  0 F-Cy:               0   
00801C:  FB           XCE                  A:0080 X:0000 Y:0000 SP:01FE P:B4  NvMXdIzcR  Cy:             266 LY:  0 F-Cy:               0   
00801D:  C2 38        REP #$38             A:0080 X:0000 Y:0000 SP:01FE P:B5  NvMXdIzCR  Cy:             278 LY:  0 F-Cy:               0   
00801F:  A9 00        LDA #$00             A:0080 X:0000 Y:0000 SP:01FE P:8D  NvmxdIzCR  Cy:             296 LY:  0 F-Cy:               0   
008022:  5B           TCD                  A:0000 X:0000 Y:0000 SP:01FE P:0F  nvmxdIZCR  Cy:             314 LY:  0 F-Cy:               0   
008023:  A9 FF        LDA #$FF             A:0000 X:0000 Y:0000 SP:01FE P:0F  nvmxdIZCR  Cy:             326 LY:  0 F-Cy:               0   
008026:  1B           TCS                  A:01FF X:0000 Y:0000 SP:01FE P:0D  nvmxdIzCR  Cy:             344 LY:  0 F-Cy:               0
I'm working on a SNES core as part of my adaptive sync project. I've reached the point where I can start running code and trace logging, above are the first few instructions of SMW. There are many many bugs in the CPU to work out still but I'm pretty happy with how it turned out architecturally. Of course the CPU is the easy part of SNES emulation. I'm hoping to have this core up and running in ~1 year.
CoolKirby
He/Him
Editor, Experienced player (710)
Joined: 11/8/2010
Posts: 4306
Intriguing news. Good luck, Alyosha!
Alyosha
He/Him
Editor, Emulator Coder, Expert player (4626)
Location: US
Joined: 11/30/2014
Posts: 3002
Location: US
I implemented the GBA video mapper today, which aside from the e-reader is the largest group of 'games' that currently weren't supported in GBAHawk. You can even watch 2 movies side by side in linked mode if you really want to.
Alyosha
He/Him
Editor, Emulator Coder, Expert player (4626)
Location: US
Joined: 11/30/2014
Posts: 3002
Location: US
Link to video Since I explicitly don't support a front end cheat code utility, I thought it would be fun to implement Game Genie support as a physical add on to my new NES core. Here is a console verification of a Super Mario Bros. TAS by PP Unknown using the "AISSON" code (I added in the necessary game genie inputs.) Generally not that useful, and I don't want to use the Game Genie too much as it's PCB is too thick for the NES cartridge connector, but I think it's an interesting enough curiousity to keep it.

1792169478