Space Race

Moderator: Moderators

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

Re: Space Race

Post by tokumaru »

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: 779
Joined: Sat Jan 09, 2016 9:21 pm
Location: Central Illinois, USA
Contact:

Re: Space Race

Post by gauauu »

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: 779
Joined: Sat Jan 09, 2016 9:21 pm
Location: Central Illinois, USA
Contact:

Re: Space Race

Post by gauauu »

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: 3079
Joined: Fri May 08, 2015 7:17 pm

Re: Space Race

Post by dougeff »

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: 779
Joined: Sat Jan 09, 2016 9:21 pm
Location: Central Illinois, USA
Contact:

Re: Space Race

Post by gauauu »

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: 779
Joined: Sat Jan 09, 2016 9:21 pm
Location: Central Illinois, USA
Contact:

Re: Space Race

Post by gauauu »

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: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Re: Space Race

Post by thefox »

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: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Space Race

Post by tepples »

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: 779
Joined: Sat Jan 09, 2016 9:21 pm
Location: Central Illinois, USA
Contact:

Re: Space Race

Post by gauauu »

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: 779
Joined: Sat Jan 09, 2016 9:21 pm
Location: Central Illinois, USA
Contact:

Re: Space Race

Post by gauauu »

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 606 times
Amitari
Posts: 9
Joined: Fri Jul 22, 2016 7:32 pm

Re: Space Race

Post by Amitari »

Could you maybe add support for the Famicom 4-player adapter in the future?
User avatar
gauauu
Posts: 779
Joined: Sat Jan 09, 2016 9:21 pm
Location: Central Illinois, USA
Contact:

Re: Space Race

Post by gauauu »

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 »

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: 779
Joined: Sat Jan 09, 2016 9:21 pm
Location: Central Illinois, USA
Contact:

Re: Space Race

Post by gauauu »

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 »

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