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 Super Mario World hacking: labmaster | 3 guests
Acmlm's Board - I2 Archive - Super Mario World hacking - Sprite creation | |
Pages: 1 2Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
mikeyk

Koopa
Level: 18

Posts: 12/110
EXP: 25086
For next: 4811

Since: 07-17-04

Since last post: 45 days
Last activity: 44 days
Posted on 08-26-04 01:40 PM Link | Quote
I was looking at a few things in the newbie FAQ about sprites, namely the responses to these:

Q) How do you edit how sprites works? / How do you add new sprites?
A) You can't... Yet...

Q) But I saw a hack where some of the enemies was changed!
A) Don't look! Don't ask! Forget all about it. It never happened. OK?

The answers state matter of factly that you just can't edit how sprites work. What exactly does this mean? Wouldn't it be more appropriate to just say it requires ASM or changing data tables in the ROM? By modifying one byte, you can change whether an enemy can be killed with a cape or fireballs. You can change the tiles they use (not the exgfx, but rather tile mapping). You can change the area that will cause interaction with a sprite (essentially it's size). With ASM you can give code to the unused sprites that must be inserted manually in LM (sprite 12 for example). I'm pretty new to the board, so I don't know if this stuff has been done before, but I've found it entirely possible to do some stuff with sprites that the FAQ may cause you to think otherwise. I'll try to whip something simple up to show a bit of what I'm talking about.
Keikonium
Banned
Level: NAN

Posts: 526/-2459
EXP: NAN
For next: 0

Since: 04-02-04

Since last post: 63 days
Last activity: 9 hours
Posted on 08-26-04 03:52 PM Link | Quote
I dont know if exactly what you said is possible, but many many people hvae told me that editing the sprites through the 16x16 editor is impossible. I have found this to be wrong tho. I can change there palettes, and what they look like and simply save it by pressing shift + F9 (or ctrl + F9). It works fine, just I can't change what they do... BMF/Neko did a hack with a chuck boss that he edited and made that boss have HP or something like that.
Smallhacker

Green Birdo

SMW Hacking Moderator
Level: 68

Posts: 433/2273
EXP: 2647223
For next: 81577

Since: 03-15-04
From: Söderhamn, Sweden

Since last post: 10 hours
Last activity: 9 hours
Posted on 08-26-04 06:43 PM Link | Quote
First of all, this should have been posted in the newbie questions thread.

Q) How do you edit how sprites works? / How do you add new sprites?
A) You can't... Yet...

Well, of course you can edit and add sprites. You can make the game do anything (exept for breaking SNES's limits) by ASM and such. What I meant was that there is no KNOWN way to add/edit sprites, with a few exeptions.

Q) But I saw a hack where some of the enemies was changed!
A) Don't look! Don't ask! Forget all about it. It never happened. OK?

I wrote this to prevent "OMG!!1 i SAW THAT HAKK BY KT. i DUNNO WHAT IT WAS CLLED BUTT IT HDA DOSE DIAGONAL BULLT BILLS!!!1 DAT MEENS EDITIN SPRITES IS POSSIBL AND DEREFORE, CNA SOMEONE PLZ AD KARRIBUS SHOO FROM SBM3!!!1? KTHX" questions.
BMF98567
BLACK HAS BUILT A SILLY DICE-MAZE!
GO!

Current list of BURNING FURY >8( recipients:
- Yiffy Kitten (x2)
- Xkeeper
Level: 53

Posts: 313/1261
EXP: 1094149
For next: 62970

Since: 03-15-04
From: Blobaria
Special Move: Rising Meatloaf Backhand Combo

Since last post: 21 hours
Last activity: 1 hour
Posted on 08-26-04 11:42 PM Link | Quote
Originally posted by Keikonium
I dont know if exactly what you said is possible, but many many people hvae told me that editing the sprites through the 16x16 editor is impossible. I have found this to be wrong tho. I can change there palettes, and what they look like and simply save it by pressing shift + F9 (or ctrl + F9). It works fine, just I can't change what they do...
I don't see how that's possible, considering LM doesn't even save any data back to the ROM when you do that. It's NOT actually applying your changes to the ROM, trust me.
mikeyk

Koopa
Level: 18

Posts: 13/110
EXP: 25086
For next: 4811

Since: 07-17-04

Since last post: 45 days
Last activity: 44 days
Posted on 08-27-04 01:38 AM Link | Quote
I've thrown together a one level demo that features a classic stompable goomba. I think what makes this different from what other people have done in the past is that I did not replace an enemy in order to add it. My goomba is it's own sprite (number 12) that can be added manually in LM using Crtl+Ins while in sprite adding mode. Right now it's tiles are mapped to use the SMW goombas, but I think I may look into using the Nintendo Presents tiles instead. The ROM is not locked, so download it and take a look around if you're interested. I can post the data I've used to do this, if there is interest. Next up, I'm going to try to make a SMB1 style hammer brother.

goomba_demo.ips

These goombas are stompable

Someguy

Buzzy Beetle
It seems as though the girl you've fallen for is also a pyromaniac.
Level: 32

Posts: 64/397
EXP: 193329
For next: 13113

Since: 03-15-04
From: I'm proud to be an American... I think...

Since last post: 1 day
Last activity: 5 hours
Posted on 08-27-04 01:53 AM Link | Quote
Wow, impressive! Besides the fact that they explode instaid of flatten(you didn't have the beta SMW flatened goomba sprites most likely anyway, and it's just an example)that's awsome! Is it possible you could show how you did that? What ASM code you made and what it means in english, how you set it to use sprite 12, and how(or if)you used the Lunar Magic RATS tag format to protect it from being overwritten, or maybe you could just say how you learned this yourself.
Mario Maniac

Snifit
Level: 26

Posts: 140/281
EXP: 100860
For next: 1415

Since: 08-01-04

Since last post: 243 days
Last activity: 167 days
Posted on 08-27-04 02:02 AM Link | Quote




Just a hint: you've said about use Ctrl+Insert right? There's a easier way. Just open "add sprites window", click in which sprite you want with mouse's left button and with the right botton in level editor. Your sprite will appears. When you change the sprite, first click in any place from LV to choose another one, otherwise you'll place the same sprite that you have already used.

So the only way to edit sprites is via hex editor?


(edited by Mario Maniac on 08-26-04 05:23 PM)
asdf

Cukeman
Level: 28

Posts: 175/303
EXP: 128796
For next: 2542

Since: 03-16-04

Since last post: 5 hours
Last activity: 54 min.
Posted on 08-27-04 02:24 AM Link | Quote
Originally posted by Mario Maniac




Just a hint: you've said about use Ctrl+Insert right? There's a easier way. Just open "add sprites window", click in which sprite you want with mouse's left button and with the right botton in level editor. Your sprite will appears. When you change the sprite, first click in any place from LV to choose another one, otherwise you'll place the same sprite that you have already used.

So the only way to edit sprites is via hex editor?


Umm...LM doesn't display all sprites in the Add Sprites Window, such as Bowser's bowling ball. Simply put, SPRITE 12 IS *NOT* IN THE ADD SPRITES WINDOW*
Mario Maniac

Snifit
Level: 26

Posts: 141/281
EXP: 100860
For next: 1415

Since: 08-01-04

Since last post: 243 days
Last activity: 167 days
Posted on 08-27-04 02:34 AM Link | Quote





Sorry, I forgot the null sprites.
Keikonium
Banned
Level: NAN

Posts: 530/-2459
EXP: NAN
For next: 0

Since: 04-02-04

Since last post: 63 days
Last activity: 9 hours
Posted on 08-27-04 02:47 AM Link | Quote
Sweet...new sprites

BTW, dont use the Nintendo Presents graphics. Fusoya told people that the Nintendo Presents thing is used to keep track of mario and yoshis size/movements or something like that. So did modify that. Its used for mario and/or yoshi.
Someguy

Buzzy Beetle
It seems as though the girl you've fallen for is also a pyromaniac.
Level: 32

Posts: 69/397
EXP: 193329
For next: 13113

Since: 03-15-04
From: I'm proud to be an American... I think...

Since last post: 1 day
Last activity: 5 hours
Posted on 08-27-04 06:59 AM Link | Quote
It's where Mario's and Yoshi's graphics are actively updated into so he can have more sprites without limiting the space for other sprites or BG items if it is possible to read from that area.
knuck

Hinox
Banned until 19-58-5815: trolling, flaming, spamming, being a general fucktard...
Level: 62

Posts: 669/1818
EXP: 1894574
For next: 90112

Since: 03-15-04

Since last post: 14 hours
Last activity: 9 hours
Posted on 08-27-04 02:31 PM Link | Quote
GREAT job mikeyk. It seems that you got SMW hacking to a new level.
If you post the data used, that would be awesome.
Kyoufu Kawa
I'm not bad. I'm just drawn that way.
Level: 70

Posts: 565/2481
EXP: 3008456
For next: 7355

Since: 03-19-04
From: Catgirl Central

Since last post: 14 hours
Last activity: 13 hours
Posted on 08-27-04 02:39 PM Link | Quote
*Kawa-oneechan gives mikeyk a Goomba plushie
mikeyk

Koopa
Level: 18

Posts: 14/110
EXP: 25086
For next: 4811

Since: 07-17-04

Since last post: 45 days
Last activity: 44 days
Posted on 08-27-04 05:38 PM Link | Quote
Someguy: It may be surprising, but there isn't a whole lot of ASM in this demo I made. I was going to release it with none at all, but there were a few things that I wanted to improve. The two things I did end up doing with ASM were preventing the goombas from entering shells and making them explode when stepped on (I only did the second one because I didn't have a sprite designed for the smashed ones). As for a RATS tag, I've only gotten into hex/ASM in the past two weeks, so I wasn't really sure what one was or how to use it. I just made an assumption from what I saw in the ROM to just prefix my custom code with 53 54 41 52 and end it with FF, but I don't know for sure if that's all there is to it.

Even though I didn't write much for this demo, without ASM I never could have traced through the code to find the necessary sprite data. The first important thing I found was a subroutine starting at SNES address $07F7A0 that runs when a sprite is initialized. It loads data from 6 major tables in the ROM. Listed below are the ROM addresses for the begining of the tables and the RAM locations they are associated with.

0x03F46C -> 7E1656
0x03F535 -> 7E1662
0x03F5FE -> 7E166E
0x03F6C7 -> 7E167A
0x03F790 -> 7E1686
0x03F859 -> 7E190F

All of these tables are indexed by sprite number (starting with x00 for the shelless green koopa). Here's a few of my notes about some table values. I've still barely touched the surface of all this data. I have the RAM locations as the headers, cuz that's what I see in my trace logs.

7E1656
setting both bits 5 and 6 makes an enemy stompable
setting bit 8 changes the cape/star kill style

7E166E
setting bit 1 changes the gfx page
bits 2-4 tell which palette (8-F) the sprite uses
setting bit 5 disables fireball killing of the enemy
setting bit 6 disables cape killing of the enemy

7E1686
if bit 8 is set the sprite passes through floor
bit 7 is set if the enemy is sprite creating (which is created is in a different table)

7E1662
I've noticed that changing data here changes the area for sprite interaction. For example, you've probably seen in hacks where rexes have been changed into goombas, you can still get killed by an invisible rex head. Fixing this is as simple as changing rex's table value 0x03F5E0 (0x03F535 + AB) to x00.

Keep in mind that not all sprites use the data loaded from these tables. Some get new data from their own tables found in sprite specific routines.

For my demo, I just changed entry 12 to match entry 00 for all six tables. I then needed to make sprite 12 use the code for shelless koopas, so doing some tracing I found another very important table at ROM address 0x0087CC. This table holds the memory locations (2 bytes for each sprite) to go to for the handling of each sprite. Sprite 12 intially jumped to a RTS command (made sense since it's listed as a null sprite), changing it to use the shelless koopa's code finally gave me some results I could see. I had a sprite that acted like a koopa, but the graphics it used was off. 7E1602 holds the animation frame, but I needed to change the tiles that the frames used... more tracing, more tables.

0x009E7F is the begining of an offset table that is indexed by sprite number. 0x009D83 is the start of a gfx tile table that is indexed by a value in the offset table. For example the entry for a green shelless in the offset table is x09, so the gfx tiles for the shelless start at 0x9D8C (0x009D83 + x09). Again not all of the enemies are stored here. I started to document which were but lost interest. I'll include what I did find though:

(0)
82 A0 - koopa Walk 1
82 A2 - koopa walk 2
84 A4 - koopa turning
8C - koopa shell
8A - koopa shell ani 1
8E - koopa shell ani 2

(9)
C8 - shelless walk 1
CA - shelless walk 2
CA - shelless turn
CE - unused?
CC - shelless fliping shell
86 - struggling shelless 1
4E - struggling shelless 2

(10)
E0 - blue shelless walk 1
E2 - blue shelless walk 2
E2 - blue shelless turning
CE - unused?
E4 - blue shelless kicking
E0 - blue shelless struggling 1
E0 - blue shelless struggling 2

(17) para-goomba
a3 - straight goomba 8x8 tile 1
a3 - straight goomba 8x8 tile 2 (mirrored)
b3 - straight goomba 8x8 tile 3
b3 - straight goomba 8x8 tile 4 (mirrored)
e9 - tilted left goomba 8x8 tile 1 (mirrored)
e8 - tilted left goomba 8x8 tile 2 (mirrored)
f9 - tilted left goomba 8x8 tile 3 (mirrored)
f8 - tilted left goomba 8x8 tile 4 (mirrored)
e8 - tilted right goomba 8x8 tile 1
e9 - tilted right goomba 8x8 tile 2
f8 - tilted right goomba 8x8 tile 3
f9 - tilted right goomba 8x8 tile 4
e2 - straight parachute
e6 - tilted parachute

(25)
AA - goomba walk/struggling 1
A8 - goomba walk/struggling 2
A8 - goomba turning
AA - unused??

(29) para-bomb
A2 - straight
A2 - straight
B2 - straight
B2 - straight
C3 - tilted left
C2 - tilted left
D3 - tilted left
D2 - tilted left
C2 - tilted right
C3 - tilted right
D2 - tilted right
D3 - tilted right
e2 - straight parachute
e6 - tilted parachute

(37)
CA - bob-omb walking 1
CC - bob-omb walking 2
CA - bob-omb turning

(3A)
AC piranha plant closed mouth
CE classic/upside down stem frame 1
AE piranha plant open mouth
CE classic/upside down stem frame 2
83 displays behind left of jumping piranha frame 1 ???
83 displays behind right of jumping piranha frame 1 ???
C4 jumping stem 8x8 tile 1 frame 1
C4 jumping stem 8x8 tile 2 frame 1
83 displays behind left of jumping piranha frame 2 ???
83 displays behind right of jumping piranha frame 2 ???
C5 jumping stem 8x8 tile 1 frame 2
C5 jumping stem 8x8 tile 2 frame 2

(46)
8A - football

(47)
A6 - bullet bill

A4 - ???
A6 - ???
A8 - ???

(4B)
80 - spiny walking 1
82 - spiny walking 2
80 - spiny turning

(4E)
84 - spiny egg 8x8 tile 1 frame 1
84 - spiny egg 8x8 tile 2 frame 1
84 - spiny egg 8x8 tile 3 frame 1
84 - spiny egg 8x8 tile 4 frame 1
94 - spiny egg 8x8 tile 1 frame 2
94 - spiny egg 8x8 tile 2 frame 2
94 - spiny egg 8x8 tile 3 frame 2
94 - spiny egg 8x8 tile 4 frame 2

For my demo, I gave sprite 12 the same offset as the SMW goomba, and that's precisely what appears. The more I look through the ROM, the more tables I see, so hopefully this will spark some interest in documenting them.

Right now I'm working on making a SMB1 style hammer brother. So far I've got the code for hammer throwing (almost a direct copy of the SMW's hammer bro) and have a modified rex calling that code. I still have to rework to code for his movement, but hopefully I'll have some more to share in the not so distant future

Well that does it for me... after about an hour of typing this post I'm sleepy
Smallhacker

Green Birdo

SMW Hacking Moderator
Level: 68

Posts: 442/2273
EXP: 2647223
For next: 81577

Since: 03-15-04
From: Söderhamn, Sweden

Since last post: 10 hours
Last activity: 9 hours
Posted on 08-27-04 06:43 PM Link | Quote
Woah! That's a really interesting post! Great jorb!
Alaric

Paragoomba
Level: 15

Posts: 55/72
EXP: 14932
For next: 1452

Since: 03-15-04

Since last post: 108 days
Last activity: 5 hours
Posted on 08-27-04 07:44 PM Link | Quote
This..
Is...
(Somewhat) Utterly..
GROUNDBREAKING!
(Or so i think.)
Woohoo, great job, mikeyk.
Quite seriously... This may be the revolution that we need.. To make original hacks.. (Of course, the people that know ASM)
And a RATS Tag is like so:

(Copied from a post that BMF Made in my Free Locations thread before the board went poof)

But, yeah, if you're reserving space after the first 512K, just make your own RAT tag like so (shamelessly ripped from LunarDLL.h):

S T A R ssssssss SSSSSSSS cccccccc CCCCCCCC (8 bytes)

"STAR" Tag identifier, which is the word "RATS" reversed in
all-caps.
SSSSSSSS ssssssss Size-1 of data, 16 bit, little endian. It does not
include the size of the RAT tag itself.
CCCCCCCC cccccccc Inverse of size-1, 16 bit, little endian.

Min/Max size allowed: 1-0x10000


Have fun, and keep up the good work mikeyk!
Keikonium
Banned
Level: NAN

Posts: 534/-2459
EXP: NAN
For next: 0

Since: 04-02-04

Since last post: 63 days
Last activity: 9 hours
Posted on 08-27-04 10:47 PM Link | Quote
This is truly amazing!! I really need to start reading into ASM...

In a few levels in KT's hack he has respawning sprites...which I really would like to have. Hes got, mecha-koopas, platforms, goombas, and my favourite...torpedo teds! The torpedos is what I really need, but some respawing wigglers, doubled stemed Pirana plants, or bullet shooters that fire out bombs like in SMB3 would be AMAZING!!!

Good job with finding this! Now all we need is some music editing...

EDIT:

I was looking at sprite 12 in LM (unedited) and it was only 1 16x16 tile. Now, what if I wanted to make a large hammer bro (SMB3 Giant land) which looks to me like it is 4 16x16 tiles. How would this work? Would I have to find an unused tile that is 4 16x16 tiles or what?


(edited by Keikonium on 08-27-04 01:53 PM)
Kario

In Possession of a Stolen Shovel

Level: 65

Posts: 502/2082
EXP: 2321379
For next: 14249

Since: 03-15-04
From: Texas... Yeehaw!

Since last post: 2 days
Last activity: 17 hours
Posted on 08-28-04 12:25 AM Link | Quote
That is some awesome information. I do have one request. DON'T MAKE AN ENEMY EDITOR. It will ruin SMW hacking if you do.
Alastor the Stylish
Hey! I made a cool game! It's called "I poisoned half the food, so if you eat you might die!" Have a taco.


Level: 114

Posts: 2019/7620
EXP: 16258468
For next: 51099

Since: 03-15-04
From: Oregon, US

Since last post: 2 hours
Last activity: 2 hours
Posted on 08-28-04 01:26 AM Link | Quote
Originally posted by Kario
That is some awesome information. I do have one request. DON'T MAKE AN ENEMY EDITOR. It will ruin SMW hacking if you do.
... What? Why?

Oh, and Keikonium, after a great deal of speculation I've come to the conclusion that he merely used bullet bill launchers placed on top of custom blocks that change sprites touching it in to (insert sprite here). I believe this is so based on some of the activity of diagonal bullet bills in certain levels (bouncing off of launchers and going in the same direction as they would have had they been launched from it, mainly). If I'm wrong, feel free to correct me, anyone.
Smallhacker

Green Birdo

SMW Hacking Moderator
Level: 68

Posts: 447/2273
EXP: 2647223
For next: 81577

Since: 03-15-04
From: Söderhamn, Sweden

Since last post: 10 hours
Last activity: 9 hours
Posted on 08-28-04 01:45 AM Link | Quote
Originally posted by Kario
That is some awesome information. I do have one request. DON'T MAKE AN ENEMY EDITOR. It will ruin SMW hacking if you do.

...I was accually thinking about doing that (for own use only).
Pages: 1 2Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Super Mario World hacking - Sprite creation | |


ABII


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



Page rendered in 0.020 seconds.