It is currently Thu Oct 19, 2017 10:30 pm

All times are UTC - 7 hours



Forum rules


Related:



Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Sun Oct 20, 2013 11:12 pm 
Offline
User avatar

Joined: Sat Jun 27, 2009 11:05 pm
Posts: 712
Location: New Mexico, USA
Below is a snip of the code from SPC2ROM's Player.s source file:

Code:
;16-bit Accumulator
A16 MACRO
   ON16A ; jwdonal - this does nothing as far as I can tell.
         ; It is not a macro and it doesn't cause any code to be generated.
   ReP   #20h
   ENDM

;8-bit Accumulator
A8 MACRO
   OFF16A ; jwdonal - this does nothing as far as I can tell.
          ; It is not a macro and it doesn't cause any code to be generated.
   SeP   #20h
   ENDM

.................<snip>.....................

   ;==============
   ;Transfer SPC700 program

   ;Wait for SPC700 to initialize -------------
   A16
Init:
   LdA   #0BBAAh
_Wait:
   Cmp   2140h
   BNE   _Wait

   ;Initialize transfer -----------------------
   LdA   #02h            ;Store destination address
   StA   2142h

   LdA   #1CCh         ;Tell SPC700 we're ready to start
Trans:
   StA   2140h
   A8
_Wait:
   Cmp   2140h
   BNE   _Wait

My concern is with the 16-bit operation "StA 2140h which writes the value #$01CC to both $2140 and $2141 with a single instruction. I had read somewhere that you were not supposed to use 16-bit operations to write to those ports because it could inadvertently cause the value at $2143 to become corrupted (due to switching noise on the B address bus)....? Is this not true? Has someone confirmed that it doesn't actually matter?


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 6 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