It is currently Sat Nov 18, 2017 9:02 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 68 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
PostPosted: Tue Jan 03, 2017 8:48 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6442
Location: UK (temporarily)
It looks like Nestopia, also, only supports M2- and PPUA12- based IRQs. I have no idea if any existing emulator can support this mapper hack authentically.


Top
 Profile  
 
PostPosted: Wed Jan 04, 2017 5:36 pm 
Offline
User avatar

Joined: Sat Jul 04, 2015 9:58 am
Posts: 563
Location: -29.794229 -55.795374
Hey, looks like it's emulation is troublesome!!

Just a small epilogue... when I bought it, the vendor sold me cheaper because it was "defective":
Attachment:
File comment: KidDrac defect
dracula-kid-nes-72-pinos-pi-D_NQ_NP_449405-MLB25022752776_082016-F.png
dracula-kid-nes-72-pinos-pi-D_NQ_NP_449405-MLB25022752776_082016-F.png [ 1.16 MiB | Viewed 970 times ]

I took the risk and bought it anyway, since it was playable at least.
I tested it in a couple of clones and this supposed deffect never showd up.
Looks like the defect was on his console, who knows...


Top
 Profile  
 
PostPosted: Sun Jan 08, 2017 1:17 am 
Offline

Joined: Mon Dec 12, 2011 8:15 pm
Posts: 352
Still can't working.


Top
 Profile  
 
PostPosted: Mon Jan 09, 2017 7:40 pm 
Offline

Joined: Mon Dec 12, 2011 8:15 pm
Posts: 352
joe,can you working fine?


Top
 Profile  
 
PostPosted: Thu Jan 12, 2017 1:19 pm 
Offline
User avatar

Joined: Sat Feb 16, 2013 11:52 am
Posts: 221
Fisher wrote:
So it was kind of "Metal Gear" stealth action to hide myself and try to do at least part of the job.


I think that it's more of a Splinter Cell scenario in your case, Fisher.


sorry

_________________
This is a block of text that can be added to posts you make. There is a 255 character limit.


Top
 Profile  
 
PostPosted: Thu Jan 12, 2017 2:07 pm 
Offline

Joined: Mon Apr 01, 2013 11:17 pm
Posts: 437
zxbdragon wrote:
joe,can you working fine?

Is there an emulator that can use PPU A13 to generate IRQs? (MMC3 uses PPU A12 to generate IRQs.)

Otherwise, you can use a hack to generate one IRQ for every two scanlines (count += 43 on each scanline), but timing won't be correct.


Top
 Profile  
 
PostPosted: Fri Jan 13, 2017 2:49 am 
Offline
User avatar

Joined: Sat Jul 04, 2015 9:58 am
Posts: 563
Location: -29.794229 -55.795374
Quote:
I think that it's more of a Splinter Cell scenario in your case, Fisher.

Oh yeah! :lol:
People keep saying I should play that series of games, and I always keep forgotting. :oops:
Code:
sorry

Don't feel sorry!
It was a joke, intended to someone else to laugh and joke too, like you did. :lol:

Joe and Zxbdragon, I think proper support for this pirate mapper would need a rewrite of the emulator's core. Would it?
For a user's perspective this would not do much difference, since the original game is already playable.
But the on the developer's side, it's the challenge of doing it properly that makes all the difference.
If I'm understanding properly what I've been reading, this is the fuel that keeps emulation community as a whole active.
So I say: Power to you guys! Don't give up.
As a old boss I had said: The impossible is only a little bit protracted. (hope I have translated it right)


Top
 Profile  
 
PostPosted: Fri Jan 13, 2017 3:47 am 
Offline

Joined: Mon Apr 01, 2013 11:17 pm
Posts: 437
Fisher wrote:
Joe and Zxbdragon, I think proper support for this pirate mapper would need a rewrite of the emulator's core. Would it?

That depends on the emulator. I've only looked at FCEUX, and it doesn't provide any way for the mapper to track PPU A13. The easy hack would be to just trigger the IRQ every other scanline, but timing would be wrong. It may be possible to do it better using a combination of scanline and CPU-cycle counters in FCEUX, but that's more work than I'm willing to put into this (and probably still wouldn't be accurate).

If there's an emulator core that has some way for the mapper to track the PPU A13 line, then I'll give it a shot.


Top
 Profile  
 
PostPosted: Fri Jan 13, 2017 12:12 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6442
Location: UK (temporarily)
Nestopia's code base also seems to have only implemented support for PPU A12 and M2-based IRQs, even though the OO goo makes it look like it should be more useful... ("What do you mean no one ever implemented Nst::Core::Timer::A13 ?")

I strongly suspect the answer is "no one has ever written support for that in an emulator because this is the first board documented to do this"


Top
 Profile  
 
PostPosted: Fri Jan 13, 2017 1:37 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19225
Location: NE Indiana, USA (NTSC)
I thought MMC5's timer used three consecutive PPU reads with A13 low as the trigger to find the next scanline. What did I miss?


Top
 Profile  
 
PostPosted: Fri Jan 13, 2017 1:59 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6442
Location: UK (temporarily)
Nestopia doesn't implement it that way.

It implements the MMC5 IRQ by violating the abstraction around the PPU's H and V counters.


Top
 Profile  
 
PostPosted: Wed Jan 18, 2017 3:04 am 
Offline

Joined: Mon Dec 12, 2011 8:15 pm
Posts: 352
What is the difference between A13,A12?


Top
 Profile  
 
PostPosted: Wed Jan 18, 2017 8:48 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19225
Location: NE Indiana, USA (NTSC)
There are 341 dots in each scanline. The PPU reads memory every other dot, or 170 reads per scanline.
Normally, the PPU alternates between two nametable reads and two pattern table reads, performing 42 full sets of four reads each scanline.
When the PPU is reading the first pattern table, A12 and A13 are both low.
When the PPU is reading the second pattern table, A12 is high and and A13 is low.
When the PPU is reading nametables, A12 is low and and A13 is high.

How an A12-based timer works: (MMC3)
The PPU performs 32 sets of reads for background, 8 sets of reads for sprites, and then 2 more sets of reads for the background to set up the next scanline. If a game puts background tiles in the first pattern table and sprite tiles in the second pattern table, then A12 will be low during nametable and background pattern fetches, which represent most of the line, and it will go high several times near the end of the scanline when the PPU is fetching sprite patterns. By watching for several successive reads with A12 low followed by a read with A12 high, the mapper can infer that a new scanline has started.

How an A13-based timer might work:
Between one scanline and the next, the PPU's state machine pauses, causing it to read nametables four times in a row: the first of a set of four twice (ignored) plus the first two of the next set of four (used). By watching for several successive reads with A13 low, the mapper can infer that a new scanline has started.

EDIT: MMC5 relies on the same phenomenon as an A13 spreader but compares the whole address instead of just watching A13.


Top
 Profile  
 
PostPosted: Wed Jan 18, 2017 4:46 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6442
Location: UK (temporarily)
This should be titled "How the MMC5's scanline timer works":
tepples wrote:
Between one scanline and the next, the PPU's state machine pauses, causing it to read nametables four times in a row: two that don't belong to a set of four plus the first two of the next set of four. By watching for several successive reads with A13 low, the mapper can infer that a new scanline has started.


This pirate port instead just counts falling edges of PPU A13, which happens during at the beginning of each pattern table fetches for both sprites and background tiles.


Top
 Profile  
 
PostPosted: Wed Jan 18, 2017 4:56 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19225
Location: NE Indiana, USA (NTSC)
So I guess this must be the PA13 counterpart of the JY Company mapper (209 and its subsets 90 and 211), whose PA12 counter is followed by a division by 8 instead of a pulse spreader.

M2 prescaler: VRC IRQ, JY Company
PA12 spreader: MMC3
PA12 prescaler: JY Company
PA13 spreader: MMC5
PA13 prescaler: This


EDIT: Mistake stricken per Drag's result


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 68 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 3 guests


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group