Human68k CUI emulator with sound.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

v68human.h 1.0KB

1234567891011121314151617181920212223242526272829303132333435
  1. #pragma once
  2. #include <stdio.h>
  3. #include <stdint.h>
  4. void v68_human_init(void);
  5. /* Initialize allocator. */
  6. int v68_mem_init();
  7. /* Allocate a block of memory. */
  8. uint32_t v68_mem_alloc(int size, uint32_t parent_addr);
  9. /* Free a previously allocated block of memory. */
  10. int v68_mem_free(uint32_t addr, uint32_t parent_addr);
  11. /* Get memory remaining to RAM top */
  12. uint32_t v68_mem_remaining();
  13. /* Resize a block. */
  14. int v68_mem_shrink(uint32_t addr, uint32_t new_size);
  15. /* Get the max allocatable block size. */
  16. int v68_mem_get_max();
  17. /* Free all the memory that belongs to a parent process. */
  18. /* Useful for when a process ends. */
  19. int v68_mem_free_parent(uint32_t parent_addr);
  20. void v68_mem_dump();
  21. /* Command queue */
  22. /* Similar to batch files but much simpler */
  23. int v68_queue_command(char *cmdline);
  24. /* Go to the next command or stop */
  25. void v68_queue_next_command();
  26. /* Env vars */
  27. int v68_env_append(char *env);
  28. int v68_env_set(char *var, char *value);
  29. char *v68_find_in_path(char *cmd);
  30. char *v68_env_get(char *var);