mirror of
https://github.com/testyourmine/sm_rewrite.git
synced 2024-11-23 05:59:43 +00:00
Added Port_Extraction folder and edited readme.
This commit is contained in:
parent
a35540f76a
commit
1513496f60
5
Port_Extraction/bank_80/extract_area_elevator_bits.py
Normal file
5
Port_Extraction/bank_80/extract_area_elevator_bits.py
Normal file
@ -0,0 +1,5 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
import common_data as rom
|
||||
|
23
Port_Extraction/bank_80/extract_bank_80.py
Normal file
23
Port_Extraction/bank_80/extract_bank_80.py
Normal file
@ -0,0 +1,23 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
import common_data as rom
|
||||
|
||||
kMusicPointers = []
|
||||
kTimerDigitsSpritemapPtr = []
|
||||
kLoadStationLists = []
|
||||
kAreaElevatorBitsPtr = []
|
||||
|
||||
#Format is as follows:
|
||||
#rom.get_data(bank, starting address, ending address, "data type", array, "array name", hex bool, array bool, new line, new space)
|
||||
#"hex bool" is whether you want the data in hexadecimal or in decimal format
|
||||
#"array bool" is whether it's a single value or an array (will print [] if array, won't otherwise)
|
||||
#"new line/space" is how many elements you want before you insert a new line/space, -1 is never
|
||||
def get_80():
|
||||
rom.get_data(0x8F, 0xE7E1, 0xE82C, "LongPtr", kMusicPointers, "kMusicPointers", True, True, -1, 1)
|
||||
rom.get_data(0x80, 0x9FD4, 0x9FE8, "uint16", kTimerDigitsSpritemapPtr, "kTimerDigitsSpritemapPtr", True, True, -1, 1)
|
||||
rom.get_data(0x80, 0xC4B5, 0xC4C5, "uint16", kLoadStationLists, "kLoadStationLists", True, True, -1, 1)
|
||||
rom.get_data(0x80, 0xCD46, 0xCD52, "uint16", kAreaElevatorBitsPtr, "kAreaElevatorBitsPtr", True, True, -1, 1)
|
||||
return
|
||||
|
||||
get_80()
|
492
Port_Extraction/bank_81/extract_bank_81.py
Normal file
492
Port_Extraction/bank_81/extract_bank_81.py
Normal file
@ -0,0 +1,492 @@
|
||||
import sys
|
||||
|
||||
class Rom:
|
||||
def __init__(self):
|
||||
self.data = open('sm.smc', 'rb').read()
|
||||
|
||||
def map(self, addr):
|
||||
assert addr & 0x8000
|
||||
return (((addr >> 16) << 15) | (addr & 0x7fff)) & 0x3fffff
|
||||
|
||||
def get_byte(self, addr):
|
||||
return self.data[self.map(addr)]
|
||||
|
||||
def get_word(self, addr):
|
||||
addr = self.map(addr)
|
||||
return self.data[addr] + self.data[addr + 1] * 256
|
||||
|
||||
def get_long(self, addr):
|
||||
addr = self.map(addr)
|
||||
return self.data[addr] + self.data[addr + 1] * 256 + self.data[addr + 2] * 65536
|
||||
|
||||
def get_bytes(self, addr, n):
|
||||
addr = self.map(addr)
|
||||
return self.data[addr:addr+n]
|
||||
|
||||
ROM = Rom()
|
||||
get_byte = ROM.get_byte
|
||||
get_word = ROM.get_word
|
||||
get_long = ROM.get_long
|
||||
|
||||
class MapScrollArrowData:
|
||||
def __init__(self, addr):
|
||||
self.x_pos = get_word(addr)
|
||||
self.y_pos = get_word(addr+2)
|
||||
self.anim_id = get_word(addr+4)
|
||||
self.input = get_word(addr+6)
|
||||
self.map_scroll_dir = get_word(addr+8)
|
||||
def __str__(self):
|
||||
output = "%s, %s, %s, %s, %s, };" % (self.x_pos, self.y_pos, self.anim_id, self.input, self.map_scroll_dir)
|
||||
return output
|
||||
|
||||
class ExpandingSquareVels:
|
||||
def __init__(self, addr):
|
||||
self.left_subvel = get_word(addr)
|
||||
self.left_vel = get_word(addr+2)
|
||||
self.right_subvel = get_word(addr+4)
|
||||
self.right_vel = get_word(addr+6)
|
||||
self.top_subvel = get_word(addr+8)
|
||||
self.top_vel = get_word(addr+10)
|
||||
self.bottom_subvel = get_word(addr+12)
|
||||
self.bottom_vel = get_word(addr+14)
|
||||
def __str__(self):
|
||||
output = "%6s,%6s, %6s,%3s, %6s,%6s, %6s,%3s, " % (hex(self.left_subvel), hex(self.left_vel), hex(self.right_subvel), hex(self.right_vel),
|
||||
hex(self.top_subvel), hex(self.top_vel), hex(self.bottom_subvel), hex(self.bottom_vel))
|
||||
return output
|
||||
|
||||
|
||||
bank_81 = 0x810000
|
||||
|
||||
#SRAM offsets for each save slot
|
||||
SaveSlotOffset = []
|
||||
def getSaveSlotOffset():
|
||||
save_slot_offset_address = 0x81812b
|
||||
end_address = 0x818131
|
||||
while save_slot_offset_address != end_address:
|
||||
get_offset = hex(get_word(save_slot_offset_address))
|
||||
SaveSlotOffset.append(get_offset)
|
||||
save_slot_offset_address += 2
|
||||
printSavesSlotOffset()
|
||||
return
|
||||
|
||||
def printSavesSlotOffset():
|
||||
print("uint16 kOffsetToSaveSlot[] = {", end=" ")
|
||||
for save_slot_offset in SaveSlotOffset:
|
||||
print(save_slot_offset, end=", ")
|
||||
print("};")
|
||||
return
|
||||
|
||||
|
||||
#Size of each area map
|
||||
AreaMapSize = []
|
||||
def getAreaMapSize():
|
||||
area_map_size_address = 0x818131
|
||||
end_address = 0x818138
|
||||
while area_map_size_address != end_address:
|
||||
get_size = get_byte(area_map_size_address)
|
||||
AreaMapSize.append(get_size)
|
||||
area_map_size_address += 1
|
||||
printAreaMapSize()
|
||||
return
|
||||
|
||||
def printAreaMapSize():
|
||||
print("uint8 kPackedBytesPerArea_Count[] = {", end=" ")
|
||||
for area_map_size in AreaMapSize:
|
||||
print(area_map_size, end=", ")
|
||||
print("};")
|
||||
return
|
||||
|
||||
|
||||
#Offset for each area map
|
||||
AreaMapOffset = []
|
||||
def getAreaMapOffset():
|
||||
area_map_offset_address = 0x818138
|
||||
end_address = 0x818146
|
||||
while area_map_offset_address != end_address:
|
||||
get_offset = get_word(area_map_offset_address)
|
||||
AreaMapOffset.append(get_offset)
|
||||
area_map_offset_address += 2
|
||||
printAreaMapOffset()
|
||||
return
|
||||
|
||||
def printAreaMapOffset():
|
||||
print("uint16 kPackedBytesPerArea_PackedOffs[] = {", end=" ")
|
||||
for area_map_offset in AreaMapOffset:
|
||||
print(area_map_offset, end=", ")
|
||||
print("};")
|
||||
return
|
||||
|
||||
|
||||
#Pointer to each area's map rooms
|
||||
MapRoomPtr = []
|
||||
def getMapRoomPtr():
|
||||
map_room_ptr_address = 0x8182D6
|
||||
end_address = 0x8182E4
|
||||
while map_room_ptr_address != end_address:
|
||||
get_ptr = hex(get_word(map_room_ptr_address))
|
||||
MapRoomPtr.append(get_ptr)
|
||||
map_room_ptr_address += 2
|
||||
printMapRoomPtr()
|
||||
return
|
||||
|
||||
def printMapRoomPtr():
|
||||
print("uint16 kPackedBytesPerArea_UnpackedOffs[] = {", end=" ")
|
||||
for map_room in MapRoomPtr:
|
||||
print(map_room, end=", ")
|
||||
print("};")
|
||||
return
|
||||
|
||||
|
||||
#Menu palettes
|
||||
MenuPalettes = []
|
||||
def getMenuPalettes():
|
||||
menu_palettes_address = 0x8EE400
|
||||
end_address = 0x8EE600
|
||||
while menu_palettes_address != end_address:
|
||||
get_menu_palettes = hex(get_word(menu_palettes_address))
|
||||
MenuPalettes.append(get_menu_palettes)
|
||||
menu_palettes_address += 2
|
||||
printMenuPalettes()
|
||||
return
|
||||
|
||||
def printMenuPalettes():
|
||||
print("uint16 kMenuPalettes[] = {", end=" ")
|
||||
new_line_counter = 0
|
||||
for menu_palettes in MenuPalettes:
|
||||
if new_line_counter == 16:
|
||||
print("\n\t\t\t\t\t\t ", end="")
|
||||
new_line_counter = 0
|
||||
print("%6s" % menu_palettes, end=", ")
|
||||
new_line_counter += 1
|
||||
print("};")
|
||||
return
|
||||
|
||||
|
||||
#Zebes and stars tilemap
|
||||
ZebesStarsTilemap = []
|
||||
def getZebesStarsTilemap():
|
||||
zebes_stars_tilemap_address = 0x8EDC00
|
||||
end_address = 0x8EE400
|
||||
while zebes_stars_tilemap_address != end_address:
|
||||
get_zebes_stars_tilemap = hex(get_word(zebes_stars_tilemap_address))
|
||||
ZebesStarsTilemap.append(get_zebes_stars_tilemap)
|
||||
zebes_stars_tilemap_address += 2
|
||||
printZebesStarsTilemap()
|
||||
return
|
||||
|
||||
def printZebesStarsTilemap():
|
||||
print("uint16 kZebesAndStarsTilemap[] = {", end=" ")
|
||||
new_line_counter = 0
|
||||
for zebes_stars_tilemap in ZebesStarsTilemap:
|
||||
if new_line_counter == 32:
|
||||
print("\n\t\t\t\t\t\t\t\t ", end="")
|
||||
new_line_counter = 0
|
||||
print("%6s" % zebes_stars_tilemap, end=", ")
|
||||
new_line_counter += 1
|
||||
print("};")
|
||||
return
|
||||
|
||||
|
||||
#Area select map foreground palettes offsets
|
||||
AreaMapForegroundPalettesOffset = []
|
||||
def getAreaMapForegroundPalettesOffset():
|
||||
offset_address = 0x81A4E6
|
||||
end_address = 0x81A546
|
||||
while offset_address != end_address:
|
||||
get_offset = hex(get_word(offset_address))
|
||||
AreaMapForegroundPalettesOffset.append(get_offset)
|
||||
offset_address += 2
|
||||
printAreaMapForegroundPalettesOffset()
|
||||
return
|
||||
|
||||
def printAreaMapForegroundPalettesOffset():
|
||||
print("uint16 kAreaMapForegroundSetDefs[] = {", end=" ")
|
||||
new_line_counter = 0
|
||||
for offset in AreaMapForegroundPalettesOffset:
|
||||
if new_line_counter == 2:
|
||||
print("\n\t\t\t\t\t\t\t\t\t ", end="")
|
||||
new_line_counter = 0
|
||||
print("%6s" % offset, end=", ")
|
||||
if offset == "0xffff":
|
||||
new_line_counter = 2
|
||||
continue
|
||||
new_line_counter += 1
|
||||
print("};")
|
||||
return
|
||||
|
||||
|
||||
#Area select map foreground palettes
|
||||
AreaMapForegroundPalettes = []
|
||||
def getAreaMapForegroundPalettes():
|
||||
palette_address = 0x81A40E
|
||||
end_address = 0x81A4CE
|
||||
while palette_address != end_address:
|
||||
get_palette = hex(get_word(palette_address))
|
||||
AreaMapForegroundPalettes.append(get_palette)
|
||||
palette_address += 2
|
||||
printAreaMapForegroundPalettes()
|
||||
return
|
||||
|
||||
def printAreaMapForegroundPalettes():
|
||||
print("uint16 kAreaMapForegroundColors[] = {", end=" ")
|
||||
new_line_counter = 0
|
||||
for palette in AreaMapForegroundPalettes:
|
||||
if new_line_counter == 16:
|
||||
print("\n\t\t\t\t\t\t\t\t\t ", end="")
|
||||
new_line_counter = 0
|
||||
print("%6s" % palette, end=", ")
|
||||
new_line_counter += 1
|
||||
print("};")
|
||||
return
|
||||
|
||||
|
||||
#Tilemap - BG2 pause screen / BG2 room select map
|
||||
Bg2PauseScreenRoomSelectTilemap = []
|
||||
def getBg2PauseScreenRoomSelectTilemap():
|
||||
tilemap_address = 0xB6E000
|
||||
end_address = 0xB6E800
|
||||
while tilemap_address != end_address:
|
||||
get_tilemap = hex(get_word(tilemap_address))
|
||||
Bg2PauseScreenRoomSelectTilemap.append(get_tilemap)
|
||||
tilemap_address += 2
|
||||
printBg2PauseScreenRoomSelectTilemap()
|
||||
return
|
||||
|
||||
def printBg2PauseScreenRoomSelectTilemap():
|
||||
print("uint16 kBg2RoomSelectMapTilemap[] = {", end=" ")
|
||||
new_line_counter = 0
|
||||
for tilemap in Bg2PauseScreenRoomSelectTilemap:
|
||||
if new_line_counter == 32:
|
||||
print("\n\t\t\t\t\t\t\t\t\t ", end="")
|
||||
new_line_counter = 0
|
||||
print("%6s" % tilemap, end=", ")
|
||||
new_line_counter += 1
|
||||
print("};")
|
||||
return
|
||||
|
||||
|
||||
#Tilemap - room select map controls
|
||||
RoomSelectMapControlsTilemap = []
|
||||
def getRoomSelectMapControlsTilemap():
|
||||
tilemap_address = 0x81B14B
|
||||
end_address = 0x81B2CB
|
||||
while tilemap_address != end_address:
|
||||
get_tilemap = hex(get_word(tilemap_address))
|
||||
RoomSelectMapControlsTilemap.append(get_tilemap)
|
||||
tilemap_address += 2
|
||||
printRoomSelectMapControlsTilemap()
|
||||
return
|
||||
|
||||
def printRoomSelectMapControlsTilemap():
|
||||
print("uint16 kFileSelectExpandingSquareTilemap[] = {", end=" ")
|
||||
new_line_counter = 0
|
||||
for tilemap in RoomSelectMapControlsTilemap:
|
||||
if new_line_counter == 32:
|
||||
print("\n\t\t\t\t\t\t\t\t\t\t\t ", end="")
|
||||
new_line_counter = 0
|
||||
print("%6s" % tilemap, end=", ")
|
||||
new_line_counter += 1
|
||||
print("};")
|
||||
return
|
||||
|
||||
|
||||
#Map icon data pointers
|
||||
MapIconDataPointer = []
|
||||
def getMapIconDataPointer():
|
||||
data_ptr = 0x82C7CB
|
||||
end_address = 0x82C83B
|
||||
while data_ptr != end_address:
|
||||
get_ptr = hex(get_word(data_ptr))
|
||||
MapIconDataPointer.append(get_ptr)
|
||||
data_ptr += 2
|
||||
printMapIconDataPointer()
|
||||
return
|
||||
|
||||
def printMapIconDataPointer():
|
||||
print("MapIconDataPointers kMapIconDataPointers[] = {", end=" ")
|
||||
new_line_counter = 0
|
||||
for data_ptr in MapIconDataPointer:
|
||||
if new_line_counter == 8:
|
||||
print("\n\t\t\t\t\t\t\t\t\t\t\t ", end="")
|
||||
new_line_counter = 0
|
||||
print("%6s" % data_ptr, end=", ")
|
||||
new_line_counter += 1
|
||||
print("};")
|
||||
return
|
||||
|
||||
|
||||
#Area select spritemap base index
|
||||
AreaSelectSpritemapBaseIndex = []
|
||||
def getAreaSelectSpritemapBaseIndex():
|
||||
index_ptr = 0x82C749
|
||||
get_index = hex(get_word(index_ptr))
|
||||
AreaSelectSpritemapBaseIndex.append(get_index)
|
||||
printAreaSelectSpritemapBaseIndex()
|
||||
return
|
||||
|
||||
def printAreaSelectSpritemapBaseIndex():
|
||||
print("uint16 gAreaSelectSpritemapOffset[] = {", end=" ")
|
||||
for index in AreaSelectSpritemapBaseIndex:
|
||||
print(index, end=" ")
|
||||
print("};")
|
||||
return
|
||||
|
||||
|
||||
#Map scroll arrow data
|
||||
FileSelectLeftMapScrollArrowData = []
|
||||
FileSelectRightMapScrollArrowData = []
|
||||
FileSelectUpMapScrollArrowData = []
|
||||
FileSelectDownMapScrollArrowData = []
|
||||
def getFileSelectMapScrollArrowData():
|
||||
map_arrow_data = 0x81AF32
|
||||
new_data = MapScrollArrowData(map_arrow_data)
|
||||
FileSelectLeftMapScrollArrowData.append(new_data)
|
||||
map_arrow_data += 10
|
||||
new_data = MapScrollArrowData(map_arrow_data)
|
||||
FileSelectRightMapScrollArrowData.append(new_data)
|
||||
map_arrow_data += 10
|
||||
new_data = MapScrollArrowData(map_arrow_data)
|
||||
FileSelectUpMapScrollArrowData.append(new_data)
|
||||
map_arrow_data += 10
|
||||
new_data = MapScrollArrowData(map_arrow_data)
|
||||
map_arrow_data += 10
|
||||
FileSelectDownMapScrollArrowData.append(new_data)
|
||||
printFileSelectMapScrollArrowData()
|
||||
return
|
||||
|
||||
def printFileSelectMapScrollArrowData():
|
||||
for data in FileSelectLeftMapScrollArrowData:
|
||||
print("MapScrollArrowData kFileSelectLeftMapScrollArrowData = {", end=" ")
|
||||
print(data)
|
||||
for data in FileSelectRightMapScrollArrowData:
|
||||
print("MapScrollArrowData kFileSelectRightMapScrollArrowData = {", end=" ")
|
||||
print(data)
|
||||
for data in FileSelectUpMapScrollArrowData:
|
||||
print("MapScrollArrowData kFileSelectUpMapScrollArrowData = {", end=" ")
|
||||
print(data)
|
||||
for data in FileSelectDownMapScrollArrowData:
|
||||
print("MapScrollArrowData kFileSelectDownMapScrollArrowData = {", end=" ")
|
||||
print(data)
|
||||
return
|
||||
|
||||
|
||||
#Spritemap pointers
|
||||
MenuSpritemapPtr = []
|
||||
def getGeneralMenuSpritemap():
|
||||
spritemap_ptr_address = 0x82C569
|
||||
end_address = 0x82C639
|
||||
while spritemap_ptr_address != end_address:
|
||||
get_spritemap_ptr = hex(get_word(spritemap_ptr_address))
|
||||
MenuSpritemapPtr.append(get_spritemap_ptr)
|
||||
spritemap_ptr_address += 2
|
||||
printGeneralMenuSpritemap()
|
||||
return
|
||||
|
||||
def printGeneralMenuSpritemap():
|
||||
print("uint16 gMenuSpritemapTable[] = {", end=" ")
|
||||
new_line_counter = 0
|
||||
for spritemap_ptr in MenuSpritemapPtr:
|
||||
if new_line_counter == 16:
|
||||
print("\n\t\t\t\t\t\t\t\t ", end="")
|
||||
new_line_counter = 0
|
||||
print("%6s" % spritemap_ptr, end=", ")
|
||||
new_line_counter += 1
|
||||
print("};")
|
||||
return
|
||||
|
||||
|
||||
#Samus spritemap table
|
||||
SamusSpritemapTable = []
|
||||
def getSamusSpritemapPtrs():
|
||||
spritemap_ptr = 0x92808D
|
||||
end_address = 0x9290ED
|
||||
while spritemap_ptr != end_address:
|
||||
get_ptr = hex(get_word(spritemap_ptr))
|
||||
SamusSpritemapTable.append(get_ptr)
|
||||
spritemap_ptr += 2
|
||||
SamusSpritemapTable.append(hex(0x9173))
|
||||
printSamusSpritemapTable()
|
||||
return
|
||||
|
||||
def printSamusSpritemapTable():
|
||||
print("uint16 kSamusSpritemapTable[] = {", end=" ")
|
||||
new_line_counter = 0
|
||||
for spritemap_ptr in SamusSpritemapTable:
|
||||
if new_line_counter == 16:
|
||||
print("\n\t\t\t\t\t\t\t\t ", end="")
|
||||
new_line_counter = 0
|
||||
print("%6s" % spritemap_ptr, end=", ")
|
||||
new_line_counter += 1
|
||||
print("};")
|
||||
return
|
||||
|
||||
|
||||
#Flare spritemap pointers
|
||||
FlareSpritemapPtr = []
|
||||
def getFlareSpritemapPtr():
|
||||
spritemap_ptr_address = 0x93A1A1
|
||||
end_address = 0x93A225
|
||||
while spritemap_ptr_address != end_address:
|
||||
get_spritemap_ptr = hex(get_word(spritemap_ptr_address))
|
||||
FlareSpritemapPtr.append(get_spritemap_ptr)
|
||||
spritemap_ptr_address += 2
|
||||
printFlareSpritemapPtr()
|
||||
return
|
||||
|
||||
def printFlareSpritemapPtr():
|
||||
print("uint16 gFlareSpritemapTable[] = {", end=" ")
|
||||
new_line_counter = 0
|
||||
for spritemap_ptr in FlareSpritemapPtr:
|
||||
if new_line_counter == 16:
|
||||
print("\n\t\t\t\t\t\t\t\t ", end="")
|
||||
new_line_counter = 0
|
||||
print("%6s" % spritemap_ptr, end=", ")
|
||||
new_line_counter += 1
|
||||
print("};")
|
||||
return
|
||||
|
||||
|
||||
#Room select map expanding square velocities
|
||||
MapExpandVel = []
|
||||
def getMapExpandVel():
|
||||
vel_address = 0x81AA34
|
||||
end_address = 0x81AA94
|
||||
while vel_address != end_address:
|
||||
new_vel = ExpandingSquareVels(vel_address)
|
||||
MapExpandVel.append(new_vel)
|
||||
vel_address += 16
|
||||
printMapExpandVel()
|
||||
return
|
||||
|
||||
def printMapExpandVel():
|
||||
print("ExpandingSquareVels kExpandingSquareVels[] = {", end= " ")
|
||||
new_line_counter = 0
|
||||
for vel in MapExpandVel:
|
||||
if new_line_counter > 0:
|
||||
print("\t\t\t\t\t\t\t\t\t\t\t ", end="")
|
||||
print(vel)
|
||||
new_line_counter += 1
|
||||
print("};")
|
||||
return
|
||||
|
||||
|
||||
def getAll():
|
||||
getSaveSlotOffset()
|
||||
getAreaMapSize()
|
||||
getAreaMapOffset()
|
||||
getMapRoomPtr()
|
||||
getMenuPalettes()
|
||||
getZebesStarsTilemap()
|
||||
getAreaMapForegroundPalettesOffset()
|
||||
getAreaMapForegroundPalettes()
|
||||
getBg2PauseScreenRoomSelectTilemap()
|
||||
getRoomSelectMapControlsTilemap()
|
||||
getMapIconDataPointer()
|
||||
getAreaSelectSpritemapBaseIndex()
|
||||
getFileSelectMapScrollArrowData()
|
||||
getGeneralMenuSpritemap()
|
||||
getSamusSpritemapPtrs()
|
||||
getFlareSpritemapPtr()
|
||||
getMapExpandVel()
|
||||
|
||||
getAll()
|
1057
Port_Extraction/bank_82/extract_bank_82.py
Normal file
1057
Port_Extraction/bank_82/extract_bank_82.py
Normal file
File diff suppressed because it is too large
Load Diff
384
Port_Extraction/bank_84/extract_bank_84.py
Normal file
384
Port_Extraction/bank_84/extract_bank_84.py
Normal file
@ -0,0 +1,384 @@
|
||||
import sys
|
||||
|
||||
class Rom:
|
||||
def __init__(self):
|
||||
self.data = open('sm.smc', 'rb').read()
|
||||
|
||||
def map(self, addr):
|
||||
assert addr & 0x8000
|
||||
return (((addr >> 16) << 15) | (addr & 0x7fff)) & 0x3fffff
|
||||
|
||||
def get_byte(self, addr):
|
||||
return self.data[self.map(addr)]
|
||||
|
||||
def get_word(self, addr):
|
||||
addr = self.map(addr)
|
||||
return self.data[addr] + self.data[addr + 1] * 256
|
||||
|
||||
def get_long(self, addr):
|
||||
addr = self.map(addr)
|
||||
return self.data[addr] + self.data[addr + 1] * 256 + self.data[addr + 2] * 65536
|
||||
|
||||
def get_bytes(self, addr, n):
|
||||
addr = self.map(addr)
|
||||
return self.data[addr:addr+n]
|
||||
|
||||
ROM = Rom()
|
||||
get_byte = ROM.get_byte
|
||||
get_word = ROM.get_word
|
||||
get_long = ROM.get_long
|
||||
|
||||
bank_84 = 0x840000
|
||||
|
||||
|
||||
#Golden Torizo palette 1
|
||||
GoldenTorizoPalette1 = []
|
||||
def getGoldzenTorizoPalette1():
|
||||
palette_address = 0x848032
|
||||
end_address = 0x848132
|
||||
while palette_address != end_address:
|
||||
get_palette = hex(get_word(palette_address))
|
||||
GoldenTorizoPalette1.append(get_palette)
|
||||
palette_address += 2
|
||||
printGoldzenTorizoPalette1()
|
||||
return
|
||||
|
||||
def printGoldzenTorizoPalette1():
|
||||
print("uint16 kGoldenTorizoPalette1[] = {", end=" ")
|
||||
new_line_counter = 0
|
||||
for palette in GoldenTorizoPalette1:
|
||||
if new_line_counter == 16:
|
||||
print("\n\t\t\t\t\t\t\t\t ", end="")
|
||||
new_line_counter = 0
|
||||
print("%6s" % palette, end=", ")
|
||||
new_line_counter += 1
|
||||
print("};\n")
|
||||
return
|
||||
|
||||
|
||||
#Golden Torizo palette 2
|
||||
GoldenTorizoPalette2 = []
|
||||
def getGoldzenTorizoPalette2():
|
||||
palette_address = 0x848132
|
||||
end_address = 0x848232
|
||||
while palette_address != end_address:
|
||||
get_palette = hex(get_word(palette_address))
|
||||
GoldenTorizoPalette2.append(get_palette)
|
||||
palette_address += 2
|
||||
printGoldzenTorizoPalette2()
|
||||
return
|
||||
|
||||
def printGoldzenTorizoPalette2():
|
||||
print("uint16 kGoldenTorizoPalette2[] = {", end=" ")
|
||||
new_line_counter = 0
|
||||
for palette in GoldenTorizoPalette2:
|
||||
if new_line_counter == 16:
|
||||
print("\n\t\t\t\t\t\t\t\t ", end="")
|
||||
new_line_counter = 0
|
||||
print("%6s" % palette, end=", ")
|
||||
new_line_counter += 1
|
||||
print("};\n")
|
||||
return
|
||||
|
||||
|
||||
#Pointers to x-ray block drawing instructions
|
||||
XrayBlockDrawingInstructionsPtr = []
|
||||
def getXrayBlockDrawingInstructionsPtr():
|
||||
ptr_address = 0x84839D
|
||||
end_address = 0x8483AD
|
||||
while ptr_address != end_address:
|
||||
get_ptr = hex(get_word(ptr_address))
|
||||
XrayBlockDrawingInstructionsPtr.append(get_ptr)
|
||||
ptr_address += 2
|
||||
printXrayBlockDrawingInstructionsPtr()
|
||||
return
|
||||
|
||||
def printXrayBlockDrawingInstructionsPtr():
|
||||
print("uint16 kXrayBlockDrawingInstrs[] = {", end=" ")
|
||||
for ptr in XrayBlockDrawingInstructionsPtr:
|
||||
print(ptr, end=", ")
|
||||
print("};\n")
|
||||
return
|
||||
|
||||
|
||||
#Grey door pre-instructions
|
||||
GreyDoorPreInstructions = []
|
||||
def getGreyDoorPreInstructions():
|
||||
ptr_address = 0x84BE4B
|
||||
end_address = 0x84BE59
|
||||
while ptr_address != end_address:
|
||||
get_ptr = hex(get_word(ptr_address))
|
||||
GreyDoorPreInstructions.append(get_ptr)
|
||||
ptr_address += 2
|
||||
printGreyDoorPreInstructions()
|
||||
return
|
||||
|
||||
def printGreyDoorPreInstructions():
|
||||
print("uint16 kGrayDoorPreInstrs[] = {", end=" ")
|
||||
for ptr in GreyDoorPreInstructions:
|
||||
print(ptr, end=", ")
|
||||
print("};\n")
|
||||
return
|
||||
|
||||
|
||||
#Setup - PLM $C836 (downwards gate shotblock) - Instruction list
|
||||
DownwardsGateShotblockInstructionList = []
|
||||
def getDownwardsGateShotblockInstructionList():
|
||||
ptr_address = 0x84C70A
|
||||
end_address = 0x84C71A
|
||||
while ptr_address != end_address:
|
||||
get_ptr = hex(get_word(ptr_address))
|
||||
DownwardsGateShotblockInstructionList.append(get_ptr)
|
||||
ptr_address += 2
|
||||
printDownwardsGateShotblockInstructionList()
|
||||
return
|
||||
|
||||
def printDownwardsGateShotblockInstructionList():
|
||||
print("uint16 kDowardGatePlmListPtrs[] = {", end=" ")
|
||||
for ptr in DownwardsGateShotblockInstructionList:
|
||||
print(ptr, end=", ")
|
||||
print("};\n")
|
||||
return
|
||||
|
||||
|
||||
#Setup - PLM $C836 (downwards gate shotblock) - Block type / BTS for block to the left
|
||||
DownwardsGateShotblockLeftBts = []
|
||||
def getDownwardsGateShotblockLeftBts():
|
||||
ptr_address = 0x84C71A
|
||||
end_address = 0x84C72A
|
||||
while ptr_address != end_address:
|
||||
get_ptr = hex(get_word(ptr_address))
|
||||
DownwardsGateShotblockLeftBts.append(get_ptr)
|
||||
ptr_address += 2
|
||||
printDownwardsGateShotblockLeftBts()
|
||||
return
|
||||
|
||||
def printDownwardsGateShotblockLeftBts():
|
||||
print("uint16 kDowardGateLeftBlockBts[] = {", end=" ")
|
||||
for ptr in DownwardsGateShotblockLeftBts:
|
||||
print(ptr, end=", ")
|
||||
print("};\n")
|
||||
return
|
||||
|
||||
|
||||
#Setup - PLM $C836 (downwards gate shotblock) - Block type / BTS for block to the right
|
||||
DownwardsGateShotblockRightBts = []
|
||||
def getDownwardsGateShotblockRightBts():
|
||||
ptr_address = 0x84C72A
|
||||
end_address = 0x84C73A
|
||||
while ptr_address != end_address:
|
||||
get_ptr = hex(get_word(ptr_address))
|
||||
DownwardsGateShotblockRightBts.append(get_ptr)
|
||||
ptr_address += 2
|
||||
printDownwardsGateShotblockRightBts()
|
||||
return
|
||||
|
||||
def printDownwardsGateShotblockRightBts():
|
||||
print("uint16 kDowardGateRightBlockBts[] = {", end=" ")
|
||||
for ptr in DownwardsGateShotblockRightBts:
|
||||
print(ptr, end=", ")
|
||||
print("};\n")
|
||||
return
|
||||
|
||||
|
||||
#Setup - PLM $C83A (upwards gate shotblock) - Instruction list
|
||||
UpwardsGateShotblockInstructionList = []
|
||||
def getUpwardsGateShotblockInstructionList():
|
||||
ptr_address = 0x84C764
|
||||
end_address = 0x84C774
|
||||
while ptr_address != end_address:
|
||||
get_ptr = hex(get_word(ptr_address))
|
||||
UpwardsGateShotblockInstructionList.append(get_ptr)
|
||||
ptr_address += 2
|
||||
printUpwardsGateShotblockInstructionList()
|
||||
return
|
||||
|
||||
def printUpwardsGateShotblockInstructionList():
|
||||
print("uint16 kUpwardGatePlmListPtrs[] = {", end=" ")
|
||||
for ptr in UpwardsGateShotblockInstructionList:
|
||||
print(ptr, end=", ")
|
||||
print("};\n")
|
||||
return
|
||||
|
||||
|
||||
#Setup - PLM $C83A (upwards gate shotblock) - Block type / BTS for block to the left
|
||||
UpwardsGateShotblockLeftBts = []
|
||||
def getUpwardsGateShotblockLeftBts():
|
||||
ptr_address = 0x84C774
|
||||
end_address = 0x84C784
|
||||
while ptr_address != end_address:
|
||||
get_ptr = hex(get_word(ptr_address))
|
||||
UpwardsGateShotblockLeftBts.append(get_ptr)
|
||||
ptr_address += 2
|
||||
printUpwardsGateShotblockLeftBts()
|
||||
return
|
||||
|
||||
def printUpwardsGateShotblockLeftBts():
|
||||
print("uint16 kUpwardGateLeftBlockBts[] = {", end=" ")
|
||||
for ptr in UpwardsGateShotblockLeftBts:
|
||||
print(ptr, end=", ")
|
||||
print("};\n")
|
||||
return
|
||||
|
||||
|
||||
#Setup - PLM $C83A (upwards gate shotblock) - Block type / BTS for block to the right
|
||||
UpwardsGateShotblockRightBts = []
|
||||
def getUpwardsGateShotblockRightBts():
|
||||
ptr_address = 0x84C784
|
||||
end_address = 0x84C794
|
||||
while ptr_address != end_address:
|
||||
get_ptr = hex(get_word(ptr_address))
|
||||
UpwardsGateShotblockRightBts.append(get_ptr)
|
||||
ptr_address += 2
|
||||
printUpwardsGateShotblockRightBts()
|
||||
return
|
||||
|
||||
def printUpwardsGateShotblockRightBts():
|
||||
print("uint16 kUpwardGateRightBlockBts[] = {", end=" ")
|
||||
for ptr in UpwardsGateShotblockRightBts:
|
||||
print(ptr, end=", ")
|
||||
print("};\n")
|
||||
return
|
||||
|
||||
|
||||
#Setup - PLM $DB44 (sets Metroids cleared states when required) - pre-instructions
|
||||
MetroidsClearedPreInstructions = []
|
||||
def getMetroidsClearedPreInstructions():
|
||||
ptr_address = 0x84DB28
|
||||
end_address = 0x84DB42
|
||||
while ptr_address != end_address:
|
||||
get_ptr = hex(get_word(ptr_address))
|
||||
MetroidsClearedPreInstructions.append(get_ptr)
|
||||
ptr_address += 2
|
||||
printMetroidsClearedPreInstructions()
|
||||
return
|
||||
|
||||
def printMetroidsClearedPreInstructions():
|
||||
print("uint16 kSetMetroidsClearStatePreInstrs[] = {", end=" ")
|
||||
for ptr in MetroidsClearedPreInstructions:
|
||||
print(ptr, end=", ")
|
||||
print("};\n")
|
||||
return
|
||||
|
||||
|
||||
#Instruction - draw item frame 0 - draw instructions
|
||||
ItemFrame0DrawInstructions = []
|
||||
def getItemFrame0DrawInstructions():
|
||||
ptr_address = 0x84E05F
|
||||
end_address = 0x84E067
|
||||
while ptr_address != end_address:
|
||||
get_ptr = hex(get_word(ptr_address))
|
||||
ItemFrame0DrawInstructions.append(get_ptr)
|
||||
ptr_address += 2
|
||||
printItemFrame0DrawInstructions()
|
||||
return
|
||||
|
||||
def printItemFrame0DrawInstructions():
|
||||
print("uint16 kDrawItemFrame0DrawInstrs[] = {", end=" ")
|
||||
for ptr in ItemFrame0DrawInstructions:
|
||||
print(ptr, end=", ")
|
||||
print("};\n")
|
||||
return
|
||||
|
||||
|
||||
#Instruction - draw item frame 1 - draw instructions
|
||||
ItemFrame1DrawInstructions = []
|
||||
def getItemFrame1DrawInstructions():
|
||||
ptr_address = 0x84E077
|
||||
end_address = 0x84E07F
|
||||
while ptr_address != end_address:
|
||||
get_ptr = hex(get_word(ptr_address))
|
||||
ItemFrame1DrawInstructions.append(get_ptr)
|
||||
ptr_address += 2
|
||||
printItemFrame1DrawInstructions()
|
||||
return
|
||||
|
||||
def printItemFrame1DrawInstructions():
|
||||
print("uint16 kDrawItemFrame1DrawInstrs[] = {", end=" ")
|
||||
for ptr in ItemFrame1DrawInstructions:
|
||||
print(ptr, end=", ")
|
||||
print("};\n")
|
||||
return
|
||||
|
||||
|
||||
#Instruction - load item PLM GFX - VRAM addresses
|
||||
PlmGfxVramAddress = []
|
||||
def getPlmVramAddress():
|
||||
vram_ptr_address = 0x8487CD
|
||||
end_address = 0x8487D5
|
||||
while vram_ptr_address != end_address:
|
||||
get_vram_ptr = hex(get_word(vram_ptr_address))
|
||||
PlmGfxVramAddress.append(get_vram_ptr)
|
||||
vram_ptr_address += 2
|
||||
printPlmVramAddress()
|
||||
return
|
||||
|
||||
def printPlmVramAddress():
|
||||
print("uint16 kPlmVramAddresses[] = {", end=" ")
|
||||
for vram_ptr in PlmGfxVramAddress:
|
||||
print(vram_ptr, end=", ")
|
||||
print("};\n")
|
||||
return
|
||||
|
||||
|
||||
#Instruction - load item PLM GFX - Tile data offsets
|
||||
PlmGfxVramTileDataOffset = []
|
||||
def getPlmVramTileDataOffset():
|
||||
offset_address = 0x8487D5
|
||||
end_address = 0x8487DD
|
||||
while offset_address != end_address:
|
||||
get_offset = hex(get_word(offset_address))
|
||||
PlmGfxVramTileDataOffset.append(get_offset)
|
||||
offset_address += 2
|
||||
printPlmVramTileDataOffset()
|
||||
return
|
||||
|
||||
def printPlmVramTileDataOffset():
|
||||
print("uint16 kPlmTileDataOffs[] = {", end=" ")
|
||||
for offset in PlmGfxVramTileDataOffset:
|
||||
print(offset, end=", ")
|
||||
print("};\n")
|
||||
return
|
||||
|
||||
|
||||
#Instruction - load item PLM GFX - Starting tile numbers
|
||||
PlmGfxVramStartingTile = []
|
||||
def getPlmVramStartingTile():
|
||||
start_address = 0x8487DD
|
||||
end_address = 0x8487E5
|
||||
while start_address != end_address:
|
||||
get_start = hex(get_word(start_address))
|
||||
PlmGfxVramStartingTile.append(get_start)
|
||||
start_address += 2
|
||||
printPlmVramStartingTile()
|
||||
return
|
||||
|
||||
def printPlmVramStartingTile():
|
||||
print("uint16 kPlmStartingTileNumber[] = {", end=" ")
|
||||
for start in PlmGfxVramStartingTile:
|
||||
print(start, end=", ")
|
||||
print("};\n")
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
def getAll():
|
||||
getGoldzenTorizoPalette1()
|
||||
getGoldzenTorizoPalette2()
|
||||
getXrayBlockDrawingInstructionsPtr()
|
||||
getGreyDoorPreInstructions()
|
||||
getDownwardsGateShotblockInstructionList()
|
||||
getDownwardsGateShotblockLeftBts()
|
||||
getDownwardsGateShotblockRightBts()
|
||||
getUpwardsGateShotblockInstructionList()
|
||||
getUpwardsGateShotblockLeftBts()
|
||||
getUpwardsGateShotblockRightBts()
|
||||
getMetroidsClearedPreInstructions()
|
||||
getItemFrame0DrawInstructions()
|
||||
getItemFrame1DrawInstructions()
|
||||
getPlmVramAddress()
|
||||
getPlmVramTileDataOffset()
|
||||
getPlmVramStartingTile()
|
||||
|
||||
getAll()
|
68
Port_Extraction/bank_85/extract_bank_85.py
Normal file
68
Port_Extraction/bank_85/extract_bank_85.py
Normal file
@ -0,0 +1,68 @@
|
||||
import sys
|
||||
|
||||
class Rom:
|
||||
def __init__(self):
|
||||
self.data = open('sm.smc', 'rb').read()
|
||||
|
||||
def map(self, addr):
|
||||
assert addr & 0x8000
|
||||
return (((addr >> 16) << 15) | (addr & 0x7fff)) & 0x3fffff
|
||||
|
||||
def get_byte(self, addr):
|
||||
return self.data[self.map(addr)]
|
||||
|
||||
def get_word(self, addr):
|
||||
addr = self.map(addr)
|
||||
return self.data[addr] + self.data[addr + 1] * 256
|
||||
|
||||
def get_long(self, addr):
|
||||
addr = self.map(addr)
|
||||
return self.data[addr] + self.data[addr + 1] * 256 + self.data[addr + 2] * 65536
|
||||
|
||||
def get_bytes(self, addr, n):
|
||||
addr = self.map(addr)
|
||||
return self.data[addr:addr+n]
|
||||
|
||||
ROM = Rom()
|
||||
get_byte = ROM.get_byte
|
||||
get_word = ROM.get_word
|
||||
get_long = ROM.get_long
|
||||
|
||||
bank_85 = 0x850000
|
||||
|
||||
class MsgBoxConfig:
|
||||
def __init__(self, addr):
|
||||
self.modify_box_func = get_word(addr)
|
||||
self.draw_initial_tilemap = get_word(addr+2)
|
||||
self.message_tilemap = get_word(addr+4)
|
||||
def __str__(self):
|
||||
output = "%6s, %6s, %6s, " % (hex(self.modify_box_func), hex(self.draw_initial_tilemap), hex(self.message_tilemap))
|
||||
return output
|
||||
|
||||
|
||||
#Message definitions
|
||||
MessageDefinition = []
|
||||
def getMessageDefinition():
|
||||
msg_def_address = 0x85869B
|
||||
end_address = 0x858749
|
||||
while msg_def_address != end_address:
|
||||
new_def = MsgBoxConfig(msg_def_address)
|
||||
MessageDefinition.append(new_def)
|
||||
msg_def_address += 6
|
||||
printMessageDefinition()
|
||||
return
|
||||
|
||||
def printMessageDefinition():
|
||||
print("MsgBoxConfig kMessageBoxDefs[] = {", end=" ")
|
||||
for msg_def in MessageDefinition:
|
||||
print(msg_def, end="\n\t\t\t\t\t\t\t\t ")
|
||||
print("};")
|
||||
return
|
||||
|
||||
|
||||
def getAll():
|
||||
getMessageDefinition()
|
||||
|
||||
|
||||
getAll()
|
||||
|
75
Port_Extraction/bank_86/extract_bank_86.py
Normal file
75
Port_Extraction/bank_86/extract_bank_86.py
Normal file
@ -0,0 +1,75 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
import common_data as rom
|
||||
|
||||
|
||||
kScreenShakeOffsets = []
|
||||
kAlignYPos_Tab0 = []
|
||||
kAlignXPos_Tab1 = []
|
||||
kGarbageInstrList = []
|
||||
kCrocomireSpikeWallPieces_Ypos = []
|
||||
kBombTorizoLowHealthDroolInstrlist = []
|
||||
kBB50InstrListPtrs_UNUSED = []
|
||||
kCommonEnemySpeeds_Quadratic_Copy = []
|
||||
kCommonEnemySpeeds_Quadratic32 = []
|
||||
kMotherBrainsDeathExplosionInstrListPtrs = []
|
||||
kCrocomireProjectile_Ypos = []
|
||||
kGunshipLiftoffDustCloudsInstrListPtrs = []
|
||||
kEprojInit_BombTorizoStatueBreaking_InstrList = []
|
||||
kGoldenTorizoSuperMissileInstrListPtrs = []
|
||||
kEproj_MotherBrainRoomTurrets_DirectionIndexes = []
|
||||
kEproj_MotherBrainRoomTurrets_AllowedRotations = []
|
||||
kEproj_MotherBrainRoomTurrets_InstrLists = []
|
||||
kEproj_MotherBrainRoomTurrets_InstrLists_FaceDir = []
|
||||
kEprojInit_MotherBrainGlassShatteringShard_InstrPtrs = []
|
||||
kEprojInit_N00bTubeShards_InstrPtrs = []
|
||||
kEprojInit_SpikeShootingPlantSpikes_InstrList = []
|
||||
kSporeMovementData = []
|
||||
kEprojInit_NamiFuneFireball_XYvels = []
|
||||
kEprojInit_DustCloudOrExplosion_InstrLists = []
|
||||
kEprojInit_EyeDoorSmoke_XYpos = []
|
||||
kEprojInit_BotwoonsBody_InstrLists = []
|
||||
kEprojInit_Pickup_InstrLists = []
|
||||
kEprojInit_EnemyDeathExplosion_InstrLists = []
|
||||
kEprojInit_Sparks_EprojVars = []
|
||||
|
||||
|
||||
#Format is as follows:
|
||||
#rom.get_data(bank, starting address, ending address, "data type", array, "array name", hex bool, array bool, new line, new space)
|
||||
#"hex bool" is whether you want the data in hexadecimal or in decimal format
|
||||
#"array bool" is whether it's a single value or an array (will print [] if array, won't otherwise)
|
||||
#"new line/space" is how many elements you want before you insert a new line/space, -1 is never
|
||||
def get86():
|
||||
rom.get_data(0x86, 0x846B, 0x84FB, "uint16", kScreenShakeOffsets, "kScreenShakeOffsets", False, True, 18, -1)
|
||||
rom.get_data(0x94, 0x8B2B, 0x8D2B, "uint8", kAlignYPos_Tab0, "kAlignYPos_Tab0", False, True, 16, -1)
|
||||
rom.get_data(0x94, 0x892B, 0x8B2B, "uint8", kAlignXPos_Tab1, "kAlignXPos_Tab1", False, True, 16, -1)
|
||||
rom.get_data(0x86, 0x8A75, 0x8A7D, "uint16", kGarbageInstrList, "kGarbageInstrList", True, True, -1, 1)
|
||||
rom.get_data(0x86, 0x9105, 0x9115, "uint16", kCrocomireSpikeWallPieces_Ypos, "kCrocomireSpikeWallPieces_Ypos", True, True, -1, 1)
|
||||
rom.get_data(0x86, 0xA64D, 0xA65D, "uint16", kBombTorizoLowHealthDroolInstrlist, "kBombTorizoLowHealthDroolInstrlist", True, True, -1, 1)
|
||||
rom.get_data(0x86, 0xBB1E, 0xBB24, "uint16", kBB50InstrListPtrs_UNUSED, "kBB50InstrListPtrs_UNUSED", True, True, -1, 1)
|
||||
rom.get_data(0xA0, 0xCBC7, 0xCEBF, "uint16", kCommonEnemySpeeds_Quadratic_Copy, "kCommonEnemySpeeds_Quadratic_Copy", True, True, 16, 4)
|
||||
rom.get_data(0xA0, 0xCBC7, 0xCEBF, "uint32", kCommonEnemySpeeds_Quadratic32, "kCommonEnemySpeeds_Quadratic32", True, True, 8, 1)
|
||||
rom.get_data(0x86, 0xC929, 0xC92F, "uint16", kMotherBrainsDeathExplosionInstrListPtrs, "kMotherBrainsDeathExplosionInstrListPtrs", True, True, -1, 1)
|
||||
rom.get_data(0x86, 0x9059, 0x906B, "uint16", kCrocomireProjectile_Ypos, "kCrocomireProjectile_Ypos", True, True, -1, 3)
|
||||
rom.get_data(0x86, 0xA2E2, 0xA2EE, "uint16", kGunshipLiftoffDustCloudsInstrListPtrs, "kGunshipLiftoffDustCloudsInstrListPtrs", True, True, -1, 1)
|
||||
rom.get_data(0x86, 0xA7AB, 0xA7CB, "uint16", kEprojInit_BombTorizoStatueBreaking_InstrList, "kEprojInit_BombTorizoStatueBreaking_InstrList", True, True, -1, 1)
|
||||
rom.get_data(0x86, 0xB209, 0xB20D, "uint16", kGoldenTorizoSuperMissileInstrListPtrs, "kGoldenTorizoSuperMissileInstrListPtrs", True, True, -1, 1)
|
||||
rom.get_data(0x86, 0xBEE1, 0xBEF9, "uint16", kEproj_MotherBrainRoomTurrets_DirectionIndexes, "kEproj_MotherBrainRoomTurrets_DirectionIndexes", False, True, -1, 1)
|
||||
rom.get_data(0x86, 0xBEC9, 0xBEE1, "uint16", kEproj_MotherBrainRoomTurrets_AllowedRotations, "kEproj_MotherBrainRoomTurrets_AllowedRotations", True, True, -1, 1)
|
||||
rom.get_data(0x86, 0xBEB9, 0xBEC9, "uint16", kEproj_MotherBrainRoomTurrets_InstrLists, "kEproj_MotherBrainRoomTurrets_InstrLists", True, True, -1, 1)
|
||||
rom.get_data(0x86, 0xC040, 0xC050, "uint16", kEproj_MotherBrainRoomTurrets_InstrLists_FaceDir, "kEproj_MotherBrainRoomTurrets_InstrLists_FaceDir", True, True, -1, 1)
|
||||
rom.get_data(0x86, 0xCE41, 0xCE61, "uint16", kEprojInit_MotherBrainGlassShatteringShard_InstrPtrs, "kEprojInit_MotherBrainGlassShatteringShard_InstrPtrs", True, True, -1, 1)
|
||||
rom.get_data(0x86, 0xD760, 0xD774, "uint16", kEprojInit_N00bTubeShards_InstrPtrs, "kEprojInit_N00bTubeShards_InstrPtrs", True, True, -1, 1)
|
||||
rom.get_data(0x86, 0xD96A, 0xD97E, "uint16", kEprojInit_SpikeShootingPlantSpikes_InstrList, "kEprojInit_SpikeShootingPlantSpikes_InstrList", True, True, -1, 1)
|
||||
rom.get_data(0x86, 0xDD6C, 0xDE6C, "uint8", kSporeMovementData, "kSporeMovementData", True, True, 16, 2)
|
||||
rom.get_data(0x86, 0xDEB6, 0xDED6, "uint16", kEprojInit_NamiFuneFireball_XYvels, "kEprojInit_NamiFuneFireball_XYvels", True, True, -1, 2)
|
||||
rom.get_data(0x86, 0xE42C, 0xE468, "uint16", kEprojInit_DustCloudOrExplosion_InstrLists, "kEprojInit_DustCloudOrExplosion_InstrLists", True, True, 15, 1)
|
||||
rom.get_data(0x86, 0xE47E, 0xE4A6, "uint16", kEprojInit_EyeDoorSmoke_XYpos, "kEprojInit_EyeDoorSmoke_XYpos", True, True, 4, 1)
|
||||
rom.get_data(0x86, 0xE9F1, 0xEA31, "uint16", kEprojInit_BotwoonsBody_InstrLists, "kEprojInit_BotwoonsBody_InstrLists", True, True, 8, 1)
|
||||
rom.get_data(0x86, 0xEF04, 0xEF10, "uint16", kEprojInit_Pickup_InstrLists, "kEprojInit_Pickup_InstrLists", True, True, -1, 1)
|
||||
rom.get_data(0x86, 0xEFD5, 0xEFDF, "uint16", kEprojInit_EnemyDeathExplosion_InstrLists, "kEprojInit_EnemyDeathExplosion_InstrLists", True, True, -1, 1)
|
||||
rom.get_data(0x86, 0xF3D4, 0xF3F0, "uint16", kEprojInit_Sparks_EprojVars, "kEprojInit_Sparks_EprojVars", True, True, -1, 2)
|
||||
return
|
||||
|
||||
get86()
|
42
Port_Extraction/bank_88/extract_bank_88.py
Normal file
42
Port_Extraction/bank_88/extract_bank_88.py
Normal file
@ -0,0 +1,42 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
import common_data as rom
|
||||
|
||||
|
||||
#Pointers to code
|
||||
kPowerBombExplosionFreeSpace = []
|
||||
kPowerBombExplosionShapeTopOffset = []
|
||||
kPowerBombExplosionColors = []
|
||||
kPowerBombPreExplosionColors = []
|
||||
kBG3XscrollWave = []
|
||||
kHdmaScrollEntrys = []
|
||||
kLavaAcidBG2YScrollLongWave = []
|
||||
kLavaAcidBG2YScrollShortWave = []
|
||||
kBG3RainXvels = []
|
||||
kSuitPickupLightBeamCurveWidths = []
|
||||
kRainbowBeamHdmaValues = []
|
||||
kMorphBallEyeBeamHdmaValues = []
|
||||
|
||||
|
||||
#Format is as follows:
|
||||
#rom.get_data(bank, starting address, ending address, "data type", array, "array name", hex bool, array bool, new line, new space)
|
||||
#"hex bool" is whether you want the data in hexadecimal or in decimal format
|
||||
#"array bool" is whether it's a single value or an array (will print [] if array, won't otherwise)
|
||||
#"new line/space" is how many elements you want before you insert a new line/space, -1 is never
|
||||
def get88():
|
||||
rom.get_data(0x88, 0xA206, 0xA286, "uint8", kPowerBombExplosionFreeSpace, "kPowerBombExplosionFreeSpace", True, True, 16, 1)
|
||||
rom.get_data(0x88, 0xA286, 0xA2A6, "uint8", kPowerBombExplosionShapeTopOffset, "kPowerBombExplosionShapeTopOffset", True, True, 16, 1)
|
||||
rom.get_data(0x88, 0x8D85, 0x8DE5, "uint8", kPowerBombExplosionColors, "kPowerBombExplosionColors", True, True, 3, 3)
|
||||
rom.get_data(0x88, 0x9079, 0x90A9, "uint8", kPowerBombPreExplosionColors, "kPowerBombPreExplosionColors", True, True, 3, 3)
|
||||
rom.get_data(0x88, 0xA938, 0xAD18, "uint16", kBG3XscrollWave, "kBG3XscrollWave", True, True, 16, 1)
|
||||
rom.get_data(0x88, 0xAEC1, 0xAF7B, "HdmaScrollEntry", kHdmaScrollEntrys, "kHdmaScrollEntrys", True, True, 1, -1)
|
||||
rom.get_data(0x88, 0xB589, 0xB5A9, "uint16", kLavaAcidBG2YScrollLongWave, "kLavaAcidBG2YScrollLongWave", True, True, 8, 1)
|
||||
rom.get_data(0x88, 0xB60A, 0xB62A, "uint16", kLavaAcidBG2YScrollShortWave, "kLavaAcidBG2YScrollShortWave", True, True, 8, 1)
|
||||
rom.get_data(0x88, 0xD992, 0xD99A, "uint16", kBG3RainXvels, "kBG3RainXvels", True, True, 4, 1)
|
||||
rom.get_data(0x88, 0xE3C9, 0xE449, "uint8", kSuitPickupLightBeamCurveWidths, "kSuitPickupLightBeamCurveWidths", False, True, 16, 1)
|
||||
rom.get_data(0x88, 0xE833, 0xE8D9, "uint16", kRainbowBeamHdmaValues, "kRainbowBeamHdmaValues", True, True, 8, 1)
|
||||
rom.get_data(0x88, 0xEA8B, 0xEACB, "uint8", kMorphBallEyeBeamHdmaValues, "kMorphBallEyeBeamHdmaValues", False, True, 4, 1)
|
||||
return
|
||||
|
||||
get88()
|
27
Port_Extraction/bank_89/extract_bank_89.py
Normal file
27
Port_Extraction/bank_89/extract_bank_89.py
Normal file
@ -0,0 +1,27 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
import common_data as rom
|
||||
|
||||
|
||||
kPaletteBlends = []
|
||||
kFxTypeTilemapPtrs = []
|
||||
kAreaPalFxListPointers = []
|
||||
kAreaAnimtilesListPtrs = []
|
||||
kCereElevatorShaftMode7TransformationMatrix = []
|
||||
|
||||
#Format is as follows:
|
||||
#rom.get_data(bank, starting address, ending address, "data type", array, "array name", hex bool, array bool, new line, new space)
|
||||
#"hex bool" is whether you want the data in hexadecimal or in decimal format
|
||||
#"array bool" is whether it's a single value or an array (will print [] if array, won't otherwise)
|
||||
#"new line/space" is how many elements you want before you insert a new line/space, -1 is never
|
||||
def get89():
|
||||
rom.get_data(0x89, 0xAA02, 0xAB02, "uint16", kPaletteBlends, "kPaletteBlends", True, True, 16, 1)
|
||||
rom.get_data(0x83, 0xABF0, 0xAC1E, "uint16", kFxTypeTilemapPtrs, "kFxTypeTilemapPtrs", True, True, 10, 1)
|
||||
rom.get_data(0x83, 0xAC46, 0xAC56, "uint16", kAreaPalFxListPointers, "kAreaPalFxListPointers", True, True, -1, 1)
|
||||
rom.get_data(0x83, 0xAC56, 0xAC66, "uint16", kAreaAnimtilesListPtrs, "kAreaAnimtilesListPtrs", True, True, -1, 1)
|
||||
rom.get_data(0x89, 0xAD5F, 0xAEFD, "uint16", kCereElevatorShaftMode7TransformationMatrix, "kCereElevatorShaftMode7TransformationMatrix", True, True, 3, -1)
|
||||
return
|
||||
|
||||
|
||||
get89()
|
70
Port_Extraction/bank_8B/extract_bank_8B.py
Normal file
70
Port_Extraction/bank_8B/extract_bank_8B.py
Normal file
@ -0,0 +1,70 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
import common_data as rom
|
||||
|
||||
|
||||
kPalettes_Intro = []
|
||||
kPalettes_SpaceGunshipCeres = []
|
||||
kPalettes_PostCredits = []
|
||||
kPalettes_Credits = []
|
||||
kPalettes_ZebesExplosion = []
|
||||
kPalettes_ZebesExplosionClouds = []
|
||||
kInitialIntro_JapaneseTextTilemap = []
|
||||
kPage1Intro_JapaneseTextRegion = []
|
||||
kLevelData_MotherBrainRoomFromCutscene = []
|
||||
kLevelData_RoomWithBabyMetroidHatching = []
|
||||
kCredits_DeerForceTilemap = []
|
||||
kCredits_1994NintendoCredits = []
|
||||
kPalettes_EndingSuperMetroidIconGlare = []
|
||||
kCredits_ItemPercentageRamAddresses = []
|
||||
kCredits_ItemPercentageDivisors = []
|
||||
kCredits_ItemPercentageItemBits = []
|
||||
kCredits_ItemPercentageBeamBits = []
|
||||
kCredits_ItemPercentageDigitsTilemap = []
|
||||
kShootingStarTable = []
|
||||
kCinematicFunction_Intro_Func142_Tab0 = []
|
||||
kCinematicFunction_Intro_Func144_Tab0 = []
|
||||
kCredits_ItemPercentageJapaneseTextTilemap = []
|
||||
kShootingStarTileNumberAttributes = []
|
||||
kCinematicFunction_Intro_Func216_SourceAddresses = []
|
||||
kCinematicFunction_Intro_Func216_VramAddresses = []
|
||||
kPalettes_TitleScreen = []
|
||||
kTitleSequenceHdmaTablePtrs = []
|
||||
|
||||
#Format is as follows:
|
||||
#rom.get_data(bank, starting address, ending address, "data type", array, "array name", hex bool, array bool, new line, new space)
|
||||
#"hex bool" is whether you want the data in hexadecimal or in decimal format
|
||||
#"array bool" is whether it's a single value or an array (will print [] if array, won't otherwise)
|
||||
#"new line/space" is how many elements you want before you insert a new line/space, -1 is never
|
||||
def get8B():
|
||||
rom.get_data(0x8C, 0xE3E9, 0xE5E9, "uint16", kPalettes_Intro, "kPalettes_Intro", True, True, 16, -1)
|
||||
rom.get_data(0x8C, 0xE5E9, 0xE7E9, "uint16", kPalettes_SpaceGunshipCeres, "kPalettes_SpaceGunshipCeres", True, True, 16, -1)
|
||||
rom.get_data(0x8C, 0xE7E9, 0xE9E9, "uint16", kPalettes_PostCredits, "kPalettes_PostCredits", True, True, 16, -1)
|
||||
rom.get_data(0x8C, 0xE9E9, 0xEBE9, "uint16", kPalettes_Credits, "kPalettes_Credits", True, True, 16, -1)
|
||||
rom.get_data(0x8C, 0xEBE9, 0xEDE9, "uint16", kPalettes_ZebesExplosion, "kPalettes_ZebesExplosion", True, True, 16, -1)
|
||||
rom.get_data(0x8C, 0xEDE9, 0xEFE9, "uint16", kPalettes_ZebesExplosionClouds, "kPalettes_ZebesExplosionClouds", True, True, 16, -1)
|
||||
rom.get_data(0x8C, 0xD81B, 0xD91B, "uint16", kInitialIntro_JapaneseTextTilemap, "kInitialIntro_JapaneseTextTilemap", True, True, 32, -1)
|
||||
rom.get_data(0x8B, 0xA72B, 0xA82B, "uint16", kPage1Intro_JapaneseTextRegion, "kPage1Intro_JapaneseTextRegion", True, True, 32, -1)
|
||||
rom.get_data(0x8C, 0xBEC3, 0xC083, "uint16", kLevelData_MotherBrainRoomFromCutscene, "kLevelData_MotherBrainRoomFromCutscene", True, True, 16, -1)
|
||||
rom.get_data(0x8C, 0xC083, 0xC383, "uint16", kLevelData_RoomWithBabyMetroidHatching, "kLevelData_RoomWithBabyMetroidHatching", True, True, 32, -1)
|
||||
rom.get_data(0x8C, 0xDC9B, 0xDEDB, "uint16", kCredits_DeerForceTilemap, "kCredits_DeerForceTilemap", True, True, 32, -1)
|
||||
rom.get_data(0x8C, 0xDEDB, 0xDF5B, "uint16", kCredits_1994NintendoCredits, "kCredits_1994NintendoCredits", True, True, 32, -1)
|
||||
rom.get_data(0x8C, 0xEFE9, 0xF1E9, "uint16", kPalettes_EndingSuperMetroidIconGlare, "kPalettes_EndingSuperMetroidIconGlare", True, True, 16, -1)
|
||||
rom.get_data(0x8B, 0xE70D, 0xE717, "uint16", kCredits_ItemPercentageRamAddresses, "kCredits_ItemPercentageRamAddresses", True, True, -1, 1)
|
||||
rom.get_data(0x8B, 0xE717, 0xE721, "uint16", kCredits_ItemPercentageDivisors, "kCredits_ItemPercentageDivisors", False, True, -1, 1)
|
||||
rom.get_data(0x8B, 0xE721, 0xE737, "uint16", kCredits_ItemPercentageItemBits, "kCredits_ItemPercentageItemBits", True, True, -1, 1)
|
||||
rom.get_data(0x8B, 0xE737, 0xE741, "uint16", kCredits_ItemPercentageBeamBits, "kCredits_ItemPercentageBeamBits", True, True, -1, 1)
|
||||
rom.get_data(0x8B, 0xE741, 0xE769, "uint16", kCredits_ItemPercentageDigitsTilemap, "kCredits_ItemPercentageDigitsTilemap", True, True, 2, 1)
|
||||
rom.get_data(0x8B, 0xE9CF, 0xEB0F, "uint16", kShootingStarTable, "kShootingStarTable", True, True, 4, 1)
|
||||
rom.get_data(0x8B, 0xE45A, 0xE48A, "uint16", kCinematicFunction_Intro_Func142_Tab0, "kCinematicFunction_Intro_Func142_Tab0", True, True, 4, 1)
|
||||
rom.get_data(0x8B, 0xE5E7, 0xE627, "uint16", kCinematicFunction_Intro_Func144_Tab0, "kCinematicFunction_Intro_Func144_Tab0", True, True, 16, 2)
|
||||
rom.get_data(0x8C, 0xDF5B, 0xDFDB, "uint16", kCredits_ItemPercentageJapaneseTextTilemap, "kCredits_ItemPercentageJapaneseTextTilemap", True, True, 32, 1)
|
||||
rom.get_data(0x8B, 0xE9A7, 0xE9CF, "uint16", kShootingStarTileNumberAttributes, "kShootingStarTileNumberAttributes", True, True, 10, 1)
|
||||
rom.get_data(0x8B, 0xF6B8, 0xF6D8, "uint16", kCinematicFunction_Intro_Func216_SourceAddresses, "kCinematicFunction_Intro_Func216_SourceAddresses", True, True, 8, 1)
|
||||
rom.get_data(0x8B, 0xF6D8, 0xF6F8, "uint16", kCinematicFunction_Intro_Func216_VramAddresses, "kCinematicFunction_Intro_Func216_VramAddresses", True, True, 8, 1)
|
||||
rom.get_data(0x8C, 0xE1E9, 0xE3E9, "uint16", kPalettes_TitleScreen, "kPalettes_TitleScreen", True, True, 16, -1)
|
||||
rom.get_data(0x8C, 0xBC5D, 0xBC7D, "uint16", kTitleSequenceHdmaTablePtrs, "kTitleSequenceHdmaTablePtrs", True, True, -1, 1)
|
||||
return
|
||||
|
||||
get8B()
|
31
Port_Extraction/bank_90/extract_bank_90.py
Normal file
31
Port_Extraction/bank_90/extract_bank_90.py
Normal file
@ -0,0 +1,31 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
import common_data as rom
|
||||
|
||||
kSamusFramesForUnderwaterSfx = []
|
||||
kPauseMenuMapData = []
|
||||
kPauseMenuMapTilemaps = []
|
||||
kBeamTilePtrs = []
|
||||
kBeamPalettePtrs = []
|
||||
kLeftProjTrailInstrListPtrs = []
|
||||
kRightProjTrailInstrListPtrs = []
|
||||
kFlareAnimDelays = []
|
||||
|
||||
#Format is as follows:
|
||||
#rom.get_data(bank, starting address, ending address, "data type", array, "array name", hex bool, array bool, new line, new space)
|
||||
#"hex bool" is whether you want the data in hexadecimal or in decimal format
|
||||
#"array bool" is whether it's a single value or an array (will print [] if array, won't otherwise)
|
||||
#"new line/space" is how many elements you want before you insert a new line/space, -1 is never
|
||||
def get_90():
|
||||
rom.get_data(0x90, 0xA514, 0xA521, "uint8", kSamusFramesForUnderwaterSfx, "kSamusFramesForUnderwaterSfx", False, True, -1, 1)
|
||||
rom.get_data(0x82, 0x9717, 0x9727, "uint16", kPauseMenuMapData, "kPauseMenuMapData", True, True, -1, 1)
|
||||
rom.get_data(0x82, 0x964A, 0x965F, "LongPtr", kPauseMenuMapTilemaps, "kPauseMenuMapTilemaps", True, True, -1, 1)
|
||||
rom.get_data(0x90, 0xC3B1, 0xC3C9, "uint16", kBeamTilePtrs, "kBeamTilePtrs", True, True, -1, 1)
|
||||
rom.get_data(0x90, 0xC3C9, 0xC3E1, "uint16", kBeamPalettePtrs, "kBeamPalettePtrs", True, True, -1, 1)
|
||||
rom.get_data(0x90, 0xB5BB, 0xB609, "uint16", kLeftProjTrailInstrListPtrs, "kLeftProjTrailInstrListPtrs", True, True, 13, 1)
|
||||
rom.get_data(0x90, 0xB609, 0xB657, "uint16", kRightProjTrailInstrListPtrs, "kRightProjTrailInstrListPtrs", True, True, 13, 1)
|
||||
rom.get_data(0x90, 0xC481, 0xC487, "uint16", kFlareAnimDelays, "kFlareAnimDelays", True, True, -1, 1)
|
||||
return
|
||||
|
||||
get_90()
|
59
Port_Extraction/bank_91/extract_bank_91.py
Normal file
59
Port_Extraction/bank_91/extract_bank_91.py
Normal file
@ -0,0 +1,59 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
import common_data as rom
|
||||
|
||||
kXrayBlockData = []
|
||||
kSamusPalette_Normal = []
|
||||
kSamusPalette_HyperBeam = []
|
||||
kSamusPalette_NonPseudoScrew = []
|
||||
kSamusPalette_PseudoScrew = []
|
||||
kSamus_VisorColors = []
|
||||
kSamus_SpeedBoostingPalettes = []
|
||||
kSamus_HyperBeamPalettes = []
|
||||
kSamusPal_ScrewAttack = []
|
||||
kSamusPal_SpeedBoost = []
|
||||
kSamusPal_SpeedBoostShine = []
|
||||
kSamusPal_Shinespark = []
|
||||
kSamusPal_CrystalFlash0to9 = []
|
||||
kSamusPal_CrystalFlash10to15 = []
|
||||
kSamusPose_Falling = []
|
||||
kSamusPose_Landing = []
|
||||
kSamusPose_RanIntoWall = []
|
||||
kSamusTurnPose_Standing = []
|
||||
kSamusTurnPose_Crouching = []
|
||||
kSamusTurnPose_Jumping = []
|
||||
kSamusTurnPose_Falling = []
|
||||
kSamusTurnPose_Moonwalk = []
|
||||
|
||||
#Format is as follows:
|
||||
#rom.get_data(bank, starting address, ending address, "data type", array, "array name", hex bool, array bool, new line, new space)
|
||||
#"hex bool" is whether you want the data in hexadecimal or in decimal format
|
||||
#"array bool" is whether it's a single value or an array (will print [] if array, won't otherwise)
|
||||
#"new line/space" is how many elements you want before you insert a new line/space, -1 is never
|
||||
def get_91():
|
||||
rom.get_data(0x91, 0xD2D6, 0xD2FC, "XrayBlockData", kXrayBlockData, "kXrayBlockData", True, True, 1, -1)
|
||||
rom.get_data(0x91, 0xD727, 0xD72D, "uint16", kSamusPalette_Normal, "kSamusPalette_Normal", True, True, -1, 1)
|
||||
rom.get_data(0x91, 0xD829, 0xD83F, "uint16", kSamusPalette_HyperBeam, "kSamusPalette_HyperBeam", True, True, -1, 1)
|
||||
rom.get_data(0x91, 0xD7D5, 0xD7DB, "uint16", kSamusPalette_NonPseudoScrew, "kSamusPalette_NonPseudoScrew", True, True, -1, 1)
|
||||
rom.get_data(0x91, 0xD7FF, 0xD805, "uint16", kSamusPalette_PseudoScrew, "kSamusPalette_PseudoScrew", True, True, -1, 1)
|
||||
rom.get_data(0x9B, 0xA3C0, 0xA3CC, "uint16", kSamus_VisorColors, "kSamus_VisorColors", True, True, 3, 1)
|
||||
rom.get_data(0x91, 0xD998, 0xD99E, "uint16", kSamus_SpeedBoostingPalettes, "kSamus_SpeedBoostingPalettes", True, True, -1, 1)
|
||||
rom.get_data(0x91, 0xD99E, 0xD9B2, "uint16", kSamus_HyperBeamPalettes, "kSamus_HyperBeamPalettes", True, True, -1, 1)
|
||||
rom.get_data(0x91, 0xDA4A, 0xDA50, "uint16", kSamusPal_ScrewAttack, "kSamusPal_ScrewAttack", True, True, -1, 1)
|
||||
rom.get_data(0x91, 0xDAA9, 0xDAAF, "uint16", kSamusPal_SpeedBoost, "kSamusPal_SpeedBoost", True, True, -1, 1)
|
||||
rom.get_data(0x91, 0xDB10, 0xDB16, "uint16", kSamusPal_SpeedBoostShine, "kSamusPal_SpeedBoostShine", True, True, -1, 1)
|
||||
rom.get_data(0x91, 0xDB75, 0xDB7B, "uint16", kSamusPal_Shinespark, "kSamusPal_Shinespark", True, True, -1, 1)
|
||||
rom.get_data(0x91, 0xDC00, 0xDC28, "SamusCrystalFlashPalTable", kSamusPal_CrystalFlash0to9, "kSamusPal_CrystalFlash0to9", True, True, -1, 1)
|
||||
rom.get_data(0x91, 0xDC28, 0xDC34, "uint16", kSamusPal_CrystalFlash10to15, "kSamusPal_CrystalFlash10to15", True, True, -1, 1)
|
||||
rom.get_data(0x91, 0xE921, 0xE931, "uint16", kSamusPose_Falling, "kSamusPose_Falling", True, True, 2, -1)
|
||||
rom.get_data(0x91, 0xE9F3, 0xEA07, "uint16", kSamusPose_Landing, "kSamusPose_Landing", True, True, 5, -1)
|
||||
rom.get_data(0x91, 0xEB74, 0xEB88, "uint16", kSamusPose_RanIntoWall, "kSamusPose_RanIntoWall", True, True, 5, -1)
|
||||
rom.get_data(0x91, 0xF9C2, 0xF9CC, "uint8", kSamusTurnPose_Standing, "kSamusTurnPose_Standing", True, True, -1, 1)
|
||||
rom.get_data(0x91, 0xF9CC, 0xF9D6, "uint8", kSamusTurnPose_Crouching, "kSamusTurnPose_Crouching", True, True, -1, 1)
|
||||
rom.get_data(0x91, 0xF9D6, 0xF9E0, "uint8", kSamusTurnPose_Jumping, "kSamusTurnPose_Jumping", True, True, -1, 1)
|
||||
rom.get_data(0x91, 0xF9E0, 0xF9EA, "uint8", kSamusTurnPose_Falling, "kSamusTurnPose_Falling", True, True, -1, 1)
|
||||
rom.get_data(0x91, 0xF9EA, 0xF9F4, "uint8", kSamusTurnPose_Moonwalk, "kSamusTurnPose_Moonwalk", True, True, -1, 1)
|
||||
return
|
||||
|
||||
get_91()
|
172
Port_Extraction/bank_91/extract_samus_pose_transitions.py
Normal file
172
Port_Extraction/bank_91/extract_samus_pose_transitions.py
Normal file
@ -0,0 +1,172 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
import common_data as rom
|
||||
|
||||
class PoseEntry:
|
||||
def __init__(self, addr):
|
||||
self.new_input = rom.get_word(addr)
|
||||
self.cur_input = rom.get_word(addr+2)
|
||||
self.new_pose = rom.get_word(addr+4)
|
||||
|
||||
poses_text = open('poses.txt', 'r')
|
||||
poses = []
|
||||
|
||||
transition_table_ptrs = []
|
||||
transitions = [[]]
|
||||
transition_ptrs_found = []
|
||||
|
||||
input_values = {
|
||||
1 << 4 : "kButton_R",
|
||||
1 << 5 : "kButton_L",
|
||||
1 << 6 : "kButton_X",
|
||||
1 << 7 : "kButton_A",
|
||||
1 << 8 : "kButton_Right",
|
||||
1 << 9 : "kButton_Left",
|
||||
1 << 10 : "kButton_Down",
|
||||
1 << 11 : "kButton_Up",
|
||||
1 << 12 : "kButton_Start",
|
||||
1 << 13 : "kButton_Select",
|
||||
1 << 14 : "kButton_Y",
|
||||
1 << 15 : "kButton_B",
|
||||
}
|
||||
|
||||
def get_transition_table():
|
||||
rom.get_data(0x91, 0x9EE2, 0xA0DC, "uint16", transition_table_ptrs, "transition_table_ptr", True, True, -1, 1)
|
||||
return
|
||||
|
||||
def get_unique_transitions():
|
||||
for transition_ptr in transition_table_ptrs:
|
||||
if transition_ptr.word not in transition_ptrs_found:
|
||||
transition_ptrs_found.append(transition_ptr.word)
|
||||
return
|
||||
|
||||
def get_transitions_from_table_entries():
|
||||
index_into_transitions = 0
|
||||
data = 0
|
||||
for transition_ptr in transition_ptrs_found:
|
||||
|
||||
while True:
|
||||
data = rom.get_word(0x91 << 16 | transition_ptr)
|
||||
if data == 0xFFFF:
|
||||
transitions[index_into_transitions].append(data)
|
||||
break
|
||||
|
||||
new_transition = PoseEntry(0x91 << 16 | transition_ptr)
|
||||
transitions[index_into_transitions].append(new_transition)
|
||||
transition_ptr += 6
|
||||
|
||||
transitions.append([])
|
||||
index_into_transitions += 1
|
||||
|
||||
transitions.pop()
|
||||
return
|
||||
|
||||
def convert_data_into_inputs():
|
||||
index_into_transitions = 0
|
||||
index_into_inputs = 0
|
||||
for transition in transitions:
|
||||
for data in transition:
|
||||
if transitions[index_into_transitions][index_into_inputs] != 0xFFFF:
|
||||
value = 0x10
|
||||
new_input = data.new_input
|
||||
cur_input = data.cur_input
|
||||
transitions[index_into_transitions][index_into_inputs].new_input = ""
|
||||
transitions[index_into_transitions][index_into_inputs].cur_input = ""
|
||||
|
||||
while value <= 0x8000:
|
||||
if new_input & value != 0:
|
||||
transitions[index_into_transitions][index_into_inputs].new_input += input_values.get(value) + "+"
|
||||
if cur_input & value != 0:
|
||||
transitions[index_into_transitions][index_into_inputs].cur_input += input_values.get(value) + "+"
|
||||
value = value << 1
|
||||
|
||||
if len(transitions[index_into_transitions][index_into_inputs].new_input) > 0:
|
||||
transitions[index_into_transitions][index_into_inputs].new_input = transitions[index_into_transitions][index_into_inputs].new_input.rstrip(transitions[index_into_transitions][index_into_inputs].new_input[-1])
|
||||
else:
|
||||
transitions[index_into_transitions][index_into_inputs].new_input = 0
|
||||
|
||||
if len(transitions[index_into_transitions][index_into_inputs].cur_input) > 0:
|
||||
transitions[index_into_transitions][index_into_inputs].cur_input = transitions[index_into_transitions][index_into_inputs].cur_input.rstrip(transitions[index_into_transitions][index_into_inputs].cur_input[-1])
|
||||
else:
|
||||
transitions[index_into_transitions][index_into_inputs].cur_input = 0
|
||||
|
||||
transitions[index_into_transitions][index_into_inputs].new_pose = poses[transitions[index_into_transitions][index_into_inputs].new_pose]
|
||||
|
||||
index_into_inputs += 1
|
||||
if len(transitions[index_into_transitions]) < index_into_inputs + 1:
|
||||
index_into_transitions += 1
|
||||
index_into_inputs = 0
|
||||
|
||||
return
|
||||
|
||||
def get_poses_from_text():
|
||||
for pose in poses_text:
|
||||
new_pose = pose.strip()
|
||||
poses.append(new_pose)
|
||||
return
|
||||
|
||||
def get_arrays():
|
||||
return
|
||||
|
||||
def get_switch_cases():
|
||||
case_transitions = " switch (samus_pose) {\n"
|
||||
index_into_transitions = 0
|
||||
transition_found_flag = False
|
||||
for transition_ptr in transition_table_ptrs:
|
||||
|
||||
for i in range(index_into_transitions):
|
||||
if transition_ptr.word == transition_table_ptrs[i].word:
|
||||
transition_found_flag = True
|
||||
#length = len(("Trans_" + hex(i)[2:].zfill(2)))
|
||||
index = case_transitions.find("Trans_" + hex(i)[2:].zfill(2))
|
||||
#case_transitions = case_transitions[:index + length] + "_" + (hex(index_into_transitions)[2:].zfill(2)) + case_transitions[index + length:]
|
||||
case_transitions = case_transitions[:index - 8] + "\n case " + poses[index_into_transitions] + ": " + case_transitions[index - 8:]
|
||||
break
|
||||
|
||||
if transition_found_flag == True:
|
||||
transition_found_flag = False
|
||||
index_into_transitions += 1
|
||||
continue
|
||||
case_transitions += " case " + poses[index_into_transitions] + ": "
|
||||
transition_number = hex(index_into_transitions)[2:].zfill(2)
|
||||
index_into_transitions += 1
|
||||
case_transitions += "return Trans_" + transition_number + ";\n"
|
||||
|
||||
case_transitions += " }"
|
||||
return case_transitions
|
||||
|
||||
def get_transition_arrays():
|
||||
case_transitions = get_switch_cases()
|
||||
transition_arrays = ""
|
||||
index_into_transitions = 0
|
||||
indices = [i for i in range(len(case_transitions)) if case_transitions.startswith(' Trans_', i)]
|
||||
for transition in transitions:
|
||||
transition_arrays += " static uint16"
|
||||
transition_arrays += case_transitions[indices[index_into_transitions]:indices[index_into_transitions] + 9]
|
||||
transition_arrays += "[] = { // " + str(hex(0x91 << 16 | transition_ptrs_found[index_into_transitions])) + "\n"
|
||||
for data in transition:
|
||||
if data != 0xFFFF:
|
||||
transition_arrays += " %-35s, " % str(data.new_input)
|
||||
transition_arrays += "%-35s, " % str(data.cur_input)
|
||||
transition_arrays += "%-35s, \n" % str(data.new_pose)
|
||||
else:
|
||||
transition_arrays += " " + str(hex(data)) + "\n };\n\n"
|
||||
index_into_transitions += 1
|
||||
return transition_arrays
|
||||
|
||||
def output_samus_pose_transition_table():
|
||||
cases = get_switch_cases()
|
||||
arrays = get_transition_arrays()
|
||||
output = "uint16* kPoseTransitionTable(void) {\n" + arrays + cases + "\n}"
|
||||
sys.stdout.write(output)
|
||||
return
|
||||
|
||||
get_transition_table()
|
||||
get_unique_transitions()
|
||||
get_transitions_from_table_entries()
|
||||
get_poses_from_text()
|
||||
convert_data_into_inputs()
|
||||
#get_transition_arrays()
|
||||
#get_switch_cases()
|
||||
output_samus_pose_transition_table()
|
253
Port_Extraction/bank_91/poses.txt
Normal file
253
Port_Extraction/bank_91/poses.txt
Normal file
@ -0,0 +1,253 @@
|
||||
kPose_00_FaceF_Powersuit
|
||||
kPose_01_FaceR_Normal
|
||||
kPose_02_FaceL_Normal
|
||||
kPose_03_FaceR_AimU
|
||||
kPose_04_FaceL_AimU
|
||||
kPose_05_FaceR_AimUR
|
||||
kPose_06_FaceL_AimUL
|
||||
kPose_07_FaceR_AimDR
|
||||
kPose_08_FaceL_AimDL
|
||||
kPose_09_MoveR_NoAim
|
||||
kPose_0A_MoveL_NoAim
|
||||
kPose_0B_MoveR_Gun
|
||||
kPose_0C_MoveL_Gun
|
||||
kPose_0D
|
||||
kPose_0E
|
||||
kPose_0F_MoveR_AimUR
|
||||
kPose_10_MoveL_AimUL
|
||||
kPose_11_MoveR_AimDR
|
||||
kPose_12_MoveL_AimDL
|
||||
kPose_13_FaceR_Jump_NoAim_NoMove_Gun
|
||||
kPose_14_FaceL_Jump_NoAim_NoMove_Gun
|
||||
kPose_15_FaceR_Jump_AimU
|
||||
kPose_16_FaceL_Jump_AimU
|
||||
kPose_17_FaceR_Jump_AimD
|
||||
kPose_18_FaceL_Jump_AimD
|
||||
kPose_19_FaceR_SpinJump
|
||||
kPose_1A_FaceL_SpinJump
|
||||
kPose_1B_FaceR_SpaceJump
|
||||
kPose_1C_FaceL_SpaceJump
|
||||
kPose_1D_FaceR_Morphball_Ground
|
||||
kPose_1E_MoveR_Morphball_Ground
|
||||
kPose_1F_MoveL_Morphball_Ground
|
||||
kPose_20
|
||||
kPose_21
|
||||
kPose_22
|
||||
kPose_23
|
||||
kPose_24
|
||||
kPose_25_FaceR_Turn_Stand
|
||||
kPose_26_FaceL_Turn_Stand
|
||||
kPose_27_FaceR_Crouch
|
||||
kPose_28_FaceL_Crouch
|
||||
kPose_29_FaceR_Fall
|
||||
kPose_2A_FaceL_Fall
|
||||
kPose_2B_FaceR_Fall_AimU
|
||||
kPose_2C_FaceL_Fall_AimU
|
||||
kPose_2D_FaceR_Fall_AimD
|
||||
kPose_2E_FaceL_Fall_AimD
|
||||
kPose_2F_FaceR_Turn_Jump
|
||||
kPose_30_FaceL_Turn_Jump
|
||||
kPose_31_FaceR_Morphball_Air
|
||||
kPose_32_FaceL_Morphball_Air
|
||||
kPose_33
|
||||
kPose_34
|
||||
kPose_35_FaceR_CrouchTrans
|
||||
kPose_36_FaceL_CrouchTrans
|
||||
kPose_37_FaceR_MorphTrans
|
||||
kPose_38_FaceL_MorphTrans
|
||||
kPose_39
|
||||
kPose_3A
|
||||
kPose_3B_FaceR_StandTrans
|
||||
kPose_3C_FaceL_StandTrans
|
||||
kPose_3D_FaceR_UnmorphTrans
|
||||
kPose_3E_FaceL_UnmorphTrans
|
||||
kPose_3F
|
||||
kPose_40
|
||||
kPose_41_FaceL_Morphball_Ground
|
||||
kPose_42
|
||||
kPose_43_FaceR_Turn_Crouch
|
||||
kPose_44_FaceL_Turn_Crouch
|
||||
kPose_45
|
||||
kPose_46
|
||||
kPose_47
|
||||
kPose_48
|
||||
kPose_49_FaceL_Moonwalk
|
||||
kPose_4A_FaceR_Moonwalk
|
||||
kPose_4B_FaceR_Jumptrans
|
||||
kPose_4C_FaceL_Jumptrans
|
||||
kPose_4D_FaceR_Jump_NoAim_NoMove_NoGun
|
||||
kPose_4E_FaceL_Jump_NoAim_NoMove_NoGun
|
||||
kPose_4F_FaceL_Dmgboost
|
||||
kPose_50_FaceR_Dmgboost
|
||||
kPose_51_FaceR_Jump_NoAim_MoveF
|
||||
kPose_52_FaceL_Jump_NoAim_MoveF
|
||||
kPose_53_FaceR_Knockback
|
||||
kPose_54_FaceL_Knockback
|
||||
kPose_55_FaceR_Jumptrans_AimU
|
||||
kPose_56_FaceL_Jumptrans_AimU
|
||||
kPose_57_FaceR_Jumptrans_AimUR
|
||||
kPose_58_FaceL_Jumptrans_AimUL
|
||||
kPose_59_FaceR_Jumptrans_AimDR
|
||||
kPose_5A_FaceL_Jumptrans_AimDL
|
||||
kPose_5B
|
||||
kPose_5C
|
||||
kPose_5D
|
||||
kPose_5E
|
||||
kPose_5F
|
||||
kPose_60
|
||||
kPose_61
|
||||
kPose_62
|
||||
kPose_63
|
||||
kPose_64
|
||||
kPose_65
|
||||
kPose_66
|
||||
kPose_67_FaceR_Fall_Gun
|
||||
kPose_68_FaceL_Fall_Gun
|
||||
kPose_69_FaceR_Jump_AimUR
|
||||
kPose_6A_FaceL_Jump_AimUL
|
||||
kPose_6B_FaceR_Jump_AimDR
|
||||
kPose_6C_FaceL_Jump_AimDL
|
||||
kPose_6D_FaceR_Fall_AimUR
|
||||
kPose_6E_FaceL_Fall_AimUL
|
||||
kPose_6F_FaceR_Fall_AimDR
|
||||
kPose_70_FaceL_Fall_AimDL
|
||||
kPose_71_FaceR_Crouch_AimUR
|
||||
kPose_72_FaceL_Crouch_AimUL
|
||||
kPose_73_FaceR_Crouch_AimDR
|
||||
kPose_74_FaceL_Crouch_AimDL
|
||||
kPose_75_FaceL_Moonwalk_AimUL
|
||||
kPose_76_FaceR_Moonwalk_AimUR
|
||||
kPose_77_FaceL_Moonwalk_AimDL
|
||||
kPose_78_FaceR_Moonwalk_AimDR
|
||||
kPose_79_FaceR_Springball_Ground
|
||||
kPose_7A_FaceL_Springball_Ground
|
||||
kPose_7B_MoveR_Springball_Ground
|
||||
kPose_7C_MoveL_Springball_Ground
|
||||
kPose_7D_FaceR_Springball_Fall
|
||||
kPose_7E_FaceL_Springball_Fall
|
||||
kPose_7F_FaceR_Springball_Air
|
||||
kPose_80_FaceL_Springball_Air
|
||||
kPose_81_FaceR_Screwattack
|
||||
kPose_82_FaceL_Screwattack
|
||||
kPose_83_FaceR_Walljump
|
||||
kPose_84_FaceL_Walljump
|
||||
kPose_85_FaceR_Crouch_AimU
|
||||
kPose_86_FaceL_Crouch_AimU
|
||||
kPose_87_FaceR_Turn_Fall
|
||||
kPose_88_FaceL_Turn_Fall
|
||||
kPose_89_FaceR_Ranintowall
|
||||
kPose_8A_FaceL_Ranintowall
|
||||
kPose_8B_FaceR_Turn_Stand_AimU
|
||||
kPose_8C_FaceL_Turn_Stand_AimU
|
||||
kPose_8D_FaceR_Turn_Stand_AimDR
|
||||
kPose_8E_FaceL_Turn_Stand_AimDL
|
||||
kPose_8F_FaceR_Turn_Air_AimU
|
||||
kPose_90_FaceL_Turn_Air_AimU
|
||||
kPose_91_FaceR_Turn_Air_AimDDR
|
||||
kPose_92_FaceL_Turn_Air_AimDDL
|
||||
kPose_93_FaceR_Turn_Fall_AimU
|
||||
kPose_94_FaceL_Turn_Fall_AimU
|
||||
kPose_95_FaceR_Turn_Fall_AimDDR
|
||||
kPose_96_FaceL_Turn_Fall_AimDDL
|
||||
kPose_97_FaceR_Turn_Crouch_AimU
|
||||
kPose_98_FaceL_Turn_Crouch_AimU
|
||||
kPose_99_FaceR_Turn_Crouch_AimDDR
|
||||
kPose_9A_FaceL_Turn_Crouch_AimDDL
|
||||
kPose_9B_FaceF_VariaGravitySuit
|
||||
kPose_9C_FaceR_Turn_Stand_AimUR
|
||||
kPose_9D_FaceL_Turn_Stand_AimUL
|
||||
kPose_9E_FaceR_Turn_Air_AimUR
|
||||
kPose_9F_FaceL_Turn_Air_AimUL
|
||||
kPose_A0_FaceR_Turn_Fall_AimUR
|
||||
kPose_A1_FaceL_Turn_Fall_AimUL
|
||||
kPose_A2_FaceR_Turn_Crouch_AimUR
|
||||
kPose_A3_FaceL_Turn_Crouch_AimUL
|
||||
kPose_A4_FaceR_LandJump
|
||||
kPose_A5_FaceL_LandJump
|
||||
kPose_A6_FaceR_LandSpinJump
|
||||
kPose_A7_FaceL_LandSpinJump
|
||||
kPose_A8_FaceR_Grappling
|
||||
kPose_A9_FaceL_Grappling
|
||||
kPose_AA_FaceR_Grappling_AimDR
|
||||
kPose_AB_FaceL_Grappling_AimDL
|
||||
kPose_AC
|
||||
kPose_AD
|
||||
kPose_AE
|
||||
kPose_AF
|
||||
kPose_B0
|
||||
kPose_B1
|
||||
kPose_B2_FaceR_Grapple_Air
|
||||
kPose_B3_FaceL_Grapple_Air
|
||||
kPose_B4_FaceR_Grappling_Crouch
|
||||
kPose_B5_FaceL_Grappling_Crouch
|
||||
kPose_B6_FaceR_Grappling_Crouch_AimDR
|
||||
kPose_B7_FaceL_Grappling_Crouch_AimDL
|
||||
kPose_B8_FaceL_GrappleWalljumpPose
|
||||
kPose_B9_FaceR_GrappleWalljumpPose
|
||||
kPose_BA_FaceL_Draygon_NoMove_NoAim
|
||||
kPose_BB_FaceL_Draygon_NoMove_AimUL
|
||||
kPose_BC_FaceL_Draygon_Fire
|
||||
kPose_BD_FaceL_Draygon_NoMove_AimDL
|
||||
kPose_BE_FaceL_Draygon_Move
|
||||
kPose_BF_FaceR_Moonwalk_TurnjumpL
|
||||
kPose_C0_FaceL_Moonwalk_TurnjumpR
|
||||
kPose_C1_FaceR_Moonwalk_TurnjumpL_AimUR
|
||||
kPose_C2_FaceL_Moonwalk_TurnjumpR_AimUL
|
||||
kPose_C3_FaceR_Moonwalk_TurnjumpL_AimDR
|
||||
kPose_C4_FaceL_Moonwalk_TurnjumpR_AimDL
|
||||
kPose_C5
|
||||
kPose_C6
|
||||
kPose_C7_FaceR_ShinesparkWindup_Vert
|
||||
kPose_C8_FaceL_ShinesparkWindup_Vert
|
||||
kPose_C9_FaceR_Shinespark_Horiz
|
||||
kPose_CA_FaceL_Shinespark_Horiz
|
||||
kPose_CB_FaceR_Shinespark_Vert
|
||||
kPose_CC_FaceL_Shinespark_Vert
|
||||
kPose_CD_FaceR_Shinespark_Diag
|
||||
kPose_CE_FaceL_Shinespark_Diag
|
||||
kPose_CF_FaceR_Ranintowall_AimUR
|
||||
kPose_D0_FaceL_Ranintowall_AimUL
|
||||
kPose_D1_FaceR_Ranintowall_AimDR
|
||||
kPose_D2_FaceL_Ranintowall_AimDL
|
||||
kPose_D3_FaceR_CrystalFlash
|
||||
kPose_D4_FaceL_CrystalFlash
|
||||
kPose_D5_FaceR_Xray_Stand
|
||||
kPose_D6_FaceL_Xray_Stand
|
||||
kPose_D7_FaceR_CrystalFlashEnd
|
||||
kPose_D8_FaceL_CrystalFlashEnd
|
||||
kPose_D9_FaceR_Xray_Crouch
|
||||
kPose_DA_FaceL_Xray_Crouch
|
||||
kPose_DB
|
||||
kPose_DC
|
||||
kPose_DD
|
||||
kPose_DE
|
||||
kPose_DF
|
||||
kPose_E0_FaceR_LandJump_AimU
|
||||
kPose_E1_FaceL_LandJump_AimU
|
||||
kPose_E2_FaceR_LandJump_AimUR
|
||||
kPose_E3_FaceL_LandJump_AimUL
|
||||
kPose_E4_FaceR_LandJump_AimDR
|
||||
kPose_E5_FaceL_LandJump_AimDL
|
||||
kPose_E6_FaceR_LandJump_Fire
|
||||
kPose_E7_FaceL_LandJump_Fire
|
||||
kPose_E8_FaceR_Drained_CrouchFalling
|
||||
kPose_E9_FaceL_Drained_CrouchFalling
|
||||
kPose_EA_FaceR_Drained_Stand
|
||||
kPose_EB_FaceL_Drained_Stand
|
||||
kPose_EC_FaceR_Draygon_NoMove_NoAim
|
||||
kPose_ED_FaceR_Draygon_NoMove_AimUR
|
||||
kPose_EE_FaceR_Draygon_Fire
|
||||
kPose_EF_FaceR_Draygon_NoMove_AimDR
|
||||
kPose_F0_FaceR_Draygon_Move
|
||||
kPose_F1_FaceR_CrouchTrans_AimU
|
||||
kPose_F2_FaceL_CrouchTrans_AimU
|
||||
kPose_F3_FaceR_CrouchTrans_AimUR
|
||||
kPose_F4_FaceL_CrouchTrans_AimUL
|
||||
kPose_F5_FaceR_CrouchTrans_AimDR
|
||||
kPose_F6_FaceL_CrouchTrans_AimDL
|
||||
kPose_F7_FaceR_StandTrans_AimU
|
||||
kPose_F8_FaceL_StandTrans_AimU
|
||||
kPose_F9_FaceR_StandTrans_AimUR
|
||||
kPose_FA_FaceL_StandTrans_AimUL
|
||||
kPose_FB_FaceR_StandTrans_AimDR
|
||||
kPose_FC_FaceL_StandTrans_AimDL
|
21
Port_Extraction/bank_92/extract_bank_92.py
Normal file
21
Port_Extraction/bank_92/extract_bank_92.py
Normal file
@ -0,0 +1,21 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
import common_data as rom
|
||||
|
||||
kSamus_AnimationDefinitionPtrs = []
|
||||
kSamus_TileDefs_TopHalf = []
|
||||
kSamus_TileDefs_BottomHalf = []
|
||||
|
||||
#Format is as follows:
|
||||
#rom.get_data(bank, starting address, ending address, "data type", array, "array name", hex bool, array bool, new line, new space)
|
||||
#"hex bool" is whether you want the data in hexadecimal or in decimal format
|
||||
#"array bool" is whether it's a single value or an array (will print [] if array, won't otherwise)
|
||||
#"new line/space" is how many elements you want before you insert a new line/space, -1 is never
|
||||
def get_92():
|
||||
rom.get_data(0x92, 0xD94E, 0xDB48, "uint16", kSamus_AnimationDefinitionPtrs, "kSamus_AnimationDefinitionPtrs", True, True, 16, 1)
|
||||
rom.get_data(0x92, 0xD91E, 0xD938, "uint16", kSamus_TileDefs_TopHalf, "kSamus_TileDefs_TopHalf", True, True, -1, 1)
|
||||
rom.get_data(0x92, 0xD938, 0xD94E, "uint16", kSamus_TileDefs_BottomHalf, "kSamus_TileDefs_BottomHalf", True, True, -1, 1)
|
||||
return
|
||||
|
||||
get_92()
|
35
Port_Extraction/bank_93/extract_bank_93.py
Normal file
35
Port_Extraction/bank_93/extract_bank_93.py
Normal file
@ -0,0 +1,35 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
import common_data as rom
|
||||
|
||||
kProjectileData_UnchargedBeams = []
|
||||
kProjectileData_ChargedBeams = []
|
||||
kProjectileData_NonBeams = []
|
||||
kShinesparkEchoSpazer_ProjectileData = []
|
||||
kRunInstrForSuperMissile = []
|
||||
kProjInstrList_SuperMissileExplosion = []
|
||||
kProjInstrList_MissileExplosion = []
|
||||
kProjInstrList_BeamExplosion = []
|
||||
kProjInstrList_BombExplosion = []
|
||||
kProjectileData_SBA = []
|
||||
|
||||
#Format is as follows:
|
||||
#rom.get_data(bank, starting address, ending address, "data type", array, "array name", hex bool, array bool, new line, new space)
|
||||
#"hex bool" is whether you want the data in hexadecimal or in decimal format
|
||||
#"array bool" is whether it's a single value or an array (will print [] if array, won't otherwise)
|
||||
#"new line/space" is how many elements you want before you insert a new line/space, -1 is never
|
||||
def get_93():
|
||||
rom.get_data(0x93, 0x83C1, 0x83D9, "uint16", kProjectileData_UnchargedBeams, "kProjectileData_UnchargedBeams", True, True, -1, 1)
|
||||
rom.get_data(0x93, 0x83D9, 0x83F1, "uint16", kProjectileData_ChargedBeams, "kProjectileData_ChargedBeams", True, True, -1, 1)
|
||||
rom.get_data(0x93, 0x83F1, 0x8403, "uint16", kProjectileData_NonBeams, "kProjectileData_NonBeams", True, True, -1, 1)
|
||||
rom.get_data(0x93, 0x8403, 0x8413, "uint16", kShinesparkEchoSpazer_ProjectileData, "kShinesparkEchoSpazer_ProjectileData", True, True, -1, 1)
|
||||
rom.get_data(0x93, 0x842B, 0x8431, "uint16", kRunInstrForSuperMissile, "kRunInstrForSuperMissile", True, True, -1, 1)
|
||||
rom.get_data(0x93, 0x8691, 0x8695, "ProjectileDamagesAndInstrPtr", kProjInstrList_SuperMissileExplosion, "kProjInstrList_SuperMissileExplosion", True, False, -1, -1)
|
||||
rom.get_data(0x93, 0x867D, 0x8681, "ProjectileDamagesAndInstrPtr", kProjInstrList_MissileExplosion, "kProjInstrList_MissileExplosion", True, False, -1, -1)
|
||||
rom.get_data(0x93, 0x8679, 0x867D, "ProjectileDamagesAndInstrPtr", kProjInstrList_BeamExplosion, "kProjInstrList_BeamExplosion", True, False, -1, -1)
|
||||
rom.get_data(0x93, 0x8681, 0x8685, "ProjectileDamagesAndInstrPtr", kProjInstrList_BombExplosion, "kProjInstrList_BombExplosion", True, False, -1, 1)
|
||||
rom.get_data(0x93, 0x8413, 0x842B, "uint16", kProjectileData_SBA, "kProjectileData_SBA", True, True, -1, 1)
|
||||
return
|
||||
|
||||
get_93()
|
25
Port_Extraction/bank_94/extract_bank_94.py
Normal file
25
Port_Extraction/bank_94/extract_bank_94.py
Normal file
@ -0,0 +1,25 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
import common_data as rom
|
||||
|
||||
kSpecialAirPtrs = []
|
||||
kSpecialBlockPtrs = []
|
||||
kPlmHeaderDefPtrs = []
|
||||
kBombablePlmTable = []
|
||||
kBlockShotBombedReactionShootablePlm = []
|
||||
|
||||
#Format is as follows:
|
||||
#rom.get_data(bank, starting address, ending address, "data type", array, "array name", hex bool, array bool, new line, new space)
|
||||
#"hex bool" is whether you want the data in hexadecimal or in decimal format
|
||||
#"array bool" is whether it's a single value or an array (will print [] if array, won't otherwise)
|
||||
#"new line/space" is how many elements you want before you insert a new line/space, -1 is never
|
||||
def get_94():
|
||||
rom.get_data(0x94, 0x92D9, 0x92E9, "uint16", kSpecialAirPtrs, "kSpecialAirPtrs", True, True, -1, 1)
|
||||
rom.get_data(0x94, 0x92E9, 0x92F9, "uint16", kSpecialBlockPtrs, "kSpecialBlockPtrs", True, True, -1, 1)
|
||||
rom.get_data(0x94, 0x9139, 0x91D9, "uint16", kPlmHeaderDefPtrs, "kPlmHeaderDefPtrs", True, True, 16, 1)
|
||||
rom.get_data(0x94, 0x936B, 0x938B, "uint16", kBombablePlmTable, "kBombablePlmTable", True, True, -1, 1)
|
||||
rom.get_data(0x94, 0x9EA6, 0x9F46, "uint16", kBlockShotBombedReactionShootablePlm, "kBlockShotBombedReactionShootablePlm", True, True, 16, 1)
|
||||
return
|
||||
|
||||
get_94()
|
81
Port_Extraction/bank_9B/extract_bank_9B.py
Normal file
81
Port_Extraction/bank_9B/extract_bank_9B.py
Normal file
@ -0,0 +1,81 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
import common_data as rom
|
||||
|
||||
kUnchargedBeamTrailOffsets = []
|
||||
kChargedBeamTrailOffsets = []
|
||||
kSpazerSbaTrailOffsets = []
|
||||
kDeathSequencePals_SuitOffset_1 = []
|
||||
kDeathSequencePalette_ExplosionTabs = []
|
||||
kDeathSequencePals_SuitOffset_2 = []
|
||||
kDeathSequencePals_Suitless = []
|
||||
kGrappleBlockDefaultConnectionPtrs = []
|
||||
kGrappleBlockVerticalMovementConnectionPtrs = []
|
||||
kGrappleBlockCrouchConnectionPtrs = []
|
||||
kGrappleBeam_SpecialAngles = []
|
||||
kGrappleBeam_SwingingData = []
|
||||
kGrappleBeam_SwingingData2 = []
|
||||
kGrappleBeam_SwingingData3 = []
|
||||
kGrappleBeam_OriginX_NoRun = []
|
||||
kGrappleBeam_OriginY_NoRun = []
|
||||
kGrappleBeam_0x0d1a_offs_NoRun = []
|
||||
kGrappleBeam_0x0d1c_offs_NoRun = []
|
||||
kGrappleBeam_OriginX_Run = []
|
||||
kGrappleBeam_OriginY_Run = []
|
||||
kGrappleBeam_0x0d1a_offs_Run = []
|
||||
kGrappleBeam_0x0d1c_offs_Run = []
|
||||
kGrappleBeamFlareTileEndPtr = []
|
||||
kGrappleBeamFlareTileBeginPtr = []
|
||||
kGrappleBeamTilePtrs = []
|
||||
kFlareAnimDelays_Main = []
|
||||
kFlareLeftSpritemapOffsets = []
|
||||
kFlareRightSpritemapOffsets = []
|
||||
kGrappleToStandingSamusPoses = []
|
||||
kGrappleToCrouchingSamusPoses = []
|
||||
kGrappleBeam_Ext_Xvel = []
|
||||
kGrappleBeam_Ext_Yvel = []
|
||||
kGrappleBeam_Init_EndAngle = []
|
||||
|
||||
#Format is as follows:
|
||||
#rom.get_data(bank, starting address, ending address, "data type", array, "array name", hex bool, array bool, new line, new space)
|
||||
#"hex bool" is whether you want the data in hexadecimal or in decimal format
|
||||
#"array bool" is whether it's a single value or an array (will print [] if array, won't otherwise)
|
||||
#"new line/space" is how many elements you want before you insert a new line/space, -1 is never
|
||||
def get_9B():
|
||||
rom.get_data(0x9B, 0xA4B3, 0xA4CB, "uint16", kUnchargedBeamTrailOffsets, "kUnchargedBeamTrailOffsets", True, True, -1 , 1)
|
||||
rom.get_data(0x9B, 0xA4CB, 0xA4E3, "uint16", kChargedBeamTrailOffsets, "kChargedBeamTrailOffsets", True, True, -1, 1)
|
||||
rom.get_data(0x9B, 0xA4E3, 0xA4F7, "uint16", kSpazerSbaTrailOffsets, "kSpazerSbaTrailOffsets", True, True, -1, 1)
|
||||
rom.get_data(0x9B, 0xB5C8, 0xB5CE, "uint16", kDeathSequencePals_SuitOffset_1, "kDeathSequencePals_SuitOffset_1", True, True, -1, 1)
|
||||
rom.get_data(0x9B, 0xB823, 0xB835, "uint8", kDeathSequencePalette_ExplosionTabs, "kDeathSequencePalette_ExplosionTabs", False, True, 2, -1)
|
||||
rom.get_data(0x9B, 0xB6D2, 0xB6D8, "uint16", kDeathSequencePals_SuitOffset_2, "kDeathSequencePals_SuitOffset_2", True, True, -1, 1)
|
||||
rom.get_data(0x9B, 0xB80F, 0xB823, "uint16", kDeathSequencePals_Suitless, "kDeathSequencePals_Suitless", True, True, -1, 1)
|
||||
rom.get_data(0x9B, 0xC3C6, 0xC3EE, "uint16", kGrappleBlockDefaultConnectionPtrs, "kGrappleBlockDefaultConnectionPtrs", True, True, 2, 1)
|
||||
rom.get_data(0x9B, 0xC3EE, 0xC416, "uint16", kGrappleBlockVerticalMovementConnectionPtrs, "kGrappleBlockVerticalMovementConnectionPtrs", True, True, 2, 1)
|
||||
rom.get_data(0x9B, 0xC416, 0xC43E, "uint16", kGrappleBlockCrouchConnectionPtrs, "kGrappleBlockCrouchConnectionPtrs", True, True, 2, 1)
|
||||
rom.get_data(0x9B, 0xC43E, 0xC48E, "GrappleBeamSpecialAngles", kGrappleBeam_SpecialAngles, "kGrappleBeam_SpecialAngles", True, True, 1, -1)
|
||||
rom.get_data(0x9B, 0xC1C2, 0xC2C2, "uint8", kGrappleBeam_SwingingData, "kGrappleBeam_SwingingData", False, True, 16, 1)
|
||||
rom.get_data(0x9B, 0xC2C2, 0xC302, "uint8", kGrappleBeam_SwingingData2, "kGrappleBeam_SwingingData2", True, True, 32, 2)
|
||||
rom.get_data(0x9B, 0xC302, 0xC342, "uint8", kGrappleBeam_SwingingData3, "kGrappleBeam_SwingingData3", True, True, 32, 2)
|
||||
rom.get_data(0x9B, 0xC122, 0xC136, "uint16", kGrappleBeam_OriginX_NoRun, "kGrappleBeam_OriginX_NoRun", True, True, -1, 1)
|
||||
rom.get_data(0x9B, 0xC136, 0xC14A, "uint16", kGrappleBeam_OriginY_NoRun, "kGrappleBeam_OriginY_NoRun", True, True, -1, 1)
|
||||
rom.get_data(0x9B, 0xC14A, 0xC15E, "uint16", kGrappleBeam_0x0d1a_offs_NoRun, "kGrappleBeam_0x0d1a_offs_NoRun", True, True, -1, 1)
|
||||
rom.get_data(0x9B, 0xC15E, 0xC172, "uint16", kGrappleBeam_0x0d1c_offs_NoRun, "kGrappleBeam_0x0d1c_offs_NoRun", True, True, -1, 1)
|
||||
rom.get_data(0x9B, 0xC172, 0xC186, "uint16", kGrappleBeam_OriginX_Run, "kGrappleBeam_OriginX_Run", True, True, -1, 1)
|
||||
rom.get_data(0x9B, 0xC186, 0xC19A, "uint16", kGrappleBeam_OriginY_Run, "kGrappleBeam_OriginY_Run", True, True, -1, 1)
|
||||
rom.get_data(0x9B, 0xC19A, 0xC1AE, "uint16", kGrappleBeam_0x0d1a_offs_Run, "kGrappleBeam_0x0d1a_offs_Run", True, True, -1, 1)
|
||||
rom.get_data(0x9B, 0xC1AE, 0xC1C2, "uint16", kGrappleBeam_0x0d1c_offs_Run, "kGrappleBeam_0x0d1c_offs_Run", True, True, -1, 1)
|
||||
rom.get_data(0x9B, 0xC344, 0xC346, "uint16", kGrappleBeamFlareTileEndPtr, "kGrappleBeamFlareTileEndPtr", True, False, -1, -1)
|
||||
rom.get_data(0x9B, 0xC342, 0xC344, "uint16", kGrappleBeamFlareTileBeginPtr, "kGrappleBeamFlareTileBeginPtr", True, False, -1, -1)
|
||||
rom.get_data(0x9B, 0xC346, 0xC3C6, "uint16", kGrappleBeamTilePtrs, "kGrappleBeamTilePtrs", True, True, 16, 1)
|
||||
rom.get_data(0x90, 0xC487, 0xC4A7, "uint8", kFlareAnimDelays_Main, "kFlareAnimDelays_Main", False, True, 16, 1)
|
||||
rom.get_data(0x93, 0xA22B, 0xA231, "uint16", kFlareLeftSpritemapOffsets, "kFlareLeftSpritemapOffsets", False, True, -1, -1)
|
||||
rom.get_data(0x93, 0xA225, 0xA22B, "uint16", kFlareRightSpritemapOffsets, "kFlareRightSpritemapOffsets", False, True, -1, -1)
|
||||
rom.get_data(0x9C, 0xC9BA, 0xC9C4, "uint8", kGrappleToStandingSamusPoses, "kGrappleToStandingSamusPoses", True, True, -1, 1)
|
||||
rom.get_data(0x9B, 0xC9C4, 0xC9CE, "uint8", kGrappleToCrouchingSamusPoses, "kGrappleToCrouchingSamusPoses", True, True, -1, 1)
|
||||
rom.get_data(0x9B, 0xC0DB, 0xC0EF, "uint16", kGrappleBeam_Ext_Xvel, "kGrappleBeam_Ext_Xvel", True, True, -1, 1)
|
||||
rom.get_data(0x9B, 0xC0EF, 0xC103, "uint16", kGrappleBeam_Ext_Yvel, "kGrappleBeam_Ext_Yvel", True, True, -1, 1)
|
||||
rom.get_data(0x9B, 0xC104, 0xC118, "uint16", kGrappleBeam_Init_EndAngle, "kGrappleBeam_Init_EndAngle", True, True, -1, 1)
|
||||
return
|
||||
|
||||
get_9B()
|
29
Port_Extraction/bank_A0/extract_bank_A0.py
Normal file
29
Port_Extraction/bank_A0/extract_bank_A0.py
Normal file
@ -0,0 +1,29 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
import common_data as rom
|
||||
|
||||
kEnemyLayerToQueuePtr = []
|
||||
kStandardSpriteTiles = []
|
||||
kSine8bit = []
|
||||
kEquationForQuarterCircle = []
|
||||
kEnemyDestroySpikeBtsOffset = []
|
||||
kEnemyXYSlopeOffsetMultiplicationIndices = []
|
||||
kAlignYPos_Tab0 = []
|
||||
|
||||
#Format is as follows:
|
||||
#rom.get_data(bank, starting address, ending address, "data type", array, "array name", hex bool, array bool, new line, new space)
|
||||
#"hex bool" is whether you want the data in hexadecimal or in decimal format
|
||||
#"array bool" is whether it's a single value or an array (will print [] if array, won't otherwise)
|
||||
#"new line/space" is how many elements you want before you insert a new line/space, -1 is never
|
||||
def get_A0():
|
||||
rom.get_data(0xA0, 0xB133, 0xB143, "uint16", kEnemyLayerToQueuePtr, "kEnemyLayerToQueuePtr", True, True, -1, 1)
|
||||
rom.get_data(0x9A, 0xD200, 0xF200, "uint16", kStandardSpriteTiles, "kStandardSpriteTiles", True, True, 16, 1)
|
||||
rom.get_data(0xA0, 0xB143, 0xB5C3, "uint8", kSine8bit, "kSine8bit", True, True, 16, 1)
|
||||
rom.get_data(0xA0, 0xB7EE, 0xB8EE, "uint16", kEquationForQuarterCircle, "kEquationForQuarterCircle", True, True, 16, 1)
|
||||
rom.get_data(0xA0, 0xC2DA, 0xC2FA, "uint16", kEnemyDestroySpikeBtsOffset, "kEnemyDestroySpikeBtsOffset", True, True, -1, 1)
|
||||
rom.get_data(0xA0, 0xC49F, 0xC51F, "uint16", kEnemyXYSlopeOffsetMultiplicationIndices, "kEnemyXYSlopeOffsetMultiplicationIndices", True, True, 16, 2)
|
||||
rom.get_data(0x94, 0x8B2B, 0x8D2B, "uint8", kAlignYPos_Tab0, "kAlignYPos_Tab0", False, True, 16, 1)
|
||||
return
|
||||
|
||||
get_A0()
|
82
Port_Extraction/bank_A2/extract_bank_A2.py
Normal file
82
Port_Extraction/bank_A2/extract_bank_A2.py
Normal file
@ -0,0 +1,82 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
import common_data as rom
|
||||
|
||||
kEnemyInit_BouncingGoofball_Tab0 = []
|
||||
kEnemyInit_BouncingGoofball_Tab1 = []
|
||||
kBouncingGoofball_Tab0 = []
|
||||
kMaridiaBeybladeTurtle_Tab0 = []
|
||||
kThinHoppingBlobs_HopTable = []
|
||||
kEnemyInit_SpikeShootingPlant_XRadiusTravel = []
|
||||
kEnemyInit_SpikeShootingPlant_FuncPtrs = []
|
||||
kEnemyInit_MaridiaSpikeyShell_XDistanceRanges = []
|
||||
kEnemyInit_MaridiaSpikeyShell_UndergroundTimers = []
|
||||
kGunshipTop_HoverValues = []
|
||||
kGunshipTop_YVelocitiesBrakeData = []
|
||||
kGunshipTop_DustCloudTilesSourceAddresses = []
|
||||
kGunshipTop_DustCloudTilesDestinationAddresses = []
|
||||
kLavaquakeRocks_Tab0 = []
|
||||
kLavaquakeRocks_Tab1 = []
|
||||
kLavaquakeRocks_Tab2 = []
|
||||
kRinka_MotherBrainRoomSpawnTable = []
|
||||
kRio_Constant0 = []
|
||||
kRio_Constant1 = []
|
||||
kNorfairLavajumpingEnemy_Tab0 = []
|
||||
kNorfairRio_Tab0 = []
|
||||
kNorfairRio_Constant0 = []
|
||||
kLowerNorfairRio_Constant0 = []
|
||||
kLowerNorfairRio_Constant1 = []
|
||||
kMaridiaLargeSnail_InstrListPtrs = []
|
||||
kHirisingSlowFalling_Ptrs0 = []
|
||||
kHirisingSlowFalling_Ptrs1 = []
|
||||
kLavaSeahorse_InstrListPtrs = []
|
||||
kEnemyInit_TimedShutter_YPositionIndices = []
|
||||
kEnemyInit_TimedShutter_FuncPtrs = []
|
||||
|
||||
#Format is as follows:
|
||||
#rom.get_data(bank, starting address, ending address, "data type", array, "array name", hex bool, array bool, new line, new space)
|
||||
#"hex bool" is whether you want the data in hexadecimal or in decimal format
|
||||
#"array bool" is whether it's a single value or an array (will print [] if array, won't otherwise)
|
||||
#"new line/space" is how many elements you want before you insert a new line/space, -1 is never
|
||||
def get_A2():
|
||||
rom.get_data(0xA2, 0x86DF, 0x86EF, "uint16", kEnemyInit_BouncingGoofball_Tab0, "kEnemyInit_BouncingGoofball_Tab0", False, True, -1, 1)
|
||||
rom.get_data(0xA2, 0x86EF, 0x8701, "uint16", kEnemyInit_BouncingGoofball_Tab1, "kEnemyInit_BouncingGoofball_Tab1", True, True, -1, 1)
|
||||
rom.get_data(0xA2, 0x8701, 0x8718, "uint8", kBouncingGoofball_Tab0, "kBouncingGoofball_Tab0", False, True, -1, 1)
|
||||
rom.get_data(0xA2, 0x8D56, 0x8D5E, "uint16", kMaridiaBeybladeTurtle_Tab0, "kMaridiaBeybladeTurtle_Tab0", True, True, -1, 1)
|
||||
rom.get_data(0xA2, 0x9A07, 0x9A3F, "uint16", kThinHoppingBlobs_HopTable, "kThinHoppingBlobs_HopTable", True, True, 4, 1)
|
||||
rom.get_data(0xA2, 0x9F36, 0x9F42, "uint16", kEnemyInit_SpikeShootingPlant_XRadiusTravel, "kEnemyInit_SpikeShootingPlant_XRadiusTravel", False, True, -1, 1)
|
||||
rom.get_data(0xA2, 0x9F42, 0x9F48, "uint16", kEnemyInit_SpikeShootingPlant_FuncPtrs, "kEnemyInit_SpikeShootingPlant_FuncPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA2, 0xA3DD, 0xA3ED, "uint16", kEnemyInit_MaridiaSpikeyShell_XDistanceRanges, "kEnemyInit_MaridiaSpikeyShell_XDistanceRanges", False, True, -1, 1)
|
||||
rom.get_data(0xA2, 0xA3ED, 0xA3F9, "uint16", kEnemyInit_MaridiaSpikeyShell_UndergroundTimers, "kEnemyInit_MaridiaSpikeyShell_UndergroundTimers", False, True, -1, 1)
|
||||
rom.get_data(0xA2, 0xA7CF, 0xA7D7, "uint8", kGunshipTop_HoverValues, "kGunshipTop_HoverValues", True, True, 2, 1)
|
||||
rom.get_data(0xA2, 0xA622, 0xA644, "uint16", kGunshipTop_YVelocitiesBrakeData, "kGunshipTop_YVelocitiesBrakeData", True, True, 6, 1)
|
||||
rom.get_data(0xA2, 0xAC07, 0xAC11, "uint16", kGunshipTop_DustCloudTilesSourceAddresses, "kGunshipTop_DustCloudTilesSourceAddresses", True, True, -1, 1)
|
||||
rom.get_data(0xA2, 0xAC11, 0xAC1B, "uint16", kGunshipTop_DustCloudTilesDestinationAddresses, "kGunshipTop_DustCloudTilesDestinationAddresses", True, True, -1, 1)
|
||||
rom.get_data(0xA2, 0xB520, 0xB530, "uint16", kLavaquakeRocks_Tab0, "kLavaquakeRocks_Tab0", True, True, -1, 1)
|
||||
rom.get_data(0xA2, 0xB530, 0xB550, "uint16", kLavaquakeRocks_Tab1, "kLavaquakeRocks_Tab1", True, True, 8, 1)
|
||||
rom.get_data(0xA2, 0xB550, 0xB570, "uint16", kLavaquakeRocks_Tab2, "kLavaquakeRocks_Tab2", True, True, 8, 1)
|
||||
rom.get_data(0xA2, 0xB75B, 0xB79D, "uint16", kRinka_MotherBrainRoomSpawnTable, "kRinka_MotherBrainRoomSpawnTable", True, True, 3, 1)
|
||||
rom.get_data(0xA2, 0xBBBB, 0xBBBD, "uint16", kRio_Constant0, "kRio_Constant0", True, False, -1, -1)
|
||||
rom.get_data(0xA2, 0xBBBF, 0xBBC1, "uint16", kRio_Constant1, "kRio_Constant1", True, False, -1, -1)
|
||||
rom.get_data(0xA2, 0xBE86, 0xBE8E, "uint16", kNorfairLavajumpingEnemy_Tab0, "kNorfairLavajumpingEnemy_Tab0", True, True, -1, 1)
|
||||
rom.get_data(0xA2, 0xC1C1, 0xC1C5, "uint16", kNorfairRio_Tab0, "kNorfairRio_Tab0", True, True, -1, 1)
|
||||
rom.get_data(0xA2, 0xC1C5, 0xC1C7, "uint16", kNorfairRio_Constant0, "kNorfairRio_Constant0", True, False, -1, -1)
|
||||
rom.get_data(0xA2, 0xC6CA, 0xC6CC, "uint16", kLowerNorfairRio_Constant0, "kLowerNorfairRio_Constant0", True, False, -1, -1)
|
||||
rom.get_data(0xA2, 0xC6CE, 0xC6D0, "uint16", kLowerNorfairRio_Constant1, "kLowerNorfairRio_Constant1", True, False, -1, -1)
|
||||
rom.get_data(0xA2, 0xCB77, 0xCB87, "uint16", kMaridiaLargeSnail_InstrListPtrs, "kMaridiaLargeSnail_InstrListPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA2, 0xDF5E, 0xDF6A, "uint16", kHirisingSlowFalling_Ptrs0, "kHirisingSlowFalling_Ptrs0", True, True, -1, 1)
|
||||
rom.get_data(0xA2, 0xDF6A, 0xDF76, "uint16", kHirisingSlowFalling_Ptrs1, "kHirisingSlowFalling_Ptrs1", True, True, -1, 1)
|
||||
rom.get_data(0xA2, 0xE5EF, 0xE5FB, "uint16", kLavaSeahorse_InstrListPtrs, "kLavaSeahorse_InstrListPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA2, 0xEA56, 0xEAB6, "uint16", kEnemyInit_TimedShutter_YPositionIndices, "kEnemyInit_TimedShutter_YPositionIndices", True, True, 16, 2)
|
||||
rom.get_data(0xA2, 0xEA4E, 0xEA56, "uint16", kEnemyInit_TimedShutter_FuncPtrs, "kEnemyInit_TimedShutter_FuncPtrs", True, True, -1, 1)
|
||||
return
|
||||
|
||||
#define kMaridiaBeybladeTurtle_Tab0 (*(uint16*)RomFixedPtr(0xa28d56))
|
||||
#define kMaridiaBeybladeTurtle_Tab1 (*(uint16*)RomFixedPtr(0xa28d58))
|
||||
#define kThinHoppingBlobs_JumpHeightIndices (*(uint16*)RomFixedPtr(0xa29a07))
|
||||
#define kThinHoppingBlobs_XSpeedIndices (*(uint16*)RomFixedPtr(0xa29a09))
|
||||
#define kThinHoppingBlobs_YSpeedIndices (*(uint16*)RomFixedPtr(0xa29a0b))
|
||||
#define kThinHoppingBlobs_AirborneFuncPtrs (*(uint16*)RomFixedPtr(0xa29a0d))
|
||||
|
||||
get_A2()
|
119
Port_Extraction/bank_A3/extract_bank_A3.py
Normal file
119
Port_Extraction/bank_A3/extract_bank_A3.py
Normal file
@ -0,0 +1,119 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
import common_data as rom
|
||||
|
||||
kWaver_InstrListPtrs = []
|
||||
kMetalee_InstrListPtrs = []
|
||||
kFireFlea_Tab0 = []
|
||||
kElevator_ControllerInputs = []
|
||||
kEnemyInit_Crab_InstrListPtrs = []
|
||||
kEnemyInit_Slug_InstrListPtrs = []
|
||||
kRoach_InstrListPtrs = []
|
||||
kRoach_FuncPtrs = []
|
||||
kSidehopper_InstrListPtrs0 = []
|
||||
kSidehopper_InstrListPtrs1 = []
|
||||
kSidehopper_InstrListPtrs2 = []
|
||||
kSidehopper_InstrListPtrs3 = []
|
||||
kSidehopper_FuncPtrs = []
|
||||
kSidehopper_Tab0 = []
|
||||
kSidehopper_Tab1 = []
|
||||
kSidehopper_Tab2 = []
|
||||
kSidehopper_Tab3 = []
|
||||
kSidehopper_Tab4 = []
|
||||
kSidehopper_Tab5 = []
|
||||
kMaridiaRefillCandy_XPositionIndices = []
|
||||
kMaridiaRefillCandy_InstrListPtrs = []
|
||||
kEnemyInit_NorfairSlowFireball_InstrListPtrs = []
|
||||
kEnemyInit_Bang_Tab0 = []
|
||||
kBang_ShotDirectionIndices = []
|
||||
kBang_ShotSoundIndices = []
|
||||
kEnemyInit_Bang_Tab1 = []
|
||||
kBang_InstrListPtrs = []
|
||||
kSkree_InstrListPtrs = []
|
||||
kMaridiaSnail_Tab0 = []
|
||||
kMaridiaSnail_Tab1 = []
|
||||
kMaridiaSnail_Tab2 = []
|
||||
kMaridiaSnail_Tab3 = []
|
||||
kMaridiaSnail_FuncPtrs = []
|
||||
kMaridiaSnail_InstrListPtrs0 = []
|
||||
kMaridiaSnail_InstrListPtrs1 = []
|
||||
kMaridiaSnail_InstrListPtrs2 = []
|
||||
kMaridiaSnail_Tab4 = []
|
||||
kMaridiaSnail_InstrListPtrs3 = []
|
||||
kReflec_GlowColorsIndices = []
|
||||
kReflec_InstrListPtrs0 = []
|
||||
kReflec_ShootDirectionsIndices = []
|
||||
kReflec_InstrListPtrs1 = []
|
||||
kEnemyInit_WreckedShipOrangeZoomer_InstrListPtrs = []
|
||||
kCommonZoomer_SpeedIndices = []
|
||||
kCommonZoomer_InstrListPtrs0 = []
|
||||
kCommonZoomer_InstrListPtrs1 = []
|
||||
kCommonZoomer_InstrListPtrs2 = []
|
||||
kCommonZoomer_InstrListPtrs3 = []
|
||||
kCommonZoomer_InstrListPtrs4 = []
|
||||
kCommonZoomer_Tab0 = []
|
||||
kMetroid_CrySoundsIndices = []
|
||||
kMetroid_SpeedIndices = []
|
||||
|
||||
#Format is as follows:
|
||||
#rom.get_data(bank, starting address, ending address, "data type", array, "array name", hex bool, array bool, new line, new space)
|
||||
#"hex bool" is whether you want the data in hexadecimal or in decimal format
|
||||
#"array bool" is whether it's a single value or an array (will print [] if array, won't otherwise)
|
||||
#"new line/space" is how many elements you want before you insert a new line/space, -1 is never
|
||||
def get_A3():
|
||||
rom.get_data(0xA3, 0x86DB, 0x86E3, "uint16", kWaver_InstrListPtrs, "kWaver_InstrListPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA3, 0x894E, 0x8956, "uint16", kMetalee_InstrListPtrs, "kMetalee_InstrListPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA3, 0x8D1D, 0x8D2D, "uint16", kFireFlea_Tab0, "kFireFlea_Tab0", False, True, -1, 1)
|
||||
rom.get_data(0xA3, 0x94E2, 0x94E6, "uint16", kElevator_ControllerInputs, "kElevator_ControllerInputs", True, True, -1, 1)
|
||||
rom.get_data(0xA3, 0x96DB, 0x96E3, "uint16", kEnemyInit_Crab_InstrListPtrs, "kEnemyInit_Crab_InstrListPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA3, 0x992B, 0x993B, "uint16", kEnemyInit_Slug_InstrListPtrs, "kEnemyInit_Slug_InstrListPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA3, 0xA111, 0xA121, "uint16", kRoach_InstrListPtrs, "kRoach_InstrListPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA3, 0xA121, 0xA12F, "uint16", kRoach_FuncPtrs, "kRoach_FuncPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA3, 0xAAC2, 0xAACA, "uint16", kSidehopper_InstrListPtrs0, "kSidehopper_InstrListPtrs0", True, True, -1, 1)
|
||||
rom.get_data(0xA3, 0xAACA, 0xAAD2, "uint16", kSidehopper_InstrListPtrs1, "kSidehopper_InstrListPtrs1", True, True, -1, 1)
|
||||
rom.get_data(0xA3, 0xAAD2, 0xAADA, "uint16", kSidehopper_InstrListPtrs2, "kSidehopper_InstrListPtrs2", True, True, -1, 1)
|
||||
rom.get_data(0xA3, 0xAADA, 0xAAE2, "uint16", kSidehopper_InstrListPtrs3, "kSidehopper_InstrListPtrs3", True, True, -1, 1)
|
||||
rom.get_data(0xA3, 0xAAE2, 0xAAE6, "uint16", kSidehopper_FuncPtrs, "kSidehopper_FuncPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA3, 0xAAE6, 0xAAEA, "uint16", kSidehopper_Tab0, "kSidehopper_Tab0", False, True, -1, 1)
|
||||
rom.get_data(0xA3, 0xAAEA, 0xAAEE, "uint16", kSidehopper_Tab1, "kSidehopper_Tab1", False, True, -1, 1)
|
||||
rom.get_data(0xA3, 0xAAEE, 0xAAF2, "uint16", kSidehopper_Tab2, "kSidehopper_Tab2", True, True, -1, 1)
|
||||
rom.get_data(0xA3, 0xAAF2, 0xAAF6, "uint16", kSidehopper_Tab3, "kSidehopper_Tab3", False, True, -1, 1)
|
||||
rom.get_data(0xA3, 0xAAF6, 0xAAFA, "uint16", kSidehopper_Tab4, "kSidehopper_Tab4", False, True, -1, 1)
|
||||
rom.get_data(0xA3, 0xAAFA, 0xAAFE, "uint16", kSidehopper_Tab5, "kSidehopper_Tab5", True, True, -1, 1)
|
||||
rom.get_data(0xA3, 0xB415, 0xB429, "uint16", kMaridiaRefillCandy_XPositionIndices, "kMaridiaRefillCandy_XPositionIndices", True, True, -1, 2)
|
||||
rom.get_data(0xA3, 0xB40D, 0xB415, "uint16", kMaridiaRefillCandy_InstrListPtrs, "kMaridiaRefillCandy_InstrListPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA3, 0xB667, 0xB66F, "uint16", kEnemyInit_NorfairSlowFireball_InstrListPtrs, "kEnemyInit_NorfairSlowFireball_InstrListPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA3, 0xBA84, 0xBA94, "uint16", kEnemyInit_Bang_Tab0, "kEnemyInit_Bang_Tab0", True, True, -1, 1)
|
||||
rom.get_data(0xA3, 0xBA94, 0xBAA8, "uint16", kBang_ShotDirectionIndices, "kBang_ShotDirectionIndices", True, True, -1, 1)
|
||||
rom.get_data(0xA3, 0xBC4A, 0xBC6A, "uint16", kBang_ShotSoundIndices, "kBang_ShotSoundIndices", False, True, -1, 1)
|
||||
rom.get_data(0xA3, 0xBC6A, 0xBC9E, "uint16", kEnemyInit_Bang_Tab1, "kEnemyInit_Bang_Tab1", False, True, 13, 1)
|
||||
rom.get_data(0xA3, 0xB722, 0xB75E, "uint16", kBang_InstrListPtrs, "kBang_InstrListPtrs", True, True, 5, 1)
|
||||
rom.get_data(0xA3, 0xC69C, 0xC6A4, "uint16", kSkree_InstrListPtrs, "kSkree_InstrListPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA3, 0xCD42, 0xCD82, "MaridiaSnailData2", kMaridiaSnail_Tab0, "kMaridiaSnail_Tab0", True, True, 1, 1)
|
||||
rom.get_data(0xA3, 0xCD82, 0xCDC2, "uint16", kMaridiaSnail_Tab1, "kMaridiaSnail_Tab1", True, True, 4, 1)
|
||||
rom.get_data(0xA3, 0xCDC2, 0xCDD2, "uint16", kMaridiaSnail_Tab2, "kMaridiaSnail_Tab2", False, True, -1, 1)
|
||||
rom.get_data(0xA3, 0xCCA2, 0xCCE2, "uint16", kMaridiaSnail_Tab3, "kMaridiaSnail_Tab3", True, True, 16, 1)
|
||||
rom.get_data(0xA3, 0xCDD2, 0xCDE2, "uint16", kMaridiaSnail_FuncPtrs, "kMaridiaSnail_FuncPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA3, 0xD1AB, 0xD1B3, "uint16", kMaridiaSnail_InstrListPtrs0, "kMaridiaSnail_InstrListPtrs0", True, True, -1, 2)
|
||||
rom.get_data(0xA3, 0xD30D, 0xD315, "uint16", kMaridiaSnail_InstrListPtrs1, "kMaridiaSnail_InstrListPtrs1", True, True, -1, 2)
|
||||
rom.get_data(0xA3, 0xD50F, 0xD517, "uint16", kMaridiaSnail_InstrListPtrs2, "kMaridiaSnail_InstrListPtrs2", True, True, -1, 2)
|
||||
rom.get_data(0xA3, 0xD517, 0xD557, "uint16", kMaridiaSnail_Tab4, "kMaridiaSnail_Tab4", True, True, 6, 2)
|
||||
rom.get_data(0xA3, 0xD5A4, 0xD5AC, "uint16", kMaridiaSnail_InstrListPtrs3, "kMaridiaSnail_InstrListPtrs3", True, True, -1, 2)
|
||||
rom.get_data(0xA3, 0xDABC, 0xDB0C, "uint16", kReflec_GlowColorsIndices, "kReflec_GlowColorsIndices", True, True, 4, 1)
|
||||
rom.get_data(0xA3, 0xDC0B, 0xDC1B, "uint16", kReflec_InstrListPtrs0, "kReflec_InstrListPtrs0", True, True, -1, 1)
|
||||
rom.get_data(0xA3, 0xDCAE, 0xDD2E, "uint16", kReflec_ShootDirectionsIndices, "kReflec_ShootDirectionsIndices", True, True, 16, 1)
|
||||
rom.get_data(0xA3, 0xDCA6, 0xDCAE, "uint16", kReflec_InstrListPtrs1, "kReflec_InstrListPtrs1", True, True, -1, 1)
|
||||
rom.get_data(0xA3, 0xE03B, 0xE043, "uint16", kEnemyInit_WreckedShipOrangeZoomer_InstrListPtrs, "kEnemyInit_WreckedShipOrangeZoomer_InstrListPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA3, 0xE5F0, 0xE630, "uint16", kCommonZoomer_SpeedIndices, "kCommonZoomer_SpeedIndices", True, True, 16, 1)
|
||||
rom.get_data(0xA3, 0xE2CC, 0xE2D4, "uint16", kCommonZoomer_InstrListPtrs0, "kCommonZoomer_InstrListPtrs0", True, True, -1, 1)
|
||||
rom.get_data(0xA3, 0xE630, 0xE63C, "uint16", kCommonZoomer_InstrListPtrs1, "kCommonZoomer_InstrListPtrs1", True, True, -1, 1)
|
||||
rom.get_data(0xA3, 0xE63C, 0xE648, "uint16", kCommonZoomer_InstrListPtrs2, "kCommonZoomer_InstrListPtrs2", True, True, -1, 1)
|
||||
rom.get_data(0xA3, 0xE648, 0xE654, "uint16", kCommonZoomer_InstrListPtrs3, "kCommonZoomer_InstrListPtrs3", True, True, -1, 1)
|
||||
rom.get_data(0xA3, 0xE654, 0xE660, "uint16", kCommonZoomer_InstrListPtrs4, "kCommonZoomer_InstrListPtrs4", True, True, -1, 1)
|
||||
rom.get_data(0xA3, 0xE931, 0xE9AF, "uint16", kCommonZoomer_Tab0, "kCommonZoomer_Tab0", True, True, 16, 1)
|
||||
rom.get_data(0xA3, 0xEAD6, 0xEAE6, "uint16", kMetroid_CrySoundsIndices, "kMetroid_CrySoundsIndices", False, True, -1, 1)
|
||||
rom.get_data(0xA3, 0xEA3F, 0xEA47, "uint16", kMetroid_SpeedIndices, "kMetroid_SpeedIndices", True, True, -1, 1)
|
||||
return
|
||||
|
||||
get_A3()
|
51
Port_Extraction/bank_A4/extract_bank_A4.py
Normal file
51
Port_Extraction/bank_A4/extract_bank_A4.py
Normal file
@ -0,0 +1,51 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
import common_data as rom
|
||||
|
||||
kCrocomire_Bg1AndBg2Palette7 = []
|
||||
kEnemyInit_Crocomire_Palette2 = []
|
||||
kEnemyInit_Crocomire_Palette5 = []
|
||||
kCrocomire_Palette1 = []
|
||||
kCrocomire_Palette3 = []
|
||||
kCrocomire_SpritemapPtrs = []
|
||||
kCrocomire_BridgeCrumbleTab0 = []
|
||||
kCrocomire_Bg2TilemapIndices0 = []
|
||||
kCrocomire_Bg2TilemapIndices1 = []
|
||||
kCrocoVlineRandomPos = []
|
||||
kCrocomire_Tab0 = []
|
||||
kCrocomire_TilesDestinationAddresses = []
|
||||
kCrocomire_TilesSourceAddresses = []
|
||||
|
||||
#Format is as follows:
|
||||
#rom.get_data(bank, starting address, ending address, "data type", array, "array name", hex bool, array bool, new line, new space)
|
||||
#"hex bool" is whether you want the data in hexadecimal or in decimal format
|
||||
#"array bool" is whether it's a single value or an array (will print [] if array, won't otherwise)
|
||||
#"new line/space" is how many elements you want before you insert a new line/space, -1 is never
|
||||
def get_A4():
|
||||
rom.get_data(0xA4, 0xB89D, 0xB8BD, "uint16", kCrocomire_Bg1AndBg2Palette7, "kCrocomire_Bg1AndBg2Palette7", True, True, -1, 1)
|
||||
rom.get_data(0xA4, 0xB8BD, 0xB8DD, "uint16", kEnemyInit_Crocomire_Palette2, "kEnemyInit_Crocomire_Palette2", True, True, -1, 1)
|
||||
rom.get_data(0xA4, 0xB8DD, 0xB8FD, "uint16", kEnemyInit_Crocomire_Palette5, "kEnemyInit_Crocomire_Palette5", True, True, -1, 1)
|
||||
rom.get_data(0xA4, 0xB8FD, 0xB91D, "uint16", kCrocomire_Palette1, "kCrocomire_Palette1", True, True, -1, 1)
|
||||
rom.get_data(0xA4, 0xB91D, 0xB93D, "uint16", kCrocomire_Palette3, "kCrocomire_Palette3", True, True, -1, 1)
|
||||
rom.get_data(0xA4, 0x8B79, 0x8B9B, "uint16", kCrocomire_SpritemapPtrs, "kCrocomire_SpritemapPtrs", True, True, 8, 1)
|
||||
rom.get_data(0xA4, 0x9156, 0x916C, "uint16", kCrocomire_BridgeCrumbleTab0, "kCrocomire_BridgeCrumbleTab0", True, True, -1, 1)
|
||||
rom.get_data(0xA4, 0x9C79, 0x9E7B, "uint16", kCrocomire_Bg2TilemapIndices0, "kCrocomire_Bg2TilemapIndices0", True, True, 16, 1)
|
||||
rom.get_data(0xA4, 0x9E7B, 0xA07D, "uint16", kCrocomire_Bg2TilemapIndices1, "kCrocomire_Bg2TilemapIndices1", True, True, 16, 1)
|
||||
|
||||
|
||||
|
||||
|
||||
rom.get_data(0xA4, 0x9697, 0x96C8, "uint8", kCrocoVlineRandomPos, "kCrocoVlineRandomPos", False, True, 16, 1)
|
||||
rom.get_data(0xA4, 0x98CA, 0x990A, "uint16", kCrocomire_Tab0, "kCrocomire_Tab0", True, True, 4, 1)
|
||||
rom.get_data(0xA4, 0x99CB, 0x99D9, "uint16", kCrocomire_TilesDestinationAddresses, "kCrocomire_TilesDestinationAddresses", True, True, -1, 1)
|
||||
rom.get_data(0xA4, 0x99D9, 0x99E5, "uint16", kCrocomire_TilesSourceAddresses, "kCrocomire_TilesSourceAddresses", True, True, -1, 1)
|
||||
#rom.get_data(, 0x, "", , "", , , , )
|
||||
return
|
||||
|
||||
#define kCrocomire_MeltingTilesTab0 (*(uint16*)RomFixedPtr(0xa49bc5))
|
||||
#define kCrocomire_MeltingTilesTab1 (*(uint16*)RomFixedPtr(0xa49bc7))
|
||||
#define kCrocomire_MeltingTilesTab2 (*(uint16*)RomFixedPtr(0xa49bc9))
|
||||
#define kCrocomire_MeltingTilesTab3 (*(uint16*)RomFixedPtr(0xa49bcb))
|
||||
|
||||
get_A4()
|
47
Port_Extraction/bank_A5/extract_bank_A5.py
Normal file
47
Port_Extraction/bank_A5/extract_bank_A5.py
Normal file
@ -0,0 +1,47 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
import common_data as rom
|
||||
|
||||
kDraygon_Palette1 = []
|
||||
kDraygon_Bg1AndBg2Palette5 = []
|
||||
kDraygon_FlashPalette = []
|
||||
kDraygonTurret_XYSpawnPositions = []
|
||||
kDraygon_HealthPaletteTable = []
|
||||
kDraygon_HealthPaletteThreshold = []
|
||||
kMiniDraygon_MovementLatency = []
|
||||
kMiniDraygon_DeathSequenceSubspeeds = []
|
||||
kMiniDraygon_DeathSequenceSpawnPositions = []
|
||||
kMiniDraygon_DeathSequenceAngles = []
|
||||
kMiniDraygonIntroDanceTable = []
|
||||
kSporeSpawn_HealthPaletteTable = []
|
||||
kSporeSpawn_DeathSequencePalette1 = []
|
||||
kSporeSpawn_DeathSequnceBg1AndBg2Palette4 = []
|
||||
kSporeSpawn_DeathSequenceBg1AndBg2Palette7 = []
|
||||
kSporeSpawn_Palette7 = []
|
||||
|
||||
#Format is as follows:
|
||||
#rom.get_data(bank, starting address, ending address, "data type", array, "array name", hex bool, array bool, new line, new space)
|
||||
#"hex bool" is whether you want the data in hexadecimal or in decimal format
|
||||
#"array bool" is whether it's a single value or an array (will print [] if array, won't otherwise)
|
||||
#"new line/space" is how many elements you want before you insert a new line/space, -1 is never
|
||||
def get_A5():
|
||||
rom.get_data(0xA5, 0xA217, 0xA237, "uint16", kDraygon_Palette1, "kDraygon_Palette1", True, True, -1, 1)
|
||||
rom.get_data(0xA5, 0xA277, 0xA297, "uint16", kDraygon_Bg1AndBg2Palette5, "kDraygon_Bg1AndBg2Palette5", True, True, -1, 1)
|
||||
rom.get_data(0xA5, 0xA297, 0xA2B7, "uint16", kDraygon_FlashPalette, "kDraygon_FlashPalette", True, True, -1, 1)
|
||||
rom.get_data(0xA5, 0x87DC, 0x87F4, "uint16", kDraygonTurret_XYSpawnPositions, "kDraygonTurret_XYSpawnPositions", False, True, 2, 1)
|
||||
rom.get_data(0xA5, 0x96AF, 0x96EF, "uint16", kDraygon_HealthPaletteTable, "kDraygon_HealthPaletteTable", True, True, 4, 1)
|
||||
rom.get_data(0xA5, 0x96EF, 0x9701, "uint16", kDraygon_HealthPaletteThreshold, "kDraygon_HealthPaletteThreshold", False, True, -1, 1)
|
||||
rom.get_data(0xA5, 0xA19F, 0xA1AF, "uint16", kMiniDraygon_MovementLatency, "kMiniDraygon_MovementLatency", True, True, 4, 1)
|
||||
rom.get_data(0xA5, 0xA1AF, 0xA1C7, "uint16", kMiniDraygon_DeathSequenceSubspeeds, "kMiniDraygon_DeathSequenceSubspeeds", True, True, 2, 1)
|
||||
rom.get_data(0xA5, 0xA1C7, 0xA1DF, "uint16", kMiniDraygon_DeathSequenceSpawnPositions, "kMiniDraygon_DeathSequenceSpawnPositions", True, True, 2, 1)
|
||||
rom.get_data(0xA5, 0xA1DF, 0xA1F7, "uint16", kMiniDraygon_DeathSequenceAngles, "kMiniDraygon_DeathSequenceAngles", True, True, 2, 1)
|
||||
rom.get_data(0xA5, 0xCE07, 0xDDC7, "uint8", kMiniDraygonIntroDanceTable, "kMiniDraygonIntroDanceTable", True, True, 16, 2)
|
||||
rom.get_data(0xA5, 0xE379, 0xE3F9, "uint16", kSporeSpawn_HealthPaletteTable, "kSporeSpawn_HealthPaletteTable", True, True, 16, 1)
|
||||
rom.get_data(0xA5, 0xE3F9, 0xE4F9, "uint16", kSporeSpawn_DeathSequencePalette1, "kSporeSpawn_DeathSequencePalette1", True, True, 16, 1)
|
||||
rom.get_data(0xA5, 0xE4F9, 0xE5D9, "uint16", kSporeSpawn_DeathSequnceBg1AndBg2Palette4, "kSporeSpawn_DeathSequnceBg1AndBg2Palette4", True, True, 16, 1)
|
||||
rom.get_data(0xA5, 0xE5D9, 0xE6B9, "uint16", kSporeSpawn_DeathSequenceBg1AndBg2Palette7, "kSporeSpawn_DeathSequenceBg1AndBg2Palette7", True, True, 16, 1)
|
||||
rom.get_data(0xA5, 0xE359, 0xE379, "uint16", kSporeSpawn_Palette7, "kSporeSpawn_Palette7", True, True, -1, 1)
|
||||
return
|
||||
|
||||
get_A5()
|
121
Port_Extraction/bank_A6/extract_bank_A6.py
Normal file
121
Port_Extraction/bank_A6/extract_bank_A6.py
Normal file
@ -0,0 +1,121 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
import common_data as rom
|
||||
|
||||
kCeresRidley_Tab0 = []
|
||||
kCeresRidley_Tab0 = []
|
||||
kCeresRidley_PaletteTab0 = []
|
||||
kCeresRidley_PaletteTab1 = []
|
||||
kCeresRidley_PalettePtrs0 = []
|
||||
kCeresRidley_FuncPtrs0 = []
|
||||
kCeresRidley_Tab1 = []
|
||||
kCeresRidley_GetawayYVelocityIndices = []
|
||||
kCeresRidley_GetawayXVelocityIndices = []
|
||||
kCeresRidley_Mode7TransferPtrs0 = []
|
||||
kCeresRidley_Mode7TransferPtrs1 = []
|
||||
kRidley_FlyToXPositionTab0 = []
|
||||
kRidley_FlyToXPositionTab1 = []
|
||||
kRidley_FlyToXPositionTab2 = []
|
||||
kRidley_HoldingSamusXPositionTab0 = []
|
||||
kRidley_HoldingSamusYPositionTab0 = []
|
||||
kRidley_Ptrs0 = []
|
||||
kRidley_Ptrs1 = []
|
||||
kRidley_Tab0 = []
|
||||
kRidley_Tab1 = []
|
||||
kRidley_Tab2 = []
|
||||
kRidley_Tab3 = []
|
||||
kRidley_Bg1AndBg2Palette6 = []
|
||||
kRidley_InstrListPtrs0 = []
|
||||
kRidley_XPositionIndices0 = []
|
||||
kRidley_InstrListPtrs1 = []
|
||||
kRidley_XPositionIndices1 = []
|
||||
kRidley_InstrListPtrs2 = []
|
||||
kRidley_XPositionIndices2 = []
|
||||
kRidley_InstrListPtrs3 = []
|
||||
kRidley_XPositionIndices3 = []
|
||||
kRidley_InstrListPtrs4 = []
|
||||
kRidley_XPositionIndices4 = []
|
||||
kRidley_InstrListPtrs5 = []
|
||||
kRidleysExplosion_Tab0 = []
|
||||
kRidley_MinTailAngleIndices0 = []
|
||||
kRidley_MaxTailAngleIndices0 = []
|
||||
kRidley_TilemapPtrs0 = []
|
||||
kRidley_SpritemapPtrs0 = []
|
||||
kEnemyInit_CeresSteam_InstrListPtrs = []
|
||||
kEnemyInit_CeresSteam_FuncPtrs = []
|
||||
kEnemyInit_CeresDoors_FuncPtrs = []
|
||||
kEnemyInit_CeresDoors_InstrListPtrs = []
|
||||
kCeresDoor_RandomXYPositionIndices = []
|
||||
kCeresDoor_Mode7TransferPtrs = []
|
||||
kEnemyInit_Zebetites_DestroyedIndices = []
|
||||
kEnemyInit_Zebetites_HeightIndices = []
|
||||
kEnemyInit_Zebetites_InstrListPtrs = []
|
||||
kEnemyInit_Zebetites_XPositionIndices = []
|
||||
kEnemyInit_Zebetites_YPositionIndices0 = []
|
||||
kEnemyInit_Zebetites_YPositionIndices1 = []
|
||||
kZebetites_BigZebetiteInstrListPtrs = []
|
||||
kZebetites_SmallZebetitePairInstrListPtrs = []
|
||||
|
||||
|
||||
#Format is as follows:
|
||||
#rom.get_data(bank, starting address, ending address, "data type", array, "array name", hex bool, array bool, new line, new space)
|
||||
#"hex bool" is whether you want the data in hexadecimal or in decimal format
|
||||
#"array bool" is whether it's a single value or an array (will print [] if array, won't otherwise)
|
||||
#"new line/space" is how many elements you want before you insert a new line/space, -1 is never
|
||||
def get_A6():
|
||||
rom.get_data(0xA6, 0xE269, 0xE2AA, "uint8", kCeresRidley_Tab0, "kCeresRidley_Tab0", False, True, 16, 1)
|
||||
rom.get_data(0xA6, 0xE2AA, 0xE30A, "uint16", kCeresRidley_PaletteTab0, "kCeresRidley_PaletteTab0", True, True, 3, 1)
|
||||
rom.get_data(0xA6, 0xE30A, 0xE46A, "uint16", kCeresRidley_PaletteTab1, "kCeresRidley_PaletteTab1", True, True, 11, 1)
|
||||
rom.get_data(0xA6, 0xA4EB, 0xA50B, "uint16", kCeresRidley_PalettePtrs0, "kCeresRidley_PalettePtrs0", True, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xA743, 0xA763, "uint16", kCeresRidley_FuncPtrs0, "kCeresRidley_FuncPtrs0", True, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xAE4D, 0xAF2F, "uint16", kCeresRidley_Tab1, "kCeresRidley_Tab1", True, True, 16, 1)
|
||||
rom.get_data(0xA6, 0xAF2F, 0xB00F, "uint16", kCeresRidley_GetawayYVelocityIndices, "kCeresRidley_GetawayYVelocityIndices", True, True, 16, 1)
|
||||
rom.get_data(0xA6, 0xB00F, 0xB0EF, "uint16", kCeresRidley_GetawayXVelocityIndices, "kCeresRidley_GetawayXVelocityIndices", True, True, 16, 1)
|
||||
rom.get_data(0xA6, 0xACDA, 0xACE2, "uint16", kCeresRidley_Mode7TransferPtrs0, "kCeresRidley_Mode7TransferPtrs0", True, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xAD45, 0xAD49, "uint16", kCeresRidley_Mode7TransferPtrs1, "kCeresRidley_Mode7TransferPtrs1", True, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xB60D, 0xB613, "uint16", kRidley_FlyToXPositionTab0, "kRidley_FlyToXPositionTab0", True, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xB63B, 0xB641, "uint16", kRidley_FlyToXPositionTab1, "kRidley_FlyToXPositionTab1", True, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xB6C8, 0xB6CE, "uint16", kRidley_FlyToXPositionTab2, "kRidley_FlyToXPositionTab2", True, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xB9D5, 0xB9DB, "uint16", kRidley_HoldingSamusXPositionTab0, "kRidley_HoldingSamusXPositionTab0", True, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xB9DB, 0xB9E1, "uint16", kRidley_HoldingSamusYPositionTab0, "kRidley_HoldingSamusYPositionTab0", True, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xB965, 0xB96D, "uint16", kRidley_Ptrs0, "kRidley_Ptrs0", True, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xB96D, 0xB975, "uint16", kRidley_Ptrs1, "kRidley_Ptrs1", True, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xB94D, 0xB959, "uint16", kRidley_Tab0, "kRidley_Tab0", False, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xB959, 0xB965, "uint16", kRidley_Tab1, "kRidley_Tab1", False, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xBB48, 0xBB4E, "uint16", kRidley_Tab2, "kRidley_Tab2", True, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xBB4E, 0xBB56, "uint16", kRidley_Tab3, "kRidley_Tab3", False, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xC1DF, 0xC23F, "uint16", kRidley_Bg1AndBg2Palette6, "kRidley_Bg1AndBg2Palette6", True, True, 3, 1)
|
||||
rom.get_data(0xA6, 0xC7BA, 0xC7DA, "uint16", kRidley_InstrListPtrs0, "kRidley_InstrListPtrs0", True, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xC804, 0xC808, "uint16", kRidley_XPositionIndices0, "kRidley_XPositionIndices0", False, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xC808, 0xC80C, "uint16", kRidley_InstrListPtrs1, "kRidley_InstrListPtrs1", True, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xC836, 0xC83A, "uint16", kRidley_XPositionIndices1, "kRidley_XPositionIndices1", True, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xC83A, 0xC83E, "uint16", kRidley_InstrListPtrs2, "kRidley_InstrListPtrs2", True, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xC868, 0xC86C, "uint16", kRidley_XPositionIndices2, "kRidley_XPositionIndices2", True, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xC86C, 0xC870, "uint16", kRidley_InstrListPtrs3, "kRidley_InstrListPtrs3", True, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xC89A, 0xC89E, "uint16", kRidley_XPositionIndices3, "kRidley_XPositionIndices3", True, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xC89E, 0xC8A2, "uint16", kRidley_InstrListPtrs4, "kRidley_InstrListPtrs4", True, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xC8CC, 0xC8D0, "uint16", kRidley_XPositionIndices4, "kRidley_XPositionIndices4", True, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xC8D0, 0xC8D4, "uint16", kRidley_InstrListPtrs5, "kRidley_InstrListPtrs5", True, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xC6CE, 0xC6E6, "uint16", kRidleysExplosion_Tab0, "kRidleysExplosion_Tab0", False, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xCC12, 0xCC18, "uint16", kRidley_MinTailAngleIndices0, "kRidley_MinTailAngleIndices0", True, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xCC18, 0xCC1E, "uint16", kRidley_MaxTailAngleIndices0, "kRidley_MaxTailAngleIndices0", True, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xDB02, 0xDB2A, "uint16", kRidley_TilemapPtrs0, "kRidley_TilemapPtrs0", True, True, 10, 1)
|
||||
rom.get_data(0xA6, 0xDCBA, 0xDCDA, "uint16", kRidley_SpritemapPtrs0, "kRidley_SpritemapPtrs0", True, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xEFF5, 0xF001, "uint16", kEnemyInit_CeresSteam_InstrListPtrs, "kEnemyInit_CeresSteam_InstrListPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xF001, 0xF00D, "uint16", kEnemyInit_CeresSteam_FuncPtrs, "kEnemyInit_CeresSteam_FuncPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xF72B, 0xF739, "uint16", kEnemyInit_CeresDoors_FuncPtrs, "kEnemyInit_CeresDoors_FuncPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xF52C, 0xF53A, "uint16", kEnemyInit_CeresDoors_InstrListPtrs, "kEnemyInit_CeresDoors_InstrListPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xF840, 0xF850, "uint16", kCeresDoor_RandomXYPositionIndices, "kCeresDoor_RandomXYPositionIndices", True, True, -1, 2)
|
||||
rom.get_data(0xA6, 0xF900, 0xF904, "uint16", kCeresDoor_Mode7TransferPtrs, "kCeresDoor_Mode7TransferPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xFC03, 0xFC0B, "uint16", kEnemyInit_Zebetites_DestroyedIndices, "kEnemyInit_Zebetites_DestroyedIndices", True, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xFC0B, 0xFC13, "uint16", kEnemyInit_Zebetites_HeightIndices, "kEnemyInit_Zebetites_HeightIndices", False, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xFC13, 0xFC1B, "uint16", kEnemyInit_Zebetites_InstrListPtrs, "kEnemyInit_Zebetites_InstrListPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xFC1B, 0xFC23, "uint16", kEnemyInit_Zebetites_XPositionIndices, "kEnemyInit_Zebetites_XPositionIndices", False, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xFC23, 0xFC2B, "uint16", kEnemyInit_Zebetites_YPositionIndices0, "kEnemyInit_Zebetites_YPositionIndices0", False, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xFC2B, 0xFC33, "uint16", kEnemyInit_Zebetites_YPositionIndices1, "kEnemyInit_Zebetites_YPositionIndices1", False, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xFD4A, 0xFD54, "uint16", kZebetites_BigZebetiteInstrListPtrs, "kZebetites_BigZebetiteInstrListPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA6, 0xFD54, 0xFD5E, "uint16", kZebetites_SmallZebetitePairInstrListPtrs, "kZebetites_SmallZebetitePairInstrListPtrs", True, True, -1, 1)
|
||||
return
|
||||
|
||||
get_A6()
|
87
Port_Extraction/bank_A7/extract_bank_A7.py
Normal file
87
Port_Extraction/bank_A7/extract_bank_A7.py
Normal file
@ -0,0 +1,87 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
import common_data as rom
|
||||
|
||||
kKraid_BgTargetPalette6 = []
|
||||
kKraid_BgTargetPalette3 = []
|
||||
kEproj_RocksFallingKraidCeilingXPositions = []
|
||||
kKraid_InvulnerableRoarInstrLists = []
|
||||
kKraid_VulnerableRoarInstrLists = []
|
||||
kKraid_BodyHitboxTable = []
|
||||
kKraid_BgPalette7 = []
|
||||
kKraid_BgPalette7_KraidDeath = []
|
||||
kKraid_SprPalette7 = []
|
||||
kKraid_EyeGlowingInstrLists = []
|
||||
kKraid_DyingInstrLists = []
|
||||
kKraid_LintBoundary = []
|
||||
kKraid_XMovementTable = []
|
||||
kEproj_RocksKraidSpits_RandomParameters = []
|
||||
kKraid_GoodFingernailInstrLists = []
|
||||
kKraidsFingernail_UpwardsVelocityTable = []
|
||||
kKraidsFingernail_DownwardsVelocityTable = []
|
||||
kKraidsFingernail_BoundaryOffsets = []
|
||||
kKraidSinkEntry = []
|
||||
kPhantoon_InstrListPtrs = []
|
||||
kPhantoon_MaterialisationSoundEffects = []
|
||||
kPhantoon_BrokenCode = []
|
||||
kEproj_DestroyableFireballs_Positions = []
|
||||
kPhantoon_CasualFlameTimerPtrs = []
|
||||
kPhantoon_Figure8VulnerabilityTimers = []
|
||||
kPhantoon_EyeClosedTimers = []
|
||||
kPhantoon_FireballRainHidingTimers = []
|
||||
kPhantoon_EyeballDirectionInstrListPtrs = []
|
||||
kPhantoon_FlameRainSpawnPositions = []
|
||||
kPhantoon_DyingExplosionsTable = []
|
||||
kPhantoon_HealthPalettePtrs = []
|
||||
kDachora_PalettePtrs_1 = []
|
||||
kDachora_PalettePtrs_2 = []
|
||||
kPhantoon_FadeOutTargetPalettes = []
|
||||
kWreckedShipOn_Bg1AndBg2TargetPalettes = []
|
||||
kSpritePaletteRamPtrs = []
|
||||
|
||||
#Format is as follows:
|
||||
#rom.get_data(bank, starting address, ending address, "data type", array, "array name", hex bool, array bool, new line, new space)
|
||||
#"hex bool" is whether you want the data in hexadecimal or in decimal format
|
||||
#"array bool" is whether it's a single value or an array (will print [] if array, won't otherwise)
|
||||
#"new line/space" is how many elements you want before you insert a new line/space, -1 is never
|
||||
def get_A7():
|
||||
rom.get_data(0xA7, 0x86C7, 0x86E7, "uint16", kKraid_BgTargetPalette6, "kKraid_BgTargetPalette6", True, True, -1, 1)
|
||||
rom.get_data(0xA7, 0xAAA6, 0xAAC6, "uint16", kKraid_BgTargetPalette3, "kKraid_BgTargetPalette3", True, True, -1, 1)
|
||||
rom.get_data(0xA7, 0xACB3, 0xACC5, "uint16", kEproj_RocksFallingKraidCeilingXPositions, "kEproj_RocksFallingKraidCeilingXPositions", False, True, -1, 1)
|
||||
rom.get_data(0xA7, 0x96D2, 0x96DA, "KraidInstrList", kKraid_InvulnerableRoarInstrLists, "kKraid_InvulnerableRoarInstrLists", True, False, -1, 1)
|
||||
rom.get_data(0xA7, 0x96DA, 0x96DB, "KraidInstrList", kKraid_VulnerableRoarInstrLists, "kKraid_VulnerableRoarInstrLists", True, False, -1, 1)
|
||||
rom.get_data(0xA7, 0xB161, 0xB180, "uint16", kKraid_BodyHitboxTable, "kKraid_BodyHitboxTable", True, True, 2, 1)
|
||||
rom.get_data(0xA7, 0xB3D3, 0xB3F3, "uint16", kKraid_BgPalette7, "kKraid_BgPalette7", True, True, -1, 1)
|
||||
rom.get_data(0xA7, 0xB4F3, 0xB513, "uint16", kKraid_BgPalette7_KraidDeath, "kKraid_BgPalette7_KraidDeath", True, True, -1, 1)
|
||||
rom.get_data(0xA7, 0xB513, 0xB533, "uint16", kKraid_SprPalette7, "kKraid_SprPalette7", True, True, -1, 1)
|
||||
rom.get_data(0xA7, 0x974A, 0x9764, "KraidInstrList", kKraid_EyeGlowingInstrLists, "kKraid_EyeGlowingInstrLists", True, True, 1, 1)
|
||||
rom.get_data(0xA7, 0x9764, 0x9788, "KraidInstrList", kKraid_DyingInstrLists, "kKraid_DyingInstrLists", True, True, 1, 1)
|
||||
rom.get_data(0xA7, 0x92B7, 0x92C3, "Hitbox", kKraid_LintBoundary, "kKraid_LintBoundary", True, False, -1, 1)
|
||||
rom.get_data(0xA7, 0xBA7D, 0xBA95, "uint16", kKraid_XMovementTable, "kKraid_XMovementTable", True, True, 2, 1)
|
||||
rom.get_data(0xA7, 0xBC65, 0xBC75, "uint16", kEproj_RocksKraidSpits_RandomParameters, "kEproj_RocksKraidSpits_RandomParameters", True, True, -1, 1)
|
||||
rom.get_data(0xA7, 0x8B0A, 0x8B0E, "SpriteDrawInstr", kKraid_GoodFingernailInstrLists, "kKraid_GoodFingernailInstrLists", True, False, -1, 1)
|
||||
rom.get_data(0xA7, 0xBE3E, 0xBE46, "uint16", kKraidsFingernail_UpwardsVelocityTable, "kKraidsFingernail_UpwardsVelocityTable", True, True, -1, 1)
|
||||
rom.get_data(0xA7, 0xBE46, 0xBE4E, "uint16", kKraidsFingernail_DownwardsVelocityTable, "kKraidsFingernail_DownwardsVelocityTable", True, True, -1, 1)
|
||||
rom.get_data(0xA7, 0xBF1D, 0xBF2D, "uint16", kKraidsFingernail_BoundaryOffsets, "kKraidsFingernail_BoundaryOffsets", True, True, 2, 1)
|
||||
rom.get_data(0xA7, 0xC5E7, 0xC691, "KraidSinkTable", kKraidSinkEntry, "kKraidSinkEntry", True, True, 1, 1)
|
||||
rom.get_data(0xA7, 0xCE8E, 0xCE96, "uint16", kPhantoon_InstrListPtrs, "kPhantoon_InstrListPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA7, 0xCDED, 0xCDF3, "uint16", kPhantoon_MaterialisationSoundEffects, "kPhantoon_MaterialisationSoundEffects", True, True, -1, 1)
|
||||
rom.get_data(0xA7, 0x902D, 0x9055, "ExtendedSpriteMap", kPhantoon_BrokenCode, "kPhantoon_BrokenCode", True, True, 1, 1)
|
||||
rom.get_data(0xA7, 0xCFC2, 0xCFCA, "uint8", kEproj_DestroyableFireballs_Positions, "kEproj_DestroyableFireballs_Positions", False, True, -1, 1)
|
||||
rom.get_data(0xA7, 0xCCFD, 0xCD05, "uint16", kPhantoon_CasualFlameTimerPtrs, "kPhantoon_CasualFlameTimerPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA7, 0xCD41, 0xCD51, "uint16", kPhantoon_Figure8VulnerabilityTimers, "kPhantoon_Figure8VulnerabilityTimers", False, True, -1, 1)
|
||||
rom.get_data(0xA7, 0xCD53, 0xCD63, "uint16", kPhantoon_EyeClosedTimers, "kPhantoon_EyeClosedTimers", False, True, -1, 1)
|
||||
rom.get_data(0xA7, 0xCD63, 0xCD73, "uint16", kPhantoon_FireballRainHidingTimers, "kPhantoon_FireballRainHidingTimers", False, True, -1, 1)
|
||||
rom.get_data(0xA7, 0xD40D, 0xD421, "uint16", kPhantoon_EyeballDirectionInstrListPtrs, "kPhantoon_EyeballDirectionInstrListPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA7, 0xCDAD, 0xCDED, "uint16", kPhantoon_FlameRainSpawnPositions, "kPhantoon_FlameRainSpawnPositions", False, True, 4, 1)
|
||||
rom.get_data(0xA7, 0xDA1D, 0xDA51, "uint8", kPhantoon_DyingExplosionsTable, "kPhantoon_DyingExplosionsTable", False, True, 4, 1)
|
||||
rom.get_data(0xA7, 0xDC4A, 0xDC5A, "uint16", kPhantoon_HealthPalettePtrs, "kPhantoon_HealthPalettePtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA7, 0xF787, 0xF78F, "uint16", kDachora_PalettePtrs_1, "kDachora_PalettePtrs_1", True, True, -1, 1)
|
||||
rom.get_data(0xA7, 0xF92D, 0xF935, "uint16", kDachora_PalettePtrs_2, "kDachora_PalettePtrs_2", True, True, -1, 1)
|
||||
rom.get_data(0xA7, 0xCA41, 0xCA61, "uint16", kPhantoon_FadeOutTargetPalettes, "kPhantoon_FadeOutTargetPalettes", False, True, -1, 1)
|
||||
rom.get_data(0xA7, 0xCA61, 0xCB41, "uint16", kWreckedShipOn_Bg1AndBg2TargetPalettes, "kWreckedShipOn_Bg1AndBg2TargetPalettes", True, True, 16, 1)
|
||||
rom.get_data(0xA7, 0xF55F, 0xF56F, "uint16", kSpritePaletteRamPtrs, "kSpritePaletteRamPtrs", True, True, -1, 1)
|
||||
return
|
||||
|
||||
get_A7()
|
69
Port_Extraction/bank_A8/extract_bank_A8.py
Normal file
69
Port_Extraction/bank_A8/extract_bank_A8.py
Normal file
@ -0,0 +1,69 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
import common_data as rom
|
||||
|
||||
kEnemyInit_MorphBallEye_InstrListPtrs = []
|
||||
kYappingMaw_Constants = []
|
||||
kYappingMaw_Constant0 = []
|
||||
kYappingMaw_Constant1 = []
|
||||
kYappingMaw_Constant2 = []
|
||||
kYappingMaw_Constant3 = []
|
||||
kYappingMaw_Constant4 = []
|
||||
kYappingMaw_Constant5 = []
|
||||
kYappingMaw_Constant6 = []
|
||||
kYappingMaw_Constant7 = []
|
||||
kYappingMaw_Constant8 = []
|
||||
kYappingMaw_Constant9 = []
|
||||
kYappingMaw_Constant10 = []
|
||||
kYappingMaw_Constant11 = []
|
||||
kYappingMaw_InstrListPtrs = []
|
||||
kNorfairLavaMan_Palette = []
|
||||
kNorfairLavaMan_Tab2 = []
|
||||
kNorfairLavaMan_Tab0 = []
|
||||
kNorfairLavaMan_Tab1 = []
|
||||
kBeetom_SamusNotInProximityFuncPtrs = []
|
||||
kMaridiaFloater_InstrListPtrs = []
|
||||
kEnemyInit_WreckedShipRobotDeactivated_InstrListPtrs = []
|
||||
kEnemyInit_WreckedShipOrbs_InstrListPtrs = []
|
||||
kEnemyInit_WreckedShipSpark_InstrListPtrs = []
|
||||
kEnemyInit_WreckedShipSpark_FuncPtrs = []
|
||||
kBlueBrinstarFaceBlock_GlowPalette = []
|
||||
kKiHunter_InstrListPtrs = []
|
||||
|
||||
#Format is as follows:
|
||||
#rom.get_data(bank, starting address, ending address, "data type", array, "array name", hex bool, array bool, new line, new space)
|
||||
#"hex bool" is whether you want the data in hexadecimal or in decimal format
|
||||
#"array bool" is whether it's a single value or an array (will print [] if array, won't otherwise)
|
||||
#"new line/space" is how many elements you want before you insert a new line/space, -1 is never
|
||||
def get_A8():
|
||||
rom.get_data(0xA8, 0x90DA, 0x90E2, "uint16", kEnemyInit_MorphBallEye_InstrListPtrs, "kEnemyInit_MorphBallEye_InstrListPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA8, 0xA0A7, 0xA0C7, "uint16", kYappingMaw_Constants, "kYappingMaw_Constants", True, True, -1, 1)
|
||||
rom.get_data(0xA8, 0xA0A7, 0xA0A9, "uint16", kYappingMaw_Constant0, "kYappingMaw_Constant0", True, False, -1, 1)
|
||||
rom.get_data(0xA8, 0xA0A9, 0xA0AB, "uint16", kYappingMaw_Constant1, "kYappingMaw_Constant1", True, False, -1, 1)
|
||||
rom.get_data(0xA8, 0xA0AB, 0xA0AD, "uint16", kYappingMaw_Constant2, "kYappingMaw_Constant2", True, False, -1, 1)
|
||||
rom.get_data(0xA8, 0xA0AD, 0xA0AF, "uint16", kYappingMaw_Constant3, "kYappingMaw_Constant3", True, False, -1, 1)
|
||||
rom.get_data(0xA8, 0xA0B3, 0xA0B5, "uint16", kYappingMaw_Constant4, "kYappingMaw_Constant4", True, False, -1, 1)
|
||||
rom.get_data(0xA8, 0xA0B5, 0xA0B7, "uint16", kYappingMaw_Constant5, "kYappingMaw_Constant5", True, False, -1, 1)
|
||||
rom.get_data(0xA8, 0xA0B7, 0xA0B9, "uint16", kYappingMaw_Constant6, "kYappingMaw_Constant6", True, False, -1, 1)
|
||||
rom.get_data(0xA8, 0xA0B9, 0xA0BB, "uint16", kYappingMaw_Constant7, "kYappingMaw_Constant7", True, False, -1, 1)
|
||||
rom.get_data(0xA8, 0xA0BB, 0xA0BD, "uint16", kYappingMaw_Constant8, "kYappingMaw_Constant8", True, False, -1, 1)
|
||||
rom.get_data(0xA8, 0xA0BD, 0xA0BF, "uint16", kYappingMaw_Constant9, "kYappingMaw_Constant9", True, False, -1, 1)
|
||||
rom.get_data(0xA8, 0xA0C3, 0xA0C5, "uint16", kYappingMaw_Constant10, "kYappingMaw_Constant10", True, False, -1, 1)
|
||||
rom.get_data(0xA8, 0xA0C5, 0xA0C7, "uint16", kYappingMaw_Constant11, "kYappingMaw_Constant11", True, False, -1, 1)
|
||||
rom.get_data(0xA8, 0xA097, 0xA0A7, "uint16", kYappingMaw_InstrListPtrs, "kYappingMaw_InstrListPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA8, 0xAC1C, 0xAC9C, "uint16", kNorfairLavaMan_Palette, "kNorfairLavaMan_Palette", True, True, 16, 1)
|
||||
rom.get_data(0xA8, 0xAF79, 0xAF8B, "uint16", kNorfairLavaMan_Tab2, "kNorfairLavaMan_Tab2", False, True, -1, 1)
|
||||
rom.get_data(0xA8, 0xAF55, 0xAF67, "uint16", kNorfairLavaMan_Tab0, "kNorfairLavaMan_Tab0", False, True, -1, 1)
|
||||
rom.get_data(0xA8, 0xAF67, 0xAF79, "uint16", kNorfairLavaMan_Tab1, "kNorfairLavaMan_Tab1", True, True, -1, 1)
|
||||
rom.get_data(0xA8, 0xB74E, 0xB75E, "uint16", kBeetom_SamusNotInProximityFuncPtrs, "kBeetom_SamusNotInProximityFuncPtrs", True, True, 2, 1)
|
||||
rom.get_data(0xA8, 0xC599, 0xC59F, "uint16", kMaridiaFloater_InstrListPtrs, "kMaridiaFloater_InstrListPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA8, 0xCC30, 0xCC36, "uint16", kEnemyInit_WreckedShipRobotDeactivated_InstrListPtrs, "kEnemyInit_WreckedShipRobotDeactivated_InstrListPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA8, 0xE380, 0xE388, "uint16", kEnemyInit_WreckedShipOrbs_InstrListPtrs, "kEnemyInit_WreckedShipOrbs_InstrListPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA8, 0xE682, 0xE688, "uint16", kEnemyInit_WreckedShipSpark_InstrListPtrs, "kEnemyInit_WreckedShipSpark_InstrListPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA8, 0xE688, 0xE68E, "uint16", kEnemyInit_WreckedShipSpark_FuncPtrs, "kEnemyInit_WreckedShipSpark_FuncPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA8, 0xE7CC, 0xE80C, "uint16", kBlueBrinstarFaceBlock_GlowPalette, "kBlueBrinstarFaceBlock_GlowPalette", True, True, 4, 1)
|
||||
rom.get_data(0xA8, 0xF3B0, 0xF3B8, "uint16", kKiHunter_InstrListPtrs, "kKiHunter_InstrListPtrs", True, True, -1, 2)
|
||||
return
|
||||
|
||||
get_A8()
|
65
Port_Extraction/bank_A9/extract_bank_A9.py
Normal file
65
Port_Extraction/bank_A9/extract_bank_A9.py
Normal file
@ -0,0 +1,65 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
import common_data as rom
|
||||
|
||||
kMotherBrain_FakeDeathExplosionsXYPositions = []
|
||||
kMotherBrainTubesFallingFuncPtrs = []
|
||||
kMotherBrain_ExplosionsXYOffsets = []
|
||||
kMotherBrain_AttackInstrListPtrs = []
|
||||
kMotherBrain_RainbowBeamPalettes = []
|
||||
kMotherBrain_WalkForwardsFuncPtrs = []
|
||||
kMotherBrain_WalkBackwardsFuncPtrs = []
|
||||
kShitroid_FadingToBlack = []
|
||||
kShitroid_DeathExplosionsXYOffsets = []
|
||||
kShitroid_HealthBasedPalettes_Shell = []
|
||||
kShitroid_HealthBasedPalettes_Innards = []
|
||||
kMotherBrain_PaletteSetPtrs = []
|
||||
kDeadTorizo_VramWriteTableIndices_1 = []
|
||||
kDeadTorizo_VramWriteTableIndices_2 = []
|
||||
kDeadTorizo_SandHeapDestinationOffsets = []
|
||||
kDeadTorizo_SandHeapSourceOffsets = []
|
||||
kDeadTorizo_TileData = []
|
||||
kDeadZoomer_InstrListPtrs = []
|
||||
kDeadZoomer_CorpseRottingDefinitionPtrs = []
|
||||
kDeadRipper_InstrListPtrs = []
|
||||
kDeadRipper_CorpseRottingDefinitionPtrs = []
|
||||
kDeadSkree_InstrListPtrs = []
|
||||
kDeadSkree_CorpseRottingDefinitionPtrs = []
|
||||
kDeadMonsters_Tab0 = []
|
||||
kDeadMonsters_Tab1 = []
|
||||
|
||||
#Format is as follows:
|
||||
#rom.get_data(bank, starting address, ending address, "data type", array, "array name", hex bool, array bool, new line, new space)
|
||||
#"hex bool" is whether you want the data in hexadecimal or in decimal format
|
||||
#"array bool" is whether it's a single value or an array (will print [] if array, won't otherwise)
|
||||
#"new line/space" is how many elements you want before you insert a new line/space, -1 is never
|
||||
def get_A9():
|
||||
rom.get_data(0xA9, 0x8929, 0x8949, "uint16", kMotherBrain_FakeDeathExplosionsXYPositions, "kMotherBrain_FakeDeathExplosionsXYPositions", False, True, 2, 1)
|
||||
rom.get_data(0xA9, 0x8B7B, 0x8B85, "uint16", kMotherBrainTubesFallingFuncPtrs, "kMotherBrainTubesFallingFuncPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA9, 0xB099, 0xB109, "uint16", kMotherBrain_ExplosionsXYOffsets, "kMotherBrain_ExplosionsXYOffsets", True, True, 8, 2)
|
||||
rom.get_data(0xA9, 0xB6D4, 0xB6DC, "uint16", kMotherBrain_AttackInstrListPtrs, "kMotherBrain_AttackInstrListPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xAD, 0xE434, 0xE44A, "uint16", kMotherBrain_RainbowBeamPalettes, "kMotherBrain_RainbowBeamPalettes", True, True, -1, 1)
|
||||
rom.get_data(0xA9, 0xC61E, 0xC62A, "uint16", kMotherBrain_WalkForwardsFuncPtrs, "kMotherBrain_WalkForwardsFuncPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA9, 0xC664, 0xC670, "uint16", kMotherBrain_WalkBackwardsFuncPtrs, "kMotherBrain_WalkBackwardsFuncPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xAD, 0xE8E2, 0xE8F0, "uint16", kShitroid_FadingToBlack, "kShitroid_FadingToBlack", True, True, -1, 1)
|
||||
rom.get_data(0xA9, 0xCDFC, 0xCE24, "uint16", kShitroid_DeathExplosionsXYOffsets, "kShitroid_DeathExplosionsXYOffsets", True, True, 2, 1)
|
||||
rom.get_data(0xAD, 0xE7E2, 0xE7F2, "uint16", kShitroid_HealthBasedPalettes_Shell, "kShitroid_HealthBasedPalettes_Shell", True, True, -1, 1)
|
||||
rom.get_data(0xAD, 0xE882, 0xE892, "uint16", kShitroid_HealthBasedPalettes_Innards, "kShitroid_HealthBasedPalettes_Innards", True, True, -1, 1)
|
||||
rom.get_data(0xA9, 0xD260, 0xD264, "uint16", kMotherBrain_PaletteSetPtrs, "kMotherBrain_PaletteSetPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA9, 0xD583, 0xD5BD, "uint16", kDeadTorizo_VramWriteTableIndices_1, "kDeadTorizo_VramWriteTableIndices_1", True, True, 4, 1)
|
||||
rom.get_data(0xA9, 0xD549, 0xD583, "uint16", kDeadTorizo_VramWriteTableIndices_2, "kDeadTorizo_VramWriteTableIndices_2", True, True, 4, 1)
|
||||
rom.get_data(0xA9, 0xD67C, 0xD69C, "uint16", kDeadTorizo_SandHeapDestinationOffsets, "kDeadTorizo_SandHeapDestinationOffsets", True, True, -1, 1)
|
||||
rom.get_data(0xA9, 0xD69C, 0xD6BC, "uint16", kDeadTorizo_SandHeapSourceOffsets, "kDeadTorizo_SandHeapSourceOffsets", True, True, -1, 1)
|
||||
#rom.get_data(0xB7, 0xA800, 0xA80F, "uint16", kDeadTorizo_TileData, "kDeadTorizo_TileData", True, True, -1, 1)
|
||||
rom.get_data(0xA9, 0xD86A, 0xD870, "uint16", kDeadZoomer_InstrListPtrs, "kDeadZoomer_InstrListPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA9, 0xD870, 0xD876, "uint16", kDeadZoomer_CorpseRottingDefinitionPtrs, "kDeadZoomer_CorpseRottingDefinitionPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA9, 0xD897, 0xD89B, "uint16", kDeadRipper_InstrListPtrs, "kDeadRipper_InstrListPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA9, 0xD89B, 0xD89F, "uint16", kDeadRipper_CorpseRottingDefinitionPtrs, "kDeadRipper_CorpseRottingDefinitionPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA9, 0xD8C0, 0xD8C6, "uint16", kDeadSkree_InstrListPtrs, "kDeadSkree_InstrListPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA9, 0xD8C6, 0xD8CC, "uint16", kDeadSkree_CorpseRottingDefinitionPtrs, "kDeadSkree_CorpseRottingDefinitionPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xA9, 0xD951, 0xD959, "uint16", kDeadMonsters_Tab0, "kDeadMonsters_Tab0", True, True, -1, 1)
|
||||
rom.get_data(0xA9, 0xD959, 0xD961, "uint16", kDeadMonsters_Tab1, "kDeadMonsters_Tab1", True, True, -1, 1)
|
||||
return
|
||||
|
||||
get_A9()
|
61
Port_Extraction/bank_AA/extract_bank_AA.py
Normal file
61
Port_Extraction/bank_AA/extract_bank_AA.py
Normal file
@ -0,0 +1,61 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
import common_data as rom
|
||||
|
||||
kEnemyInit_Torizo_InstrListPtrs = []
|
||||
kEnemyInit_TourianEntranceStatue_InstrListPtrs = []
|
||||
kEnemyInit_TourianEntranceStatue_PaletteTab0 = []
|
||||
kEnemyInit_TourianEntranceStatue_PaletteTab1 = []
|
||||
kShaktool_InstrListPtrs0 = []
|
||||
kShaktool_InstrListPtrs1 = []
|
||||
kSine = []
|
||||
kCosine = []
|
||||
kNegativeSine = []
|
||||
kNegativeCosine_0 = []
|
||||
kNegativeCosine = []
|
||||
kShaktool_InstrListPtrs2 = []
|
||||
kEnemyInit_Shaktool_PropertiesIndices = []
|
||||
kEnemyInit_Shaktool_RamOffsetIndices = []
|
||||
kEnemyInit_Shaktool_InitialAnglesIndices = []
|
||||
kEnemyInit_Shaktool_FuncPtrs = []
|
||||
kEnemyInit_Shaktool_ZeroIndices = []
|
||||
kEnemyInit_Shaktool_LayerControlIndices = []
|
||||
kShaktool_XDirectionIndices = []
|
||||
kShaktool_SamusXPositionIndices = []
|
||||
kShaktool_SamusYPositionIndices = []
|
||||
kN00bTubeCracks_Palette2 = []
|
||||
kEnemyInit_ChozoStatue_InstrListPtrs = []
|
||||
|
||||
#Format is as follows:
|
||||
#rom.get_data(bank, starting address, ending address, "data type", array, "array name", hex bool, array bool, new line, new space)
|
||||
#"hex bool" is whether you want the data in hexadecimal or in decimal format
|
||||
#"array bool" is whether it's a single value or an array (will print [] if array, won't otherwise)
|
||||
#"new line/space" is how many elements you want before you insert a new line/space, -1 is never
|
||||
def get_AA():
|
||||
rom.get_data(0xAA, 0xC967, 0xC96B, "uint16", kEnemyInit_Torizo_InstrListPtrs, "kEnemyInit_Torizo_InstrListPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xAA, 0xD810, 0xD816, "uint16", kEnemyInit_TourianEntranceStatue_InstrListPtrs, "kEnemyInit_TourianEntranceStatue_InstrListPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xAA, 0xD765, 0xD785, "uint16", kEnemyInit_TourianEntranceStatue_PaletteTab0, "kEnemyInit_TourianEntranceStatue_PaletteTab0", True, True, -1, 1)
|
||||
rom.get_data(0xAA, 0xD785, 0xD7A5, "uint16", kEnemyInit_TourianEntranceStatue_PaletteTab1, "kEnemyInit_TourianEntranceStatue_PaletteTab1", True, True, -1, 1)
|
||||
rom.get_data(0xAA, 0xDF13, 0xDF21, "uint16", kShaktool_InstrListPtrs0, "kShaktool_InstrListPtrs0", True, True, -1, 1)
|
||||
rom.get_data(0xAA, 0xDF21, 0xDF2F, "uint16", kShaktool_InstrListPtrs1, "kShaktool_InstrListPtrs1", True, True, -1, 1)
|
||||
rom.get_data(0xAA, 0xE0BD, 0xE13D, "uint16", kSine, "kSine", True, True, 16, 1)
|
||||
rom.get_data(0xAA, 0xE13D, 0xE1BD, "uint16", kCosine, "kCosine", True, True, 16, 1)
|
||||
rom.get_data(0xAA, 0xE1BD, 0xE23D, "uint16", kNegativeSine, "kNegativeSine", True, True, 16, 1)
|
||||
rom.get_data(0xAA, 0xE23D, 0xE2BD, "uint16", kNegativeCosine_0, "kNegativeCosine_0", True, True, 16, 1)
|
||||
rom.get_data(0xAA, 0xE03D, 0xE0BD, "uint16", kNegativeCosine, "kNegativeCosine", True, True, 16, 1)
|
||||
rom.get_data(0xAA, 0xDD15, 0xDD25, "uint16", kShaktool_InstrListPtrs2, "kShaktool_InstrListPtrs2", True, True, -1, 1)
|
||||
rom.get_data(0xAA, 0xDE95, 0xDEA3, "uint16", kEnemyInit_Shaktool_PropertiesIndices, "kEnemyInit_Shaktool_PropertiesIndices", True, True, -1, 1)
|
||||
rom.get_data(0xAA, 0xDEA3, 0xDEB1, "uint16", kEnemyInit_Shaktool_RamOffsetIndices, "kEnemyInit_Shaktool_RamOffsetIndices", True, True, -1, 1)
|
||||
rom.get_data(0xAA, 0xDEB1, 0xDEBF, "uint16", kEnemyInit_Shaktool_InitialAnglesIndices, "kEnemyInit_Shaktool_InitialAnglesIndices", True, True, -1, 1)
|
||||
rom.get_data(0xAA, 0xDEDB, 0xDEE9, "uint16", kEnemyInit_Shaktool_FuncPtrs, "kEnemyInit_Shaktool_FuncPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xAA, 0xDEF7, 0xDF05, "uint16", kEnemyInit_Shaktool_ZeroIndices, "kEnemyInit_Shaktool_ZeroIndices", False, True, -1, 1)
|
||||
rom.get_data(0xAA, 0xDECD, 0xDEDB, "uint16", kEnemyInit_Shaktool_LayerControlIndices, "kEnemyInit_Shaktool_LayerControlIndices", False, True, -1, 1)
|
||||
rom.get_data(0xAA, 0xE630, 0xE670, "uint16", kShaktool_XDirectionIndices, "kShaktool_XDirectionIndices", True, True, 16, 1)
|
||||
rom.get_data(0xAA, 0xE670, 0xE6B0, "uint16", kShaktool_SamusXPositionIndices, "kShaktool_SamusXPositionIndices", True, True, 16, 1)
|
||||
rom.get_data(0xAA, 0xE6B0, 0xE6F0, "uint16", kShaktool_SamusYPositionIndices, "kShaktool_SamusYPositionIndices", True, True, 16, 1)
|
||||
rom.get_data(0xAA, 0xE2DD, 0xE31D, "uint16", kN00bTubeCracks_Palette2, "kN00bTubeCracks_Palette2", True, True, -1, 1)
|
||||
rom.get_data(0xAA, 0xE7A2, 0xE7A6, "uint16", kEnemyInit_ChozoStatue_InstrListPtrs, "kEnemyInit_ChozoStatue_InstrListPtrs", True, True, -1, 1)
|
||||
return
|
||||
|
||||
get_AA()
|
31
Port_Extraction/bank_AD/extract_bank_AD.py
Normal file
31
Port_Extraction/bank_AD/extract_bank_AD.py
Normal file
@ -0,0 +1,31 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
import common_data as rom
|
||||
|
||||
kMotherBrain_HealthBasedPalettes_Brain = []
|
||||
kMotherBrain_HealthBasedPalettes_BackLeg = []
|
||||
kMotherBrain_FadePalToBlack = []
|
||||
kMotherBrain_TransitionToFromGrey_Incr = []
|
||||
kMotherBrain_TransitionToFromGrey_Decr = []
|
||||
kMotherBrain_FadeToGray_Drained = []
|
||||
kMotherBrain_FadeToGray_RealDeath = []
|
||||
kMotherBrain_Phase3_TurnLightsBackOn = []
|
||||
|
||||
#Format is as follows:
|
||||
#rom.get_data(bank, starting address, ending address, "data type", array, "array name", hex bool, array bool, new line, new space)
|
||||
#"hex bool" is whether you want the data in hexadecimal or in decimal format
|
||||
#"array bool" is whether it's a single value or an array (will print [] if array, won't otherwise)
|
||||
#"new line/space" is how many elements you want before you insert a new line/space, -1 is never
|
||||
def get_AD():
|
||||
rom.get_data(0xAD, 0xE6A2, 0xE6AC, "uint16", kMotherBrain_HealthBasedPalettes_Brain, "kMotherBrain_HealthBasedPalettes_Brain", True, True, -1, 1)
|
||||
rom.get_data(0xAD, 0xE742, 0xE74C, "uint16", kMotherBrain_HealthBasedPalettes_BackLeg, "kMotherBrain_HealthBasedPalettes_BackLeg", True, True, -1, 1)
|
||||
rom.get_data(0xAD, 0xE9E8, 0xEA0A, "uint16", kMotherBrain_FadePalToBlack, "kMotherBrain_FadePalToBlack", True, True, 16, 1)
|
||||
rom.get_data(0xAD, 0xED8A, 0xED9C, "uint16", kMotherBrain_TransitionToFromGrey_Incr, "kMotherBrain_TransitionToFromGrey_Incr", True, True, -1, 1)
|
||||
rom.get_data(0xAD, 0xED9C, 0xEDAE, "uint16", kMotherBrain_TransitionToFromGrey_Decr, "kMotherBrain_TransitionToFromGrey_Decr", True, True, -1, 1)
|
||||
rom.get_data(0xAD, 0xEF87, 0xEF99, "uint16", kMotherBrain_FadeToGray_Drained, "kMotherBrain_FadeToGray_Drained", True, True, -1, 1)
|
||||
rom.get_data(0xAD, 0xF107, 0xF119, "uint16", kMotherBrain_FadeToGray_RealDeath, "kMotherBrain_FadeToGray_RealDeath", True, True, -1, 1)
|
||||
rom.get_data(0xAD, 0xF273, 0xF283, "uint16", kMotherBrain_Phase3_TurnLightsBackOn, "kMotherBrain_Phase3_TurnLightsBackOn", True, True, -1, 1)
|
||||
return
|
||||
|
||||
get_AD()
|
19
Port_Extraction/bank_B2/extract_bank_B2.py
Normal file
19
Port_Extraction/bank_B2/extract_bank_B2.py
Normal file
@ -0,0 +1,19 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
import common_data as rom
|
||||
|
||||
kWallSpacePirates_Palette_3 = []
|
||||
kSpacePirate_InstrListPtrs = []
|
||||
|
||||
#Format is as follows:
|
||||
#rom.get_data(bank, starting address, ending address, "data type", array, "array name", hex bool, array bool, new line, new space)
|
||||
#"hex bool" is whether you want the data in hexadecimal or in decimal format
|
||||
#"array bool" is whether it's a single value or an array (will print [] if array, won't otherwise)
|
||||
#"new line/space" is how many elements you want before you insert a new line/space, -1 is never
|
||||
def get_B2():
|
||||
rom.get_data(0xB2, 0x8727, 0x8747, "uint16", kWallSpacePirates_Palette_3, "kWallSpacePirates_Palette_3", True, True, -1, 1)
|
||||
rom.get_data(0xB2, 0xF959, 0xF969, "uint16", kSpacePirate_InstrListPtrs, "kSpacePirate_InstrListPtrs", True, True, 4, 1)
|
||||
return
|
||||
|
||||
get_B2()
|
43
Port_Extraction/bank_B3/extract_bank_B3.py
Normal file
43
Port_Extraction/bank_B3/extract_bank_B3.py
Normal file
@ -0,0 +1,43 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
import common_data as rom
|
||||
|
||||
kBrinstarRedPipeBug_InstrListPtrs = []
|
||||
kBrinstarGreenPipeBug_InstrListPtrs = []
|
||||
kBotwoon_HoleHitboxes = []
|
||||
kBotwoon_SpeedTable = []
|
||||
kBotwoon_9675PtrsUNUSED = []
|
||||
kBotwoonHealthThresForPalChange = []
|
||||
kBotwoonHealthBasedPalette = []
|
||||
kBotwoon_MouthClosedDirectionInstrListPtrs = []
|
||||
kBotwoon_SpitDirectionInstrListPtrs = []
|
||||
kEscapeEtecoon_XPositions = []
|
||||
kEscapeEtecoon_YPositions = []
|
||||
kEscapeEtecoon_InstrListPtrs = []
|
||||
kEscapeEtecoon_FuncPtrs = []
|
||||
kEscapeEtecoon_XVelocities = []
|
||||
|
||||
#Format is as follows:
|
||||
#rom.get_data(bank, starting address, ending address, "data type", array, "array name", hex bool, array bool, new line, new space)
|
||||
#"hex bool" is whether you want the data in hexadecimal or in decimal format
|
||||
#"array bool" is whether it's a single value or an array (will print [] if array, won't otherwise)
|
||||
#"new line/space" is how many elements you want before you insert a new line/space, -1 is never
|
||||
def get_B3():
|
||||
rom.get_data(0xB3, 0x882B, 0x8833, "uint16", kBrinstarRedPipeBug_InstrListPtrs, "kBrinstarRedPipeBug_InstrListPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xB3, 0x8833, 0x883B, "uint16", kBrinstarGreenPipeBug_InstrListPtrs, "kBrinstarGreenPipeBug_InstrListPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xB3, 0x949B, 0x94BB, "uint16", kBotwoon_HoleHitboxes, "kBotwoon_HoleHitboxes", True, True, 4, 1)
|
||||
rom.get_data(0xB3, 0x94BB, 0x94C7, "uint16", kBotwoon_SpeedTable, "kBotwoon_SpeedTable", False, True, 2, 1)
|
||||
rom.get_data(0xB3, 0x9675, 0x967B, "uint16", kBotwoon_9675PtrsUNUSED, "kBotwoon_9675PtrsUNUSED", True, True, -1, 1)
|
||||
rom.get_data(0xB3, 0x981B, 0x982B, "uint16", kBotwoonHealthThresForPalChange, "kBotwoonHealthThresForPalChange", True, True, -1, 1)
|
||||
rom.get_data(0xB3, 0x971B, 0x981B, "uint16", kBotwoonHealthBasedPalette, "kBotwoonHealthBasedPalette", True, True, 16, 1)
|
||||
rom.get_data(0xB3, 0x946B, 0x949B, "uint16", kBotwoon_MouthClosedDirectionInstrListPtrs, "kBotwoon_MouthClosedDirectionInstrListPtrs", True, True, 8, 1)
|
||||
rom.get_data(0xB3, 0x948B, 0x949B, "uint16", kBotwoon_SpitDirectionInstrListPtrs, "kBotwoon_SpitDirectionInstrListPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xB3, 0xE718, 0xE71E, "uint16", kEscapeEtecoon_XPositions, "kEscapeEtecoon_XPositions", False, True, -1, 1)
|
||||
rom.get_data(0xB3, 0xE71E, 0xE724, "uint16", kEscapeEtecoon_YPositions, "kEscapeEtecoon_YPositions", False, True, -1, 1)
|
||||
rom.get_data(0xB3, 0xE72A, 0xE730, "uint16", kEscapeEtecoon_InstrListPtrs, "kEscapeEtecoon_InstrListPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xB3, 0xE724, 0xE72A, "uint16", kEscapeEtecoon_FuncPtrs, "kEscapeEtecoon_FuncPtrs", True, True, -1, 1)
|
||||
rom.get_data(0xB3, 0xE730, 0xE736, "uint16", kEscapeEtecoon_XVelocities, "kEscapeEtecoon_XVelocities", True, True, -1, 1)
|
||||
return
|
||||
|
||||
get_B3()
|
18
Port_Extraction/bank_B4/extract_bank_B4.py
Normal file
18
Port_Extraction/bank_B4/extract_bank_B4.py
Normal file
@ -0,0 +1,18 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
import common_data as rom
|
||||
|
||||
kSpriteObject_InstrListPtrs = []
|
||||
|
||||
#Format is as follows:
|
||||
#rom.get_data(bank, starting address, ending address, "data type", array, "array name", hex bool, array bool, new line, new space)
|
||||
#"hex bool" is whether you want the data in hexadecimal or in decimal format
|
||||
#"array bool" is whether it's a single value or an array (will print [] if array, won't otherwise)
|
||||
#"new line/space" is how many elements you want before you insert a new line/space, -1 is never
|
||||
def get_B4():
|
||||
rom.get_data(0xB4, 0xBDA8, 0xBE24, "uint16", kSpriteObject_InstrListPtrs, "kSpriteObject_InstrListPtrs", True, True, 16, 1)
|
||||
#rom.get_data(, 0x, "", , "", , , , )
|
||||
return
|
||||
|
||||
get_B4()
|
389
Port_Extraction/common_data.py
Normal file
389
Port_Extraction/common_data.py
Normal file
@ -0,0 +1,389 @@
|
||||
import sys
|
||||
|
||||
class Rom:
|
||||
def __init__(self):
|
||||
self.data = open('sm.smc', 'rb').read()
|
||||
|
||||
def map(self, addr):
|
||||
assert addr & 0x8000
|
||||
return (((addr >> 16) << 15) | (addr & 0x7fff)) & 0x3fffff
|
||||
|
||||
def get_byte(self, addr):
|
||||
return self.data[self.map(addr)]
|
||||
|
||||
def get_word(self, addr):
|
||||
addr = self.map(addr)
|
||||
return self.data[addr] + self.data[addr + 1] * 256
|
||||
|
||||
def get_long(self, addr):
|
||||
addr = self.map(addr)
|
||||
return self.data[addr] + self.data[addr + 1] * 256 + self.data[addr + 2] * 65536
|
||||
|
||||
def get_double(self, addr):
|
||||
addr = self.map(addr)
|
||||
return self.data[addr] + self.data[addr + 1] * 256 + self.data[addr + 2] * 65536 + self.data[addr + 3] * 16777216
|
||||
|
||||
def get_bytes(self, addr, n):
|
||||
addr = self.map(addr)
|
||||
return self.data[addr:addr+n]
|
||||
|
||||
ROM = Rom()
|
||||
get_byte = ROM.get_byte
|
||||
get_word = ROM.get_word
|
||||
get_long = ROM.get_long
|
||||
get_double = ROM.get_double
|
||||
|
||||
|
||||
class uint8:
|
||||
def __init__(self, addr):
|
||||
self.byte = get_byte(addr)
|
||||
def __str__(self):
|
||||
output = ""
|
||||
if hex_flag == True:
|
||||
output = "%4s" % hex(self.byte)
|
||||
else:
|
||||
#if self.byte >= 0x80:
|
||||
#self.byte = -(self.byte ^ 0xFF) -1
|
||||
output = "%3s" % self.byte
|
||||
return output
|
||||
|
||||
class uint16:
|
||||
def __init__(self, addr):
|
||||
self.word = get_word(addr)
|
||||
def __str__(self):
|
||||
output = ""
|
||||
if hex_flag == True:
|
||||
output = "%6s" % hex(self.word)
|
||||
else:
|
||||
#if self.word >= 0x8000:
|
||||
#self.word = -(self.word ^ 0xFFFF) -1
|
||||
output = "%5s" % self.word
|
||||
return output
|
||||
|
||||
class LongPtr:
|
||||
def __init__(self, addr):
|
||||
self.long_addr = get_word(addr)
|
||||
self.bank = get_byte(addr+2)
|
||||
def __str__(self):
|
||||
output = ""
|
||||
if hex_flag == True:
|
||||
output = "%6s, %4s" % (hex(self.long_addr), hex(self.bank))
|
||||
else:
|
||||
output = "%s, %s" % (self.long_addr, self.bank)
|
||||
return output
|
||||
|
||||
class uint32:
|
||||
def __init__(self, addr):
|
||||
self.double = get_double(addr)
|
||||
def __str__(self):
|
||||
output = ""
|
||||
if hex_flag == True:
|
||||
output = "%10s" % hex(self.double)
|
||||
else:
|
||||
output = "%10s" % self.double
|
||||
return output
|
||||
|
||||
class MapScrollArrowData:
|
||||
def __init__(self, addr):
|
||||
self.x_pos = get_word(addr)
|
||||
self.y_pos = get_word(addr+2)
|
||||
self.anim_id = get_word(addr+4)
|
||||
self.input = get_word(addr+6)
|
||||
self.map_scroll_dir = get_word(addr+8)
|
||||
def __str__(self):
|
||||
output = "%s, %s, %s, %s, %s, };" % (self.x_pos, self.y_pos, self.anim_id, self.input, self.map_scroll_dir)
|
||||
return output
|
||||
|
||||
class ExpandingSquareVels:
|
||||
def __init__(self, addr):
|
||||
self.left_subvel = get_word(addr)
|
||||
self.left_vel = get_word(addr+2)
|
||||
self.right_subvel = get_word(addr+4)
|
||||
self.right_vel = get_word(addr+6)
|
||||
self.top_subvel = get_word(addr+8)
|
||||
self.top_vel = get_word(addr+10)
|
||||
self.bottom_subvel = get_word(addr+12)
|
||||
self.bottom_vel = get_word(addr+14)
|
||||
def __str__(self):
|
||||
output = "%6s,%6s, %6s,%3s, %6s,%6s, %6s,%3s, " % (hex(self.left_subvel), hex(self.left_vel), hex(self.right_subvel), hex(self.right_vel),
|
||||
hex(self.top_subvel), hex(self.top_vel), hex(self.bottom_subvel), hex(self.bottom_vel))
|
||||
return output
|
||||
|
||||
class PauseScreenSpriteAnimationData:
|
||||
def __init__(self, addr):
|
||||
self.unused_1 = get_word(addr)
|
||||
self.lr_highlight = get_word(addr+2)
|
||||
self.item_selector = get_word(addr+4)
|
||||
self.unused_2 = get_word(addr+6)
|
||||
self.unused_3 = get_word(addr+8)
|
||||
self.map_scroll_arrow_up = get_word(addr+10)
|
||||
self.map_scroll_arrow_down = get_word(addr+12)
|
||||
self.map_scroll_arrow_right = get_word(addr+14)
|
||||
self.map_scroll_arrow_left = get_word(addr+16)
|
||||
def __str__(self):
|
||||
output = "%6s, %6s, %6s, %6s, %6s, %6s, %6s, %6s, %6s, };" % (hex(self.unused_1), hex(self.lr_highlight), hex(self.item_selector), hex(self.unused_2),
|
||||
hex(self.unused_3), hex(self.map_scroll_arrow_up), hex(self.map_scroll_arrow_down),
|
||||
hex(self.map_scroll_arrow_right), hex(self.map_scroll_arrow_left),)
|
||||
return output
|
||||
|
||||
class FileCopyArrowStuff:
|
||||
def __init__(self, addr):
|
||||
self.spritemap_index = get_word(addr)
|
||||
self.x_pos = get_word(addr+2)
|
||||
self.y_pos = get_word(addr+4)
|
||||
def __str__(self):
|
||||
output = "%s, %s, %s, " % (self.spritemap_index, self.x_pos, self.y_pos)
|
||||
return output
|
||||
|
||||
class MsgBoxConfig:
|
||||
def __init__(self, addr):
|
||||
self.modify_box_func = get_word(addr)
|
||||
self.draw_initial_tilemap = get_word(addr+2)
|
||||
self.message_tilemap = get_word(addr+4)
|
||||
def __str__(self):
|
||||
output = "%6s, %6s, %6s, " % (hex(self.modify_box_func), hex(self.draw_initial_tilemap), hex(self.message_tilemap))
|
||||
return output
|
||||
|
||||
class HdmaScrollEntry:
|
||||
def __init__(self, addr):
|
||||
self.top_pos = get_word(addr)
|
||||
self.scroll_subspeed = get_word(addr+2)
|
||||
self.scroll_speed = get_word(addr+4)
|
||||
self.hdma_data_table_entry = get_word(addr+6)
|
||||
def __str__(self):
|
||||
output = "%6s, %6s, %6s, %6s" % (hex(self.top_pos), hex(self.scroll_subspeed), hex(self.scroll_speed), hex(self.hdma_data_table_entry))
|
||||
return output
|
||||
|
||||
class XrayBlockData:
|
||||
def __init__(self, addr):
|
||||
self.value = get_word(addr)
|
||||
self.addr = get_word(addr+2)
|
||||
def __str__(self):
|
||||
output = "%6s, %6s" % (hex(self.value), hex(self.addr))
|
||||
return output
|
||||
|
||||
class SamusCrystalFlashPalTable:
|
||||
def __init__(self, addr):
|
||||
self.ptr = get_word(addr)
|
||||
self.timer = get_word(addr+2)
|
||||
def __str__(self):
|
||||
output = "%6s,%s" % (hex(self.ptr), self.timer)
|
||||
return output
|
||||
|
||||
class ProjectileDamagesAndInstrPtr:
|
||||
def __init__(self, addr):
|
||||
self.damages = get_word(addr)
|
||||
self.instr_ptr = get_word(addr+2)
|
||||
def __str__(self):
|
||||
output = "%6s, %6s" % (hex(self.damages), hex(self.instr_ptr))
|
||||
return output
|
||||
|
||||
class GrappleBeamSpecialAngles:
|
||||
def __init__(self, addr):
|
||||
self.angle = get_word(addr)
|
||||
self.pose = get_word(addr+2)
|
||||
self.x_offset = get_word(addr+4)
|
||||
self.y_offset = get_word(addr+6)
|
||||
self.grapple_function = get_word(addr+8)
|
||||
def __str__(self):
|
||||
output = "%6s, %6s, %6s, %6s, %6s" % (hex(self.angle), hex(self.pose), hex(self.x_offset), hex(self.y_offset), hex(self.grapple_function))
|
||||
return output
|
||||
|
||||
class MaridiaSnailData2:
|
||||
def __init__(self, addr):
|
||||
self.field_0 = get_word(addr)
|
||||
self.field_2 = get_word(addr+2)
|
||||
self.field_4 = get_word(addr+4)
|
||||
self.field_6 = get_word(addr+6)
|
||||
def __str__(self):
|
||||
output = "%6s, %5s, %6s, %5s" % (hex(self.field_0), self.field_2, hex(self.field_4), self.field_6)
|
||||
return output
|
||||
|
||||
class KraidInstrList:
|
||||
def __init__(self, addr):
|
||||
self.timer = get_word(addr)
|
||||
self.tilemap = get_word(addr+2)
|
||||
self.vuln_mouth_hitbox = get_word(addr+4)
|
||||
self.invuln_mouth_hitbox = get_word(addr+6)
|
||||
def __str__(self):
|
||||
output = "%5s, %6s, %6s, %6s" % (self.timer, hex(self.tilemap), hex(self.vuln_mouth_hitbox), hex(self.invuln_mouth_hitbox))
|
||||
return output
|
||||
|
||||
class Hitbox:
|
||||
def __init__(self, addr):
|
||||
self.left = get_word(addr)
|
||||
self.top = get_word(addr+2)
|
||||
self.right = get_word(addr+4)
|
||||
self.bottom = get_word(addr+6)
|
||||
self.samus_coll_ptr = get_word(addr+8)
|
||||
self.proj_coll_ptr = get_word(addr+10)
|
||||
def __str__(self):
|
||||
output = "%6s, %6s, %6s, %6s, %6s, %6s" % (hex(self.left), hex(self.top), hex(self.right), hex(self.bottom),
|
||||
hex(self.samus_coll_ptr), hex(self.proj_coll_ptr))
|
||||
return output
|
||||
|
||||
class SpriteDrawInstr:
|
||||
def __init__(self, addr):
|
||||
self.timer = get_word(addr)
|
||||
self.sprite_ptr = get_word(addr+2)
|
||||
def __str__(self):
|
||||
output = "%5s, %6s" % (self.timer, hex(self.sprite_ptr))
|
||||
return output
|
||||
|
||||
class KraidSinkTable:
|
||||
def __init__(self, addr):
|
||||
self.kraid_y_pos = get_word(addr)
|
||||
self.vram_bg2_tilemap_offset = get_word(addr+2)
|
||||
self.func_ptr = get_word(addr+4)
|
||||
def __str__(self):
|
||||
output = "%6s, %6s, %6s" % (hex(self.kraid_y_pos), hex(self.vram_bg2_tilemap_offset), hex(self.func_ptr))
|
||||
return output
|
||||
|
||||
class ExtendedSpriteMap:
|
||||
def __init__(self, addr):
|
||||
self.xpos = get_word(addr)
|
||||
self.ypos = get_word(addr+2)
|
||||
self.spritemap = get_word(addr+4)
|
||||
self.hitbox_ptr_ = get_word(addr+6)
|
||||
def __str__(self):
|
||||
output = "%6s, %6s, %6s, %6s" % (hex(self.xpos), hex(self.ypos), hex(self.spritemap), hex(self.hitbox_ptr_))
|
||||
return output
|
||||
|
||||
hex_flag = False
|
||||
array_flag = False
|
||||
|
||||
def get_data(bank, start, end, type, data, name, hexadecimal, array, new_line, new_space):
|
||||
global hex_flag, array_flag
|
||||
hex_flag = hexadecimal
|
||||
array_flag = array
|
||||
data_address = (bank << 16) + start
|
||||
end_address = (bank << 16) + end
|
||||
while data_address < end_address:
|
||||
new_data = 0
|
||||
if type == "uint8":
|
||||
new_data = uint8(data_address)
|
||||
data_address += 1
|
||||
|
||||
elif type == "uint16":
|
||||
new_data = uint16(data_address)
|
||||
data_address += 2
|
||||
|
||||
elif type == "LongPtr":
|
||||
new_data = LongPtr(data_address)
|
||||
data_address += 3
|
||||
|
||||
elif type == "uint32":
|
||||
new_data = uint32(data_address)
|
||||
data_address += 4
|
||||
|
||||
elif type == "MapScrollArrowData":
|
||||
new_data = MapScrollArrowData(data_address)
|
||||
data_address += 10
|
||||
|
||||
elif type == "ExpandingSquareVels":
|
||||
new_data = ExpandingSquareVels(data_address)
|
||||
data_address += 16
|
||||
|
||||
elif type == "PauseScreenSpriteAnimationData":
|
||||
new_data = PauseScreenSpriteAnimationData(data_address)
|
||||
data_address += 18
|
||||
|
||||
elif type == "HdmaScrollEntry":
|
||||
new_data = HdmaScrollEntry(data_address)
|
||||
data_address += 8
|
||||
if data_address > end_address:
|
||||
data_address -= 6
|
||||
new_data = uint16(data_address)
|
||||
data.append(new_data)
|
||||
break
|
||||
|
||||
elif type == "XrayBlockData":
|
||||
new_data = XrayBlockData(data_address)
|
||||
data_address += 4
|
||||
if data_address > end_address:
|
||||
data_address -= 2
|
||||
new_data = uint16(data_address)
|
||||
data.append(new_data)
|
||||
break
|
||||
|
||||
elif type == "SamusCrystalFlashPalTable":
|
||||
new_data = SamusCrystalFlashPalTable(data_address)
|
||||
data_address += 4
|
||||
|
||||
elif type == "ProjectileDamagesAndInstrPtr":
|
||||
new_data = ProjectileDamagesAndInstrPtr(data_address)
|
||||
data_address += 4
|
||||
|
||||
elif type == "GrappleBeamSpecialAngles":
|
||||
new_data = GrappleBeamSpecialAngles(data_address)
|
||||
data_address += 10
|
||||
|
||||
elif type == "MaridiaSnailData2":
|
||||
new_data = MaridiaSnailData2(data_address)
|
||||
data_address += 8
|
||||
|
||||
elif type == "KraidInstrList":
|
||||
new_data = KraidInstrList(data_address)
|
||||
data_address += 8
|
||||
if data_address > end_address:
|
||||
data_address -= 8
|
||||
new_data = uint16(data_address)
|
||||
data.append(new_data)
|
||||
break
|
||||
|
||||
elif type == "Hitbox":
|
||||
new_data = Hitbox(data_address)
|
||||
data_address += 12
|
||||
|
||||
elif type == "SpriteDrawInstr":
|
||||
new_data = SpriteDrawInstr(data_address)
|
||||
data_address += 4
|
||||
|
||||
elif type == "KraidSinkTable":
|
||||
new_data = KraidSinkTable(data_address)
|
||||
data_address += 6
|
||||
if data_address > end_address:
|
||||
data_address -= 6
|
||||
new_data = uint16(data_address)
|
||||
data.append(new_data)
|
||||
break
|
||||
|
||||
elif type == "ExtendedSpriteMap":
|
||||
new_data = ExtendedSpriteMap(data_address)
|
||||
data_address += 8
|
||||
|
||||
data.append(new_data)
|
||||
|
||||
print_data(type, data, name, new_line, new_space)
|
||||
return
|
||||
|
||||
|
||||
def print_data(type, data, name, new_line, new_space):
|
||||
#print(data type + " " + name + "[] = { \n\t")
|
||||
#print("%s %s[] = {" % (type, name), end="\n ")
|
||||
print("%s %s" % (type, name), end="")
|
||||
if array_flag == True:
|
||||
print("[] = {", end="\n ")
|
||||
elif array_flag == False:
|
||||
print(" = {", end=" ")
|
||||
new_space_counter = 0
|
||||
new_line_counter = 0
|
||||
for entry in data:
|
||||
if new_space_counter == new_space:
|
||||
print(end=" ")
|
||||
new_space_counter = 0
|
||||
|
||||
if new_line_counter == new_line:
|
||||
print(end="\n ")
|
||||
new_line_counter = 0
|
||||
|
||||
print(entry, end=",")
|
||||
new_space_counter += 1
|
||||
new_line_counter += 1
|
||||
|
||||
if array_flag == True:
|
||||
print("\n};\n")
|
||||
elif array_flag == False:
|
||||
print(" };\n")
|
||||
return
|
||||
|
BIN
Port_Extraction/out_92_original.txt
Normal file
BIN
Port_Extraction/out_92_original.txt
Normal file
Binary file not shown.
15
README.md
15
README.md
@ -1,10 +1,17 @@
|
||||
# sm
|
||||
|
||||
Our discord server is: https://discord.gg/AJJbJAzNNJ
|
||||
The building instructions are the same as the original port. For more information about the original port, see: https://github.com/snesrev/sm.
|
||||
|
||||
Early version. It has bugs and the code is messy.
|
||||
This is a fork of the Super Metroid PC Port meant to continue the work and add more features. There are various goals intended for this project, including:
|
||||
1. Giving all functions and variables proper names. (work has been made on functions, but not on variables as of yet)
|
||||
2. Removing all the calls to read code directly from rom. (some progress has been made removing RomPtrs, but much more work is to be done)
|
||||
3. Adding MSU-1 support. (early support has been added, but is not perfect and currently disables mismatch checking)
|
||||
4. Adding widescreen and overscan support. (no work yet)
|
||||
|
||||
For building instructions, see: https://github.com/snesrev/sm/blob/main/BUILDING.md
|
||||
The fork is still very early in development and there is much to be done. Outside of early MSU-1 support, there is not much improvement on the player side.
|
||||
Any contributions, even as simple as giving a function or a variable a proper name, is welcome. The bank logs are a great resource for this: https://patrickjohnston.org/bank/.
|
||||
|
||||
Put sm.smc (sha1 hash da957f0d63d14cb441d215462904c4fa8519c613) in the root folder. When running, it will run both versions and compare frame by frame. If it detects a mismatch, it saves a snapshot in saves/ and displays a counter on screen counting down from 300.
|
||||
Note about Port_Extraction folder:
|
||||
Port_Extraction is currently a scratchpad to manually extract assets from the rom and insert them into the port.
|
||||
In the long run, this will be used to automatically extract all necessary assets from the game.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user