News:

Don't forget to visit the main site! There's lots of helpful docs, patches, and more!

Main Menu

New PLM/beam ASM for graphics(DONE)

Started by A_red_monk_called_Key, October 10, 2011, 10:25:02 PM

Previous topic - Next topic

A_red_monk_called_Key

i'm looking to add the hyper beam to my hack.
what i need is a new PLM that will unlock the hyper beam after 50 of these PLMs are collected.(and not add to the items rate of collecting %)

i can trade anything for graphics.

Smiley

#1
I have no idea how to make the PLM, but the counter is rather easy:

!CounterAddress = any unused RAM address

LDA !CounterAddress
CMP #$0031                ;Checks if the counter is 49*
BMI IncreaseCounter  ;If less than 49, goes to increase it
LDA #$0001  ;\If it's 49, then...
STA $0A76   ;/HYPER BEAM TIME! DIE YOU BASTARD, DIE!!!
RTS

IncreaseCounter:
INC !CounterAddress   ;Increases the counter
RTS


*49 because otherwise you'd have to collect 51 packs.

Here's another version that prevents the counter from changing if you already have Hyper Beam.

!CounterAddress = any unused RAM address

LDA $0A76      ;\
CMP #$0000   ;|Checks that you don't have hyper. If you do, just quit and do nothing
BEQ MainCode ;/
RTS

MainCode:
LDA !CounterAddress
CMP #$0031                ;Checks if the counter is 49*
BMI IncreaseCounter  ;If less than 49, goes to increase it
LDA #$0001  ;\If it's 49, then...
STA $0A76   ;/HYPER BEAM TIME! DIE YOU BASTARD, DIE!!!
RTS

IncreaseCounter:
INC !CounterAddress   ;Increases the counter
RTS


That should do it for the counter and getting hyper beam-part. Someone else has to make actual PLM though, sorry.


...I just got motivated enough to start learning more ASM.

A_red_monk_called_Key

awesome, part credit to you sir

now all i need is a new PLM w/new counter

Qactis

The PLM can be based off of another item pickup PLM, which takes out most of the difficulty in creating a new PLM. Give me some time to get back into ASM and I'll look into it

A_red_monk_called_Key

this was done with a missile copy. i ended up writing the whole ASM code, but i couldn't have done it with out SMILEuser96 help.

Qactis

Nice work. From what I've seen the hardest part is implementing it into the Samus start menu :/