SPC2ROM using 16-bit operations during upload

Discussion of hardware and software development for Super NES and Super Famicom.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
Post Reply
User avatar
jwdonal
Posts: 719
Joined: Sat Jun 27, 2009 11:05 pm
Location: New Mexico, USA
Contact:

SPC2ROM using 16-bit operations during upload

Post by jwdonal »

Below is a snip of the code from SPC2ROM's Player.s source file:

Code: Select all

;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?
Post Reply