Cave Story Modding Wiki
Contents:
  1. Doukutsu Assembler

Doukutsu Assembler

Doukutsu Assembler:
Creator:Carrotlord
Year (Newest):2010
Platform:Windows OS, Mac OS, Linux OS (Java)
Status:

Stale

Download:From cavestory.org
Info:Original Forum Thread

The Doukutsu assembler is a purpose-built assembler for modding Cave Story executables, written in Java. It lets you write x86 ASM as well as apply and edit pre-made patches, a database of which can be found in this community github repo.

For more documentation, please refer to the original forum thread in the info box.


The following is a “Defines” list for the Doukutsu Assembler, made by Noxid.

Currently, this doesn’t have support for Floating Point Units (FPUs), as the assembler doesn’t natively have support either.

JPE=JP
JZ=JE
JNZ=JNE
JNL=JGE
JNLE=JG
JNGE=JL
JNG=JLE
JNBE=JA
JNAE=JB
JC=JB
JNA=JBE
JNC=JNB
JAE=JNB
JNP=JPO
JP=JPE
MOV EIP,=JMP
MOV DX,=data 66 BA





PlayerXPos=[49E654]
PlayerYPos=[49E658]
PlayerXVel=[49E66C]
PlayerYVel=[49E670]
SelectWeaponId=[499c68]
SelectItemId=[499C6C]
InvincTimer=[49E6C8]
CurrentHealth=[49E6CC]
MaxHealth=[49E6D0]
Oxygen=[49E6DC]
JetpackEnergy=[49E6E8]
PlayerFlags=[49E638]
PlayerTile=[49E63C]
DirectionFaced=[49E640]
IsFacingUp=[49E644]
IsFacingDown=[49E648]
Equippeditems=[49E650]

KeyHeld=[49E210]
KeyPressed=[49E214]
LastKey=[49E218]
ScreenRect=48F91C
ShootKey=[493614]
JumpKey=[493610]
NextWepKey=[493618]
PrevWepKey=[49361C]
MenuKey=[493620]
MapKey=[493624]
LeftKey=[493630]
RightKey=[493638]
JumpKey=[493628]
UpKey=[493634]
DownKey=[49363C]
ShootKey=[49362C]

WeaponDataLoc=499BC8
WeaponDataSize=14

CameraPosX=[49E1C8]
CameraPosY=[49E1CC]
TitleCursorPos=[49E1E4]
GameState=[49E1E8]
AppInstance=[49E44C]
AppWinHandle=[49E458]
ShowFPS=[49E464]

EnvironmentSound=[49E6EC]
CurrentMapID=[4A57F0]
CurrentSongID=[4A57F4]
PrevSongID=[4A57FC]

MessageBoxBuffer=4A58D0
MessageBoxBufferSize=100
CurrentScript=[4A5AD8]
ScriptPos=[4A5AE0]
TextColumn=[4A5AE4]
TextRow=[4A5AE8]
FaceSlideTimer=[4A5B10]
FaceID=[4A5B0C]
CurrentSongBeat=[4A4B00]
PrevSongBeat=[4A57F8]

setpointer=mov edi,[ebp+8]

NPCArray=4A6220
NPCSize=AC
NumNPC=200

npc.inuse=[edi]
npc.collision=[edi+4]
npc.x=[edi+8]
npc.y=[edi+C]
npc.movex=[edi+10]
npc.movey=[edi+14]
npc.altvelx=[edi+18]
npc.altvely=[edi+1C]
npc.CurlyMacro1=[edi+20]
npc.CurlyMacro2=[edi+24]
npc.npcID=[edi+28]
npc.EntityID=[edi+2C]
npc.EventNum=[edi+30]
npc.tileset=[edi+34]
npc.hurtsound=[edi+38]
npc.deathsound=[edi+3C]
npc.health=[edi+40]
npc.EXP=[edi+44]
npc.deathgraphic=[edi+48]
npc.direction=[edi+4C]
npc.flags=[edi+50]
npc.DisplayL=[edi+54]
npc.displayU=[edi+58]
npc.displayR=[edi+5C]
npc.displayD=[edi+60]
npc.frametimer=[edi+64]
npc.framenum=[edi+68]
npc.objecttimer=[edi+6C]
npc.directive=[edi+70]
npc.scriptstate=[edi+74]
npc.scripttimer=[edi+78]
npc.hitrectl=[edi+7C]
npc.hitrectU=[edi+80]
npc.hitrectR=[edi+84]
npc.hitrectD=[edi+88]
npc.HitTrue=[edi+9C]
npc.DamageTaken=[edi+A0]
npc.Damage=[edi+A4]
npc.parent=[edi+A8]

BulletArray=499C98
BulletSize=80
NumBullet=40
bullet.collision=[edi]
bullet.shotID=[edi+4]
bullet.inuse=[edi+C]
bullet.x=[edi+10]
bullet.y=[edi+14]
bullet.movex=[edi+18]
bullet.movey=[edi+1C]
bullet.wassetup=[edi+28]
bullet.frametimer=[edi+30]
bullet.framenum=[edi+34]
bullet.direction=[edi+38]
bullet.displayl=[edi+3C]
bullet.displayu=[edi+40]
bullet.displayr=[edi+44]
bullet.displayd=[edi+48]
bullet.distance=[edi+4C]
bullet.maxdistance=[edi+54]
bullet.damage=[edi+58]
bullet.numImpacts=[edi+5C]

EffectArray=49BCA8
EffectSize=44
effect.inuse=[edi]
effect.ID=[edi+4]
effect.mode=[edi+8]
effect.x=[edi+C]
effect.y=[edi+10]
effect.movex=[edi+14]
effect.movey=[edi+18]
effect.wasinit=[edi+1C]
effect.unused=[edi+20]
effect.frameID=[edi+24]
effect.frametimer=[edi+28]
effect.xoffset=[edi+2C]
effect.yoffset=[edi+30]
effect.displayl=[edi+34]
effect.displayU=[edi+38]
effect.displayR=[edi+3C]
effect.displayD=[edi+40]

CreateNPC=46EFD0
CreateBlast=40EA70
CreateExplosion=46F150
CreateExplosions=46F200
CreateXp=46F2B0

Bullet01=404160
Bullet02=4043F0
Bullet04=4047B0
Bullet07=404B30
Bullet0A=405120
Bullet0D=4055A0
Bullet10=405D80
Bullet13=405F30
Bullet14=406190
Bullet15=4064D0
Bullet19=406BB0
Bullet1A=406E60
Bullet1B=4075E0
Bullet17=4075E0
Bullet18=4078A0
Bullet1C=407910
Bullet1F=408080
Bullet22=408230
CreateBullet=403F80
CountAllShots=403C40
CountSpecificShot=403CB0
CountSpecificWeapon=403D10

Effect01=409680
Effect02=409880
Effect03=409B80
Effect04=409C70
Effect05=409E00
Effect06=409F60
Effect07=40A120
Effect08=40A1B0
Effect09=40A280
Effect0A=40A3F0
Effect0B=40A5F0
Effect0F=40A8F0
Effect10=40A9E0
Effect11=40AAA0
CreateEffect=40AC90

RenderGraphics=40C3C0
RenderNumber=40F380
GiveXP=4196F0
TakeDamage=419910
EntityCollisSolid=418C20
EntityCollis=418B10

Weapon1=41DBD0
Weapon2=41DE60
Weapon3=41E110
Weapon4=41E3D0
Weapon5=41E7B0
Weapon7A=41EFD0
Weapon7B=41F280
Weapon9=41F580
WeaponC=41F710
WeaponD=41FA10
AddAmmo=402020
SubAmmo=401FA0

PlaySound=420640
PlayMusic=420EE0

RunEvent=421990
CheckFlag=40E930
ASCIItoNumber=421900
Random=40F350

NPC000=426530
NPC001=4265B0
NPC002=426AF0
NPC003=426FD0
NPC004=427040
NPC005=427480
NPC006=427820
NPC007=427C60
NPC008=427F00
NPC009=428260
NPC010=428540
NPC011=4289B0
NPC012=428B10
NPC013=429940
NPC014=429A30
NPC015=429BF0
NPC016=429E00
NPC017=42A0B0
NPC018=42A360
NPC019=42A490
NPC020=42A830
NPC021=42A940
NPC022=42A9C0
NPC023=42AA70
NPC024=42ABD0
NPC025=42B280
NPC026=42B5E0
NPC027=42BA90
NPC028=42BAE0
NPC029=42C1A0
NPC030=42C320
NPC031=42C4C0
NPC032=42CA10
NPC033=42CAC0
NPC034=42CC20
NPC035=42CCB0
NPC036=42D010
NPC037=42D760
NPC038=42D810
NPC039=42D960
NPC040=42D9F0
NPC041=42DE00
NPC042=42DE70
NPC043=42E9F0
NPC044=42EAB0
NPC045=42F060
NPC046=42F320
NPC047=42F3F0
NPC048=42F780
NPC049=42F9E0
NPC050=42FEC0
NPC051=4301B0
NPC052=430780
NPC053=4307D0
NPC054=430B00
NPC055=430EB0
NPC056=4311D0
NPC057=4315E0
NPC058=431C20
NPC059=4321F0
NPC060=432460
NPC061=432B50
NPC062=4334C0
NPC063=4336C0
NPC064=433C00
NPC065=433FC0
NPC066=4342B0
NPC067=4345E0
NPC068=434D10
NPC069=4355F0
NPC070=435AB0
NPC071=435BA0
NPC072=435DE0
NPC073=435FC0
NPC074=436180
NPC075=436540
NPC076=436650
NPC077=436690
NPC078=4367E0
NPC079=436870
NPC080=436AE0
NPC081=4370F0
NPC082=4375E0
NPC083=437D90
NPC084=438250
NPC085=4383D0
NPC086=438590
NPC087=438850
NPC088=438B10
NPC089=439580
NPC090=439B00
NPC091=439B50
NPC092=439BC0
NPC093=439DC0
NPC094=43A220
NPC095=43A680
NPC096=43AAF0
NPC097=43AD10
NPC098=43AF20
NPC099=43B140
NPC100=43B350
NPC101=43B410
NPC102=43B4E0
NPC103=43B5F0
NPC104=43B7F0
NPC105=43BD00
NPC106=43BDB0
NPC107=43BE00
NPC108=43C4B0
NPC109=43C610
NPC110=43C8E0
NPC111=43CDE0
NPC112=43D0A0
NPC113=43D320
NPC114=43D860
NPC115=43DAE0
NPC116=43E190
NPC117=43E1E0
NPC118=43E9B0
NPC119=43F230
NPC120=43F280
NPC121=43F310
NPC122=43F4A0
NPC123=43FC70
NPC124=43FEF0
NPC125=4400D0
NPC126=4401F0
NPC127=440760
NPC128=4408B0
NPC129=440CF0
NPC130=441000
NPC131=441360
NPC132=441440
NPC133=4419B0
NPC134=441B20
NPC135=441EC0
NPC136=442340
NPC137=442540
NPC138=442590
NPC139=442790
NPC140=442BF0
NPC141=443AC0
NPC142=443EC0
NPC143=444190
NPC144=444230
NPC145=444620
NPC146=444780
NPC147=444930
NPC148=445050
NPC149=445170
NPC150=445660
NPC151=445E30
NPC152=445FA0
NPC153=446020
NPC154=446500
NPC155=446710
NPC156=446B60
NPC157=446CA0
NPC158=447810
NPC159=4474C0
NPC160=447700
NPC161=447CB0
NPC162=447E90
NPC163=4482A0
NPC164=448410
NPC165=448580
NPC166=4486E0
NPC167=4487F0
NPC168=448A10
NPC169=448BE0
NPC170=4495A0
NPC171=4498C0
NPC172=449C10
NPC173=449D70
NPC174=44A3C0
NPC175=44A610
NPC176=44A7D0
NPC177=44ABB0
NPC178=44AEE0
NPC179=44B080
NPC180=44B210
NPC181=44BE10
NPC182=44C220
NPC183=44C630
NPC184=44C7A0
NPC185=44CA60
NPC186=44CBE0
NPC187=44CDB0
NPC188=44D070
NPC189=44D3A0
NPC190=44D5E0
NPC191=44D740
NPC192=44DA00
NPC193=44DE20
NPC194=44DEA0
NPC195=44DF10
NPC196=44DF60
NPC197=44E020
NPC198=44E260
NPC199=44E400
NPC200=44E5F0
NPC201=44EC40
NPC202=44ECE0
NPC203=44EE40
NPC204=44F1F0
NPC205=44F3E0
NPC206=44F6D0
NPC207=44FB40
NPC208=44FCB0
NPC209=450280
NPC210=450400
NPC211=450760
NPC212=450810
NPC213=450BF0
NPC214=4512A0
NPC215=451430
NPC216=4517F0
NPC217=451840
NPC218=451CA0
NPC219=451DA0
NPC220=451E90
NPC221=452000
NPC222=452470
NPC223=4524E0
NPC224=452700
NPC225=4528D0
NPC226=452A50
NPC227=452D10
NPC228=452D60
NPC229=4530D0
NPC230=453190
NPC231=453260
NPC232=4536F0
NPC233=4539B0
NPC234=453E60
NPC235=453F20
NPC236=454310
NPC237=4548B0
NPC238=454A00
NPC239=454DF0
NPC240=454F00
NPC241=455370
NPC242=455710
NPC243=455A10
NPC244=455AB0
NPC245=455C10
NPC246=455E00
NPC247=456110
NPC248=456F50
NPC249=4570B0
NPC250=457180
NPC251=457470
NPC252=457570
NPC253=4579D0
NPC254=457B00
NPC255=457D70
NPC256=458010
NPC257=458360
NPC258=4585A0
NPC259=4585F0
NPC260=458810
NPC261=458A70
NPC262=458C30
NPC263=458DF0
NPC264=459950
NPC265=459B30
NPC266=459C00
NPC267=459D80
NPC268=45B3D0
NPC269=45BCB0
NPC270=45BF10
NPC271=45C230
NPC272=45C500
NPC273=45C5A0
NPC274=45C750
NPC275=45CC80
NPC276=45CEA0
NPC277=45D780
NPC278=45D930
NPC279=45DCF0
NPC280=45E110
NPC281=45E360
NPC282=45E4C0
NPC283=45E950
NPC284=45F910
NPC285=460910
NPC286=460AE0
NPC287=460BB0
NPC288=460D70
NPC289=4610D0
NPC290=4614A0
NPC291=461800
NPC292=4618B0
NPC293=4618C0
NPC294=4619E0
NPC295=461B90
NPC296=461E40
NPC297=461FD0
NPC298=462050
NPC299=4623D0
NPC300=4624E0
NPC301=4625A0
NPC302=462890
NPC303=462AF0
NPC304=462C80
NPC305=462E00
NPC306=462F60
NPC307=4630F0
NPC308=4632B0
NPC309=463710
NPC310=463AC0
NPC311=464090
NPC312=464740
NPC313=464BB0
NPC314=465CC0
NPC315=465F60
NPC316=4664B0
NPC317=466790
NPC318=466B80
NPC319=466E50
NPC320=4670C0
NPC321=4673F0
NPC322=4676D0
NPC323=467C60
NPC324=467F40
NPC325=467FE0
NPC326=468230
NPC327=468830
NPC328=468990
NPC329=4689E0
NPC330=468A90
NPC331=468D70
NPC332=468F50
NPC333=469140
NPC334=469290
NPC335=469430
NPC336=469610
NPC337=4696B0
NPC338=469800
NPC339=469AA0
NPC340=469B40
NPC341=46B240
NPC342=46B340
NPC343=46BD80
NPC344=46BE10
NPC345=46BF00
NPC346=46C1D0
NPC347=46C710
NPC348=46C9B0
NPC349=46CAC0
NPC350=46CB50
NPC351=46D340
NPC352=46D5D0
NPC353=46DBE0
NPC354=46E110
NPC355=46E280
NPC356=46E480
NPC357=46E730
NPC358=46E870
NPC359=46E9E0
NPC360=46EA90
NPC363=4772F0
NPC365=47E6F0
NPC366=47A8A0
NPC368=474400
NPC369=47C820