It is currently Mon Oct 23, 2017 4:51 am

All times are UTC - 7 hours



Forum rules


Related:



Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Mon Aug 08, 2016 9:29 am 
Offline
User avatar

Joined: Sun Jul 01, 2012 6:44 am
Posts: 337
Location: Lion's den :3
So whenever I attempt to change B, the Data Bank register, to a different value using code like this (assume A = 8 bit):

Code:
lda #$XX
pha
plb

... then B apparently isn't updated to $XX immediately, unlike with Direct Page register changes. The tracelog tells me that several, even dozens of absolute (i.e., 16-bit operand) instructions that use the old data bank may pass before it switches to the new one.

Is this normal? Or what am I doing wrong?

Thanks for any advice! :)

_________________
Some of my projects:
Furry RPG!
Unofficial SNES PowerPak firmware
(See my GitHub profile for more)


Top
 Profile  
 
PostPosted: Mon Aug 08, 2016 10:08 am 
Offline

Joined: Sat Apr 25, 2015 1:47 pm
Posts: 329
Location: FL
plb definitely should be updating DB immediately. What are you using to generate the tracelog?


Top
 Profile  
 
PostPosted: Mon Aug 08, 2016 10:34 am 
Offline
User avatar

Joined: Sun Jul 01, 2012 6:44 am
Posts: 337
Location: Lion's den :3
... I'm a dumb**s. :lol:

Right after posting this, I realized that I was staring at DP (Direct Page) instructions instead of absolute ones like I thought I used in my code ... and DP is always in bank $00, right? So yeah, my mistake. Don't bother with it. :mrgreen:

_________________
Some of my projects:
Furry RPG!
Unofficial SNES PowerPak firmware
(See my GitHub profile for more)


Top
 Profile  
 
PostPosted: Mon Aug 08, 2016 10:52 am 
Offline
User avatar

Joined: Mon Sep 15, 2014 4:35 pm
Posts: 3074
Location: Nacogdoches, Texas
Ramsis wrote:
DP is always in bank $00, right?

I've been using DP as an index register when I've ran out, so this is very good to know, because if anything I'm trying to point to isn't in bank $00 (which I don't think my object table with as many entries as I want will fit in the ram there) then I'm going to have a problem.


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: Boo Berry 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