mirror of
https://github.com/holub/mame
synced 2025-05-31 10:01:51 +03:00
Corrected a major oversight in the instruction encoding of the SSEM core [MooglyGuy]
This commit is contained in:
parent
1e190e8be5
commit
799228d1b4
@ -32,8 +32,8 @@ INLINE ssem_state *get_safe_token(const device_config *device)
|
|||||||
return (ssem_state *)device->token;
|
return (ssem_state *)device->token;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define INSTR (op & 7)
|
#define INSTR ((op >> 13) & 7)
|
||||||
#define ADDR ((op >> 3) & 0x1f)
|
#define ADDR (op & 0x1f)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
@ -144,7 +144,7 @@ INLINE void WRITE32(ssem_state *cpustate, UINT32 address, UINT32 data)
|
|||||||
static CPU_INIT( ssem )
|
static CPU_INIT( ssem )
|
||||||
{
|
{
|
||||||
ssem_state *cpustate = get_safe_token(device);
|
ssem_state *cpustate = get_safe_token(device);
|
||||||
cpustate->pc = 0;
|
cpustate->pc = 1;
|
||||||
cpustate->a = 0;
|
cpustate->a = 0;
|
||||||
cpustate->halt = 0;
|
cpustate->halt = 0;
|
||||||
|
|
||||||
@ -160,7 +160,7 @@ static CPU_RESET( ssem )
|
|||||||
{
|
{
|
||||||
ssem_state *cpustate = get_safe_token(device);
|
ssem_state *cpustate = get_safe_token(device);
|
||||||
|
|
||||||
cpustate->pc = 0;
|
cpustate->pc = 1;
|
||||||
cpustate->a = 0;
|
cpustate->a = 0;
|
||||||
cpustate->halt = 0;
|
cpustate->halt = 0;
|
||||||
}
|
}
|
||||||
@ -172,7 +172,7 @@ static CPU_EXECUTE( ssem )
|
|||||||
|
|
||||||
cpustate->icount = cycles;
|
cpustate->icount = cycles;
|
||||||
|
|
||||||
cpustate->pc &= 0x1fff;
|
cpustate->pc &= 0x1f;
|
||||||
|
|
||||||
while (cpustate->icount > 0)
|
while (cpustate->icount > 0)
|
||||||
{
|
{
|
||||||
|
@ -37,8 +37,8 @@ INLINE UINT32 reverse(UINT32 v)
|
|||||||
|
|
||||||
offs_t ssem_dasm_one(char *buffer, offs_t pc, UINT32 op)
|
offs_t ssem_dasm_one(char *buffer, offs_t pc, UINT32 op)
|
||||||
{
|
{
|
||||||
UINT8 instr = reverse(op) & 7;
|
UINT8 instr = (reverse(op) >> 13) & 7;
|
||||||
UINT8 addr = (reverse(op) >> 3) & 0x1f;
|
UINT8 addr = reverse(op) & 0x1f;
|
||||||
|
|
||||||
output = buffer;
|
output = buffer;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user