Language…
14 users online: Chambo, Dennsen86, deported, Dispace, Fozymandias, Golden Yoshi, Green, Green Jerry, LightAligns, mio, neidoodle, RicardoDeMelo, synthie_cat, tOaO - Guests: 274 - Bots: 244
Users: 64,795 (2,375 active)
Latest user: mathew

"Boohemoth" Auto Scroll LEVEL ASM

I'm talking with the Randomdude in the Discord about the Boohemoth LevelASM code.

The "Boohemoth" code is an Auto-scroll, but only can be stopped when the player is facing left.
THIS IS WHAT I'M TALKING ABOUT!!

Code
init:
main:
LDA $76
BEQ .end
LDA $1462|!addr
REP #$20
CLC : SEP #$20
ADC #$01
STA $1462|!addr
.end: RTL


Using the code above works, but only reacts 2 screens, afterwards, it can return to the screen 00.

Code
init:
main:
LDA $76
BEQ .end
REP #$20
LDA $1462|!addr
CLC
ADC #$01
STA $1462|!addr
SEP #$20
.end: RTL


Using the code above cause the black screen (freeze the game).

Can anyone help me?


In the second code, change:

Code
ADC #$01

to

Code
ADC #$0001


Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer
the fact that i didn't see that just says i really shouldn't code at 2am
My conversation in Discord with randomdude, we have this:

Code
init:
main:
LDA $76
STA $14AF|!addr
BEQ .end
LDA $14
AND #$01
BEQ .end
REP #$20
LDA $1462|!addr
CLC
ADC #$0001
STA $1462|!addr
SEP #$20
.end: RTL


This is the Boohemoth auto-scroll code, this auto-scroll works if the player is facing right, however, when the player faces left, the Auto-scroll stops. These triggers the ON/OFF flag.

But there are two issues...

1) Customization speed, because the auto-scroll code is a little too slow.
2) The Auto-scroll is unstoppable.

Can anyone help me?
In order to customise the speed, you have two options:

-changing
Code
CLC
ADC #$0001
to
Code
CLC
ADC #$0002
or higher will make the autoscroll quicker.

-changing
Code
LDA $14
AND #$01
to
Code
LDA $14
AND #$03
or another power of two minus one (#$05, #$07, etc) will make the autoscroll slower.

Try playing with both changes until you find a good speed.


Originally posted by Roberto zampari
2) The Auto-scroll is unstoppable.


Add a check to $5E. Like:

Code
	LDA $1B
	INC
	CMP $5E
	BCS .end
	; rest of the code


Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer
If you're remaking the Boohemoth, don't forget that after looking left for awhile the autoscroll continues at half speed until looking away again.
I found another problem with the code.
When pausing, it cause glitches on the screen.

I used something like...

Code
init:
main:
LDA #$10
TRB $15
TRB $16
LDA $1B
INC
CMP $5E
BCS .end
LDA $76
STA $14AF|!addr
BEQ .end
LDA $14
AND #$03
BEQ .end
REP #$20
LDA $1462|!addr
CLC
ADC #$0001
STA $1462|!addr
SEP #$20
.end: RTL


But this doesn't work.
How can i fix this?

Originally posted by IronFoxGaming
If you're remaking the Boohemoth, don't forget that after looking left for awhile the autoscroll continues at half speed until looking away again.

How can i do this?
Try looking at the SMW ROM map.


Originally posted by henry242
Try looking at the SMW ROM map.

For the record, that... doesn't really help.

Anyway, to fix the pause issue, check $13D4 instead. That indicates whether the game is paused; if non-zero, return.

Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer