Difference between revisions of "Crystal Beans From Dungeon Explorer:ROM map"

From Data Crystal
Jump to navigation Jump to search
(Added core engine info)
m
 
(9 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
{{rommap|game=Crystal Beans From Dungeon Explorer}}
 
{{rommap|game=Crystal Beans From Dungeon Explorer}}
 
<!--
 
* <tt>- ()</tt> =
 
-->
 
  
 
==Overview==
 
==Overview==
This present the layout of the ROM. Data with unknown function is omitted. The start of asm code whose function is known is mentioned under the code block definition.
+
This present the layout of the ROM. The start of asm code whose function is known is mentioned under the code block definition.
  
 
==Core engine==
 
==Core engine==
* <tt>000000-007E2E (32302)</tt> = Core engine asm code
+
* <tt>000000-00FFFF (65536)</tt> = [[Crystal Beans From Dungeon Explorer:Core engine ROM map|Core engine code and data]]
** <tt>000000</tt> = IRQ handler
+
 
*** returns carry set if mouse is plugged
+
==Data bank 1==
** <tt>000048</tt> = BRK handler
+
* <tt>010000-010663 (1636)</tt> = Unknown data (bytes and 16-bits pointers)
** <tt>000060</tt> = Party:PreInitMembers()
+
* <tt>010664-0106FD (154)</tt> = PCSpriteAnim? (16-bits pointers)
** <tt>000093</tt> = Party:InitActiveMembers()
+
* <tt>0106FE-010705 (8)</tt> = [[Crystal Beans From Dungeon Explorer:Sprite Animation|PCAnimNormal?]]
** <tt>0000B8</tt> = Party:InitMembers()
+
* <tt>010706-01070D (8)</tt> = [[Crystal Beans From Dungeon Explorer:Sprite Animation|PCAnimIdle?]]
** <tt>0000DC</tt> = ClearShadowRAM()
+
* <tt>01070E-01070E (1)</tt> = PCAnimNul? (0)
** <tt>000103</tt> = CharInfoArea:InitTextTilemapVRAM()
+
* <tt>01070F-010FCB (2237)</tt> = Unknown data (bytes and 16-bits pointers)
** <tt>00011F</tt> = InitOAMData()
+
* <tt>010FCC-010FEB (32)</tt> = NPCSpriteAnim? (16-bits pointers)
** <tt>0002BC</tt> = HandleMapObjectsEvents?()
+
* <tt>010FEC-011043 (88)</tt> = [[Crystal Beans From Dungeon Explorer:Sprite Animation|NPC sprite animations]]
** <tt>0002E9</tt> = HandleEvents?()
+
* <tt>011044-01FFFF (61372)</tt> = Unknown data (bytes and 16-bits pointers)
** <tt>000551</tt> = Map:ShowVisibleObjs_S(byte levelIndex<$68>, byte RoomIndex<$67>)
+
 
** <tt>000FB0</tt> = HandleDemonGutsBossDlg?()
+
==Main game engine==
** <tt>001A6B</tt> = HandleItemPicked?(byte objOfs<X>)
+
* <tt>020000-2EE5D (61021)</tt> = [[Crystal Beans From Dungeon Explorer:Main game engine ROM map|Main game engine code and data]]
** <tt>001A9A</tt> = CallPickedItemHandler(byte item<A>, byte objOfs<X>)
+
 
** <tt>001AAB</tt> = Obj:IntBoosterPicked()
+
==Map data==
*** This item was removed from finished game
+
* <tt>02EE5E-03E395 (62776)</tt> = [[Crystal Beans From Dungeon Explorer:Map data ROM map|Map data]] (includes place name strings)
** <tt>001AD2</tt> = Obj:AtkBoosterPicked()
 
*** This item was removed from finished game
 
** <tt>001AF9</tt> = Obj:BootsPicked(byte objOfs<X>)
 
** <tt>001B20</tt> = Obj:StrBoosterPicked()
 
*** This item was removed from finished game
 
** <tt>001B47</tt> = Obj:BigHeartPicked(byte objOfs<X>)
 
** <tt>001B5E</tt> = Obj:BeanPicked(byte objOfs<X>)
 
** <tt>001B8C</tt> = Obj:WhiteJarPicked(byte objOfs<X>)
 
** <tt>001BAC</tt> = Obj:BlackSkullPicked(byte objOfs<X>)
 
** <tt>001BCC</tt> = Obj:ScareEnemiesItemPicked()
 
*** This item was removed from finished game
 
** <tt>001BED</tt> = Obj:ConfuseEnemiesItemPicked()
 
*** This item was removed from finished game
 
** <tt>001C0E</tt> = Obj:MirrorPicked(byte objOfs<X>)
 
** <tt>001C28</tt> = Obj:LittleHeartPicked(byte objOfs<X>)
 
** <tt>001C54</tt> = Obj:CapePicked(byte objOfs<X>)
 
** <tt>001C80</tt> = Obj:UnkEffectOnEnemiesItemPicked()
 
*** This item was removed from finished game
 
** <tt>001CBE</tt> = Obj:RemoveItemAndPlaySound(byte objOfx<X>)
 
** <tt>001CD8</tt> = SetLevelFlag_S(byte bitIndex<A>, byte levelIndex<$68>)
 
** <tt>001D64</tt> = WaitForPlayerToPickGem()
 
** <tt>001DD2</tt> = LevelUpStat(byte statIndex<$DE>, byte memberIndex<$133A>)
 
** <tt>0021B3</tt> = SetPalette(byte palIndex<X>)
 
** <tt>002692</tt> = HandleThousandValleysBoss1Dlg?()
 
** <tt>002B0A</tt> = HandleThousandValleysBoss2Dlg?()
 
** <tt>0033A2</tt> = HandleShoalTunnelBossDlg?()
 
** <tt>003A0D</tt> = HandleDaimonHiddenIslandBoss1Dlg?()
 
** <tt>0042EE</tt> = HandleDaimonHiddenIslandBoss3Dlg?()
 
** <tt>004D2A</tt> = HandleGarnetCastleBoss2DlgAfter?()
 
** <tt>005083</tt> = HandleGarnetCastleBoss2DlgBefore?()
 
** <tt>00542C</tt> = HandleBloodstoneCastleBoss2DlgAfter?()
 
** <tt>005776</tt> = HandleBloodstoneCastleBoss2DlgBefore?()
 
** <tt>007659</tt> = Dlg:Code22-Subcode03Handler()
 
** <tt>0076BF</tt> = SetLevelUpRoom()
 
** <tt>007722</tt> = Dlg:Code22-Subcode04Handler()
 
** <tt>007735</tt> = Dlg:Code22-Subcode05Handler()
 
** <tt>007761</tt> = Dlg:Code22-Subcode06Handler()
 
** <tt>0077D5</tt> = ThousandValleysGasMaskCheck()
 
** <tt>0077F4</tt> = Dlg:Code22-Subcode08Handler()
 
** <tt>007859</tt> = Dlg:Code22-Subcode09Handler()
 
** <tt>007867</tt> = FirstDialogWithTheKing()
 
** <tt>007885</tt> = LabyrinthMoonlightLampCheck()
 
** <tt>0078D8</tt> = Dlg:Code22-Subcode0BHandler()
 
** <tt>0078E9</tt> = Dlg:Code22-Subcode0DHandler()
 
** <tt>007905</tt> = Dlg:Code22-Subcode11Handler()
 
** <tt>00790F</tt> = Dlg:Code22-Subcode12Handler()
 
*** Remove 5 black skulls from current player or change string if he doesn't have enough
 
** <tt>007935</tt> = Dlg:Code22-Subcode13Handler()
 
** <tt>007968</tt> = HandleThiefJoiningRoomDlg()
 
** <tt>007987</tt> = HandleRobotBrainRoomDlg()
 
** <tt>0079A9</tt> = Dlg:Code22-Subcode19Handler()
 
** <tt>0079EA</tt> = WorldMap:SelectPlace()
 
** <tt>007B97</tt> = Dlg:LoadChosenPlaceNamePtr()
 
** <tt>007B9F</tt> = Dlg:LoadCurPlaceNamePtr()
 
** <tt>007BF5</tt> = byte <X> WorldMap:HandleChoosePlaceInput()
 
* <tt>008000- ()</tt> = Core engine asm code and data
 
** <tt>008000</tt> = ABORT handler
 
** <tt>008375</tt> = CharInfoArea:SetFrame()
 
** <tt>0083CC-0083E5 (26)</tt> = [[Super Nintendo:Direct HDMA|Direct HDMA]] table for initial BG1HOFS data
 
** <tt>0083E6-0083EE (9)</tt> = [[Super Nintendo:Direct HDMA|Direct HDMA]] table for initial BGMODE data
 
** <tt>0083EF-0083FE (16)</tt> = [[Super Nintendo:Direct HDMA|Direct HDMA]] table for initial BG1SC data
 
** <tt>0083FF-008409 (11)</tt> = [[Super Nintendo:Direct HDMA|Direct HDMA]] table for initial BG12NBA data
 
** <tt>00840A-008419 (16)</tt> = [[Super Nintendo:Indirect HDMA|Indirect HDMA]] table for TM data
 
** <tt>00841A-008429 (16)</tt> = [[Super Nintendo:Indirect HDMA|Indirect HDMA]] table for CGADSUB data
 
** <tt>00842A-008436 (13)</tt> = [[Super Nintendo:Indirect HDMA|Indirect HDMA]] table for BG2HOFS data
 
** <tt>008437</tt> = MainNMIHandlerInitVars()
 
** <tt>0084AD</tt> = WriteOAMAndUpdateBG2ScrollData()
 
** <tt>0084EA</tt> = EnableInterrupts()
 
** <tt>0084F4</tt> = DisableInterruptsAndStopDMA()
 
** <tt>00850B</tt> = CopyPlayerButtonsHeld()
 
** <tt>00853D</tt> = MainNMIHandler()
 
** <tt>0086DD</tt> = ValidatePadData(byte padIndex<X>)
 
** <tt>00870D</tt> = CopyPlayerButtonsHeldSleep_L(byte numFrameToSleep<A>)
 
** <tt>008711</tt> = CopyPlayerButtonsHeldSleep_S(byte numFrameToSleep<A>)
 
** <tt>00873A</tt> = Obj:SetOAM?_S()
 
** <tt>00881F-00886E (80)</tt> = Pointers used by Obj:SetOAM?_S()
 
** <tt>0088DA-0089CE (244)</tt> = Data used by Obj:SetOAM?_S()
 
** <tt>0089CF</tt> = ShortSwitch(byte caseIndex<$0C35>)
 
*** data following the JSR are short pointers to functions
 
** <tt>0089E9</tt> = LongSwitch(byte caseIndex<$0C35>)
 
*** data following the JSR are long pointers to functions
 
** <tt>008A15</tt> = SPC:ClearLastCommandSent()
 
** <tt>008A19</tt> = SPC:SendCommand$F2()
 
** <tt>008A2F</tt> = SPC:SendCommand?()
 
** <tt>008A67-008B00 (154)</tt> = Offset of the character sprite's first tile in the movement sprite graphics (77 words)
 
** <tt>008B01-008B08 (8)</tt> = VRAM addresses for the character sprite graphics
 
** <tt>008B09</tt> = Obj:SetOAM?_L()
 
** <tt>008B0D-008B2C (32)</tt> = OAM offsets?
 
** <tt>008B2D-008B34 (8)</tt> = Member:SpriteFirstTile (words)
 
** <tt>008B35-008B4A (22)</tt> = Byte [[Crystal Beans From Dungeon Explorer:Char Stat List|char stat list]] for Member:SpritePalettes?
 
** <tt>008B4B-008B5A (16)</tt> = Unknown data
 
** <tt>008B5B-008BA4 (74)</tt> = Some struct list terminated by 0xFFFF related to maps
 
** <tt>008BA5</tt> = Map:ShowVisibleObjs_L()
 
** <tt>008BA9</tt> = Dlg:GetGameFlag_L()
 
** <tt>008C0F-008C24 (22)</tt> = Byte [[Crystal Beans From Dungeon Explorer:Char Stat List|char stat list]] for CharInfoArea:CharNameTileLine
 
** <tt>008C36-008C5D (40)</tt> = CharInfoArea:?OrgX[8][5] (indexed by [NumPlayers][MemberIndex])
 
** <tt>008C5E-008C67 (10)</tt> = CharInfoArea:LivesIconXPositions[10]
 
** <tt>008C68-008C71 (10)</tt> = CharInfoArea:MainWindowPos[5] (table of pointers to [[Crystal Beans From Dungeon Explorer:PlayerWindowPos|PlayerWindowPos]] struct list
 
** <tt>008C72-008C76 (5)</tt> = [[Crystal Beans From Dungeon Explorer:PlayerWindowPos|PlayerWindowPos]] struct list for 1 player primary info window
 
** <tt>008C77-008C7E (8)</tt> = [[Crystal Beans From Dungeon Explorer:PlayerWindowPos|PlayerWindowPos]] struct list for 2 players primary and secondary info windows
 
** <tt>008C7F-008C89 (11)</tt> = [[Crystal Beans From Dungeon Explorer:PlayerWindowPos|PlayerWindowPos]] struct list for 3 players primary and secondary info windows
 
** <tt>008C8A-008C97 (14)</tt> = [[Crystal Beans From Dungeon Explorer:PlayerWindowPos|PlayerWindowPos]] struct list for 4? players primary and secondary info windows
 
** <tt>008C98-008CA8 (17)</tt> = [[Crystal Beans From Dungeon Explorer:PlayerWindowPos|PlayerWindowPos]] struct list for 5? players primary and secondary info windows
 
** <tt>008CA9-008CAD (5)</tt> = [[Crystal Beans From Dungeon Explorer:PlayerWindowPos|PlayerWindowPos]] struct list for 1 player secondary info window
 
** <tt>008CAE-008CC6 (25)</tt> = Tile numbers composing the empty info window
 
** <tt>008CE0-008CE9 (10)</tt> = CharInfoArea:SecondaryWindowPos[5] (table of pointers to [[Crystal Beans From Dungeon Explorer:PlayerWindowPos|PlayerWindowPos]] struct list
 
** <tt>008CEF-008CF8 (10)</tt> = Players:InfoWindowStartCol[5] (table of pointers to byte arrays)
 
** <tt>008D08-008D09 (2)</tt> = PowersOfTen[2] (used to draw numbers in the info windows)
 
** <tt>008D0A-008D10 (7)</tt> = CharInfoArea:LevelWindowStringIndices[7]
 
** <tt>008D11-008D29 (25)</tt> = CharInfoArea:SecondaryWindowOrgX[5][5] (indexed by [NumPlayers][MemberIndex])
 
** <tt>008D2A-008D42 (25)</tt> = CharInfoArea:MainWindowOrgX[5][5] (indexed by [NumPlayers][MemberIndex])
 
** <tt>008D43-008D4B (8)</tt> = CharInfoArea:StatBarChars[8]
 
** <tt>008D54-008D91 (62)</tt> = CharInfoArea:Strings[31] (table of pointers to [[Crystal Beans From Dungeon Explorer:CharInfoArea Strings|CharInfoArea:Strings]]
 
** <tt>008D92-008E93 (258)</tt> = [[Crystal Beans From Dungeon Explorer:CharInfoArea Strings|CharInfoArea:Strings]]
 
** <tt>008E94-008E98 ()</tt> = CharInfoArea:StartMenuWindowNormalStringIndices[5]
 
** <tt>008E99-008E9D ()</tt> = CharInfoArea:StartMenuWindowSelectedStringIndices[5]
 
** <tt>008E9E-008EA0 ()</tt> = CharInfoArea:MenuWindowNormalStringIndices[3]
 
** <tt>008EA1-008EA3 ()</tt> = CharInfoArea:MenuWindowSelectedStringIndices[3]
 
** <tt>0094D9</tt> = UpdateJoypads()
 
** <tt>0095A1</tt> = ConnectCheck()
 
** <tt>009668</tt> = PringObjDlg?(byte btnsToAccept<A>, byte secIndex<$E3>, byte strIndex<$E2>)
 
** <tt>0096CE</tt> = ClearPlayerButtonPresses_S()
 
** <tt>0096D3</tt> = Dlg:GetCurrentPlayer_S()
 
** <tt>0096D9</tt> = Dlg:PutString_S?(byte secIndex<$E3>, byte strIndex<$E2>)
 
** <tt>0096DE</tt> = Dlg:ExecPrintHandler_S()
 
** <tt>0096E3</tt> = Dlg:AskYesNo_S()
 
** <tt>0096E8</tt> = Dlg:AskNumPlayer_S()
 
** <tt>0096ED</tt> = Dlg:PrepPrint_S(byte secIndex<$E3>, byte strIndex<$E2>)
 
** <tt>0096F2</tt> = Dlg:Init/ClearWindow_S?()
 
** <tt>0096F7</tt> = Dlg:GetNPCGameFlag_S()
 
** <tt>00970C</tt> = Dlg:LoadStrPtr_S()
 
** <tt>009716</tt> = Dlg:OutputCharLevel_S()
 
** <tt>00971B</tt> = Level:HandleSpecialActionRoom_S?()
 
** <tt>009725</tt> = CallSpecialRoomHandler()
 
** <tt>00972F-009738 (10)</tt> = Dlg:Digits (bytes, used to print numbers)
 
** <tt>009739-00973C (4)</tt> = Dlg:TaChi (words, used with table code <CMHP>)
 
** <tt>009740-009781 (66)</tt> = [[Crystal Beans From Dungeon Explorer:CharNamesStrPtr|Character names string pointer structs]]
 
** <tt>009782-0097CD (76)</tt> = Character names
 
** <tt>0097E6</tt> = Dlg:Code22CallSubcodeHandler()
 
** <tt>0097ED-009852 (102)</tt> = Function pointers to dialog code 22 subcode handlers
 
** <tt>009853</tt> = Dlg:Code22SubcodeEOS()
 
** <tt>00985A</tt> = Dlg:OutputCharLevel_L()
 
** <tt>009861-009862 (2)</tt> = Pointer to Dlg:OutputCharLevel_S (used Dlg:OutputCharLevel_L)
 
** <tt>009863-009864 (2)</tt> = Dlg:YesNoWndStrPos
 
** <tt>009869-00986B (3)</tt> = Pointer and length of Yes/No question string
 
** <tt>00986C-00987D (18)</tt> = Yes/No question string
 
** <tt>009884-009886 (3)</tt> = Pointer and length of number of players question string
 
** <tt>009887-00989E (24)</tt> = Number of players question string
 
** <tt>0098A2-0098A9 (8)</tt> = ByteBitMask[8]
 
** <tt>0098AA</tt> = Dlg:Init/ClearWindow_L()
 
** <tt>009946-00994F (10)</tt> = Dlg:PowersOf10 (used to display level number)
 
** <tt>00996A-009979 (16)</tt> = Table of function pointers to special room handlers (words)
 
** <tt>009990-009997 (8)</tt> = ByteBitMask[8]
 
** <tt>009D7A</tt> = ZeroPlayerStats(byte playerNum<Y>)
 
** <tt>009EBE</tt> = Obj:Clear_S(byte objOfs<X>)
 
** <tt>009F13</tt> = byte <Y>, bool failed<c> FindFreeObjSlotInSlice?(byte sliceIndex<A>)
 
** <tt>009F2F-009F74 (70)</tt> = Obj:StartObjIndex/EndObjIndex[35] ([[Crystal Beans From Dungeon Explorer:Stat Pair|stat pairs]], slice definitions used in function above)
 
** <tt>009F75</tt> = byte <Y>, bool failed<c> FindFreeObjSlot?(byte startObjOfs<$DC>, byte endObjOfs<$DD>)
 
  
 
==Dialog data==
 
==Dialog data==
Line 191: Line 29:
 
* <tt>03E79E-04649A (31997)</tt> = Dialog strings
 
* <tt>03E79E-04649A (31997)</tt> = Dialog strings
 
* <tt>04649B-04FFFA (39776)</tt> = Dialog font graphics (2 bpp planar aka GameBoy format)
 
* <tt>04649B-04FFFA (39776)</tt> = Dialog font graphics (2 bpp planar aka GameBoy format)
 +
* <tt>4FFFB-4FFFF (5)</tt> = Unknown data, doesn't seem to be referenced
  
 
==Character movement sprite graphics==
 
==Character movement sprite graphics==
Line 197: Line 36:
 
* <tt>058000-05BFFF (16384)</tt> = Warrior (4 bpp Snes format)
 
* <tt>058000-05BFFF (16384)</tt> = Warrior (4 bpp Snes format)
 
* <tt>05C000-05FFFF (16384)</tt> = Kage (4 bpp Snes format)
 
* <tt>05C000-05FFFF (16384)</tt> = Kage (4 bpp Snes format)
* <tt>060000-053FFF (16384)</tt> = Robot (4 bpp Snes format)
+
* <tt>060000-063FFF (16384)</tt> = Robot (4 bpp Snes format)
* <tt>064000-057FFF (16384)</tt> = Wizard (4 bpp Snes format)
+
* <tt>064000-067FFF (16384)</tt> = Wizard (4 bpp Snes format)
* <tt>068000-05BFFF (16384)</tt> = Monk (4 bpp Snes format)
+
* <tt>068000-06BFFF (16384)</tt> = Monk (4 bpp Snes format)
* <tt>06C000-05FFFF (16384)</tt> = Dragon (4 bpp Snes format)
+
* <tt>06C000-06FFFF (16384)</tt> = Dragon (4 bpp Snes format)
* <tt>070000-053FFF (16384)</tt> = Fighter (4 bpp Snes format)
+
* <tt>070000-073FFF (16384)</tt> = Fighter (4 bpp Snes format)
* <tt>074000-057FFF (16384)</tt> = Priest (4 bpp Snes format)
+
* <tt>074000-077FFF (16384)</tt> = Priest (4 bpp Snes format)
* <tt>078000-05BFFF (16384)</tt> = Thief (4 bpp Snes format)
+
* <tt>078000-07BFFF (16384)</tt> = Thief (4 bpp Snes format)
* <tt>07C000-05FFFF (16384)</tt> = Witch (4 bpp Snes format)
+
* <tt>07C000-07FFFF (16384)</tt> = Witch (4 bpp Snes format)
 +
 
 +
==Compressed data==
 +
* <tt>080000-11FFFF (655360)</tt> = [[Crystal Beans From Dungeon Explorer:Compressed data ROM map|Compressed data]]
 +
 
 +
==Music engine==
 +
* <tt>120000-145FFF (155648)</tt> = [[Crystal Beans From Dungeon Explorer:Music engine ROM map|Music engine code and data]]
  
==Music==
+
==Cutscene engine==
* <tt>120000-12038E (911)</tt> = Music engine asm code
+
* <tt>146000-17FFFF (237568)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene engine ROM map|Cutscene engine code and data]]
** <tt>120030</tt> = InitAPU?()
 
** <tt>120087</tt> = UploadSong?(byte songIndex<A>, byte numPatterns?<X>, byte <Y>)
 
** <tt>120151</tt> = UploadPattern?(byte patternIndex<A>)
 
** <tt>1201EC</tt> = SelectInstrument?(byte instrument<A>)
 
** <tt>120204</tt> = UploadInstrument?(byte instIndex<A>)
 
** <tt>12028E</tt> = SrcAddrAddition(word addr<X>, word bank<A>)
 
** <tt>1202C9</tt> = StopSong?()
 
** <tt>120305</tt> = SendToAPU(word numToTransfer<X>, word apuTargetAddr<Y>)
 
*** if X = 0, send terminating block
 
** <tt>120378</tt> = InitSPCTransfer()
 
* <tt>12038F-1204FF (369)</tt> = Unused/Padding
 
* <tt>120500-1207FF (4864)</tt> = SPC Program
 
The following pointers use 121800 as the base address
 
* <tt>121800-121801 (2)</tt> = pointer to next song chunk
 
* <tt>121802-121803 (2)</tt> = number of pointers in next pointer table
 
* <tt>121804-121837 (52)</tt> = song pattern order pointer table (26 16-bits pointers)
 
* <tt>121838-121C0C (981)</tt> = songs pattern order (list of pattern indices terminated by a $FF byte)
 
* <tt>121C0D-121C0E (2)</tt> = number of pointers in next pointer table
 
* <tt>121C0F-121CC6 (184)</tt> = Pattern pointer table (92 16-bits pointers)
 
* <tt>121CC7-12A08C (33734)</tt> = [[Crystal Beans From Dungeon Explorer:Patterns|Patterns]]
 
* <tt>12A08D-12A0FF (115)</tt> = Unused/Padding
 
* <tt>12A100-12A4BF (960)</tt> = [[Crystal Beans From Dungeon Explorer:Instruments|Instruments]]
 
* <tt>12A4C0-145FFD (113469)</tt> = BRR Samples
 
* <tt>145FFD-145FFF (3)</tt> = Unused/Padding
 
  
==Cutscenes==
+
{{Internal Data|game=Crystal Beans From Dungeon Explorer}}
* <tt>146000-147907 (6408)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Font_Graphics|Cutscene font graphics]]
 
* <tt>14B000-14B9B8 (2489)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] graphics for weapons shadow
 
* <tt>14B9B9-14B9DC (36)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] palette for weapons shadow
 
* <tt>14B9DD-14BDEB (1039)</tt> = Unknown [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|compressed]] data (weapons shadow tilemap?)
 
* <tt>14BDEC-14CA10 (3109)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] graphics for rain cloud
 
* <tt>14CA11-14CA2E (30)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] palette for rain cloud, crystal shards and some unknown sprites
 
* <tt>14CA2F-14D0FF (1745)</tt> = Unknown [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|compressed]] data (rain cloud tilemap?)
 
* <tt>14D100-14D239 (314)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] graphics for crystal shards
 
* <tt>14D23A-14D77E (1349)</tt> = Unknown [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|compressed]] data (crystal shards tilemap?)
 
* <tt>14D77F-14DA93 (789)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] graphics for little beanstalk
 
* <tt>14DA94-14DAB6 (35)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] palette for little beanstalk
 
* <tt>14DAB7-14DBB4 (254)</tt> = Unknown [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|compressed]] data (little beanstalk tilemap?)
 
* <tt>14DBB5-14DC56 (162)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] graphics for small crystals
 
* <tt>14DC57-14DCD7 (129)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] palette for small crystals
 
* <tt>14DCD8-14E521 (2122)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] graphics for other little beanstalk
 
* <tt>14E522-14E562 (65)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] palette for other little beanstalk
 
* <tt>14E563-14E724 (450)</tt> = Unknown [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|compressed]] data (other little beanstalk tilemap?)
 
* <tt>14E725-14E8CE (426)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] graphics for small growing beanstalk
 
* <tt>14E8CF-14E8F1 (35)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] palette for small growing beanstalk
 
* <tt>14E8F2-15146F (11134)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] graphics for world map
 
* <tt>151470-151503 (148)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] initial palette, also used for title screen and world map
 
* <tt>151504-15155C (89)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|compressed]] additional palette for world map
 
* <tt>15155D-151A14 (1208)</tt> = Unknown [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] data (world map tilemap?)
 
* <tt>151A15-1536DB (7367)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] graphics for world map sprites
 
* <tt>1536DC-153759 (126)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] palette for world map sprites
 
* <tt>15375A-156478 (11551)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] graphics for monsters
 
* <tt>156479-1564C5 (77)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] palette for monsters
 
* <tt>1564C6-156900 (1083)</tt> = Unknown [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|compressed]] data (monsters tilemap?)
 
* <tt>156901-1585A6 (7334)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] graphics for monster outlines
 
* <tt>1585A7-1585EC (70)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] palette for monster outlines
 
* <tt>1585ED-1589DB (1007)</tt> = Unknown [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|compressed]] data (monsters outlines tilemap?)
 
* <tt>1589DC-15AE21 (9286)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] graphics for large beanstalk
 
* <tt>15AE22-15AE58 (55)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] palette for large beanstalk
 
* <tt>15AE59-15B1D5 (893)</tt> = Unknown [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|compressed]] data (large beanstalk tilemap?)
 
* <tt>15B1D6-15B555 (896)</tt> = Unknown [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|compressed]] data (large beanstalk tilemap?)
 
* <tt>15B556-15EC94 (14143)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] graphics for large growing beanstalk
 
* <tt>15EC95-15ECD0 (60)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] palette for large growing beanstalk
 
* <tt>15ECD1-15F320 (1616)</tt> = Unknown [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|compressed]] data (large growing beanstalk tilemap?)
 
* <tt>15F321-16026D (3917)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] graphics for pedestal
 
* <tt>16026E-1602D5 (104)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] palette for pedestal
 
* <tt>1602D6-160500 (555)</tt> = Unknown [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|compressed]] data (pedestal tilemap?)
 
* <tt>160501-16119D (3229)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] graphics for shining crystal
 
* <tt>16119E-1611C0 (35)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] palette for shining crystal
 
* <tt>1611C1-162871 (5809)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] graphics for castle
 
* <tt>162872-1628E8 (119)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] palette for castle
 
* <tt>1628E9-162AF3 (523)</tt> = Unknown [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|compressed]] data (throne room tilemap?)
 
* <tt>162AF4-162CD2 (479)</tt> = Unknown [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|compressed]] data (bean room tilemap?)
 
* <tt>162CD3-163730 (2654)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] graphics for boss room
 
* <tt>163731-1637BF (143)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] palette for boss room
 
* <tt>1637C0-1638C9 (266)</tt> = Unknown [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|compressed]] data (boss room tilemap?)
 
* <tt>1638CA-164C62 (5017)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] graphics for characters
 
* <tt>164C63-164CEB (137)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] palette for characters
 
* <tt>164CEC-164CFC (17)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] additional palette for castle
 
* <tt>164CFD-1694F5 (18425)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] graphics for title screen background
 
* <tt>1694F6-169548 (83)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] additional palette for title screen background
 
* <tt>169549-169BB1 (1641)</tt> = Unknown [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|compressed]] data (title screen background tilemap?)
 
* <tt>169BB2-16B4BC (6411)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] graphics for title screen text
 
* <tt>16B4BD-16B52C (112)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] palette for title screen text
 
* <tt>16B52D-16BA07 (1243)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] graphics for title screen clouds
 
* <tt>16BA08-16BA12 (11)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] palette for title screen clouds
 
* <tt>16BA13-16BECB (1209)</tt> = Unknown [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|compressed]] data (title screen clouds tilemap?)
 
* <tt>16BECC-16D7D5 (6410)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] graphics for castle sprites
 
* <tt>16D7D6-16D8A2 (205)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] palette for castle sprites
 
* <tt>16D8A3-17001B (10105)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] graphics for castle people sprites
 
* <tt>17001C-171A36 (6683)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] graphics for town
 
* <tt>171A37-171ACE (152)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] palette for town
 
* <tt>171ACF-171CF4 (550)</tt> = Unknown [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] data (town tilemap?)
 
* <tt>171CF5-1728B7 (3011)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] graphics for credit sprites
 
* <tt>1728B8-1728F0? (57?)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene_Data_Compression|Compressed]] palette for credit sprites
 
* <tt>178000-179128 (4393)</tt> = Cutscene engine asm code (script related)
 
** <tt>178000</tt> = ShowCutscene(byte cutsceneIndex<A>)
 
** <tt>178138-178141 (10)</tt> = Cutscene [[Crystal Beans From Dungeon Explorer:Cutscene Script|script]] pointer table (5 16-bits pointer)
 
** <tt>1781AE-1781CF (34)</tt> = Cutscene command function pointer table (17 16-bits pointer)
 
** <tt>1782C2</tt> = SetSrcAddr()
 
** <tt>1782D2</tt> = SetUncompressedLength()
 
** <tt>1782D9</tt> = SetVRAMAddr()
 
** <tt>17855F</tt> = SetScrollRegs()
 
** <tt>1788F2</tt> = SendToVram()
 
** <tt>178927</tt> = CheckCutsceneInterruption()
 
** <tt>178961-178965 (5)</tt> = Cutscene interruption control bytes (1 if cutscene can be interrupted by pressing the START button, 0 otherwise)
 
** <tt>17899D</tt> = CutsceneNMIHandler()
 
** <tt>178A29</tt> = UploadPalette()
 
** <tt>178A9B</tt> = UploadToVRAM()
 
** <tt>178CAC</tt> = SendToVRAM()
 
** <tt>178DBD</tt> = MemsetVRAM?()
 
** <tt>178DD3</tt> = DecompToWRAM()
 
** <tt>178DFC</tt> = DecompToVRAM()
 
** <tt>178E26</tt> = DecompToPaletteBuf()
 
** <tt>178F37</tt> = SetOAMFromArray()
 
** <tt>179037</tt> = LzssInitVars()
 
** <tt>1790CD</tt> = LzssGetNextByte()
 
** <tt>1790DC</tt> = byte<A> tLzssUncompressNextByte()
 
* <tt>179129-17B8FB (10196)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene sprite data struct|Cutscene sprite data struct lists]]
 
* <tt>17BDF3-17BE9F (173)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene Script|Script]] for title screen
 
* <tt>17BEA0-17C22F (912)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene Script|Script]] for introduction
 
* <tt>17C230-17C3D9 (426)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene Script|Script]] for beanstalk growing scene
 
* <tt>17C3DA-17C7D1 (1016)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene Script|Script]] for ending and credits
 
* <tt>17C7D2-17C7ED (28)</tt> = [[Crystal Beans From Dungeon Explorer:Cutscene Script|Script]] for mouse message
 
* <tt>17C7EE-17D3E3 (3062)</tt> = Cutscene engine asm code
 
** <tt>17C7EE</tt> = InitScreenRegs?()
 
** <tt>17C822-17C862 (65)</tt> = [[Crystal Beans From Dungeon Explorer:InitScreenRegs Struct|Cutscene screen registers initialization structs]]
 
** <tt>17C8BA</tt> = PlaySong()
 
** <tt>17C8CE</tt> = SetLogoScrollFlag()
 
** <tt>17C8D6</tt> = SetOBSEL()
 
** <tt>17C8E9</tt> = PrintScrollingString()
 
** <tt>17C95A</tt> = PutNormalString()
 
** <tt>17D02C</tt> = SetTextWindow()
 
* <tt>17D5E4-17D611 (46)</tt> = Cutscene string pointer table (23 16-bits pointers)
 
* <tt>17D616-17DFC3 (2477)</tt> = Cutscene strings
 
* <tt>17DFC4-17E488 (1221)</tt> = Cutscene engine asm code (string display related)
 
** <tt>17DFC4</tt> = iPrintNormalString(word stringIndex<A>, word startRow<Y>)
 
** <tt>17E09D</tt> = PrepScrollingString()
 
** <tt>17E141</tt> = PrintScrollingString()
 
** <tt>17E1F0</tt> = UpdateBufIndex()
 
** <tt>17E200</tt> = GetNextChar()
 
** <tt>17E22E</tt> = PutChar()
 
** <tt>17E2C7</tt> = LoadTile()
 
** <tt>17E308</tt> = GetTileMapIndex(word tileIndex<$38>)
 
** <tt>17E322</tt> = UpdateTileMap()
 

Latest revision as of 01:45, 9 June 2016

Overview

This present the layout of the ROM. The start of asm code whose function is known is mentioned under the code block definition.

Core engine

Data bank 1

  • 010000-010663 (1636) = Unknown data (bytes and 16-bits pointers)
  • 010664-0106FD (154) = PCSpriteAnim? (16-bits pointers)
  • 0106FE-010705 (8) = PCAnimNormal?
  • 010706-01070D (8) = PCAnimIdle?
  • 01070E-01070E (1) = PCAnimNul? (0)
  • 01070F-010FCB (2237) = Unknown data (bytes and 16-bits pointers)
  • 010FCC-010FEB (32) = NPCSpriteAnim? (16-bits pointers)
  • 010FEC-011043 (88) = NPC sprite animations
  • 011044-01FFFF (61372) = Unknown data (bytes and 16-bits pointers)

Main game engine

Map data

  • 02EE5E-03E395 (62776) = Map data (includes place name strings)

Dialog data

  • 03E396-03E401 (108) = Dialog section pointer table (36 24-bits pointers)
  • 03E402-03E79D (924) = Dialog string pointer table (308 24-bits pointers)
  • 03E79E-04649A (31997) = Dialog strings
  • 04649B-04FFFA (39776) = Dialog font graphics (2 bpp planar aka GameBoy format)
  • 4FFFB-4FFFF (5) = Unknown data, doesn't seem to be referenced

Character movement sprite graphics

  • 050000-053FFF (16384) = Bard (4 bpp Snes format)
  • 054000-057FFF (16384) = Bowman (4 bpp Snes format)
  • 058000-05BFFF (16384) = Warrior (4 bpp Snes format)
  • 05C000-05FFFF (16384) = Kage (4 bpp Snes format)
  • 060000-063FFF (16384) = Robot (4 bpp Snes format)
  • 064000-067FFF (16384) = Wizard (4 bpp Snes format)
  • 068000-06BFFF (16384) = Monk (4 bpp Snes format)
  • 06C000-06FFFF (16384) = Dragon (4 bpp Snes format)
  • 070000-073FFF (16384) = Fighter (4 bpp Snes format)
  • 074000-077FFF (16384) = Priest (4 bpp Snes format)
  • 078000-07BFFF (16384) = Thief (4 bpp Snes format)
  • 07C000-07FFFF (16384) = Witch (4 bpp Snes format)

Compressed data

Music engine

Cutscene engine


Internal Data for Crystal Beans From Dungeon Explorer

ROM MapRAM MapText TableNotesTutorials