Rinnegatamante/lpp-3ds

[O3DS] Strange error with romfs on r5

Closed this issue · 6 comments

When I run the attached CIA, loadfile fails with the error Function not implemented when called with a romfs:/ name.

Am I doing something wrong?

  • An example of the failing call is loadfile('romfs:/p3600/init.lua')(). (The target file does exist.)
  • System.doesFileExist returns false as well. (Once again, the file is there...)

case.zip (contains CIA and the contents of the romfs)

What have you used to build the CIA file? Just to be sure it's not a CIA issue. Btw loadfile has not been patched like dofile so this is probably why it fails with romfs:/

I am using the "Safe" ELF file from lpp-3ds r5, and this RSF file.

The Makefile looks like this: (simplified)

# Main target
p3600.cia:

BANNERTOOL ?= bannertool
MAKEROM ?= makerom
tDSTOOL ?= 3dstool


files := cia_romfs/index.lua cia_romfs/p3600/init.lua # etc...

icon.smdh: rsrc/icon.png
	$(BANNERTOOL) makesmdh -o icon.smdh \
	  -i rsrc/icon.png \
	  -s 'p3600' \
	  -l 'p3600 -- A game.' \
	  -p 'bcnjr5 & GitHub contributors' \
	  -r regionfree

banner.bnr: rsrc/banner.png rsrc/banner.ogg
	$(BANNERTOOL) makebanner -o banner.bnr \
	  -i rsrc/banner.png \
	  -a rsrc/banner.ogg

cia_romfs.bin: $(files)
	$(tDSTOOL) -cvtf romfs cia_romfs.bin --romfs-dir cia_romfs

p3600.cia: cia_romfs.bin icon.smdh banner.bnr rsrc/lpp-3ds.elf rsrc/cia.rsf
	$(MAKEROM) \
	  -f cia \
	  -o p3600.cia \
	  -ver 0 \
	  -elf rsrc/lpp-3ds.elf \
	  -rsf rsrc/cia.rsf \
	  -icon icon.smdh \
	  -banner banner.bnr \
	  -exefslogo \
	  -target t \
	  -romfs cia_romfs.bin

After changing romfs:/index.lua a little bit, it seems that dofile doesn't work either. I'll dump the romfs and see if the files are still there... 😕

The romfs is all correct, and the files are in place.

Btw, i suggest you to use the nightly instead of R5: http://rinnegatamante.it/lpp-nightly.php

Let me know if this happens with nightly too.

It seems to work just fine, thanks!