Beispiel #1
0
int desmume_open(const char *filename)
{
  int i;
  noticed_3D=FALSE;
  clear_savestates();
#ifdef EXPERIMENTAL_GBASLOT
  i = NDS_LoadROM(filename);
#else
  i = NDS_LoadROM(filename, NULL);
#endif
  return i;
}
Beispiel #2
0
int desmume_open(const char *filename)
{
  int i;
  clear_savestates();
  i = NDS_LoadROM(filename, savetype, savesize);
  return i;
}
Beispiel #3
0
bool retro_load_game(const struct retro_game_info *game)
{
   if (colorMode != RETRO_PIXEL_FORMAT_RGB565)
      return false;

   struct retro_input_descriptor desc[] = {
      { 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_LEFT,   "Left" },
      { 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_UP,     "Up" },
      { 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_DOWN,   "Down" },
      { 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_RIGHT,  "Right" },
      { 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_X,      "X" },
      { 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_Y,      "Y" },
      { 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_B,      "B" },
      { 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_A,      "A" },
      { 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_L,      "L" },
      { 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_L2,     "Lid Close/Open" },
      { 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_L3,     "Toggle Microphone" },
      { 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_R,      "R" },
      { 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_R3,     "Quick Screen Switch" },
      { 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_SELECT, "Select" },
      { 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_START,  "Reset" },

      { 0 },
   };

   environ_cb(RETRO_ENVIRONMENT_SET_INPUT_DESCRIPTORS, desc);

   execute = NDS_LoadROM(game->path);

   screen_buf = (uint16_t*)malloc(GPU_LR_FRAMEBUFFER_NATIVE_WIDTH * (GPU_LR_FRAMEBUFFER_NATIVE_HEIGHT + NDS_MAX_SCREEN_GAP) * 2 * sizeof(uint16_t));

   return execute;
}
Beispiel #4
0
int desmume_open(const char *filename)
{
  int i;
  noticed_3D=attempted_3D_op=FALSE;
  clear_savestates();
  i = NDS_LoadROM(filename, savetype, savesize, NULL);
  return i;
}
Beispiel #5
0
int desmume_open(const char *filename)
{
  int i;
  noticed_3D=FALSE;
  clear_savestates();
  i = NDS_LoadROM(filename);
  return i;
}
Beispiel #6
0
bool doRomLoad(const char* path, const char* logical) {
    NDS_Pause(false);
    if(NDS_LoadROM(path, logical) >= 0) {
        INFO("Loading %s was successful\n",path);
        unpause();
        if (autoframeskipenab && frameskiprate) AutoFrameSkip_IgnorePreviousDelay();
        return true;
    }
    return false;
}
Beispiel #7
0
static int Open(const char *filename)
{
        int i = NDS_LoadROM(filename, MC_TYPE_AUTODETECT, 1);
	return i;
}
Beispiel #8
0
int main(int argc, char ** argv) {
  static unsigned short keypad = 0;
  u32 last_cycle;

#ifdef DEBUG
  LogStart();
#endif
  NDS_Init();
  SPU_ChangeSoundCore(SNDCORE_SDL, 735 * 4);

  if (argc < 2) {
    fprintf(stderr, "usage: %s filename\n", argv[0]);
    return 1;
  }

  if (NDS_LoadROM(argv[1], MC_TYPE_AUTODETECT, 1) < 0) {
    fprintf(stderr, "error while loading %s\n", argv[1]);
    return 2;
  }

  /*      // This has to get fixed yet
          strcpy(szRomPath, dirname(argv[1]));
          cflash_close();
          cflash_init();
  */
  
  execute = TRUE;

  if(SDL_Init(SDL_INIT_VIDEO) == -1)
    {
      fprintf(stderr, "Error trying to initialize SDL: %s\n",
              SDL_GetError());
      return 1;
    }
  SDL_WM_SetCaption("Desmume SDL", NULL);

  /* Initialize joysticks */
  if(!init_joy()) return 1;
  /* Load our own keyboard configuration */
  set_kb_keys(cli_kb_cfg);

  surface = SDL_SetVideoMode(256, 384, 32, SDL_SWSURFACE);

  while(!sdl_quit) {
    /* Look for queued events and update keypad status */
    keypad = process_ctrls_events(keypad);
    /* Update mouse position and click */
    if(mouse.down) NDS_setTouchPos(mouse.x, mouse.y);
    if(mouse.click)
      { 
        NDS_releasTouch();
        mouse.click = FALSE;
      }

    update_keypad(keypad);     /* Update keypad */
    last_cycle = NDS_exec((560190 << 1) - last_cycle, FALSE);
    SPU_Emulate();
    Draw();
  }

  /* Unload joystick */
  uninit_joy();

  SDL_Quit();
  NDS_DeInit();
#ifdef DEBUG
  LogStop();
#endif

  return 0;
}