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 - Found something useful [Howto] | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
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: 1503/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 09-04-04 11:47 AM Link | Quote
I figured out the exit tables. Just write to the given address plus the desired screen number.

7E19B8 - Exit Table, low bytes (32 bytes)
7E19D8 - Exit Table, flags + high bit (32 bytes)
Bit 0 = High bit of level # (1=level 1xx, 0=level 0xx)
Bit 1 = Is Secondary Exit Flag
Bit 2 = Is Exit Present Flag (set if any exit is on this screen)
Bit 3 = Make Destination Water Flag (Secondary Exit only)
Bits 4-7 = Unused

So, say screen 2 had an exit to level 106 as a water level, then 7E19BA = 06 and 7E19DA = 0D (00001101).

To make this even more useful: 7E0095, 7E009B and 7E00D2 all appear to contain the current screen number that Mario's in. You can read them to know what address to write to.
FuSoYa
Defender of Relm
Level: 26

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

Since: 03-15-04
From: Moon

Since last post: 7 days
Last activity: 7 hours
Posted on 09-04-04 01:49 PM Link | Quote
Originally posted by HyperHacker
Bit 2 = Is Exit Present Flag (set if any exit is on this screen)


Er, not quite. I chose that bit to indicate whether it's an original style exit, or a new LM ASM enhanced exit. If it's set to zero to indicate an old style exit, all the other bits in that byte are ignored and the exit is determined the way the game originally did... meaning you can only exit within the same 0x100 OV level block, only use secondary exit #s within that same block, and all the exits in the level must be either secondary or normal (not a mix of both).

The $19D8 array was rather pointless in the original game... it was being used to store a single bit from the screen exit data. But the game never bothered to look at it. It was probably for something Nintendo either abandoned or never got around to.

LM always uses new style exits when saving levels, but original levels that haven't been saved using LM yet will still be using the old style.


I posted the information on the new exit array flags almost 3 years ago on the old board...
BMF98567
BLACK HAS BUILT A SILLY DICE-MAZE!
GO!

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

Posts: 318/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 09-04-04 01:53 PM Link | Quote
Originally posted by FuSoYa
The $19D8 array was rather pointless in the original game... it was being used to store a single bit from the screen exit data. But the game never bothered to look at it. It was probably for something Nintendo either abandoned or never got around to.
You mean...if I were to hack out all the code that writes to this table, I'd have even MORE free 16-bit RAM addresses to use?!

*Neko54123 sweats slightly


(edited by Neko54123 on 09-04-04 04:55 AM)
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: 1504/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 09-05-04 01:49 AM Link | Quote
But then you'd be restricted to levels in the same 256 as the current one, and the Secondary Exit and Water Level flags wouldn't work.

So how do you tell if there isn't an exit? Would it just point to level 000/100?
FuSoYa
Defender of Relm
Level: 26

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

Since: 03-15-04
From: Moon

Since last post: 7 days
Last activity: 7 hours
Posted on 09-05-04 05:10 AM Link | Quote
Originally posted by HyperHacker
So how do you tell if there isn't an exit? Would it just point to level 000/100?


No, there's currently no way to know. The game doesn't clear the old values between levels. You could probably clear them out yourself with some ASM, if you really need a way to know that (or just do as the game did, and don't put an exit-enabled object on a screen that doesn't have an exit set up).

BMF: If you're willing to put up with the exit limitations of the original game, I suppose so... but it seems a bit extreme to be giving up those bits for a mere $10 bytes of RAM. If it were me, I'd just look for RAM in bank 7F that wasn't being used.


(edited by FuSoYa on 09-04-04 08:21 PM)
BMF98567
BLACK HAS BUILT A SILLY DICE-MAZE!
GO!

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

Posts: 320/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 09-05-04 01:03 PM Link | Quote
Err...ooooops. That's what I get for skimming posts...I didn't realize you had already made use of that table.

I know I can just use bank 7F (as I have been doing), but sometimes having free RAM in the $0000-$1FFF range is nice, as it results in smaller code and a slightly larger selection of opcodes you can use.
jonwil

Goomba
Level: 9

Posts: 13/25
EXP: 2989
For next: 173

Since: 04-09-04

Since last post: 85 days
Last activity: 81 days
Posted on 09-06-04 07:38 AM Link | Quote
I have been using the exit table as part of my "random exit" blocks for ages now

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: 1519/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 09-06-04 08:16 AM Link | Quote
Yes, but you seem to have a serious problem with releasing your findings.
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Super Mario World hacking - Found something useful [Howto] | |


ABII


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



Page rendered in 0.036 seconds.