- switch( addr & 0xf0 )\r
- {\r
- case 0x20: /* 0x20-0x2f Mode */\r
- switch( addr )\r
- {\r
- case 0x24: { // timer A High 8\r
- int TAnew = (ym2612_st->TA & 0x03)|(((int)v)<<2);\r
- if (ym2612_st->TA != TAnew) {\r
- // we should reset ticker only if new value is written. Outrun requires this.\r
- ym2612_st->TA = TAnew;\r
- ym2612_st->TAC = (1024-TAnew)*18;\r
- ym2612_st->TAT = 0;\r
- }\r
- return 0;\r
- }\r
- case 0x25: { // timer A Low 2\r
- int TAnew = (ym2612_st->TA & 0x3fc)|(v&3);\r
- if (ym2612_st->TA != TAnew) {\r
- ym2612_st->TA = TAnew;\r
- ym2612_st->TAC = (1024-TAnew)*18;\r
- ym2612_st->TAT = 0;\r
- }\r
- return 0;\r
- }\r
- case 0x26: // timer B\r
- if (ym2612_st->TB != v) {\r
- ym2612_st->TB = v;\r
- ym2612_st->TBC = (256-v)<<4;\r
- ym2612_st->TBC *= 18;\r
- ym2612_st->TBT = 0;\r
- }\r