It is currently Thu Dec 14, 2017 7:50 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Open bus.. what's that?
PostPosted: Sun Sep 25, 2005 9:40 am 
Offline

Joined: Sat Nov 13, 2004 6:25 am
Posts: 96
Hi all,

So, what's that all about? Are there any NES programs affected by that? Examples?

Lotsa thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 25, 2005 10:03 am 
Offline
User avatar

Joined: Tue Dec 21, 2004 8:35 pm
Posts: 600
Location: Argentina
i guess you refer to save ram.
I think open bus mean that if wram is disabled the cart will read from true 6502 mean instead of the ram that it is inside the cart.
But i guess.. cos i havent deal with save ram.

_________________
ANes


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 25, 2005 10:12 am 
Online
Site Admin
User avatar

Joined: Mon Sep 20, 2004 6:04 am
Posts: 3487
Location: Indianapolis
Many things are affected, but for most games it won't matter. Reading open bus will return the last bit(s) that were on the data bus, if there's nothing to set the bit(s) to a specific state.

There was at least one game, Low G Man I think, that needs it.

Some examples are like reading $7A00 when there's no SRAM, it'll return $7A. Since the high address was the last thing on the data bus. And reading $4016 will return $4x, since the D6 bit (unused by the register) was left set by the address.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 25, 2005 11:11 am 
Offline

Joined: Tue Sep 13, 2005 7:53 am
Posts: 98
Yeah, I know that Low G Man reads from open bus during the stage 1&2 boss music (and possibly for other music as well). If it only reads #$00 instead from $6000-$7FFF, the game will get stuck in the music play routine (hence why it freezes there in some emulators). I had to patch the music play routine to account for this when ripping the NSF.

In Low G Man, the section of the music code that does this is:

Code:
$80A5: LDA $8353,Y
$80A8: STA $01
$80AA: LDY $0D,X
$80AC: LDA ($00),Y    ; here is where the open bus read happens
$80AE: CMP #$30


For the patch I did:

Code:
$80A5: JMP _somewhere
$80A8: STA $01
$80AA: LDY $0D,X
$80AC: LDA ($00),Y
$80AE: CMP #$30

_somewhere:
    LDA $8353,Y
    STA $01
    LDY $0D,X
    CMP #80    ; test high byte of address at $00-$01
    BMI (+3)    ; if address is below $8000, ignore instruction at $80AC, leaving accumulator unchanged*
    JMP $80AC
    JMP $80AE

*as the accumulator has stored the high byte of the $6000-$7FFF address.


I wonder if this is the only place where the open bus read happens in the game.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 25, 2005 12:17 pm 
Offline

Joined: Sat Nov 13, 2004 6:25 am
Posts: 96
Got the idea. Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 25, 2005 1:16 pm 
Offline
User avatar

Joined: Tue Dec 21, 2004 8:35 pm
Posts: 600
Location: Argentina
me too!! thanks again.

_________________
ANes


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: LocalH, Memblers and 4 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