
/******************
	spec
 ******************/

#include "ko_memory.h"

#define CIC6103_SPEC_SW		0

#ifdef DISK_FLAG
#define CART DISK
#endif
/*******************************************************
	CODE SEGMENT
*******************************************************/
beginseg
	name "codeSEG"
#ifdef DISK_FLAG
	lba 560   /* ゾーン２の先頭(ベンダで書き換えられる領域) */
#endif
	flags BOOT OBJECT
	entry BootProcess
	stack bootThreadStack + BOOT_STACKSIZE
#if DISK_FLAG
	address 0x80700000
#else
	address ADRS_BOOT
#endif
#ifdef DISK_FLAG
	media CART
#endif
	include "code.o"
#if (1-CIC6103_SPEC_SW)
	include "$(ROOT)/usr/lib/PR/rspboot.o"
#endif
	include "$(ROOT)/usr/lib/PR/gspF3DEX2.fifo.o"
	include "$(ROOT)/usr/lib/PR/gspF3DLX2.Rej.fifo.o"
	include "./gspF3DFLX2.Rej.fifo.o"
	include "$(ROOT)/usr/lib/PR/gspL3DEX2.fifo.o"
#ifdef DISK_FLAG
	include "sotleo.o" 
	include "n64dd_segment.o"
	include "mo_diskproc.o"
#endif

#ifdef DISK_FLAG
	include "audio_dd/aspMain.o" 
	include "audio_dd/audio_hb.o" 
	include "audio_dd/audio_hm.o" 
	include "audio_dd/audio_hs.o" 
	include "audio_dd/audio_hw.o" 
#else
	include "audio/aspMain.o" 
	include "audio/audio_hb.o" 
	include "audio/audio_hm.o" 
	include "audio/audio_hs.o" 
	include "audio/audio_hw.o" 
#endif
endseg

beginseg /* ロムの情報 */
	name "romInfoSEG"
	flags OBJECT
#ifdef DISK_FLAG
	media CART
#endif
	after "codeSEG"
	include "sot_rominfo.o"
endseg



beginseg
	name "editPrgSEG"
	flags OBJECT
#ifdef DISK_FLAG
#ifdef DISK_FLAG
	lba after codeSEG
#endif
	address 0x80025c00
#else
	address 0x80400000
	/*after "64ddSEG"*/
#endif
#ifdef DISK_FLAG
	media CART
#endif

#ifdef RMASTER_FLAG
	include "mo_romkbuf.o"
#endif
#ifndef DISK_FLAG
#ifndef MASTER_FLAG
	include "mo_diskproc.o"	
#endif
#endif
#ifndef RMASTER_FLAG
	include sot_system.o
	include "sot_buffer8m.o" /* ddlink */
	include "sot_kanji.o"
	include "sot_code.o"
	include "sot_menu.o"
	include "sot_nameinput.o"
	include "sot_filelist.o"
	include "sot_syspad.o"
	include "sot_mesdata.o"
	include "mo_holder.o" /* ddlink */
	include "mo_printerr.o"
	include "mo_message.o"
	include "mo_drawkanji.o"
	include "mo_commonprg.o"
	include "mo_commonstatic.o"
	include "mo_setupkanji.o"
	include "mo_init.o"
#endif
endseg	

#ifndef DISK_FLAG /* ディスク版には存在しない */
beginseg
	name "64ddSEG"
	flags OBJECT
	after editPrgSEG
	/*address 0x80400000*/
#ifdef DISK_FLAG
	media CART
#endif
	include sotleo.o 
	include "n64dd_segment.o"
endseg	
#endif

#ifndef RMASTER_FLAG
beginseg
	name "diskKanjiSEG"
	flags OBJECT
#ifndef DISK_FLAG /* ROM のとき */
	after 64ddSEG
#else				 /* DISK のとき */
	after editPrgSEG
#endif
#ifdef DISK_FLAG
	media CART
#endif
	include "mo_kbuffer.o"
	include "mo_romkbuf.o"
endseg
#endif

#ifndef MASTER_FLAG
beginseg /* デバッグ表示のプログラム */
	name "debugSEG"
	flags OBJECT
#ifndef DISK_FLAG
	address ADRS_DEBUG
#else /* ディスクの時 */
#ifdef DISK_FLAG
	lba after editPrgSEG
#endif
	after diskKanjiSEG
#endif
#ifdef DISK_FLAG
	media CART
#endif
	include "ot_menu.o"
	include "ot_letter.o"
	include "ot_ssletter.o"
	include "kn_cameraedit.o"
	include "kn_backedit.o"
endseg
#endif

#ifdef DISK_FLAG /* ディスク用：コード２、３シリーズにかかる */
beginseg /* ディスクメイク時 */
	name "code2aSEG"
	flags OBJECT
#ifndef MASTER_FLAG
	after debugSEG
#ifdef DISK_FLAG
	lba after debugSEG
#endif
#else
	after diskKanjiSEG
#ifdef DISK_FLAG
	lba after editPrgSEG
#endif
#endif
#ifdef DISK_FLAG
	media DISK
#endif
	include "code2a.o"
endseg

beginseg /* ディスクメイク時 */
	name "code2bSEG"
	flags OBJECT
	after code2aSEG
#ifdef DISK_FLAG
	lba after code2aSEG
#endif
#ifdef DISK_FLAG
	media DISK
#endif
	include "code2b.o"
endseg

beginseg /* ディスクメイク時 */
	name "code2cSEG"
	flags OBJECT
	after code2bSEG
#ifdef DISK_FLAG
	lba after code2bSEG
#endif
#ifdef DISK_FLAG
	media DISK
#endif
	include "code2c.o"
endseg

beginseg /* ディスクメイク時 */
	name "code2gSEG"
	flags OBJECT
	after code2cSEG
#ifdef DISK_FLAG
	lba after code2cSEG
#endif
#ifdef DISK_FLAG
	media DISK
#endif
	include "code2g.o"
endseg

beginseg /* ディスクメイク時 */
	name "code3eSEG"
	flags OBJECT
	after code2gSEG
#ifdef DISK_FLAG
	lba after code2gSEG
#endif
#ifdef DISK_FLAG
	media DISK
#endif
	include "code3e.o"
endseg

beginseg /* ディスクメイク時 */
	name "code3rSEG"
	flags OBJECT
	after code3eSEG
#ifdef DISK_FLAG
	lba after code3eSEG
#endif
#ifdef DISK_FLAG
	media DISK
#endif
	include "code3r.o"
endseg

beginseg /* ディスクメイク時 */
	name "code3wSEG"
	flags OBJECT
	after code3rSEG
#ifdef DISK_FLAG
	lba after code3rSEG
#endif
#ifdef DISK_FLAG
	media DISK
#endif
	include "code3w.o"
endseg


#endif

beginseg
	name "code1SEG"
	flags OBJECT
#ifdef DISK_FLAG
	after code3wSEG
#else
	after "codeSEG"
#endif
#ifdef DISK_FLAG
#ifdef DISK_FLAG
	lba after code3wSEG
#endif
#endif
#ifdef DISK_FLAG
	media CART	
#endif
	include "code1.o"
	include "sot_buffer.o"
endseg

#ifdef DISK_FLAG
beginseg /* ディスクメイク時の使い捨てセグメント */
	name "code3iSEG"
	flags OBJECT
	after code1SEG
#ifdef DISK_FLAG
	lba after code1SEG
#endif
#ifdef DISK_FLAG
	media DISK
#endif
	include "code3i.o"
endseg
#endif

#ifndef DISK_FLAG /* コード２、３シリーズにかかる */
beginseg /* ロムメイク時 */
	name "code2aSEG"
	flags OBJECT
	after "code1SEG"
#ifdef DISK_FLAG
	media CART
#endif
	include "code2a.o"
endseg

beginseg /* ロムメイク時 */
	name "code2bSEG"
	flags OBJECT
	after "code1SEG"
#ifdef DISK_FLAG
	media CART
#endif
	include "code2b.o"
endseg

beginseg /* ロムメイク時 */
	name "code2cSEG"
	flags OBJECT
	after "code1SEG"
#ifdef DISK_FLAG
	media CART
#endif
	include "code2c.o"
endseg

beginseg /* ロムメイク時 */
	name "code2gSEG"
	flags OBJECT
	after "code1SEG"
#ifdef DISK_FLAG
	media CART
#endif
	include "code2g.o"
endseg

beginseg /* ロムメイク時 */
	name "code3eSEG"
	flags OBJECT
	after "code2aSEG"
#ifdef DISK_FLAG
	media CART
#endif
	include "code3e.o"
endseg

beginseg /* ロムメイク時 */
	name "code3rSEG"
	flags OBJECT
	after "code2aSEG"
#ifdef DISK_FLAG
	media CART
#endif
	include "code3r.o"
endseg

beginseg /* ロムメイク時 */
	name "code3wSEG"
	flags OBJECT
	after "code1SEG"
#ifdef DISK_FLAG
	media CART
#endif
	include "code3w.o"
endseg

beginseg /* ロムメイク時 */
	name "code3iSEG"
	flags OBJECT
	after "code1SEG"
#ifdef DISK_FLAG
	media CART
#endif
	include "code3i.o"
endseg

#endif

#ifndef RMASTER_FLAG
beginseg
	name "sotPrgSEG"
	flags OBJECT
#ifdef DISK_FLAG
	after "code1SEG"
#ifdef DISK_FLAG
	lba after code3iSEG
#endif
#else
	after "diskKanjiSEG"
#endif
#ifdef DISK_FLAG
	media CART
#endif
	include "sot_main.o"
	include "sot_disk.o"
	include "sot_pad.o"
	include "sot_string.o"
	include "sot_draw.o"
	include "sot_efect.o"
	include "sot_error.o"
	include "sot_camera.o"
	include "sot_matrix.o"
	include "sot_math.o"
	include "sot_message.o"
	include "sot_entry.o"
	include "sot_pack.o"
	include "sot_editbuf.o"
	include "sot_course8m.o"
	include "sot_sub8m.o"
	include "sot_help.o"
endseg	

beginseg
	name "mo_diskSEG"
	flags OBJECT
#ifdef DISK_FLAG
	after code1SEG
#ifdef DISK_FLAG
	lba after sotPrgSEG
#endif
#else
	after diskKanjiSEG
#endif
#ifdef DISK_FLAG
	media CART
#endif
	include "mo_disk.o"
endseg	
#endif
/*******************************************************
	実体のないデータ
*******************************************************/
beginseg
	name "fbuffer0SEG"
	flags OBJECT
	address ADRS_F0_BUFFER
#ifdef DISK_FLAG
	media CART
#endif
	include "ot_fbuffer0.o"
endseg

beginseg
	name "fbuffer1SEG"
	flags OBJECT
	address ADRS_F1_BUFFER
#ifdef DISK_FLAG
	media CART
#endif
	include "ot_fbuffer1.o"
endseg

beginseg
	name "fbuffer2SEG"
	flags OBJECT
	address ADRS_F2_BUFFER
#ifdef DISK_FLAG
	media CART
#endif
	include "ot_fbuffer2.o"
endseg

beginseg
	name "zbufferSEG"
	flags OBJECT
	address ADRS_Z_BUFFER
#ifdef DISK_FLAG
	media CART
#endif
	include "ot_zbuffer.o"
endseg

beginseg
	name "rspSEG"
	flags OBJECT
	after "fbuffer1SEG"
#ifdef DISK_FLAG
	media CART
#endif
	include "ot_rspmemory.o"
endseg

beginseg
	name "cpuSEG"
	flags OBJECT
	after "rspSEG"
#ifdef DISK_FLAG
	media CART
#endif
	include "ot_cpumemory.o"	
	include "sot_cpumemory.o"
endseg

beginseg
	name "stackSEG"
	flags OBJECT
	after "cpuSEG"
#ifdef DISK_FLAG
	media CART
#endif
	include "ot_stack.o"
endseg

beginseg
	name "dynamicSEG"
	flags OBJECT
	number DYNAMIC_SEGMENT
#ifdef DISK_FLAG
	media CART
#endif
	include "ot_dsegment.o"
endseg

beginseg
	name "autoSEG"
	flags OBJECT
	number AUTO_SEGMENT
#ifdef DISK_FLAG
	media CART
#endif
	include "ot_asegment.o"
endseg

beginseg
	name "sotDynamicSEG"
	flags OBJECT
	number SOT_DYNAMIC_SEGMENT
#ifdef DISK_FLAG
	media CART
#endif
	include "sot_dsegment.o"
endseg
/*************************************************
ディスク版で変更される可能性のあるデータ
*************************************************/
beginseg
	name "editorSEG"
	flags OBJECT
	number STATIC3_SEGMENT
#ifdef DISK_FLAG
	/* lba NONE */
#ifdef DISK_FLAG
	lba after mo_diskSEG
#endif
#endif
#ifdef DISK_FLAG
	media CART
#endif

	include "sot_sseditor.o"
endseg

beginseg
	name "crsEditSEG"
	flags OBJECT
	number STATIC2_SEGMENT 
#ifdef DISK_FLAG
#ifdef DISK_FLAG
	lba NONE
#endif
	/* lba after editorSEG */
#endif
#ifdef DISK_FLAG
	media CART
#endif

	include "sot_sscrsedit.o"
endseg

beginseg
	name "machineEditSEG"
	flags OBJECT
	number STATIC2_SEGMENT 
#ifdef DISK_FLAG
#ifdef DISK_FLAG
	lba NONE
#endif
	/* lba after crsEditSEG */
#endif
#ifdef DISK_FLAG
	media CART
#endif

	include "mo_ssmenutex.o"
	include "mo_sssetting.o"
endseg

/*************************************************
ROMから読むデータ
*************************************************/
beginseg
	name "static0SEG"
	flags OBJECT
	number STATIC0_SEGMENT
#ifdef DISK_FLAG
#ifdef DISK_FLAG
	lba NONE
#endif
#endif
#ifdef DISK_FLAG
	media CART
#endif
	include "static0.o"
endseg

beginseg
	name "static1SEG"
	flags OBJECT
	number STATIC1_SEGMENT
#ifdef DISK_FLAG
#ifdef DISK_FLAG
	lba NONE
#endif
#endif
#ifdef DISK_FLAG
	media CART
#endif
	include "ko_ssgsub.o"
	include "sot_static.o"
	include "sot_sscrsobj2.o"
endseg

beginseg
	name "staticRaceSEG"
	flags OBJECT
	after "static1SEG"
#ifdef DISK_FLAG
#ifdef DISK_FLAG
	lba NONE
#endif
#endif
#ifdef DISK_FLAG
	media CART
#endif
	include "ot_ssmachine.o" /* コースエディタで不要 */
	include "kn_ssworld.o" /* エディタで不要 */
	include "dai_ssletter.o" /* エディタで不要 */	
	include "sot_ssletter.o" /* エディタで不要 */
endseg

beginseg
	name "staticRaceOnlySEG"
	flags OBJECT
	number STATIC2_SEGMENT
#ifdef DISK_FLAG
#ifdef DISK_FLAG
	lba NONE
#endif
#endif
#ifdef DISK_FLAG
	media CART
#endif
#if 0 // ( LANGUAGE_SW == LG_ZH )
	include "ot_sseffect_zh.o"/* Chinese version */
	include "ot_sseffect2_zh.o"/* Chinese version */
#else
	include "ot_sseffect.o"/* staticRaceOnly*SEGに移動可能 */
	include "ot_sseffect2.o"/* staticRaceOnly*SEGに移動可能 */
#endif
	include "dai_ssletter3.o" /* エディタで不要 staticRaceOnly*SEGに移動可能 */
	include "sot_ssletter2.o" /* エディタで不要 staticRaceOnly*SEGに移動可能 */
endseg

beginseg
	name "staticRaceOnly2SEG"
	flags OBJECT
	number STATIC3_SEGMENT
#ifdef DISK_FLAG
#ifdef DISK_FLAG
	lba NONE
#endif
#endif
#ifdef DISK_FLAG
	media CART
#endif
	include "ot_ssmachine2.o" /* エディタで不要 staticRaceOnly*SEGに移動可能 */
endseg

beginseg
	name "static4SEG"
	flags OBJECT
	number STATIC4_SEGMENT
#ifdef DISK_FLAG
#ifdef DISK_FLAG
	lba NONE
#endif
#endif
#ifdef DISK_FLAG
	media CART
#endif
	include "static4.o"
endseg

beginseg
	name "staticCourse1SEG"
	flags OBJECT
	number STATIC5_SEGMENT
#ifdef DISK_FLAG
#ifdef DISK_FLAG
	lba NONE
#endif
#endif
#ifdef DISK_FLAG
	media CART
#endif
	include "staticc1.o"
endseg

beginseg
	name "staticCourse2SEG"
	flags OBJECT
	number STATIC5_SEGMENT
#ifdef DISK_FLAG
#ifdef DISK_FLAG
	lba NONE
#endif
#endif
#ifdef DISK_FLAG
	media CART
#endif
	include "staticc2.o"
endseg

beginseg
	name "staticCourse3SEG"
	flags OBJECT
	number STATIC5_SEGMENT
#ifdef DISK_FLAG
#ifdef DISK_FLAG
	lba NONE
#endif
#endif
#ifdef DISK_FLAG
	media CART
#endif
	include "staticc3.o"
endseg

beginseg
	name "staticCourse4SEG"
	flags OBJECT
	number STATIC5_SEGMENT
#ifdef DISK_FLAG
#ifdef DISK_FLAG
	lba NONE
#endif
#endif
#ifdef DISK_FLAG
	media CART
#endif
	include "staticc4.o"
endseg

beginseg
	name "staticCourse5SEG"
	flags OBJECT
	number STATIC5_SEGMENT
#ifdef DISK_FLAG
#ifdef DISK_FLAG
	lba NONE
#endif
#endif
#ifdef DISK_FLAG
	media CART
#endif
	include "staticc5.o"
endseg

beginseg
	name "staticCourse6SEG"
	flags OBJECT
	number STATIC5_SEGMENT
#ifdef DISK_FLAG
#ifdef DISK_FLAG
	lba NONE
#endif
#endif
#ifdef DISK_FLAG
	media CART
#endif
	include "staticc6.o"
endseg

beginseg
	name "staticCourse7SEG"
	flags OBJECT
	number STATIC5_SEGMENT
#ifdef DISK_FLAG
#ifdef DISK_FLAG
	lba NONE
#endif
#endif
#ifdef DISK_FLAG
	media CART
#endif
	include "staticc7.o"
endseg

beginseg
	name "staticCourse8SEG"
	flags OBJECT
	number STATIC5_SEGMENT
#ifdef DISK_FLAG
#ifdef DISK_FLAG
	lba NONE
#endif
#endif
#ifdef DISK_FLAG
	media CART
#endif
	include "staticc8.o"
endseg

beginseg
	name "staticCourse9SEG"
	flags OBJECT
	number STATIC5_SEGMENT
#ifdef DISK_FLAG
#ifdef DISK_FLAG
	lba NONE
#endif
#endif
#ifdef DISK_FLAG
	media CART
#endif
	include "staticc9.o"
endseg

beginseg
	name "staticCourse10SEG"
	flags OBJECT
	number STATIC5_SEGMENT
#ifdef DISK_FLAG
#ifdef DISK_FLAG
	lba NONE
#endif
#endif
#ifdef DISK_FLAG
	media CART
#endif
	include "staticc10.o"
endseg

beginseg
	name "staticCourse11SEG"
	flags OBJECT
	number STATIC5_SEGMENT
#ifdef DISK_FLAG
#ifdef DISK_FLAG
	lba NONE
#endif
#endif
#ifdef DISK_FLAG
	media CART
#endif
	include "staticc11.o"
endseg

beginseg
	name "staticEndingSEG"
	flags OBJECT
	number ENDING_SEGMENT
#ifdef DISK_FLAG
#ifdef DISK_FLAG
	lba NONE
#endif
#endif
#ifdef DISK_FLAG
	media CART
#endif
	include "statice.o"
endseg



beginseg
	name "builTexSEG"
	flags OBJECT
	number 0
#ifdef DISK_FLAG
#ifdef DISK_FLAG
	lba NONE
#endif
#endif
#ifdef DISK_FLAG
	media CART
#endif
	include "sot_sstexbuf.o"
endseg

beginseg
	name "nusmarkSEG"
	flags OBJECT
	after "codeSEG"
#ifdef DISK_FLAG
#ifdef DISK_FLAG
	lba NONE
#endif
#endif
#ifdef DISK_FLAG
	media CART
#endif
#if LOCALE==CHINA
	include "ot_dtnusmark_zh.o"	
#else
	include "ot_dtnusmark.o"
#endif
endseg

beginseg
	name "romGhostSEG"
	flags OBJECT
	number 0
#ifdef DISK_FLAG
	media CART
#endif
#ifdef DISK_FLAG
#ifdef DISK_FLAG
	lba NONE
#endif
#endif
	include "kn_romghost0.o"
	include "kn_romghost1.o"
	include "kn_romghost2.o"
	include "kn_romghost3.o"
	include "kn_romghost4.o"
	include "kn_romghost5.o"
	include "kn_romghost6.o"
	include "kn_romghost7.o"
	include "kn_romghost8.o"
	include "kn_romghost9.o"
	include "kn_romghost10.o"
	include "kn_romghost11.o"
	include "kn_romghost12.o"
	include "kn_romghost13.o"
	include "kn_romghost14.o"
	include "kn_romghost15.o"
	include "kn_romghost16.o"
	include "kn_romghost17.o"
	include "kn_romghost18.o"
	include "kn_romghost19.o"
	include "kn_romghost20.o"
	include "kn_romghost21.o"
	include "kn_romghost22.o"
	include "kn_romghost23.o"
endseg

beginseg
	name "crsDatSEG"
	flags OBJECT
	address 0x80000400
#ifdef DISK_FLAG
#ifdef DISK_FLAG
	lba NONE
#endif
#endif
#ifdef DISK_FLAG
	media CART
#endif
	include "sot_crsdat.o"
endseg

beginseg
	name "texdataSEG"
	flags OBJECT
	number TEST_KAWANO_SEGMENT
#ifdef DISK_FLAG
#ifdef DISK_FLAG
	lba NONE
#endif
#endif
#ifdef DISK_FLAG
	media CART
#endif

	include "ko_dttitle.o"
	include "ko_dtmsel1.o"
	include "ko_dtmsel2.o"
	include "ko_dtabc.o"
	include "ko_dtgsel.o"
	include "ko_dtcsel.o"
	include "ko_dtwin.o"
	include "kn_ssworld_bg1.o"
	include "kn_ssworld_bg2.o"
	include "kn_ssworld_bg3.o"
	include "kn_ssworld_bg4.o"
	include "kn_ssworld_bg5.o"
	include "kn_ssworld_bg6.o"
	include "kn_ssworld_bg7.o"
	include "kn_ssworld_bg9.o"
	include "kn_ssworld_gd1.o"
	include "kn_ssworld_gd2.o"
	include "kn_ssworld_gd3.o"
	include "kn_ssworld_gd4.o"
	include "kn_ssworld_gd5.o"
	include "kn_ssworld_gd6.o"
	include "kn_ssworld_gd7.o"
	include "kn_ssworld_gd8.o"
	include "kn_ssworld_gd9.o"
	include "kn_ssworld_gd10.o"
	include "kn_ssworld_cl1.o"
	include "kn_ssworld_st1.o"
	include "kn_ssrecord.o"
	include "kn_ssoption.o"
	include "dai_ssletter2.o"
	include "dai_autoline.o"
	include "dai_firepos.o"

endseg

#ifndef ROM_FLAG
beginseg
	name "cameraSEG"
	flags OBJECT
	address 0x80500000
#ifdef DISK_FLAG
	media CART
#endif
	include "kn_cameramem.o"
endseg
#endif
/************************************************
拡張コースのデータ
************************************************/
beginseg
	name "exCrsDat0SEG"
	flags OBJECT
	address 0x80000400
#ifdef DISK_FLAG
	lba 800
#endif
#ifdef DISK_FLAG
	media DISK
#endif
	include "sot_excrsdat0.o"
endseg

beginseg
	name "exCrsDat1SEG"
	flags OBJECT
	address 0x80000400
#ifdef DISK_FLAG
	lba after exCrsDat0SEG
#endif
#ifdef DISK_FLAG
	media DISK
#endif
	include "sot_excrsdat1.o"
endseg

beginseg
	name "exCrsDat2SEG"
	flags OBJECT
	address 0x80000400
#ifdef DISK_FLAG
	lba after exCrsDat1SEG
#endif
#ifdef DISK_FLAG
	media DISK
#endif
	include "sot_excrsdat2.o"
endseg

beginseg
	name "exCrsDat3SEG"
	flags OBJECT
	address 0x80000400
#ifdef DISK_FLAG
	lba after exCrsDat2SEG
#endif
#ifdef DISK_FLAG
	media DISK
#endif
	include "sot_excrsdat3.o"
endseg

beginseg
	name "exCrsDat4SEG"
	flags OBJECT
	address 0x80000400
#ifdef DISK_FLAG
	lba after exCrsDat3SEG
#endif
#ifdef DISK_FLAG
	media DISK
#endif
	include "sot_excrsdat4.o"
endseg

beginseg
	name "exCrsDat5SEG"
	flags OBJECT
	address 0x80000400
#ifdef DISK_FLAG
	lba after exCrsDat4SEG
#endif
#ifdef DISK_FLAG
	media DISK
#endif
	include "sot_excrsdat5.o"
endseg



beginseg
	name "diskInfoSEG"
#ifdef DISK_FLAG
	lba 833
#endif
	flags OBJECT
	address 0x80000400
	include "sot_diskinfo.o"
endseg

#ifndef DISK_FLAG
beginseg
	name "resetSEG"
	flags OBJECT
#ifdef DISK_FLAG
	media CART
#endif
	after codeSEG
	include "sot_reset.o"
endseg
#endif

/*******************************************************
	SOUND SEGMENT
*******************************************************/
beginseg
	name "Audiobank"
	flags RAW
#ifdef DISK_FLAG
#ifdef DISK_FLAG
	lba 1382
#endif
	/*lba after debugSEG*/
#endif
#ifdef DISK_FLAG
	media CART
#endif
#ifdef DISK_FLAG
	include "audio_dd/game_sound.banks.disk"
#else
	include "audio/game_sound.banks.cart"
#endif
endseg

beginseg
	name "Audioseq"
	flags RAW
#ifdef DISK_FLAG
#ifdef DISK_FLAG
	lba 1384
#endif
	/*lba after Audiotable*/
#endif
#ifdef DISK_FLAG
	media CART
#endif
#ifdef DISK_FLAG
	include "audio_dd/game_sound.music.disk"
#else
	include "audio/game_sound.music.cart"
#endif
endseg

beginseg
	name "Audiotable"
	flags RAW
#ifdef DISK_FLAG
#ifdef DISK_FLAG
	lba 1385
#endif
	/*lba after Audiobank*/
#endif
#ifdef DISK_FLAG
	media CART
#endif
#ifdef DISK_FLAG
	include "audio_dd/game_sound.table.disk"
#else
	include "audio/game_sound.table.cart"
#endif
endseg

beginseg /* オーディオのワークバッファ */
	name "Buffers"
	flags OBJECT
	address ADRS_AUDIO_WORK
#ifdef DISK_FLAG
	media CART
#endif
#ifdef DISK_FLAG
	include "audio_dd/audio_disk_work.o"
#else
	include "audio/audiowork.o"
#endif
endseg

beginseg /* オーディオのヒープバッファ */
	name "Buffers2"
	flags OBJECT
	address ADRS_AUDIO_HEAP
#ifdef DISK_FLAG
	media CART
#endif
#ifdef DISK_FLAG
	include "audio_dd/audioheap.o"
#else
	include "audio/audioheap.o"
#endif
endseg


/*******************************************************
	WAVE
*******************************************************/
beginwave
	name "pr"
	include "codeSEG"
	include "code1SEG"
	include "code2aSEG"
	include "code2bSEG"
	include "code2cSEG"
	include "code2gSEG"
	include "code3eSEG"
	include "code3iSEG"
	include "code3rSEG"
	include "code3wSEG"

	include "editPrgSEG"
#ifndef DISK_FLAG
	include "64ddSEG"
#endif
#ifndef RMASTER_FLAG
	include "diskKanjiSEG"
	include "sotPrgSEG"
	include "mo_diskSEG"
#endif
	include "dynamicSEG"
	include "autoSEG"
	include "static0SEG"
	include "static1SEG"
	include "staticRaceSEG"
	include "staticRaceOnlySEG"
	include "staticRaceOnly2SEG"
	include "static4SEG"
	include "staticCourse1SEG"
	include "staticCourse2SEG"
	include "staticCourse3SEG"
	include "staticCourse4SEG"
	include "staticCourse5SEG"
	include "staticCourse6SEG"
	include "staticCourse7SEG"
	include "staticCourse8SEG"
	include "staticCourse9SEG"
	include "staticCourse10SEG"
	include "staticCourse11SEG"
	include "staticEndingSEG"
	include "crsEditSEG"
	include "machineEditSEG"
	include "editorSEG"
	include "fbuffer0SEG"
	include "fbuffer1SEG"
	include "fbuffer2SEG"
	include "zbufferSEG"
	include "stackSEG"
	include "rspSEG"
	include "cpuSEG"
	include	"nusmarkSEG"
	include	"texdataSEG"
	include	"romGhostSEG"
	include	"sotDynamicSEG"
	include "builTexSEG"
	include "crsDatSEG"
	include "exCrsDat0SEG"
	include "exCrsDat1SEG"
	include "exCrsDat2SEG"
	include "exCrsDat3SEG"
	include "exCrsDat4SEG"
	include "exCrsDat5SEG"		
#ifndef MASTER_FLAG
	include "debugSEG"
#endif
	include "diskInfoSEG"
	include "romInfoSEG"
#ifndef DISK_FLAG
	include "resetSEG"
#endif
#ifndef ROM_FLAG
	include "cameraSEG"
#endif

/*#ifndef DISK_FLAG*/
	include "Audiotable"
/*	include "GameSoundTableDisk"*/
	include "Audioseq"
	include "Audiobank"
/*#endif*/
	include "Buffers"
	include "Buffers2"
endwave
