Page 122 of 132 FirstFirst ... 2272112120121122123124 ... LastLast
Results 1,211 to 1,220 of 1313

Thread: Game Boy

  1. #1211
    EmuTalk Member
    Join Date
    Feb 2014
    Location
    Niedersachsen, Germany
    Posts
    87
    Mentioned
    8 Post(s)
    Had anyone of you the problem that pokemon gold is crashing when warping?
    I'm having this issue and I don't know how to fix it..


  2. #1212
    EmuTalk Member
    Join Date
    Mar 2014
    Location
    Chicago, IL
    Posts
    164
    Mentioned
    27 Post(s)
    Quote Originally Posted by Flerovium View Post
    Had anyone of you the problem that pokemon gold is crashing when warping?
    I'm having this issue and I don't know how to fix it..
    Still having this issue? By "warping" do you mean:

    1) Using the FLY HM to go to another city?
    2) Using a Pokemon that knows Teleport?
    3) Stepping on the warp tiles (like those in the Saffron City Gym or the one in the Team Rocket Hideout in Mahogany Town)?

    I have no issues doing any of the above. Looks like you'll have to do some debugging to find out what component is the cause of the problem.

    Rüdiger - That looks nice, great work. Is the SGB difficult to emulate (in your opinion)? I remember reading that the frequencies of sounds on the SGB is around 2% higher than the GB. I wonder if you could ignore changing anything related to the APU and still be fine.

  3. #1213
    EmuTalk Member
    Join Date
    Jun 2013
    Posts
    38
    Mentioned
    1 Post(s)
    Shonumi - That really depends on how complete and accurate one wants to emulate the SGB. Emulating enough to get borders and palettes is doable and that is what I am aiming for at the moment.

    The SGB is kind of weird and documentation is sparse, so my code is not very accurate and some guesswork is required. Communication with the SGB is performed over a serial protocol by writing two bits in the keypad register. Larger transfers happen over VRAM and - in principle - would require to reconstruct the VRAM content from the rendered image. But it seems that all? games use an 1:1 mapping and the content can be copied directly.

    A lot of games also use the SGB sound functions but still output normal sound, probably some additional effects but I have not investigated it further and I am not sure it would be worth the trouble.
    The SGB runs about 2.4% faster and I ... completely ignore it, no issues so far. But it would be interesting to investigate if some games try to compensate for the higher speed.

    Complete SGB emulation would require a SNES emulator, as the games can - theoretically - access the complete hardware. But there are only 2-3 games that make use of it.
    For most games it would be the best to load the border and then reboot in CGB mode (and would make the SGB emulation a complete overkill just for some borders... ).
    But there are at least a few games that don't support CGB and benefit from the SGB mode.

    Development has stopped at the moment, I'm too busy with other stuff.

    Flerovium - I have nothing similar in pokemon.
    Does it hang (in an endless loop) or crash by executing random code?
    In the latter case it could be worthwhile to check the status of interrupts (does it crash inside of an interrupt, is it actually enabled, ...) and writes to the MBC prior to the crash (does it crash in the higher 16K of the ROM, does it crash shortly after switching the bank, ...). But thats really just a guess - could be anything...
    Last edited by Rüdiger; May 16th, 2014 at 15:29.

  4. #1214
    EmuTalk Member
    Join Date
    Feb 2014
    Location
    Niedersachsen, Germany
    Posts
    87
    Mentioned
    8 Post(s)
    Currently I only know that it resets, when stepping on the warp tiles. By reset I mean that it simply restarts.
    The entrypoint (150h) is also the main loop (and vblank interrupt) from my current point of knowledge.
    Therefore it's hard to find out, where exactly it's restarting. For my personal luck there exists a disassembly of pokémon crystal
    with comments, methods names etc. Maybe I'll have to look for a variable containing a id that tells wich scene to render.

  5. #1215
    EmuTalk Member
    Join Date
    Jun 2013
    Posts
    38
    Mentioned
    1 Post(s)
    Already one moth since the last post...

    I dug out my emulator yesterday and fixed some palette issues.
    There are still some SGB commands missing, but the graphics related functions used by most games are implemented.
    I also added ATTR_BLK for Pokemon, but the colors are still off.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	2014-06-19-225258_1024x896_scrot.png 
Views:	105 
Size:	30.4 KB 
ID:	39103   Click image for larger version. 

Name:	2014-06-19-201806_1024x896_scrot.png 
Views:	105 
Size:	33.3 KB 
ID:	39104   Click image for larger version. 

Name:	2014-06-19-195853_1024x896_scrot.png 
Views:	107 
Size:	34.6 KB 
ID:	39105   Click image for larger version. 

Name:	2014-06-18-164549_1024x896_scrot.png 
Views:	113 
Size:	44.3 KB 
ID:	39106  

  6. #1216
    EmuTalk Member
    Join Date
    Mar 2014
    Location
    Chicago, IL
    Posts
    164
    Mentioned
    27 Post(s)
    Nice work Rüdiger. Those screenshots are looking pretty awesome

    I've been taking a long break from development myself, just got back into things by fixing a bug I didn't even know existed (took less than 10 minutes to solve, I'm back and on fire! ) Apparently my HDMAs would continue on indefinitely instead of only executing for a set number of scanlines. Oops.

    I actually have a long to-do list, just need to get up and start coding things. With the HDMA fixed, I think I'll try to get the GBC BIOS working (low-hanging fruit you know).

  7. #1217
    EmuTalk Member
    Join Date
    Jun 2013
    Posts
    38
    Mentioned
    1 Post(s)
    Shonumi: I still have at least one bug in my HDMA code, but as it only affects Pokemon Crystal, I have not bothered fixing it.
    I have an idea what could be the cause, but fixing it would require a rewrite of the gpu/cpu timing code.

    I found a really stupid bug in ATTR_BLK and now Pokemon Blue has (mostly?) the right colors. Gold has still some weird issues. The battle screen looks fine but almost everything else has wrong colors...
    As it turns out, fixing the border in Blue has broken the borders of at least two other games. It seems that there is no documentation on some details and that I am stuck with guessing and digging in other emulators.

    I want to fix and implement some more SGB commands and then merge everything with the (C)GB stuff.
    Link support and maybe my own sound engine are on my to-do list, but otherwise, it is not very long. ( Or maybe I am not very inspired )

  8. #1218
    EmuTalk Member
    Join Date
    Mar 2014
    Location
    Chicago, IL
    Posts
    164
    Mentioned
    27 Post(s)
    Have you had a look at the official GB programming manual? It has a lengthy section about SGB functions (obviously since game developers needed that info, and only Nintendo could provide it). That's about as complete as you can get for documentation.

    About the HDMA, Pokemon Crystal was the first game I actually tried and tested to verify correct HDMA functionality. If you're worried about something like performing the actual transfer in a cycle-accurate manner, don't worry about that. For HDMAs, I just transfer all 16-bits per scanline instantly and I don't get any graphical glitches. As far as I know, most games should not be sensitive to the timing of the HDMA transfer, as long as it happens sooner rather than later. But I can't guess what's wrong on your end without seeing a picture or something :p

    I would make sure that the HDMA addresses are correctly masked. The destination is always in VRAM, and certain bits in the start and destination 16-bit addresses are ignored because of this. So check where you're writing the HDMA to as well. Though if it really is a GPU/CPU timing issue (H-blanks not happening at the correct times) then yeah, you already know what's wrong like you said.

    Got the GBC BIOS to work now. The code is a mess and needs to be re-worked before committing it to my master branch. It was fun diving into it though. Now the GBC palettes show up on DMG games.
    Last edited by Shonumi; June 23rd, 2014 at 09:30.

  9. #1219
    EmuTalk Member
    Join Date
    Jun 2013
    Posts
    38
    Mentioned
    1 Post(s)
    Quote Originally Posted by Shonumi View Post
    Have you had a look at the official GB programming manual? It has a lengthy section about SGB functions (obviously since game developers needed that info, and only Nintendo could provide it). That's about as complete as you can get for documentation.
    Yes, but it is surprisingly unhelpful on some details. For example transparency in the SGB border. My solution which seems to work in all tested games (after 2 other where fixing one broke another...) is to make color 0 of all palettes transparent inside the GB window and white outside (or transparent with a white background).

    And my ATTR_BLK seems to be correct after all, some games just have weird colors in SGB mode. (Left is my emulator and right is vbam. The white part of the border is color 0.)

    I also added MASK_EN. ATTR_LIN, ATTR_DIV and ATTR_CHR are next and should be done quickly, as they are very similar to ATTR_BLK.
    All sound functions and some other stuff is missing, but they are probably not worth the trouble.
    Attached Images Attached Images  

  10. #1220
    EmuTalk Member
    Join Date
    Jun 2014
    Posts
    7
    Mentioned
    2 Post(s)
    Quote Originally Posted by Shonumi View Post
    I heard about Prehistorik Man being a pain to emulate. Perhaps the VBA-M source code has some comments in the code. It may give you a clue. I haven't tested that game. The scanline pixel data itself shouldn't be able to change after a certain point in the LCD's operation (i.e. VRAM access from the CPU is disabled), but I don't know how changing things like SCX or SCY affect rendering mid-scanline. Coming up with a test for that might be tricky.
    To correctly emulate prehistorik man, you should do exactly what a real game boy does during mode 3 (OAM - VRAM reading). Instead of reading all the pixels with your pointer for(i = 0; i <160; i++) at the END of the mode, you must think of how you will implement a pointer that follows this time given to the LCD to read from the VRAM. A VRAM acccess COULD change a pixel during a scanline but as you mentioned it's not possible. But a pallete change can do that . And if you look carefuly, it is exactly what happens during the prehistorik's scanline. Dynamic pallete changes.

    *spoiler* That solution includes the last instruction clocks too
    Last edited by venge; July 7th, 2014 at 12:28. Reason: text format

Page 122 of 132 FirstFirst ... 2272112120121122123124 ... LastLast

Posting Permissions

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