Generate a PSX disk image with lua-interface
PSX image
Get lua-interface
here : http://static.grumpycoder.net/pixel/lua-interface-distrib/ .
Script
Create a master.lua
file with this content :
function main()
loadmodule "lualibs"
loadmodule "luahandle"
loadmodule "luacd"
iso_file = Output "myiso.bin"
iso = isobuilder(iso_file)
pvd = PVD()
pvd.sysid = "PLAYSTATION"
pvd.volid = "MYISO"
pvd.pubid = "YOURNAME"
pvd.appid = "YOURAPP"
root = iso:setbasics(pvd)
root:setbasicsxa()
iso:createfile(root, "PSX.EXE", Input "your.psexe"):setbasicsxa()
falsesect = {}
for i = 1, 148, 1 do
iso:createsector(falsesect, MODE2)
end
iso:close()
end
Use the master.lua
script , changing l.15 'your.psexe' value to reflect your psx exe 's filename :
./lua-interface.exe -e "main()" master.lua
Generate your audio tracks with ffmpeg
ffmpeg -i input.file -f s16le -acodec pcm_s16le track.bin
Create the Cue file
The cue file should follow this format :
FILE "psxfile.bin" BINARY
TRACK 01 MODE2/2352
INDEX 01 00:00:00
FILE "audio1.bin" BINARY
TRACK 02 AUDIO
INDEX 01 00:00:00
FILE "audio2.bin" BINARY
TRACK 03 AUDIO
INDEX 00 00:00:00
INDEX 01 00:02:00
'psxfile.bin' should be the file generated by the lua script. 'audio1.bin', etc. should be the files generated with ffmpeg.
Source
https://discord.com/channels/642647820683444236/663664210525290507/796078666148610089
https://discord.com/channels/642647820683444236/642848592754901033/891744067933831200