+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  Anyone Interested in Doing "SMB Special" for NES?
Pages: 1 ... 19 20 [21] 22 23 ... 39
Author Topic: Anyone Interested in Doing "SMB Special" for NES?  (Read 20 times)
Karatorian
Guest
« Reply #300 on: April 17, 2008, 05:20:04 am »

The labels are defined in "levels.s". The data offset is $6000, the start of SRAM, which is where the data ends up by the time the game engine gets ahold of it.

I've got the doc you mention, but it's too incomplete to be really useful when writing something as complex as a level extractor. In particular, it doesn't cover the pointers or offsets at all.

I've managed to hack in three new block types. They are a qestion block with starman (object ID 0x0C), a hidden block with super mushroom or fire flower (0x0D), and a hidden block with special power up (0x0E).

I've also hacked a little bit on power ups and added a placeholder power up for the new ones. As I haven't implimented a method to select which power up the special block gives, it currently gives a black koopa shell that gives a one up.

You can download the source here.

I've managed to find a level editor that works in Wine (YY Mario Edit), so I may release a patch with the new blocks sometime soon. However, I have to go to work now.
frantik
Guest
« Reply #301 on: April 17, 2008, 05:45:42 pm »

ok cool now i get it Smiley

good job on adding the new block types Cheesy  and i tried to make it easy on you by placing "placeholder" blocks" where the new blocks should be so you could go in and edit them without a level editor:

Most of the hidden mushroom/fireflower boxes are replaced with visble mush/FF blocks.  Most of the other hidden power ups are replaced with hidden 1ups
Most of the ? with starman are replaced with brick blocks with starman


edit:  ok one more thing..  how do you determine when to stop reading "World8Areas"?  It's easy to tell where "World7Areas" ends because you can use the offset for world 8 to know where world 7 ends.  but there is nothing obvious which tells you where World8Areas ends and EnemyAddrHOffsets begins.  this same type of problem looks like it will occur when using the other offsets as well so i must be missing something lol

edit2:  looks like you hardcoded the last "offset" into the code (if world == 8: b = 36).  i guess that works cause there will never be more than 36 rooms in the original rom right?  how many rooms in SMBS?
« Last Edit: April 17, 2008, 06:27:13 pm by frantik »
Karatorian
Guest
« Reply #302 on: April 18, 2008, 02:22:19 am »

True, I hard coded the end of world eight in the extraction portion of the code. There is really no concrete way to know where the SMB world map numbers end. As for SMBS, I don't really know. While it's easy to figure out by lookin' at the offsets in "levels.s" (37 with the current level set), I've never had any reason to check. My code simply produces as many as required and, as such, has no hard coded limit. (AFAIKT there is no limit whatsoever in the SMB engine itself, except the (eight bit derived) limit of 255 worlds and 255 levels (including pipe intro sequences) per world. Of course, with a room limit of 128 (32 indices times 4 types), that's way more than anyone needs.)

As for adding the extra blocks, it wasn't as easy as I thougt it'd be due to various complications. If I was willing to alter the IDs of existing objects, it would've reduced the changes by about a third, but would, of course, have broken every level. Adding power ups is actually really easy. (Makin' them do interesting stuff may not be.)

As I'm well on my way to implimenting the special powerups and intent to work on enemies soon as well, we're gonna' need some graphics hacking. (Actually, I'm pretty good with GFX myself, but my low res, limited color, works leave something to be desired.) Frantik, as evidenced by your (exellent, I would venture) work on Ultimate SMB, you've achived total mastery of SMB graphics. It would be great if you could produce what we need. (Provided you have the time, of course.)

While I can provide reference shots from the PC88 game if required, I'll simply refer you to related NES and SNES games for now.

From the original Mario Bros., we need (animated) sprites for the Fighter Flies and Side Steppers.

From Donkey Kong we need Barrels, Flaming Barrels, the Hammer Power Up and Hammer Mario (Jumpman in original DK) animation sequences. (I belive we need both small and super mario hammer animations, I'll check tommorow.) In regards to the Flaming Barrels, in SMBS, they look a lot like like Sparkies, so I'd suggest SMW as a reference as well.

The falling spikes have no real pre-SMBS precedence. Wikipedia claims they're supposed to be falling iceicles!? However, with the chosen pallet and (indistinct) sprites, they're pretty open to interpretation. They look pretty similar to the (clearly) spikes in SMW, so I'd recommend that as a reference again.

The wing power up looks pretty much exactly like a SMB3 P-Wing sans the P.

I'm tempted to recommend SMB2 (US, Doki Doki Panic) as a reference for the clock, but given the vastly different function of the item, perhaps that's a bad idea. Something distinct, but still clearly a clock, would be better. I'll post the PC88 graphic when I get the chance.

That only leaves the Hudson Soft Honeybee and the Unidentified Power Up. As the PC88 Honeybee looks more like a bad graphic of a treasure chest than a bee, I'm not sure what to recommend as reference. Perhaps I (or you) can find a good rendering of the Hudson logo to base it on. As I have know idea what the Unknown power up is even supposed to be, I've got no suggestions for references. (I'll post some screenies sometime soon.)

Finally (not to step on a fellow artist's toes), a brief bit on style. While the images in USMB are amazing, they're more SMB3 than SMB. I think it'd be better to stick to an (extreemly) old school style to better mesh with SMB. Of course, given your artistic brilliance, I proably didn't have to mention this, but whatever.

While I've specificaly asked frantik's help with graphics, anyone else who can push pixels is welcome to contribute as well. Given the enormity of this undertaking, more than two hackers working on it would be nice.

In regards to the special blocks, etc. I noticed the placeholders and they're pretty handy. On the other tentacle, editing raw SMB level data with a hexeditor isn't very easy. While I had some success with YY-ME, it's not really going to work out. While it can easily enough create 0x0E objects, its strange interpretation of the object IDs makes adding (real) 0x0C and 0x0D objects impossible. It's a pity SMB Utiliy seg faults under Wine as it's raw hex access feature is perfect for this sort of hack.

One way or another, I'll get the new blocks added where they need to go. What this project really needs is an open source (or, at least, source availble) SMB level editor. Unfortunately, AFAIK, there isn't one. I may end up implimenting one of my own. If I do, it wouldn't be like any other level editor out there. Instead, it'd be more like a special use hexeditor.

Anyway, I've got to work in the morning, so good night.
frantik
Guest
« Reply #303 on: April 18, 2008, 02:34:22 am »

ok well i'm not 100% sure we'll be able to fit all of those enemy sprites on the sprite page of the CHR-ROM but i'll see what I can do Cheesy  And of course i'll make them fit stylewise as well Smiley  thanks for the suggestions on sprite sources too

dont think i'll need any screen shots the level rips should be fine [edit: actually screen shots of the power ups woudl be cool]

and if you want to tell me what hex values represent what objects i'll go thru and put them in with SMButil..

edit:  got 1/2 my level extractor done.. it extracts stuff nicely.. now time to build the new data file with it Smiley
« Last Edit: April 18, 2008, 04:14:45 pm by frantik »
Karatorian
Guest
« Reply #304 on: April 19, 2008, 11:46:28 am »

If you can't manage to get all the sprites into the CHR-ROM, don't worry about it for now. As long as you get the graphics themselves produced, then we can worry about squeezing them all in. I'll try to get some screenshots produced soon.

The hex values for the blocks I added are all listed in the post I made about them on Thursday.
« Last Edit: April 19, 2008, 11:59:14 am by Karatorian »
frantik
Guest
« Reply #305 on: April 19, 2008, 09:33:45 pm »

ok i see the values and ill add them in. though the one will cause an L pipe or flag (i forget which) in the editor and in the non-expanded rom unless it's disabled

here's some sprites i pulled off various sprite sheets

deespence2929
Guest
« Reply #306 on: April 20, 2008, 10:20:11 am »

The hudson bee is used in Milons secret castle. I think it adds a bar of energy to your  max hp. It also refills your health. Maybe you wanna see what it does in other hudson games.

It's gonna be trippy seeing this patch finished. Expanding the rom, object filled levels. New items. Pretty epic.
Karatorian
Guest
« Reply #307 on: April 20, 2008, 12:53:29 pm »

In regards to the new blocks rendering improperly in the un-expanded ROMs, yes, that will be a result. This is because when the game encounters a small object in the unused range (0xC - 0xF), it simply falls through to the next category of objects in the jump table (special row 13). As I understand it, there will be spurious L Pipes, Flag Poles, and Axes if the blocks I've added are used in an unexpanded ROM.

(I've realized in retrospect that YY-ME could actually be used to add the new blocks. The "strange interpretation of object IDs" I mentioned before is actually a reflection of the game behavior. However, as it doesn't seem to fully handle the offsets and such, it appears that which level is which room is hard coded, which makes finding the levels in your ROMs pretty tricky. Furthermore, the interface is pretty clunky.)

In light of this, it'd proably be best to not release the versions with the new blocks publicly or to release them in such a way that they're clearly labled as not suitable for stand alone play.

Those sprites look like they'll be a pretty good base on which to build the sprites we need. I keep slackin' on getting the screen shots I promised, for which I apologize. I'll get them up today.

On the special power up front, I've managed to impliment the Clock power up. Of course, that's not saying much as the clock is by far the easiest one to do. Of the other two power ups who's function is known, the Wings should be moderately easy, and the Hammer is likely to be pretty difficult.

I still haven't implimented a method to select which special power up is granted by the special power up block yet. However, the investigation I've done so far indicates that hardcoding them based on the level number isn't going to work as level 4-1 has both the Wings and the Unknown power-up. In light of this, I'm going to do something with a special row object. This also has the advantage of allowing control over the special power ups to be entirely contained in the level data, which makes editing them (whether for this project or a derivative one) easier.

In regards to pipe exits that aren't at the usual height, I think we may be able to provide a solution for that as well. As the  X coordinate of a pipe pointer is largely irrelevant, it could be used instead to store the height at which you come out of the pipe. As I understand it (and Dahrk Daiz's doc states), the X position isn't used because pipe pointers are active on a per page basis, so where on the page they appear doesn't matter. Is this correct?

Anyway, I'm off to produce some screen shots.

Edit 1: Screen Shots as Promised

First up, all the new power ups:



Secondly, the hammer in action:



(Man, I didn't realize how lame that looks. Hmm.)

Edit 2:

I've managed to impliment a selector object for the type of power up granted by the hidden special power up block. Using special object 0x4C on row 13 (0x0D) will now select which power up is granted by special power up blocks on that or any following page. The horizontal coordinate is used to select the power up type:

Code:
0x0D    Super Mushroom
0x1D    Fire Flower
0x2D    Starman
0x3D    One Up Mushroom
0x4D    Honeybee
0x5D    Hammer
0x6D    Unknown
0x7D    Clock
0x8D    Wings

The existing power ups are included because it's actually simpler to code that way. However, actually using them is a waste because they have thier own dedicated blocks, which takes up less space than a special block and a power up type selector. Due to the way the game is coded, selecting either the Super Mushroom or Fire Flower will still give results that depend on whether you're big or small. Also due the the way the game is coded, any unassigned number will get you an object with junk graphics that acts like a Starman.

Of the new power ups, only the Clock (as mentioned above) works at this time.
« Last Edit: April 20, 2008, 04:07:54 pm by Karatorian »
frantik
Guest
« Reply #308 on: April 20, 2008, 10:20:15 pm »

cool nice job with the selector blocks.  i will get the sprites created.  looks like the hammer mario is just regular mario with a hammer so no extra sprites needed cept the hammer which is good

and you can implement swimming with a single game genie code so it can't be too hard Smiley PIGOAP
« Last Edit: April 21, 2008, 03:39:08 am by frantik »
rbudrick
Guest
« Reply #309 on: April 21, 2008, 08:49:40 am »

The unknown power up looks like an atom, with nucleus and orbiting electrons.  It's an a-bomb!

Who knew the Mushroom Kingdom was in the nuclear club, just like N Korea!  :laugh:

No wonder no one's found their WMDs and NOJ was able to deny their existance.  They were hidden for 20 years in an obscure game!  Wink

So basically, the bee and the atom thingy still have unknown function.  In Milon's Secret Castle and Hudson's adventure Island, it allowed you to continue.  In Milon you had to hold left and start at the title screen, once the bee was found.  In HAI, you had to hold left and start.  I don't recall if the bee was in other games.  Would the PC 88 code give any clues to their use?

EDIT:  the bee had the same functionand was used the same way in all three HAI games.  Perhaps I had Milon wrong.  On looking online, the bee gives Milon a shield of some sort, but I coulda sworn it allowed the continue option.  It turns out you can do the left and start thing after getting the first crystal.

-Rob
« Last Edit: April 21, 2008, 09:05:17 am by rbudrick »
Karatorian
Guest
« Reply #310 on: April 21, 2008, 06:32:22 pm »

Yeah, I don't think implimenting the wings will be too difficult. Basically, it'll just require adding one more timer to the game and a few conditionals. However, what makes that qualify as moderately difficult is the shear ease of implimenting the clock. The content of it's collision handler is literally one "inc" instruction. Anything is hard compared to that, ha ha.

As for the Hammer, that really will be hard. It's going to require a timer, new animation, and collision detection. I'll proably have to dig throught the bowels of the fireball code to figure out how to handle the animation and collisions.

The power ups with unknown functions are a bit irksome. Does anyone here have z80 skills they'd be willing to contribute? I have a pretty good idea where the code is located on the disk image. (Actually, I know where it's not, which is almost as good.) I do agree that the unknown one kinda looks like an atom. The comparison is even more apt when you know (which I forgot to mention) that it's pallet cycling animated.

frantik, once you get the sprites hacked in, please let me know what their tile numbers are so that I can replace the current placeholder graphics (inverted black koopa shells) with them. I'll also need to know which pallet (attributes) they should use. BTW, my build system rips the CHR-ROM from the latest world 1-4 patch.

I was wondering. Should I release the current code with the new blocks now or wait until we have a level data set that'll actually use them before I do so? Further, given that you're currently working on both editing the levels for new blocks and the graphics additions, are you planning releasing one or the other as soon as it's done, or are you going to wait until both are finished. Likewise, if you do release seperate updates, should I? Or should I wait until we have both for the next expanded ROM and source release?
frantik
Guest
« Reply #311 on: April 22, 2008, 02:14:38 am »

ok well I was looking at the CHR-ROM and there's no way to add ANY sprite tiles (or any tiles for that matter)  I was thinking I was going to be able to do it the same way I did in SMU which is to get rid of the duplicate mario tiles.  but that only works if we're using the SMB3 mario tiles, no SMB1 tiles. Sad  I'm not sure at all how to get the extra sprites in.. you have any ideas?  if it were on the background object layer i'd say move the title screen info but it's not..

edit:

here's Worlds 1-4 with the new block data

World 1-4 not suitable for play as a stand alone rom
« Last Edit: April 22, 2008, 03:44:39 am by frantik »
Disch
Guest
« Reply #312 on: April 22, 2008, 06:22:04 am »

You could modify the level data format (or create a new section of level data so as not to break compatibility with the editor you're using) to have it swap CHR pages as the player scrolls.

Example, if there are never any goombas and hammer bros on the same screen at the same time, you could put them at the same spot in the pattern tables, but have them on different CHR pages.  Then in your map data, have an indicator that the game should swap CHR when the user gets to certain points.  I believe SMB3 does something like this, but that's a total guess.

Getting it to swap wouldn't be that hard.  Your level format could be something like:

XX XX PP XX XX PP

Where 'XX XX' would be a scroll position, and 'PP' would be a page number assigned to that position.  Once the in-game scroll exceeds XX XX, you simply swap in the next page on the list.
Karatorian
Guest
« Reply #313 on: April 22, 2008, 06:45:47 pm »

Hmm, not having any room for sprites in the CHR-ROM is going to be a bit of a problem. I'll have to see what I can come up with for a solution. Something along the lines of what Disch has suggested is proably the best option were're going to get. I suppose I'll have to analyze the level's sprite contents and see what sort of division we could make.

Quick work on revamping worlds one through four, nice. Does this include the special powerup type selectors as well?

Perhasp we can put some sprites on the object layer instead. None of the new power ups are mobile and neither is the Fire Flower. We might be able to move them and some other non-mobile sprites (like Peach and Toad) to the object page, which would free up space on the sprite page. I'm not sure how involved such a hack would be, but I'll look into it.

I'm curious, how does using SMB3's Mario graphics free up space? Could the SMB graphics be slightly altered to do the same thing? (I.e. could the less space using SMB3 layout be done using SMB derived sprites?) And, if so, how many sprite tiles would it free up and how would it look?
frantik
Guest
« Reply #314 on: April 22, 2008, 08:03:53 pm »

Quote
Does this include the special powerup type selectors as well?

yep Smiley

the way the SMB3 sprites freed up space is due the the fact there are fewer unique tiles.. in smb1 almost every frame has completely unique tiles.

actually I was thinking about what Disch said and perhaps the bowser graphics can be switched out because they are only used in the end castles.  also there is already code for a palette switch when the axe is loaded to make sure Bowser has the right palette.  this could ammended with a CHR-ROM page switch as well. Smiley  there are at least 16 bowser tiles so that could give us 4 whole sprites.  still not enough though for everything.  perhaps those object selector switches will also have to switch chr-rom pages?
Pages: 1 ... 19 20 [21] 22 23 ... 39  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC