I think I know what's going on with the problematic pipes. In an unmodified SMB, you can create IntroPipe objects using object ID 0x0C, although they're normally created with a special row 13 object instead. Apparently, some of Frantik's pipe objects where using the 0x0C method instead. As the new blocks use object IDs 0x0C through 0x0E, they've become question blocks instead.
I belive the 0x0C method may allow more control over the location of the pipe object, but I'm not sure. If that is the case and the extra control is needed, object 0xF can be used. It's unused and will fall through to the special row 13 objects like 0xC used to.
Actually in the unmodified SMB engine, IntroPipe, FlagpoleObject, AxeObj, and ChainObj can all be created using normal objects, rather than the row 13 objects they've been assigned to. Therefore, when additional normal objects are added (like I've done), all of those object types are potential bugs if they where created using normal objects.
I've gone through the sprite data with a fine toothed comb and have figured out what we need in the way of space. The new sprites Frantik has made use up a total of 40 tiles. The sprites used only in castles take up a total of 28 tiles. There is 1 tile that is unused. Therefore, we're 11 sprite tiles shy. I'm not entirely sure how to handle this.
I've been thinking of dividing the CHR-ROM banks up along the lines of Castle levels and everything else. The reason for this is that the ground type uses so many sprites that the other types are nearly subsets of the Ground type. However, there are some gains to be had by spliting the Underground and Water levels out. The Falling Spike isn't using in ground levels, so we could gain 4 tiles there. There are three sprites used in water levels that are not used in ground levels, they are the bubble and two tiles of Mario animations for swimming. This could save us 7 more tiles, leaving us only 3 shy.
The other option I considered is using seperate banks for large and small mario. I've yet to investigate exactly how many sprites we could free up this way. It would definetly be enough to free up the 11 tiles needed for the Castle vs Everything Else divsions. Of course, that'd still require 4 CHR-ROM banks. It may even be enough to get down to only 2 CHR-ROM banks (small and super).
I'd prefer to keep it down to 2 CHR-ROM banks unless absolutely required. To do that, we have to either eliminate 11 tiles or (provided there's space) use small and large mario banks. If we do end up going with 4 banks, there are two options. First, we could ditch 3 tiles and make a bank for each level type (we could use three in this case, but I don't think that's actually possible). Or, have small and super banks for each of the castle and everything else levels.
Frantik, as you've been the guy handling the graphics so far, what do you think? Would it be possible to eliminate 3 (or even better, 11) tiles somehow and still have everything look good?
Anyway, I'm going to investigate the Mario tiles more closely and see what kind of space we can gain by swapping CHR-ROM banks based on size. If I can get all 40 new tiles in that way, that's what I'll do. Otherwise, we'll have to discuss what option to go with.
I looked through the Mario sprites and here's what I found. Mario uses 91 sprite tiles, of which 61 are Super Mario, 29 are Small Mario, and 1 is used only when in between sizes. Small mario is the limiting factor here, adding the 29 Small Mario tiles, the 1 intermediate tile, and the 1 unused tile gives us a total of 31 tiles. This would leave us 9 sprite tiles shy if we decided to bank switch only on Mario size changes.
I've been thinking about how we could free up some tiles. Simply looking at new sprites, I've found a few places where symetry could be increased (at the expense of accuracy) to free some tiles. If the hammer where made symetrical, we could elimate 2 tiles. If we used the Hammer Bro hammer instead, we could eliminate 4 tiles. The "atom" power up could be reduced to 2 tiles with basically no change, or to 1 if the little highlight was removed. By redesigning the wing to look more like the SMB3 one, I belive it could be done in 3 tiles. By making the spike symetrical, we could reduce it to 2 tiles.
But would such changes be a good idea? Discuss it and tell me what you think. I'm off to write some CHR-ROM switching routines to add to my MMC1 driver code.