Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mid2agb improvements #380

Closed
wants to merge 13 commits into from
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
*.fwjpnfont
*.bat
sound/**/*.bin
sound/songs/midi/*.o
sound/songs/midi/*.s
src/*.s
tools/agbcc
ld_script_ruby.txt
Expand Down
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ C_SRCS := $(wildcard src/*/*.c) $(wildcard src/*.c)
ASM_SRCS := $(wildcard asm/*.s)
DATA_ASM_SRCS := $(wildcard data/*.s)

MID_FILES := $(wildcard sound/songs/midi/*.mid)
MID_OBJS := $(MID_FILES:%.mid=%.o)
SONG_SRCS := $(wildcard sound/songs/*.s)
SONG_OBJS := $(SONG_SRCS:%.s=%.o)
SONG_OBJS := $(SONG_SRCS:%.s=%.o) $(MID_OBJS)

all: ruby
@:
Expand All @@ -68,6 +70,7 @@ tidy:
rm -f $(VERSIONS:%=poke%{.gba,.elf,.map})
rm -r build/*

include songs.mk
include castform.mk
include tilesets.mk
include fonts.mk
Expand Down Expand Up @@ -106,7 +109,6 @@ sound/songs/%.s: sound/songs/%.mid
$(SONG_OBJS): %.o: %.s
$(AS) $(ASFLAGS) -I sound -o $@ $<


define VERSION_RULES

$1_C_OBJS := $$(C_SRCS:%.c=build/$1/%.o)
Expand Down
1 change: 1 addition & 0 deletions build_tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ make -C tools/bin2c
make -C tools/rsfont
make -C tools/aif2pcm
make -C tools/ramscrgen
make -C tools/mid2agb
146 changes: 73 additions & 73 deletions ld_script.txt
Original file line number Diff line number Diff line change
Expand Up @@ -474,38 +474,38 @@ SECTIONS {
{
sound/songs/se_stop.o(.rodata);
sound/songs/se_kaifuku.o(.rodata);
sound/songs/se_pc_logon.o(.rodata);
sound/songs/midi/se_pc_logon.o(.rodata);
sound/songs/se_pc_off.o(.rodata);
sound/songs/se_pc_on.o(.rodata);
sound/songs/se_select.o(.rodata);
sound/songs/midi/se_select.o(.rodata);
sound/songs/se_win_open.o(.rodata);
sound/songs/se_wall_hit.o(.rodata);
sound/songs/se_door.o(.rodata);
sound/songs/se_kaidan.o(.rodata);
sound/songs/se_dansa.o(.rodata);
sound/songs/se_jitensya.o(.rodata);
sound/songs/midi/se_jitensya.o(.rodata);
sound/songs/se_kouka_l.o(.rodata);
sound/songs/se_kouka_m.o(.rodata);
sound/songs/se_kouka_h.o(.rodata);
sound/songs/se_bowa2.o(.rodata);
sound/songs/se_poke_dead.o(.rodata);
sound/songs/se_nigeru.o(.rodata);
sound/songs/se_jido_doa.o(.rodata);
sound/songs/midi/se_nigeru.o(.rodata);
sound/songs/midi/se_jido_doa.o(.rodata);
sound/songs/se_naminori.o(.rodata);
sound/songs/se_ban.o(.rodata);
sound/songs/se_pin.o(.rodata);
sound/songs/se_boo.o(.rodata);
sound/songs/se_bowa.o(.rodata);
sound/songs/midi/se_bowa.o(.rodata);
sound/songs/se_jyuni.o(.rodata);
sound/songs/se_a.o(.rodata);
sound/songs/se_i.o(.rodata);
sound/songs/se_u.o(.rodata);
sound/songs/se_e.o(.rodata);
sound/songs/se_o.o(.rodata);
sound/songs/se_n.o(.rodata);
sound/songs/se_seikai.o(.rodata);
sound/songs/midi/se_seikai.o(.rodata);
sound/songs/se_hazure.o(.rodata);
sound/songs/se_exp.o(.rodata);
sound/songs/midi/se_exp.o(.rodata);
sound/songs/se_jite_pyoko.o(.rodata);
sound/songs/se_mu_pachi.o(.rodata);
sound/songs/se_tk_kasya.o(.rodata);
Expand All @@ -515,25 +515,25 @@ SECTIONS {
sound/songs/se_ru_gashin.o(.rodata);
sound/songs/se_ru_gasyan.o(.rodata);
sound/songs/se_ru_bari.o(.rodata);
sound/songs/se_ru_hyuu.o(.rodata);
sound/songs/midi/se_ru_hyuu.o(.rodata);
sound/songs/se_ki_gasyan.o(.rodata);
sound/songs/se_tk_warpin.o(.rodata);
sound/songs/se_tk_warpout.o(.rodata);
sound/songs/se_tu_saa.o(.rodata);
sound/songs/se_hi_turun.o(.rodata);
sound/songs/se_track_move.o(.rodata);
sound/songs/midi/se_track_move.o(.rodata);
sound/songs/se_track_stop.o(.rodata);
sound/songs/se_track_haik.o(.rodata);
sound/songs/se_track_door.o(.rodata);
sound/songs/se_moter.o(.rodata);
sound/songs/se_card.o(.rodata);
sound/songs/se_save.o(.rodata);
sound/songs/se_kon.o(.rodata);
sound/songs/se_kon2.o(.rodata);
sound/songs/se_kon3.o(.rodata);
sound/songs/se_kon4.o(.rodata);
sound/songs/midi/se_kon.o(.rodata);
sound/songs/midi/se_kon2.o(.rodata);
sound/songs/midi/se_kon3.o(.rodata);
sound/songs/midi/se_kon4.o(.rodata);
sound/songs/se_suikomu.o(.rodata);
sound/songs/se_nageru.o(.rodata);
sound/songs/midi/se_nageru.o(.rodata);
sound/songs/se_toy_c.o(.rodata);
sound/songs/se_toy_d.o(.rodata);
sound/songs/se_toy_e.o(.rodata);
Expand All @@ -554,24 +554,24 @@ SECTIONS {
sound/songs/se_doku.o(.rodata);
sound/songs/se_esuka.o(.rodata);
sound/songs/se_t_ame.o(.rodata);
sound/songs/se_t_ame_e.o(.rodata);
sound/songs/midi/se_t_ame_e.o(.rodata);
sound/songs/se_t_ooame.o(.rodata);
sound/songs/se_t_ooame_e.o(.rodata);
sound/songs/midi/se_t_ooame_e.o(.rodata);
sound/songs/se_t_koame.o(.rodata);
sound/songs/se_t_koame_e.o(.rodata);
sound/songs/midi/se_t_koame_e.o(.rodata);
sound/songs/se_t_kami.o(.rodata);
sound/songs/se_t_kami2.o(.rodata);
sound/songs/se_elebeta.o(.rodata);
sound/songs/se_hinsi.o(.rodata);
sound/songs/se_expmax.o(.rodata);
sound/songs/se_tamakoro.o(.rodata);
sound/songs/se_tamakoro_e.o(.rodata);
sound/songs/midi/se_tamakoro.o(.rodata);
sound/songs/midi/se_tamakoro_e.o(.rodata);
sound/songs/se_basabasa.o(.rodata);
sound/songs/se_regi.o(.rodata);
sound/songs/se_c_gaji.o(.rodata);
sound/songs/se_c_maku_u.o(.rodata);
sound/songs/se_c_maku_d.o(.rodata);
sound/songs/se_c_pasi.o(.rodata);
sound/songs/midi/se_c_maku_u.o(.rodata);
sound/songs/midi/se_c_maku_d.o(.rodata);
sound/songs/midi/se_c_pasi.o(.rodata);
sound/songs/se_c_syu.o(.rodata);
sound/songs/se_c_pikon.o(.rodata);
sound/songs/se_reapoke.o(.rodata);
Expand All @@ -595,51 +595,51 @@ SECTIONS {
sound/songs/se_w231.o(.rodata);
sound/songs/se_w171.o(.rodata);
sound/songs/se_w233.o(.rodata);
sound/songs/se_w233b.o(.rodata);
sound/songs/midi/se_w233b.o(.rodata);
sound/songs/se_w145.o(.rodata);
sound/songs/se_w145b.o(.rodata);
sound/songs/se_w145c.o(.rodata);
sound/songs/se_w240.o(.rodata);
sound/songs/se_w015.o(.rodata);
sound/songs/se_w081.o(.rodata);
sound/songs/midi/se_w015.o(.rodata);
sound/songs/midi/se_w081.o(.rodata);
sound/songs/se_w081b.o(.rodata);
sound/songs/se_w088.o(.rodata);
sound/songs/se_w016.o(.rodata);
sound/songs/midi/se_w016.o(.rodata);
sound/songs/se_w016b.o(.rodata);
sound/songs/se_w003.o(.rodata);
sound/songs/se_w104.o(.rodata);
sound/songs/se_w013.o(.rodata);
sound/songs/se_w196.o(.rodata);
sound/songs/se_w086.o(.rodata);
sound/songs/se_w004.o(.rodata);
sound/songs/se_w025.o(.rodata);
sound/songs/midi/se_w025.o(.rodata);
sound/songs/se_w025b.o(.rodata);
sound/songs/se_w152.o(.rodata);
sound/songs/se_w026.o(.rodata);
sound/songs/se_w172.o(.rodata);
sound/songs/se_w172b.o(.rodata);
sound/songs/midi/se_w172b.o(.rodata);
sound/songs/se_w053.o(.rodata);
sound/songs/se_w007.o(.rodata);
sound/songs/se_w092.o(.rodata);
sound/songs/se_w221.o(.rodata);
sound/songs/se_w221b.o(.rodata);
sound/songs/se_w052.o(.rodata);
sound/songs/se_w036.o(.rodata);
sound/songs/se_w059.o(.rodata);
sound/songs/midi/se_w059.o(.rodata);
sound/songs/se_w059b.o(.rodata);
sound/songs/se_w010.o(.rodata);
sound/songs/se_w011.o(.rodata);
sound/songs/se_w017.o(.rodata);
sound/songs/se_w019.o(.rodata);
sound/songs/midi/se_w019.o(.rodata);
sound/songs/se_w028.o(.rodata);
sound/songs/se_w013b.o(.rodata);
sound/songs/se_w044.o(.rodata);
sound/songs/se_w029.o(.rodata);
sound/songs/se_w057.o(.rodata);
sound/songs/midi/se_w029.o(.rodata);
sound/songs/midi/se_w057.o(.rodata);
sound/songs/se_w056.o(.rodata);
sound/songs/se_w250.o(.rodata);
sound/songs/midi/se_w250.o(.rodata);
sound/songs/se_w030.o(.rodata);
sound/songs/se_w039.o(.rodata);
sound/songs/midi/se_w039.o(.rodata);
sound/songs/se_w054.o(.rodata);
sound/songs/se_w077.o(.rodata);
sound/songs/se_w020.o(.rodata);
Expand All @@ -648,7 +648,7 @@ SECTIONS {
sound/songs/se_w195.o(.rodata);
sound/songs/se_w006.o(.rodata);
sound/songs/se_w091.o(.rodata);
sound/songs/se_w146.o(.rodata);
sound/songs/midi/se_w146.o(.rodata);
sound/songs/se_w120.o(.rodata);
sound/songs/se_w153.o(.rodata);
sound/songs/se_w071b.o(.rodata);
Expand All @@ -662,7 +662,7 @@ SECTIONS {
sound/songs/se_w155.o(.rodata);
sound/songs/se_w122.o(.rodata);
sound/songs/se_w060.o(.rodata);
sound/songs/se_w185.o(.rodata);
sound/songs/midi/se_w185.o(.rodata);
sound/songs/se_w014.o(.rodata);
sound/songs/se_w043.o(.rodata);
sound/songs/se_w207.o(.rodata);
Expand All @@ -673,16 +673,16 @@ SECTIONS {
sound/songs/se_w280.o(.rodata);
sound/songs/se_w202.o(.rodata);
sound/songs/se_w060b.o(.rodata);
sound/songs/se_w076.o(.rodata);
sound/songs/midi/se_w076.o(.rodata);
sound/songs/se_w080.o(.rodata);
sound/songs/se_w100.o(.rodata);
sound/songs/se_w107.o(.rodata);
sound/songs/midi/se_w100.o(.rodata);
sound/songs/midi/se_w107.o(.rodata);
sound/songs/se_w166.o(.rodata);
sound/songs/se_w129.o(.rodata);
sound/songs/se_w115.o(.rodata);
sound/songs/se_w112.o(.rodata);
sound/songs/se_w197.o(.rodata);
sound/songs/se_w199.o(.rodata);
sound/songs/midi/se_w199.o(.rodata);
sound/songs/se_w236.o(.rodata);
sound/songs/se_w204.o(.rodata);
sound/songs/se_w268.o(.rodata);
Expand Down Expand Up @@ -713,7 +713,7 @@ SECTIONS {
sound/songs/se_w327.o(.rodata);
sound/songs/se_w287.o(.rodata);
sound/songs/se_w257.o(.rodata);
sound/songs/se_w253.o(.rodata);
sound/songs/midi/se_w253.o(.rodata);
sound/songs/se_w258.o(.rodata);
sound/songs/se_w322.o(.rodata);
sound/songs/se_w298.o(.rodata);
Expand Down Expand Up @@ -782,8 +782,8 @@ SECTIONS {
sound/songs/bgm_suikun.o(.rodata);
sound/songs/bgm_dooro1.o(.rodata);
sound/songs/bgm_dooro_x1.o(.rodata);
sound/songs/bgm_dooro_x3.o(.rodata);
sound/songs/bgm_machi_s2.o(.rodata);
sound/songs/midi/bgm_dooro_x3.o(.rodata);
sound/songs/midi/bgm_machi_s2.o(.rodata);
sound/songs/bgm_machi_s4.o(.rodata);
sound/songs/bgm_gim.o(.rodata);
sound/songs/bgm_naminori.o(.rodata);
Expand All @@ -795,13 +795,13 @@ SECTIONS {
sound/songs/bgm_fanfa5.o(.rodata);
sound/songs/bgm_me_waza.o(.rodata);
sound/songs/bgm_bijyutu.o(.rodata);
sound/songs/bgm_dooro_x4.o(.rodata);
sound/songs/bgm_fune_kan.o(.rodata);
sound/songs/bgm_me_shinka.o(.rodata);
sound/songs/midi/bgm_dooro_x4.o(.rodata);
sound/songs/midi/bgm_fune_kan.o(.rodata);
sound/songs/midi/bgm_me_shinka.o(.rodata);
sound/songs/bgm_shinka.o(.rodata);
sound/songs/bgm_me_wasure.o(.rodata);
sound/songs/bgm_syoujoeye.o(.rodata);
sound/songs/bgm_boyeye.o(.rodata);
sound/songs/midi/bgm_boyeye.o(.rodata);
sound/songs/bgm_dan02.o(.rodata);
sound/songs/bgm_machi_s3.o(.rodata);
sound/songs/bgm_odamaki.o(.rodata);
Expand All @@ -814,54 +814,54 @@ SECTIONS {
sound/songs/bgm_me_b_small.o(.rodata);
sound/songs/bgm_me_zannen.o(.rodata);
sound/songs/bgm_bd_time.o(.rodata);
sound/songs/bgm_test1.o(.rodata);
sound/songs/bgm_test2.o(.rodata);
sound/songs/midi/bgm_test1.o(.rodata);
sound/songs/midi/bgm_test2.o(.rodata);
sound/songs/bgm_test3.o(.rodata);
sound/songs/bgm_test4.o(.rodata);
sound/songs/midi/bgm_test4.o(.rodata);
sound/songs/bgm_test.o(.rodata);
sound/songs/bgm_gomachi0.o(.rodata);
sound/songs/bgm_gotown.o(.rodata);
sound/songs/bgm_pokecen.o(.rodata);
sound/songs/midi/bgm_pokecen.o(.rodata);
sound/songs/bgm_nextroad.o(.rodata);
sound/songs/bgm_granroad.o(.rodata);
sound/songs/bgm_cycling.o(.rodata);
sound/songs/bgm_friendly.o(.rodata);
sound/songs/midi/bgm_cycling.o(.rodata);
sound/songs/midi/bgm_friendly.o(.rodata);
sound/songs/bgm_mishiro.o(.rodata);
sound/songs/bgm_tozan.o(.rodata);
sound/songs/bgm_girleye.o(.rodata);
sound/songs/bgm_minamo.o(.rodata);
sound/songs/bgm_ashroad.o(.rodata);
sound/songs/midi/bgm_minamo.o(.rodata);
sound/songs/midi/bgm_ashroad.o(.rodata);
sound/songs/bgm_event0.o(.rodata);
sound/songs/bgm_deepdeep.o(.rodata);
sound/songs/bgm_kachi1.o(.rodata);
sound/songs/bgm_title3.o(.rodata);
sound/songs/bgm_demo1.o(.rodata);
sound/songs/bgm_girl_sup.o(.rodata);
sound/songs/midi/bgm_girl_sup.o(.rodata);
sound/songs/bgm_hageshii.o(.rodata);
sound/songs/bgm_kakkoii.o(.rodata);
sound/songs/bgm_kazanbai.o(.rodata);
sound/songs/bgm_aqa_0.o(.rodata);
sound/songs/bgm_tsuretek.o(.rodata);
sound/songs/bgm_boy_sup.o(.rodata);
sound/songs/midi/bgm_tsuretek.o(.rodata);
sound/songs/midi/bgm_boy_sup.o(.rodata);
sound/songs/bgm_rainbow.o(.rodata);
sound/songs/bgm_ayasii.o(.rodata);
sound/songs/bgm_kachi4.o(.rodata);
sound/songs/bgm_ropeway.o(.rodata);
sound/songs/bgm_casino.o(.rodata);
sound/songs/bgm_hightown.o(.rodata);
sound/songs/bgm_safari.o(.rodata);
sound/songs/bgm_c_road.o(.rodata);
sound/songs/bgm_ajito.o(.rodata);
sound/songs/midi/bgm_c_road.o(.rodata);
sound/songs/midi/bgm_ajito.o(.rodata);
sound/songs/bgm_m_boat.o(.rodata);
sound/songs/bgm_m_dungon.o(.rodata);
sound/songs/midi/bgm_m_dungon.o(.rodata);
sound/songs/bgm_finecity.o(.rodata);
sound/songs/bgm_machupi.o(.rodata);
sound/songs/midi/bgm_machupi.o(.rodata);
sound/songs/bgm_p_school.o(.rodata);
sound/songs/bgm_dendou.o(.rodata);
sound/songs/bgm_tonekusa.o(.rodata);
sound/songs/bgm_maborosi.o(.rodata);
sound/songs/bgm_con_fan.o(.rodata);
sound/songs/bgm_contest0.o(.rodata);
sound/songs/midi/bgm_contest0.o(.rodata);
sound/songs/bgm_mgm0.o(.rodata);
sound/songs/bgm_t_battle.o(.rodata);
sound/songs/bgm_ooame.o(.rodata);
Expand All @@ -870,23 +870,23 @@ SECTIONS {
sound/songs/bgm_con_k.o(.rodata);
sound/songs/bgm_eikou_r.o(.rodata);
sound/songs/bgm_karakuri.o(.rodata);
sound/songs/bgm_hutago.o(.rodata);
sound/songs/midi/bgm_hutago.o(.rodata);
sound/songs/bgm_sitennou.o(.rodata);
sound/songs/bgm_yama_eye.o(.rodata);
sound/songs/bgm_conlobby.o(.rodata);
sound/songs/midi/bgm_yama_eye.o(.rodata);
sound/songs/midi/bgm_conlobby.o(.rodata);
sound/songs/bgm_inter_v.o(.rodata);
sound/songs/bgm_daigo.o(.rodata);
sound/songs/bgm_thankfor.o(.rodata);
sound/songs/bgm_end.o(.rodata);
sound/songs/bgm_battle27.o(.rodata);
sound/songs/midi/bgm_battle27.o(.rodata);
sound/songs/bgm_battle31.o(.rodata);
sound/songs/bgm_battle20.o(.rodata);
sound/songs/bgm_battle32.o(.rodata);
sound/songs/midi/bgm_battle32.o(.rodata);
sound/songs/bgm_battle33.o(.rodata);
sound/songs/bgm_battle36.o(.rodata);
sound/songs/bgm_battle34.o(.rodata);
sound/songs/bgm_battle35.o(.rodata);
sound/songs/bgm_battle38.o(.rodata);
sound/songs/midi/bgm_battle36.o(.rodata);
sound/songs/midi/bgm_battle34.o(.rodata);
sound/songs/midi/bgm_battle35.o(.rodata);
sound/songs/midi/bgm_battle38.o(.rodata);
sound/songs/bgm_battle30.o(.rodata);
sound/songs/bgm_radio_tower_occupied.o(.rodata);
} =0
Expand Down
Loading