Points of Required Attention™
Please chime in on a proposed restructuring of the ROM hacking sections.
Views: 88,544,968
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 05-06-24 07:11 AM
Guest: Register | Login

0 users currently in SMW Hacking | 1 guest

Main - SMW Hacking - ASM - Change RAM. New thread | New reply


era64
Posted on 07-24-09 11:26 AM (rev. 3 of 07-24-09 11:43 AM) Link | Quote | ID: 111072


Goomba
Level: 13

Posts: 5/25
EXP: 9187
Next: 1080

Since: 07-21-09

Last post: 5315 days
Last view: 5315 days
I don't know ASM. But I need small script to my project...

I want to make changing RAM address to other. How to make it (and, no... STZ not works, because I want other value than zero) (I modify the Counter Break Y script).

So...
HEADER
LOROM
ORG $A0D5
;NOP #8 ;Instead of wasting 16 cycles we'll just skip those NOPs

BRA ORLY ;2 bytes long - 3 cycles
NOP #6 ;We skipped 18 cycles meaning we saved 15 cycles :O
ORLY: STZ $0DBA,x ;No Yoshi color (of Player 1 and Player 2)

ORG $0491C9

BRA YARLY ;\
NOP ;/Saved 3 cycles
YARLY: STZ $0DC1 ;i have no idea i dont even
STZ $13C7 ;No Yoshi color
STZ $187A ;No riding Yoshi flag


So I want to have script which changes after every level (like Counter Break Y).

ORG for me seems like location to upload the code.

So... I want to set
$7E:13C7 (yoshi's colour) to 0xA (green) and
$7E:0DBA (yoshi's colour) to 0xA (green) and
$7E:187A (riding on Yoshi) to 0x1 or 0x2 (I don't know difference, RAM Map say this)

Oops... I didn't see this sticked thread. Sorry. But here isn't any way to restore this... Sorry...

boingboingsplat
Posted on 07-24-09 09:14 PM Link | Quote | ID: 111111


Giant Koopa
[PREFSTRING:wonderful bounciness]
Level: 74

Posts: 947/1292
EXP: 3636639
Next: 16905

Since: 07-23-07
From: Michicola

Last post: 4852 days
Last view: 4814 days
It's just simple loading and storing, try this:
HEADER
LOROM
ORG $A0D5

BRA ORLY ;\Save CPU cycles
NOP #4 ;/
ORLY: LDA #$0A
STA $0DBA,x ;Set Yoshi color to green

ORG $0491C9

NOP #2
LDA #$0A
STA $13C7 ;Green Yoshi color
LDA #$01
STA $187A ;Riding Yoshi flag

Haven't tested this myself, not sure if it will work or if it will do what you want it to. (Make the player always have green yoshi after beating a level?)

____________________
 

Main - SMW Hacking - ASM - Change RAM. New thread | New reply

Acmlmboard 2.1+4δ (2023-01-15)
© 2005-2023 Acmlm, blackhole89, Xkeeper et al.

Page rendered in 0.020 seconds. (341KB of memory used)
MySQL - queries: 42, rows: 63/64, time: 0.016 seconds.