mc68hc11: Fixed a bug with TAP opcode

Fixed internal RAM/internal I/O start-up state, and updated Hit Poker driver to use it like it should.
Taito JC driver seems unaffected by this change.

======================================================================================================

http://mamedev.emulab.it/kale/fast/files/memory_map.png
This commit is contained in:
Angelo Salese 2009-06-26 19:22:46 +00:00
parent 604e49b303
commit 77330f38ee
3 changed files with 12 additions and 6 deletions

View File

@ -3289,8 +3289,11 @@ static void HC11OP(tab)(hc11_state *cpustate)
/* TAP 0x06 */
static void HC11OP(tap)(hc11_state *cpustate)
{
UINT8 ccr = cpustate->ccr;
cpustate->ccr = (REG_A & 0xbf) | (ccr & 0x40);
UINT8 x_flag = cpustate->ccr & CC_X;
cpustate->ccr = REG_A;
if(x_flag == 0 && cpustate->ccr & CC_X) //X flag cannot do a 0->1 transition with this instruction.
cpustate->ccr &= ~CC_X;
CYCLES(cpustate, 2);
}

View File

@ -397,6 +397,9 @@ static CPU_RESET( hc11 )
cpustate->pc = READ16(cpustate, 0xfffe);
cpustate->wait_state = 0;
cpustate->stop_state = 0;
cpustate->ccr = CC_X | CC_I | CC_S;
cpustate->reg_position = 0x1000;
cpustate->ram_position = 0;
}
static CPU_EXIT( hc11 )

View File

@ -215,7 +215,7 @@ static READ8_HANDLER( test_r )
/* overlap empty rom addresses */
static ADDRESS_MAP_START( hitpoker_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x00ff) AM_RAM // stack ram
AM_RANGE(0x1000, 0x103f) AM_READWRITE(hitpoker_pic_r,hitpoker_pic_w) AM_BASE(&hitpoker_sys_regs) // protection
AM_RANGE(0x1000, 0x103f) AM_RAM // internal I/O
AM_RANGE(0x8000, 0xb5ff) AM_READWRITE(hitpoker_vram_r,hitpoker_vram_w)
AM_RANGE(0xb600, 0xbdff) AM_RAM
AM_RANGE(0xbe0a, 0xbe0a) AM_READ_PORT("IN0")
@ -235,8 +235,8 @@ static ADDRESS_MAP_START( hitpoker_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0xbf00, 0xffff) AM_ROM
ADDRESS_MAP_END
/* unused, to be removed */
static ADDRESS_MAP_START( hitpoker_io, ADDRESS_SPACE_IO, 8 )
AM_RANGE(MC68HC11_IO_PORTA, MC68HC11_IO_PORTA) AM_READWRITE(hitpoker_pic_r,hitpoker_pic_w) AM_BASE(&hitpoker_sys_regs)
ADDRESS_MAP_END
static INPUT_PORTS_START( hitpoker )
@ -450,8 +450,8 @@ static const ay8910_interface ay8910_config =
/* For whatever reason the MCU capabilities are disabled, might be a version without it or the engineers programmed the MCU to not have it. */
static const hc11_config hitpoker_config =
{
0, //has internal I/O
0 //internal RAM size
1, //has internal I/O
0x100 //internal RAM size
};
static MACHINE_DRIVER_START( hitpoker )