TARGET = hexed.bin\r
OBJS = sega_gcc.o hexed.o transfer.o font.o\r
\r
-all : $(TARGET)\r
+all: $(TARGET)\r
\r
-$(TARGET) : a.out\r
+$(TARGET): a.out\r
$(OBJCOPY) -I elf32-m68k -O binary $^ $@\r
\r
-a.out : $(OBJS)\r
+a.out: $(OBJS)\r
$(LD) -Tmd.ld -Map $(TARGET).map $^\r
\r
clean:\r
- $(RM) $(TARGET) $(OBJS) $(TARGET).map a.out\r
+ $(RM) $(TARGET) $(OBJS) $(TARGET).map a.out pc_transfer\r
+\r
\r
pc_transfer: pc_transfer.c\r
gcc -Wall -O2 -ggdb -o $@ $^\r
\r
-\r
-.S.o:\r
+%.o: %.S\r
$(CC) -c -o $@ $^ $(CPPFLAGS)\r
\r
+%.bin: %.o\r
+ $(OBJCOPY) -I elf32-m68k -O binary $^ $@\r
+\r
+\r
# ----------- release -----------\r
ifneq ($(findstring rel,$(MAKECMDGOALS)),)\r
ifeq ($(VER),)\r
dc.l 0xa13000, 0xa130ff
safe_addrs_end:
+sizeof_bin:
+ dc.l _edata
+
txt_edit:
.ascii "- edit -\0"
txt_a_confirm:
bne 0f
move.l #0,a0
- move.w #0x2000/8-1,d0
+ move.l (sizeof_bin,pc),d0
+ lsr.l #3,d0
1:
move.l (a0)+,(a1)+
move.l (a0)+,(a1)+
/* copy, assume 8K size */
move.l #0xFF0100,a1
- move.w #0x2000/8-1,d0
+ move.l (sizeof_bin,pc),d0
+ lsr.l #3,d0
1:
move.l (a0)+,(a1)+
move.l (a0)+,(a1)+
dc.l INT,INT,INT,INT,INT,INT,INT,INT\r
dc.l INT,INT,INT,INT,INT,INT,INT\r
.ascii "SEGA GENESIS "\r
- .ascii "hexed (c) notaz, 2009 "\r
- .ascii "HEXED (C) NOTAZ, 2009 "\r
+ .ascii "hexed (c) notaz, 2009-2011 "\r
+ .ascii "HEXED (C) NOTAZ, 2009-2011 "\r
.ascii "GM 00000000-00"\r
.byte 0x00,0x00\r
.ascii "JD "\r