Skip to content

Commit

Permalink
++
Browse files Browse the repository at this point in the history
  • Loading branch information
bnnm committed Feb 8, 2025
1 parent ae4eef9 commit bbf9a6b
Show file tree
Hide file tree
Showing 10 changed files with 31,031 additions and 12 deletions.
11 changes: 6 additions & 5 deletions bms/archives/koei_rdb_fdata_file.bms
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,14 @@ startfunction EXTRACT_FILE
# https://github.com/yretenai/Cethleann/blob/develop/Cethleann/Compression/Scramble/RDBEncryption.cs
print "encrypted entry"

elif IS_LZ4 != 0
print "lz4 entry"

elif IS_EXTERNAL == 0 && IS_INTERNAL == 0
# external/internal flags mean this entry is just an index and not a file
if IS_ZLIB != 0 || IS_MINIZLIB != 0
comtype ZLIB
if IS_ZLIB != 0 || IS_MINIZLIB != 0 || IS_LZ4 != 0
if IS_LZ4 != 0
comtype LZ4
else
comtype ZLIB
endif

math CHUNK_SIZE = 0x00004000
log MEMORY_FILE 0 0
Expand Down
38 changes: 38 additions & 0 deletions bms/demux/smv_demuxer.bms
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Namco .SMV demuxer (Seven / Venus & Braves )

get FILE_NAME filename
string VIDEO_NAME p= "%s.m2v" FILE_NAME
string AUDIO_NAME p= "%s.vgmstream" FILE_NAME
get FILE_SIZE asize

set BLOCK_SIZE long 0x800


append #on
for OFFSET = 0 < FILE_SIZE
goto OFFSET
get NEXT_BLOCK_SIZE long
get VIDEO_SIZE long
get AUDIO_SUBOFFSET long
get AUDIO_SIZE long

# first block usually empty
if VIDEO_SIZE != 0
set VIDEO_OFFSET long OFFSET
math VIDEO_OFFSET += 0x10

log VIDEO_NAME VIDEO_OFFSET VIDEO_SIZE
endif

if AUDIO_SIZE != 0
set AUDIO_OFFSET long OFFSET
math AUDIO_OFFSET += AUDIO_SUBOFFSET

log AUDIO_NAME AUDIO_OFFSET AUDIO_SIZE
endif

math OFFSET += BLOCK_SIZE
set BLOCK_SIZE long NEXT_BLOCK_SIZE

next
append #off
37 changes: 30 additions & 7 deletions bms/uexp_uasset_vgm.bms
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,40 @@ startfunction EXTRACT_FILE
goto 0
findloc OFFSET string EXTRACT_FILE_ARG1 0 ""
if OFFSET != ""
math OFFSET -= 0x14
goto OFFSET
get TEST long
get SIZE long
math OFFSET += 0x14

math RIP_OK = 0
get NAME basename
string NAME += EXTRACT_FILE_ARG2

if TEST == 0
if RIP_OK == 0

math OFFSET -= 0x0c
goto OFFSET
get TEST long
get SIZE long
get SIZE2 long
math OFFSET += 0x0c

if TEST == 0 && SIZE == SIZE2
math RIP_OK = 1
endif
endif

if RIP_OK == 0
math OFFSET -= 0x14
goto OFFSET
get TEST long
get SIZE long
math OFFSET += 0x14

if TEST == 0 AND SIZE >= 0x40
math RIP_OK = 1
endif
endif

if RIP_OK == 1
log NAME OFFSET SIZE
endif


endif
endfunction
97 changes: 97 additions & 0 deletions misc/ragewords/ragehash/fnv.lst
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# List of 2 combos (bigrams) that aren't likely to appear in a real English word,
# using a simple format, so the final search space can be reduced a bit.
#
# With "na" in the list, it would ignore words like "banana" but allow "banbnb" (skips
# *na* but not "na*"), while "^ba" would ignore "banana" but not "bbanana" (separate to
# allow more filter for beginning combos). By default all combos are allowed, and these
# rules shut down paths.
#
# dictionary: abcdefghijklmnopqrstuvwxyz_0123456789
# ^aa: remove words that start with aa
# aa: remove words with aa in the middle (or end)
# a[abc]: remove words with aa, ab, ac...
# a[a]: same as aa
# [abc]a: doesn't work (only for 2nd letter)
#
# Default list removes some possible paths like "sub3" but not "sub1". Since main use of
# the reverser is getting (short-ish) gamesyncs, one should try to find related gamesyncs
# then adjust the list (or guess missing).
#
# refs
# http://norvig.com/mayzner.html
# https://www.quora.com/What-are-all-of-the-two-letter-combinations-that-never-occur-in-an-English-dictionary
# https://linguistics.stackexchange.com/questions/4082/impossible-bigrams-in-the-english-language
# https://stackoverflow.com/questions/1891404/how-do-you-create-an-english-like-word


# beginning combos
^a[aeiouq3456789]
^b[bcdfhjkmnpqstvwxyz_3456789]
^c[bcdfghjkmnpqstvwxyz_3456789]
^d[bcdfghjkmnpqstvwxyz_3456789]
^e[eq23456789]
^f[bcdfghjkmnpqstvwxyz_3456789]
^g[bcdfghjkmnpqstvwxyz_3456789]
^h[bcdfghjklmnpqrstvwxyz_3456789]
^i[aeiouq3456789]
^j[bcdfghjkmnpqstvwxyz_3456789]
^k[bcdfghjkmnpqstvwxyz_3456789]
^l[bcdfghjkmnpqstvwxyz_3456789]
^m[bcdfghjkmnpqstvwxyz_3456789]
^n[bcdfghjkmnpqstvwxyz_3456789]
^o[aeioq3456789]
^p[bcdfghjkmnpqstvwxyz_3456789]
^q[bcdfghjkmnpqstvwxyz_3456789]
^r[bcdfghjkmnpqstvwxyz_3456789]
^s[bhjsvx_3456789]
^t[bcdfgjklmnpqstvwxyz_3456789]
^u[aeiouq3456789]
^v[bcdfghjkmnpqstvwxyz_3456789]
^w[bcdfghjklmnpqstvwxyz_3456789]
^x[x3456789]
^y[tywz3456789]
^z[tywz3456789]


# mid combos
a[a3456789]
b[qxz3456789]
c[bfgjpvw3456789]
d[x3456789]
e[e3456789]
f[kqvxz3456789]
g[qvx3456789]
h[kvxz3456789]
i[iy3456789]
j[bcdfghklmnpqrstvwxyz3456789]
k[kqvxz3456789]
l[qx3456789]
m[gjqxz3456789]
n[3456789]
o[3456789]
p[qvxz3456789]
q[bcdefghjklmnopqrstvwxyz3456789]
r[3456789]
s[xz3456789]
t[3456789]
u[u3456789]
v[bcdfghjkmnpqtvwxz3456789]
w[qvxz3456789]
x[bdgjkrvxz3456789]
y[qvyz3456789]
z[bcfghjnqrsx3456789]

# numbers not allowed to be used as start (but _ is)
^0[abcdefghijklmnopqrstuvwxyz_0123456789]
^1[abcdefghijklmnopqrstuvwxyz_0123456789]
^2[abcdefghijklmnopqrstuvwxyz_0123456789]
^3[abcdefghijklmnopqrstuvwxyz_0123456789]
^4[abcdefghijklmnopqrstuvwxyz_0123456789]
^5[abcdefghijklmnopqrstuvwxyz_0123456789]
^6[abcdefghijklmnopqrstuvwxyz_0123456789]
^7[abcdefghijklmnopqrstuvwxyz_0123456789]
^8[abcdefghijklmnopqrstuvwxyz_0123456789]
^9[abcdefghijklmnopqrstuvwxyz_0123456789]

^__
__
Loading

0 comments on commit bbf9a6b

Please sign in to comment.