Language…
19 users online:  Ahrion, Beed28, CircleFriendo, crocodileman94, DanMario24YT, gizmo_321, Golden Yoshi, Heitor Porfirio, Maw, Mohamad20ZX, ocked, OEO6, OrangeBronzeDaisy, Papangu, signature_steve, SMW Magic, steelsburg, TrashCity, yoshisisland - Guests: 300 - Bots: 498
Users: 64,795 (2,370 active)
Latest user: mathew

Posts by Runic_Rain

Runic_Rain's Profile → Posts

Might've picked something a little too hard for my first step.
But it is something I'd like to do and I think I know how to do the rest of it.

I'm trying to drop a custom block at Mario's feet. I'm not sure how to place a block, although I did spy a level loading cursor routine somewhere. Also, getting Mario's position "tile-wise" is throwing me off too. Since it seems there's a bunch of those. Including fractional measures (fixed point fraction for tile or pixel? the whole is 16-bit...).
Should I be looking at $03C000 and $7E0098-$7E009B? If so what "current sprite" is the RAM Map referring to anyway? Any advice/code?
Sorry for the deluge of a first post. Thanks for any help!

Morning by the way! :3
Through UberASM. Goal is two-fold but the first one is the current priority:
1) On collecting X coins place an "exit orb" at mario's position. Ideally I want this snapped to a grid point. I think I can figure it out if I can figure out how to find mario's position and how to place a block in a level.

2) Build a level dynamically via asm. This relies less on mario's position and more on placing a block on a grid. Although I do have an idea on combining the two. And will certainly be a later project once I have a better grasp on things and have refreshed my asm skills.

Pretty much lost on the position/placement code. The rest looks like something I can get a handle on.

Thanks for helping me out!

*I say "exit orb" but it'll be a custom block. Secret Exit 2. Although knowing how to place normal blocks if that's different is useful for #2.
So... I haven't even looked really but I'm curious if you can swap out an entire tileset on the fly. Just knowing if it would be possible during a level would help with design. I see one of the GFX.bin describe merging tilesets going into a level... (On the topic of looking... is there a way to search the forums? >__> I've been using Google...)
Just thought I'd mention it here since I was playing with it. Some of the custom powerups have Mario take damage from riding a Mega Mole. It seems to be the ones with custom graphics (vs pallet changes).
Thanks, I was assuming asm just wasn't sure about the quirks of the PPU, SMWcode, etc. ya know? Like if I should redesign assuming fixed tilesets going into a level. Or if there was even an old patch or something that already did this. Good to know it's feasible though, even if it might be a struggle later. I already found some references for pallet changes on the fly from some old posts (mostly been referencing you, imamelia and GBH's posts they're crazy useful) o7
(restricted)
I was trying to replicate the water+ground movement inside a block. I'd almost assume there's a flag I could set if I didn't want the bubbles/splashes/swim. So I started working on this:

Code
main:
	LDA #!Magnitude
	STA $01
	LDA $7B
	STA $02
	STA $00
	JSL decrease_magnitude
	STA $7B
	RTL

; $00/LDA = in, $01 = Mag dec, $02 = min mag, $03 = scratch
decrease_magnitude:
	BPL Posi ; -->
	JSR abs
	CMP $01
	BMI Zero_mag2 ; -->
	LDA $00
	CLC
	ADC $01
	BRA Ret ; -->
Posi:
	JSR abs
	CMP $01
	BMI Zero_mag ; -->
	CLC
	SBC $01
Ret:
	RTL
Zero_mag2:
	LDA $02
	EOR #$FF
	INC
	RTL
Zero_mag:
	LDA $02
	RTL

abs:
	LSR 7
	STA $03
	EOR $00
	SBC $03
	RTS


It's super broken and I'm being blind as to why. I'm reduced to nigh immovable going left but double speed going right >__>
Anyone notice the problem?

EDIT: Think I noticed it. SMW RAM for $7B is not a 2's compliment x-speed.... everything else looks solid though right?
FIXED: Obviously I was tired with that edit. Water doesn't work the way I thought it did and abs was broken...

Code
main:
	LDA $7B
	STA $00
	JSL decrease_magnitude
	STA $7B
	RTL

!water_speed = $08
!Lwater_speed = $F8
; $00/LDA = in
decrease_magnitude:
	JSR abs
	CMP #!water_speed
	BMI ignore ; -->
	LDA $00
	BMI left ; -->
right:
	LDA #!water_speed
	DEC
	RTS
left:
	LDA #!Lwater_speed
	INC
	RTS ; -->
ignore:
	LDA $00
	RTS

; LDA = in
abs:
	BPL posi
	EOR #$FF
	clc
	adc #1
posi:
	RTS
Is there an easy way to copy and paste a ExGFX.bin into LM? My workflow:
GIMP -> SnesGFX -> LM Import Map16

Not only did I ask SnesGFX to *not* remove redundant tiles (so I can test animation without manually moving 8x8s) but also LM seems to have removed redundant pieces anyway? And being able to paste the entire uncompressed GFX into the Map16 area would speed up this process...

EDIT: Tried both raw (unoptimized) and optimized+MWL (loading level aftwerwards in LM) btw if that makes a difference. Obviously #2 is going to have the redundant bits removed in LM 8x8
I'm referring to the duplicate 8x8s in my Map16 I built in GIMP. Preview shows when I turn off remove dupes that the output keeps them in and my handmade file stays the same.

Small example of 2 16x16 tiles in my file:
_____
|00 01|
|00 00|
_____
|01 00|
|00 00|

Save Unoptimized. Result in SnesGFX:
_____
|00 01|
|00 00|
_____
|01 00|
|00 00|

Save Unoptimized. Result in LM:
00 01

Save Map16+MWL. Result:
00 01

Load level for Map16+MWL:
No level layout. BG unchanged. *(Bypassed GFX. Loaded ExGFX91.bin + Pallet to FG1. Assuming I did it all correctly. I might be missing a step?)

Edit: Typo
Ran everything through it's paces again and found 2 issues, one resolved...

1) Loading the map16 failed the last couple times but worked fine this time. I think it needs to be loaded before the MWL. There needs to be documentation on either that or SnesGFX :/

2) SnesGFX is WYSIWYG in LM (output ExGFX.bin is the same as loaded by LM, it garbles it but the map16 still holds some of that ungarbled data) except it completely removes all blank tiles in the map16. Not 8x8 subtiles I think. just 16x16 tiles. So AB___C imports as ABC into LM. This was part of what was ruining my alignment. I'll just throw random dots around I guess if I need to fix that.

Thanks for sticking with me though Thomas! I'll probably write a tutorial on this since there isn't much info :/ (once I feel like I know my tools better)
Noobie Alert!

Been a hot minute since you asked so I figured I'd take a stab at it (If you haven't figured it out already).
The "Tweaker byte" for the sprite properties is probably set to: "Don't interact with objects" you'd need to change that. Although the sprite itself probably doesn't have the code to process interactions (JSL $019138?). So you're right in that you need to add that using assembly to your sprite if your killer of choice isn't working (there's a sprite-based killer and a block-based killer, maybe try both?). I'm fairly likely to be wrong though. Haven't been at this for very long obviously! Best of luck!
(restricted)
I used wolf fencing to *find* the problem. And made an educated guess to fix it, but I don't think I understand what *is* the problem:

Code
REP #$20
LDA $7F0000
STA $400F34
CLC
SBC #$08
STA $04
SEP #$20


M flag makes SBC 16-bit. Logically the rest of the line #$08 should be read by ASAR as #$0008, (which fixes the crash), but instead I'm assuming it pulls the missing byte from STA and executes db $04 as an opcode? Is this a bug in ASAR or am I just being too lazy for the tool? (Or am I blind to something else that's happening and it's an assembly mistake?)

Edit: on a side note SBC #$00000000000008 also compiles just fine....
I like a *wide* variety.

Twix was my original favorite. My mantra lately though has been: "It's junk-food if you'd rather have a good steak". So I've been eating things like cream puffs and cake instead (^w^)
The candy that's been satisfying my junk-food kicks though, are the various Reese's (Nutrageous, Fast Break, Pieces, Cups), an assortment of Japanese Candies, and Hershey's Gold (highly recommend, even if you rightly think Hershey's is crap chocolate).
Is there a way to do this cleaner or is this spot on? Just a test case for %get_map16() atm.

Code
	REP #$20
	LDA $9A		; x current pix
	LSR			; convert to block coord
	LSR
	LSR
	LSR
	STA $00		; x lookup
	LDA $98		; y current pix
	LSR			; convert to block coord
	LSR
	LSR
	LSR
	INC			; Block below
	STA $02		; y lookup
	SEP #$20
	%get_map16()
	BCS error
	REP #$30
	LDA $0000
	TAX
	SEP #$20
	LDA $41C800,x	; Get Map16 into A
	XBA
	LDA $40C800,x
	REP #$20
	STA $400F34
	SEP #$30
return:
	RTL
error:
	REP #$20
	LDA #$8664
	STA $400F34
	SEP #$20
	RTL


Mostly concerned about the LSRs (is there a way to get block coord directly?) and if my REP/SEP fiddling to get the map16 tile at the end is clean? Thanks in advance for any feedback/critique!
LSR #4 at least makes the code more readable so thanks a ton for that.
GPS is what it's for. I don't think it handles getting block coords, so that would mean I did it right!
On a related note:

I'm trying to implement a %next_map16() as per my asm request thread entry (dunno how I missed %get_map16() already existing when I requested them... :/)

Code
; call %get_map16() to prep input. then call the following:
next_map16:
	BCS error
	REP #$10
	LDX.w $00
	LDA $40C800,x
	CLC
	ADC #$01
	STA $40C800,x
	LDA $41C800,x	; Get Map16 Tile into A	
	ADC #$00
	STA $41C800,x	; Get Map16 Tile into A	
	SEP #$10
;Update...
;	JML $00C0FB|!bank	;pulled from %change_map16(), I *know* it needs more before it.
;Just not understanding what yet, seeing something about layers?
error:
	RTL


Any quick suggestions on this to get me pointed in the right direction/solve this?
(Trying to next_map16 so that I don't have to have 16+ copies of the same block asm, the usual use case I guess).
Not even sure if $00C0FB works the way I think it does.

Thanks as always by the way Thomas! I've gotten a couple cool blocks made already thanks to your help!

(If there's a more streamlined way of doing it you can think of that would be welcome feedback too!)

If it's *super* involved I'll probably just cheat and call get16,INC,change16...

EDIT: ended up doing just that. Looked like understanding the layer code would only save me about 16 instructions afaik, which just wasn't worth the optimization effort. (and fixed table stretch...)
I got exactly as far as "/ajax.php?a=pswitch".
So what does clicking it actually do? Is it a cookie clicker? #w{=3}
(For the lost: the P-Switch in the site's menu. Either tiny and on the bottom or large and hanging from the top.)
Todd's sample questions are pretty ideal I would think (maybe not the Chocolate one?).

Bare minimum knowledge of SMW probably isn't necessary if you're say, doing SM64 hacks. *But*, the ability to do a simple search to find info not only filters spam but also ensures real users can read/search the help for the tools/forum they're using to a degree. (FAQ-related questions would probably be good too).

Just my 2¢