Language…
12 users online: Adriel_Isaque, C722435, Charizard, Cote de Boeuf, Emera1ds, Heitor Porfirio,  Maarfy, MarsAmpere,  Nameless, Soonstar,  Teows, YouFailMe - Guests: 108 - Bots: 159
Users: 58,905 (2,232 active)
Latest user: Charizard

Custom Scale Platform + Disassembly

SMW Sprites → Custom Scale Platform + Disassembly

Submission Details

Name: Custom Scale Platform + Disassembly
Author: MarkAlarm
Added:
Tool: PIXI
Type: Standard
Dynamic: No
Disassembly: Yes
Includes GFX: No
Description: This is a customizable version of the scale platform sprite, along with an unmodified disassembly of the original sprite that is now SA-1 compatible. Credit is unnecessary.

With this, you're able to customize things such as the distance between platforms, the rise/fall speeds, and the tiles that the sprite generates. It makes use of three extra bytes in order to pull this off. Check the .asm file for more details, since it documents these things in a bit more depth.

As for the disassembly, it acts just as the original sprite does, so the X position will still determine whether the distance between platforms is long or short. This may be altered in a future update to use the extra bit instead, but for now it is based on position.
Tags: lorom pacifist platform sa-1
Comments: 6 (jump to comments)
Rating:
0.0 (0 ratings)
No rating
Download 6.93 KiB | 451 downloads

Screenshots

View all

Comments (6)

 Kevin Link
If you're experiencing blank overflows issues (i.e. black bars at the top of the screen) when using this, find this code in the asm file:
Code
	REP #$20						; \ change tile routine
	LDA mushroomScaleTiles,y		; |
	%ChangeMap16()					; |
	SEP #$20						; /

and right before it add this:
Code
	stz $1933|!addr
	rep #$20
	phy
	%GetMap16()
	ply
	cmp mushroomScaleTiles,y
	sep #$20
	beq .noBlockGen
	lda $5B : lsr : bcc +
	lda $99 : xba
	lda $9B : sta $99
	xba : sta $9B
+
wye Link
This seems to crash the game when you make a platform sink below the bottom of the level. It looks like %GetMap16() is meant to be called with 8-bit A, so what's the reason the REP #$20 is there?
 Kevin Link
If you call the routine with 16 bit A it will return the whole 16 bit map16 value in A rather than split into A and Y... as for the crash I'm not sure, it might be indexing the map16 table out of bounds or something
Edit: turns out the crash was caused by using an old version of PIXI. It works fine on 1.32.
Wyatt Link
Love these.

One problem I did run into is that despawning is tied to the position of the left platform. This is fine for horizontal levels but it's a big issue in tall levels, e.g. if you move the right platform too much it can despawn from underneath you. For my purposes, an acceptable workaround was to have the platforms only ever despawn if they're at their starting positions. This workaround involved replacing this bit of code:

Code
	LDA #$05						; \ using #$05 since it acts closest to the original's weird offscreen routine
	%SubOffScreen()					; /


with this code:
Code
	LDA !sprite_y_low,x
	CMP !1534,x
	BNE DontSubOffScreen
	LDA !sprite_y_high,x
	CMP !151C,x
	BNE DontSubOffScreen			
	LDA #$05						; \ using #$05 since it acts closest to the original's weird offscreen routine
	%SubOffScreen()					; /
	DontSubOffScreen:				;;
JamesD28 Link
Tested with:

• Lunar Magic 3.21
• SA-1 Pack v1.32
• PIXI v1.31
• Snes9x v1.60
• bsnes plus v05

Works as intended, so, accepted. There is one issue that while not enough for rejection, should be kept in mind. If the "returning" speed of the customizable platforms is high enough and is not equal to the "pushing" speed, there is a possibility that when the platforms return to their start positions, they will shiver up and down rapidly until stepped on again. The higher the returning speed is, the more likely this is to happen, but it can be avoided completely by ensuring the push and return speeds are equal.
Klug Link
Screenshot #3: Going up!!!