nesasm: ISC* instruction IS IN THE ENTIRE ROM

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

Post Reply
baboomerang
Posts: 2
Joined: Mon Oct 29, 2018 8:51 pm

nesasm: ISC* instruction IS IN THE ENTIRE ROM

Post by baboomerang » Sat Jul 11, 2020 4:55 pm

Good afternoon gents!

Its my first post here, I have this small issue with my code. The Mesen debugger shows ISC* $FFFF on every single address in ROM from $8134 - $BFFF and $C10D - $FFFF. (So basically in the free space of the cpu address space)

Not sure what causes it though, nesasm3.1 may be inserting this by mistake.
https://github.com/baboomerang/6502NES- ... rogram.asm
Here is my entire file so you guys can check it out.

Maybe there is something wrong in my understanding of the 6502 so any insight would be greatly appreciated.

attached below are pictures of the debugger
Attachments
mesen-isc-problem5.png
mesen-isc-problem4.png
mesen-isc-problem3.png
mesen-isc-problem2.png
mesen-isc-problem.png

lidnariq
Posts: 9491
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: nesasm: ISC* instruction IS IN THE ENTIRE ROM

Post by lidnariq » Sat Jul 11, 2020 4:58 pm

ISC $FFFF,x is the interpretation of the three bytes $FF $FF $FF in order. This is correct, and by design.

Programmable memories are "empty" when they hold $FF, and require modification to hold any other value. By putting $FF in these blocks, it speeds up the process of programming, because it can entirely skip over those bytes.

baboomerang
Posts: 2
Joined: Mon Oct 29, 2018 8:51 pm

Re: nesasm: ISC* instruction IS IN THE ENTIRE ROM

Post by baboomerang » Sat Jul 11, 2020 5:25 pm

That is really interesting. thank you! I knew there was something off :lol:

My bad for the newbie question, these 6502 quirks are fascinating.
Also, what about this section? Does mesen ever confuse graphics data for code? (Can it even?)

I found these (and a few more) scattered inside the bottom half of the rom.

Code: Select all

  ISC* $FFFF,X             
  ISC* $2536,X             
  NOP* $FF,X               
  AND $36,X                
  RLA* $FF,X               
  AND $3B3A,Y              
  ISC* $2321,X             
  ORA ($0F,X)              
  BIT $36                  
  PHP                      
  SLO* $3802               
  ROL $0F                  
  AND #$15                 
  NOP* $0F,X               
  STP*                     
  SEC                      
  ROL $7A                  
  STP*                     
  BRK                      

User avatar
tokumaru
Posts: 11742
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: nesasm: ISC* instruction IS IN THE ENTIRE ROM

Post by tokumaru » Sat Jul 11, 2020 7:16 pm

Most disassemblers will interpret whatever is stored in the inspected area as code, and yes, this will result in things that are not code looking like complete garbage.

Post Reply