Page 125 of 125 FirstFirst ... 2575115123124125
Results 1,241 to 1,244 of 1244

Thread: Game Boy

  1. #1241
    EmuTalk Member
    Join Date
    Mar 2014
    Location
    Chicago, IL
    Posts
    48
    Mentioned
    4 Post(s)
    That e-2 bit was probably Nintendo trying to encourage good program design. The JR instructions occupy 2 bytes in machine code. When performing the JR instruction, the PC is actually pointing to the instruction right after JR. If e is specified as -1, the PC would technically be the the address of JR's immediate, which would then become an opcode the next cycle, which could lead to some wacky code execution. It's probably perfectly legal to do what I described above, but Nintendo probably didn't want to have games messing up, so they opted to keep programmers safe to begin with.

    So what I think they meant to explain was that the signed immediate (e) should always be calculated as the value you want to jump first, then subtract 2. So if you wanted to jump the PC to one byte before the JR instruction, you would not use -1 (that jumps the PC into JR's immediate) but -3. This concept is poorly communicated in Nintendo docs though, and it took me some head-scratching to figure out what they meant.

  2. #1242
    EmuTalk Member
    Join Date
    Jun 2013
    Posts
    30
    Mentioned
    1 Post(s)
    I ported my emulator to the STM32F429I-Discovery board,
    which has a 180MHz Cortex-M4 with 256KB RAM and 2MB flash, a 320x240 LCD and 8MB SDRAM.

    It runs but it's very slow, I guess single-digit FPS. There is no input, no sound and the
    game has to fit inside the flash together with the emulator.
    The board can be programmed and debugged over usb, which makes things considerably easier,
    but programming larger files doesn't work reliably and anything over 1MB almost always breaks .

    Next up are input and some missing rendering stuff.
    Getting acceptable performance will probably not be as easy and I may have to rewrite the critical
    parts in assembly. It really shows that I did not write the code with speed in mind .
    Attached Images Attached Images  

  3. #1243
    EmuTalk Member
    Join Date
    Mar 2014
    Location
    Chicago, IL
    Posts
    48
    Mentioned
    4 Post(s)
    Hey, that's very cool

    The closest thing I ever did was port my emulator to the Dingoo A320 a long time ago (400MHz MIPS CPU). I must admit though, 180MHz seems awfully limited, you'd have to make every cycle count. ARM assembly is pretty easy to get to grips with, and implementing the GB's CPU instructions in assembly shouldn't be that difficult. Any big plans for your STM32F429I-Discovery board?

  4. #1244
    EmuTalk Member
    Join Date
    Oct 2014
    Posts
    1
    Mentioned
    0 Post(s)
    After seeing your emulator on the STM32F429I-Discovery board I just had to register here because currently I'm working on a very similar project. First I started about 10 months ago to create my own Gameboy emulator with a friend. The basics were working very quickly but getting every minor detail of the Gameboy hardware right is very time consuming. I also wanted to port our emulator to a microcontroller and after the first failed attempt to use a 32 MHz ATxmega we switched to the STM32F4-Discovery Board with a 168MHz Cortex-M4 and 192 KB RAM. The emulator is supposed to be a full gameboy color emulator. Currently the emulator already runs twice the speed of the real gameboy but with disabled rendering and in normal speed mode. With rendering enabled (currently not very optimized) we are at ~70% of the real speed. The emulator is written in C++ and is currently not using assembler to improve performance. Instead we try to be very clever and only do work when it's absolutely necessary.



    • Advertising

      advertising
      EmuTalk.net
      has no influence
      on the ads that
      are displayed
        
       

Page 125 of 125 FirstFirst ... 2575115123124125

Posting Permissions

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