Banner
Views: 843,931,621
Time:
22 users online: Abdu, Amine Retro, AntiDuck, BlueZy, chilistudios,  E-man38, elieltonl, ExONightZ, h.carrell, Infinity, LeaderAngelo,  Linkdeadx2, Losoall, Moichumoi, monkey03297, Mr. MS, Renhoek, S3TH0s, SF - The Dark Warrior, TCgamerboy2002,  Teows, TickTockClock - Guests: 54 - Bots: 83 Users: 46,385 (2,796 active)
Latest: chilistudios
Tip: Make sure you can beat your own levels without savestates, slowdown, or rewinding.Not logged in.
ASM game experiment: let's make a patch, one line at a time (NOW FINISHED)
Forum Index - Sunken Ghost Ship - C3 Museum - Summer 2020 - ASM game experiment: let's make a patch, one line at a time (NOW FINISHED)
Tags:
Pages: « 1 2 3 4 5 »
Nice work everyone! I think we can call it a day here because even though this didn't last too long, I'm not sure how much time to assemble I'll have over the next few days.

Let's clean up the leftovers and put an end to it:

Code
CLD
LDA #$0F : STA $2100
RTL





And there you have it! I had to comment out a few of your otherwise excellent contributions to make sure the result was still moderately playable, but otherwise, it's working like a charm! It's quite an excellent bit of code we made there (and so optimized, too).



And here's the full code, ready for everyone to insert and spice up their levels with.

Thanks for participating, everyone!

Code
 

	; Collaborative Corruption Code (C3)
	; (c) 2020 SMW Central
	
	; will cause various neat effects in your level,
	; including greater powerup variety,
	; the ability to spawn sprites from the item box
	; (with a neat roulette-like choice each time you leave the ground),
	; and punishment for backtracking players that messes up the level layout if you go back

	; I expect this to be featured.
	
	; known bug: will disable spinjumping


main:

	LDA $73
	REP #$20		;    16-bit A
	SED			;    set decimal mode
	STA $1E			;    store to layer 2 x position
	STA $86 		;    make the level ever-so-slightly slippery if you're ducking
	
	ADC $16			; \  load some value into X
	TAX			; /  (almost always 0 unless you have buttons pressed)
	
	NOP			;    do nothing, nice waste of cycles there nintendo
	
	CMP #$03		; \  do pretty much nothing again but fancier
	db $00			; /  (saved to work with 16-bit A)
	
	COP #$32		;    I actually do not know
	
	PHA
	STY $0F48 		;    set some amount of bonus stars
	EOR $00,x		;    load some pretty much pseudorandom value into A depending on what's in (probably) scratch RAM
	PLY : PLX 		;    actually works since we're pushing 16-bit A and pulling 8-bit indices
	STA $13CC		;    give that amount of coins
 	SEP #$20 : STA $19	;    give that as a powerup too
	
	CPY #$10 : BNE +	; \
	INC $19 		;  | decrement powerup status
+				;  | unless Y happens to be 10
	DEC $19			; /	
	INC $73			;    ensure the player is treated as ducking
	; STX $13E3 		;    also probably treat the player as wall-running (this makes the game unplayable)
	REP #$20
	LDA #$2100
	; TCD			;    change direct page (this crashes the game)
	SEP #$20
	LDA #$80 : STA $2100	;    F-blank on 

	JSL $0086FA		; \  jump to somewhere depending on what A is,
	MVN $0D,$7E 		;  | but that's #$80 so we need 128 dummy 3-byte pointers
	ASL $0DBF 		; /  and those two lines are treated as part of the table
	fillbyte $69 : fill 378	;    was 250, fixed because that's ExecutePtrLong
	dl +                    ;    was dw
+
	; PER $0010		;    (this crashes the game)
	SEI
	; SEC : XCE ; yes	;    set emulation mode (this crashes the game)
	
	BRA $05			;    skip the next three lines
	XBA
	PHY
	NOP #3
	
	LDA $14
	TAY
	BIT $78 : BVC $02	;    branch depending on the frame counter and if the player is hidden?
	BRK			;    I'll actually allow this since the branch seems to always be taken
	TXA

	; mess with the level tilemap
	; and shuffle the reserve item when the player isn't touching the ground

	LDX #$10		;    loop 10 times
.loop
	; STP			;    sorry (this freezes the game)
	STZ $140D		;    make really really sure we're not spinjumping
	LDY $90,x		;    load stuff into Y depending on the loop counter
	BRA $00			;    branch but not too far
	STA $FF			;    mess with the palette loading though a little too late (was #$FF)
	LDA ($69,s),y		;    load stuff into A depending on Y, which in turn depends on the loop counter
	TRB $1A			;    set those bits in the layer 1 x position to 0
	STA $0DC2		;    set the reserve item to whatever
	DEX : BPL .loop
	
	; JSL $00FC7A 		;    spawn a Yoshi and force the player on it (this makes the game unplayable)
	STA $1920		;    make sure the bonus game most likely doesn't end
	
	if read1($00ffd5) == $23; \  kill the player on SA-1 ROMs
	JSL $00F606		;  | (assuming the code even makes it here on SA-1)
	endif			; /
	
	; CLC : ADC $14 : XCE	;    switch to and from emulation mode every couple of frames (this crashes the game)
	LDA #$40		; \
	ROL A			;  | make sure the screen isn't shaking so long
	TRB $1887		; /
	DEC $19 		;    yep this will do great (tl note: won't make the powerup any less crazy but great effort!)
	
	STZ $14C8,x		;    kill the sprite in slot 0
	
	; PLA : PLX : PLY 	;    mess with the stack (this crashes the game)

	CLD			;    get out of decimal mode
	LDA #$0F : STA $2100	;    actually turn the screen back on
	
	RTL


 

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


 
oof i didnt know it was executeptrlong. i just based it off of jamesd28's comment (he said it was executeptr)

very nice regardless
This went quite well all things considered.
I mean none of the removed codes were STZ $0010 or something similar.
Oh whoops
Still, this is a lot less broken than I expected
I have to say this has been a ton of fun. I had quite the laugh with both the video and your comments on the code #ab{:P}. I'm a bit lost regarding from where those carrot lifts come from lol
Beautiful, can't wait to see someone use this in the next CLDC #smrpg{sick}
Wow, good job most of you all for making this actually not crash in sight. lol

I wish I were around to contribute. Guess this was a bad time to prioritize uni stuff #smrpg{mlem}

Originally posted by WhiteYoshiEgg
Code
	; known bug: will disable spinjumping

Hopefully this gets fixed before the release...

--------------------
Legião Urbana - A Tempestade (1996)
Why does this remind me of the glitches pulled off in SMW TASes, lol

Good job, everyone. I would participate if I wasn't an ASM nub #smrpg{ohno}
lol you even added my note, this is great. Awesome project.

--------------------
Are you an ASM coder and want to trade "resources"? Private Message me for details.
(I also offer SMW Custom Songs in exchange for ASM! I don't do ports though unless it's to remix.)

Want progress on 100 Rooms of Enemies: The Nightmare Edition? Go here to see.

Are you a sample porter and wanna help with 100 Rooms of Enemies: The Nightmare Edition? Private Message me or Mellonpizza for details. Expect trading "resources" in exchange. 4 more left.





Nice patch we got there.

I'm glad I read Ersanio's ASM Tutorial three years ago so I knew what INC $19 does. Totally worth it.
I liked this experiment!
I thought "COP #$32" would break the game.



WOW, my part actually made it in!

I'm so happy to have had a part in "Super Photosensitive Epilepsy World", starring a Mario who looks like he's in a shitload of pain and wants to die (that was a bad mushroom!).

Let's do it all again next C3! #w{xD}

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


St. Clair Publications: Where girls just want to have fun!

Other places you can find me: LiveJournal | Last.FM

This was fun to watch, I'll need to try the patch once I can.
This is ever more reason to take my programming ability and properly learn ASM. One of these days.


Really neat concept!


Now let's build a website one line at a time and watch it catch fire!

--------------------
Be a cool person and check out this thread and comment on it!
There's custom dimensions and really neat sorcery you can enjoy!
Scrydan does Datapack things to Minecraft - 1.16 Minecraft Java Datapack Requests

Minecraft Randomizer: Scrycrafter
I'm surprised how playable this mess is. Great job, everyone.

Originally posted by StackDino
I liked this experiment!
I thought "COP #$32" would break the game.

So did I, but it actually turns out the COP vector points to an RTI, so the instruction just wastes a bunch of cycles and does nothing. I could've sworn it jumped to $FFFF like BRK.
amazing to see that both of my lines made it in the final product
my line got skipped i want my money back
it actually worked, the madmen

and they say smwcentral can't make a patch
Originally posted by dogemaster
my line got skipped i want my money back

My
Code
BRA $05
was a bit trollish hehe #smrpg{:O}
Originally posted by Aja

Nice patch we got there.

I'm glad I read Ersanio's ASM Tutorial three years ago so I knew what INC $19 does. Totally worth it.

INC $19 Mario best Mario.


The final code truly is an art masterpiece. I'm actually delighted that someone snuck in that (sr,s),y addressing mode in there lmao

--------------------
My blog. I could post stuff now and then
Pages: « 1 2 3 4 5 »
Forum Index - Sunken Ghost Ship - C3 Museum - Summer 2020 - ASM game experiment: let's make a patch, one line at a time (NOW FINISHED)

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2020 - SMW Central
Legal Information - Privacy Policy - Link To Us


Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

  • Super Mario Bros. X Community
  • ROMhacking.net
  • Mario Fan Games Galaxy