diff --git a/fpPS4.lpi b/fpPS4.lpi
index 30ae50f..caa0d89 100644
--- a/fpPS4.lpi
+++ b/fpPS4.lpi
@@ -31,174 +31,372 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
-
+
-
-
+
-
-
+
-
+
-
+
-
+
-
-
+
-
-
+
-
+
-
+
-
-
+
+
-
+
-
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
-
+
-
+
-
-
+
-
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -208,9 +406,9 @@
-
+
-
+
diff --git a/ps4_libkernel/StopNotificationReason.inc b/kernel/StopNotificationReason.inc
similarity index 100%
rename from ps4_libkernel/StopNotificationReason.inc
rename to kernel/StopNotificationReason.inc
diff --git a/ps4_libkernel/libsysmodule.inc b/kernel/libsysmodule.inc
similarity index 100%
rename from ps4_libkernel/libsysmodule.inc
rename to kernel/libsysmodule.inc
diff --git a/ps4_libkernel/ps4_barrier.pas b/kernel/ps4_barrier.pas
similarity index 100%
rename from ps4_libkernel/ps4_barrier.pas
rename to kernel/ps4_barrier.pas
diff --git a/ps4_libkernel/ps4_cond.pas b/kernel/ps4_cond.pas
similarity index 100%
rename from ps4_libkernel/ps4_cond.pas
rename to kernel/ps4_cond.pas
diff --git a/ps4_libkernel/ps4_event_flag.pas b/kernel/ps4_event_flag.pas
similarity index 100%
rename from ps4_libkernel/ps4_event_flag.pas
rename to kernel/ps4_event_flag.pas
diff --git a/ps4_libkernel/ps4_kernel_file.pas b/kernel/ps4_kernel_file.pas
similarity index 100%
rename from ps4_libkernel/ps4_kernel_file.pas
rename to kernel/ps4_kernel_file.pas
diff --git a/ps4_libkernel/ps4_libkernel.pas b/kernel/ps4_libkernel.pas
similarity index 100%
rename from ps4_libkernel/ps4_libkernel.pas
rename to kernel/ps4_libkernel.pas
diff --git a/ps4_libkernel/ps4_map_mm.pas b/kernel/ps4_map_mm.pas
similarity index 100%
rename from ps4_libkernel/ps4_map_mm.pas
rename to kernel/ps4_map_mm.pas
diff --git a/ps4_libkernel/ps4_mutex.pas b/kernel/ps4_mutex.pas
similarity index 100%
rename from ps4_libkernel/ps4_mutex.pas
rename to kernel/ps4_mutex.pas
diff --git a/ps4_libkernel/ps4_pthread.pas b/kernel/ps4_pthread.pas
similarity index 100%
rename from ps4_libkernel/ps4_pthread.pas
rename to kernel/ps4_pthread.pas
diff --git a/ps4_libkernel/ps4_queue.pas b/kernel/ps4_queue.pas
similarity index 100%
rename from ps4_libkernel/ps4_queue.pas
rename to kernel/ps4_queue.pas
diff --git a/ps4_libkernel/ps4_rwlock.pas b/kernel/ps4_rwlock.pas
similarity index 100%
rename from ps4_libkernel/ps4_rwlock.pas
rename to kernel/ps4_rwlock.pas
diff --git a/ps4_libkernel/ps4_sema.pas b/kernel/ps4_sema.pas
similarity index 100%
rename from ps4_libkernel/ps4_sema.pas
rename to kernel/ps4_sema.pas
diff --git a/ps4_libkernel/ps4_signal.pas b/kernel/ps4_signal.pas
similarity index 100%
rename from ps4_libkernel/ps4_signal.pas
rename to kernel/ps4_signal.pas
diff --git a/ps4_libkernel/ps4_time.pas b/kernel/ps4_time.pas
similarity index 100%
rename from ps4_libkernel/ps4_time.pas
rename to kernel/ps4_time.pas
diff --git a/ps4_elf_tls.pas b/rtl/ps4_elf_tls.pas
similarity index 100%
rename from ps4_elf_tls.pas
rename to rtl/ps4_elf_tls.pas
diff --git a/ps4_handles.pas b/rtl/ps4_handles.pas
similarity index 100%
rename from ps4_handles.pas
rename to rtl/ps4_handles.pas
diff --git a/seh64.pas b/rtl/seh64.pas
similarity index 100%
rename from seh64.pas
rename to rtl/seh64.pas
diff --git a/trace_manager.pas b/rtl/trace_manager.pas
similarity index 100%
rename from trace_manager.pas
rename to rtl/trace_manager.pas
diff --git a/ajm_error.inc b/src/ajm/ajm_error.inc
similarity index 100%
rename from ajm_error.inc
rename to src/ajm/ajm_error.inc
diff --git a/ps4_libsceajm.pas b/src/ajm/ps4_libsceajm.pas
similarity index 100%
rename from ps4_libsceajm.pas
rename to src/ajm/ps4_libsceajm.pas
diff --git a/libportaudio.pas b/src/audio/libportaudio.pas
similarity index 100%
rename from libportaudio.pas
rename to src/audio/libportaudio.pas
diff --git a/ps4_libsceaudioout.pas b/src/audio/ps4_libsceaudioout.pas
similarity index 100%
rename from ps4_libsceaudioout.pas
rename to src/audio/ps4_libsceaudioout.pas
diff --git a/ps4_libscenpmanager.pas b/src/np/ps4_libscenpmanager.pas
similarity index 100%
rename from ps4_libscenpmanager.pas
rename to src/np/ps4_libscenpmanager.pas
diff --git a/ps4_libscenpmatching2.pas b/src/np/ps4_libscenpmatching2.pas
similarity index 100%
rename from ps4_libscenpmatching2.pas
rename to src/np/ps4_libscenpmatching2.pas
diff --git a/ps4_libscenpscore.pas b/src/np/ps4_libscenpscore.pas
similarity index 100%
rename from ps4_libscenpscore.pas
rename to src/np/ps4_libscenpscore.pas
diff --git a/ps4_libscenpsignaling.pas b/src/np/ps4_libscenpsignaling.pas
similarity index 100%
rename from ps4_libscenpsignaling.pas
rename to src/np/ps4_libscenpsignaling.pas
diff --git a/ps4_libscenptrophy.pas b/src/np/ps4_libscenptrophy.pas
similarity index 100%
rename from ps4_libscenptrophy.pas
rename to src/np/ps4_libscenptrophy.pas
diff --git a/ps4_libsceappcontent.pas b/src/ps4_libsceappcontent.pas
similarity index 100%
rename from ps4_libsceappcontent.pas
rename to src/ps4_libsceappcontent.pas
diff --git a/ps4_libscedialogs.pas b/src/ps4_libscedialogs.pas
similarity index 100%
rename from ps4_libscedialogs.pas
rename to src/ps4_libscedialogs.pas
diff --git a/ps4_libscediscmap.pas b/src/ps4_libscediscmap.pas
similarity index 100%
rename from ps4_libscediscmap.pas
rename to src/ps4_libscediscmap.pas
diff --git a/ps4_libscegnmdriver.pas b/src/ps4_libscegnmdriver.pas
similarity index 100%
rename from ps4_libscegnmdriver.pas
rename to src/ps4_libscegnmdriver.pas
diff --git a/ps4_libscehttp.pas b/src/ps4_libscehttp.pas
similarity index 100%
rename from ps4_libscehttp.pas
rename to src/ps4_libscehttp.pas
diff --git a/ps4_libsceime.pas b/src/ps4_libsceime.pas
similarity index 100%
rename from ps4_libsceime.pas
rename to src/ps4_libsceime.pas
diff --git a/ps4_libscemouse.pas b/src/ps4_libscemouse.pas
similarity index 100%
rename from ps4_libscemouse.pas
rename to src/ps4_libscemouse.pas
diff --git a/ps4_libscenet.pas b/src/ps4_libscenet.pas
similarity index 100%
rename from ps4_libscenet.pas
rename to src/ps4_libscenet.pas
diff --git a/ps4_libscepad.pas b/src/ps4_libscepad.pas
similarity index 100%
rename from ps4_libscepad.pas
rename to src/ps4_libscepad.pas
diff --git a/ps4_libsceplaygo.pas b/src/ps4_libsceplaygo.pas
similarity index 100%
rename from ps4_libsceplaygo.pas
rename to src/ps4_libsceplaygo.pas
diff --git a/ps4_libsceremoteplay.pas b/src/ps4_libsceremoteplay.pas
similarity index 100%
rename from ps4_libsceremoteplay.pas
rename to src/ps4_libsceremoteplay.pas
diff --git a/ps4_libscertc.pas b/src/ps4_libscertc.pas
similarity index 100%
rename from ps4_libscertc.pas
rename to src/ps4_libscertc.pas
diff --git a/ps4_libscesavedata.pas b/src/ps4_libscesavedata.pas
similarity index 100%
rename from ps4_libscesavedata.pas
rename to src/ps4_libscesavedata.pas
diff --git a/ps4_libscesystemservice.pas b/src/ps4_libscesystemservice.pas
similarity index 100%
rename from ps4_libscesystemservice.pas
rename to src/ps4_libscesystemservice.pas
diff --git a/ps4_libsceuserservice.pas b/src/ps4_libsceuserservice.pas
similarity index 100%
rename from ps4_libsceuserservice.pas
rename to src/ps4_libsceuserservice.pas
diff --git a/ps4_libscevideoout.pas b/src/ps4_libscevideoout.pas
similarity index 100%
rename from ps4_libscevideoout.pas
rename to src/ps4_libscevideoout.pas
diff --git a/tools/elf_sym/elf_sym.lpi b/tools/elf_sym/elf_sym.lpi
index 12121d2..2c59e25 100644
--- a/tools/elf_sym/elf_sym.lpi
+++ b/tools/elf_sym/elf_sym.lpi
@@ -47,7 +47,7 @@
-
+
diff --git a/tools/elf_sym/elf_sym.lpr b/tools/elf_sym/elf_sym.lpr
index 78b9a12..3d9356d 100644
--- a/tools/elf_sym/elf_sym.lpr
+++ b/tools/elf_sym/elf_sym.lpr
@@ -4,10 +4,11 @@ uses
cmem,
cthreads,
{$ENDIF}
- Classes,sysutils,
+ Classes,
+ sysutils,
gset,
sha1,
- ps4_types,
+ sys_types,
uarch;
type