nesdev.com
http://forums.nesdev.com/

Space Race
http://forums.nesdev.com/viewtopic.php?f=32&t=14683
Page 4 of 6

Author:  tokumaru [ Wed Apr 05, 2017 2:24 pm ]
Post subject:  Re: Space Race

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

Author:  gauauu [ Wed Apr 05, 2017 6:00 pm ]
Post subject:  Re: Space Race

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.

Author:  gauauu [ Wed Apr 05, 2017 6:47 pm ]
Post subject:  Re: Space Race

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?)

Author:  dougeff [ Wed Apr 05, 2017 7:06 pm ]
Post subject:  Re: Space Race

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.

Author:  gauauu [ Wed Apr 05, 2017 9:28 pm ]
Post subject:  Re: Space Race

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.

Author:  gauauu [ Thu Apr 06, 2017 9:43 am ]
Post subject:  Re: Space Race

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:
.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

Author:  thefox [ Thu Apr 06, 2017 10:06 am ]
Post subject:  Re: Space Race

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.

Author:  tepples [ Thu Apr 06, 2017 10:44 am ]
Post subject:  Re: Space Race

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.

Author:  gauauu [ Thu Apr 06, 2017 11:02 am ]
Post subject:  Re: Space Race

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.

Author:  gauauu [ Thu Apr 06, 2017 7:56 pm ]
Post subject:  Re: Space Race

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 43 times

Author:  Amitari [ Tue Apr 11, 2017 11:02 am ]
Post subject:  Re: Space Race

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

Author:  gauauu [ Tue Apr 11, 2017 11:28 am ]
Post subject:  Re: Space Race

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)

Author:  Amitari [ Tue Apr 11, 2017 12:06 pm ]
Post subject:  Re: Space Race

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

Author:  gauauu [ Tue Apr 11, 2017 12:09 pm ]
Post subject:  Re: Space Race

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?

Author:  Amitari [ Tue Apr 11, 2017 12:27 pm ]
Post subject:  Re: Space Race

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.

Page 4 of 6 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/