Skip to content

Commit

Permalink
Initial v1.07 source + Dungeon Map Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
LuigiBlood committed May 14, 2021
1 parent d0bb023 commit 01f9a62
Show file tree
Hide file tree
Showing 52 changed files with 1,362 additions and 0 deletions.
931 changes: 931 additions & 0 deletions AnotherTreasureIsland/Marvelous_Main.tbl

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions AnotherTreasureIsland/_1lz_en.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
".\tools\lc\recomp.exe" "./gfx/en/lz_title_gfx.bin" "./gfx/en/lz/lz_title_gfx.bin.lz" 0 1 0
".\tools\lc\recomp.exe" "./gfx/en/lz_title_map.bin" "./gfx/en/lz/lz_title_map.bin.lz" 0 1 0
".\tools\lc\recomp.exe" "./gfx/en/lz_subtitle_gfx.bin" "./gfx/en/lz/lz_subtitle_gfx.bin.lz" 0 1 0
".\tools\lc\recomp.exe" "./gfx/en/lz_intro_gfx1.bin" "./gfx/en/lz/lz_intro_gfx1.bin.lz" 0 1 0
".\tools\lc\recomp.exe" "./gfx/en/lz_intro_gfx2.bin" "./gfx/en/lz/lz_intro_gfx2.bin.lz" 0 1 0
".\tools\lc\recomp.exe" "./gfx/en/lz_intro_map.bin" "./gfx/en/lz/lz_intro_map.bin.lz" 0 1 0
".\tools\lc\recomp.exe" "./gfx/en/lz_teamname_map.bin" "./gfx/en/lz/lz_teamname_map.bin.lz" 0 1 0
".\tools\lc\recomp.exe" "./gfx/en/lz_credits_gfx.bin" "./gfx/en/lz/lz_credits_gfx.bin.lz" 0 1 0
".\tools\lc\recomp.exe" "./gfx/en/lz_credits_map.bin" "./gfx/en/lz/lz_credits_map.bin.lz" 0 1 0
".\tools\lc\recomp.exe" "./gfx/en/lz_colonel_note_gfx1.bin" "./gfx/en/lz/lz_colonel_note_gfx1.bin.lz" 0 1 0
".\tools\lc\recomp.exe" "./gfx/en/lz_colonel_note_gfx2.bin" "./gfx/en/lz/lz_colonel_note_gfx2.bin.lz" 0 1 0
".\tools\lc\recomp.exe" "./gfx/en/lz_gina_ransom_gfx.bin" "./gfx/en/lz/lz_gina_ransom_gfx.bin.lz" 0 1 0
".\tools\lc\recomp.exe" "./gfx/en/lz_patchy_note_gfx.bin" "./gfx/en/lz/lz_patchy_note_gfx.bin.lz" 0 1 0
".\tools\lc\recomp.exe" "./gfx/en/lz_camp_tips_gfx.bin" "./gfx/en/lz/lz_camp_tips_gfx.bin.lz" 0 1 0
".\tools\lc\recomp.exe" "./gfx/en/lz_controls_gfx.bin" "./gfx/en/lz/lz_controls_gfx.bin.lz" 0 1 0
".\tools\lc\recomp.exe" "./gfx/en/lz_ship_notes_gfx.bin" "./gfx/en/lz/lz_ship_notes_gfx.bin.lz" 0 1 0
".\tools\lc\recomp.exe" "./gfx/en/lz_chorelistmisc_map.bin" "./gfx/en/lz/lz_chorelistmisc_map.bin.lz" 0 1 0
".\tools\lc\recomp.exe" "./gfx/en/lz_bensongrave_gfx.bin" "./gfx/en/lz/lz_bensongrave_gfx.bin.lz" 0 1 0
".\tools\lc\recomp.exe" "./gfx/en/lz_monsterposter_gfx.bin" "./gfx/en/lz/lz_monsterposter_gfx.bin.lz" 0 1 0
".\tools\lc\recomp.exe" "./gfx/en/lz_chorelist_gfx.bin" "./gfx/en/lz/lz_chorelist_gfx.bin.lz" 0 1 0
".\tools\lc\recomp.exe" "./gfx/en/lz_officesign_map.bin" "./gfx/en/lz/lz_officesign_map.bin.lz" 0 1 0
".\tools\lc\recomp.exe" "./gfx/en/lz_officesign_gfx.bin" "./gfx/en/lz/lz_officesign_gfx.bin.lz" 0 1 0
".\tools\lc\recomp.exe" "./gfx/en/lz_nintendo_gfx.bin" "./gfx/en/lz/lz_nintendo_gfx.bin.lz" 0 1 0
2 changes: 2 additions & 0 deletions AnotherTreasureIsland/_2build_en.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"./tools/bass/bass" build_ast_en.asm
pause
1 change: 1 addition & 0 deletions AnotherTreasureIsland/_play.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
".\tools\bsnes-plus\bsnes-performance" Marvelous_EN_LB.sfc
35 changes: 35 additions & 0 deletions AnotherTreasureIsland/asm/code.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
//Code ASM Hacks

//Relocate Script to 0x300000 / $F0:0000
seekFile($7C82)
asm_relocate_script:
lda.w #text_script //Address
sta $40DBE0
sta $08
lda.w #(text_script >> 16) //Bank

//ASM Hack to disable paging on the Team naming screen
seekFile($2C0FB1)
asm_disable_paging:
lda.b #0

//Fix for Save & Quit Journal Menu ($2C1EE2)
seekFile($2C1ED2)
asm_menu_fix:
lda $9AAD,x
sta $7F009A,x
lda $9ACB,x
sta $7F00DA,x
inx
inx
cpx.b #$1E
bne asm_menu_fix //$EC
fill 36,$EA //Fill NOPs
lda $75E8
asl
clc
adc.w #$30A0
sta $7F009A
213 changes: 213 additions & 0 deletions AnotherTreasureIsland/asm/insert_en.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,213 @@
//Insert Data

//Clean Japanese Script
seekFile($21B400)
fill 0x20B9D,$FF

//Graphics

//-Font
seekFile($2AC000)
insert "../gfx/en/font_main_en.bin"
seekFile($270000)
insert "../gfx/en/font_kanji_en.bin"

//-Title Screen

//--Title
seekFile($121964)
gfx_title:
insert "../gfx/en/lz/lz_title_gfx.bin.lz"
bound_check($122F5E)
seekFile($123726)
map_title:
insert "../gfx/en/lz/lz_title_map.bin.lz"
bound_check($123951)

//--Nintendo Copyright
seekFile($1D948F)
gfx_title_nintendo:
insert "../gfx/en/lz/lz_nintendo_gfx.bin.lz"
bound_check($1DA5ED)

//--Subtitle
seekFile($1DA5ED)
gfx_title_sub:
insert "../gfx/en/lz/lz_subtitle_gfx.bin.lz"
bound_check($1DA9B5)

//--Intro
seekFile($123951)
gfx_intro1:
insert "../gfx/en/lz/lz_intro_gfx1.bin.lz"
bound_check($1246DE)
seekFile($1246DE)
gfx_intro2:
insert "../gfx/en/lz/lz_intro_gfx2.bin.lz"
bound_check($12550E)
seekFile($21B9AC) //$12550E
map_intro:
insert "../gfx/en/lz/lz_intro_map.bin.lz"
//bound_check($1257F6)
seekFile($125ADD)
pal_intro:
insert "../gfx/en/intro_pal.bin"
bound_check($125BB6)


//-Menu

//--Search Menu Icons
seekFile($2B6000)
insert "../gfx/en/menu_gfx.bin"

//--Misc HUD
seekFile($268000)
insert "../gfx/en/hud_gfx.bin"

//--Team Name Screen
seekFile($0E286B)
map_teamname:
insert "../gfx/en/lz/lz_teamname_map.bin.lz"
bound_check($0E2E23)

//--Journal Menu Tilemap Stuff (???)
seekFile($2C09B0)
map_journal1:
insert "../gfx/en/journal1_map.bin"
seekFile($2C1189)
map_journal2:
insert "../gfx/en/journal2_map.bin"
seekFile($2C18C8)
map_journal3:
insert "../gfx/en/journal3_map.bin"
seekFile($2C1AAF)
map_journal4:
insert "../gfx/en/journal4_map.bin"


//-Chapter 1
seekFile($12DEB0)
map_ch1_misc: //Chore list, Camp Tips, Benson`s Grave...
insert "../gfx/en/lz/lz_chorelistmisc_map.bin.lz"
bound_check($12E9BA)

seekFile($132FC4)
gfx_ch1_gina_ransom:
insert "../gfx/en/lz/lz_gina_ransom_gfx.bin.lz"
bound_check($134CA1)
seekFile($13C578)
gfx_ch1_patches_stuck:
insert "../gfx/en/lz/lz_patchy_note_gfx.bin.lz"
bound_check($13DF2F)
seekFile($1447AE)
gfx_ch1_camptips:
insert "../gfx/en/lz/lz_camp_tips_gfx.bin.lz"
bound_check($145F3B)
seekFile($14A478)
gfx_ch1_controls:
insert "../gfx/en/lz/lz_controls_gfx.bin.lz"
bound_check($14B628)
seekFile($21BBD0) //$14B628
gfx_ch1_ship_notes:
insert "../gfx/en/lz/lz_ship_notes_gfx.bin.lz"
//bound_check($14CEBF)

seekFile($2BB96A)
map_ch1_ship_note_13:
dw $01AC, $01AD, $01AC, $01AE, $01AF, $01B4, $01B1
dw $01B2, $01B3, $01B2, $01B1, $01B5, $01B6, $01B7
seekFile($2BBAC6)
map_ch1_ship_note_1:
dw $01CF, $01D0, $01D1, $01B1, $01B7, $01B1
dw $01D2, $01D3, $01CE, $01DB, $01DC, $01B1
dw $01D4, $01D5, $01D9, $01DA, $01B7, $01B1
dw $01D6, $01D7, $01D8, $01CE, $01DB, $01DC
dw $01B7, $01B1, $01B7, $01B1, $01B7, $01B1
seekFile($2D0E70)
map_ch1_ship_note_2:
dw $1E00, $1E46, $1E10, $1E56, $1E4C, $1E6C
dw $1E5C, $1E7C, $1E6F, $1E6E, $1E7F, $1E7E
dw $1E6F, $1E00, $1E7F, $1E10, $1E4E, $1E4F
dw $1E5E, $1E5F, $1E6A, $1E6B, $1E7A, $1E7B
dw $1E4B, $1E4C, $1E5B, $1E5C, $1E4D, $1E00
dw $1E5D, $1E10, $1E6F, $1E6D, $1E7F, $1E7D
dw $1E4F, $1E6B, $1E5F, $1E7B, $1E6E, $1E6A
dw $1E7E, $1E7A, $1E46, $1E6E, $1E56, $1E7E
dw $1E47, $1E6F, $1E57, $1E7F, $1E6E, $1E47
dw $1E7E, $1E57, $1E6F, $1E00, $1E7F, $1E10


//-Chapter 2
seekFile($142CE4)
gfx_ch2_bensongrave:
insert "../gfx/en/lz/lz_bensongrave_gfx.bin.lz"
bound_check($1447AE)
seekFile($145F3B)
gfx_ch2_monster:
insert "../gfx/en/lz/lz_monsterposter_gfx.bin.lz"
bound_check($1476D5)
seekFile($1490F9)
gfx_ch2_chorelist:
insert "../gfx/en/lz/lz_chorelist_gfx.bin.lz"
bound_check($14A478)

seekFile($2BB55F)
map_ch2_chorelist_1:
insert "../gfx/en/chorelist_map1_edit.bin"
seekFile($2D2060)
map_ch2_chorelist_2:
insert "../gfx/en/chorelist_map2_edit.bin"


//-Chapter 3
seekFile($12BDA4)
map_ch3_sign:
insert "../gfx/en/lz/lz_officesign_map.bin.lz"
bound_check($12C7C8)
seekFile($136BFE)
gfx_ch3_sign:
insert "../gfx/en/lz/lz_officesign_gfx.bin.lz"
bound_check($1384BF)


//-Chapter 4


//-Chapter 5
seekFile($1FE99C)
gfx_ch5_colonel_note1:
insert "../gfx/en/lz/lz_colonel_note_gfx1.bin.lz"
bound_check($200000)
seekFile($151D31)
gfx_ch5_colonel_note2:
insert "../gfx/en/lz/lz_colonel_note_gfx2.bin.lz"
bound_check($153005)


//-Misc

//--Credits
seekFile($125BB6)
gfx_credits:
insert "../gfx/en/lz/lz_credits_gfx.bin.lz"
bound_check($12735C)
seekFile($21B400) //$12735C
map_credits:
insert "../gfx/en/lz/lz_credits_map.bin.lz"
//bound_check($1276AE)

//--Large Messages
//Monkey Screech, "HEY!", "That's Enough / Cut it OUT!"
seekFile($2CE000)
insert "../gfx/en/font_large.bin"


//Script
seekFile($300000)
text_script:
insert "../text/en/script.bin"
insert "../text/en/menu.bin"
insert "../text/en/items.bin"
42 changes: 42 additions & 0 deletions AnotherTreasureIsland/asm/macros.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
//Macros
arch snes.cpu

//Seek SNES LoROM Address
macro seekAddr(n) {
origin (({n} & $7F0000) >> 1) | ({n} & $7FFF)
base {n}
}

//Seek File Offset
macro seekFile(n) {
origin {n}
base (({n} & $3FFFFF) | 0xC00000)
}

//Get Bank, High, Low Address
macro DB_BANK(n) {
db (({n} >> 16) & $FF)
}

macro DB_HI(n) {
db (({n} >> 8) & $FF)
}

macro DB_LO(n) {
db ({n} & $FF)
}

macro ptr_replace(id, n) {
seekFile($0011E3 + {id})
DB_BANK({n})
seekFile($0012DC + {id})
DB_HI({n})
seekFile($0013D5 + {id})
DB_LO({n})
}

macro bound_check(n) {
if origin() > {n} {
error "ERROR, OVERWRITING ANOTHER FILE"
}
}
39 changes: 39 additions & 0 deletions AnotherTreasureIsland/asm/pointers.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
//Pointer changes

ptr_replace(0x18, map_teamname)

ptr_replace(0x35, gfx_title)

ptr_replace(0x38, map_title)
ptr_replace(0x39, gfx_intro1)
ptr_replace(0x3A, gfx_intro2)
ptr_replace(0x3C, map_intro)
ptr_replace(0x3D, pal_intro)

ptr_replace(0x3E, gfx_credits)
ptr_replace(0x3F, map_credits)

ptr_replace(0x4A, map_ch3_sign)

ptr_replace(0x4D, map_ch1_misc)

ptr_replace(0x53, gfx_ch1_gina_ransom)

ptr_replace(0x56, gfx_ch3_sign)

ptr_replace(0x5A, gfx_ch1_patches_stuck)

ptr_replace(0x5E, gfx_ch2_bensongrave)
ptr_replace(0x5F, gfx_ch1_camptips)
ptr_replace(0x60, gfx_ch2_monster)

ptr_replace(0x62, gfx_ch2_chorelist)
ptr_replace(0x63, gfx_ch1_controls)
ptr_replace(0x64, gfx_ch1_ship_notes)

ptr_replace(0x69, gfx_ch5_colonel_note2)

ptr_replace(0xDA, gfx_title_nintendo)
ptr_replace(0xDB, gfx_title_sub)

ptr_replace(0xF8, gfx_ch5_colonel_note1)
14 changes: 14 additions & 0 deletions AnotherTreasureIsland/build_ast_en.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//Build Marvelous ~Another Treasure Island~ English
arch snes.cpu

include "./asm/macros.asm"

output "Marvelous_EN_LB.sfc", create
seekFile(0)
fill $400000,$FF //Extend to 4MB
seekFile(0)
insert "./roms/Marvelous_JP.sfc"

include "./asm/insert_en.asm"
include "./asm/code.asm"
include "./asm/pointers.asm"
2 changes: 2 additions & 0 deletions AnotherTreasureIsland/credits.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
tashi & DackR - Original English Translation Base
LuigiBlood - New Project Leader, Hacking
Loading

0 comments on commit 01f9a62

Please sign in to comment.