diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7b602e8..9fdade8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -30,7 +30,13 @@ add_executable(cbleemsync
src/code/splash.h
src/code/splash.cpp
src/code/inifile.cpp
- src/code/inifile.h src/code/isodir.cpp src/code/isodir.h src/code/config.cpp src/code/config.h)
+ src/code/inifile.h
+ src/code/isodir.cpp
+ src/code/isodir.h
+ src/code/config.cpp
+ src/code/config.h
+ src/code/cfgprocessor.cpp
+ src/code/cfgprocessor.h)
add_executable(starter
src/code/starter.cpp
diff --git a/cmake-build-debug/autobleem.list b/cmake-build-debug/autobleem.list
deleted file mode 100644
index bac1409..0000000
--- a/cmake-build-debug/autobleem.list
+++ /dev/null
@@ -1,2 +0,0 @@
-1,/Users/screemer/SONY/Games/Backup
-2,/Users/screemer/SONY/Games/!Revolt
diff --git a/cmake-build-debug/autobleem.prev b/cmake-build-debug/autobleem.prev
deleted file mode 100644
index 7303b30..0000000
--- a/cmake-build-debug/autobleem.prev
+++ /dev/null
@@ -1,2 +0,0 @@
-!Revolt
-Backup
diff --git a/cmake-build-debug/cbleemsync.cbp b/cmake-build-debug/cbleemsync.cbp
deleted file mode 100644
index 41b3d73..0000000
--- a/cmake-build-debug/cbleemsync.cbp
+++ /dev/null
@@ -1,249 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/cmake-build-debug/cbleemsync.dSYM/Contents/Info.plist b/cmake-build-debug/cbleemsync.dSYM/Contents/Info.plist
deleted file mode 100644
index 341d890..0000000
--- a/cmake-build-debug/cbleemsync.dSYM/Contents/Info.plist
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
- CFBundleDevelopmentRegion
- English
- CFBundleIdentifier
- com.apple.xcode.dsym.cbleemsync
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundlePackageType
- dSYM
- CFBundleSignature
- ????
- CFBundleShortVersionString
- 1.0
- CFBundleVersion
- 1
-
-
diff --git a/cmake-build-debug/cbleemsync.dSYM/Contents/Resources/DWARF/cbleemsync b/cmake-build-debug/cbleemsync.dSYM/Contents/Resources/DWARF/cbleemsync
deleted file mode 100644
index 8a6307e..0000000
Binary files a/cmake-build-debug/cbleemsync.dSYM/Contents/Resources/DWARF/cbleemsync and /dev/null differ
diff --git a/cmake-build-debug/coversJ.db b/cmake-build-debug/coversJ.db
deleted file mode 100644
index a0f151b..0000000
Binary files a/cmake-build-debug/coversJ.db and /dev/null differ
diff --git a/cmake-build-debug/coversU.db b/cmake-build-debug/coversU.db
deleted file mode 100644
index 3443a9a..0000000
Binary files a/cmake-build-debug/coversU.db and /dev/null differ
diff --git a/cmake-build-debug/db b/cmake-build-debug/db
deleted file mode 100644
index a0f151b..0000000
Binary files a/cmake-build-debug/db and /dev/null differ
diff --git a/cmake-build-debug/default.lic b/cmake-build-debug/default.lic
deleted file mode 100755
index fc20063..0000000
--- a/cmake-build-debug/default.lic
+++ /dev/null
@@ -1 +0,0 @@
-Hacked By DoctorDalek / Screemer
\ No newline at end of file
diff --git a/cmake-build-debug/default.png b/cmake-build-debug/default.png
deleted file mode 100644
index a576c74..0000000
Binary files a/cmake-build-debug/default.png and /dev/null differ
diff --git a/cmake-build-debug/payload/028c18a9-ec4b-4632-b2cf-d4e20f252e8f/LUPDATA.BIN b/cmake-build-debug/payload/028c18a9-ec4b-4632-b2cf-d4e20f252e8f/LUPDATA.BIN
deleted file mode 100644
index 60d8385..0000000
Binary files a/cmake-build-debug/payload/028c18a9-ec4b-4632-b2cf-d4e20f252e8f/LUPDATA.BIN and /dev/null differ
diff --git a/cmake-build-debug/payload/Games/My Great Game 1/GameData/Game.ini b/cmake-build-debug/payload/Games/My Great Game 1/GameData/Game.ini
deleted file mode 100644
index ffbe419..0000000
--- a/cmake-build-debug/payload/Games/My Great Game 1/GameData/Game.ini
+++ /dev/null
@@ -1,6 +0,0 @@
-[Game]
-Discs=SLUS-00594,SLUS-00776
-Title=Metal Gear Solid
-Publisher=Konami
-Players=1
-Year=1998
\ No newline at end of file
diff --git a/cmake-build-debug/payload/Games/My Great Game 1/GameData/SLUS-00594.bin b/cmake-build-debug/payload/Games/My Great Game 1/GameData/SLUS-00594.bin
deleted file mode 100644
index e69de29..0000000
diff --git a/cmake-build-debug/payload/Games/My Great Game 1/GameData/SLUS-00594.cue b/cmake-build-debug/payload/Games/My Great Game 1/GameData/SLUS-00594.cue
deleted file mode 100644
index e69de29..0000000
diff --git a/cmake-build-debug/payload/Games/My Great Game 1/GameData/SLUS-00594.lic b/cmake-build-debug/payload/Games/My Great Game 1/GameData/SLUS-00594.lic
deleted file mode 100644
index e69de29..0000000
diff --git a/cmake-build-debug/payload/Games/My Great Game 1/GameData/SLUS-00594.png b/cmake-build-debug/payload/Games/My Great Game 1/GameData/SLUS-00594.png
deleted file mode 100644
index bf09815..0000000
Binary files a/cmake-build-debug/payload/Games/My Great Game 1/GameData/SLUS-00594.png and /dev/null differ
diff --git a/cmake-build-debug/payload/Games/My Great Game 1/GameData/SLUS-00776.bin b/cmake-build-debug/payload/Games/My Great Game 1/GameData/SLUS-00776.bin
deleted file mode 100644
index e69de29..0000000
diff --git a/cmake-build-debug/payload/Games/My Great Game 1/GameData/SLUS-00776.cue b/cmake-build-debug/payload/Games/My Great Game 1/GameData/SLUS-00776.cue
deleted file mode 100644
index e69de29..0000000
diff --git a/cmake-build-debug/payload/Games/My Great Game 1/GameData/pcsx.cfg b/cmake-build-debug/payload/Games/My Great Game 1/GameData/pcsx.cfg
deleted file mode 100644
index 303615c..0000000
--- a/cmake-build-debug/payload/Games/My Great Game 1/GameData/pcsx.cfg
+++ /dev/null
@@ -1,278 +0,0 @@
-Bios = SET_BY_PCSX
-Gpu3 = builtin_gpu
-Spu = builtin_spu
-Xa = 0
-Mdec = 0
-Cdda = 0
-Debug = 0
-PsxOut = 0
-SpuIrq = 0
-RCntFix = 0
-VSyncWA = 0
-Cpu = 0
-region = 0
-g_scaler3 = 2
-g_gamma = 64
-g_layer_x = 0
-g_layer_y = 0
-g_layer_w = 0
-g_layer_h = 0
-soft_filter = 0
-scanlines = 0
-scanline_level = 14
-plat_target.vout_method = 1
-plat_target.hwfilter = 0
-plat_target.vout_fullscreen = 0
-state_slot = 0
-cpu_clock = ffffffff
-g_opts = 00
-in_type_sel1 = 0
-in_type_sel2 = 0
-analog_deadzone = 32
-memcard1_sel = ffffffff
-memcard2_sel = ffffffff
-g_autostateld_opt = 0
-open_invalid_time = 16
-adev0_is_nublike = 0
-adev1_is_nublike = 0
-frameskip3 = 0
-gpu_peops.iUseDither = 0
-gpu_peops.dwActFixes = 80
-gpu_unai.lineskip = 0
-gpu_unai.abe_hack = 0
-gpu_unai.no_light = 0
-gpu_unai.no_blend = 0
-gpu_neon.allow_interlace = 2
-gpu_neon.enhancement_enable = 0
-gpu_neon.enhancement_no_main = 0
-gpu_peopsgl.bDrawDither = 0
-gpu_peopsgl.iFilterType = 0
-gpu_peopsgl.iFrameTexType = 0
-gpu_peopsgl.iUseMask = 0
-gpu_peopsgl.bOpaquePass = 0
-gpu_peopsgl.bAdvancedBlend = 0
-gpu_peopsgl.bUseFastMdec = 0
-gpu_peopsgl.iVRamSize = 40
-gpu_peopsgl.iTexGarbageCollection = 1
-gpu_peopsgl.dwActFixes = 0
-spu_config.iUseReverb = 1
-spu_config.iXAPitch = 0
-spu_config.iUseInterpolation = 1
-spu_config.iTempo = 0
-spu_config.iUseThread = 1
-config_save_counter = 4
-in_evdev_allow_abs_only = 0
-volume_boost = 0
-psx_clock = 39
-new_dynarec_hacks = 0
-in_enable_vibration = 0
-binddev = sdl:keys
-bind escape = Enter Menu
-bind backspace = Fast Forward
-bind c = player1 SELECT
-bind d = player1 TRIANGLE
-bind e = player1 L2
-bind r = player1 R1
-bind s = player1 SQUARE
-bind t = player1 R2
-bind v = player1 START
-bind w = player1 L1
-bind x = player1 CIRCLE
-bind z = player1 CROSS
-bind f1 = Save State
-bind f2 = Load State
-bind f3 = Prev Save Slot
-bind f4 = Next Save Slot
-bind f5 = Toggle Frameskip
-bind f6 = Take Screenshot
-bind f7 = Show/Hide FPS
-bind f8 = Switch Renderer
-bind f9 = CD Change button
-bind f10 = RESET button
-bind f11 = Toggle fullscreen
-bind right = player1 RIGHT
-bind left = player1 LEFT
-bind down = player1 DOWN
-bind up = player1 UP
-bind eject = CD Change button
-bind reset = RESET button
-binddev = sdl:Sony Interactive Entertainment Controller
-bind escape = Enter Menu
-bind backspace = Fast Forward
-bind f1 = Save State
-bind f2 = Load State
-bind f3 = Prev Save Slot
-bind f4 = Next Save Slot
-bind f5 = Toggle Frameskip
-bind f6 = Take Screenshot
-bind f7 = Show/Hide FPS
-bind f8 = Switch Renderer
-bind f9 = CD Change button
-bind f10 = RESET button
-bind f11 = Toggle fullscreen
-bind right = player1 RIGHT
-bind left = player1 LEFT
-bind down = player1 DOWN
-bind up = player1 UP
-bind \xF0 = player1 TRIANGLE
-bind \xF1 = player1 CIRCLE
-bind \xF2 = player1 CROSS
-bind \xF3 = player1 SQUARE
-bind \xF4 = player1 L2
-bind \xF5 = player1 R2
-bind \xF6 = player1 L1
-bind \xF7 = player1 R1
-bind \xF8 = player1 SELECT
-bind \xF9 = player1 START
-bind eject = CD Change button
-bind reset = RESET button
-binddev = sdl:Sony Interactive Entertainment Controller [1]
-bind escape = Enter Menu
-bind backspace = Fast Forward
-bind f1 = Save State
-bind f2 = Load State
-bind f3 = Prev Save Slot
-bind f4 = Next Save Slot
-bind f5 = Toggle Frameskip
-bind f6 = Take Screenshot
-bind f7 = Show/Hide FPS
-bind f8 = Switch Renderer
-bind f9 = CD Change button
-bind f10 = RESET button
-bind f11 = Toggle fullscreen
-bind right = player2 RIGHT
-bind left = player2 LEFT
-bind down = player2 DOWN
-bind up = player2 UP
-bind \xF0 = player2 TRIANGLE
-bind \xF1 = player2 CIRCLE
-bind \xF2 = player2 CROSS
-bind \xF3 = player2 SQUARE
-bind \xF4 = player2 L2
-bind \xF5 = player2 R2
-bind \xF6 = player2 L1
-bind \xF7 = player2 R1
-bind \xF8 = player2 SELECT
-bind \xF9 = player2 START
-bind eject = CD Change button
-bind reset = RESET button
-binddev = sdl:Sony SCPH-1000R
-bind escape = Enter Menu
-bind backspace = Fast Forward
-bind f1 = Save State
-bind f2 = Load State
-bind f3 = Prev Save Slot
-bind f4 = Next Save Slot
-bind f5 = Toggle Frameskip
-bind f6 = Take Screenshot
-bind f7 = Show/Hide FPS
-bind f8 = Switch Renderer
-bind f9 = CD Change button
-bind f10 = RESET button
-bind f11 = Toggle fullscreen
-bind right = player1 RIGHT
-bind left = player1 LEFT
-bind down = player1 DOWN
-bind up = player1 UP
-bind \xF0 = player1 TRIANGLE
-bind \xF1 = player1 CIRCLE
-bind \xF2 = player1 CROSS
-bind \xF3 = player1 SQUARE
-bind \xF4 = player1 L2
-bind \xF5 = player1 R2
-bind \xF6 = player1 L1
-bind \xF7 = player1 R1
-bind \xF8 = player1 SELECT
-bind \xF9 = player1 START
-bind eject = CD Change button
-bind reset = RESET button
-binddev = sdl:Sony SCPH-1000R [1]
-bind escape = Enter Menu
-bind backspace = Fast Forward
-bind f1 = Save State
-bind f2 = Load State
-bind f3 = Prev Save Slot
-bind f4 = Next Save Slot
-bind f5 = Toggle Frameskip
-bind f6 = Take Screenshot
-bind f7 = Show/Hide FPS
-bind f8 = Switch Renderer
-bind f9 = CD Change button
-bind f10 = RESET button
-bind f11 = Toggle fullscreen
-bind right = player2 RIGHT
-bind left = player2 LEFT
-bind down = player2 DOWN
-bind up = player2 UP
-bind \xF0 = player2 TRIANGLE
-bind \xF1 = player2 CIRCLE
-bind \xF2 = player2 CROSS
-bind \xF3 = player2 SQUARE
-bind \xF4 = player2 L2
-bind \xF5 = player2 R2
-bind \xF6 = player2 L1
-bind \xF7 = player2 R1
-bind \xF8 = player2 SELECT
-bind \xF9 = player2 START
-bind eject = CD Change button
-bind reset = RESET button
-binddev = sdl:iBUFFALO BSGP1204 Series
-bind escape = Enter Menu
-bind backspace = Fast Forward
-bind f1 = Save State
-bind f2 = Load State
-bind f3 = Prev Save Slot
-bind f4 = Next Save Slot
-bind f5 = Toggle Frameskip
-bind f6 = Take Screenshot
-bind f7 = Show/Hide FPS
-bind f8 = Switch Renderer
-bind f9 = CD Change button
-bind f10 = RESET button
-bind f11 = Toggle fullscreen
-bind right = player1 RIGHT
-bind left = player1 LEFT
-bind down = player1 DOWN
-bind up = player1 UP
-bind \xF0 = player1 TRIANGLE
-bind \xF1 = player1 CIRCLE
-bind \xF2 = player1 CROSS
-bind \xF3 = player1 SQUARE
-bind \xF4 = player1 L2
-bind \xF5 = player1 R2
-bind \xF6 = player1 L1
-bind \xF7 = player1 R1
-bind \xF8 = player1 SELECT
-bind \xF9 = player1 START
-bind eject = CD Change button
-bind reset = RESET button
-binddev = sdl:iBUFFALO BSGP1204 Series [1]
-bind escape = Enter Menu
-bind backspace = Fast Forward
-bind f1 = Save State
-bind f2 = Load State
-bind f3 = Prev Save Slot
-bind f4 = Next Save Slot
-bind f5 = Toggle Frameskip
-bind f6 = Take Screenshot
-bind f7 = Show/Hide FPS
-bind f8 = Switch Renderer
-bind f9 = CD Change button
-bind f10 = RESET button
-bind f11 = Toggle fullscreen
-bind right = player2 RIGHT
-bind left = player2 LEFT
-bind down = player2 DOWN
-bind up = player2 UP
-bind \xF0 = player2 TRIANGLE
-bind \xF1 = player2 CIRCLE
-bind \xF2 = player2 CROSS
-bind \xF3 = player2 SQUARE
-bind \xF4 = player2 L2
-bind \xF5 = player2 R2
-bind \xF6 = player2 L1
-bind \xF7 = player2 R1
-bind \xF8 = player2 SELECT
-bind \xF9 = player2 START
-bind eject = CD Change button
-bind reset = RESET button
diff --git a/cmake-build-debug/payload/Games/My Great Game 2/GameData/Game.ini b/cmake-build-debug/payload/Games/My Great Game 2/GameData/Game.ini
deleted file mode 100644
index e42d749..0000000
--- a/cmake-build-debug/payload/Games/My Great Game 2/GameData/Game.ini
+++ /dev/null
@@ -1,6 +0,0 @@
-[Game]
-Discs=SLUS-01066
-Title=Tony Hawk's Pro Skater 2
-Publisher=Activision
-Players=2
-Year=2000
\ No newline at end of file
diff --git a/cmake-build-debug/payload/Games/My Great Game 2/GameData/SLUS-01066.bin b/cmake-build-debug/payload/Games/My Great Game 2/GameData/SLUS-01066.bin
deleted file mode 100644
index e69de29..0000000
diff --git a/cmake-build-debug/payload/Games/My Great Game 2/GameData/SLUS-01066.cue b/cmake-build-debug/payload/Games/My Great Game 2/GameData/SLUS-01066.cue
deleted file mode 100644
index 47e902d..0000000
--- a/cmake-build-debug/payload/Games/My Great Game 2/GameData/SLUS-01066.cue
+++ /dev/null
@@ -1,3 +0,0 @@
-FILE "Tony Hawk's Pro Skater 2 (USA).bin" BINARY
- TRACK 01 MODE2/2352
- INDEX 01 00:00:00
diff --git a/cmake-build-debug/payload/Games/My Great Game 2/GameData/SLUS-01066.lic b/cmake-build-debug/payload/Games/My Great Game 2/GameData/SLUS-01066.lic
deleted file mode 100644
index 5a1973f..0000000
--- a/cmake-build-debug/payload/Games/My Great Game 2/GameData/SLUS-01066.lic
+++ /dev/null
@@ -1 +0,0 @@
-Hacked By DoctorDalek
\ No newline at end of file
diff --git a/cmake-build-debug/payload/Games/My Great Game 2/GameData/SLUS-01066.png b/cmake-build-debug/payload/Games/My Great Game 2/GameData/SLUS-01066.png
deleted file mode 100644
index bf09815..0000000
Binary files a/cmake-build-debug/payload/Games/My Great Game 2/GameData/SLUS-01066.png and /dev/null differ
diff --git a/cmake-build-debug/payload/Games/My Great Game 2/GameData/pcsx.cfg b/cmake-build-debug/payload/Games/My Great Game 2/GameData/pcsx.cfg
deleted file mode 100644
index d39e696..0000000
--- a/cmake-build-debug/payload/Games/My Great Game 2/GameData/pcsx.cfg
+++ /dev/null
@@ -1,280 +0,0 @@
-Bios = SET_BY_PCSX
-Gpu3 = builtin_gpu
-Spu = builtin_spu
-Xa = 0
-Mdec = 0
-Cdda = 0
-Debug = 0
-PsxOut = 0
-SpuIrq = 0
-RCntFix = 0
-VSyncWA = 0
-Cpu = 0
-region = 0
-g_scaler3 = 2
-g_gamma = 64
-g_layer_x = 0
-g_layer_y = 0
-g_layer_w = 0
-g_layer_h = 0
-soft_filter = 0
-scanlines = 0
-scanline_level = 14
-plat_target.vout_method = 1
-plat_target.hwfilter = 0
-plat_target.vout_fullscreen = 0
-state_slot = 0
-cpu_clock = ffffffff
-g_opts = 00
-in_type_sel1 = 0
-in_type_sel2 = 0
-analog_deadzone = 32
-memcard1_sel = ffffffff
-memcard2_sel = ffffffff
-g_autostateld_opt = 0
-open_invalid_time = 16
-adev0_is_nublike = 0
-adev1_is_nublike = 0
-frameskip3 = 0
-gpu_peops.iUseDither = 0
-gpu_peops.dwActFixes = 80
-gpu_unai.lineskip = 0
-gpu_unai.abe_hack = 0
-gpu_unai.no_light = 0
-gpu_unai.no_blend = 0
-gpu_neon.allow_interlace = 2
-gpu_neon.enhancement_enable = 0
-gpu_neon.enhancement_no_main = 0
-gpu_peopsgl.bDrawDither = 0
-gpu_peopsgl.iFilterType = 0
-gpu_peopsgl.iFrameTexType = 0
-gpu_peopsgl.iUseMask = 0
-gpu_peopsgl.bOpaquePass = 0
-gpu_peopsgl.bAdvancedBlend = 0
-gpu_peopsgl.bUseFastMdec = 0
-gpu_peopsgl.iVRamSize = 40
-gpu_peopsgl.iTexGarbageCollection = 1
-gpu_peopsgl.dwActFixes = 0
-spu_config.iUseReverb = 1
-spu_config.iXAPitch = 0
-spu_config.iUseInterpolation = 1
-spu_config.iTempo = 0
-spu_config.iUseThread = 1
-config_save_counter = 4
-in_evdev_allow_abs_only = 0
-volume_boost = 0
-psx_clock = 39
-new_dynarec_hacks = 0
-in_enable_vibration = 0
-binddev = sdl:keys
-bind escape = Enter Menu
-bind backspace = Fast Forward
-bind c = player1 SELECT
-bind d = player1 TRIANGLE
-bind e = player1 L2
-bind r = player1 R1
-bind s = player1 SQUARE
-bind t = player1 R2
-bind v = player1 START
-bind w = player1 L1
-bind x = player1 CIRCLE
-bind z = player1 CROSS
-bind f1 = Save State
-bind f2 = Load State
-bind f3 = Prev Save Slot
-bind f4 = Next Save Slot
-bind f5 = Toggle Frameskip
-bind f6 = Take Screenshot
-bind f7 = Show/Hide FPS
-bind f8 = Switch Renderer
-bind f9 = CD Change button
-bind f10 = RESET button
-bind f11 = Toggle fullscreen
-bind right = player1 RIGHT
-bind left = player1 LEFT
-bind down = player1 DOWN
-bind up = player1 UP
-bind eject = CD Change button
-bind reset = RESET button
-binddev = sdl:Sony Interactive Entertainment Controller
-bind escape = Enter Menu
-bind backspace = Fast Forward
-bind f1 = Save State
-bind f2 = Load State
-bind f3 = Prev Save Slot
-bind f4 = Next Save Slot
-bind f5 = Toggle Frameskip
-bind f6 = Take Screenshot
-bind f7 = Show/Hide FPS
-bind f8 = Switch Renderer
-bind f9 = CD Change button
-bind f10 = RESET button
-bind f11 = Toggle fullscreen
-bind right = player1 RIGHT
-bind left = player1 LEFT
-bind down = player1 DOWN
-bind up = player1 UP
-bind \xF0 = player1 TRIANGLE
-bind \xF1 = player1 CIRCLE
-bind \xF2 = player1 CROSS
-bind \xF3 = player1 SQUARE
-bind \xF4 = player1 L2
-bind \xF5 = player1 R2
-bind \xF6 = player1 L1
-bind \xF7 = player1 R1
-bind \xF8 = player1 SELECT
-bind \xF9 = player1 START
-bind eject = CD Change button
-bind reset = RESET button
-binddev = sdl:Sony Interactive Entertainment Controller [1]
-bind escape = Enter Menu
-bind backspace = Fast Forward
-bind f1 = Save State
-bind f2 = Load State
-bind f3 = Prev Save Slot
-bind f4 = Next Save Slot
-bind f5 = Toggle Frameskip
-bind f6 = Take Screenshot
-bind f7 = Show/Hide FPS
-bind f8 = Switch Renderer
-bind f9 = CD Change button
-bind f10 = RESET button
-bind f11 = Toggle fullscreen
-bind right = player2 RIGHT
-bind left = player2 LEFT
-bind down = player2 DOWN
-bind up = player2 UP
-bind \xF0 = player2 TRIANGLE
-bind \xF1 = player2 CIRCLE
-bind \xF2 = player2 CROSS
-bind \xF3 = player2 SQUARE
-bind \xF4 = player2 L2
-bind \xF5 = player2 R2
-bind \xF6 = player2 L1
-bind \xF7 = player2 R1
-bind \xF8 = player2 SELECT
-bind \xF9 = player2 START
-bind eject = CD Change button
-bind reset = RESET button
-binddev = sdl:Sony SCPH-1000R
-bind escape = Enter Menu
-bind backspace = Fast Forward
-bind f1 = Save State
-bind f2 = Load State
-bind f3 = Prev Save Slot
-bind f4 = Next Save Slot
-bind f5 = Toggle Frameskip
-bind f6 = Take Screenshot
-bind f7 = Show/Hide FPS
-bind f8 = Switch Renderer
-bind f9 = CD Change button
-bind f10 = RESET button
-bind f11 = Toggle fullscreen
-bind right = player1 RIGHT
-bind left = player1 LEFT
-bind down = player1 DOWN
-bind up = player1 UP
-bind \xF0 = player1 TRIANGLE
-bind \xF1 = player1 CIRCLE
-bind \xF2 = player1 CROSS
-bind \xF3 = player1 SQUARE
-bind \xF4 = player1 L2
-bind \xF5 = player1 R2
-bind \xF6 = player1 L1
-bind \xF7 = player1 R1
-bind \xF8 = player1 SELECT
-bind \xF9 = player1 START
-bind eject = CD Change button
-bind reset = RESET button
-binddev = sdl:Sony SCPH-1000R [1]
-bind escape = Enter Menu
-bind backspace = Fast Forward
-bind f1 = Save State
-bind f2 = Load State
-bind f3 = Prev Save Slot
-bind f4 = Next Save Slot
-bind f5 = Toggle Frameskip
-bind f6 = Take Screenshot
-bind f7 = Show/Hide FPS
-bind f8 = Switch Renderer
-bind f9 = CD Change button
-bind f10 = RESET button
-bind f11 = Toggle fullscreen
-bind right = player2 RIGHT
-bind left = player2 LEFT
-bind down = player2 DOWN
-bind up = player2 UP
-bind \xF0 = player2 TRIANGLE
-bind \xF1 = player2 CIRCLE
-bind \xF2 = player2 CROSS
-bind \xF3 = player2 SQUARE
-bind \xF4 = player2 L2
-bind \xF5 = player2 R2
-bind \xF6 = player2 L1
-bind \xF7 = player2 R1
-bind \xF8 = player2 SELECT
-bind \xF9 = player2 START
-bind eject = CD Change button
-bind reset = RESET button
-binddev = sdl:iBUFFALO BSGP1204 Series
-bind escape = Enter Menu
-bind backspace = Fast Forward
-bind f1 = Save State
-bind f2 = Load State
-bind f3 = Prev Save Slot
-bind f4 = Next Save Slot
-bind f5 = Toggle Frameskip
-bind f6 = Take Screenshot
-bind f7 = Show/Hide FPS
-bind f8 = Switch Renderer
-bind f9 = CD Change button
-bind f10 = RESET button
-bind f11 = Toggle fullscreen
-bind right = player1 RIGHT
-bind left = player1 LEFT
-bind down = player1 DOWN
-bind up = player1 UP
-bind \xF0 = player1 TRIANGLE
-bind \xF1 = player1 CIRCLE
-bind \xF2 = player1 CROSS
-bind \xF3 = player1 SQUARE
-bind \xF4 = player1 L2
-bind \xF5 = player1 R2
-bind \xF6 = player1 L1
-bind \xF7 = player1 R1
-bind \xF8 = player1 SELECT
-bind \xF9 = player1 START
-bind eject = CD Change button
-bind reset = RESET button
-binddev = sdl:iBUFFALO BSGP1204 Series [1]
-bind escape = Enter Menu
-bind backspace = Fast Forward
-bind f1 = Save State
-bind f2 = Load State
-bind f3 = Prev Save Slot
-bind f4 = Next Save Slot
-bind f5 = Toggle Frameskip
-bind f6 = Take Screenshot
-bind f7 = Show/Hide FPS
-bind f8 = Switch Renderer
-bind f9 = CD Change button
-bind f10 = RESET button
-bind f11 = Toggle fullscreen
-bind right = player2 RIGHT
-bind left = player2 LEFT
-bind down = player2 DOWN
-bind up = player2 UP
-bind \xF0 = player2 TRIANGLE
-bind \xF1 = player2 CIRCLE
-bind \xF2 = player2 CROSS
-bind \xF3 = player2 SQUARE
-bind \xF4 = player2 L2
-bind \xF5 = player2 R2
-bind \xF6 = player2 L1
-bind \xF7 = player2 R1
-bind \xF8 = player2 SELECT
-bind \xF9 = player2 START
-bind eject = CD Change button
-bind reset = RESET button
-
-
diff --git a/cmake-build-debug/payload/cbleemsync/autobleem.list b/cmake-build-debug/payload/cbleemsync/autobleem.list
deleted file mode 100755
index 41a94c8..0000000
--- a/cmake-build-debug/payload/cbleemsync/autobleem.list
+++ /dev/null
@@ -1,7 +0,0 @@
-1,/media/Games/Crash Bandicoot (U)
-2,/media/Games/Gran Turismo 2 SIM (US)
-3,/media/Games/Harvest Moon - Back to Nature(U)
-4,/media/Games/MDK (US)
-5,/media/Games/Resident Evil 2 Leon (US)
-6,/media/Games/Tenchu 2 - BotSA (US)
-7,/media/Games/Vagrant Story (U)
diff --git a/cmake-build-debug/payload/cbleemsync/default.lic b/cmake-build-debug/payload/cbleemsync/default.lic
deleted file mode 100755
index 0c44ab9..0000000
--- a/cmake-build-debug/payload/cbleemsync/default.lic
+++ /dev/null
@@ -1 +0,0 @@
-Hacked By DoctorDalek / Plain C version by Screemer
\ No newline at end of file
diff --git a/cmake-build-debug/payload/cbleemsync/default.png b/cmake-build-debug/payload/cbleemsync/default.png
deleted file mode 100755
index a576c74..0000000
Binary files a/cmake-build-debug/payload/cbleemsync/default.png and /dev/null differ
diff --git a/cmake-build-debug/payload/cbleemsync/pcsx.cfg b/cmake-build-debug/payload/cbleemsync/pcsx.cfg
deleted file mode 100755
index 303615c..0000000
--- a/cmake-build-debug/payload/cbleemsync/pcsx.cfg
+++ /dev/null
@@ -1,278 +0,0 @@
-Bios = SET_BY_PCSX
-Gpu3 = builtin_gpu
-Spu = builtin_spu
-Xa = 0
-Mdec = 0
-Cdda = 0
-Debug = 0
-PsxOut = 0
-SpuIrq = 0
-RCntFix = 0
-VSyncWA = 0
-Cpu = 0
-region = 0
-g_scaler3 = 2
-g_gamma = 64
-g_layer_x = 0
-g_layer_y = 0
-g_layer_w = 0
-g_layer_h = 0
-soft_filter = 0
-scanlines = 0
-scanline_level = 14
-plat_target.vout_method = 1
-plat_target.hwfilter = 0
-plat_target.vout_fullscreen = 0
-state_slot = 0
-cpu_clock = ffffffff
-g_opts = 00
-in_type_sel1 = 0
-in_type_sel2 = 0
-analog_deadzone = 32
-memcard1_sel = ffffffff
-memcard2_sel = ffffffff
-g_autostateld_opt = 0
-open_invalid_time = 16
-adev0_is_nublike = 0
-adev1_is_nublike = 0
-frameskip3 = 0
-gpu_peops.iUseDither = 0
-gpu_peops.dwActFixes = 80
-gpu_unai.lineskip = 0
-gpu_unai.abe_hack = 0
-gpu_unai.no_light = 0
-gpu_unai.no_blend = 0
-gpu_neon.allow_interlace = 2
-gpu_neon.enhancement_enable = 0
-gpu_neon.enhancement_no_main = 0
-gpu_peopsgl.bDrawDither = 0
-gpu_peopsgl.iFilterType = 0
-gpu_peopsgl.iFrameTexType = 0
-gpu_peopsgl.iUseMask = 0
-gpu_peopsgl.bOpaquePass = 0
-gpu_peopsgl.bAdvancedBlend = 0
-gpu_peopsgl.bUseFastMdec = 0
-gpu_peopsgl.iVRamSize = 40
-gpu_peopsgl.iTexGarbageCollection = 1
-gpu_peopsgl.dwActFixes = 0
-spu_config.iUseReverb = 1
-spu_config.iXAPitch = 0
-spu_config.iUseInterpolation = 1
-spu_config.iTempo = 0
-spu_config.iUseThread = 1
-config_save_counter = 4
-in_evdev_allow_abs_only = 0
-volume_boost = 0
-psx_clock = 39
-new_dynarec_hacks = 0
-in_enable_vibration = 0
-binddev = sdl:keys
-bind escape = Enter Menu
-bind backspace = Fast Forward
-bind c = player1 SELECT
-bind d = player1 TRIANGLE
-bind e = player1 L2
-bind r = player1 R1
-bind s = player1 SQUARE
-bind t = player1 R2
-bind v = player1 START
-bind w = player1 L1
-bind x = player1 CIRCLE
-bind z = player1 CROSS
-bind f1 = Save State
-bind f2 = Load State
-bind f3 = Prev Save Slot
-bind f4 = Next Save Slot
-bind f5 = Toggle Frameskip
-bind f6 = Take Screenshot
-bind f7 = Show/Hide FPS
-bind f8 = Switch Renderer
-bind f9 = CD Change button
-bind f10 = RESET button
-bind f11 = Toggle fullscreen
-bind right = player1 RIGHT
-bind left = player1 LEFT
-bind down = player1 DOWN
-bind up = player1 UP
-bind eject = CD Change button
-bind reset = RESET button
-binddev = sdl:Sony Interactive Entertainment Controller
-bind escape = Enter Menu
-bind backspace = Fast Forward
-bind f1 = Save State
-bind f2 = Load State
-bind f3 = Prev Save Slot
-bind f4 = Next Save Slot
-bind f5 = Toggle Frameskip
-bind f6 = Take Screenshot
-bind f7 = Show/Hide FPS
-bind f8 = Switch Renderer
-bind f9 = CD Change button
-bind f10 = RESET button
-bind f11 = Toggle fullscreen
-bind right = player1 RIGHT
-bind left = player1 LEFT
-bind down = player1 DOWN
-bind up = player1 UP
-bind \xF0 = player1 TRIANGLE
-bind \xF1 = player1 CIRCLE
-bind \xF2 = player1 CROSS
-bind \xF3 = player1 SQUARE
-bind \xF4 = player1 L2
-bind \xF5 = player1 R2
-bind \xF6 = player1 L1
-bind \xF7 = player1 R1
-bind \xF8 = player1 SELECT
-bind \xF9 = player1 START
-bind eject = CD Change button
-bind reset = RESET button
-binddev = sdl:Sony Interactive Entertainment Controller [1]
-bind escape = Enter Menu
-bind backspace = Fast Forward
-bind f1 = Save State
-bind f2 = Load State
-bind f3 = Prev Save Slot
-bind f4 = Next Save Slot
-bind f5 = Toggle Frameskip
-bind f6 = Take Screenshot
-bind f7 = Show/Hide FPS
-bind f8 = Switch Renderer
-bind f9 = CD Change button
-bind f10 = RESET button
-bind f11 = Toggle fullscreen
-bind right = player2 RIGHT
-bind left = player2 LEFT
-bind down = player2 DOWN
-bind up = player2 UP
-bind \xF0 = player2 TRIANGLE
-bind \xF1 = player2 CIRCLE
-bind \xF2 = player2 CROSS
-bind \xF3 = player2 SQUARE
-bind \xF4 = player2 L2
-bind \xF5 = player2 R2
-bind \xF6 = player2 L1
-bind \xF7 = player2 R1
-bind \xF8 = player2 SELECT
-bind \xF9 = player2 START
-bind eject = CD Change button
-bind reset = RESET button
-binddev = sdl:Sony SCPH-1000R
-bind escape = Enter Menu
-bind backspace = Fast Forward
-bind f1 = Save State
-bind f2 = Load State
-bind f3 = Prev Save Slot
-bind f4 = Next Save Slot
-bind f5 = Toggle Frameskip
-bind f6 = Take Screenshot
-bind f7 = Show/Hide FPS
-bind f8 = Switch Renderer
-bind f9 = CD Change button
-bind f10 = RESET button
-bind f11 = Toggle fullscreen
-bind right = player1 RIGHT
-bind left = player1 LEFT
-bind down = player1 DOWN
-bind up = player1 UP
-bind \xF0 = player1 TRIANGLE
-bind \xF1 = player1 CIRCLE
-bind \xF2 = player1 CROSS
-bind \xF3 = player1 SQUARE
-bind \xF4 = player1 L2
-bind \xF5 = player1 R2
-bind \xF6 = player1 L1
-bind \xF7 = player1 R1
-bind \xF8 = player1 SELECT
-bind \xF9 = player1 START
-bind eject = CD Change button
-bind reset = RESET button
-binddev = sdl:Sony SCPH-1000R [1]
-bind escape = Enter Menu
-bind backspace = Fast Forward
-bind f1 = Save State
-bind f2 = Load State
-bind f3 = Prev Save Slot
-bind f4 = Next Save Slot
-bind f5 = Toggle Frameskip
-bind f6 = Take Screenshot
-bind f7 = Show/Hide FPS
-bind f8 = Switch Renderer
-bind f9 = CD Change button
-bind f10 = RESET button
-bind f11 = Toggle fullscreen
-bind right = player2 RIGHT
-bind left = player2 LEFT
-bind down = player2 DOWN
-bind up = player2 UP
-bind \xF0 = player2 TRIANGLE
-bind \xF1 = player2 CIRCLE
-bind \xF2 = player2 CROSS
-bind \xF3 = player2 SQUARE
-bind \xF4 = player2 L2
-bind \xF5 = player2 R2
-bind \xF6 = player2 L1
-bind \xF7 = player2 R1
-bind \xF8 = player2 SELECT
-bind \xF9 = player2 START
-bind eject = CD Change button
-bind reset = RESET button
-binddev = sdl:iBUFFALO BSGP1204 Series
-bind escape = Enter Menu
-bind backspace = Fast Forward
-bind f1 = Save State
-bind f2 = Load State
-bind f3 = Prev Save Slot
-bind f4 = Next Save Slot
-bind f5 = Toggle Frameskip
-bind f6 = Take Screenshot
-bind f7 = Show/Hide FPS
-bind f8 = Switch Renderer
-bind f9 = CD Change button
-bind f10 = RESET button
-bind f11 = Toggle fullscreen
-bind right = player1 RIGHT
-bind left = player1 LEFT
-bind down = player1 DOWN
-bind up = player1 UP
-bind \xF0 = player1 TRIANGLE
-bind \xF1 = player1 CIRCLE
-bind \xF2 = player1 CROSS
-bind \xF3 = player1 SQUARE
-bind \xF4 = player1 L2
-bind \xF5 = player1 R2
-bind \xF6 = player1 L1
-bind \xF7 = player1 R1
-bind \xF8 = player1 SELECT
-bind \xF9 = player1 START
-bind eject = CD Change button
-bind reset = RESET button
-binddev = sdl:iBUFFALO BSGP1204 Series [1]
-bind escape = Enter Menu
-bind backspace = Fast Forward
-bind f1 = Save State
-bind f2 = Load State
-bind f3 = Prev Save Slot
-bind f4 = Next Save Slot
-bind f5 = Toggle Frameskip
-bind f6 = Take Screenshot
-bind f7 = Show/Hide FPS
-bind f8 = Switch Renderer
-bind f9 = CD Change button
-bind f10 = RESET button
-bind f11 = Toggle fullscreen
-bind right = player2 RIGHT
-bind left = player2 LEFT
-bind down = player2 DOWN
-bind up = player2 UP
-bind \xF0 = player2 TRIANGLE
-bind \xF1 = player2 CIRCLE
-bind \xF2 = player2 CROSS
-bind \xF3 = player2 SQUARE
-bind \xF4 = player2 L2
-bind \xF5 = player2 R2
-bind \xF6 = player2 L1
-bind \xF7 = player2 R1
-bind \xF8 = player2 SELECT
-bind \xF9 = player2 START
-bind eject = CD Change button
-bind reset = RESET button
diff --git a/cmake-build-debug/payload/cbleemsync/run.sh b/cmake-build-debug/payload/cbleemsync/run.sh
deleted file mode 100755
index b777f93..0000000
--- a/cmake-build-debug/payload/cbleemsync/run.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-
-
-./cbleemsync /media/System/regional.db /media/Games/ > out.txt 2> err.txt
-
-
diff --git a/cmake-build-debug/payload/lolhack/bleemsync.sh b/cmake-build-debug/payload/lolhack/bleemsync.sh
deleted file mode 100755
index a597276..0000000
--- a/cmake-build-debug/payload/lolhack/bleemsync.sh
+++ /dev/null
@@ -1,78 +0,0 @@
-#!/bin/sh
-
-
-# Extract system files to avoid crashing
-mkdir -p /media/System/Bios
-mkdir -p /media/System/Preferences
-mkdir -p /media/System/Preferences/System
-mkdir -p /media/System/Preferences/User
-mkdir -p /media/System/Preferences/AutoDimmer
-mkdir -p /media/System/Databases
-mkdir -p /media/System/Region
-mkdir -p /media/System/Logs
-mkdir -p /media/System/UI
-
-# Copy the BIOS files to USB
-[ ! -f /media/System/Bios/romw.bin ] && cp -r /gaadata/system/bios/* /media/System/Bios
-# Copy the regional.pre to USB
-# This contains settings for the UI region
-[ ! -f /media/System/Preferences/System/regional.pre ] && cp /gaadata/preferences/* /media/System/Preferences/System
-# Copy out the user.pre to USB
-# This contains things like language setting
-[ ! -f /media/System/Preferences/User/user.pre ] && cp /data/AppData/sony/ui/* /media/System/Preferences/User
-# Copy out the auto dimming config to USB
-[ ! -f /media/System/Preferences/AutoDimmer/config.cnf ] && cp /data/AppData/sony/auto_dimmer/* /media/System/Preferences/AutoDimmer
-# Copy out the region info
-[ ! -f /media/System/Region/REGION ] && cp /gaadata/geninfo/* /media/System/Region
-# Copy ui error log
-[ ! -f /media/System/UI/error.log ] && cp /data/sony/ui/* /media/System/UI
-# Init the ui_menu.log
-[ ! -f /media/System/Logs/ui_menu.log ] && touch /media/System/Logs/ui_menu.log
-sync
-
-# Unmount partitons and create tmpfs - Shut system down on failure
-MOUNT_FAIL=0
-umount /data || MOUNT_FAIL=1
-umount /gaadata || MOUNT_FAIL=1
-# Create gaadata and data folders in tmp then mount over original folders
-mkdir -p /tmp/gaadatatmp /tmp/datatmp
-mount -o bind /tmp/gaadatatmp /gaadata || MOUNT_FAIL=1
-mount -o bind /tmp/datatmp /data || MOUNT_FAIL=1
-[ $MOUNT_FAIL -eq 1 ] && reboot && exit
-
-# Create gaadata on tmpfs
-mkdir -p /tmp/gaadatatmp/system/
-ln -s /media/System/Databases /tmp/gaadatatmp/databases
-ln -s /media/System/Region /tmp/gaadatatmp/geninfo
-ln -s /media/System/Bios /tmp/gaadatatmp/system/bios
-ln -s /media/System/Preferences/System /tmp/gaadatatmp/preferences
-
-# Create data on tmpfs
-mkdir -p /tmp/datatmp/sony/sgmo /tmp/datatmp/AppData/sony
-ln -s /tmp/diag /tmp/datatmp/sony/sgmo/diag
-ln -s /dev/shm/power /tmp/datatmp/power
-ln -s /media/System/UI /tmp/datatmp/sony/ui
-ln -s /media/System/Preferences/User /tmp/datatmp/AppData/sony/ui
-ln -s /media/System/Preferences/AutoDimmer /tmp/datatmp/AppData/sony/auto_dimmer
-cp -r /usr/sony/share/recovery/AppData/sony/pcsx /tmp/datatmp/AppData/sony/pcsx
-ln -s /media/System/Bios /tmp/datatmp/AppData/sony/pcsx/bios
-ln -s /usr/sony/bin/plugins /tmp/datatmp/AppData/sony/pcsx/plugins
-
-# Link games to folders
-#ls /media/Games | grep '^[0-9]\+$' | xargs -I % sh -c "ln -s /media/Games/%/GameData /tmp/gaadatatmp/% && mkdir -p /media/Games/%/.pcsx && cp /media/Games/%/GameData/pcsx.cfg /media/Games/%/.pcsx"
-# Link save data and configuration to folders
-#ls /media/Games | grep '^[0-9]\+$' | xargs -I % sh -c "rm -rf /tmp/datatmp/AppData/sony/pcsx/% && ln -s /media/Games/% /tmp/datatmp/AppData/sony/pcsx/%"
-
-
-# Fix for last selected game issue. If not in place user may experience UI issue
-sed -i "s/iUiUserSettingLastSelectGameCursorPos.*/iUiUserSettingLastSelectGameCursorPos=0/" /tmp/datatmp/AppData/sony/ui/user.pre
-
-# Fix for line endings. BAD WINDOWS
-find /media -name *.cfg -exec sed -i 's/\r//g' {} \;
-find /media -name *.pre -exec sed -i 's/\r//g' {} \;
-
-
-
-
-
-
diff --git a/cmake-build-debug/payload/lolhack/boot.sh b/cmake-build-debug/payload/lolhack/boot.sh
deleted file mode 100755
index 2ee70df..0000000
--- a/cmake-build-debug/payload/lolhack/boot.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-killall -s KILL sonyapp showLogo ui_menu
-
-./boot_autobleem.sh
-./bleemsync.sh
-./link_autobleem.sh
-
-sync
-cd /data/AppData/sony/pcsx
-export PCSX_ESC_KEY=2
-/usr/sony/bin/ui_menu --power-off-enable &> /media/System/Logs/ui_menu.log
-sync
-sync
-reboot
-
-
-
-
-
-
diff --git a/cmake-build-debug/payload/lolhack/boot_autobleem.sh b/cmake-build-debug/payload/lolhack/boot_autobleem.sh
deleted file mode 100755
index 3dda4a0..0000000
--- a/cmake-build-debug/payload/lolhack/boot_autobleem.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-# Update Database on the fly
-cd /media/cbleemsync
-mkdir -p /media/System/
-mkdir -p /media/System/Databases/
-./run.sh
-sync
-cp /media/System/regional.db /media/System/Databases/
-sync
\ No newline at end of file
diff --git a/cmake-build-debug/payload/lolhack/link_autobleem.sh b/cmake-build-debug/payload/lolhack/link_autobleem.sh
deleted file mode 100755
index bfaa8ba..0000000
--- a/cmake-build-debug/payload/lolhack/link_autobleem.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/bash
-
-#clean after bleemsync
-
-#This should replace links created by bleemsync with autobleem
-
-INPUT=/media/cbleemsync/autobleem.list
-OLDIFS=$IFS
-IFS=,
-[ ! -f $INPUT ] && { echo "$INPUT file not found"; exit 99; }
-while read number game_path
-do
- echo "$number - $game_path" >> /media/System/Logs/autobleem.log
-
-game_path=${game_path/|@/,}
-game_path=${game_path/||/|}
-
-ln -s $game_path/GameData /tmp/gaadatatmp/$number && mkdir -p $game_path/.pcsx && cp $game_path/GameData/pcsx.cfg $game_path/.pcsx
-rm -rf /tmp/datatmp/AppData/sony/pcsx/$number && ln -s $game_path /tmp/datatmp/AppData/sony/pcsx/$number
-
-
-done < $INPUT
-IFS=$OLDIFS
-
-
-sync
-sync
-sync
diff --git a/cmake-build-debug/payload/lolhack/lolhack.sh b/cmake-build-debug/payload/lolhack/lolhack.sh
deleted file mode 100755
index 54b10ac..0000000
--- a/cmake-build-debug/payload/lolhack/lolhack.sh
+++ /dev/null
@@ -1 +0,0 @@
-cd /media/lolhack;sed -i 's/\r//g' boot.sh;source boot.sh
\ No newline at end of file
diff --git a/cmake-build-debug/pcsx.cfg b/cmake-build-debug/pcsx.cfg
deleted file mode 100755
index 303615c..0000000
--- a/cmake-build-debug/pcsx.cfg
+++ /dev/null
@@ -1,278 +0,0 @@
-Bios = SET_BY_PCSX
-Gpu3 = builtin_gpu
-Spu = builtin_spu
-Xa = 0
-Mdec = 0
-Cdda = 0
-Debug = 0
-PsxOut = 0
-SpuIrq = 0
-RCntFix = 0
-VSyncWA = 0
-Cpu = 0
-region = 0
-g_scaler3 = 2
-g_gamma = 64
-g_layer_x = 0
-g_layer_y = 0
-g_layer_w = 0
-g_layer_h = 0
-soft_filter = 0
-scanlines = 0
-scanline_level = 14
-plat_target.vout_method = 1
-plat_target.hwfilter = 0
-plat_target.vout_fullscreen = 0
-state_slot = 0
-cpu_clock = ffffffff
-g_opts = 00
-in_type_sel1 = 0
-in_type_sel2 = 0
-analog_deadzone = 32
-memcard1_sel = ffffffff
-memcard2_sel = ffffffff
-g_autostateld_opt = 0
-open_invalid_time = 16
-adev0_is_nublike = 0
-adev1_is_nublike = 0
-frameskip3 = 0
-gpu_peops.iUseDither = 0
-gpu_peops.dwActFixes = 80
-gpu_unai.lineskip = 0
-gpu_unai.abe_hack = 0
-gpu_unai.no_light = 0
-gpu_unai.no_blend = 0
-gpu_neon.allow_interlace = 2
-gpu_neon.enhancement_enable = 0
-gpu_neon.enhancement_no_main = 0
-gpu_peopsgl.bDrawDither = 0
-gpu_peopsgl.iFilterType = 0
-gpu_peopsgl.iFrameTexType = 0
-gpu_peopsgl.iUseMask = 0
-gpu_peopsgl.bOpaquePass = 0
-gpu_peopsgl.bAdvancedBlend = 0
-gpu_peopsgl.bUseFastMdec = 0
-gpu_peopsgl.iVRamSize = 40
-gpu_peopsgl.iTexGarbageCollection = 1
-gpu_peopsgl.dwActFixes = 0
-spu_config.iUseReverb = 1
-spu_config.iXAPitch = 0
-spu_config.iUseInterpolation = 1
-spu_config.iTempo = 0
-spu_config.iUseThread = 1
-config_save_counter = 4
-in_evdev_allow_abs_only = 0
-volume_boost = 0
-psx_clock = 39
-new_dynarec_hacks = 0
-in_enable_vibration = 0
-binddev = sdl:keys
-bind escape = Enter Menu
-bind backspace = Fast Forward
-bind c = player1 SELECT
-bind d = player1 TRIANGLE
-bind e = player1 L2
-bind r = player1 R1
-bind s = player1 SQUARE
-bind t = player1 R2
-bind v = player1 START
-bind w = player1 L1
-bind x = player1 CIRCLE
-bind z = player1 CROSS
-bind f1 = Save State
-bind f2 = Load State
-bind f3 = Prev Save Slot
-bind f4 = Next Save Slot
-bind f5 = Toggle Frameskip
-bind f6 = Take Screenshot
-bind f7 = Show/Hide FPS
-bind f8 = Switch Renderer
-bind f9 = CD Change button
-bind f10 = RESET button
-bind f11 = Toggle fullscreen
-bind right = player1 RIGHT
-bind left = player1 LEFT
-bind down = player1 DOWN
-bind up = player1 UP
-bind eject = CD Change button
-bind reset = RESET button
-binddev = sdl:Sony Interactive Entertainment Controller
-bind escape = Enter Menu
-bind backspace = Fast Forward
-bind f1 = Save State
-bind f2 = Load State
-bind f3 = Prev Save Slot
-bind f4 = Next Save Slot
-bind f5 = Toggle Frameskip
-bind f6 = Take Screenshot
-bind f7 = Show/Hide FPS
-bind f8 = Switch Renderer
-bind f9 = CD Change button
-bind f10 = RESET button
-bind f11 = Toggle fullscreen
-bind right = player1 RIGHT
-bind left = player1 LEFT
-bind down = player1 DOWN
-bind up = player1 UP
-bind \xF0 = player1 TRIANGLE
-bind \xF1 = player1 CIRCLE
-bind \xF2 = player1 CROSS
-bind \xF3 = player1 SQUARE
-bind \xF4 = player1 L2
-bind \xF5 = player1 R2
-bind \xF6 = player1 L1
-bind \xF7 = player1 R1
-bind \xF8 = player1 SELECT
-bind \xF9 = player1 START
-bind eject = CD Change button
-bind reset = RESET button
-binddev = sdl:Sony Interactive Entertainment Controller [1]
-bind escape = Enter Menu
-bind backspace = Fast Forward
-bind f1 = Save State
-bind f2 = Load State
-bind f3 = Prev Save Slot
-bind f4 = Next Save Slot
-bind f5 = Toggle Frameskip
-bind f6 = Take Screenshot
-bind f7 = Show/Hide FPS
-bind f8 = Switch Renderer
-bind f9 = CD Change button
-bind f10 = RESET button
-bind f11 = Toggle fullscreen
-bind right = player2 RIGHT
-bind left = player2 LEFT
-bind down = player2 DOWN
-bind up = player2 UP
-bind \xF0 = player2 TRIANGLE
-bind \xF1 = player2 CIRCLE
-bind \xF2 = player2 CROSS
-bind \xF3 = player2 SQUARE
-bind \xF4 = player2 L2
-bind \xF5 = player2 R2
-bind \xF6 = player2 L1
-bind \xF7 = player2 R1
-bind \xF8 = player2 SELECT
-bind \xF9 = player2 START
-bind eject = CD Change button
-bind reset = RESET button
-binddev = sdl:Sony SCPH-1000R
-bind escape = Enter Menu
-bind backspace = Fast Forward
-bind f1 = Save State
-bind f2 = Load State
-bind f3 = Prev Save Slot
-bind f4 = Next Save Slot
-bind f5 = Toggle Frameskip
-bind f6 = Take Screenshot
-bind f7 = Show/Hide FPS
-bind f8 = Switch Renderer
-bind f9 = CD Change button
-bind f10 = RESET button
-bind f11 = Toggle fullscreen
-bind right = player1 RIGHT
-bind left = player1 LEFT
-bind down = player1 DOWN
-bind up = player1 UP
-bind \xF0 = player1 TRIANGLE
-bind \xF1 = player1 CIRCLE
-bind \xF2 = player1 CROSS
-bind \xF3 = player1 SQUARE
-bind \xF4 = player1 L2
-bind \xF5 = player1 R2
-bind \xF6 = player1 L1
-bind \xF7 = player1 R1
-bind \xF8 = player1 SELECT
-bind \xF9 = player1 START
-bind eject = CD Change button
-bind reset = RESET button
-binddev = sdl:Sony SCPH-1000R [1]
-bind escape = Enter Menu
-bind backspace = Fast Forward
-bind f1 = Save State
-bind f2 = Load State
-bind f3 = Prev Save Slot
-bind f4 = Next Save Slot
-bind f5 = Toggle Frameskip
-bind f6 = Take Screenshot
-bind f7 = Show/Hide FPS
-bind f8 = Switch Renderer
-bind f9 = CD Change button
-bind f10 = RESET button
-bind f11 = Toggle fullscreen
-bind right = player2 RIGHT
-bind left = player2 LEFT
-bind down = player2 DOWN
-bind up = player2 UP
-bind \xF0 = player2 TRIANGLE
-bind \xF1 = player2 CIRCLE
-bind \xF2 = player2 CROSS
-bind \xF3 = player2 SQUARE
-bind \xF4 = player2 L2
-bind \xF5 = player2 R2
-bind \xF6 = player2 L1
-bind \xF7 = player2 R1
-bind \xF8 = player2 SELECT
-bind \xF9 = player2 START
-bind eject = CD Change button
-bind reset = RESET button
-binddev = sdl:iBUFFALO BSGP1204 Series
-bind escape = Enter Menu
-bind backspace = Fast Forward
-bind f1 = Save State
-bind f2 = Load State
-bind f3 = Prev Save Slot
-bind f4 = Next Save Slot
-bind f5 = Toggle Frameskip
-bind f6 = Take Screenshot
-bind f7 = Show/Hide FPS
-bind f8 = Switch Renderer
-bind f9 = CD Change button
-bind f10 = RESET button
-bind f11 = Toggle fullscreen
-bind right = player1 RIGHT
-bind left = player1 LEFT
-bind down = player1 DOWN
-bind up = player1 UP
-bind \xF0 = player1 TRIANGLE
-bind \xF1 = player1 CIRCLE
-bind \xF2 = player1 CROSS
-bind \xF3 = player1 SQUARE
-bind \xF4 = player1 L2
-bind \xF5 = player1 R2
-bind \xF6 = player1 L1
-bind \xF7 = player1 R1
-bind \xF8 = player1 SELECT
-bind \xF9 = player1 START
-bind eject = CD Change button
-bind reset = RESET button
-binddev = sdl:iBUFFALO BSGP1204 Series [1]
-bind escape = Enter Menu
-bind backspace = Fast Forward
-bind f1 = Save State
-bind f2 = Load State
-bind f3 = Prev Save Slot
-bind f4 = Next Save Slot
-bind f5 = Toggle Frameskip
-bind f6 = Take Screenshot
-bind f7 = Show/Hide FPS
-bind f8 = Switch Renderer
-bind f9 = CD Change button
-bind f10 = RESET button
-bind f11 = Toggle fullscreen
-bind right = player2 RIGHT
-bind left = player2 LEFT
-bind down = player2 DOWN
-bind up = player2 UP
-bind \xF0 = player2 TRIANGLE
-bind \xF1 = player2 CIRCLE
-bind \xF2 = player2 CROSS
-bind \xF3 = player2 SQUARE
-bind \xF4 = player2 L2
-bind \xF5 = player2 R2
-bind \xF6 = player2 L1
-bind \xF7 = player2 R1
-bind \xF8 = player2 SELECT
-bind \xF9 = player2 START
-bind eject = CD Change button
-bind reset = RESET button
diff --git a/cmake-build-debug/run.sh b/cmake-build-debug/run.sh
deleted file mode 100755
index 90b16a0..0000000
--- a/cmake-build-debug/run.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-
-./cbleemsync.arm /media/regional.db /media/Games/
-
diff --git a/src/code/cfgprocessor.cpp b/src/code/cfgprocessor.cpp
new file mode 100644
index 0000000..70994c5
--- /dev/null
+++ b/src/code/cfgprocessor.cpp
@@ -0,0 +1,62 @@
+//
+// Created by screemer on 2019-01-15.
+//
+
+#include "cfgprocessor.h"
+#include "util.h"
+
+using namespace std;
+
+void CfgProcessor::process(string source, string destination, int region, bool japan, int soundFilter, bool highres,
+ int clock) {
+ if (config.inifile.values["autoregion"] == "true") {
+ ifstream is;
+ ofstream os;
+ is.open(source);
+ os.open(destination);
+
+ string line;
+ while (getline(is, line)) {
+ if (line.rfind("Bios", 0) == 0) {
+ if (region == 0) {
+ line = "Bios = SET_BY_PCSX";
+ } else {
+ if (japan) {
+ line = "Bios = romJP.bin";
+ } else
+ {
+ line = "Bios = romw.bin";
+ }
+ }
+ }
+ if (line.rfind("region", 0) == 0) {
+ line = "region = "+to_string(region);
+ }
+ if (line.rfind("gpu_neon.enhancement_enable", 0) == 0) {
+ if (highres) {
+ line = "gpu_neon.enhancement_enable = 1";
+ } else
+ {
+ line = "gpu_neon.enhancement_enable = 0";
+ }
+ }
+ if (line.rfind("spu_config.iUseInterpolation", 0) == 0) {
+ line = "spu_config.iUseInterpolation = "+to_string(soundFilter);
+ }
+
+ if (line.rfind("psx_clock", 0) == 0) {
+ line = "psx_clock = "+to_string(clock);
+ }
+
+
+ os << line << endl;
+ }
+
+
+ os.flush();
+ os.close();
+ is.close();
+ } else {
+ Util::copy(source, destination);
+ }
+}
\ No newline at end of file
diff --git a/src/code/cfgprocessor.h b/src/code/cfgprocessor.h
new file mode 100644
index 0000000..e3861f5
--- /dev/null
+++ b/src/code/cfgprocessor.h
@@ -0,0 +1,16 @@
+//
+// Created by screemer on 2019-01-15.
+//
+
+#ifndef CBLEEMSYNC_CFGPROCESSOR_H
+#define CBLEEMSYNC_CFGPROCESSOR_H
+
+#include "config.h"
+class CfgProcessor {
+public:
+ Config config;
+ void process(string source, string destination, int region, bool japan, int soundFilter, bool highres, int clock);
+};
+
+
+#endif //CBLEEMSYNC_CFGPROCESSOR_H
diff --git a/src/code/game.cpp b/src/code/game.cpp
index f2735cd..3ee7128 100644
--- a/src/code/game.cpp
+++ b/src/code/game.cpp
@@ -5,6 +5,7 @@
#include "metadata.h"
#include "isodir.h"
#include "inifile.h"
+#include "cfgprocessor.h"
using namespace std;
@@ -41,47 +42,42 @@ string Game::scanSerial() {
is.open(destinationDir + pbpFileName);
long magic = Util::readDword(&is);
- if (magic!=0x50425000)
- {
+ if (magic != 0x50425000) {
return "";
}
long second = Util::readDword(&is);
- if (second != 0x10000)
- {
+ if (second != 0x10000) {
return "";
}
long sfoStart = Util::readDword(&is);
long sfoEnd = Util::readDword(&is);
- is.seekg(sfoStart,ios::beg);
+ is.seekg(sfoStart, ios::beg);
unsigned int signature = Util::readDword(&is);
- if (signature != 1179865088)
- {
+ if (signature != 1179865088) {
return "";
}
- unsigned int version=Util::readDword(&is);;
- unsigned int fields_table_offs=Util::readDword(&is);
- unsigned int values_table_offs=Util::readDword(&is);
+ unsigned int version = Util::readDword(&is);;
+ unsigned int fields_table_offs = Util::readDword(&is);
+ unsigned int values_table_offs = Util::readDword(&is);
int nitems = Util::readDword(&is);
vector fields;
vector values;
fields.clear();
values.clear();
- is.seekg(sfoStart,ios::beg);
- is.seekg(fields_table_offs,ios::cur);
- for (int i=0;iimageType == 1) {
// disc link
@@ -273,7 +272,7 @@ void Game::recoverMissingFiles() {
Disc disc;
disc.diskName = pbpFileName;
disc.cueFound = true;
- disc.cueName = pbpFileName;
+ disc.cueName = pbpFileName;
disc.binVerified = true;
discs.push_back(disc);
@@ -320,9 +319,9 @@ void Game::recoverMissingFiles() {
// maybe we can do better ?
string serial = scanSerial();
if (serial != "") {
- Metadata md;
- if (md.lookup(serial)) {
+ if (md.lookup(serial)) {
+ metadataLoaded = true;
cout << "Updating cover" << destination << endl;
ofstream pngFile;
pngFile.open(destination);
@@ -332,6 +331,7 @@ void Game::recoverMissingFiles() {
automationUsed = false;
imageFound = true;
};
+ md.clean();
}
imageFound = true;
@@ -345,7 +345,39 @@ void Game::recoverMissingFiles() {
string source = path + Util::separator() + "pcsx.cfg";
string destination = fullPath + GAME_DATA + Util::separator() + "pcsx.cfg";
cerr << "SRC:" << source << " DST:" << destination << endl;
- Util::copy(source, destination);
+ CfgProcessor *pcsxProcessor = new CfgProcessor();
+
+ int region = 0;
+ bool japan = false;
+
+
+ if (!metadataLoaded) {
+ string serial = scanSerial();
+ if (serial != "") {
+ metadataLoaded = md.lookup(serial);
+ }
+
+ }
+
+ if (metadataLoaded) {
+ if (md.lastRegion == "U") {
+ japan = false;
+ region = 1;
+ }
+ if (md.lastRegion == "J") {
+ japan = true;
+ region = 1;
+ }
+ if (md.lastRegion == "P") {
+ japan = false;
+ region = 2;
+ }
+
+ }
+ md.clean();
+ pcsxProcessor->process(source, destination, region, japan, 1, false, 39);
+ delete pcsxProcessor;
+ // Util::copy(source, destination);
pcsxCfgFound = true;
}
@@ -376,7 +408,7 @@ void Game::updateObj() {
for (int i = 0; i < strings.size(); i++) {
Disc disc;
disc.diskName = strings[i];
- if (imageType==0) {
+ if (imageType == 0) {
string cueFile = fullPath + GAME_DATA + Util::separator() + disc.diskName + EXT_CUE;
bool discCueExists = Util::exists(cueFile);
if (discCueExists) {
@@ -386,14 +418,11 @@ void Game::updateObj() {
}
discs.push_back(disc);
}
- if (imageType==1)
- {
- string pbpName = Util::findFirstFile(EXT_PBP,fullPath + GAME_DATA + Util::separator());
- if (pbpName==disc.diskName)
- {
+ if (imageType == 1) {
+ string pbpName = Util::findFirstFile(EXT_PBP, fullPath + GAME_DATA + Util::separator());
+ if (pbpName == disc.diskName) {
disc.cueFound = true;
- } else
- {
+ } else {
disc.cueFound = false;
}
diff --git a/src/code/isodir.cpp b/src/code/isodir.cpp
index 0329cfc..3bc9af9 100644
--- a/src/code/isodir.cpp
+++ b/src/code/isodir.cpp
@@ -23,15 +23,16 @@ int Isodir::getSectorAddress(int sector) {
}
unsigned char Isodir::readChar() {
- unsigned char c;
- stream.read((char*)&c, 1);
- return c;
+ unsigned char x;
+ stream->read(reinterpret_cast(&x), 1);
+
+ return x;
}
string Isodir::readString(int size) {
char str[size + 1];
str[size] = 0;
- stream.read(str, size);
+ stream->read(str, size);
return str;
}
@@ -51,21 +52,22 @@ unsigned long Isodir::readDword() {
}
int Isodir::findPrimaryDescriptor(int maxOffset) {
+ unsigned char c=0;
int addressStart = getSectorAddress(16);
int address = addressStart;
- stream.seekg(addressStart, ios::beg);
+ stream->seekg(addressStart);
for (int i = 0; i < maxOffset; i++) {
- char c = readChar();
+ c = readChar();
if (c != 1) {
address++;
c = readChar();
} else {
- int pos = stream.tellg();
+ int pos = stream->tellg();
string str = readString(5);
address = pos;
- stream.seekg(pos, ios::beg);
+ stream->seekg(pos, ios::beg);
if (str == "CD001") {
- int addr = stream.tellg();
+ int addr = stream->tellg();
offset = pos - 1 - addressStart;
return addr - 1;
} else {
@@ -93,19 +95,19 @@ void Isodir::readDir(vector * data, unsigned int sector, int maxlevel, i
return;
}
unsigned int currSector=sector;
- long currentPos = stream.tellg();
+ long currentPos = stream->tellg();
long sectorAddr = getSectorAddress(sector);
- stream.seekg(sectorAddr, ios::beg);
+ stream->seekg(sectorAddr, ios::beg);
for (int i=0;i<200;i++){ // max 200 entries - it will be less and it will just break the loop
- long start = stream.tellg();
+ long start = stream->tellg();
if (start==-1) break;
long readInSector = start-sectorAddr;
if (readInSector>=2048)
{
currSector++;
sectorAddr = getSectorAddress(currSector);
- stream.seekg(sectorAddr, ios::beg);
+ stream->seekg(sectorAddr, ios::beg);
continue;
}
long len = readChar();
@@ -114,7 +116,7 @@ void Isodir::readDir(vector * data, unsigned int sector, int maxlevel, i
currSector++;
sectorAddr = getSectorAddress(currSector);
- stream.seekg(sectorAddr, ios::beg);
+ stream->seekg(sectorAddr, ios::beg);
if (readInSector<2048-62)
{
break;
@@ -124,16 +126,16 @@ void Isodir::readDir(vector * data, unsigned int sector, int maxlevel, i
int ealen = readChar();
unsigned int loc = readDword();
- //stream.seekg(26, ios::cur);
- stream.seekg(4, ios::cur);
- stream.seekg(8, ios::cur);
- stream.seekg(7, ios::cur);
+ //stream->seekg(26, ios::cur);
+ stream->seekg(4, ios::cur);
+ stream->seekg(8, ios::cur);
+ stream->seekg(7, ios::cur);
int attr = readChar();
- stream.seekg(6, ios::cur);
+ stream->seekg(6, ios::cur);
int fileNameLen = readChar();
if (fileNameLen < 2) {
- stream.seekg(start + len);
+ stream->seekg(start + len);
if (fileNameLen == 0) break;
continue;
}
@@ -143,40 +145,50 @@ void Isodir::readDir(vector * data, unsigned int sector, int maxlevel, i
{
readDir(data,loc, maxlevel,level+1);
}
- stream.seekg(start + len);
+ stream->seekg(start + len);
}
- stream.seekg(currentPos, ios::beg);
+ stream->seekg(currentPos, ios::beg);
}
IsoDirectory Isodir::getDir(string binPath,int maxlevel) {
offset=0;
- stream.open(binPath, ios::binary);
- if (!stream.good()) {
+ stream = new ifstream(binPath, ios::binary | ios::in);
+ if (!stream->good()) {
return getEmptyDir();
}
- stream.seekg(0,ios::beg);
+ if (!stream->is_open()) {
+ delete stream;
+ return getEmptyDir();
+ }
+ stream->seekg(0);
int pdvAddress = findPrimaryDescriptor(50);
if (pdvAddress==-1)
{
+ stream->close();
+ delete stream;
return getEmptyDir();
}
int sectorAddr = getSectorAddress(16);
- stream.seekg(sectorAddr, ios::beg);
- stream.seekg(8, ios::cur);
+ stream->seekg(sectorAddr, ios::beg);
+ stream->seekg(8, ios::cur);
string system = readString(32);
string volname = readString(32);
- stream.seekg(86, ios::cur);
+ stream->seekg(86, ios::cur);
int sector = readDword();
- stream.seekg(getSectorAddress(sector), ios::beg);
+ stream->seekg(getSectorAddress(sector), ios::beg);
IsoDirectory result;
result.systemName = trim(system);
result.volumeName = trim(volname);
readDir(&result.rootDir,sector,maxlevel,0);
- stream.close();
+ stream->close();
if (result.rootDir.empty())
{
+ stream->close();
+ delete stream;
return getEmptyDir();
}
+ stream->close();
+ delete stream;
return result;
}
\ No newline at end of file
diff --git a/src/code/isodir.h b/src/code/isodir.h
index 47b8fe8..20d603a 100644
--- a/src/code/isodir.h
+++ b/src/code/isodir.h
@@ -31,7 +31,7 @@ class Isodir {
unsigned long readDword();
int findPrimaryDescriptor(int maxOffset);
int offset = 0;
- ifstream stream;
+ ifstream * stream;
};
diff --git a/src/code/metadata.cpp b/src/code/metadata.cpp
index 030a3c3..89a86c4 100644
--- a/src/code/metadata.cpp
+++ b/src/code/metadata.cpp
@@ -13,6 +13,7 @@ bool Metadata::lookup(string serial) {
if (db->connect(jDatabases[i])) {
if (db->querySerial(serial, this)) {
db->disconnect();
+ delete(db);
switch(i)
{
case 0:
@@ -32,6 +33,8 @@ bool Metadata::lookup(string serial) {
}
};
db->disconnect();
+ delete(db);
}
+
return false;
}
\ No newline at end of file
diff --git a/src/code/metadata.h b/src/code/metadata.h
index 1b6ed5f..10d024f 100644
--- a/src/code/metadata.h
+++ b/src/code/metadata.h
@@ -23,6 +23,15 @@ class Metadata {
string lastRegion="U";
bool lookup(string serial);
+ void clean()
+ {
+ if (bytes!=NULL)
+ {
+ free(bytes);
+ bytes=NULL;
+ }
+ }
+
};
diff --git a/src/code/scanner.cpp b/src/code/scanner.cpp
index fda1c01..4306185 100644
--- a/src/code/scanner.cpp
+++ b/src/code/scanner.cpp
@@ -266,7 +266,7 @@ void Scanner::scanDirectory(string path) {
}
- free(md.bytes);
+ md.clean();
} else {
game.title = game.pathName;
}