mirror of
https://github.com/holub/mame
synced 2025-04-21 16:01:56 +03:00
Hyperstone dasm fp/h support (nw)
This commit is contained in:
parent
3eb7d8aa7d
commit
cc3e1898b2
@ -391,6 +391,10 @@ u32 hyperstone_disassembler::opcode_alignment() const
|
||||
return 2;
|
||||
}
|
||||
|
||||
hyperstone_disassembler::hyperstone_disassembler(config *conf) : m_config(conf)
|
||||
{
|
||||
}
|
||||
|
||||
/*****************************/
|
||||
/* Main disassembly function */
|
||||
/*****************************/
|
||||
@ -408,8 +412,8 @@ offs_t hyperstone_disassembler::disassemble(std::ostream &stream, offs_t pc, con
|
||||
uint8_t source_bit = SOURCEBIT(op);
|
||||
uint8_t dest_bit = DESTBIT(op);
|
||||
|
||||
global_fp = 0;
|
||||
int h_flag = 0;
|
||||
global_fp = m_config->get_fp();
|
||||
int h_flag = m_config->get_h();
|
||||
|
||||
uint8_t op_num = (op & 0xff00) >> 8;
|
||||
|
||||
|
@ -15,7 +15,14 @@
|
||||
class hyperstone_disassembler : public util::disasm_interface
|
||||
{
|
||||
public:
|
||||
hyperstone_disassembler() = default;
|
||||
struct config {
|
||||
virtual ~config() = default;
|
||||
|
||||
virtual u8 get_fp() const = 0;
|
||||
virtual bool get_h() const = 0;
|
||||
};
|
||||
|
||||
hyperstone_disassembler(config *conf);
|
||||
virtual ~hyperstone_disassembler() = default;
|
||||
|
||||
virtual u32 opcode_alignment() const override;
|
||||
@ -26,8 +33,11 @@ private:
|
||||
static const char *const G_REG[];
|
||||
static const char *const SETxx[];
|
||||
|
||||
int size, global_fp;
|
||||
config *m_config;
|
||||
|
||||
int size;
|
||||
u8 global_fp;
|
||||
|
||||
void LL_format(char *source, char *dest, uint16_t op);
|
||||
void LR_format(char *source, char *dest, uint16_t op);
|
||||
void RR_format(char *source, char *dest, uint16_t op, unsigned h_flag);
|
||||
|
@ -149,7 +149,6 @@
|
||||
#include "debugger.h"
|
||||
|
||||
#include "32xsdefs.h"
|
||||
#include "32xsdasm.h"
|
||||
|
||||
//#define VERBOSE 1
|
||||
#include "logmacro.h"
|
||||
@ -1413,7 +1412,17 @@ void hyperstone_device::state_string_export(const device_state_entry &entry, std
|
||||
|
||||
util::disasm_interface *hyperstone_device::create_disassembler()
|
||||
{
|
||||
return new hyperstone_disassembler;
|
||||
return new hyperstone_disassembler(this);
|
||||
}
|
||||
|
||||
u8 hyperstone_device::get_fp() const
|
||||
{
|
||||
return GET_FP;
|
||||
}
|
||||
|
||||
bool hyperstone_device::get_h() const
|
||||
{
|
||||
return GET_H;
|
||||
}
|
||||
|
||||
/* Opcodes */
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include "cpu/drcfe.h"
|
||||
#include "cpu/drcuml.h"
|
||||
#include "cpu/drcumlsh.h"
|
||||
#include "32xsdasm.h"
|
||||
|
||||
/*
|
||||
A note about clock multipliers and dividers:
|
||||
@ -60,7 +61,7 @@ class e132xs_frontend;
|
||||
// ======================> hyperstone_device
|
||||
|
||||
// Used by core CPU interface
|
||||
class hyperstone_device : public cpu_device
|
||||
class hyperstone_device : public cpu_device, public hyperstone_disassembler::config
|
||||
{
|
||||
friend class e132xs_frontend;
|
||||
|
||||
@ -215,6 +216,8 @@ protected:
|
||||
|
||||
// device_disasm_interface overrides
|
||||
virtual util::disasm_interface *create_disassembler() override;
|
||||
virtual u8 get_fp() const override;
|
||||
virtual bool get_h() const override;
|
||||
|
||||
// device_state_interface overrides
|
||||
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
|
||||
|
@ -238,6 +238,17 @@ struct z8000_unidasm_t : z8000_disassembler::config
|
||||
virtual bool get_segmented_mode() const override { return segmented_mode; }
|
||||
} z8000_unidasm;
|
||||
|
||||
// Configuration missing
|
||||
struct hyperstone_unidasm_t : hyperstone_disassembler::config
|
||||
{
|
||||
bool h;
|
||||
u8 fp;
|
||||
hyperstone_unidasm_t() { h = false; fp = 0; }
|
||||
virtual ~hyperstone_unidasm_t() = default;
|
||||
|
||||
virtual u8 get_fp() const { return fp; }
|
||||
virtual bool get_h() const { return h; }
|
||||
} hyperstone_unidasm;
|
||||
|
||||
|
||||
|
||||
@ -322,7 +333,7 @@ static const dasm_table_entry dasm_table[] =
|
||||
{ "hmcs40", le, -1, []() -> util::disasm_interface * { return new hmcs40_disassembler; } },
|
||||
{ "hp_hybrid", be, -1, []() -> util::disasm_interface * { return new hp_hybrid_disassembler; } },
|
||||
{ "hp_5061_3001", be, -1, []() -> util::disasm_interface * { return new hp_5061_3001_disassembler; } },
|
||||
{ "hyperstone", be, 0, []() -> util::disasm_interface * { return new hyperstone_disassembler; } },
|
||||
{ "hyperstone", be, 0, []() -> util::disasm_interface * { return new hyperstone_disassembler(&hyperstone_unidasm); } },
|
||||
{ "i4004", le, 0, []() -> util::disasm_interface * { return new i4004_disassembler; } },
|
||||
{ "i4040", le, 0, []() -> util::disasm_interface * { return new i4040_disassembler; } },
|
||||
{ "i8008", le, 0, []() -> util::disasm_interface * { return new i8008_disassembler; } },
|
||||
|
Loading…
Reference in New Issue
Block a user