Space Race

Moderator: Moderators

User avatar
tokumaru
Posts: 11465
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Space Race

Post by tokumaru » Wed Apr 05, 2017 2:24 pm

But if it boots and you can use the menu then surely the problem can't be the CF card, right?

User avatar
gauauu
Posts: 647
Joined: Sat Jan 09, 2016 9:21 pm
Location: Central Illinois, USA
Contact:

Re: Space Race

Post by gauauu » Wed Apr 05, 2017 6:00 pm

Well, got my new CF card today. It works with it. I think the problem was the CF card somehow.

That said, ugh, my game has problems on real hardware. Flickery stuff where the background jumps around improperly. sigh.

User avatar
gauauu
Posts: 647
Joined: Sat Jan 09, 2016 9:21 pm
Location: Central Illinois, USA
Contact:

Re: Space Race

Post by gauauu » Wed Apr 05, 2017 6:47 pm

JRoatch wrote: Usually the only differences I ever see between emulator and console are scrolling jitters and corrupted palettes and tiles due to writing to an active PPU outside of vblank.
Sounds like what I'm seeing now: all sorts of scrolling jitters. Any advice or tricks for finding where I'm messing it up? (Other than just buckling down and examining everywhere I write to PPU?)

User avatar
dougeff
Posts: 2614
Joined: Fri May 08, 2015 7:17 pm
Location: DIGDUG
Contact:

Re: Space Race

Post by dougeff » Wed Apr 05, 2017 7:06 pm

If it's PPU writes outside of v-blank...

In FCEUX, open the debugger, click back on the game, press the back-slash key, will pause it at exactly the start of v-blank. Press the 'run line' button a few times until one of the things says Scanline: -1 (or scanline: 260, I don't know which)

Now set a breakpoint for writes to $2000-2007. Click back on the game, press the back-slash key again. If any writes happened during the frame it will 'break'.

Repeat a few times. (May have to double-click on the breakpoint while you hit the 'run line' button and double-click on it again when you want it to work) Shouldn't take you more than 5 minutes.



If it's not PPU writes outside of v-blank. Perhaps you are just forgetting to reset the scroll after some PPU write inside v-blank.
nesdoug.com -- blog/tutorial on programming for the NES

User avatar
gauauu
Posts: 647
Joined: Sat Jan 09, 2016 9:21 pm
Location: Central Illinois, USA
Contact:

Re: Space Race

Post by gauauu » Wed Apr 05, 2017 9:28 pm

Thanks. Turned out to not be related to accidental PPU writes during rendering, but instead the timing of my purposeful PPU writes during rendering: my sprite0 mid-screen scroll. Not sure exactly what the problem was (none of the emulators I tried would reproduce it), but tightening up the timing of my mid-screen scroll code cleared it up.

There's still one error in the title screen where I do write to the PPU at the wrong time, which messes all sorts of things up on hardware, but that's unrelated to the scroll flickering I was talking about. (Interestingly, the powerpak lets me accidentally overwrite my CHR ROM at run time. oops!)

Thanks for the help, all. Still trying to wrap my brain around the quirks of the NES.

User avatar
gauauu
Posts: 647
Joined: Sat Jan 09, 2016 9:21 pm
Location: Central Illinois, USA
Contact:

Re: Space Race

Post by gauauu » Thu Apr 06, 2017 9:43 am

From another thread:
tokumaru wrote:Can't you just prevent writes from going through if the header indicates the use of CHR-ROM? I'm pretty sure that the PowerPak and the EverDrive do that.
Does the powerpak actually do that? With the following header, Spacey McRacey has a mis-timed write to PPU that ended up changing my graphics in CHR-ROM on the powerpak. Is that to be expected?

Code: Select all

.segment "INESHDR"
  .byt "NES",$1A  ; magic signature
  .byt 2          ; PRG ROM size in 16384 byte units
  .byt 1          ; CHR ROM size in 8192 byte units
  .byt $01        ; mirroring type and mapper number lower nibble
  .byt $00        ; mapper number upper nibble

User avatar
thefox
Posts: 3141
Joined: Mon Jan 03, 2005 10:36 am
Location: Tampere, Finland
Contact:

Re: Space Race

Post by thefox » Thu Apr 06, 2017 10:06 am

gauauu wrote:Does the powerpak actually do that? With the following header, Spacey McRacey has a mis-timed write to PPU that ended up changing my graphics in CHR-ROM on the powerpak. Is that to be expected?
PowerPak mappers do write-protect the RAM used for CHR when the ROM uses CHR-ROM, but the protection can fail if the write happens during rendering (it messes up the timing of PPU's memory control signals). I fixed this issue in PowerMappers.

Details at viewtopic.php?f=9&t=11339.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi

tepples
Posts: 21748
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Space Race

Post by tepples » Thu Apr 06, 2017 10:44 am

In addition, the Action 53 multicart engine uses CHR RAM, and I had to patch a few games on the first volume* to eliminate writes to the pattern tables. So I recommend fixing the corruption rather than relying on the cartridge to ignore it, because the production cartridge won't.


* Including my own, because I'm terrible.

User avatar
gauauu
Posts: 647
Joined: Sat Jan 09, 2016 9:21 pm
Location: Central Illinois, USA
Contact:

Re: Space Race

Post by gauauu » Thu Apr 06, 2017 11:02 am

Yeah, I definitely intend to fix it, the mis-timed write messes up some other things as well. Working on it tonight, hopefully will have a fix by this weekend.

User avatar
gauauu
Posts: 647
Joined: Sat Jan 09, 2016 9:21 pm
Location: Central Illinois, USA
Contact:

Re: Space Race

Post by gauauu » Thu Apr 06, 2017 7:56 pm

Ok, attached build fixes the 2 timing issues that I was seeing on hardware (scrolling glitches, accidental writing to CHR-RAM)
Attachments
spaceyMcRacey.nes
(40.02 KiB) Downloaded 331 times

Amitari
Posts: 9
Joined: Fri Jul 22, 2016 7:32 pm

Re: Space Race

Post by Amitari » Tue Apr 11, 2017 11:02 am

Could you maybe add support for the Famicom 4-player adapter in the future?

User avatar
gauauu
Posts: 647
Joined: Sat Jan 09, 2016 9:21 pm
Location: Central Illinois, USA
Contact:

Re: Space Race

Post by gauauu » Tue Apr 11, 2017 11:28 am

Amitari wrote:Could you maybe add support for the Famicom 4-player adapter in the future?
Seems like a good idea. Do you know if there's an emulator that supports it? (I don't have one, so I'd need some environment to test with)

Amitari
Posts: 9
Joined: Fri Jul 22, 2016 7:32 pm

Re: Space Race

Post by Amitari » Tue Apr 11, 2017 12:06 pm

gauauu wrote:
Amitari wrote:Could you maybe add support for the Famicom 4-player adapter in the future?
Seems like a good idea. Do you know if there's an emulator that supports it? (I don't have one, so I'd need some environment to test with)
Unfortunately, I don't know what emulators support it, and it seems to be impossible to find schematics for it, which is weird considering it's just some wires connected to the expansion port. This would also make it easier to implement since it doesn't use multiplexing unlike the FourScore.
EDIT: Here's documentation for it at least. http://nesdev.com/ffpa.txt

User avatar
gauauu
Posts: 647
Joined: Sat Jan 09, 2016 9:21 pm
Location: Central Illinois, USA
Contact:

Re: Space Race

Post by gauauu » Tue Apr 11, 2017 12:09 pm

Yeah, I found some documentation about how to read it, but without knowing how to test it, I'd be shooting in the dark. Do you have one that you could test with if I send you a build at some point?

Amitari
Posts: 9
Joined: Fri Jul 22, 2016 7:32 pm

Re: Space Race

Post by Amitari » Tue Apr 11, 2017 12:27 pm

gauauu wrote:Do you have one that you could test with if I send you a build at some point?
Unfortunately, no. I have tried to get a hold of one myself, but haven't been able to find one, I might get one in the future though.

Post Reply