View Single Post
  #389    
Old June 25th, 2009 (11:47 AM). Edited July 26th, 2009 by score_under.
score_under's Avatar
score_under score_under is offline
I program the *other* ASM.
Crystal Tier
 
Join Date: Aug 2005
Location: Hertfordshire, England
Age: 22
Nature: Rash
Posts: 525
They're pretty much strictly fixed, but here they are:
Code:
pksv -e ScriptFile.txt RomFile.gba        -- Debug compile
pksv -r ScriptFile.txt RomFile.gba        -- Compile
pksv RomFile.gba HexOffset OutputFile.txt -- Decompile
Yes, this means that before I used a DLL, PKSVUI would just read the file, "_d_.pks.tmp"...

Even though you compiled it as command-line, I've done as much as I can to make it work just as well as PKSV in Windows (dynamic offsets, THUMB, pokemarts ...)

EDIT: - Slightly unrelated This script will work in the soon-to-come v2.0.5, it's a slightly modified version of the "move-to-place" script I mentioned earlier:
Code:
#dyn 0x800000
#define safe-val 0x100
'Safe-val is a value definitely larger than the X and Y coords on the map, which is to avoid unsigned integer overflow.
#org @start
lockall
getplayerxy 0x8000 0x8001
addvar 0x8000 safe-val
addvar 0x8001 safe-val
subtractvar 0x8000 0xA ' Position X to move to
subtractvar 0x8001 0x9 ' Position Y to move to - try this one in Pallet Town.
compare 0x8000 safe-val
if < jump :loop2
:loop
if == jump :loop3_s
applymovement PLAYER @run-left
pauseevent 0x0
subtractvar 0x8000 1
compare 0x8000 safe-val
jump :loop
:loop2
compare 0x8000 safe-val
if == jump :loop3_s
applymovement PLAYER @run-right
pauseevent 0x0
addvar 0x8000 1
jump :loop2
:loop3_s
compare 0x8001 safe-val
if < jump :loop4
:loop3
if == jump :endloops
applymovement PLAYER @run-up
pauseevent 0x0
subtractvar 0x8001 1
compare 0x8001 safe-val
jump :loop3
:loop4
compare 0x8001 safe-val
if == jump :endloops
applymovement PLAYER @run-down
pauseevent 0x0
addvar 0x8001 1
jump :loop4
:endloops
releaseall
end

#org @run-left
m run_left end
#org @run-right
m run_right end
#org @run-up
m run_up end
#org @run-down
m run_down end
Edit - "Soon to come"? What the hell was I talking about?
__________________
Plz not to PM me, I don't come here often enough. Email if you need me