obj = $(csrc:.c=.o) $(ssrc:.S=.o)
dep = $(csrc:.c=.d) $(ssrc:.S=.d)
-elf = test1.elf
-bin = test1.psx
-iso = test1.iso
+name = test1
+elf = $(name).elf
+bin = $(name).psx
+iso = $(name).bin
+cue = $(name).cue
TCPREFIX = mipsel-linux-gnu-
.PHONY: clean
clean:
- rm -f $(obj) $(bin) $(elf) link.map
+ rm -f $(obj) $(bin) $(elf) $(iso) $(cue) link.map
.PHONY: cleandep
cleandep:
.PHONY: runiso
runiso: $(iso)
- mednafen test1.cue
+ mednafen $(cue)
_gp = ALIGN(16) + 0x7ff0;
.sdata : {
* (.sdata*);
- KEEP(*(.keep));
+ } >ram
+
+ .padding : {
+ BYTE(0);
+ . = ALIGN(0x800);
} >ram
_imgend = .;
- .bss ALIGN(4) : {
+ .bss ALIGN(4) (NOLOAD) : {
_bss_start = .;
/* .sbss first to be reachable by _gp */
* (.sbss*);
li t0, 0x02302010 # cmd 2: fill area (BBGGRR)
sw t0, REG_GP0(a0)
sw zero, REG_GP0(a0) # ... top left 0,0 (YYYYXXXX)
- li t0, 0x00ef013f # ... size 319x239 (HHHHWWWW)
+ li t0, 0x0108013f # ... size 319x239 (HHHHWWWW)
sw t0, REG_GP0(a0)
# draw gouraud triangle