Azarashi Hacking

May 17, 2010 at 11:38 PM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 5998
I was kinda bored today and also somewhat tired of the same old assembly code I've been working at for weeks now, so I thought I'd try something new and see if I could document some of the Azarashi code to see if I could. It actually went better than I thought it would; I didn't find tons of info but there's at least a start. If anyone's interested, it's spoilered below.

Azarashi Asmembly hacking!

401000 - ?

401130 - Call 405E70, put result in [420140]

401140 - Prep level one

4011B0 - move [42015c] into eax

4011C0 - If all fish killed, return 0

4011F0 - Prepare next level

401250 - Put current level score into saved level score, put sum of all level score into cumulative score.

401280 - ?

4016C0 - ?

401B40 - Draw chain, head, body.

401CB0 - Draw Darts, points for each fish

401D80 - Draw "Score-" and score numbers

401E90 - Draw "Nth game"

401F50 - Draw "[SPACE]" flashing thing at top

401FB0 - Calculate level score from individual fish scores

402060 - Draw Results Screen (except "Best ----" score)

402260 - Draw "Best ---" score on results screen

4022D0 - Draw Floating Head guy

402410 - Check HighScore, save if Total Higher

402450 - De-activate all blood object 420170 0x1C 0x100

402490 - Generate BloodDrops

402580 - Blood Drop AI

4026A0 - Draw BloodDrops
PUSH red or blue blood (0/1)

402810 - OpenScreen Setup
402850 - CloseScreen Setup
402890 - Animate ScreenOpen
402940 - Animate ScreenClose


4029E0 - Render Numbers, small
PUSH number
PUSH Y
PUSH X
PUSH FullScreenRect(2)
CALL 4029E0
ADD ESP, 10

402C70 - Render Numbers, larger
PUSH number
PUSH Y
PUSH X
PUSH FullScreenRect? (414120)

402F00 -

403190 -
PUSH ?
PUSH ?
PUSH ?
PUSH ?
CALL 403190
ADD ESP, 10


403CE0 - Find WAV resources (for org?)

403DB0 -
PUSH ?
PUSH ?
PUSH ?

403E70 - Find more WAVE resources
PUSH Slot #?
PUSH ASCII resource name
CALL 403E70
ADD ESP, 8

403FE0 - CreateFile?

404280 -
PUSH ?
PUSH ?

404720 -
PUSH ?
PUSH ?

404880 -
PUSH ?

404AA0 - Find ORG resource, etc. (really long!)

405090 - Do somethign, generate error message if fail. (also long)

405E70 - Load high score from best.dat

405ED0 - Save high score to best.dat
PUSH points
CALL 405ED0
ADD ESP, 4

406070 - Random # generator
PUSH max
PUSH min
CALL 406070
ADD ESP, 8

4061B0 -

4067A0 - Render FPS timer

406D60 - Allocate ram for resources

407370 - Setup window/game environment

408300 - reserve RAM for WAVE

408A20 - reserve RAM for BMP

408E60 - Img. loader
PUSH type? (0 or 1)
PUSH img. resource number
PUSH name (ASCII String)
CALL 408E60
ADD ESP, 0C

409060 - multiplies rects, etc. by scale factor.
LEA EAX, [EBP-N]
PUSH ECX
CALL 409060
ADD ESP, 4

409210 - main draw function
PUSH img. resource num
PUSH rects
PUSH Y
PUSH X
PUSH FullScreenRect (428560)
CALL 409210
ADD ESP, 14

41b2cc - 41b2F8 - Ascii table, background img.
41b2fc - 41B3D0 - ASCII table, WAV resources (ORG)
41B494 - 41B51C - ASCII table, misc BMP resources
41B528 - 41B588 - ASCII table, WAVE resources (sounds)

41F120 - Other FullScreenRect?

Dart Obj Data- 400020 0x0C 0x03
+0x00 - Is.Active
+0x04 - Dart.X
+0x08 - Dart.Y
+0x0C - Dart points

Fish Obj Data - 400050 0x4C 0x03
+0x00 - Is.Active
+0x04 - Fish.x
+0x08 - Fish.y
+0x0C - Fish.MovX
+0x10 - Fish.MovY
+0x14 - Fish.State [0 = hanging 1 = falling 2 = caught 3 = dead 4 = gone]
+0x18 -
+0x1C -
+0x20 -
+0x24 -
+0x28 -
+0x2C -
+0x30 -
+0x34 -
+0x38 -
+0x3C -
+0x40 -
+0x44 -
+0x48 -
+0x4C - Fish.Char (0 = fish 1 = Ame)

420140 - Best Score
420144 - Current Level Score
420148 - Lv.1 score
42014C - Lv.2 score
420150 - Lv.3 score
420154 - Cumulative Score
42015C - Current Level
420168 - timer for [SPACE] flashing

Blood Obj Data - 420170 0x1C 0x0100
+0x00 - Is.Active
+0x04 - Blood.X
+0x08 - Blood.Y
+0x0C - Blood.MovX
+0x10 - Blood.MovY
+0x14
+0x18 - Blood.Size (0-2)
+0x1C

421D70 - Screen close/open timer?

428560 - FullScreenRect



0040638C |. 8B4D 08 MOV ECX,[EBP+8]
0040638F |. 8B51 04 MOV EDX,[ECX+4]
00406392 |. 83E2 40 AND EDX,40
Space key hit at end of round
These apply to azarashi V1.4
If you want you can DL here: http://homepage2.nifty.com/rochet/binaries/pxAqua_azarashi.zip

I don't expect everyone to jump up and make Azarashi mods but this was just something I did for fun.
 
Top