News:

Don't forget to visit the main site! There's lots of helpful docs, patches, and more!

Main Menu

Metconst Lost and Found

Started by OmegaDragnet9, December 06, 2022, 11:36:06 PM

Previous topic - Next topic

OmegaDragnet9

The purpose of this is to highlight useful Assembly I have found across the forum from various places into one spot.

Much of this does not show up on the resources page. Some hex tweaks have not become a part of the wiki, and others appeared only in passing conversation in various topics.

I will list the authors as well as relevant links to their works. Whenever necessary I will attach copies, being exceedingly clear to attribute it to the proper author. (Mostly in the case of a hex tweak converted to lorom.)

I invite anybody else to add to this if they would like to.

------------‐--------------------------------

Edit: Here's a link to documents from the old site. Been visiting this a bit lately and figured I needed to share it here:

http://old.metroidconstruction.com/documents.php?x=top

-----------------------------------------------

PHOSPHOTiDYL

Scyzer's Item Sounds Modification:

https://forum.metroidconstruction.com/index.php/topic,145.msg62664.html#msg62664

Skip Zebes Explosion (Silence During Credits):

https://forum.metroidconstruction.com/index.php/topic,145.msg66801.html#msg66801

Mockball While Holding Charge:

https://forum.metroidconstruction.com/index.php/topic,145.msg61592.html#msg61592

Pseudo-Screw Attack Changes:

https://forum.metroidconstruction.com/index.php/topic,145.msg59883.html#msg59883

Holding Charge While Wall-jumping:

https://forum.metroidconstruction.com/index.php/topic,4432.0.html#msg60354

Skips Hex Map When Loading Game File:

https://forum.metroidconstruction.com/index.php/topic,1161.msg61335.html#msg61335


Skip Zebes Explosion (With Music):

lorom

;Code by PHOSPOTiDYL
;Music Hijack OmegaDragnet7

;--------------------------------------------------------------;
org $828506 : lda #$de80 ;//[no planet explosion] instead of lda LDA #$D480 which is cinematic function $D480.

org $82850F ;Music Hijack

LDA #$0000 ;Track 0
JSL $808FC1
LDA #$FF0F  ;Song Set 0F
JSL $808FC1
LDA #$0005  ;Song 05
JSL $808FC1
LDA #$0002  ;Sound 2, sound library 1, silence
JSL $82F70F ;JSL to Freespace

org $82F70F ;Freespace

JSL $809021
LDA #$0071  ;Sound 71h, sound library 2, silence
JSL $8090A3
LDA #$0001  ;Sound 1, sound library 3, silence
JSL $809125
RTL

org $8be7b5 : jsl screwcreditz ;instead of JSL $80824F which is "Write Super Metroid to SRAM" hijack
org $8bfd00
screwcreditz:
lda #$381a : sta $7e319c : sta $7e31dc : sta $7e31a2 : sta $7e31e2 ;//[:]
ldx #$0000 : lda $09e0 : jsr timemath
ldx #$0006 : lda $09de : jsr timemath
ldx #$000c : lda $09dc : jsr timemath : rtl
timemath:
sta $4204 : jsr mathone : jsr mathreset : lda $4214 : jsr tricktimeone
lda $4216 : jsr tricktimetwo : rts
tricktimeone:
asl a : asl a : tay : lda $e741,y : sta $7e3198,x : lda $e743,y : sta $7e31d8,x : rts
tricktimetwo:
asl a : asl a : tay : lda $e741,y : sta $7e319a,x : lda $e743,y : sta $7e31da,x : rts
mathone:
sep #$20 : lda #$0a : sta $4206 : rts
mathreset:
rep #$20 : rts
;--------------------------------------------------------------;

----------------------------------‐-----

JAM

Changing Room Music to Elevator Music When Enemies Needed Matches Enemies Killed (Gray Door Room):

https://forum.metroidconstruction.com/index.php/topic,1918.0.html#msg22986

--‐----------------------------------------

Smiley and Amoeba

Fix X Ray PLM Variable 8000 Room Crash (Found on the Discord Server)

lorom
org $848332
db $2B




OmegaDragnet9

#1
On the Discord channel, Smiley was kind enough to provide me a disassembled version of squishy_ichigo's Endgame BTS. However, every time I applied it to my ROM, grapple beam would crash the game even when used against normal air tiles.

After a brief discussion amongst Oi27,  P.JBoy, and myself, Smiley pointed out the original freespace just happens to coincide with where Grapple Beam operates in the code.

Fortunately there is another suitable freespace alternative in Bank $94, so I repointed there.

I decided to post here so others can use this. Thanks to Smiley for pointing that out and Oi27 and P.JBoy for helping me troubleshoot.

Original Endgame BTS by squishy_ichigo.

Smiley

Quote from: OmegaDragnet9 on January 02, 2023, 04:08:19 PM
However, every time I applied it to my ROM, grapple beam would crash the game even when used against normal air tiles.

After a brief discussion amongst Oi27,  P.JBoy, and myself, Smiley pointed out the original freespace just happens to coincide with where Grapple Beam operates in the code.
I want to note that this was not a problem in the original patch, but a mistake I made when disassembling it.

OmegaDragnet9

Quote from: Smiley on January 03, 2023, 10:24:51 AM
Quote from: OmegaDragnet9 on January 02, 2023, 04:08:19 PM
However, every time I applied it to my ROM, grapple beam would crash the game even when used against normal air tiles.

After a brief discussion amongst Oi27,  P.JBoy, and myself, Smiley pointed out the original freespace just happens to coincide with where Grapple Beam operates in the code.
I want to note that this was not a problem in the original patch, but a mistake I made when disassembling it.

Just having it disassembled at all was tremendously helpful.

OmegaDragnet9

#4
Recently I came across a really useful piece of code Nodever2 shared on Flamestar666's Heatbit Resource:

https://metroidconstruction.com/resource.php?id=193

To summarize this is designed to run as Room Setup ASM, specifically take the last 4 digits from the freespace address (org) and place that in the Init ASM (under Room ASM) in SMART. (This will be under Room Data on the left hand side of the Level Editor.)


lorom

org $8FFE20 ;8F Freespace

LDY #$F761 : JSL $8DC4E9 ;Spawn Palette FX Object (Norfair 1)
LDY #$F785 : JSL $8DC4E9 ;Spawn Palette FX Object (Norfair 2)
RTS


To modify this to do more (or less) I had to search $8DF745, Palette FX Objects in PJ's Banklogs.

The #$F761 line is what makes the room hurt. #$4785 makes Samus glow.  This can be modified to make the Norfair heatbit operate in any area with or without any special glows involved. (Ice or toxic rooms.)

Or you can take this same approach, forget the heat damage altogether and just utilize the several built-in glow effects the game already has instead. (The effects are pretty psychedelic.)



OmegaDragnet9

A very special thank you to Drewseph who has been so kind to provide an updated version of the Axeil Edition code for reference. I really enjoyed this particular hack and often go to it both for a good campaign and to figure out how some of the physics changes were pulled off. Stuff like this is always really great to learn from and is very much appreciated.

H A M

zm chaos source code from discord (made by biospark)

OmegaDragnet9

With permission from TestRunner and AmoebaOfDoom, here is the link to Subversion's Github page:

https://github.com/amoebaOfDoom/subversion

Subversion is an awesome hack with a lot of unique assembly to study.  I really enjoyed it.

H A M

how do i get smart version 1.19.8298.21314 and what assembler should i use to build subversion

OmegaDragnet9

Quote from: H A M on January 30, 2023, 10:04:22 PM
how do i get smart version 1.19.8298.21314 and what assembler should i use to build subversion

I had to go looking for it too to be honest. The URL you saw it in, select everything in quotes and open up another tab with that.

I downloaded it, but I'm not sure why it's listed that way on the download page.

As for assembling Subversion itself, I've never attempted that. What I found useful was the ASM they had.

As for the assembler, I believe they used Xkas.

H A M

the project is made with the unreleased smart version 1.19.8298.21314

TestRunner

Quote from: H A M on January 30, 2023, 11:03:48 PM
the project is made with the unreleased smart version 1.19.8298.21314

The newer versions should work as well. 1.19.8298.21427 is the current latest and should work fine. Assembler was xkas 0.06.

I should note that the version number is MAJOR.MINOR.DATE.TIME. So those two version are essentially identical. I likely was running a debugger at the time which is why it's a different build.


H A M


H A M

#14
which exact assembler is used to build
i want to add BARF KRAID in subversion

OmegaDragnet9


H A M

2 errors when assembling with xkas v0.06

OmegaDragnet9

Quote from: H A M on January 31, 2023, 12:49:57 PM
2 errors when assembling with xkas v0.06

You using Xkas by itself or through SMART?

H A M

following the instructions to build subversion

TobiMikami

Quote from: H A M on January 31, 2023, 09:27:21 PM
following the instructions to build subversion
Project Base Version Subversion??.....You big beautiful bastard, that's so brilliant it just might work, we need to get this show on the road, fuck my wife!

Seriously though that would kick some serious ass. More hacks like Subversion but with more custom GFX, and dare I say more HEX and/or ASM tweaks? Do ittt. Every time I've thought in the last ehh 9 years or so, "They can't do anything greater than this in one hack" something always seems to prove that wrong, someone do it again pls.

OmegaDragnet9

Special thanks to Begrimed, Scyzer, and Quote58 for allowing Project Base code to be shared here.

Here is the latest from Quote, the ACID Engine:

https://github.com/Quote58/ACID-engine

(There is an article floating around the discord server that Quote penned shortly after the release of 0.8. Not sure where it is right now.)

Here is original Project Base moves disassembly code by Scyzer. I believe this was posted somewhere between 0.7 and 0.7.2. What's great about the version of the Samus Moves Disassembly Tables is there is a lot of documentation of what values correspond to Vanilla button inputs:

https://forum.metroidconstruction.com/index.php?topic=217.600

All of this to say, the original intent was for this hack to serve as a base for other hacks. Having these two resources on hand makes it especially simpler for SMART users as SMART doesn't like anything other than a Vanilla ROM most of the time.








H A M

to make project base smart-compatible config the "user free" and "user reserved"

H A M

i tried building subversion following the instructions in https://github.com/amoebaOfDoom/subversion, using xkas v0.06, and gave this:
[spoiler]
[INFO] Ready
[INFO] Starting Import from project folder Project
[INFO] 463 rooms successfully loaded from XML files.
[INFO] Loading ASM files...
[INFO] Assembling AreaGlow.asm...
[INFO] Assembling audio.asm...
[INFO] Assembling Autrack.asm...
[INFO] Assembling BlackFalconSKSpinjumpMorphRoll.ASM...
[INFO] Assembling bomb.asm...
[INFO] Assembling Botwoon.asm...
[INFO] Assembling Ceres Enable.asm...
[INFO] Assembling CeresDoor.asm...
[INFO] Assembling ceres_cs.asm...
[INFO] Assembling ceres_door.asm...
[INFO] Assembling challenges.asm...
[INFO] Assembling Crashtour99ScrewAttackBlocks.asm...
[INFO] Assembling credit suit.asm...
[INFO] Assembling credit.asm...
[INFO] Assembling Crocomire.asm...
[INFO] Assembling CustomScroll.asm...
[INFO] Assembling dachora.asm...
[INFO] Assembling DarkRoom.asm...
[INFO] Assembling Dead Sidehopper.asm...
[INFO] Assembling Decompression.asm...
[INFO] Assembling demo.asm...
[INFO] Assembling difficulty.asm...
[ERROR] Assembly failed with code -1073741819
[INFO] Assembling DisappearingBlocks.asm...
[INFO] Assembling DoubleState.asm...
[INFO] Assembling draygon.asm...
[INFO] Assembling EnemySolidBlock.asm...
[INFO] Assembling EquipmentScreen.asm...
[INFO] Assembling EscapeEvent.asm...
[INFO] Assembling Etecoon.asm...
[INFO] Assembling Eye.asm...
[INFO] Assembling eye_door_fix.asm...
[INFO] Assembling FallingDebris.asm...
[INFO] Assembling fast enemies.asm...
[INFO] Assembling FastDoors.asm...
[INFO] Assembling FF events & tubes.asm...
[INFO] Assembling Fire Geyser.asm...
[INFO] Assembling Flamestar666BeamSwitch.ASM...
[INFO] Assembling footstepfx.asm...
[INFO] Assembling Free Fall.asm...
[INFO] Assembling gameover.asm...
[INFO] Assembling Gate.asm...
[INFO] Assembling Geron.asm...
[INFO] Assembling ghost.asm...
[INFO] Assembling Grapple Gate.asm...
[INFO] Assembling GravityBoots.asm...
[INFO] Assembling hard iframes.asm...
[INFO] Assembling hexmap.asm...
[INFO] Assembling Horizontal Transit Tube.asm...
[INFO] Assembling hud.asm...
[INFO] Assembling HUD_Expansion.asm...
[INFO] Assembling HyperBeamDamageType.asm...
[INFO] Assembling intro.asm...
[INFO] Assembling ItemAreaTrigger.asm...
[INFO] Assembling JAMAccelCharge.asm...
[INFO] Assembling Jellyfish.asm...
[INFO] Assembling kago.asm...
[INFO] Assembling kraid.asm...
[INFO] Assembling Lasers.asm...
[INFO] Assembling LTTP-SpikeBlocks.asm...
[INFO] Assembling M.asm...
[INFO] Assembling MapColors.asm...
[INFO] Assembling mapscroll.asm...
[INFO] Assembling MapSprites.asm...
[INFO] Assembling MapStation.asm...
[INFO] Assembling MessageBoxes.asm...
[INFO] Assembling metroid.asm...
[INFO] Assembling MiniDraygon.asm...
[INFO] Assembling MinorItemSounds.asm...
[INFO] Assembling Mode9hdma.asm...
[INFO] Assembling Multi Gate.asm...
[INFO] Assembling overcharge.asm...
[INFO] Assembling Parallel Elevators.asm...
[INFO] Assembling pause_screen.asm...
[ERROR] Assembly failed with code -1073741819
[INFO] Assembling Phantoon.asm...
[INFO] Assembling PlanetZebes.asm...
[INFO] Assembling PLM draw fix.asm...
[INFO] Assembling puzzle.asm...
[INFO] Assembling ReserveTank.asm...
[INFO] Assembling Ridley.asm...
[INFO] Assembling rinka2.asm...
[INFO] Assembling ripper.asm...
[INFO] Assembling RNG.asm...
[INFO] Assembling Robot.asm...
[INFO] Assembling RoomEffects.asm...
[INFO] Assembling RoomNames.asm...
[INFO] Assembling Rotator Control.asm...
[INFO] Assembling RunWalk.asm...
[INFO] Assembling Save Station.asm...
[INFO] Assembling saveload.asm...
[INFO] Assembling Scrolling Sky.asm...
[INFO] Assembling ScyzerShotBlockOverflowFix.asm...
[INFO] Assembling Scyzer_multiCRE.asm...
[INFO] Assembling shaktool.asm...
[INFO] Assembling shot blocks.asm...
[INFO] Assembling shutter.asm...
[INFO] Assembling SkipCeres.asm...
[INFO] Assembling Space Elevator.asm...
[INFO] Assembling SpaceJumpBoost.asm...
[INFO] Assembling SpaEnemy.asm...
[INFO] Assembling SpeedBall.asm...
[INFO] Assembling spike.asm...
[INFO] Assembling Spore Spawn.asm...
[INFO] Assembling StationControl.asm...
[INFO] Assembling Suits.asm...
[INFO] Assembling super_torizo.asm...
[INFO] Assembling ThermalVisor.asm...
[INFO] Assembling title.asm...
[INFO] Assembling Torizo Claw.asm...
[INFO] Assembling Torizo.asm...
[INFO] Assembling TractorBeam.asm...
[INFO] Assembling TriggeredGreyDoors.asm...
[INFO] Assembling TubeCracks.asm...
[INFO] Assembling Universal Ammo.asm...
[INFO] Assembling Weapon Damage.asm...
[INFO] Assembling weapon-tank-gfx.xkas-06.asm...
[INFO] Assembling weapon-tank.xkas-06.asm...
[INFO] Assembling xray.asm...
[INFO] Assembling YellowGate.asm...
[INFO] Assembling zeb.asm...
[INFO] Assembling Zebetite2.asm...
[INFO] Time Ellapsed: 1641
[INFO] Applying ASMs to ROM
[INFO] ASMs applied to ROM.
[/spoiler]

H A M

smart betas should be called alphas because of unhandled exceptions

H A M

i found a workaround:
replace incsrc ROMProject/ASM/path-to file with actual file path