Skip to content

Instantly share code, notes, and snippets.

@WillSams
Created May 30, 2017 00:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WillSams/5362eda3c93798e591381692658b24be to your computer and use it in GitHub Desktop.
Save WillSams/5362eda3c93798e591381692658b24be to your computer and use it in GitHub Desktop.
Makefile used for SMB 1 Disassembly
AS = ca65
LD = ld65
OBJDUMP = od65
DEBUGGER = mednafen
OBJS=smb.o
ROM = smb
BIN = $(ROM).nes
all: $(BIN)
clean:
rm -f $(BIN) && rm -f $(shell find . -name '*.o')
$(BIN): $(OBJS)
$(LD) $< -o $@ -C ./nesfile.ini
%.o: %.s
$(AS) $< -o $@
dump:
$(OBJDUMP) --dump-all $(OBJS) > $(ROM).dump
run:
echo 'Mednafen - Hold Alt-D to enter debugger.'
echo 'Press any key to continue to execute the rom'
sed -n q </dev/tty;
$(DEBUGGER) -nes.enable 1 $(BIN)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment