Fixed a bogus Hu6280 CPU core bug with timer latch division values readings [Angelo Salese]

This commit is contained in:
Angelo Salese 2010-09-07 17:26:42 +00:00
parent 7e98d6e583
commit 0cbb217cdb

View File

@ -327,14 +327,14 @@ READ8_HANDLER( h6280_timer_r )
{
/* only returns countdown */
h6280_Regs *cpustate = get_safe_token(space->cpu);
return ((cpustate->timer_value/1024)&0x7F)|(cpustate->io_buffer&0x80);
return ((cpustate->timer_value >> 10)&0x7F)|(cpustate->io_buffer&0x80);
}
WRITE8_HANDLER( h6280_timer_w )
{
h6280_Regs *cpustate = get_safe_token(space->cpu);
cpustate->io_buffer=data;
switch (offset) {
switch (offset & 1) {
case 0: /* Counter preload */
cpustate->timer_load=cpustate->timer_value=((data&127)+1)*1024;
return;