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

Author Topic: [SOLVED] Problem with this part on The Guardian Legend MMC5  (Read 943 times)

Dracula X

  • Jr. Member
  • **
  • Posts: 83
    • View Profile
    • My YouTube Page for ROM hacking
[SOLVED] Problem with this part on The Guardian Legend MMC5
« on: October 09, 2017, 11:19:49 pm »
This is the only issue that I have while I converted the mapper 5 MMC5. It doesn't happen in the original mapper UNROM. Is there a way to fix this issue in MMC5? In the Debug on FCEUX, I checked on "Break on Bad Opcodes" and it pointed out at address, $1f838, $f828:
Code: [Select]
STA $0500,X @ $0518 = #$A0
https://youtu.be/W56QAUcgyl0

I don't know why that happens!
« Last Edit: October 10, 2017, 02:35:23 pm by Dracula X »
I do not do other games that have already been done.

Disch

  • Hero Member
  • *****
  • Posts: 2728
  • NES Junkie
    • View Profile
Re: Problem with this part on The Guardian Legend MMC5
« Reply #1 on: October 10, 2017, 12:52:15 am »
That isn't enough information.

That's not a bad opcode so the debugger is not snapping on that line.  And even if it were, 1 single instruction wouldn't be enough to know what is going on.   :P

I'm also not very familiar with the game so I'm not sure what's going wrong in the video.  I assume the player shouldn't be jumping to the top of the screen?


Anyway... aside from graphical glitches... actual gameplay-altering problems you can have would be one of the following:

Possible: PRG-RAM is not enabled and the game expects it to be (see $5102, $5103) ... though I'm not sure if Guardian Legend uses PRG-RAM?  **shrug**
Possible:  You didn't disable mapper IRQs (see $5204).  IIRC Guardian Legend uses DMC IRQs for timing tricks -- particularly during the flying sections.
Possible but not very likely: You're in the wrong PRG mode (see $5100)
Much more likely to cause a flat out crash than a weird problem: You're doing PRG swapping incorrectly (see $5113-5117)



Borked CHR swapping could also cause gameplay problems (if the game uses Sprite-0 hit, which IIRC Guardian Legend does) -- but that would more likely result in a crash than anything else, and would be accompanied with lots of obvious graphical glitches.

Dracula X

  • Jr. Member
  • **
  • Posts: 83
    • View Profile
    • My YouTube Page for ROM hacking
Re: Problem with this part on The Guardian Legend MMC5
« Reply #2 on: October 10, 2017, 12:49:16 pm »
Thanks for the info! I'll try to see what I can do.

Edit: I got it woking! Thanks to your topic!:
https://www.romhacking.net/forum/index.php?topic=24989.0

The part of the bankswitch  code was wrong so I changed ADC to ORA in 6502. ;D
Most of the setup was correct.
« Last Edit: October 10, 2017, 02:33:56 pm by Dracula X »
I do not do other games that have already been done.