mirror of
https://github.com/holub/mame
synced 2025-07-06 02:18:09 +03:00
Moved has_fpu to private: section and added methods to set and get it
This commit is contained in:
parent
619334986f
commit
cbb08316df
@ -168,9 +168,13 @@ public:
|
|||||||
void set_tas_write_callback(write8_delegate callback);
|
void set_tas_write_callback(write8_delegate callback);
|
||||||
uint16_t get_fc();
|
uint16_t get_fc();
|
||||||
void set_hmmu_enable(int enable);
|
void set_hmmu_enable(int enable);
|
||||||
|
void set_fpu_enable(int enable);
|
||||||
|
int get_fpu_enable();
|
||||||
void set_instruction_hook(read32_delegate ihook);
|
void set_instruction_hook(read32_delegate ihook);
|
||||||
void set_buserror_details(uint32_t fault_addr, uint8_t rw, uint8_t fc);
|
void set_buserror_details(uint32_t fault_addr, uint8_t rw, uint8_t fc);
|
||||||
|
|
||||||
|
private:
|
||||||
|
int has_fpu; /* Indicates if a FPU is available (yes on 030, 040, may be on 020) */
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
||||||
@ -211,7 +215,6 @@ public:
|
|||||||
int has_hmmu; /* Indicates if an Apple HMMU is available in place of the 68851 (020 only) */
|
int has_hmmu; /* Indicates if an Apple HMMU is available in place of the 68851 (020 only) */
|
||||||
int pmmu_enabled; /* Indicates if the PMMU is enabled */
|
int pmmu_enabled; /* Indicates if the PMMU is enabled */
|
||||||
int hmmu_enabled; /* Indicates if the HMMU is enabled */
|
int hmmu_enabled; /* Indicates if the HMMU is enabled */
|
||||||
int has_fpu; /* Indicates if a FPU is available (yes on 030, 040, may be on 020) */
|
|
||||||
int fpu_just_reset; /* Indicates the FPU was just reset */
|
int fpu_just_reset; /* Indicates the FPU was just reset */
|
||||||
|
|
||||||
/* Clocks required for instructions / exceptions */
|
/* Clocks required for instructions / exceptions */
|
||||||
|
@ -902,7 +902,7 @@ M68KMAKE_OP(1111, 0, ., .)
|
|||||||
|
|
||||||
M68KMAKE_OP(040fpu0, 32, ., .)
|
M68KMAKE_OP(040fpu0, 32, ., .)
|
||||||
{
|
{
|
||||||
if((mc68kcpu)->has_fpu)
|
if((mc68kcpu)->get_fpu_enable())
|
||||||
{
|
{
|
||||||
m68040_fpu_op0(mc68kcpu);
|
m68040_fpu_op0(mc68kcpu);
|
||||||
return;
|
return;
|
||||||
@ -913,7 +913,7 @@ M68KMAKE_OP(040fpu0, 32, ., .)
|
|||||||
|
|
||||||
M68KMAKE_OP(040fpu1, 32, ., .)
|
M68KMAKE_OP(040fpu1, 32, ., .)
|
||||||
{
|
{
|
||||||
if((mc68kcpu)->has_fpu)
|
if((mc68kcpu)->get_fpu_enable())
|
||||||
{
|
{
|
||||||
m68040_fpu_op1(mc68kcpu);
|
m68040_fpu_op1(mc68kcpu);
|
||||||
return;
|
return;
|
||||||
@ -4437,7 +4437,7 @@ M68KMAKE_OP(cpdbcc, 32, ., .)
|
|||||||
|
|
||||||
M68KMAKE_OP(cpgen, 32, ., .)
|
M68KMAKE_OP(cpgen, 32, ., .)
|
||||||
{
|
{
|
||||||
if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type) && (mc68kcpu->has_fpu || mc68kcpu->has_pmmu))
|
if(CPU_TYPE_IS_EC020_PLUS((mc68kcpu)->cpu_type) && (mc68kcpu->get_fpu_enable() || mc68kcpu->has_pmmu))
|
||||||
{
|
{
|
||||||
mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (cpgen)\n",
|
mc68kcpu->logerror("%s at %08x: called unimplemented instruction %04x (cpgen)\n",
|
||||||
(mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir);
|
(mc68kcpu)->tag(), REG_PC(mc68kcpu) - 2, (mc68kcpu)->ir);
|
||||||
@ -4472,7 +4472,7 @@ M68KMAKE_OP(cptrapcc, 32, ., .)
|
|||||||
|
|
||||||
M68KMAKE_OP(ftrapcc, 32, ., .)
|
M68KMAKE_OP(ftrapcc, 32, ., .)
|
||||||
{
|
{
|
||||||
if((mc68kcpu)->has_fpu)
|
if((mc68kcpu)->get_fpu_enable())
|
||||||
{
|
{
|
||||||
m68881_ftrap(mc68kcpu);
|
m68881_ftrap(mc68kcpu);
|
||||||
return;
|
return;
|
||||||
|
@ -1208,6 +1208,16 @@ void m68000_base_device::set_hmmu_enable(int enable)
|
|||||||
hmmu_enabled = enable;
|
hmmu_enabled = enable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void m68000_base_device::set_fpu_enable(int enable)
|
||||||
|
{
|
||||||
|
has_fpu = enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
int m68000_base_device::get_fpu_enable()
|
||||||
|
{
|
||||||
|
return has_fpu;
|
||||||
|
}
|
||||||
|
|
||||||
void m68000_base_device::set_instruction_hook(read32_delegate ihook)
|
void m68000_base_device::set_instruction_hook(read32_delegate ihook)
|
||||||
{
|
{
|
||||||
instruction_hook = ihook;
|
instruction_hook = ihook;
|
||||||
|
Loading…
Reference in New Issue
Block a user