It is currently Mon Oct 23, 2017 1:06 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 721 posts ]  Go to page Previous  1 ... 18, 19, 20, 21, 22, 23, 24 ... 49  Next
Author Message
 Post subject: Re: Version 0.78
PostPosted: Mon Jan 13, 2014 7:46 am 
Offline
User avatar

Joined: Sat Jan 22, 2005 8:51 am
Posts: 427
Location: Chicago, IL
FHorse wrote:
Improved handling of IRQ in the mapper 64 ("Hard Drivin.nes" now works correctly).

What do you have to do for this? I briefly looked into this a few months ago but wasn't able to come up with something that worked for Hard Drivin without breaking other mapper 64 games.

_________________
get nemulator
http://nemulator.com


Top
 Profile  
 
 Post subject: Re: Version 0.78
PostPosted: Mon Jan 13, 2014 8:26 am 
Offline

Joined: Sat May 08, 2010 9:31 am
Posts: 225
James wrote:
What do you have to do for this? I briefly looked into this a few months ago but wasn't able to come up with something that worked for Hard Drivin without breaking other mapper 64 games.
Now I'm in the office, I'll answer when I'm back home.


Top
 Profile  
 
PostPosted: Mon Jan 13, 2014 8:55 am 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3064
Location: Brazil
@James

Read here. I recently did it for RockNES.


Top
 Profile  
 
PostPosted: Mon Jan 13, 2014 6:19 pm 
Offline

Joined: Mon Jan 13, 2014 5:28 pm
Posts: 1
I think there may be a memory leak in the windows 64 bit version. First I was noticing this with version 0.72 but then upgraded to 0.77 and still see the memory continue to creek up.

I downloaded the windows 32 bit version and there doesn't seem to a leak there.

I just thought I'd check and let you know that there may be a problem.


Top
 Profile  
 
PostPosted: Tue Jan 14, 2014 1:47 am 
Offline

Joined: Sat May 08, 2010 9:31 am
Posts: 225
Mezada wrote:
I think there may be a memory leak in the windows 64 bit version. First I was noticing this with version 0.72 but then upgraded to 0.77 and still see the memory continue to creek up.

I downloaded the windows 32 bit version and there doesn't seem to a leak there.

I just thought I'd check and let you know that there may be a problem.
Could you be more specific please? I did some test but I have not encountered any problems. If you told me exactly what you noticed and what condition occurs would help me a lot. From now on, I'll write you via private message.


Top
 Profile  
 
 Post subject: Re: Version 0.78
PostPosted: Tue Jan 14, 2014 3:57 am 
Offline

Joined: Sat May 08, 2010 9:31 am
Posts: 225
James wrote:
FHorse wrote:
Improved handling of IRQ in the mapper 64 ("Hard Drivin.nes" now works correctly).

What do you have to do for this? I briefly looked into this a few months ago but wasn't able to come up with something that worked for Hard Drivin without breaking other mapper 64 games.
after looking at the implementation of Zepper (thx for the link :)) and was not convinced of my implementation, I continued to experiment with the IRQ of the mapper 64. The solution I found that works regularly with all the roms (Klanx, Skull & Crossbones, Shinobi etc.) is:

Code:
static void INLINE irq_clock_Tengen_Rambo(void) {
   /* irqA12.reload = TRUE when something is written in reg $C001 */
   if (irqA12.reload == TRUE)  {
      if (irqA12.latch <= 1) {
         irqA12.counter = irqA12.latch + 1;
      } else {
         irqA12.counter = irqA12.latch + 2;
      }
      irqA12.reload = FALSE;
   } else if (!irqA12.counter) {
      irqA12.counter = irqA12.latch + 1;
   }

   irqA12.counter--;
   if (!irqA12.counter && irqA12.enable) {
      /* wait one M2 cycle, then trigger IRQ */
   }
}
I said, it's just an experiment, but this way everything seems to work fine.


Top
 Profile  
 
PostPosted: Tue Jan 14, 2014 4:55 am 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3064
Location: Brazil
So, I have to ask: what's the problem with my IRQ suggestion? What's glitched if compared with yours? As I said, I tested the games and see no problems.


Top
 Profile  
 
PostPosted: Tue Jan 14, 2014 6:02 am 
Offline

Joined: Tue Jan 14, 2014 5:56 am
Posts: 3
game "Trog" - does not work on the emulator.
please fix it.


Top
 Profile  
 
PostPosted: Tue Jan 14, 2014 7:02 am 
Offline

Joined: Sat May 08, 2010 9:31 am
Posts: 225
Zepper wrote:
So, I have to ask: what's the problem with my IRQ suggestion? What's glitched if compared with yours? As I said, I tested the games and see no problems.
When I started experimenting I did not know your suggestions, I read your post just after. I just wanted to continue what I had started. Now also try your implementation before but could you explain something that I did not understand:
Code:
Next CPU clock:

    IF $C001 was written to after previous clock
        reload IRQ counter with IRQ Reload value PLUS ONE
    ELSE IF IRQ counter is 0
        reload IRQ counter with IRQ Reload value
What do you mean with "Next CPU clock"?
breaker1976 wrote:
game "Trog" - does not work on the emulator.
please fix it.
"Trog" works fine in puNES, probably the problem is with some roms on the network that have a dirty iNES header ("!DISKDUDE!") that contains information about the mapper wrong (66 instead of 2). In the next release will add an entry in the database to automatically set the correct mapper. Thanks for the report.


Top
 Profile  
 
PostPosted: Tue Jan 14, 2014 7:15 am 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3064
Location: Brazil
Hmm... terminology problem. :)

- Next CPU cycle (or next instruction).


Top
 Profile  
 
PostPosted: Tue Jan 14, 2014 7:31 am 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 2963
Location: Tampere, Finland
Zepper wrote:
Hmm... terminology problem. :)

- Next CPU cycle (or next instruction).

No, ambiguity problem. "Next CPU clock" is ambiguous unless you specify a reference point (e.g. "the next CPU clock after a write to $1234").

Also, why do you equate "next CPU cycle" with "next instruction"?

_________________
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: kkfos.aspekt.fi


Top
 Profile  
 
PostPosted: Tue Jan 14, 2014 8:09 am 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3064
Location: Brazil
*shrugs*
Yeah, my bad. Sorry for the confusion of "cycle" with "next instruction". :(

Well, every cycle on 6502 is either a read or a write cycle. So, you update the IRQ counter in the next CPU cycle.

Got it?


Top
 Profile  
 
 Post subject: Re: Version 0.78
PostPosted: Tue Jan 14, 2014 9:31 am 
Offline
User avatar

Joined: Sat Jan 22, 2005 8:51 am
Posts: 427
Location: Chicago, IL
FHorse wrote:
Code:
      if (irqA12.latch <= 1) {
         irqA12.counter = irqA12.latch + 1;
      } else {
         irqA12.counter = irqA12.latch + 2;
      }
I said, it's just an experiment, but this way everything seems to work fine.

Cool. I saw similar behavior with my hardware tests (i.e., counter sometimes being incremented by latch + 1, sometimes by latch + 2), but I wasn't able to reliably reproduce it/nail down the precise behavior. I'll give this a try soon. Thanks!

_________________
get nemulator
http://nemulator.com


Top
 Profile  
 
 Post subject: Re: Version 0.78
PostPosted: Sat Jan 18, 2014 11:01 am 
Offline
User avatar

Joined: Sat Jan 22, 2005 8:51 am
Posts: 427
Location: Chicago, IL
FHorse wrote:
I said, it's just an experiment, but this way everything seems to work fine.

It's close, but something still isn't quite right. This line doesn't appear on real hardware (my emulator has the same problem). Hard Drivin' definitely looks better, but still a little glitchy (I have no idea how it looks on real hardware, though).

Image

_________________
get nemulator
http://nemulator.com


Top
 Profile  
 
 Post subject: Re: Version 0.78
PostPosted: Sat Jan 18, 2014 12:55 pm 
Offline

Joined: Sat May 08, 2010 9:31 am
Posts: 225
James wrote:
FHorse wrote:
I said, it's just an experiment, but this way everything seems to work fine.

It's close, but something still isn't quite right. This line doesn't appear on real hardware (my emulator has the same problem).
I lost a bit of time studying the problem and I noticed one thing, the only game that uses, during the phases of the game, both IRQ modes (SCANLINE and CPU mode) is just "Skull & Crossbones". I also noticed that the problem (in "SCANLINE" mode there are a "delay" of one scanline) occurs precisely in the transition between the "CPU mode" to "SCANLINE mode". Understanding this, I did an experiment assuming that this transition from one mode to another can take place after ANOTHER CLOCK of IRQ in the "previous" mode ("CPU mode") perhaps for a delay of some sort. To be clear, after the write in the reg $C001, are needed more than four CPU clock cycles before the switch takes place, allowing another clock of irq running the reload. Simulated this, the problem is gone. Unfortunately I have no chance to experiment with hardware this conjecture.
James wrote:
Hard Drivin' definitely looks better, but still a little glitchy (I have no idea how it looks on real hardware, though).
http://www.lostlevels.org/hard-drivin/ I think that the video in this page are recorder from a real NES but I'm not sure.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 721 posts ]  Go to page Previous  1 ... 18, 19, 20, 21, 22, 23, 24 ... 49  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 8 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