Sprite / Block request thread
-
Argumentable
the biggest shit
- Posts: 690
- Joined: 15 years ago
- Location: A butthole
- Contact:
- https://argu.talkhaus.com/
Re: Sprite / Block request thread
Yo, is there a sprite/block that makes the on/off switch flip every couple of seconds or so? If you coders want to get fancy, a generator that you can turn off with D2 would be ideal since I want this to span several screens, but if there's already something out there that will serve my purposes then that's cool
I'm on Youtube andTwitter and Discord so say hi to me on there cause I don't really post here also I have sigs off so I can make my sig as ugly as I want and it won't bother me this is my sig btw
Re: Sprite / Block request thread
PMed you one. It changes it every three seconds.
Trouble with a capital COW.
<math>\tan{A}\sin{N}</math>
Re: Sprite / Block request thread
Argumentable wrote:Yo, is there a sprite/block that makes the on/off switch flip every couple of seconds or so? If you coders want to get fancy, a generator that you can turn off with D2 would be ideal since I want this to span several screens, but if there's already something out there that will serve my purposes then that's cool
It looks like I have been ninja'd.chdata wrote:PMed you one. It changes it every three seconds.
I am a cat. You cannot prove otherwise.
Re: Sprite / Block request thread
Is there a levelASM code to disable any kind of jumping? Normal and spin.
Also I can't figure out how to convert this to levelASM.
header
lorom
!size = 0; 0 is small, 1 is big
org $00EB79
LDA #$!size
org $01B4C0
LDY #$!size
org $03B67C
LDA #$!size
It makes mario's hitbox 16x16 even if he has powerups.
Or would I be able to insert this to a freespace address and JSL to it in levelASM? Without effecting the game?
Also I can't figure out how to convert this to levelASM.
header
lorom
!size = 0; 0 is small, 1 is big
org $00EB79
LDA #$!size
org $01B4C0
LDY #$!size
org $03B67C
LDA #$!size
It makes mario's hitbox 16x16 even if he has powerups.
Or would I be able to insert this to a freespace address and JSL to it in levelASM? Without effecting the game?
Trouble with a capital COW.
<math>\tan{A}\sin{N}</math>
Re: Sprite / Block request thread
I'm not sure if you can. Patches re-write the ROM. Level ASM can't touch ROM because it is read-only.
You might be able to disable jumping through levelasm by writing to the controller ram addresses.
You might be able to disable jumping through levelasm by writing to the controller ram addresses.
DON'T PM me. Ask your question in the help thread so everyone can be answered.
Re: Sprite / Block request thread
1) A different patch could do it (in the zip).Kil wrote:I'm not sure if you can. Patches re-write the ROM. Level ASM can't touch ROM because it is read-only.
You might be able to disable jumping through levelasm by writing to the controller ram addresses.
2) Just writing to the controller RAM addresses doesn't work since level ASM hijacks after they are use. I updated my Controller Hijack Patch (in the zip). I mirrored the original controller data to new addresses and added a bypass to the check if #$00 is in the overwriting address in case you actually want to write #$00 to the controller data. Here is the level ASM code that goes with this patch to disable jumping ($15 though $18 all use #$80 for jumping):
I am a cat. You cannot prove otherwise.
Re: Sprite / Block request thread
Actually I figured I could just use levelASM to set mario's Y speed to only let him move downwards for my idea, but if it turns out that it stops all upwards movement then I'll use your code.
And thanks for the levelMariosize.
New problem
I tried out my idea for changing the music and forcing mario (demo) to enter a star, with Overworld ASM.
My MainOW code screws up gameplay in the MainOw, alot. Save game message boxes have no black background, but you see the letters, transition from yoshi's island to the mainow becomes glitched but still works, no noise at all plays. Also pipes seem to not work and stars too, sometimes.
The valleyofbowser code works, but it makes it so that if you stand on any level tile, you enter it. And if you stand on a star, even if it's supposed to teleport you, you enter it's level instead. So I think I'll try the controller hijack again. I'm having trouble understanding how to force the player to "press" a button.
And thanks for the levelMariosize.
New problem
My MainOW code screws up gameplay in the MainOw, alot. Save game message boxes have no black background, but you see the letters, transition from yoshi's island to the mainow becomes glitched but still works, no noise at all plays. Also pipes seem to not work and stars too, sometimes.
The valleyofbowser code works, but it makes it so that if you stand on any level tile, you enter it. And if you stand on a star, even if it's supposed to teleport you, you enter it's level instead. So I think I'll try the controller hijack again. I'm having trouble understanding how to force the player to "press" a button.
Trouble with a capital COW.
<math>\tan{A}\sin{N}</math>
Re: Sprite / Block request thread
My code completely disables the jump buttons so that would stop all upward movement caused by pushing a button. Falling off of a ledge and landing on an enemy would not bounce very high (the player cannot hold the jump button to bounce higher) but it still needs to be negated.chdata wrote:Actually I figured I could just use levelASM to set mario's Y speed to only let him move downwards for my idea, but if it turns out that it stops all upwards movement then I'll use your code.
The first thing I notice is that the following code is useless because there is no difference between branching and not branching:chdata wrote:New problem
In the new code, write values to $0F5E through $0F61 as though they are $15 through $18. These values are then set to zero so the same thing isn't repeated every frame (pressing left would infinitely go left until something else is pressed). If you want the same thing every frame then write to that address every frame. Also, $0F62 through $0F65 have the values that are supposed to be in $15 through $18 (they are backups). In the old code, overwriting the controller data with zero was impossible. $0F66 is a flag that overcomes this: if set then all the controller data will be overwritten. It is mainly used if AND or EOR are used but not with ORA. For example, if the player only presses jump and jump is excluded then that results in zero. Zero is skipped normally so the flag needs to be set for zero to be used. Here is some example code:chdata wrote:So I think I'll try the controller hijack again. I'm having trouble understanding how to force the player to "press" a button.
I am a cat. You cannot prove otherwise.
Re: Sprite / Block request thread
Yeah those defines (!UPY) or whatever were supposed to be #$, so that fixed some things.
Also now the entering a star thing works correctly with your hijack. So far it's set to only make him enter it on the valley of bowser submap but do nothing on the mainow submap.
So now I understand how you stores the ram address for controller buttons into free ram, to mirror it. I'll try to figure out some more.
edit:
LDA $0F63 ;BACKUP OF $16 ;so we load this to force the player to a button only once
ORA #$02 ;this is the button to be forced to press (left)
STA $0F5F ;NEW VALUE FOR $16 ;storing those two things above into here is what makes you push a button.
edit 2: Forcibly entering a star is now perfected. On the bowservally submap if you walk onto the star from a tile thats to the right of it, or in other words you are facing the left, it will autoteleport you. Then on the mainOW it will force you to walk to the left. Then if you walk back onto the star tile, it'll teleport you by force and not walk you to the left, and in the valleybowser submap it'll force you to walk to the right instead of creating a loop of entering the star again and again.
Also I got the starworld music change to work.
Also now the entering a star thing works correctly with your hijack. So far it's set to only make him enter it on the valley of bowser submap but do nothing on the mainow submap.
So now I understand how you stores the ram address for controller buttons into free ram, to mirror it. I'll try to figure out some more.
edit:
LDA $0F63 ;BACKUP OF $16 ;so we load this to force the player to a button only once
ORA #$02 ;this is the button to be forced to press (left)
STA $0F5F ;NEW VALUE FOR $16 ;storing those two things above into here is what makes you push a button.
edit 2: Forcibly entering a star is now perfected. On the bowservally submap if you walk onto the star from a tile thats to the right of it, or in other words you are facing the left, it will autoteleport you. Then on the mainOW it will force you to walk to the left. Then if you walk back onto the star tile, it'll teleport you by force and not walk you to the left, and in the valleybowser submap it'll force you to walk to the right instead of creating a loop of entering the star again and again.
Also I got the starworld music change to work.
Last edited by Chdata 14 years ago, edited 1 time in total.
Trouble with a capital COW.
<math>\tan{A}\sin{N}</math>
Re: Sprite / Block request thread
chdata wrote:edit:
LDA $0F63 ;BACKUP OF $16 ;so we load this to force the player to a button only once
ORA #$02 ;this is the button to be forced to press (left)
STA $0F5F ;NEW VALUE FOR $16 ;storing those two things above into here is what makes you push a button.
Code: Select all
LDA $0F63 ;BACKUP OF $16 ;BUTTONS PLAYER IS CURRENTLY PRESSING
ORA #$02 ;this is the button to be forced to press (left)
STA $0F5F ;NEW VALUE FOR $16 ;storing those two things above into here is what makes you push THE BUTTONS THE PLAYER IS PRESSING PLUS YOUR ADDITION
Code: Select all
LDA #$01
STA $0F66 ;FORCE VALUES TO ALWAYS BE OVERWRITTEN
LDA #$02 ;this is the button to be forced to press (left)
STA $0F5F ;NEW VALUE FOR $16
I am a cat. You cannot prove otherwise.
Re: Sprite / Block request thread
Code: Select all
LDA #$01
STA $0F66 ;so setting this to 01 will overwrite any input by the player to whatever you're forcing. although the player doesn't need to put in any input for the force to run
LDA #$02 ;forces left to be pushed. Now if I were to add more LDA #$'s, would it make the player push all those buttons in a row?
STA $0F5F ;and this whole code isn't for levels
Trouble with a capital COW.
<math>\tan{A}\sin{N}</math>
Re: Sprite / Block request thread
If you load multiple values then only the end result will do anything since it is not until after level ASM is done that this stuff is processed. Basically, loading values doesn't do anything: it is the code that interprets the values that does stuff. You aren't forcing the player to go left with the above code, you are making it so the code that interprets the controller data will do that. In order to do something like the intro screen would take a serious of values loaded one frame after another (or every few frames). Here is something like that (a very basic version):chdata wrote:Hey this makes me think, automatic mario hacks could be alot more automatic with this stuff.Code: Select all
LDA #$01 STA $0F66 ;so setting this to 01 will overwrite any input by the player to whatever you're forcing. although the player doesn't need to put in any input for the force to run LDA #$02 ;forces left to be pushed. Now if I were to add more LDA #$'s, would it make the player push all those buttons in a row? STA $0F5F ;and this whole code isn't for levels
Code: Select all
VALUE: ;NEW CONTROLLER DATA
db $41,$C1,$00,$02,$41,$82,$00,$41,$C1,$41,$C1
FRAME: ;NUMBER OF FRAMES BEFORE NEW VALUE
db $2F,$0F,$2F,$0F,$3F,$08,$0F,$5F,$0F,$1F,$0F
CODE:
INC $0F66 ;SET CONTROLLER BYPASS FLAG
PHX
LDX $0F67 ;FREE RAM - INDEX TO TABLES
LDA $0F68 ;FREE RAM - CUSTOM FRAME COUNTER
INC $0F68
CMP FRAME,X
BCC SAME_VALUE
;USE NEXT VALUE
CPX #$0A ;TOTAL NUMBER OF VALUES (MAX INDEX VALUE +1)
BEQ NO_BYPASS ;IF THAT SHOULD NOT EXIST, THEN CODE IS DONE
INX
STX $0F67 ;INCREMENT INDEX
STZ $0F68 ;RESET CUSTOM FRAME COUNTER
SAME_VALUE:
LDA VALUE,X
STA $0F5E ;OVERWRITE $15
STA $0F5F ;OVERWRITE $16
PLX
RTS
NO_BYPASS:
STZ $0F66 ;UNDO BYPASS, PLAYER HAS CONTROL
PLX
RTS
I am a cat. You cannot prove otherwise.
Re: Sprite / Block request thread
Could someone give me something to make the A button do the same as the B button (Regular jump, rather than spin jump)?
Re: Sprite / Block request thread
My Controller Hijack Patch allows for stuff like that. This level ASM code will make it happen:Zaquaa wrote:Could someone give me something to make the A button do the same as the B button (Regular jump, rather than spin jump)?
Code: Select all
INC $0F66 ;CONTROLLER BYPASS FLAG
LDA $0F64 ;$17 BACKUP
AND #$80 ;CHECK IF A IS PRESSED
ORA $0F62 ;INCLUDE B IN $15 BACKUP
STA $0F5E ;NEW $15
LDA $0F64 ;$17 BACKUP
AND #$7F ;EXCLUDE A
STA $0F60 ;NEW $17
LDA $0F65 ;$18 BACKUP
AND #$80 ;CHECK IF A IS PRESSED
ORA $0F63 ;INCLUDE B IN $16 BACKUP
STA $0F5F ;NEW $16
LDA $0F65 ;$18 BACKUP
AND #$7F ;EXCLUDE A
STA $0F61 ;NEW $18
I am a cat. You cannot prove otherwise.
Re: Sprite / Block request thread
Anyone know how to edit a block so that it acts like an all-way bounce block, except that it always sends you up and to the right (where ever and however you hit it)? I'd also need one that always sends you up and to the left. The speed ideally would be somewhere halfway between the max-speed that those blocks usually do and, for instance, a note block.
Nothing's easy.
Re: Sprite / Block request thread
Here are boost blocks, but you need to experiment to find the speed values you are looking for. I am guessing these are somewhat close.Moniker wrote:Anyone know how to edit a block so that it acts like an all-way bounce block, except that it always sends you up and to the right (where ever and however you hit it)? I'd also need one that always sends you up and to the left. The speed ideally would be somewhere halfway between the max-speed that those blocks usually do and, for instance, a note block.
I am a cat. You cannot prove otherwise.
- flameofdoubt
- Posts: 0
- Joined: 14 years ago
- Location: Britain
Re: Sprite / Block request thread
I'm currently working on (though I have not signed up for) a level for the void teleporter room. I've made a recreation of the area where you first meet an alpha metroid in Metroid 2, but I was hoping someone could help me by making a sprite that resembles an alpha metroid, rather than me taking the closest enemy and trying to graphic swap it.
I don't know how feasible this is so I've seperated its features into necessary, and super-spiffy-extras:
Anything vaguely resembling this would be really helpful, thanks for your time!
I don't know how feasible this is so I've seperated its features into necessary, and super-spiffy-extras:
Last edited by flameofdoubt 14 years ago, edited 2 times in total.
Pixie casts Dekunda. Insufficient MP!
Re: Sprite / Block request thread
Note- When changing the BGM, it'll have to be a song in the same bank (unless we utilize Kil's patch), except multiples of 4 subtracted from it till it's between 20-23. For example to play a song from a bank that's 24-27, such as playing song 27, you're level music must be any song between those 24-27, but you load 23 instead of 27. Someone told me that. And I've tested loading things above 23 and it doesn't work for me.
Trouble with a capital COW.
<math>\tan{A}\sin{N}</math>
- flameofdoubt
- Posts: 0
- Joined: 14 years ago
- Location: Britain
Re: Sprite / Block request thread
Not sure I fully understand why it's particularly 23 rather than another from 20-23, but I sort of get it I think, thanks for the help I'll keep that in mind and make sure I account for that
Pixie casts Dekunda. Insufficient MP!
Re: Sprite / Block request thread
since 27 isn't in the same bank as 20-23, you subtract 4 again and again until it is. 27 minus 4 is 23.
Trouble with a capital COW.
<math>\tan{A}\sin{N}</math>
- flameofdoubt
- Posts: 0
- Joined: 14 years ago
- Location: Britain
Re: Sprite / Block request thread
Ah that was the step I was unsure on, that it slides up and down. So just to check if I wanted the music after the switch to be 26 then I should have the music before as 22?
Pixie casts Dekunda. Insufficient MP!
Re: Sprite / Block request thread
If you wanted to switch the music to play whatever 26 is when you inserted it with Romi's addmusic, you'd just...
LDA #$22
STA $1DF9 ; I think this is the RAM address you use for it. I'm highly sure.
But that will only work if the level music is normally either 24, 25, 26, or 27. Now if the music bypass was set to a song such as 28, loading that 22 would instead play song number 30.
LDA #$22
STA $1DF9 ; I think this is the RAM address you use for it. I'm highly sure.
But that will only work if the level music is normally either 24, 25, 26, or 27. Now if the music bypass was set to a song such as 28, loading that 22 would instead play song number 30.
Trouble with a capital COW.
<math>\tan{A}\sin{N}</math>
Re: Sprite / Block request thread
Isn't it $1DFBchdata wrote:If you wanted to switch the music to play whatever 26 is when you inserted it with Romi's addmusic, you'd just...
LDA #$22
STA $1DF9 ; I think this is the RAM address you use for it. I'm highly sure.
But that will only work if the level music is normally either 24, 25, 26, or 27. Now if the music bypass was set to a song such as 28, loading that 22 would instead play song number 30.
DON'T PM me. Ask your question in the help thread so everyone can be answered.
Re: Sprite / Block request thread
Probably. There's a whole bunch of those 1DF's.
Trouble with a capital COW.
<math>\tan{A}\sin{N}</math>