Welcome
Welcome to a320

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. Registration is fast, simple, and absolutely free, so please, join our community today!

[EMULATOR] DOOEngine version 0.9b

Only for posting new releases of Dingoo OS based software.

Moderator: Moderators

Re: [EMULATOR] DOOEngine version 0.9b

Postby QBert on Mon Aug 31, 2009 11:35 pm

This is fantastic, thank you Alekmaul! I'll always have a special place in my heart for the TG-16.

I also think that turbo-fire would be a great addition. (ie: Y=turbofire B, X=turbofire A)

Like a fine wine, the Dingoo keeps getting better with age. :)
QBert
 
Posts: 13
Joined: Sat Aug 22, 2009 9:47 pm

Re: [EMULATOR] DOOEngine version 0.9b

Postby Derk on Tue Sep 01, 2009 6:41 am

Thanks so much Alekmaul! I love the TG-16/ PC engine. I can't wait to play your final update of the emu.

It would also be great if you could have the TV out function implemented on your emulators. Any chance of that in the near future?

Keep up the great work! You rule!
Derk
 
Posts: 7
Joined: Tue Sep 01, 2009 6:28 am

Re: [EMULATOR] DOOEngine version 0.9b

Postby alekmaul on Tue Sep 01, 2009 7:35 am

Ok, here are the progress:
I fixed timer int pb and now lots of games work (with gfxs pbs for some games but they work).
Only two games hang during actual tests : pacland and turrican.

About TV Out, i really don't know where is the pb. If someone can help, here is the source code of the main part with the scale function (botmap scale) that update the video buffer.
Hope someone can see something wrong ...
Code: Select all
void bitmap_scale(int viswidth, int visheight, uint16_t *bmpline) {
  uint16_t* buffer_scr = gfx_render_target->address;
  unsigned int W,H,ix,iy,x,y;
  x=0;
  y=0;
  W=320;
  H=240;
  ix=(viswidth<<16)/W;
  iy=(visheight<<16)/H;

  do   
  {
    uint16_t *buffer_mem=&bmpline[(y>>16)*SYSVID_WIDTH+0x20];
    W=320; x=0;
    do {
      *buffer_scr++=buffer_mem[x>>16];
      x+=ix;
    } while (--W);
    y+=iy;
  } while (--H);
}

int main(int argc, char** argv) {
  strcpy(gameName,argv[2]);
  int ref = EXIT_SUCCESS;
  srand(OSTimeGet());

  control_init();
  control_lock(timer_resolution / 4);
  gfx_init();
  gfx_render_target_clear(gfx_color_rgb(0x00, 0x00, 0x00));
  gfx_render_target_swap();

  gameTimer   = timer_create();

  _audio_music = waveout_open(&tempArgs);

  m_Flag = GF_GAMEINIT;
  sndLevel=20;
  m_ScreenRatio=1; // 0 = original show, 1 = full screen

  render_screen = m_ScreenRatio == 1 ? bitmap_scale : bitmap_noscale;
 
  uint32_t tempTick  = 0;
  uint32_t tempPauseOS = 0;
  int sysref;
       
  while (m_Flag != GF_GAMEQUIT) {
     sysref = _sys_judge_event(NULL);
    if (sysref < 0) {
       break; 
    }
 
    switch (m_Flag) {

      --- /// -----
      --- something here without any interest ----
      --- /// -----
            
     case GF_GAMERUNNING:
      tempTick += timer_delta(gameTimer);
      if (tempTick < gameTickRate) {
        tempPauseOS = (((gameTickRate - tempTick) * OS_TICKS_PER_SEC) / timer_resolution);
        if(tempPauseOS > 0) OSTimeDly(tempPauseOS);
        while(tempTick < gameTickRate)
         tempTick += timer_delta(gameTimer);
      }
    // Do a one step emulation
    do_frame();
      render_screen(disp_width,disp_height,buf16RGB);
    gfx_render_target_swap();
 
    waveout_write(_audio_music, rawSoundBuf, PCESND_STEP);

          --- /// -----
      --- something here without any interest ----
      --- /// -----

       break;
    }
  }
 
  timer_delete(gameTimer);
  waveout_close(_audio_music);
 
  gfx_term();
  control_term();
 
  return ref;
}
alekmaul
 
Posts: 51
Joined: Sat Jun 06, 2009 7:16 am
Location: France

Re: [EMULATOR] DOOEngine version 0.9b

Postby Haas on Wed Sep 02, 2009 4:40 pm

Haas
Moderator
 
Posts: 110
Joined: Thu Jul 02, 2009 7:18 pm

Previous

Return to Dingoo OS Releases

Who is online

Users browsing this forum: No registered users and 1 guest