Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
1 user currently in Rom Hacking: hukka | 2 guests
Acmlm's Board - I2 Archive - Rom Hacking - Wanting to use unused space in SMB2 for expansion | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
Ice Ranger

Leever
Level: 23

Posts: 96/183
EXP: 60462
For next: 7261

Since: 03-16-04

Since last post: 82 days
Last activity: 3 days
Posted on 03-21-05 04:12 AM Link | Quote
This deals with pointers, at least, I'm pretty sure it does.

There is quite a bit of room for expansion in SMB2. I want to allow each world its own graphics set. BMF did it in Legend of the Blob Brothers 2. I don't want a direct answer, I'd prefer a how to, looking at everything using the tools necessary.

I have the offset of the landscape graphic loaded in the RAM is 0x00006F7. The next completely blank bank (if that's not the correct term, then value) I can throw a graphics set in is 3C (used game genie codes to test out a graphics set there).

I'm still not entirely sure how to use FCEUXD's tracer and logger yet, because music bytes keep entering the logger and the level has already loaded before it quits loading music data. That's been one of the hardest things to figure out with intial data for what I want. *I know that's worded confusing, but... yeah, I don't know how to use either one of those for that type of hacking yet*.

Yes, this is for my hack at TEK. Heh, the screenshots are actually a little outdated now *added 2 more*.

I'm not sure if I can do the same with enemy sprites yet because I need to get the offset for enemy graphics loaded in RAM *again*.

EDIT:
Crap!!!! wrong forum. Move this over to rom hacking. Was looking at SMW stuff whenever I decided to make a thread.

EDIT again:
Thanks for the move. I'll look into the NES development notes again for what Hyper Hacker mentioned before replying.


(edited by Chill Penguin on 03-20-05 07:13 PM)
(edited by Chill Penguin on 03-21-05 02:37 PM)
FuSoYa
Defender of Relm
Level: 26

Posts: 162/255
EXP: 99529
For next: 2746

Since: 03-15-04
From: Moon

Since last post: 7 days
Last activity: 7 hours
Posted on 03-21-05 04:19 AM Link | Quote
*moves*
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 3823/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 03-21-05 07:39 AM Link | Quote
Given that you were using FCEUXD, I assume you know ASM... if not, you're gonna need it. What you need to do is find the graphics-loading routine. Your best bet would be to look for a pointer to a set of graphics; chances are, these will be in a pointer table. Now as I recall the game already has a few different graphic sets to choose from, so to add more, you just need to add entries to the table. The problem, of course, is that you'll need to move the table to do so. If you can find free space in that bank, great. Otherwise you'll have to move the table to another bank, and in its place, put some code to jump into that bank and read it from there. Once you've done this, you should be able to specify higher tileset numbers in the level header. Of course you might find that the header only reserves enough bits for this to specify the original number of entries (eg: Super Mario World has 16 graphic sets, and only 4 bits for the graphic set number), which will require some working around. If it's just gonna be for your hack, you could always code the pointers right into the ASM (for level 1, use this, for level 2, use that, etc); otherwise there are various methods you might want to look at. Lunar Magic uses unused level objects; you might also look at rewriting the header format and maybe getting rid of some less useful fields or just adding a byte.
Ice Ranger

Leever
Level: 23

Posts: 97/183
EXP: 60462
For next: 7261

Since: 03-16-04

Since last post: 82 days
Last activity: 3 days
Posted on 03-22-05 01:02 AM Link | Quote
How would I go about finding the pointer table? I looked at a few documents but they seem to refer to pointers for text changes and expansion.

This is what I've got so far:

Alright, I found if I switch the enemy set at RAM offset 0x0006FC to BF, I have a completely empty bank (quite a ways from where the rest of that kind of data is stored: 0C~0F). Strange, it's the only completely empty bank between 00~FF.

I found complety empty level set at RAM offset 0x0006F7 being 32 and 3C with the mirrors being B2 and BC.

In other words, I know where I want to put the other graphic sets.

Also, I only know some ASM. Hacking SMB2 is helping me to learn more and I have learned most of the information using tutorials applying the knowledge to this hack.

(The following is probably not worth anything)

I wrote a break point to 0x0006FC to stop when it is written to. When level 1-1 was loading, this is what I got:

$FE2B:8D F7 06 STA $06F7 = #$2C
$FE2E:A9 18 LDA #$18
$FE30:8D F8 06 STA $06F8 = #$40
$FE33:A5 8F LDA $8F = #$00
$FE35:0A ASL
$FE36:0D F6 06 ORA $06F6 = #$00
$FE39:A8 TAY
$FE3A:B9 0E FE LDA $FE0E,Y @ $FE0E = #$00
$FE3D:8D F9 06 STA $06F9 = #$30
$FE40:60 RTS

When level 2-1 was loading:

$FE2B:8D F7 06 STA $06F7 = #$2C
$FE2E:A9 18 LDA #$18
$FE30:8D F8 06 STA $06F8 = #$42
$FE33:A5 8F LDA $8F = #$00
$FE35:0A ASL
$FE36:0D F6 06 ORA $06F6 = #$00
$FE39:A8 TAY
$FE3A:B9 0E FE LDA $FE0E,Y @ $FE0F = #$04
$FE3D:8D F9 06 STA $06F9 = #$30
$FE40:60 RTS

When level 3-1 was loading:

$FE2B:8D F7 06 STA $06F7 = #$2C
$FE2E:A9 18 LDA #$18
$FE30:8D F8 06 STA $06F8 = #$40
$FE33:A5 8F LDA $8F = #$00
$FE35:0A ASL
$FE36:0D F6 06 ORA $06F6 = #$00
$FE39:A8 TAY
$FE3A:B9 0E FE LDA $FE0E,Y @ $FE10 = #$02
$FE3D:8D F9 06 STA $06F9 = #$30
$FE40:60 RTS

Yeah, you get the point (you already knew it).

$06F7 is the RAM value of sprites used.
$06F8 is the RAM value of the main character's starting sprite.
$06F6 is the RAM value of making character selected normal size.
$06F9 is the RAM value of character selected sprite.

$FE0E and $FE10 I'm unsure of. They seem to have something to do with the selected character's sprite though.




(edited by Chill Penguin on 03-21-05 05:00 PM)
(edited by Chill Penguin on 03-21-05 05:01 PM)
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Rom Hacking - Wanting to use unused space in SMB2 for expansion | |


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.026 seconds.