ROM map (Boktai 1)

From Boktai Hacking Wiki
Revision as of 12:50, 21 September 2024 by Raphi (talk | contribs)

This is the ROM map for Boktai 1 (U).

Address Description
0x80001e0 void Sys_InterruptHandler(void)

Will be copied to and executed from IWRAM at 0x03001d40

0x8000318 void main(void)
0x8000b68 int Mem_FillArray_Scripted(void)
0x8000c54 int rand_scripted(void)

Use with control 0xb745; u16 0x3469; keyword 'p'; i23 UPPER_BOUND from bytecode

0x8005788 void Textbox_CloseChoices_Scripted(void)
0x8005a10 void Textbox_Confirm_Scripted(int param_1)
0x80123f0 undefined Sensor_GetBars(void)
0x80413f8 bool Map_IsAreaCleared(uint area_id)
0x8044da0 void Textbox_CloseBox_Scripted(void)
0x804533c int Inventory_GiveItem(int item_id, int amount)
0x8045424 int Inventory_GiveItem_Scripted(void)
0x8045560 int Inventory_GetAmount(int item_id)
0x80455b0 int Inventory_GetAmount_Scripted(int item_id)
0x8045638 undefined Inventory_HasGrenadeType(void)
0x8045690 void Inventory_GiveGunPart(int gun_part_type, uint gun_part_id)
0x80457c0 undefined Inventory_HasGunPart(undefined4 part_type, undefined4 part_index)
0x8127120 void Map_AddEvent(Event * event)
0x8127e64 undefined Map_SpawnChest_Scripted(void)

control 0xb745 u16 0xddcf

0x812f8f0 void Textbox_Open(byte * pc)
0x812fa48 undefined Textbox_Open_Scripted(void)

ctrl_0xb745(0x1c64)

0x812fbfc int Textbox_SetVar(int index, int value)
0x812fc20 void Textbox_SetVar_Scripted(void)

ctrl_0xb745(0xab3c)

0x81bf3ec void Math_WorldSpaceToViewSpace(short * view, short * world)
0x81bf48c void Math_WorldSpaceToScreenSpace(short * screen, short * world)
0x81c4b90 void * malloc(int bytes)
0x81c4c00 void free(void * ptr)
0x81c4c7c void memset32(int * destination, int value, int word_count)
0x81c4ca0 void bzero(void * ptr, uint bytes)
0x81c4d0c void memset(byte * destination, byte value, int byte_count)
0x81c4d84 void memcpy_slow(byte * destination, byte * source, int byte_count)
0x81c4dcc void memcpy_dma(void * source, void * dest, int count)
0x81c4e38 void Actor_Install(Actor * param_1)
0x81c4e58 void Actor_Uninstall(Actor * * param_1)
0x81c4e80 Actor * Actor_Create(undefined1 type, undefined4 size)
0x81c4ec8 undefined Actor_SetCallbacks(Actor * actor, ActionOfPtr * onFrame, ActionOfPtr * onDestroy)
0x81c4ed0 void Actor_RunAll(void)
0x81c4f44 undefined Actor_Destroy(Actor * actor)
0x81c510c void SolarSensor_Clock(void)
0x81c55b0 void * Mft_bsearch(uint needle, undefined4 param_2, ushort file_id_low, undefined4 param_4, undefined4 param_5)
0x81c55ec void * Mft_FileGetItem(int * file_ptr, uint file_id_high, short item_id, uint file_id_low)
0x81c5644 void * Mft_LookupFile(uint id, mft_index * array, int start, int size)
0x81c567c void * Mft_GetItem(int mft_key, int item_id)
0x81c57c8 byte * Script_ReadLength(byte * pc, uint * length)

Returns pc after all the length bytes, the length itself is stored in *length.

0x81c584c byte * Script_GetValueCore(byte * pc, uint * param_2, int * out_value)
0x81c59fc void * Script_SetCurrentArgs(void * argp, undefined4 param_2)
0x81c5a74 undefined Script_StoreVariable(void)
0x81c5ac4 byte * Script_SeekToKeyword(char keyword)
0x81c5b58 int Script_GetValueAndUpdatePC(byte * pc)
0x81c5c14 short Script_ExpectStringRef(byte * pc)

Returns the value of the `string-ref` instruction that begins at `pc`.

0x81c5c70 byte * Script_GetPc(void)
0x81c5c98 int Script_GetValue(void)
0x81c5d00 int Script_GetKeywordValue(char keyword, int default)
0x81c5e28 byte * Script_LookupById'(int script_id, undefined * param_2)
0x81c5e64 byte * Script_LookupById(int script_id, undefined4 param_2)
0x81c5e74 int Script_ExecById(int script_id, void * argp)
0x81c5f04 script_index * Script_bsearch(script_index * index_start, int script_id, int index_size)
0x81c5f40 char * Textbox_LookupString(int id)
0x81c609c int Script_ExecBlock(byte * pc, void * argp, undefined4 param_3)
0x81c6128 int Script_ExecByPointer(undefined4 pc, void * argp)
0x81c614c int Script_Exec(byte * pc, void * argp, int param_3)
0x81c6310 undefined Script_LoadPointer(int param_1, int param_2, int param_3, int param_4)
0x81c6464 undefined Script_StorePointerCore(void)
0x81c6508 undefined Script_StorePointer(void)
0x81c68b8 int Script_Ctrl_if(byte * pc)
0x81c68d4 int Script_Ctrl_switch(byte * pc)
0x81c6950 void Script_Ctrl_return(void)
0x81c6a64 undefined Script_RunOperator(void)
0x81c6b88 undefined Script_RunExpression(void)
0x81cbea0 undefined Math_InitRngTable(void)
0x81ce8e8 void Map_CallInitScript_Scripted(void)

ctrl_0xc8bb

0x81cea04 undefined Script_Ctrl_d4cb(void)
0x81cfac8 void Camera_SetBounds(int minX, int minY, int maxX, int maxY)
0x81cfb84 void Camera_SetBounds_Scripted(void)

ctrl_0xb745(0x63b)

0x81d02c4 int Camera_Unlock(void)
0x81d095c byte * Script_GetPcSlow(void)

Why does this function exist?

0x81d0ad0 void SetTimeout_Update(SetTimeoutActor * actor)
0x81d0b40 undefined SetTimeout_Destroy(void)
0x81d0b44 SetTimeoutActor * SetTimeout(int callback, int * args, int timeout)
0x81d0bc8 undefined SetTimeout_Scripted(void)
0x81d83c0 void Mem_CpuFastSet(void * source, void * dest, uint wordcount)
0x81d83c4 void Mem_CpuSet(void * source, void * destination, uint count)
0x81d83c8 int Math_DivArm(int divisor, int dividend)
0x81d83cc int Math_ModArm(int divisor, int dividend)
0x81d83d4 void Mem_LZ77_Decompress8Bit(void * source, void * destination)
0x81d83d8 void Sound_BiasLow(void)
0x81d83e0 undefined Sound_BiasHigh(void)
0x81d83e8 uint Math_Sqrt(uint x)
0x81d83ec void Sys_WaitForVBlank(void)
0x81d90f8 undefined4 CallParam2(void * param_1, ActionOfPtr * fn)
0x82cce44 undefined switchD(void)
0x8584c00 Engine call table (null-terminated array of struct { void(*)(int r0) fn; int id; })
0x85b02c4 mft_header[] - Master file table