summaryrefslogtreecommitdiffstats
path: root/src/mame/machine/igs022.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/machine/igs022.h')
-rw-r--r--src/mame/machine/igs022.h27
1 files changed, 18 insertions, 9 deletions
diff --git a/src/mame/machine/igs022.h b/src/mame/machine/igs022.h
index 619b7a0fc86..5fb2bd9115c 100644
--- a/src/mame/machine/igs022.h
+++ b/src/mame/machine/igs022.h
@@ -1,33 +1,42 @@
// license:BSD-3-Clause
// copyright-holders:David Haywood, ElSemi
-/* IGS022 */
#ifndef MAME_MACHINE_IGS022_H
#define MAME_MACHINE_IGS022_H
#pragma once
-
class igs022_device : public device_t
{
public:
igs022_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
- void IGS022_handle_command();
+ void handle_command();
protected:
virtual void device_start() override;
virtual void device_reset() override;
- u32 m_kb_regs[0x100];
-
- void IGS022_do_dma(u16 src, u16 dst, u16 size, u16 mode);
- void IGS022_reset();
-
private:
+ static constexpr u16 NUM_REGS = 0x300, STACK_SIZE = 0x100;
+ u32 m_regs[NUM_REGS];
+ u32 m_stack[STACK_SIZE];
+ u8 m_stack_ptr;
+
optional_shared_ptr<u16> m_sharedprotram;
required_memory_region m_rom;
-};
+ u32 read_reg(u16 offset);
+ void write_reg(u16 offset, u32 data);
+
+ void push_stack(u32 data);
+ u32 pop_stack();
+ std::string stack_as_string() const;
+
+ void do_dma(u16 src, u16 dst, u16 size, u16 mode);
+
+ void handle_command_6d();
+ void handle_incomplete_command(u16 cmd, u16 res);
+};
DECLARE_DEVICE_TYPE(IGS022, igs022_device)