[Technical] [NES] Donald Land, Super Mario Bros 2 USA, Gumshoe, Bomberman

Started by tygerbug, May 05, 2022, 07:28:49 PM

Previous topic - Next topic

tygerbug

I've released hacks of Super Mario Bros 2 USA, Gumshoe and Bomberman [NES].

There are still some technical issues which I am still interested in fixing.

I have released an ambitious hack of Donald Land [NES] as Raggedy Land (with Ann & Andy).
https://www.romhacking.net/hacks/6975/

I have a few technical questions which I should write down here.

1) I would like to change the player sprite sheet loaded for the Giant Salamander Fight at the end of Sky World, to the fourth-from-last CHR.

2) I would like to change the blue background palette color after the Octopus boss is defeated (Level 9).

3) Enemies and characters who do not use multiple palettes or mirroring are coded as sprites in a simpler way. The palette and mirroring is set at the beginning, and then everything else is done with two bytes (location in a 4x4 grid and tile number) rather than three.

This is limiting with some of the designs we'd like to use. In particular, Uncle O'Grimacey as seen in the ending [160AD] needs to have multiple palettes in our version. (He is capable of palettes and mirroring in the intro.)

Ideally, the Witch enemy in level 10 [150C6] would also use multiple palettes, and every frame of Mayor McCheese (one frame does not have multiple palettes, currently).

Perhaps the code could be hijacked to allow for a longer-format sprite construction for these characters, in which all three bytes are used? (Possibly unused space at 13210, 17F10?)

Alternately, it would help a little if a different CHR graphics bank would load for McGrimacey.

Note: the sprite constructions are done on a 4x4 grid and the hex numbers/letters used to set position are in a strange order: FEDCBA9012345678

4) The McDonaldLand characters are showcased in the intro and ending to the game, and most of them appear in the game itself at some point.

Generally, the same set of palettes is used for two characters who also appear on the same CHR sheet.

Ideally I would really want "The Professor" to have a complete unique palette set rather than sharing it with "The Captain."

Even more ideally I'd want "The Captain" seen in the intro to have a different palette than "The Captain" seen in the ending, and after the Octopus Boss fight in level 9. (The Captain DURING The Octopus boss fight seems to use its own palette. I'm not sure if that's shared with anything but it affects The Captain. The Evil Captain in Level 8 uses the general Level 8 enemy palette, which is fine if not ideal.)

5) One of the background CHR banks is a repeat of one of the others, and another isn't used. Perhaps a new ending screen could be added somewhere somehow which uses the unused CHRs?

6) Donald Land has level select codes at the title screen, based on button inputs. The Game Genie code TEULLSIE allows you to select the ending sequence as well. I would like this to be implemented without a Game Genie code ... It's also difficult to input these codes, so I'm curious if some emulator codes could be created which affect which level you start on, more easily. I'm not sure where this is in RAM.

7) The game seems to have at least four and probably six alternate endings. I'm not sure what causes this. An ending at day in the town is common, but there's also sunset and night, and endings outside by a lake. These use different palettes and tile layouts. Most of the game is supported in CadEditor, but this and the Shop are not, so it's a bit of a mystery to me currently.

8 ) This is almost certainly too much to ask, but we're interested in replacing the music somehow -- there are probably some server members who could compose something in Famitracker if the music system for the game was replaced or explained.

_______________________________________


I was in the early stages of a Duck Hunt hack. Here is a thread with my questions and notes:

https://www.romhacking.net/forum/index.php?topic=34928.msg430020#msg430020

And the others:
https://www.romhacking.net/forum/index.php?topic=34661.msg429805#msg429805

The hacks:
https://www.romhacking.net/hacks/6839/
https://www.romhacking.net/hacks/6830/
https://www.romhacking.net/hacks/6819/
_______________________________________


In Super Mario Bros 2 USA:

I would like to edit Ostro, the ostrich enemy, to always use palette 2 or 3. That doesn't seem to be an option for Ostro or most common enemies.

(Judging from SMB2 editors, I think common enemies just exist in multiple forms, but Ostro doesn't.)

I would also like FryGuy (and his flames) and Clawgrip (and his rocks) to always use palette 2 or 3 instead of palette 1.

This is less of a problem since they're self-contained, but it's clear that I've edited palette 1 in these scenes.

(Palette 0 is player palette, palette 1 is red/white and used for lots of game elements.)


The "World" title card for World 2 is loading the layout wrong. [I think it's just World 2.] It's loading the last couple of lines of the nametable twice - one of the repeats is two lines early. This layout only appears once in the code.

_______________________________________



There's also Bomberman. In Bomberman, the title screen graphic tiles are presented in full without any other trickery, which made things easier when assembling a complex title screen. The title screen text is coded backward for some reason.

I'd like to change the attributes on the screen to allow different palettes to be used. (I'd like to change palettes of the player character at right.)

Unfortunately this is coded in a limiting way. There's code around 1EFA, ending at 1F07. I think it's just two short commands which draw the attribute data (some 00s and some 55s). Which is very limiting, and I'm really not sure how to edit this and get the result I'd like, which is more complex than just dividing the screen vertically. Maybe it's just not possible.



_______________________________________



The third is a hack of the Zapper game Gumshoe as "Inspector Gadget."

1 - SOLVED!) There is an unused music track for (Gumshoe's) level 2, which is basically just "Walking On Sunshine." It's used in the arcade VS version. It's apparently in the NES version as track #1, and unused. I'd like to put it back in, for the heck of it.

2 - SOLVED!) Around 162D0 is the tile block layout for the ending scene where you confront the villain. The blocks and their palettes are listed here, but I don't know where the code is to set tile position onscreen, so currently I can't do exactly what I want to do with the layout. Gumshoe is not supported in CadEditor, so I'll have to find that layout table somewhere.

EDIT: I revisited this and found the layout table around 13BA0. It seems to use control codes to skip areas which are depicted as black onscreen, so it wasn't immediately obvious that this was a layout table and was editable at all. Solved!

2) Around 105CA is some ending text, and other text around 19C14. I think there are separate text pointers also somewhere, which makes it hard to rewrite the ending text unless it's all the same length. Changing length broke the text display.

3) Quality of life tweaks:
I think we could also make the game easier and more interesting if every bird, or most birds, dispensed powerups like the goony-looking Lucky Birds do. They're very rare in the game, turning up very rarely outside of Level 1's bonus area which has five, so you don't have much of a chance to get their powerups in the game.

SOLVED: The idea that you need 5 pink potions to become green is ridiculous -- 2 pink potions would be better, as there is a chance it might happen at all.

Quality of life tweaks: "The part right before the diamond in the sea level broke me. Spent maybe 30 minutes trying to get past the projectiles with zero bullets. Would be cool to have more balloons there, and also early in level 4, if that's possible."

We've made it so that balloons dispense 4 bullets rather than 3, which sort of solves it.

CADEditor supporting Gumshoe would make a difference here.

A player from Cuba has written in with an unusual request that I can't personally fill, asking for another change of Mapper. (Originally 66, now 11 due to the additional graphics banks needed.)

"Ny flashcart does not have the mapper (11 Color Dreams), my flashcart has these mappers only:
#0 NROM
#1 MMC1
#2 UNROM
#3 CNROM
#4 MMC3
#7 ANROM
#15 Contra Function (Contra 168-in-1 / Contra 100-in-1 multicart)
#30 UNROM-512 (NES Maker games)
#71 Camerica Codemasters games
#232 Camerica Quattro"



Bavi_H

For the first part of Donald Land question 6...


FCEUX has a Game Genie Encoder/Decoder in its Debug menu. After you put in the Game Genie Code, it will tell you

  • the matching NES file address(es) ("Possible Affected Rom File Addresses")
  • the original value at the address ("Compare")
  • the new value to put at that address ("Value")

For this game and code, there is only one matching NES file address. But in case there is more than one match for the NES file address, you should test modifying each address one at a time to see which one works.

Bavi_H

#2
For this part of Super Mario Bros. 2:
Quote from: tygerbug on May 05, 2022, 07:28:49 PMThe "World" title card for World 2 is loading the layout wrong. [I think it's just World 2.] It's loading the last couple of lines of the nametable twice - one of the repeats is two lines early. This layout only appears once in the code.

Your recent screenshot on the NESDev Discord made me take a look at this:



In the disassembly, it looks like there are special cases for Worlds 7, 2, and 6:

DrawTitleCardWorldImage:
  LDA CurrentWorld
  CMP #6 [World 7]
  BEQ [$8392] ; Special case for World 7's title card

  [...]
  LDA CurrentWorld
  CMP #1 [World 2]
  BEQ [$8371]

  CMP #5 [World 6]
  BEQ [$8371]

I changed the last two CMP instructions to LDA instructions so the zero (equal) flag remains clear and those branches don't get taken:

NES file offset: original value → new value
14377: C9 → A9
1437B: C9 → A9


tygerbug

Thank you very much! Upon comparing, the cards for Worlds 2 and 6 (in regular Super Mario Bros 2) do have a slightly different appearance, created with the above cheat that repeats the last two rows in place of the two rows preceding. The result is that the world displayed has no grass lip (or similar) and is simply desert sand. It's a small difference that you wouldn't expect would be done this way. The nametable is still the same for Worlds 1-6 in the code, with a different nametable for 7.