It is currently Tue Dec 12, 2017 9:22 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: VS Excitebike [solved]
PostPosted: Sat Jun 10, 2017 8:31 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3076
Location: Brazil
In my emulator, the game freezes on startup, waiting for an NMI (jmp $85F4, same of PC register). If I press RESET or HARD RESET, the game works.

Any clue what I'm missing on my CPU/PPU startup?


Last edited by Zepper on Sun Jun 11, 2017 5:44 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: VS Excitebike
PostPosted: Sat Jun 10, 2017 9:10 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6509
Location: Seattle
It looks like Vs Excitebike explicitly chooses to go into that infinite loop if P2 start (i.e. "3 player" ?) is pressed on power-up:
Code:
  lda $14                 
  ora $15                 
  and #$10                 
  beq $85F7               
  jmp $85F4               


Top
 Profile  
 
 Post subject: Re: VS Excitebike
PostPosted: Sun Jun 11, 2017 5:43 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3076
Location: Brazil
I believe it's another game that relies on the startup contents of RAM. Filling up with zeroes won't boot, but will do if filled up with $FF.


Last edited by Zepper on Sun Jun 11, 2017 6:21 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Sun Jun 11, 2017 5:57 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6509
Location: Seattle
Er.

The first 22 instructions in the reset vector unambiguously include a loop that clears all internal RAM:
Code:
_Reset  $85AF  78:          sei
        $85B0  D8:          cld
        $85B1  A9 00:       lda #$00
        $85B3  8D 00 20:    sta $2000
        $85B6  A2 FF:       ldx #$FF
        $85B8  9A:          txs
-       $85B9  AD 02 20:    lda $2002
        $85BC  29 80:       and #$80
        $85BE  F0 F9:       beq -               ; $85B9
-       $85C0  AD 02 20:    lda $2002
        $85C3  29 80:       and #$80
        $85C5  F0 F9:       beq -               ; $85C0
        $85C7  A0 07:       ldy #$07 ; loop that clears memory starts here, with address 0x700
        $85C9  84 01:       sty $01
        $85CB  A0 00:       ldy #$00
        $85CD  84 00:       sty $00
        $85CF  98:          tya
-       $85D0  91 00:       sta ($00),y
        $85D2  88:          dey ; counting down, so 700 7FF 7FE &c
        $85D3  D0 FB:       bne -               ; $85D0
        $85D5  C6 01:       dec $01 ; counting down, so 700 600 500 &c
        $85D7  10 F7:       bpl -               ; $85D0


Top
 Profile  
 
PostPosted: Sun Jun 11, 2017 6:17 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3076
Location: Brazil
Odd. I don't know what to say... it should work, but it isn't.

EDIT: argh, you're right. What could be avoiding its proper boot?
EDIT2: it seems that holding START affects the boot, since I press "ENTER" mapped to START.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: MLX and 9 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