Page 121 of 121 FirstFirst ... 2171111119120121
Results 1,201 to 1,201 of 1201

Thread: Game Boy

  1. #1201
    EmuTalk Member
    Join Date
    Jun 2013
    0 Post(s)
    Quote Originally Posted by Shonumi View Post
    Pokemon Blue - May be related to STAT interrupts. I would imagine that one type of interrupt (likely H-Blank) is being triggered so the game can safely modify SCX for the scanline for the wave-like effects. Seems like all the GB Pokemon games (Red through Crystal) don't make the very first scanline move when attacks make those wave-like effects (LY=LYC test maybe? Perhaps the effect just couldn't be done when testing for LY=0). If it loops forever rather than crashing, it's usually a sign that you're not feeding it input it expects (an interrupt, a certain value in the MMIO registers, stuff like that). The best thing to do is look at the GB assembly in a debugger and compare it in an emulator. Time consuming, but effective, since eventually your emulator will diverge from a correct, working emulator and you can then pinpoint where exactly.
    That was one of the reasons I wrote the profiler, just didn't have the time and motivation to dig through the output.
    I also noticed that it does not move the second scanline, which looks weird and should probably not happen.
    Edit: The issue was easy to find, he checks for LY==143, but LY resets after reaching 142.
    A closer look at my code revealed that I triggered the Vblank interrupt at the end of scanline 143 instead of 144.
    This fixed the loop but now the topmost 3 scanlines don't move...

    This apparently fixed Pokemon Crystal too.

    Quote Originally Posted by Shonumi View Post
    As for double-speed, I kinda struggled to implement it correctly too, in fact, I only knew my implementation was broken because the Oracle games were messed up. I solved it by simply halving the CPU cycles the LCD acknowledged after each instruction (my emulated APU is not cycle-based, not yet), but by sending the original amount of CPU cycles to the timers. The CPU runs at 2x its normal operating speed (meaning all timers run twice as fast too) but LCD operations, DMA transfers run at the same speed. The setup I just described follows that, but it took me a while to figure it out.
    Three new lines and it seems to work fine .

    Quote Originally Posted by Shonumi View Post
    Other stuff - Sprite palettes in DMG games are off. You may know how to fix it already, but just make sure you're correctly reading OBP0 and OBP1. Also, seems like you still have BG/Sprite priority issues (Suicune in the intro of Crystal should be behind the grass). For reference, there are only 4 cases where a sprite's pixel will prevail over the BG's pixel (GBC only):
    The color issues probably happened when I swapped color channels around to fix GBC games, but the palette lookups seem fine.
    I check the OBJ-to-BG priority but not (yet) the BG-to-OBJ, so that could explain it.
    Last edited by Rüdiger; Yesterday at 16:30.

    • Advertising

      has no influence
      on the ads that
      are displayed

Page 121 of 121 FirstFirst ... 2171111119120121

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts