forked from sonicretro/s1disasm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.lua
More file actions
executable file
·34 lines (25 loc) · 1.11 KB
/
build.lua
File metadata and controls
executable file
·34 lines (25 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env lua
--------------
-- Settings --
--------------
-- Set this to true to use a better compression algorithm for the DAC driver.
-- Having this set to false will use an inferior compression algorithm that
-- results in an accurate ROM being produced.
local improved_dac_driver_compression = true
---------------------
-- End of settings --
---------------------
-------------------------------------
-- Actual build script begins here --
-------------------------------------
local common = require "build_tools.lua.common"
-- Produce PCM and DPCM data.
common.convert_pcm_files_in_directory("sound/dac/pcm")
common.convert_dpcm_files_in_directory("sound/dac/dpcm")
-- Build the ROM.
local compression = improved_dac_driver_compression and "kosinski-optimised" or "kosinski"
common.build_rom_and_handle_failure("sonic", "s1built", "", "-p=FF -z=0," .. compression .. ",Size_of_DAC_driver_guess,after", false, "https://github.com/sonicretro/s1disasm")
-- Correct the ROM's header with a proper checksum and end-of-ROM value.
common.fix_header("s1built.bin")
-- A successful build; we can quit now.
common.exit()