GoSXB: more romfs stuff

This commit is contained in:
mgcaret 2020-05-03 14:51:42 -07:00
parent 0c0674cec3
commit 0a8b1c5a40
5 changed files with 40 additions and 3 deletions

2
.gitignore vendored
View File

@ -14,6 +14,6 @@ romfs
of816-neon.bin
platforms/GoSXB/rom
platforms/GoSXB/romfs
platforms/GoSXB/romfs_files
platforms/GoSXB/romfs_files/OF
cov.yml

View File

@ -6,7 +6,7 @@ if [ -r fcode/romfs.fs ]; then
fi
if [ -d romfs_files ]; then
cd romfs_files
../mkromfs.rb ../romfs *
../mkromfs.rb ../romfs * */**
cd ..
fi
ca65 -I ../../inc GoSXB.s -l GoSXB.lst

View File

@ -44,7 +44,11 @@ abort("Too many files (>15)") if ARGV.count > 255
new_romfs
ARGV.each do |name|
add_file_header(name, File.size(name))
if File.file?(name)
add_file_header(name, File.size(name))
else
puts "skipping #{name} - not a regular file"
end
end
@offset_map.each_pair do |name, offset|

View File

@ -0,0 +1,7 @@
also romfs
." ROMfs bootstrap by M.G." cr
s" message.fs" ?romfs-run
s" board.fs" ?romfs-run
s" OF/base.fs" ?romfs-run
previous

View File

@ -0,0 +1,26 @@
base @ decimal
: message ( n -- 0|n )
dup case
-3 of s" Stack o/f" endof
-9 of s" Invalid address" endof
-11 of s" Numeric o/f" endof
-12 of s" Argument type m/m" endof
-14 of s" Compile-only word" endof
-18 of s" String o/f" endof
-21 of s" Unsupported operation" endof
-22 of s" Control structure m/m" endof
-24 of s" Invalid numeric arg" endof
-31 of s" Can't >BODY" endof
-37 of s" I/O error" endof
-38 of s" File not found" endof
-49 of s" Search-order o/f" endof
-50 of s" Search-order u/f" endof
-59 of s" Can't ALLOC-MEM" endof
-60 of s" Can't FREE-MEM" endof
-69 of s" Can't open file" endof
-256 of s" Undefined Fcode#" endof
>r 0 0 r>
endcase
?dup if type drop 0 else drop then
;
base !