Crystal Beans from Dungeon Explorer/ROM map

From Data Crystal
< Crystal Beans from Dungeon Explorer
Revision as of 22:08, 14 January 2012 by Neige (talk | contribs) (Added map data section, Compressed data section. filled a hole in the dialog data section. fixed overview section.)
Jump to navigation Jump to search

Chip tiny.png The following article is a ROM map for Crystal Beans from Dungeon Explorer.


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.

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

  • 120000-12038E (911) = Music engine asm code
    • 120030 = InitAPU?()
    • 120087 = UploadSong?(byte songIndex<A>, byte numPatterns?<X>, byte <Y>)
    • 120151 = UploadPattern?(byte patternIndex<A>)
    • 1201EC = SelectInstrument?(byte instrument<A>)
    • 120204 = UploadInstrument?(byte instIndex<A>)
    • 12028E = SrcAddrAddition(word addr<X>, word bank<A>)
    • 1202C9 = StopSong?()
    • 120305 = SendToAPU(word numToTransfer<X>, word apuTargetAddr<Y>)
      • if X = 0, send terminating block
    • 120378 = InitSPCTransfer()
  • 12038F-1204FF (369) = Unused/Padding
  • 120500-1207FF (4864) = SPC Program

The following pointers use 121800 as the base address

  • 121800-121801 (2) = pointer to next song chunk
  • 121802-121803 (2) = number of pointers in next pointer table
  • 121804-121837 (52) = song pattern order pointer table (26 16-bits pointers)
  • 121838-121C0C (981) = songs pattern order (list of pattern indices terminated by a $FF byte)
  • 121C0D-121C0E (2) = number of pointers in next pointer table
  • 121C0F-121CC6 (184) = Pattern pointer table (92 16-bits pointers)
  • 121CC7-12A08C (33734) = Patterns
  • 12A08D-12A0FF (115) = Unused/Padding
  • 12A100-12A4BF (960) = Instruments
  • 12A4C0-145FFD (113469) = BRR Samples
  • 145FFD-145FFF (3) = Unused/Padding

Cutscenes

  • 146000-147907 (6408) = Cutscene font graphics
  • 14B000-14B9B8 (2489) = Compressed graphics for weapons shadow
  • 14B9B9-14B9DC (36) = Compressed palette for weapons shadow
  • 14B9DD-14BDEB (1039) = Unknown compressed data (weapons shadow tilemap?)
  • 14BDEC-14CA10 (3109) = Compressed graphics for rain cloud
  • 14CA11-14CA2E (30) = Compressed palette for rain cloud, crystal shards and some unknown sprites
  • 14CA2F-14D0FF (1745) = Unknown compressed data (rain cloud tilemap?)
  • 14D100-14D239 (314) = Compressed graphics for crystal shards
  • 14D23A-14D77E (1349) = Unknown compressed data (crystal shards tilemap?)
  • 14D77F-14DA93 (789) = Compressed graphics for little beanstalk
  • 14DA94-14DAB6 (35) = Compressed palette for little beanstalk
  • 14DAB7-14DBB4 (254) = Unknown compressed data (little beanstalk tilemap?)
  • 14DBB5-14DC56 (162) = Compressed graphics for small crystals
  • 14DC57-14DCD7 (129) = Compressed palette for small crystals
  • 14DCD8-14E521 (2122) = Compressed graphics for other little beanstalk
  • 14E522-14E562 (65) = Compressed palette for other little beanstalk
  • 14E563-14E724 (450) = Unknown compressed data (other little beanstalk tilemap?)
  • 14E725-14E8CE (426) = Compressed graphics for small growing beanstalk
  • 14E8CF-14E8F1 (35) = Compressed palette for small growing beanstalk
  • 14E8F2-15146F (11134) = Compressed graphics for world map
  • 151470-151503 (148) = Compressed initial palette, also used for title screen and world map
  • 151504-15155C (89) = compressed additional palette for world map
  • 15155D-151A14 (1208) = Unknown Compressed data (world map tilemap?)
  • 151A15-1536DB (7367) = Compressed graphics for world map sprites
  • 1536DC-153759 (126) = Compressed palette for world map sprites
  • 15375A-156478 (11551) = Compressed graphics for monsters
  • 156479-1564C5 (77) = Compressed palette for monsters
  • 1564C6-156900 (1083) = Unknown compressed data (monsters tilemap?)
  • 156901-1585A6 (7334) = Compressed graphics for monster outlines
  • 1585A7-1585EC (70) = Compressed palette for monster outlines
  • 1585ED-1589DB (1007) = Unknown compressed data (monsters outlines tilemap?)
  • 1589DC-15AE21 (9286) = Compressed graphics for large beanstalk
  • 15AE22-15AE58 (55) = Compressed palette for large beanstalk
  • 15AE59-15B1D5 (893) = Unknown compressed data (large beanstalk tilemap?)
  • 15B1D6-15B555 (896) = Unknown compressed data (large beanstalk tilemap?)
  • 15B556-15EC94 (14143) = Compressed graphics for large growing beanstalk
  • 15EC95-15ECD0 (60) = Compressed palette for large growing beanstalk
  • 15ECD1-15F320 (1616) = Unknown compressed data (large growing beanstalk tilemap?)
  • 15F321-16026D (3917) = Compressed graphics for pedestal
  • 16026E-1602D5 (104) = Compressed palette for pedestal
  • 1602D6-160500 (555) = Unknown compressed data (pedestal tilemap?)
  • 160501-16119D (3229) = Compressed graphics for shining crystal
  • 16119E-1611C0 (35) = Compressed palette for shining crystal
  • 1611C1-162871 (5809) = Compressed graphics for castle
  • 162872-1628E8 (119) = Compressed palette for castle
  • 1628E9-162AF3 (523) = Unknown compressed data (throne room tilemap?)
  • 162AF4-162CD2 (479) = Unknown compressed data (bean room tilemap?)
  • 162CD3-163730 (2654) = Compressed graphics for boss room
  • 163731-1637BF (143) = Compressed palette for boss room
  • 1637C0-1638C9 (266) = Unknown compressed data (boss room tilemap?)
  • 1638CA-164C62 (5017) = Compressed graphics for characters
  • 164C63-164CEB (137) = Compressed palette for characters
  • 164CEC-164CFC (17) = Compressed additional palette for castle
  • 164CFD-1694F5 (18425) = Compressed graphics for title screen background
  • 1694F6-169548 (83) = Compressed additional palette for title screen background
  • 169549-169BB1 (1641) = Unknown compressed data (title screen background tilemap?)
  • 169BB2-16B4BC (6411) = Compressed graphics for title screen text
  • 16B4BD-16B52C (112) = Compressed palette for title screen text
  • 16B52D-16BA07 (1243) = Compressed graphics for title screen clouds
  • 16BA08-16BA12 (11) = Compressed palette for title screen clouds
  • 16BA13-16BECB (1209) = Unknown compressed data (title screen clouds tilemap?)
  • 16BECC-16D7D5 (6410) = Compressed graphics for castle sprites
  • 16D7D6-16D8A2 (205) = Compressed palette for castle sprites
  • 16D8A3-17001B (10105) = Compressed graphics for castle people sprites
  • 17001C-171A36 (6683) = Compressed graphics for town
  • 171A37-171ACE (152) = Compressed palette for town
  • 171ACF-171CF4 (550) = Unknown Compressed data (town tilemap?)
  • 171CF5-1728B7 (3011) = Compressed graphics for credit sprites
  • 1728B8-1728F0? (57?) = Compressed palette for credit sprites
  • 178000-179128 (4393) = Cutscene engine asm code (script related)
    • 178000 = ShowCutscene(byte cutsceneIndex<A>)
    • 178138-178141 (10) = Cutscene script pointer table (5 16-bits pointer)
    • 1781AE-1781CF (34) = Cutscene command function pointer table (17 16-bits pointer)
    • 1782C2 = SetSrcAddr()
    • 1782D2 = SetUncompressedLength()
    • 1782D9 = SetVRAMAddr()
    • 17855F = SetScrollRegs()
    • 1788F2 = SendToVram()
    • 178927 = CheckCutsceneInterruption()
    • 178961-178965 (5) = Cutscene interruption control bytes (1 if cutscene can be interrupted by pressing the START button, 0 otherwise)
    • 17899D = CutsceneNMIHandler()
    • 178A29 = UploadPalette()
    • 178A9B = UploadToVRAM()
    • 178CAC = SendToVRAM()
    • 178DBD = MemsetVRAM?()
    • 178DD3 = DecompToWRAM()
    • 178DFC = DecompToVRAM()
    • 178E26 = DecompToPaletteBuf()
    • 178F37 = SetOAMFromArray()
    • 179037 = LzssInitVars()
    • 1790CD = LzssGetNextByte()
    • 1790DC = byte<A> tLzssUncompressNextByte()
  • 179129-17B8FB (10196) = Cutscene sprite data struct lists
  • 17BDF3-17BE9F (173) = Script for title screen
  • 17BEA0-17C22F (912) = Script for introduction
  • 17C230-17C3D9 (426) = Script for beanstalk growing scene
  • 17C3DA-17C7D1 (1016) = Script for ending and credits
  • 17C7D2-17C7ED (28) = Script for mouse message
  • 17C7EE-17D3E3 (3062) = Cutscene engine asm code
    • 17C7EE = InitScreenRegs?()
    • 17C822-17C862 (65) = Cutscene screen registers initialization structs
    • 17C8BA = PlaySong()
    • 17C8CE = SetLogoScrollFlag()
    • 17C8D6 = SetOBSEL()
    • 17C8E9 = PrintScrollingString()
    • 17C95A = PutNormalString()
    • 17D02C = SetTextWindow()
  • 17D5E4-17D611 (46) = Cutscene string pointer table (23 16-bits pointers)
  • 17D616-17DFC3 (2477) = Cutscene strings
  • 17DFC4-17E488 (1221) = Cutscene engine asm code (string display related)
    • 17DFC4 = iPrintNormalString(word stringIndex<A>, word startRow<Y>)
    • 17E09D = PrepScrollingString()
    • 17E141 = PrintScrollingString()
    • 17E1F0 = UpdateBufIndex()
    • 17E200 = GetNextChar()
    • 17E22E = PutChar()
    • 17E2C7 = LoadTile()
    • 17E308 = GetTileMapIndex(word tileIndex<$38>)
    • 17E322 = UpdateTileMap()