ROMHacking Thread

A forum for creative people.
User avatar
Garrett Gilchrist
Site Admin
Posts: 8006
Joined: Tue Feb 12, 2013 1:23 am

Re: ROMHacking Thread

Post: # 11748Post Garrett Gilchrist »

The Bugs Bunny Crazier Castle (hack by Garrett Gilchrist with Bavi_H, SpiderDave, Cyneprepou4uk). Available at Romhacking.

With Erin Plays and Mike Matei.

Mike has previously played Inspector Gadget (Gumshoe hack). Opening and closing cutscenes are not shown here.

Lola appears in the cutscenes of this version. There are also 28 enemies instead of four.

You can play this hack with the regular levels, or with previous hack level packs by Mallory Maggiore or Megafield64.

This appears to be the "Welcome to My Nightmare - Alice Cooper" level pack by Megafield64. I am not responsible for these levels -- and you have lots of options for level packs. I like that Mike spots and names the enemies like Mugsy, Count Bloodcount, Henery Hawk, Leprechaun, etc.

I balanced the enemy appearances for the base game ... in this hack, after the first hour, the Instant Martian shows up, then Godo Dodo and the Road Runner and later Ghost Kid. Merlin the Magic Mouse and Elmer Fudd have not shown up, and Beaky Buzzard only turned up briefly.

The original has green Sylvesters and green pipes, which are both purple here. The enemies are more commonly gold. Did you know you can skip to any level with the final password? You press up and down to select a level. I'm not sure why it glitched and sent them back at the end here.

Tweety is criticized as too obvious an enemy choice, while Count Bloodcount and Gogo Dodo are lauded as deeper cuts. Ghost Kid and Leprechaun cause confusion, although Mike recognizes the latter.

Regular levels:

Mallory Maggiore "Ultimate" levels:
User avatar
Garrett Gilchrist
Site Admin
Posts: 8006
Joined: Tue Feb 12, 2013 1:23 am

Re: ROMHacking Thread

Post: # 11764Post Garrett Gilchrist »

Blue Frackle asks (about the Bugs Bunny Crazier Castle):
i've been playing this a lot today and yesterday... i wonder if the reason they had enemies repeating in the same level was hardware limitation, when even in the original they had a roster of 4 (up until this point i haven't seen more than 4 enemies in a level)

like they'd have black sylvester and green sylvester, and then brown wile e and purple wile e when they could've had sylvester, wile e, daffy, and sam in the same level
i guess it's pretty nerdy but i'm curious if you guys carried this trend just to be faithful to the original or if the game actually can't process 4 different enemies in the same level

This requires a bit of a long explanation
It sort of is hardware limitation, although they could have done things to make it work
The hack expands the number of enemies from 4 to 28 but still uses the same level and enemy layouts otherwise (unless you hack in the bonus level packs)
The original was a Disk System game called Roger Rabbit.
The first enemy type, which you'd know as Sylvester, was the weasels, which come in different colors and are the only ones who can go up and down, up pipes and through doors
the other enemies just walk back and forth, which limits how much you'd want to use them
there is limited space for character animations on the NES, and everything has to fit on one sheet (128x128) pixels) but you could have limited some animation elsewhere to allow for other enemies to travel up and down.
generally speaking, the weasels are overused in the levels, and the other enemies aren't used as much as they could have been
but the other enemies were Judge Doom, the Gorilla Bouncer, and a penguin waiter originally, and it made sense to not use them heavily
there's also the matter of color palette
the NES has four color palettes for sprites
which would include Bugs/Roger, items, bulges in the pipes, and .... one enemy palette
so it's actually a little awkward to use the other enemies, colorwise
which is why you see "Sylvesters" colored like the pipes (green in the original, purple here), or like the gold items, or grey like Bugs
then one special palette
so in this hack, level 30 has all the Martian enemies present, but they can't be green due to limited color palettes that have to be used all over
the "other" enemies do have their own palettes but they have to be shared with other enemies, so I made them all pretty similar, in an orange/gold style
and it varies because only one "extra" palette is ever called in

So we absolutely could have included four different enemy types in one level (and some levels in the original have more variety), but they would not have their correct palettes, and only "Sylvester/Weasels/etc" can go up pipes and into doors, so in the original game you'll get two or three different Weasels before you get the other enemies.

The bonus level packs generally have more enemy variety
But of course the point of this hack is to give more enemy variety overall, with the common "Weasel" enemy replaced by seven different possibilities.
User avatar
Garrett Gilchrist
Site Admin
Posts: 8006
Joined: Tue Feb 12, 2013 1:23 am

Re: ROMHacking Thread

Post: # 11893Post Garrett Gilchrist »

Changing backgrounds is different between different NES games, although there are basic techniques you need to learn.

In NES Screen Tool (or the similar NEXXT, or NAW) you save your background work as a Nametable. This is basically a list (in hex code) of which tiles from the CHR you've used in your design, as well as some palette/attribute information at the bottom of the table. Just click Save.

Sometimes this can be imported into the ROM directly, but sometimes there is code in the ROM (like control codes at the beginning of each line) which you will have to keep and take into account. You can experiment with this in FCEUX. If you've found where your background nametable is in the ROM, you can change tiles in the hex editor and see if it works.

When playing the NES game, you can also export background nametables from an emulator like Mesen or FCEUX. You will probably have to cut the nametable in half in a hex editor before opening this in NES Screen Tool (or NEXXT or NAW) because this will contain two screens.

Often, backgrounds are not made up of a nametable of tiles, but instead, blocks made up of four tiles (and one palette) are defined in the ROM somewhere, and then these blocks are specified in the level layout. If you think you've found where these are defined, you can experiment with changing some values in the FCEUX Hex Editor. The level editor "CADEditor" -- which was originally intended for Capcom NES games, but supports most non-Nintendo NES games -- works with four-tile blocks, and you can learn a lot about what they are and how they're used by working with CadEditor and one of its supported games.

If you play the NES game in Mesen or FCEUX and export the name table as a dump, or look at the name table / background layout carefully, you will see patterns of hex code (like which tiles are being used in what order) that you can search for in the ROM to find what to edit. You can then edit individual numbers in the hexadecimal editor of FCEUX in real time, as trial and error, to see what works and what changes.

If you run the Code/Data Logger in FCEUX, while running the NES game, the hexadecimal code being used will light up in the ROM. You can pause the game and reset the Logger at any time. This often makes it possible to see what code the game is using at any time.
User avatar
Garrett Gilchrist
Site Admin
Posts: 8006
Joined: Tue Feb 12, 2013 1:23 am

Re: ROMHacking Thread

Post: # 11928Post Garrett Gilchrist »

The background and sprite graphics on NES use four colors including transparency (or background color).

So a sprite can have three colors, and backgrounds can have three colors plus the background color.

In Super Mario Bros 2, three of the player characters have an extra sprite for the whites of their eyes. (These sprites are always animating, which is used in some hacks like The Thief and the Cobbler.)

Mega Man also uses an extra sprite overlaid for more colors, and so does Ducktales. Scrooge has a "mask" to allow for eye color.

Too many sprites onscreen slows down performance, so games would usually just use three colors for a character.

A game can load four sprite palettes at one time, made up of three colors, and four background palettes at one time, made up of three colors and the background color.

A sprite tile is 8x8, and these can often be set to any palette, although it's just as common that an entire character has to be one palette.

Background color palettes generally have to be set in blocks of four tiles - 16x16. The Capcom game editor CadEditor, which supports many non-Nintendo NES games, provides a good example of this.
Post Reply