Space Race

Moderator: Moderators

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 for the feedback!
Rules are not explicitly stated: as I read the blurb I do not know if it is hard to figure out
Yeah, that's what one of my local playtesters said. I haven't figured out the best solution yet (a wall of text won't help. Maybe an animated example at the beginning would have been better)
It is not clear that 1-player mode exists: the title screen says 2-4 players and nothing blinks when adding the first to say that it can be started
You're right. The 1-player mode was a last-minute addition. I should have made it more clear.

I appreciate your thoughts!
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Space Race

Post by tepples »

I noticed in a hex editor that you used 18K of the 32K PRG ROM, and there's a whole bunch of repetitive stuff elsewhere in PRG ROM. Is there a way you could trim 2K off to fit in NROM-128?
User avatar
gauauu
Posts: 779
Joined: Sat Jan 09, 2016 9:21 pm
Location: Central Illinois, USA
Contact:

Re: Space Race

Post by gauauu »

I'll see what I can do.

Some quick spot checks and counting show me a few hundred bytes I can easily shave off by removing redundancy. 2k might be tricky though unless I cut a song, unless I'm missing an obvious chunk. I'll look further.
User avatar
gauauu
Posts: 779
Joined: Sat Jan 09, 2016 9:21 pm
Location: Central Illinois, USA
Contact:

Re: Space Race

Post by gauauu »

Updated version that (I hope) properly clears nametables at the beginning. I'm in the middle of a move to a new home, so I haven't had a chance to test this as well as I'd like....
Attachments
spaceyMcRacey.nes
(40.02 KiB) Downloaded 402 times
JRoatch
Formerly 43110
Posts: 422
Joined: Wed Feb 05, 2014 7:01 am
Contact:

Re: Space Race

Post by JRoatch »

So this is really bizarre and I can't even begin to imagine what the bug is.
When I play this on fceux, there's background music.
When I play this on console via Power Pak, there's no background music, but yet there is sound effects!

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.
But in this case, an entire chunk of logic is somehow skipped over, and without affecting game play.

The game uses "Main thread only" with NMI just incrementing a flag, this also uses a sprite zero hit scroll split.

if I wanted to debug this, how I should begin?
User avatar
rainwarrior
Posts: 8731
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Space Race

Post by rainwarrior »

JRoatch wrote:So this is really bizarre and I can't even begin to imagine what the bug is.
When I play this on fceux, there's background music.
When I play this on console via Power Pak, there's no background music, but yet there is sound effects!

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.
But in this case, an entire chunk of logic is somehow skipped over, and without affecting game play.

The game uses "Main thread only" with NMI just incrementing a flag, this also uses a sprite zero hit scroll split.

if I wanted to debug this, how I should begin?
Using FCEUX's "Config > Ram Init" option, I find if I initialize RAM to $00 the BGM plays, if I initialize to $FF it does not.

I don't know if there's much to debug beyond that, but basically this ROM does not appear to initialize most of RAM, aside from wiping its OAM upload page at $0200, and also clearing ZP. Thus, many variables end up being used before having been set to any specific value.

(I personally like to leave FCEUX's RAM Init option set to "random", and strongly recommend initializing as much of RAM as is practical at startup.)

Edit: I just realized the "Ram init" option is not in 2.2.3, it's only in more recent interim builds: download page
User avatar
gauauu
Posts: 779
Joined: Sat Jan 09, 2016 9:21 pm
Location: Central Illinois, USA
Contact:

Re: Space Race

Post by gauauu »

When I play this on console via Power Pak, there's no background music, but yet there is sound effects!
Ugh, I've spent the last few evenings trying to get my new PowerPak to work. I've been through 2 different CF cards and 3 different computers, but it can never get past "loading game"....so I've never tested it on real hardware yet :-(
rainwarrior wrote: basically this ROM does not appear to initialize most of RAM, aside from wiping its OAM upload page at $0200, and also clearing ZP. Thus, many variables end up being used before having been set to any specific value.
Good catch, thanks Rainwarrior. I tended to initialize variables in subsystem-specific init routines, but never did a full wipe of RAM, which I guess means I missed some memory needed by the music engine.
(I personally like to leave FCEUX's RAM Init option set to "random", and strongly recommend initializing as much of RAM as is practical at startup.)
Yeah, I guess I need to do that. Thanks.
User avatar
gauauu
Posts: 779
Joined: Sat Jan 09, 2016 9:21 pm
Location: Central Illinois, USA
Contact:

Re: Space Race

Post by gauauu »

Attached is a new version where I attempt to clear ram. I'll try on my powerpak in 2 days when the new CF card I ordered shows up. JRoatch, if you happen to try it before then, let me know.

Thanks for catching that bug.
Attachments
spaceyMcRacey.nes
(40.02 KiB) Downloaded 392 times
JRoatch
Formerly 43110
Posts: 422
Joined: Wed Feb 05, 2014 7:01 am
Contact:

Re: Space Race

Post by JRoatch »

rainwarrior wrote:I find if I initialize RAM to $00 the BGM plays, if I initialize to $FF it does not.
It would be this, I'm embarrassed that I didn't try this. :oops: Thank you.
gauauu wrote:Attached is a new version where I attempt to clear ram. I'll try on my powerpak in 2 days when the new CF card I ordered shows up. JRoatch, if you happen to try it before then, let me know.

Thanks for catching that bug.
I'm not sure if anything changed in this. It still does not initialize $0300-$07ff and behaves the same as before.

I've made a simple IPS patch that will fix is by initializing RAM.

patch source:

Code: Select all

;; compile IPS patch with asm6
.byte "PATCH"

.byte $00, $80-$80, $2a+$10
.byte $00, __802a_end-__802a

.base $802a
__802a:
  ;; originaly
  ; sta $00,x
  ; inx
  ; bne __802a
  jmp __c750
  nop
  nop
__802a_end:

.byte $00, $c7-$80, $50+$10
.byte $00, __c750_end-__c750

.base $c750
__c750:
    sta $00,x
    sta $0100,x
    ;sta $0200,x ; no OAM clear
    sta $0300,x
    sta $0400,x
    sta $0500,x
    sta $0600,x
    sta $0700,x
    inx
  bne __c750
  jmp __802a_end
__c750_end:

.byte "EOF"
Attachments
2017-04-04_RAM-init-patch.ips
(49 Bytes) Downloaded 390 times
User avatar
gauauu
Posts: 779
Joined: Sat Jan 09, 2016 9:21 pm
Location: Central Illinois, USA
Contact:

Re: Space Race

Post by gauauu »

Now that I'm off work, I can take a look tonight. I added code to do just what your patch did. Maybe somehow I uploaded an old version. Thanks for your help and I'll take a look further here.
User avatar
gauauu
Posts: 779
Joined: Sat Jan 09, 2016 9:21 pm
Location: Central Illinois, USA
Contact:

Re: Space Race

Post by gauauu »

Derp, I'm a moron. I had a stupid off-by-one bug in my clear loop that made it exit after the first time through. New version attached.
Attachments
spaceyMcRacey.nes
(40.02 KiB) Downloaded 374 times
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Re: Space Race

Post by thefox »

gauauu wrote:Ugh, I've spent the last few evenings trying to get my new PowerPak to work. I've been through 2 different CF cards and 3 different computers, but it can never get past "loading game"....so I've never tested it on real hardware yet :-(
If the file menu shows up, I'd expect the CF card to work as well. Make sure some other problem is not causing the loading to fail (like missing mapper files).
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
User avatar
gauauu
Posts: 779
Joined: Sat Jan 09, 2016 9:21 pm
Location: Central Illinois, USA
Contact:

Re: Space Race

Post by gauauu »

thefox wrote:
gauauu wrote:Ugh, I've spent the last few evenings trying to get my new PowerPak to work. I've been through 2 different CF cards and 3 different computers, but it can never get past "loading game"....so I've never tested it on real hardware yet :-(
If the file menu shows up, I'd expect the CF card to work as well. Make sure some other problem is not causing the loading to fail (like missing mapper files).
Yeah, I tried a few times to reformat the card, re-download and extract the POWERPAK directory (tried both 1.34 and 1.20), and then launch the demo nes rom included in that directory (as well as other rom images). Same issue. Both CF cards were ancient tiny cards, so I've ordered a new one which should arrive tomorrow. We'll see if that makes a difference.... :?
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Space Race

Post by tepples »

How tiny were they? If at least 120 MB, you could try reformatting them as FAT16 instead of FAT12.
User avatar
gauauu
Posts: 779
Joined: Sat Jan 09, 2016 9:21 pm
Location: Central Illinois, USA
Contact:

Re: Space Race

Post by gauauu »

32MB :)
Post Reply