Dwedit's Board

Enjoy the board

You are not logged in.

Announcement

Welcome, fellow visitors from other websites!
Whenever you download a file, I'd appreciate it if you posted a nice "Thank You" message, then tell me which site you came from. Thanks.
- Dwedit

#1 2011-03-27 6:00:28 pm

marlin
Slime
Slime
Registered: 2011-03-27
Posts: 3

Hi! Just to see you....

Hi, Dwedit!
I knew that you were still working on pocketNES, so I just come here to say hello to you~
I am 'huiminghao', working on nesDS now... Someone advised me to contact you..e...
Since nesDS was ported from pocketNES, it would be much better if we can share the patches.
Anyway, you can get latest nesDS from sf.net(SVN).
I get some troubles on emulating mapper9 & mapper10. Someone really love 'Punch-Out', but I cannot find a 'fast and accurate' way to do that. Does pocketNES support it? Or do you have any idea?
Thanks a lot...

Offline

#2 2011-03-28 9:14:38 am

Dwedit
Alex Trebek (Administrator)
From: Chicago
Registered: 2004-12-12
Posts: 981
Website

Re: Hi! Just to see you....

Hi!  Great to see you working on the NesDS project.
Right now, development of my version of PocketNES has two branches, the 'classic' version (which accounts for scanlines by incrementing a variable named "scanline"), and the 'Rewrite' version (which removes that method of timing in favor of a CPU cycle-based timestamping system).  Development on the "Classic" version is pretty much dead, and all work has been done on the "rewrite" version, but the "rewrite" version was never finished enough to release it, and still has bugs and missing features.  For example, savestates and the DMC channel are missing from the "rewrite" branch.

I've put together a GCC version of the "Classic" version of PocketNES.  I'm comparing them right now, the code bases had a lot of changes made to them between the forks.

As for the Punch Out thing, there are two pieces to that puzzle.  One part is to figure out and accurately time when the NES fetches particular tiles from video memory.  The other part is to change PocketNES so it uses the GBA Window feature to allow the background to be drawn from at least two different pattern tables in the same scanline.  Implementing the feature where it can switch video memory multiple times in the same scanline will also fix Marble Madness.
The way I'd implement figuring out when tiles get fetched:
* Whenever scroll changes (with screen on),  PPUCTRL changes the pattern table background tiles use (with screen on), or the screen turns on:
** walk down the tilemap, obeying the current mirroring setting, looking for FD or FE bytes
** set a timeout the next time it encounters one for the correct pixel location
** Maybe use a one tilemap row limit so it doesn't check too many tiles?  Would need to recheck every time the tilemap row changes.
This is harder to do in the "classic" branch of PocketNES, since you need to wait for the scanline to be correct, then mess with the cycles register so it times out mid-way through the scanline.
Right now, PocketNES is still using Flubba's old hack for punch out, I don't even remember if that supports scrolling.

Edit: I'll go post the "Classic" branch of Pocketnes GCC source code in case you want to see it...  This is going to be hard to merge into Nes DS..


Attachments:
zip pocketnes_gcc_source.zip, Size: 171.84 KiB, Downloads: 40

"We are merely sprites that dance at the beck and call of our button pressing overlord."

Offline

#3 2011-03-28 6:26:23 pm

Dwedit
Alex Trebek (Administrator)
From: Chicago
Registered: 2004-12-12
Posts: 981
Website

Re: Hi! Just to see you....

I also made a build that's supposed to work on the DS, but fails when I try it on my R4.  Even though it works fine on DS emulators.  No sound, no DS-specific screen scaling, just barely runs.


Attachments:
zip pocketnes_ds.zip, Size: 238.66 KiB, Downloads: 32

"We are merely sprites that dance at the beck and call of our button pressing overlord."

Offline

#4 2011-03-28 6:27:33 pm

marlin
Slime
Slime
Registered: 2011-03-27
Posts: 3

Re: Hi! Just to see you....

e.. Sometimes, sprite fetching would also change the latch that the BG uses. So it would be hard to emu the mapper9&10 games accurately...
I will try some other ways...

Offline

#5 2011-03-28 6:37:22 pm

marlin
Slime
Slime
Registered: 2011-03-27
Posts: 3

Re: Hi! Just to see you....

Dwedit wrote:

I also made a build that's supposed to work on the DS, but fails when I try it on my R4.  Even though it works fine on DS emulators.  No sound, no DS-specific screen scaling, just barely runs.

Emulators will skip the illegal instructions, that is why it would run fine on them... I just tried it on my DS, got a flicking white screen... The operations on the VRAM region may be wrong...
Maybe the 'thumb' or 'str rx, [rx]'...

Offline

Quick reply

Write your message and submit

Board footer

Powered by FluxBB