Thursday, February 26, 2009

Some advances

I've been working on the Sprites support and they seem to be working pretty good. I also have worked on the Windows, Background and main Screen and now I am able to show some pics as if they were on Gameboy's main screen :)

I'm sorry again for not updating.. my final report has taken more time of me than expected. I've finished all my work today but I still have to put the final details to the report so I'm not completely free, but I should be free tomorrow and with plenty of time to write a couple of entries.

Here is a pic that shows the background and a couple of sprites :p

3 comments:

  1. looking forward for next publications !]
    I'd like to know in whick program u programmed ur debugger.
    And if u could, provide some tutorials on how to do this !

    Thanks and very nice blog dude !

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
    Replies
    1. Whoops as I see it this blog is dead and buried, but it still was of great help during my own gb emulation project. I'm also from Chile =D

      I know leonardo may not be following his question after five years, but for everyone else that stumbles upon this blog here is the answer

      Wrap you opcode decoder function/method with a boolean variable

      //Pseudo code

      int main()
      {

      resetVars(); // Making sure mems and CPUs are properly zeroed for first execution
      loadRom(); // Load Rom in memory (depending on catridge type multiple banks or just the 32k sector)
      while (1) // run forever
      {

      if (debugMode == true) //Flow control if debug flag is UP
      {
      opcodeDecoder();
      debugMode = false; // Make sure the next step is going to pause the emulator
      }
      } //Exit while
      return 0;
      }

      // The only thing you need is mapping a key to activate the boolean variable and you can do step by step debugging (the most useful in this stage)

      //then contained by the debugMode flag you can create another window or just use a terminal to see the value of each register, flag and important memory regions

      I do most of my programming on my phone, so I´m pretty much used of debugging either on console or using SDL and printing text below the screen like this...
      https://postimg.org/image/vbgzdhh6p
      (Screenshot from an earlier chip8 emu, now finished and packed with other stuff, but sadly this is the only pic i found on this phone)
      good luck

      Delete