From f5eb15128808578043aa66fcbdda6e2709b21897 Mon Sep 17 00:00:00 2001 From: david Date: Fri, 5 Jun 2009 18:18:09 +0200 Subject: [PATCH] o get relocate working --- snes/fatfstest/Makefile | 39 ++++++++++++++++++------------------ snes/fatfstest/main.c | 2 +- snes/fatfstest/ressource.asm | 2 +- 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/snes/fatfstest/Makefile b/snes/fatfstest/Makefile index 8c9c055..eac5362 100644 --- a/snes/fatfstest/Makefile +++ b/snes/fatfstest/Makefile @@ -8,7 +8,8 @@ ifeq ($(PLATFORM),Linux) SDK=/home/david/.wine/drive_c/65xx_FreeSDK WINE=wine EMU=../../tools/bsnes/bsnes - EMU_DEBUG=/home/david/Devel/arch/snes/tools/zsnes_linux_debug151/src/zsnesd -d + DISASM=/home/david/Devel/arch/snes/devkit/bin/disasm + UCON=ucon64 else # Mac Wine SDK=/Users/david/.wine/drive_c/65xx_FreeSDK @@ -32,7 +33,7 @@ OBJS=hook.obj StartupSnes.obj main.obj pad.obj PPU.obj debug.obj ressource.obj d APP=fatfs.smc GFX=debugfont -all: $(APP) +all: $(APP) repair run: $(EMU) $(APP) @@ -46,33 +47,33 @@ upload: sync diskutil unmount /Volumes/SNES -crc: - python ../../scripts/crc_xmodem.py $(APP) - +disasm: $(APP) + rm -rf fatfs.asm + $(DISASM) fatfs.smc > fatfs.asm StartupSnes.obj: StartupSnes.asm - $(AS) -V $? + $(AS) -V $? ressource.obj: ressource.asm - $(AS) -V $? + $(AS) -V $? hook.obj: hook.asm - $(AS) -V $? - - + $(AS) -V $? %.obj: %.c - $(CC) -wl -wp -sop -ML -I $(INC) $? + $(CC) -wl -wp -sop -ML -I $(INC) $? $(APP): $(OBJS) - $(LD) -HB -M21 -V -T -Pff \ - -C3e8000,000000 -U000000,000000 \ - -Avectors=FFE4,7FE4 \ - -Aregistration_data=FFB0,7FB0 \ - -Aressource=3f8000,8000 \ - -Ahook=0108000,0000 \ - -N $(OBJS) $(LIBS) -O $@ - ucon64 -snes -chk $(APP) 2>&1 >/dev/null + $(LD) -B -HB -M21 -V -T -Pff \ + -C3e8000,1f0000 -U000000,000000 \ + -Avectors=FFE4,7FE4 \ + -Aregistration_data=FFB0,7FB0 \ + -Aressource=18000,8000 \ + -Ahook=008000,0000 \ + -N $(OBJS) $(LIBS) -O $@ +repair: $(APP) + $(UCON) -snes -chk $(APP) 2>&1 >/dev/null + rm -rf fatfs.bak diff --git a/snes/fatfstest/main.c b/snes/fatfstest/main.c index 0a4e11b..e6cf141 100644 --- a/snes/fatfstest/main.c +++ b/snes/fatfstest/main.c @@ -147,7 +147,7 @@ void main(void) { debug_enable(); printfs(0,"FATFS OPTIXX.ORG "); - //wait(); + wait(); printfc("SNES::main: Try to init disk\n"); put_rc(f_mount(0, &fatfs[0])); diff --git a/snes/fatfstest/ressource.asm b/snes/fatfstest/ressource.asm index 4b12280..6d89e4d 100644 --- a/snes/fatfstest/ressource.asm +++ b/snes/fatfstest/ressource.asm @@ -1,4 +1,4 @@ -ressource .section +resource .section ; XDEF __title_map ;__title_map: