Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
edd7cca
init
celerizer Dec 17, 2025
107f44b
standardize types for match count
celerizer Dec 17, 2025
cf41f81
bugfixes, it works now
celerizer Dec 17, 2025
3611bde
add search backup value
celerizer Dec 17, 2025
c115d6b
get more performance by not branching
celerizer Dec 17, 2025
7d9a65d
misc warning cleanup
celerizer Dec 17, 2025
fbd4f52
use less memory in bitmap for val_size > 1
celerizer Dec 17, 2025
25752be
probably a bug if chunk < default chunk size
celerizer Dec 17, 2025
5e594ae
initial support for external process read bucket
celerizer Dec 17, 2025
c3801be
style, only get funcptr once per search
celerizer Dec 17, 2025
35a41f8
remove the old search
celerizer Dec 18, 2025
6667612
expose search free
celerizer Dec 18, 2025
5f33829
start the boring thankless job of hooking it up
celerizer Dec 18, 2025
b7d975e
duuurrrrrrrrr c89fix
celerizer Dec 18, 2025
3314606
split read/write funcs into read_buffer/read_value
celerizer Dec 18, 2025
5d3e750
gruntwork for 32bit and big endian
celerizer Dec 19, 2025
0604613
baka gaijin
celerizer Dec 19, 2025
62dd581
adjust fake cl-server responses
celerizer Dec 19, 2025
e12c88d
not needed here
celerizer Dec 19, 2025
7d1ce38
just adjusting what the tests print
celerizer Dec 19, 2025
dcddea8
make an opaque handle for search target
celerizer Dec 20, 2025
e11c35b
Merge branch 'ackman83' of https://github.com/classicslive/classicsli…
celerizer Dec 20, 2025
e25c9a1
simplify
celerizer Dec 20, 2025
8a5ddbd
poop
celerizer Dec 21, 2025
35b3098
add settarget to ui
celerizer Dec 21, 2025
c76bbb6
little stuff
celerizer Dec 22, 2025
a9602f1
hhokup new options to ui (64/dfp search, target)
celerizer Dec 22, 2025
4d97550
redo valuetostring
celerizer Dec 22, 2025
843b0d3
add endianness, delta search, other stuff
celerizer Dec 22, 2025
8650c42
guh
celerizer Dec 24, 2025
04bbc52
fix crash on poking value
celerizer Dec 27, 2025
20a5901
pause guest program on search step
celerizer Dec 27, 2025
de0c507
use mmap for bucket but keep chunks in heap
celerizer Dec 27, 2025
4a88a58
oops
celerizer Dec 27, 2025
844b82a
inspector design changes
celerizer Jan 5, 2026
e9c0118
add conditional to use target format for lu, llu
celerizer Jan 5, 2026
a549953
misc warnings
celerizer Jan 5, 2026
0933db1
why was this size 0...
celerizer Jan 8, 2026
57b3bc5
error handling on cl_login route
celerizer Jan 8, 2026
5b59c71
allow caller to provide a precomputed md5
celerizer Jan 11, 2026
7203858
silence maybe-unused warning
celerizer Jan 11, 2026
0f14593
add user login fields to json parser
celerizer Jan 11, 2026
19a73b0
allow compiler to exclude md5 hashing
celerizer Jan 11, 2026
ae36102
add password field
celerizer Jan 11, 2026
156037b
message bounds check in cl_message
celerizer Feb 5, 2026
3dd488c
fix mistaken u16 swap on be targets
celerizer Feb 5, 2026
ca773f9
fix various unsafe buffer accesses
celerizer Feb 8, 2026
9bcaee8
replace all bool with cl_error or cl_bool
celerizer Feb 8, 2026
1576bc4
pointer search - use types from new search
celerizer Feb 11, 2026
fc1c1fe
only include os mman if using external mem
celerizer Feb 11, 2026
da95e83
remove stdint from global namespace
celerizer Feb 11, 2026
f08753e
add test for sizeof cl_int64 == 8
celerizer Feb 11, 2026
38dfe60
add cl_dma to remove stdlib from global namespace
celerizer Feb 11, 2026
7329b06
fix double-free error
celerizer Feb 11, 2026
cdceefc
explicitly include stdlib in source files
celerizer Mar 4, 2026
64aa7af
get icon url on site login
celerizer Mar 4, 2026
fff2365
ignore mirrors and subregions of memory
celerizer Mar 6, 2026
aa23439
various fixes
celerizer Mar 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
402 changes: 208 additions & 194 deletions 3rdparty/jsonsax/jsonsax.c

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions 3rdparty/jsonsax/jsonsax_full.c
Original file line number Diff line number Diff line change
Expand Up @@ -3127,6 +3127,7 @@ typedef WriteBufferData* WriteBuffer;

static void WriteBuffer_Reset(WriteBuffer buffer)
{
buffer->bytes[0] = 0;
buffer->used = 0;
}

Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ TARGET := cl_test

OBJS_CLASSICSLIVE := $(CLASSICS_LIVE_SOURCES_CLASSICSLIVE:.c=.o)
OBJS_LIBRETRO := $(CLASSICS_LIVE_SOURCES_LIBRETRO:.c=.o)
OBJS_TEST := $(CLASSICS_LIVE_DIR)/cl_test.o
OBJS_TEST := $(CLASSICS_LIVE_DIR)/cl_test.o $(CLASSICS_LIVE_DIR)/cl_test_main.o
OBJS := $(OBJS_CLASSICSLIVE) $(OBJS_LIBRETRO) $(OBJS_TEST)

.PHONY: all clean
Expand All @@ -25,6 +25,9 @@ $(CLASSICS_LIVE_LIBRETRO_DIR)/%.o: $(CLASSICS_LIVE_LIBRETRO_DIR)/%.c
$(CLASSICS_LIVE_DIR)/cl_test.o: $(CLASSICS_LIVE_DIR)/cl_test.c
$(CC) $(CFLAGS_C89) -c $< -o $@

$(CLASSICS_LIVE_DIR)/cl_test_main.o: $(CLASSICS_LIVE_DIR)/cl_test_main.c
$(CC) $(CFLAGS_C89) -c $< -o $@

$(TARGET): $(OBJS)
$(CC) $(OBJS) -o $@ $(LDFLAGS)

Expand Down
45 changes: 35 additions & 10 deletions cl_abi.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "cl_abi.h"

static const cl_abi_t *cl_g_abi = NULL;
static const cl_abi_t *cl_g_abi = CL_NULL;

cl_error cl_abi_register(const cl_abi_t *abi)
{
Expand All @@ -19,7 +19,10 @@ cl_error cl_abi_register(const cl_abi_t *abi)
!abi->functions.core.user_data)
return CL_ERR_PARAMETER_INVALID;
#if CL_EXTERNAL_MEMORY
else if (!abi->functions.external.read || !abi->functions.external.write)
else if (!abi->functions.external.read_buffer ||
!abi->functions.external.read_value ||
!abi->functions.external.write_buffer ||
!abi->functions.external.write_value)
return CL_ERR_PARAMETER_INVALID;
#endif
else
Expand Down Expand Up @@ -91,22 +94,44 @@ cl_error cl_abi_user_data(cl_user_t *user, unsigned index)

#if CL_EXTERNAL_MEMORY

cl_error cl_abi_external_read(void *dest, cl_addr_t address,
cl_error cl_abi_external_read_buffer(void *dest, cl_addr_t address,
unsigned size, unsigned *read)
{
if (cl_g_abi && cl_g_abi->functions.external.read && dest)
return cl_g_abi->functions.external.read(dest, address, size, read);
else
#if CL_SAFETY
if (!dest || !read || !cl_g_abi || !cl_g_abi->functions.external.read_buffer)
return CL_ERR_PARAMETER_NULL;
#endif
return cl_g_abi->functions.external.read_buffer(dest, address, size, read);
}

cl_error cl_abi_external_read_value(void *dest, cl_addr_t address,
cl_value_type type)
{
#if CL_SAFETY
if (!dest || !cl_g_abi || !cl_g_abi->functions.external.read_value)
return CL_ERR_PARAMETER_NULL;
#endif
return cl_g_abi->functions.external.read_value(dest, address, type);
}

cl_error cl_abi_external_write(const void *src, cl_addr_t address,
cl_error cl_abi_external_write_buffer(const void *src, cl_addr_t address,
unsigned size, unsigned *written)
{
if (cl_g_abi && cl_g_abi->functions.external.write && src)
return cl_g_abi->functions.external.write(src, address, size, written);
else
#if CL_SAFETY
if (!src || !written || !cl_g_abi || !cl_g_abi->functions.external.write_buffer)
return CL_ERR_PARAMETER_NULL;
#endif
return cl_g_abi->functions.external.write_buffer(src, address, size, written);
}

cl_error cl_abi_external_write_value(const void *src, cl_addr_t address,
cl_value_type type)
{
#if CL_SAFETY
if (!src || !cl_g_abi || !cl_g_abi->functions.external.write_value)
return CL_ERR_PARAMETER_NULL;
#endif
return cl_g_abi->functions.external.write_value(src, address, type);
}

#endif
36 changes: 26 additions & 10 deletions cl_abi.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ cl_error cl_abi_install_memory_regions(cl_memory_region_t **regions,

/**
* Requests from the frontend the name of the target library or program.
* Make sure the string returned remains valid for the lifetime of the
* program.
* This could be the name of a dynamically linked library, an external
* process name, or the name of a program classicslive-integration has
* been statically compiled into.
Expand Down Expand Up @@ -95,8 +97,11 @@ cl_error cl_abi_user_data(cl_user_t *user, unsigned index);
* @param size The number of bytes to copy.
* @param read The number of bytes successfully read.
*/
cl_error cl_abi_external_read(void *dest, cl_addr_t address,
unsigned size, unsigned *read);
cl_error cl_abi_external_read_buffer(void *dest, cl_addr_t address,
unsigned size, unsigned *read);

cl_error cl_abi_external_read_value(void *dest, cl_addr_t address,
cl_value_type type);

/**
* Instructs the frontend to copy data to external memory.
Expand All @@ -106,8 +111,11 @@ cl_error cl_abi_external_read(void *dest, cl_addr_t address,
* @param size The number of bytes to copy.
* @param written The number of bytes successfully written.
*/
cl_error cl_abi_external_write(const void *src, cl_addr_t address,
unsigned size, unsigned *written);
cl_error cl_abi_external_write_buffer(const void *src, cl_addr_t address,
unsigned size, unsigned *written);

cl_error cl_abi_external_write_value(const void *src, cl_addr_t address,
cl_value_type type);

#endif

Expand Down Expand Up @@ -145,13 +153,21 @@ typedef struct

struct external
{
/** @see cl_abi_external_read */
cl_error (*read)(void *dest, cl_addr_t address, unsigned size,
unsigned *read);
/** @see cl_abi_external_read_buffer */
cl_error (*read_buffer)(void *dest, cl_addr_t address, unsigned size,
unsigned *read);

/** @see cl_abi_external_read_value */
cl_error (*read_value)(void *dest, cl_addr_t address,
cl_value_type type);

/** @see cl_abi_external_write_buffer */
cl_error (*write_buffer)(const void *src, cl_addr_t address,
unsigned size, unsigned *written);

/** @see cl_abi_external_write */
cl_error (*write)(const void *src, cl_addr_t address, unsigned size,
unsigned *written);
/** @see cl_abi_external_write_value */
cl_error (*write_value)(const void *src, cl_addr_t address,
cl_value_type type);
} external;
} functions;
} cl_abi_t;
Expand Down
Loading