+/*
+ * (C) Copyright 2014 Leo C. <erbl259-lmu@yahoo.de>
+ *
+ * SPDX-License-Identifier: GPL-2.0
+ */
+#include "common.h"
#define ZST_ACQUIRED 0x01
#define ZST_RUNNING 0x02
typedef enum {LOW, HIGH} level_t;
+
+void z80_bus_request_or_exit(void);
+
+uint32_t z80_get_busreq_cycles(void);
zstate_t z80_bus_state(void);
zstate_t z80_bus_cmd(bus_cmd_t cmd);
void z80_setup_bus(void);
int z80_stat_reset(void);
-//void z80_busreq(level_t level);
int z80_stat_halt(void);
+void z80_toggle_reset(void);
+void z80_toggle_busreq(void);
+int32_t z80_memsize_detect(void);
void z80_write(uint32_t addr, uint8_t data);
uint8_t z80_read(uint32_t addr);
void z80_memset(uint32_t addr, uint8_t data, uint32_t length);
typedef enum fifo_t {
fifo_msgin, fifo_msgout,
- fifo_conout, fifo_conin,
+ fifo_conin, fifo_conout,
NUM_FIFOS
} fifo_t;
int z80_memfifo_getc(const fifo_t f);
uint8_t z80_memfifo_getc_wait(const fifo_t f);
void z80_memfifo_putc(fifo_t f, uint8_t val);
+
+void z80_load_mem(int_fast8_t verbosity, const FLASH unsigned char data[],
+ const FLASH unsigned long *sections,
+ const FLASH unsigned long address[],
+ const FLASH unsigned long length_of_sections[]);