16 users online:  Carld923, edgar,  Fernap, fsvgm777, Heraga, Idunno, Julintendo, Knight of Time, LightAligns, LuigiTime, margot, niko, Teaser,  TickTockClock, VinylHeart, Yoshioshi59_ - Guests: 86 - Bots: 584 Users: 54,993 (2,187 active)
Latest user: Doomkid
Not logged in.
Posts by Disarray
Disarray's Profile - Posts by Disarray
Pages: « 1 2 3 417 18 »
Well, my first post on this site should be something a bit more Grand but ah well...

I'm currently working on a code for level ASM,

It is supposed to make the on/off block effect happen for a set amount of time then switch to the on effect for a cetain amount of time, then back to off, then back to on again etc. etc.

So I checked the RAM map and couldn't find a code for making the game wait a certain amount of time/frames before continuing to activate the on effect, wait, activate off etc.

How would I go about making the on effect go on for a certain amount of time before switching to off or turn on the on effect, wait for a few frames, then activate the off effect?

Any help would be greatly appreciated, thanks.

Disarray!

--------------------
Your layout has been removed.
Thanks for that, I'm still new to ASM, I can do little bits where I just have and LDA and an STA and can do a few other things but that really helped, thanks.

Disarray!

--------------------
Your layout has been removed.
So thanks to YoshiCookieZeus I kinda managed to make my first proper piece of ASM code to use with level ASM except it only half works,

here is the code...

LDA $13 ;RAM adress of frame counter
CMP #$F0 ;check if F0 (240)
BEQ on ;if yes jump to on...
RTS ;if not end code
on:
LDA #$00 ;load 00 into accumulator (you should know that)
STA $14AF ;load 00 into the on/off RAM adress setting it to 'on'
LDY $13 ;RAM adress of frame counter (*extra question, can I use LDA here instead even though I've used it once?
CMP #$1E0 ;check if 1E0 (480)
BEQ off ; if so skip to off
RTS ;if not end code
off:
LDA #$01 ;load 01 into accumulator
STA $14AF ;RAM adreess of on/off effect making it 'off'
LDX #$00 ;load 0 into X
STX $14AF ;set frame counter to 0
RTS ;end code

(*note, those annotations were not in the actual ASM code, I just added them for this Forum, I also hope I labelled them right)

What this is supposed to do is set the on/off block effect to on after about 5 seconds (F0 frames) then after another 5 set it to off, then reset the frame counter and start again except what it instead does is whilst the on off block os set to on it does nothing, but will set the on/off block to off every 10 seconds (1E0 frames)

Could some-one maybe tell me where I went wrong and/or if there is a more effective way of branching, mine was a little improvised...

Any help would be appreciated.

Disarray!

--------------------
Your layout has been removed.
(restricted)
Does that code work with Ersanio's level ASM? I'm not entirely sure, it's mainly just the 'init' bit that makes me wonder.

--------------------
Your layout has been removed.
That's where I got confused, I never only had the levelcode.asm file, never the other one... it's worked with just this one file with the simpler stuff I've tried to do but now...

What/how/where do I do/set/get this 'init one to work/just be used?

I know I'm asking a lot of stuff but this is my first attempt at ASM other than rubbish with just 2-5 lines of code.

Any help woulb most appreciated at 11PM.

Dissaray!

Edit, thanks electrofire(?) but what do you mean by cleared on overworld transition, I've seen a fair few that say cleared on level start on the RAM map, do you mean one of those?

And just to repeat, I know I'm asking a lot of stuff but this is my first attempt at ASM other than rubbish with just 2-5 lines of code.

Disarray!

--------------------
Your layout has been removed.
Bloody Hell!

"The system cannot find message text for message number 0x2350 in the message fil
e for Application.

The system cannot find message text for message number 0x2334 in the message fil
e for Application.

C:\Users\Jordan!\Documents\ROM'S\Disarray!\Main_Game>xkas level.asm smw.smc
error: Levelcode.asm: line 534: define not declared (yet?)
error: Levelcode.asm: line 535: define not declared (yet?)
error: Levelcode.asm: line 540: define not declared (yet?)
error: Levelcode.asm: line 540: invalid opcode or command [stz]
error: Levelcode.asm: line 535: define not declared (yet?)
error: Levelinitcode.asm: line 535: label [A] not found [timelmt = $28*7A]

C:\Users\Jordan!\Documents\ROM'S\Disarray!\Main_Game>xkas level.asm smw.smc
error: Levelcode.asm: line 534: define not declared (yet?)
error: Levelcode.asm: line 535: define not declared (yet?)
error: Levelcode.asm: line 540: define not declared (yet?)
error: Levelcode.asm: line 540: invalid opcode or command [stz]
error: Levelcode.asm: line 535: define not declared (yet?)
error: Levelinitcode.asm: line 535: label [a] not found [timelmt = $28*7a]

C:\Users\Jordan!\Documents\ROM'S\Disarray!\Main_Game>
C:\Users\Jordan!\Documents\ROM'S\Disarray!\Main_Game>"

This is what I get whenever I run xkas and level.asm, I wish this site would let people upload ASM code with enters between them (I'm guessing they have to be one line below eachother)

Here are my 2 ASM codes

levelinit105:
!lvltimer = $06a0 ; point to free ram ! (side note by my whilst I'm posting this... do I actually need to change this one, I thought he was being nice and gave me a free adress)
timelmt = $28*7a ; change the 5 for # of smw timer seconds (40 frms)
stz !lvltimer
RTS

level105:
inc !lvltimer
cmp #!timelmt
bne donotchg
lda $14af
eor #$01
sta $14af
stz !lvltimer
donotchg:
rts

So... what the hell is going wrong, If I can't get this to work tonight I may just start from scratch...

So this posts questions, what is going wrong with my code? and 2 do I need to have each new bit of code a line below the last one, eg

LDA...
STA...
RTS...

instead of LAD... STA... RTS...

Even more help would be appreciated, thanks.

Disarray!

--------------------
Your layout has been removed.
Thanks for that, it's so much fun to be an ASM n00b at 12pm.

Disarray!

Edit:

The system cannot find message text for message number 0x2350 in the message fil
e for Application.

The system cannot find message text for message number 0x2334 in the message fil
e for Application.

C:\Users\Jordan!\Documents\ROM'S\Disarray!\Main_Game>xkas level.asm smw.smc
error: Levelcode.asm: line 534: define not declared (yet?)
error: Levelcode.asm: line 535: define not declared (yet?)
error: Levelcode.asm: line 540: define not declared (yet?)
error: Levelcode.asm: line 540: invalid opcode or command [stz]

C:\Users\Jordan!\Documents\ROM'S\Disarray!\Main_Game>

Right then, now I get this claiming that 'stz' is not a valid opcode etc and that some of my stuff is wrong, this is copied exactly (or so I think) from an earlier post, look back through my huge dilemas and you should see it in a blue box.

To be quite honest, it's past midnight, I'm tired, am still new to ASM and unless some-one can almost/actually fix this I just feel like canablising bits of the code you've all so kindly given me and start again and try to do things simpler. (most of this is simple for you lot anyway)

So, please could some-one show me what I actually have done wrong even after all the corrections?

Thanks, I'm going to bed (mmmm bed) and shall (hopefully) get this fixed in the morning.

Thanks to all the people who have helped, off the top of my head yoshicookiezeus, electrofire and some wierd number along the lines of 1000 and summet, and that other guy I can't remember.

Once more thanks and any help would be appreciated.

Disarray!

--------------------
Your layout has been removed.
The STZ was followed by a 'symbol' (leveltimer I think) basically followed by a word. Otherwise thanks for that.

Also, if I aint usin' levelinitcode can I put a HDMA code in there?

_____________________________________________________________________

Edit, so tried everything anyone has recomended and it still either won't insert or won't work correctly so I've decided to start again.

How would I check for one value or another?

So instead of say CMP (whatever value) I'd be trying to make it check for 2 values and depending on which one it branches to a seperate section of the code. Would I maybe use BNE to branch to another section of the code where I use CMP again to check the other?

How would I go about doing this?

Any help would be greatly appreciated. Thanks.

Disarray!

--------------------
Your layout has been removed.
Without SMWC I'd probably still hack, but that really only depends on wether or not it just randomly got shut down or just never existed. If I got to keep all the stuff I've accumulaed from the site I'd still hack, if not I'd probably just be making Kaizo hacks for LPers or juts not doing it at all.

To be honest, I really don't know so this was a really pointless post.

--------------------
Your layout has been removed.
Well after osting on the advanced questions section for a while trying to get bloody ASM to work time for something simpler...

I never really figured it out but how do I make certain pallettes translucent? Especially the ones used for layer 3 fog and stripe image uploading.

Any help would be appreciated.

Thanks.

Disarray!

--------------------
Your layout has been removed.
Thanks for that, I'll give it a go later, what timer do you mean exactly, the one for the actually in game time limit or any because most of the other reccomendations have been the frame counter (I used that first) then just a blank ram adress with 'inc' being used.

Thanks again

Disarray!

--------------------
Your layout has been removed.
(restricted)
Thanks for that iceguy, I've been using that adress recently anyway.

I seriously didn't expect a 'legend' like you to actually help with useless old me's problems.

Thanks,

Disarray!

PS. can some-one tell me why my layout gets removed when I have the word 'Disarray!' flashing in my header using HTML?

--------------------
Your layout has been removed.
It's a GIF image added using HTML which is allowed, so even though this is veering off adavanced hacking just quickly, why does it get removed? ANd what's the problem with flashing, it's just a gradual flashy pulse thing.

Back to the ASM, would the time be in frames or seconds, setting it to seconds would be easier. Also, using STZ to set the on/off flag to zero would set it to on, not off, should be an easy fix(?)

Edit,

Tested the code and it works, following the code some-one else game me 28*1 is one smw timer second, 28*5 is 5 smw timer seconds right? So... would I be able to use this instead of a value like 7A where I ahve to put the value to count from?

Disarray!

--------------------
Your layout has been removed.
Wow this even helped me with my mission to learn how to make layer scrolling wave effects by hand since d4's kit sucks.

Thanks

Disarray!

--------------------
Your layout has been removed.
Thanks for that, really useful. I must sound an idiot not knowing how to do that but knowing (some) ASM.

*sigh

Disarray!

--------------------
Your layout has been removed.
Well, I've been messing around with my account and I found most of the layouts were a bit lame, I like circuit and hex though, but I selected AB daily cycle to test it, and it has no side bar just one at the top snd so far as I can see I have no way to change it back.

*Sigh, the answer is probably really obvious but can some-one just tell me how I reset/change this?

Thanks.

Disarray!

--------------------
Your layout has been removed.
Well that sucks... I wonder how long I have to put up with this ugly purple?

*sigh

Thanks anyway.

Edit, didn't notice the link, all fixed now.

Thanks again.

Disarray!

--------------------
Your layout has been removed.
Not so much a question about me struggling with ASM or whatnot, I've actually succeeded in my first ASM code to use with levelASM but I want it to be in-sinc with the spinning log dynamic sprite by smkdan.

I had a look at through the ASM code but couldn't find how many frames each interval lested for. It may also be in the cfg file but I'm still learning how to use them.

If some-one could take a look at the code (It's a little too long to post) and tell me how many frames each interval lasted for or how to properly find it myself (I seriously have found nothing, the speed at the top of the code is too longa interval) I'd greatly appreciate it.

Thanks.

Disarray!

--------------------
Your layout has been removed.
Pages: « 1 2 3 417 18 »
Disarray's Profile - Posts by Disarray