aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPaul Oliver <contact@pauloliver.dev>2024-02-29 02:29:14 +0100
committerPaul Oliver <contact@pauloliver.dev>2024-02-29 02:29:14 +0100
commit8af4b246d86df7bc906841689912534ea450cce5 (patch)
tree3f8432c1c305b151125997632cbd3c3de4fb3835 /include
parent687f56226dc8a024ef560ee4b390a630819f437c (diff)
Removed memory bit flags entirely.
[#28] Bit flags were exclusively a cosmetic component, not needed at all to run the simulator. I've added a new 'render' module that takes care of appending bit flags to rendered memory images, providing the same aesthetic result, but only when requested.
Diffstat (limited to 'include')
-rw-r--r--include/memory.h13
-rw-r--r--include/render.h26
2 files changed, 26 insertions, 13 deletions
diff --git a/include/memory.h b/include/memory.h
index 04284e7..6376d7c 100644
--- a/include/memory.h
+++ b/include/memory.h
@@ -82,19 +82,6 @@ SALIS_API void sal_mem_set_inst(uint32 address, uint8 inst);
*/
SALIS_API uint8 sal_mem_get_byte(uint32 address);
-/** Render a 1D image of a given block of memory. This is useful, as rendering
-* directly in python would be too slow. We use openmp for multi-threaded image
-* generation.
-*
-* @param origin Low bound of rendered image
-* @param cell_size Amount of bytes per rendered pixel (cell)
-* @param buff_size Amount of pixels (cells) to be generated
-* @param buffer Pre-allocated buffer to store the rendered pixels into
-*/
-SALIS_API void sal_mem_render_image(
- uint32 origin, uint32 cell_size, uint32 buff_size, uint8_p buffer
-);
-
void _sal_mem_cycle(void);
#endif
diff --git a/include/render.h b/include/render.h
new file mode 100644
index 0000000..85e9935
--- /dev/null
+++ b/include/render.h
@@ -0,0 +1,26 @@
+/**
+* @file render.h
+* @author Paul Oliver
+*
+* This module implements a multi-threaded memory render function that iterates
+* over a given area of memory and returns a 1D image. OMP is used to up
+* performance.
+*/
+
+#ifndef SALIS_RENDER_H
+#define SALIS_RENDER_H
+
+/** Render a 1D image of a given block of memory. This is useful, as rendering
+* directly in python would be too slow. We use openmp for multi-threaded image
+* generation.
+*
+* @param origin Low bound of rendered image
+* @param cell_size Amount of bytes per rendered pixel (cell)
+* @param buff_size Amount of pixels (cells) to be generated
+* @param buffer Pre-allocated buffer to store the rendered pixels into
+*/
+SALIS_API void sal_ren_get_image(
+ uint32 origin, uint32 cell_size, uint32 buff_size, uint8_p buffer
+);
+
+#endif