NesterJ 1.11 Source Help Modify Screen Output

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
nibbles27`
Posts: 1
Joined: Sun Nov 09, 2008 2:42 pm

NesterJ 1.11 Source Help Modify Screen Output

Post by nibbles27` »

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: Select all

void BitBlt_FullScreen(void)
{
	int x,y, dy = 0;
	unsigned long *pVram;
	pVram = (unsigned long *)pgGetVramAddr(0, 0);
	for &#40;y = 0; y < 224; y++&#41; &#123;
		for &#40;x = 0; x < 240; x+=2&#41; &#123;
			cpy2x&#40;&pVram&#91;x&#93;, &#40;g_Pal&#91;g_ScrBuf&#91;y + 8&#93;&#91;x + 16 + 1&#93;&#93; << 16&#41; + g_Pal&#91;g_ScrBuf&#91;y + 8&#93;&#91;x + 16&#93;&#93;&#41;;
		&#125;
		pVram += &#40;LINESIZE/2&#41;;
		dy += 21300;
		if &#40;dy >= 100000&#41; &#123;
			dy-=100000;
			for &#40;x = 0; x < 240; x+=2&#41; &#123;
				unsigned long ulColor = PBlend&#40;&#40;g_Pal&#91;g_ScrBuf&#91;y + 8    &#93;&#91;x + 16 + 1&#93;&#93; << 16&#41; + g_Pal&#91;g_ScrBuf&#91;y + 8    &#93;&#91;x + 16&#93;&#93;,
									         &#40;g_Pal&#91;g_ScrBuf&#91;y + 8 + 1&#93;&#91;x + 16 + 1&#93;&#93; << 16&#41; + g_Pal&#91;g_ScrBuf&#91;y + 8 + 1&#93;&#91;x + 16&#93;&#93;&#41;;
				cpy2x&#40;&pVram&#91;x&#93;, ulColor&#41;;
			&#125;
			pVram += &#40;LINESIZE/2&#41;;
		&#125;
	&#125;
&#125;
AND

Modified

Code: Select all

void BitBlt_FullScreen&#40;void&#41;
&#123;
	int x,y, dy = 0;
	unsigned long *pVram;
	pVram = &#40;unsigned long *&#41;pgGetVramAddr&#40;&#40;480-240*3.5/2&#41;/2, 0&#41;;
	for &#40;y = 0; y < 224; y++&#41; &#123;
		for &#40;x = 0; x < 240; x+=1.5&#41; &#123;
				cpy2x&#40;&pVram&#91;x&#93;, &#40;g_Pal&#91;g_ScrBuf&#91;y + 8    &#93;&#91;x + 14 + 1&#93;&#93; << 16&#41; + g_Pal&#91;g_ScrBuf&#91;y + 8    &#93;&#91;x + 14&#93;&#93;,
		&#125;
		pVram += &#40;LINESIZE/2&#41;;
		dy += 21300;
		if &#40;dy >= 100000&#41; &#123;
			dy-=100000;
			for &#40;x = 0; x < 240; x+=1.5&#41; &#123;
				unsigned long ulColor = PBlend&#40;&#40;g_Pal&#91;g_ScrBuf&#91;y + 8    &#93;&#91;x + 14 + 1&#93;&#93; << 16&#41; + g_Pal&#91;g_ScrBuf&#91;y + 8    &#93;&#91;x + 14&#93;&#93;,
									         &#40;g_Pal&#91;g_ScrBuf&#91;y + 8 + 1&#93;&#91;x + 14 + 1&#93;&#93; << 16&#41; + g_Pal&#91;g_ScrBuf&#91;y + 8 + 1&#93;&#91;x + 14&#93;&#41;;
				cpy2x&#40;&pVram&#91;x&#93;, ulColor&#41;;
			&#125;
			pVram += &#40;LINESIZE/2&#41;;
		&#125;
	&#125;
&#125;
Post Reply