 |
|
 |
|
Views: 236,164,978 Time: 2013-05-21 01:39:02 PM | 17 users online: Bombchu, Doopy Buckride, ErikAlay, gerg357, gibbl, Koopster, Ladida, leod, Magiluigi, Reggie, Richard Nixon, Riolu180, tatanga, TheOtherGuy25, Undy, willian125677, Yasuo - Guests: 51 - Bots: 15 | Users: 22,857 (1,291 active) Latest: Precious Hippocrates |
|
|
 |
|
 |
|
| Tip: Try sketching out ideas for overworlds and levels. Even if they don't manage to fit into Lunar Magic completely, at least you have a base to work from, instead of doing it all from scratch. |
|
|
|
 |
|
 |
|
 |
|
 |
|
| Weird BTSD Issue |
|
Forum Index - SMW Hacking - General SMW Hacking Help - ASM & Related Topics - Weird BTSD Issue |
|
Pages: 1  |
|
|
|
| Posted on 2010-04-03 08:26:52 PM |
Link | Quote |
|
I just discovered a really strange problem with the gravity blocks that came with BTSD. Just the other day they were working fine, then I go to transfer everything to a new ROM to use with LM 1.7 and I find that the blocks crash the game every time Mario jumps. The weird thing is, though, that I haven't changed anything in the asm file that would cause a crash.
From what I can tell, the details are:
1) If Mario is in the air and surrounded by the blocks, the game crashes unless...
2) If Mario is in the air and is horizontally touching the blocks AND another tile (he must be almost exactly between the two) then the blocks will behave normally.
3) If Mario is in the air from the event occurring under #2 and he moves left or right more than a few pixels, the game will crash, regardless of whether or not he moved into or out of the blocks.
Here's the code for the blocks, if anyone wants to look it over.
Code;gravity block
;by smkdan
JMP GravityActive : JMP GravityActive : JMP GravityActive : JMP Return : JMP Return : JMP Return : JMP Return
;don't touch those
;To use this, fill the empty space with one of these blocks
;Act like 25 ofcourse
;!GRAVITY LEVEL! A value from 00-0F
!GRAVITYLEVEL = $01
;00-07: Low gravity
;00: low gravity with max effect, 07: low gravity with min effect
;08-0F: High gravity
;08: high gravity with max effect, 0F: high gravity with min effect
;masks
GRVMASK:
db $00,$01,$03,$07,$0F,$1F,$3F,$7F
GravityActive:
LDA #!GRAVITYLEVEL
AND #$07 ;only low 3 bits
TAX ;and into X
LDA $14 ;frame counter
AND GRVMASK,x ;affect gravity on this frame?
BNE Return
LDA #!GRAVITYLEVEL
BIT #$08 ;test for high / low
BNE HighGravity
;lowgravity
DEC $7D ;up
RTL
HighGravity:
INC $7D ;down
Return:
RTL
I have no possible clue as to what's going on here...I can't be the ROM because I used a clean-ish one (I.E. it had the standard LM 1.65 expansion and a level for testing the blocks but nothing else), it can't be the ASM file because that never changed, and it can't be BTSD because redownloading it would have solved the problem. Also note that I haven't had this problem with any other block. Can anyone see what could be wrong?
|
|
| Posted on 2010-04-03 08:28:51 PM |
Link | Quote |
|
|
Are you inserting these on pages 10 or above? LM 1.70 added more MAP16 pages, which BTSD couldn't adjust for.
|
|
| Posted on 2010-04-03 08:31:34 PM |
Link | Quote |
|
Originally posted by UltimaximusAre you inserting these on pages 10 or above? LM 1.70 added more MAP16 pages, which BTSD couldn't adjust for.
Woah, that was fast...
*cough* I mean...
No, only page three, and the problem also occurs regardless of which version of Lunar Magic is used. (I probably should've put that in the first post...)
|
|
| Posted on 2010-04-03 08:59:46 PM |
Link | Quote |
|
|
What are the offsets that you used? ...or is that only for .bin blocks? (It's been too long since I used BTSD...)
|
|
| Posted on 2010-04-03 09:04:22 PM |
Link | Quote |
|
Originally posted by UltimaximusWhat are the offsets that you used? ...or is that only for .bin blocks? (It's been too long since I used BTSD...)
They're only for .bin blocks.
|
|
| Posted on 2010-04-03 09:11:15 PM |
Link | Quote |
|
Looking over the code, nothing jumps out at me as crash-worthy, and no obscure RAM addresses in the last few banks that LM might use have been used in this block... I don't know what to tell you, I'm stumped.
(Hm... Is it level-specific, or does it crash in any level you place it in?)
|
|
| Posted on 2010-04-03 09:15:33 PM |
Link | Quote |
|
Originally posted by UltimaximusLooking over the code, nothing jumps out at me as crash-worthy, and no obscure RAM addresses in the last few banks that LM might use have been used in this block... I don't know what to tell you, I'm stumped.
(Hm... Is it level-specific, or does it crash in any level you place it in?)
The annoying thing is that I can't seem to figure out whether the source of the problem is Lunar Magic, BTSD, or the ASM file itself...*sigh*
Oh, and it happens in any level I put it in.
|
|
| Posted on 2010-04-05 12:56:19 PM |
Link | Quote |
|
|
seen as the only change is that you ported over to LM1.70, it probably is because of LM. not sure though.
|
|
| Posted on 2010-04-06 02:19:09 PM |
Link | Quote |
|
Originally posted by JeRRy86seen as the only change is that you ported over to LM1.70, it probably is because of LM. not sure though.
Nope, like I said before, the problem persists even when I use version 1.65.
Also, here's an image if you don't quite get what I'm saying in the first post. The blue tiles represent low gravity.

This is one of the only ways that the blocks will work. Moving more than a few pixels left or right from that point will crash the game.
|
|
| Posted on 2010-04-06 03:26:06 PM |
Link | Quote |
|
Use the latest BTSD and make sure these blocks have corner/inside offsets.
If they don't already, just point the corner/inside offsets to the gravity code.
|
|
| Posted on 2010-04-06 06:43:30 PM |
Link | Quote |
|
Originally posted by KaijyuuUse the latest BTSD and make sure these blocks have corner/inside offsets.
Yep, that'd be it. Thanks, my hack is saved!
|
|
|
Pages: 1  |
|
|
|
|
Forum Index - SMW Hacking - General SMW Hacking Help - ASM & Related Topics - Weird BTSD Issue |
|
|
 |
|
 |
The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.
Copyright © 2005 - 2013 - SMW Central Legal Information - Link To UsTotal queries: 29
|
|
|
|