forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

NesterJ 1.11 Source Help Modify Screen Output

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
nibbles27`



Joined: 09 Nov 2008
Posts: 1

PostPosted: Sun Nov 09, 2008 3:17 pm    Post subject: NesterJ 1.11 Source Help Modify Screen Output Reply with quote

Hey im working with the nesterj 1.11 source trying to add a resolution that renders the pixels properly just like full screen setting but shrunk to 4:3. The source actully looks quite easy to manipulate i just need to change about 5 lines ive worked with NesDS (this looks like cake compared to it) if i could just get a bit of help would be nice ive got the right idea a bit of proof reading would help here is the lines i have changed

Unmodified
Code:

void BitBlt_FullScreen(void)
{
   int x,y, dy = 0;
   unsigned long *pVram;
   pVram = (unsigned long *)pgGetVramAddr(0, 0);
   for (y = 0; y < 224; y++) {
      for (x = 0; x < 240; x+=2) {
         cpy2x(&pVram[x], (g_Pal[g_ScrBuf[y + 8][x + 16 + 1]] << 16) + g_Pal[g_ScrBuf[y + 8][x + 16]]);
      }
      pVram += (LINESIZE/2);
      dy += 21300;
      if (dy >= 100000) {
         dy-=100000;
         for (x = 0; x < 240; x+=2) {
            unsigned long ulColor = PBlend((g_Pal[g_ScrBuf[y + 8    ][x + 16 + 1]] << 16) + g_Pal[g_ScrBuf[y + 8    ][x + 16]],
                                    (g_Pal[g_ScrBuf[y + 8 + 1][x + 16 + 1]] << 16) + g_Pal[g_ScrBuf[y + 8 + 1][x + 16]]);
            cpy2x(&pVram[x], ulColor);
         }
         pVram += (LINESIZE/2);
      }
   }
}


AND

Modified
Code:

void BitBlt_FullScreen(void)
{
   int x,y, dy = 0;
   unsigned long *pVram;
   pVram = (unsigned long *)pgGetVramAddr((480-240*3.5/2)/2, 0);
   for (y = 0; y < 224; y++) {
      for (x = 0; x < 240; x+=1.5) {
            cpy2x(&pVram[x], (g_Pal[g_ScrBuf[y + 8    ][x + 14 + 1]] << 16) + g_Pal[g_ScrBuf[y + 8    ][x + 14]],
      }
      pVram += (LINESIZE/2);
      dy += 21300;
      if (dy >= 100000) {
         dy-=100000;
         for (x = 0; x < 240; x+=1.5) {
            unsigned long ulColor = PBlend((g_Pal[g_ScrBuf[y + 8    ][x + 14 + 1]] << 16) + g_Pal[g_ScrBuf[y + 8    ][x + 14]],
                                    (g_Pal[g_ScrBuf[y + 8 + 1][x + 14 + 1]] << 16) + g_Pal[g_ScrBuf[y + 8 + 1][x + 14]);
            cpy2x(&pVram[x], ulColor);
         }
         pVram += (LINESIZE/2);
      }
   }
}
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group