News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: NESASM assembly hacking problem Overflow error when moving code to a new bank  (Read 1288 times)

Nalwonk

  • Newbie
  • *
  • Posts: 2
    • View Profile
I'm going to start out by admitting I'm in a little over my head here, so I'm sorry if this seems stupid.

I'm working on a hack of SMB 1.  I found a copy of SMBDIS converted to NESASM format since I'm more used to the way that assembler works from working with the SMB3 disassembly, and how bank division works with it, since part of what I'm doing is expanding it to MMC3

I've got it to assemble fine expanded, but when I try to move the sound engine over to its own bank to make room in the last bank for the switching routine, I get Overflow errors on the MusicHeaderData.  None of it should be looking outside the bank in question for anything, as far as I can tell, the information it's looking for is directly after it.
The errors I'm getting are as follows:
  921  02:A63E                  .db DeathMusHdr-MHD           ;event music
       Overflow error!
  922  02:A63F                  .db GameOverMusHdr-MHD
       Overflow error!
  923  02:A640                  .db VictoryMusHdr-MHD
       Overflow error!
  924  02:A641                  .db WinCastleMusHdr-MHD
       Overflow error!
  925  02:A642                  .db GameOverMusHdr-MHD
       Overflow error!
  926  02:A643                  .db EndOfLevelMusHdr-MHD
       Overflow error!
  927  02:A644                  .db TimeRunningOutHdr-MHD
       Overflow error!
  928  02:A645                  .db SilenceHdr-MHD
       Overflow error!
  930  02:A646                  .db GroundLevelPart1Hdr-MHD   ;area music
       Overflow error!
  931  02:A647                  .db WaterMusHdr-MHD
       Overflow error!
  932  02:A648                  .db UndergroundMusHdr-MHD
       Overflow error!
  933  02:A649                  .db CastleMusHdr-MHD
       Overflow error!
  934  02:A64A                  .db Star_CloudHdr-MHD
       Overflow error!
  935  02:A64B                  .db GroundLevelLeadInHdr-MHD
       Overflow error!
  936  02:A64C                  .db Star_CloudHdr-MHD
       Overflow error!
  937  02:A64D                  .db SilenceHdr-MHD
       Overflow error!
  939  02:A64E                  .db GroundLevelLeadInHdr-MHD  ;ground level music layout
       Overflow error!
  940  02:A64F                  .db GroundLevelPart1Hdr-MHD, GroundLevelPart1Hdr-MHD
       Overflow error!
  941  02:A650                  .db GroundLevelPart2AHdr-MHD, GroundLevelPart2BHdr-MHD, GroundLevelPart2AHdr-MHD, GroundLevelPart2CHdr-MHD
       Overflow error!
  942  02:A651                  .db GroundLevelPart2AHdr-MHD, GroundLevelPart2BHdr-MHD, GroundLevelPart2AHdr-MHD, GroundLevelPart2CHdr-MHD
       Overflow error!
  943  02:A652                  .db GroundLevelPart3AHdr-MHD, GroundLevelPart3BHdr-MHD, GroundLevelPart3AHdr-MHD, GroundLevelLeadInHdr-MHD
       Overflow error!
  944  02:A653                  .db GroundLevelPart1Hdr-MHD, GroundLevelPart1Hdr-MHD
       Overflow error!
  945  02:A654                  .db GroundLevelPart4AHdr-MHD, GroundLevelPart4BHdr-MHD, GroundLevelPart4AHdr-MHD, GroundLevelPart4CHdr-MHD
       Overflow error!
  946  02:A655                  .db GroundLevelPart4AHdr-MHD, GroundLevelPart4BHdr-MHD, GroundLevelPart4AHdr-MHD, GroundLevelPart4CHdr-MHD
       Overflow error!
  947  02:A656                  .db GroundLevelPart3AHdr-MHD, GroundLevelPart3BHdr-MHD, GroundLevelPart3AHdr-MHD, GroundLevelLeadInHdr-MHD
       Overflow error!
  958  02:A656            TimeRunningOutHdr:    .db $08, LOW(TimeRunOutMusData), HIGH(TimeRunOutMusData), $27, $18
       Internal error[1]!

I'm not entirely understanding why this is an issue when it assembled fine where it was placed before, but I'll admit, I don't really understand how all of this works yet, I have a very basic understanding, enough to make changes to labelled code, but that's about it.