Points of Required Attention™
Please chime in on a proposed restructuring of the ROM hacking sections.
Views: 88,495,148
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 04-28-24 04:53 AM
Guest: Register | Login

Main - Posts by ShaneM

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14

ShaneM
(post deleted) ID: 158681

ShaneM
Posted on 10-08-14 06:22 AM, in smb2j hack Link | Quote | ID: 158682


Snifit
Compromised account.
Please contact an admin to restore access.
Level: 36

Posts: 163/285
EXP: 293545
Next: 14565

Since: 02-17-14

Last post: 3139 days
Last view: 2654 days
There is actually a perfect FDS to NES conversion by loopy. Type in Google "loopy's NES SMB2J" and look out for his site (hosted by Comcast). It is perfect in that it is a replica of the FDS version, but on NES. It is MMC3. Don't settle for anything less such as poorly done NES pirate versions. If you need help hacking the NES version, ask me and I can assist you. --ShaneM

____________________
At the end, when the day is over, the only one left to face is yourself. Have you been true to yourself and made the most of your day?

ShaneM
Posted on 10-08-14 06:27 AM, in Super Mario Bros hitbox data Link | Quote | ID: 158683


Snifit
Compromised account.
Please contact an admin to restore access.
Level: 36

Posts: 164/285
EXP: 293545
Next: 14565

Since: 02-17-14

Last post: 3139 days
Last view: 2654 days
The routine "HeadChk" determines collision and the routine "CheckForSolidMTiles" determines whether an object is climable or solid (which draws from data in "SolidMTileUpperExt")


SolidMTileUpperExt:
.db $10, $62, $88, $c5

CheckForSolidMTiles:
jsr GetMTileAttrib ;find appropriate offset based on metatile's 2 MSB
cmp SolidMTileUpperExt,x ;compare current metatile with solid metatiles
rts

HeadChk: lda Player_Y_Position ;get player's vertical coordinate
cmp PlayerBGUpperExtent,x ;compare with upper extent value based on offset
bcc DoFootCheck ;if player is too high, skip this part
jsr BlockBufferColli_Head ;do player-to-bg collision detection on top of
beq DoFootCheck ;player, and branch if nothing above player's head
jsr CheckForCoinMTiles ;check to see if player touched coin with their head
bcs AwardTouchedCoin ;if so, branch to some other part of code
ldy Player_Y_Speed ;check player's vertical speed
bpl DoFootCheck ;if player not moving upwards, branch elsewhere
ldy $04 ;check lower nybble of vertical coordinate returned
cpy #$04 ;from collision detection routine
bcc DoFootCheck ;if low nybble < 4, branch
jsr CheckForSolidMTiles ;check to see what player's head bumped on
bcs SolidOrClimb ;if player collided with solid metatile, branch
ldy AreaType ;otherwise check area type
beq NYSpd ;if water level, branch ahead
ldy BlockBounceTimer ;if block bounce timer not expired,
bne NYSpd ;branch ahead, do not process collision
jsr PlayerHeadCollision ;otherwise do a sub to process collision
jmp DoFootCheck ;jump ahead to skip these other parts here


____________________
At the end, when the day is over, the only one left to face is yourself. Have you been true to yourself and made the most of your day?

ShaneM
Posted on 10-08-14 06:45 AM, in Having a problem with my Super Mario Bros 1 hack (rev. 4 of 10-08-14 06:21 PM) Link | Quote | ID: 158684


Snifit
Compromised account.
Please contact an admin to restore access.
Level: 36

Posts: 165/285
EXP: 293545
Next: 14565

Since: 02-17-14

Last post: 3139 days
Last view: 2654 days
This is old, but for people still struggling with this, here is how you edit maze data:

In SMB Utility, go to "Tools" "Edit Looping Castle Loop". Now, you see these options:

World, Page, V pos, Offset of map page skip data.

World = The World that the loop takes place in. $00=World 1. So...let's say you wanted to make a loop for World 5 you'd assign it a $04. They go in order from lowest world to highest. You are limited to 11 loops unless you work through the SMB disassembly by doppleganger, in which case you'd need to edit the data through Notepad++.

Page = What page does the loop take place in? See those vertical white lines spaced out? Each of those is a page. Starting at page $00, move on up until you determine what page you want your loop in.

V pos = What part of the page does your loop take place in? You can work with top, middle and bottom. These go by $40s. So...if you want to loop at the top you'd do $40, upper middle $80, lower middle $b0 and bottom $f0.

Offset of map page skip data = This determines the header of the page skip for which the loop takes place. (Look out for "Page Change", which is stored as enemy data.) This data has values of the header of each (one) page skip behind a loop command. To find these headers, double click on the page skip block. The value with a "H" next to it (i.e., 3FH, 43H, etc.) in the description is the header of the page skip (found at the lower left).

--ShaneM

____________________
At the end, when the day is over, the only one left to face is yourself. Have you been true to yourself and made the most of your day?

ShaneM
Posted on 10-08-14 06:53 AM, in Poison Mushroom, Running Hammer Bros., and Luigi Game patche Link | Quote | ID: 158685


Snifit
Compromised account.
Please contact an admin to restore access.
Level: 36

Posts: 166/285
EXP: 293545
Next: 14565

Since: 02-17-14

Last post: 3139 days
Last view: 2654 days
Posted by Scar_2468
Hey guys, I need the following...
Poison Mushroom
Running Hammer Bros.
Luigi Game

Can anyone help me out on this? I really need them to get started on this Super Mario Bros. hack.


These are impossible to find online these days. I've had these forever. Though I can just hack them in anytime I want since I know ASM, I understand many people don't, so here you go. From my personal archive library:

Aggressive Hammer Bros.: http://www.mediafire.com/download/2w723068l1o1yi7/smb_hb.zip

Poison Mushroom: http://www.mediafire.com/download/qq4o8eekzcfu0am/smb_poison.zip

Luigi Game: http://www.mediafire.com/download/idwiq8r3hfgc4rd/smb_luigi.zip


If anyone needs any more rare SMB1 patches, ask me as I have all of them (I think).

If you want to change any of the ones you requested, let me know and I can work some ASM magic for you. --ShaneM

____________________
At the end, when the day is over, the only one left to face is yourself. Have you been true to yourself and made the most of your day?

ShaneM
Posted on 10-08-14 07:21 AM, in SMB Code: Five Extra Seconds of Time? (rev. 4 of 10-08-14 07:41 AM) Link | Quote | ID: 158686


Snifit
Compromised account.
Please contact an admin to restore access.
Level: 36

Posts: 167/285
EXP: 293545
Next: 14565

Since: 02-17-14

Last post: 3139 days
Last view: 2654 days
For people wanting to do this today. Very simple ASM modification. Can be done in a hex editor. Just follow this:


;what we want to do is replace the first three lines of code. Change "ldy #$05" to
;"ldy #$00" and change the next line, "lda GameTimerDisplay+2" to
;"lda #$06". Then finally, change the third line from "cmp #$01" to "cmp #$06"
;that's it (make sure your assembled binary is exactly 32, 768 bytes)!

GameTimerFireworks:
ldy #$05 ;set default state for star flag object
lda GameTimerDisplay+2 ;get game timer's last digit
cmp #$01
beq SetFWC ;if last digit of game timer set to 1, skip ahead
ldy #$03 ;otherwise load new value for state
cmp #$03
beq SetFWC ;if last digit of game timer set to 3, skip ahead
ldy #$00 ;otherwise load one more potential value for state
cmp #$06
beq SetFWC ;if last digit of game timer set to 6, skip ahead
lda #$ff ;otherwise set value for no fireworks
SetFWC: sta FireworksCounter ;set fireworks counter here
sty Enemy_State,x ;set whatever state we have in star flag object



--ShaneM

____________________
At the end, when the day is over, the only one left to face is yourself. Have you been true to yourself and made the most of your day?

ShaneM
Posted on 10-08-14 07:30 AM, in SMB2J's Platform Glitch Fix (rev. 4 of 10-08-14 07:33 AM) Link | Quote | ID: 158688


Snifit
Compromised account.
Please contact an admin to restore access.
Level: 36

Posts: 168/285
EXP: 293545
Next: 14565

Since: 02-17-14

Last post: 3139 days
Last view: 2654 days
This is a Nintendo original glitch. It deals with platforms. https://www.youtube.com/watch?v=1nzyWWDYSvc

Here is the fix and what to do in the SMB2J disassembly. (The code that I created I've added a note with my name next to it.)


SetCollisionFlag:
ldx ObjectOffset
pha ;shane
lda Player_Y_HighPos ;shane
cmp #$01 ;shane
bne platfix ;shane
lda Player_Y_Position ;shane
cmp #$df ;shane
bcc platfix ;shane
pla ;shane
rts ;shane
platfix: ;shane
pla ;shane
sta PlatformCollisionFlag,x
lda #$00
sta Player_State
rts


--ShaneM



____________________
At the end, when the day is over, the only one left to face is yourself. Have you been true to yourself and made the most of your day?

ShaneM
Posted on 10-08-14 08:53 AM, in SMB Permanent Invincibility Code for Game Genie (rev. 2 of 10-08-14 08:55 AM) Link | Quote | ID: 158689


Snifit
Compromised account.
Please contact an admin to restore access.
Level: 36

Posts: 169/285
EXP: 293545
Next: 14565

Since: 02-17-14

Last post: 3139 days
Last view: 2654 days
Posted by GameGenie81
Hi,

Can anyone think of any permanent (but permanent w/o any deaths) invincibility codes that I can input into a Game Genie when I use it for Super Mario Bros. for the NES?

There is one out there, PKAOZP, that will do it, but whoever created this code states that Mario will sometimes die after he beats a certain level with a flag pole. I would like an equivalent code to this where Mario doesn't die at all...

Thank you,



Ben



Okay. To whomever this applies to in the year 2014. Two ways to do this. Both have the same end result.

1) Hex editor. Remove all JMPs and JSRs to "InjurePlayer" (do a hex search for all $20 $2C $D9/ $4C $2C $D9) by NOP'ing them ($EA is the opcode). Then use the SMB disassembly by doppleganger (under Documents on RHDN) and find all the BEQs and BNEs to "InjurePlayer" and NOP the 2 bytes for each conditional statement.

2) ^Similar to one except this one is easier. Just make the above changes to the .asm file and assemble it (preferably with a make.bat that spits out a .lst file). This saves time and effort.

These methods are similar to Game Genie but have a more permanent effect. Remember, always back up your files before hacking them. --ShaneM

____________________
At the end, when the day is over, the only one left to face is yourself. Have you been true to yourself and made the most of your day?

ShaneM
Posted on 10-09-14 04:45 AM, in Nintendo: Japan vs. America Corporate (rev. 2 of 10-09-14 04:47 AM) Link | Quote | ID: 158697


Snifit
Compromised account.
Please contact an admin to restore access.
Level: 36

Posts: 171/285
EXP: 293545
Next: 14565

Since: 02-17-14

Last post: 3139 days
Last view: 2654 days
Posted by MikeTechno
Are you done now with your rant and rage of nintendo ?
If you don't like NOA products be a good man and go to ebay or amazon and purchase a pre-owned or new nintendo of japan system and games.

Yes some of us know NintenDon't is crooked but you don't hear very many people saying much about it.




The point of this is not really to rant or any crap like that. It is to share my view and feelings on the issue at hand. Everything I've shared is fact. This view is to reflect Nintendo from 1985-2007. Modern Nintendo is my linear and consistent than previously. I'm an old school gamer and prefer Nintendo when it was much simpler. Your opinion might differ from mine, but that's the wonderful part of free will and sharing. --ShaneM

____________________
At the end, when the day is over, the only one left to face is yourself. Have you been true to yourself and made the most of your day?

ShaneM
Posted on 10-09-14 08:44 AM, in SMB Lost Levels: Extended Edition with SRAM Saving (FDS hack) Link | Quote | ID: 158699


Snifit
Compromised account.
Please contact an admin to restore access.
Level: 36

Posts: 172/285
EXP: 293545
Next: 14565

Since: 02-17-14

Last post: 3139 days
Last view: 2654 days
I've invented a new enemy to the SMB2J portion of my game. It is only found on World 9 (Fantasy World). I'd like some feedback. What do you all think? I call it Piranha Trio. It's a 3-headed Piranha Plant...I got the idea from Dugtrio.

This'll be in the new build when it's ready.





____________________
At the end, when the day is over, the only one left to face is yourself. Have you been true to yourself and made the most of your day?

ShaneM
Posted on 10-09-14 10:28 AM, in SMB Lost Levels: Extended Edition with SRAM Saving (FDS hack) Link | Quote | ID: 158701


Snifit
Compromised account.
Please contact an admin to restore access.
Level: 36

Posts: 173/285
EXP: 293545
Next: 14565

Since: 02-17-14

Last post: 3139 days
Last view: 2654 days
@Vanya

Thanks. It is indeed actually more dangerous because this type can pop up even when the player is standing on the pipe. It takes 3 fireballs to completely defeat it. So far, I have 3 in total in World 9. The other new enemy I've created is a two-sided Firebar. It moves 2x the speed of a regular Firebar but does a 720. I call it a Fuller Bar. Will release this build soon.

____________________
At the end, when the day is over, the only one left to face is yourself. Have you been true to yourself and made the most of your day?

ShaneM
Posted on 10-09-14 10:54 PM, in SMB Lost Levels: Extended Edition with SRAM Saving (FDS hack) (rev. 2 of 10-09-14 11:19 PM) Link | Quote | ID: 158716


Snifit
Compromised account.
Please contact an admin to restore access.
Level: 36

Posts: 174/285
EXP: 293545
Next: 14565

Since: 02-17-14

Last post: 3139 days
Last view: 2654 days
Posted by Chaobomr
A two-sided firebar, huh? Sounds like that giant firebar in level 5-4 in the original SMB.


Not quite. Here are some pics.





One rotates clockwise 2x as fast as a regular Firebar and the other one counter-clockwise 2x as fast, too. Hence the name Fuller Bar (720). It is only found on 4-4 of SMB2J and makes up for the Firebar that never previously loads there.

Posted by Insectduel

Have you heard of Yellow Piranha plants? It's a enemy that can ALWAYS pop up even if you stand on top of the pipe.


Yes, I have personally played that hack myself. Those are easy to create. Simply change the Piranha's palette in "EnemyAttributeData:" and NOP the "lda #$22" and "sta $00" in the subroutine "InitPiranhaPlant:"

____________________
At the end, when the day is over, the only one left to face is yourself. Have you been true to yourself and made the most of your day?

ShaneM
Posted on 10-09-14 10:58 PM, in Can someone give me DahrkDaiz's Mario Adventure reserve box? (rev. 5 of 10-10-14 04:10 AM) Link | Quote | ID: 158717


Snifit
Compromised account.
Please contact an admin to restore access.
Level: 36

Posts: 175/285
EXP: 293545
Next: 14565

Since: 02-17-14

Last post: 3139 days
Last view: 2654 days
Alright; I'm locking this thread.

@TheYoshiAngel

I apologize for some of the harsher responses. But the point is, nobody wants to do this for you for free. Sorry.

But the good news: I've provided a way for beginners to learn ASM without needing a background in computer science. If you want it bad enough, give learning ASM a try. And you are free to post technical questions about ASM if you get stuck (though it is so easily portrayed in that thread, you probably won't need to). Have fun and glad to have you with us.

http://acmlm.kafuka.org/board/thread.php?id=8035

--ShaneM

EDIT: Or, you can use this, http://www.romhacking.net/hacks/1658/

____________________
At the end, when the day is over, the only one left to face is yourself. Have you been true to yourself and made the most of your day?

ShaneM
Posted on 10-10-14 06:42 AM, in Super Mario Bros Hacking Question (rev. 2 of 10-10-14 06:48 AM) Link | Quote | ID: 158721


Snifit
Compromised account.
Please contact an admin to restore access.
Level: 36

Posts: 176/285
EXP: 293545
Next: 14565

Since: 02-17-14

Last post: 3139 days
Last view: 2654 days
You're lucky I like SMB1/SMB2J so much. OP request fulfilled. Thanks for your patience. I've been working harsh shifts at my job so that's why it took so long.

This is VERY sophisticated ASM coding. It is far from perfect but this was hard to do. I made it so the player can only move forward. I've added autoscrolling like SMB3 because the player would get stuck if I didn't. For now, here is the beta. I'll do the final for you sometime.

Please credit me if used; patch it to a clean SMB1 ROM.

http://www.mediafire.com/download/4keipv5rnd66de8/RUN.ips

ShaneM

____________________
At the end, when the day is over, the only one left to face is yourself. Have you been true to yourself and made the most of your day?

ShaneM
Posted on 10-10-14 07:05 AM, in Nintendo: Japan vs. America Corporate (rev. 10 of 10-10-14 07:27 AM) Link | Quote | ID: 158723


Snifit
Compromised account.
Please contact an admin to restore access.
Level: 36

Posts: 177/285
EXP: 293545
Next: 14565

Since: 02-17-14

Last post: 3139 days
Last view: 2654 days
Posted by MikeTechno

Ok then new super moderator my suggestion is move this to the gaming sub-forum. It doesnt belong here for starters...



I know how to do my job and this can go here in General Chat. You sometimes come across as trolling though I know you mean well. So, I'm not upset.

Any other comments let them be about the topic at hand, please. I'd like to keep the forums clean and clutter-free. --ShaneM

____________________
At the end, when the day is over, the only one left to face is yourself. Have you been true to yourself and made the most of your day?

ShaneM
Posted on 10-10-14 07:32 AM, in SMB2j skid sound into SMB1 Link | Quote | ID: 158724


Snifit
Compromised account.
Please contact an admin to restore access.
Level: 36

Posts: 178/285
EXP: 293545
Next: 14565

Since: 02-17-14

Last post: 3139 days
Last view: 2654 days
Since SMB1 is NROM, it is limited to 8000 bytes of binary. Here are some ways to attain over 200 free bytes to add the code (more than enough). Use doppleganger's SMB1 disassembly and assemble with a make.bat file:


Remove residual code. Here are some places that code can be removed, also some other ways to save space; if you follow my advice, you'll get roughly 200 free bytes (note that not everything labeled in the disassembly as 'residual' are really residual; the ones I listed I've proven residual):


;In "PrintVictoryMessages:", remove these
cmp #$09
bcs IncMsgCounter

;In "Palette1_MTiles:" remove these
.db $24, $2f, $24, $3d ;flag ball (residual object)

;In "WaterPipe:" remove this:
ldy AreaObjectLength,x

;In "ScrollScreen:" remove this
sta ScrollIntervalTimer

;In "FlagpoleSlide:" remove these
cmp #FlagpoleFlagObject
bne NoFPObj

;In "NoFPObj:" remove this
inc GameEngineSubroutine

;In "UseMiscS" remove this
sty JumpCoinMiscOffset

;In "MovePlatformUp:" remove these
cpy #$29
lda #$09

;In "CheckEndofBuffer" remove all these
iny
lda (EnemyData),y
and #%00111111
cmp #$2e
beq CheckRightBounds

;In "SetupGFB" remove this
jsr GetFirebarPosition

;In "BPGet:" remove these
lda FlyCCBPriority,y
sta Enemy_SprAttrib,x

;In "DrawFlameLoop:" remove this
sta Sprite_Y_Position+12,y

;In "FirebarSpin:" remove
ldy #$18

;In "SpinCounterClockwise:" remove
ldy #$08

;In "RightPlatform:" remove
sta $00

;Remove "ResidualXSpdData:" completely

;In "CheckToAnimateEnemy:" remove this
iny

;In "DrawBrickChunks:" remove
lda #$75

;In "PowerUpGrabFreqData:" remove these at the end
.db $22, $1c, $14

;In "FindAreaMusicHeader:" remove this
sty MusicOffset_Square2

;Remove "ResidualHeaderData:" completely



;Did you know you could get 16 free bytes from changing lda BrickShatterEnvData,y in "ContinueBrickShatter:" to "lda BowserFlameEnvData,y"? They both make the same SFX but now you have 16 free bytes where the data used to be!


Optimize the following routine to get another 32 bytes:

;This is the original routine
SetPlatformTilenum:
ldx ObjectOffset
iny
jsr DumpSixSpr
lda #$02
iny
jsr DumpSixSpr
inx
jsr GetXOffscreenBits
dex
ldy Enemy_SprDataOffset,x
asl
pha
bcc SChk2
lda #$f8
sta Sprite_Y_Position,y
SChk2: pla
asl
pha
bcc SChk3
lda #$f8
sta Sprite_Y_Position+4,y
SChk3: pla
asl
pha
bcc SChk4
lda #$f8
sta Sprite_Y_Position+8,y
SChk4: pla
asl
pha
bcc SChk5
lda #$f8
sta Sprite_Y_Position+12,y
SChk5: pla
asl
pha
bcc SChk6
lda #$f8
sta Sprite_Y_Position+16,y
SChk6: pla
asl
bcc SLChk
lda #$f8
sta Sprite_Y_Position+20,y
SLChk: lda Enemy_OffscreenBits
asl
bcc ExDLPl
jsr MoveSixSpritesOffscreen
ExDLPl: rts

;okay, now change it to this:

SetPlatformTilenum:
ldx ObjectOffset
iny
jsr DumpSixSpr
lda #$02
iny
jsr DumpSixSpr
inx
jsr GetXOffscreenBits
dex
ldy Enemy_SprDataOffset,x
ldx #$06
SChk: asl
bcc SChkNx
pha
lda #$f8
sta Sprite_Y_Position,y
pla
SChkNx: iny
iny
iny
iny
dex
bne SChk
ldx ObjectOffset
tya
sec
sbc #$18
tay
lda Enemy_OffscreenBits
asl
bcc ExDLPl
jsr MoveSixSpritesOffscreen
ExDLPl: rts


There are many more ways to clear up free space. This next method will get you about 150 free bytes:

SMB1 was very wasteful with level data. For example look at this:


^The above leftmost brick can be made to a horizontal brick length 4 and the rightmost brick can be removed (see below). This can be done with various objects in ALL levels/rooms to save space while functioning the same.




The above trick can also be done with enemies while function the same, too. See below.

Before:


After:


Notice that I changed it from a 'Little Goomba' to a '2 Little Goomba (V=10).

With the above, counting every possible level, you get around 150 free bytes this way. I hope this was helpful instead of having to convert this from NROM to MMC3 and extra routines. 200 or so free bytes is a lot of free space to make many routines.

EDIT: Here is another code that can be optimized.

;Original code

CheckPlayerVertical:
lda Player_OffscreenBits
cmp #$f0
bcs ExCPV
ldy Player_Y_HighPos
dey
bne ExCPV
lda Player_Y_Position
cmp #$d0
ExCPV: rts

;Optimized code
CheckPlayerVertical:
lda Player_OffscreenBits
and #$f0
clc
beq ExCPV
sec
ExCPV: rts

;you've saved 7 bytes


Also, remove anything labeled as "free space" etc. They will always be bytes of $FF. They are scattered throughout the file and will add up to another 20 or so free bytes.

Make sure that the assembled binary file is no GREATER or LESS than 32,768 bytes. Whenever you add or minus code, you need to pad it or else there will be trouble. I can tell you are new to this. My advice is use something like Notepad++ that tells you the line numbers for when the assembler shoots out a "value out of range" or a line with an error or what not.

Here's one more that's easy to miss. The underwater level has a room pointer to World 3 that's never used. (Room pointers always take 3 bytes). So removing it will give you three more. I just mentioned this because this one was hard to find. But the other wasteful ones are easy.

In total, another 33 bytes right here (I took advantage of these in my SMB1 hacks to load the beta tiles I found):


;In "VRAM_AddrTable:", remove
.dw UnusedAttribData

;and
.dw BowserPaletteData

;You can also remove the 8 bytes from the "BowserPaletteData" data and just change the palette to $1A using FCEUX PPU viewer.

;you can also remove these; remember to update where the immediate values are loaded for certain objects like trees (only takes a few minutes):
.db $45, $47, $45, $47 ;breakable brick (not used)
.db $24, $47, $24, $47 ;half brick (not used)

;remove this completely
DoNothing:
lda #$ff ;this is residual code, this value is
sta $06c9 ;not used anywhere in the program
rts

;In "ProcHammerObj:" remove
sta $01

;In "SwimCCXMoveData:" remove
.db $04, $04

;In "ShufAmtLoop:" remove
jsr DoNothing



Here's another way to get 55 more free bytes:



;original did this...change it to what I have after this to save 55 bytes

PRandomSubtracter:
.db $f8, $a0, $70, $bd, $00

FlyCCBPriority:
.db $20, $20, $20, $00, $00

MoveFlyingCheepCheep:
lda Enemy_State,x ;check cheep-cheep's enemy state
and #%00100000 ;for d5 set
beq FlyCC ;branch to continue code if not set
lda #$00
sta Enemy_SprAttrib,x ;otherwise clear sprite attributes
jmp MoveJ_EnemyVertically ;and jump to move defeated cheep-cheep downwards
FlyCC: jsr MoveEnemyHorizontally ;move cheep-cheep horizontally based on speed and force
ldy #$0d ;set vertical movement amount
lda #$05 ;set maximum speed
jsr SetXMoveAmt ;branch to impose gravity on flying cheep-cheep
lda Enemy_Y_MoveForce,x
lsr ;get vertical movement force and
lsr ;move high nybble to low
lsr
lsr
tay ;save as offset (note this tends to go into reach of code)
lda Enemy_Y_Position,x ;get vertical position
sec ;subtract pseudorandom value based on offset from position
sbc PRandomSubtracter,y
bpl AddCCF ;if result within top half of screen, skip this part
eor #$ff
clc ;otherwise get two's compliment
adc #$01
AddCCF: cmp #$08 ;if result or two's compliment greater than eight,
bcs BPGet ;skip to the end without changing movement force
lda Enemy_Y_MoveForce,x
clc
adc #$10 ;otherwise add to it
sta Enemy_Y_MoveForce,x
lsr ;move high nybble to low again
lsr
lsr
lsr
tay
BPGet: lda FlyCCBPriority,y ;load bg priority data and store (this is very likely
sta Enemy_SprAttrib,x ;broken or residual code, value is overwritten before
rts


;;;;delete the above and replace it with this to save the 55 extra bytes:

ldy #$20
lda Enemy_State,x ;LDA $1E,X
and #$20
bne end ;$CEE8
jsr MoveEnemyHorizontally ;$BF07
ldy #$17
end: lda #$05
jmp SetXMoveAmt ;$BF9B


In total, if you did everything I told you to do, you've saved near 300 bytes! More than enough to add skid sound. To add the skid sound, rip the code from the SMB2J disassembly by doppleganger. If you can't find it, let me know and I'll assist you. --ShaneM

EDIT: Here is the skid code in SMB2J:


SkidSfxFreqData:
.db $47, $49, $42, $4a, $43, $4b

PlaySkidSfx: ;;this code needs to be used in NoiseSfxHandler. make a conditional bmi mnemonic for this to work (hint: ldy NoiseSoundQueue as the class 2 statement).
sty NoiseSoundBuffer
lda #$06
sta Noise_SfxLenCounter

ContinueSkidSfx:
lda Noise_SfxLenCounter
tay
lda SkidSfxFreqData-1,y
sta SND_TRIANGLE_REG+2
lda #$18
sta SND_TRIANGLE_REG
sta SND_TRIANGLE_REG+3
bne DecrementSfx3Length



____________________
At the end, when the day is over, the only one left to face is yourself. Have you been true to yourself and made the most of your day?

ShaneM
Posted on 10-10-14 08:36 PM, in SMB Lost Levels: Extended Edition with SRAM Saving (FDS hack) (rev. 2 of 10-10-14 08:38 PM) Link | Quote | ID: 158730


Snifit
Compromised account.
Please contact an admin to restore access.
Level: 36

Posts: 179/285
EXP: 293545
Next: 14565

Since: 02-17-14

Last post: 3139 days
Last view: 2654 days
Posted by Chaobomr
Whoa! Would the same thing happen if I did this in SMD?


SMD? Uh...what in the world is that???

____________________
At the end, when the day is over, the only one left to face is yourself. Have you been true to yourself and made the most of your day?

ShaneM
Posted on 10-10-14 10:33 PM, in SMB Lost Levels: Extended Edition with SRAM Saving (FDS hack) (rev. 4 of 10-10-14 10:54 PM) Link | Quote | ID: 158733


Snifit
Compromised account.
Please contact an admin to restore access.
Level: 36

Posts: 180/285
EXP: 293545
Next: 14565

Since: 02-17-14

Last post: 3139 days
Last view: 2654 days
Posted by Chaobomr
Sorry, my SMB3 hack.


The code I gave was for SMB1/SMB2J. I believe the coding is different in SMB3. What I would do if I were you is a Google search for "Southbird's SMB3 Disassembly" and look at the code and go from there. It should be located in the file called "main.asm". But yeah, it's completely different.


*Note that SMD is actually short for Sega Megadrive.*

--ShaneM

____________________
At the end, when the day is over, the only one left to face is yourself. Have you been true to yourself and made the most of your day?

ShaneM
Posted on 10-10-14 10:41 PM, in Nintendo: Japan vs. America Corporate (rev. 2 of 10-10-14 10:43 PM) Link | Quote | ID: 158734


Snifit
Compromised account.
Please contact an admin to restore access.
Level: 36

Posts: 181/285
EXP: 293545
Next: 14565

Since: 02-17-14

Last post: 3139 days
Last view: 2654 days
Posted by Chaobomr
You've any idea why we didn't get the FDS? Is it because of the NES's VCR-esque design?


I would assume because it wasn't as popular as Nintendo thought it would be and Nintendo may have thought it wouldn't sell well elsewhere. Plus, FDS has a lot of hardware issues such as belt issues and RAM adapter malfunctions. Some FDS games were ported to NES such as Zelda. But the FDS and even Famicom versions are sublime in that Pols Voice can be destroyed with the microphone, something our controllers never came with. Also, SFX were better on the FDS. --ShaneM

____________________
At the end, when the day is over, the only one left to face is yourself. Have you been true to yourself and made the most of your day?

ShaneM
Posted on 10-11-14 01:04 AM, in Super Mario Doomsday (rev. 5 of 10-11-14 01:06 AM) Link | Quote | ID: 158738


Snifit
Compromised account.
Please contact an admin to restore access.
Level: 36

Posts: 182/285
EXP: 293545
Next: 14565

Since: 02-17-14

Last post: 3139 days
Last view: 2654 days
Chaobomr PM'd me with a good question. So I'm also posting the response for the general public, too.

When using the the SMB3 disassembly by Southbird, whenever you run across an ADD, it's another way of saying CLC then ADC with an immediate value. BLT is another way of saying BCC. So if you run across these treat them as such.

Example:
 
ADD #$05 ;=CLC, ADC #$05 (3 bytes total $18, $69, $05)
BLT $0d ;=BCC $0D (2 bytes total $90, $0D)


--ShaneM



____________________
At the end, when the day is over, the only one left to face is yourself. Have you been true to yourself and made the most of your day?
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14


Main - Posts by ShaneM

Acmlmboard 2.1+4δ (2023-01-15)
© 2005-2023 Acmlm, blackhole89, Xkeeper et al.

Page rendered in 0.240 seconds. (344KB of memory used)
MySQL - queries: 134, rows: 166/166, time: 0.229 seconds.