diff --git a/snes/crc/Makefile b/snes/crc/Makefile index 1d21492..673d73d 100644 --- a/snes/crc/Makefile +++ b/snes/crc/Makefile @@ -23,9 +23,12 @@ LD=$(WINE) $(SDK)/bin/WDCLN.exe PADBIN=$(WINE) tools/padbin.exe PCX2SNES=$(WINE) tools/Pcx2Snes.exe + + # Project + INC=$(SDK)/include -LIBS=$(SDK)/lib/cs +LIBS=$(SDK)/lib/cc #OBJS=StartupSnes.obj main.obj pad.obj event.obj myEvents.obj PPU.obj debug.obj ressource.obj OBJS=StartupSnes.obj main.obj pad.obj PPU.obj debug.obj ressource.obj crc.obj APP=crc.smc @@ -54,11 +57,14 @@ kungfu: debugfont: $(PCX2SNES) ressource/debugFont -n -c16 -s8 -o1 -%.obj: %.asm +StartupSnes.obj: StartupSnes.asm + $(AS) -V $? + +ressource.obj: ressource.asm $(AS) -V $? %.obj: %.c - $(CC) -wl -wp -sop -MS -I $(INC) $? + $(CC) -wl -wp -sop -MC -I $(INC) $? $(APP): $(OBJS) $(LD) -HB -M21 -V -T -Pff \ diff --git a/snes/crc/StartupSnes.asm b/snes/crc/StartupSnes.asm index abb4b04..e856c70 100644 --- a/snes/crc/StartupSnes.asm +++ b/snes/crc/StartupSnes.asm @@ -12,7 +12,7 @@ CODE XDEF START START: - XREF __main + XREF _~main sei ; Disabled interrupts clc ; clear carry to switch to native mode @@ -28,13 +28,13 @@ START: ; Init data used for heap ; see heap definition below - XREF ___heap_top - XREF ___mem_start - stz ___heap_top - stz ___mem_start + XREF _~_heap_top + XREF _~_mem_start + stz _~_heap_top + stz _~_mem_start - XREF __preInit - jsr >__preInit + XREF _~preInit + jsr >_~preInit sep #$30 ; X,Y,A are 8 bit numbers LONGA OFF @@ -127,19 +127,19 @@ START: longa on longi on - jsr >__main + jsr >_~main brk XDEF IRQ IRQ: - XREF __IRQHandler + XREF _~IRQHandler LONGA ON LONGI ON rep #$30 pha phx phy - jsr __IRQHandler + jsr _~IRQHandler ply plx pla @@ -147,7 +147,7 @@ IRQ: XDEF NMI NMI: - XREF __NMIHandler + XREF _~NMIHandler LONGA ON LONGI ON rep #$30 @@ -164,7 +164,7 @@ NMI: LONGA ON LONGI ON rep #$30 - jsr __NMIHandler + jsr _~NMIHandler plb pld ply @@ -183,12 +183,12 @@ ENDS DATA - XDEF __heap_start - XDEF __heap_end + XDEF _~heap_start + XDEF _~heap_end -__heap_start: +_~heap_start: WORD $1000 -__heap_end: +_~heap_end: WORD $1200 ;****************************************************************************** diff --git a/snes/crc/ressource.asm b/snes/crc/ressource.asm index b23b956..6802a07 100644 --- a/snes/crc/ressource.asm +++ b/snes/crc/ressource.asm @@ -8,16 +8,16 @@ ressource .section ;__title_pic: ; INSERT ressource/kungfu.pic ; - XDEF __title_pal -__title_pal: - INSERT ressource/kungfu.clr +; XDEF __title_pal +;__title_pal: +;make INSERT ressource/kungfu.clr - XDEF __debugFont_pic -__debugFont_pic + XDEF _~debugFont_pic +_~debugFont_pic INSERT ressource/debugFont.pic - XDEF __debugFont_pal -__debugFont_pal + XDEF _~debugFont_pal +_~debugFont_pal INSERT ressource/debugFont.clr .ends diff --git a/snes/crc/ressource.h b/snes/crc/ressource.h index 941e3fc..8298c7e 100644 --- a/snes/crc/ressource.h +++ b/snes/crc/ressource.h @@ -1,6 +1,3 @@ -//extern word title_map[]; -//extern word title_pic[]; -extern word title_pal[]; extern word debugFont_pic[]; extern word debugFont_pal[];